Farm-ng-amiga/py /examples/vehicle_twist Example run with no errors but the vehicle does not move

Hello Farm-ng Community,

I hope everyone is doing well. I’m facing an issue with the vehicle_twist example and would appreciate any insights. Below are the details:


System Information and Setup

  • Device: Linux-based system (Miniconda environment, Python 3.10)
  • Farm-ng Version: Brain2 (purchased in late 2024)
  • Documentation Followed: Camera Client Documentation

Encountered Error

Initially, when running the camera_client example, I received the following warning and error related to grpcio:

/home/paalab/miniconda3/envs/farm/lib/python3.10/site-packages/farm_ng/core/event_service_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.56.2, but the generated code in farm_ng/core/event_service_pb2_grpc.py depends on grpcio>=1.65.1. Please upgrade your grpc module to grpcio>=1.65.1 or downgrade your generated code using grpcio-tools<=1.56.2. This warning will become an error in 1.66.0, scheduled for release on August 6, 2024.
  warnings.warn(
Traceback (most recent call last):
  File "/home/paalab/Desktop/farm-ng-amiga/py/examples/camera_client/main.py", line 67, in <module>
    asyncio.run(main(args.service_config))
  File "/home/paalab/miniconda3/envs/farm/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/paalab/miniconda3/envs/farm/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/paalab/Desktop/farm-ng-amiga/py/examples/camera_client/main.py", line 39, in main
    async for event, message in EventClient(config).subscribe(config.subscriptions[0], decode=True):
  File "/home/paalab/miniconda3/envs/farm/lib/python3.10/site-packages/farm_ng/core/event_client.py", line 175, in subscribe
    if not await self._try_connect():
  File "/home/paalab/miniconda3/envs/farm/lib/python3.10/site-packages/farm_ng/core/event_client.py", line 147, in _try_connect
    self.stub = event_service_pb2_grpc.EventServiceStub(self.channel)
  File "/home/paalab/miniconda3/envs/farm/lib/python3.10/site-packages/farm_ng/core/event_service_pb2_grpc.py", line 43, in __init__
    self.listUris = channel.unary_unary(
TypeError: Channel.unary_unary() got an unexpected keyword argument '_registered_method'

Steps Taken to Resolve the Issue

  1. Upgraded grpcio:
    I used the following command to upgrade grpcio:
pip install --upgrade grpcio

The upgrade log showed:

Requirement already satisfied: grpcio in /home/paalab/miniconda3/envs/farm/lib/python3.10/site-packages (1.56.2)
Collecting grpcio
Using cached grpcio-1.69.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.9 kB)
Using cached grpcio-1.69.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB)
Installing collected packages: grpcio
Attempting uninstall: grpcio
Found existing installation: grpcio 1.56.2
Uninstalling grpcio-1.56.2:
Successfully uninstalled grpcio-1.56.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
farm-ng-package 0.1.4 requires grpcio==1.56.2, but you have grpcio 1.69.0 which is incompatible.
Successfully installed grpcio-1.69.0
  1. Successful tests:
    After upgrading grpcio, the following examples worked as expected:
  • camera_client: I can stream live camera footage from my Linux device.
  • pendant_state and motor_states_stream: Both return correct feedback.
  1. Remaining issue:
  • When running the vehicle_twist example, the script executes with no errors, but the vehicle does not move despite being in “auto mode”.

Questions:

  1. Could the issue with vehicle_twist be related to the grpcio version conflict mentioned above?
  2. Are there additional steps or configurations required to make vehicle_twist work?
  3. Is a firmware or software update needed for the Brain2 version of Amiga?

Hey @Tianqi_Yao,

We talked via email and I think all is working, but for the record here:

  • To control the Amiga using vehicle_twist example you need to change it mode to AUTO_READY, using the AUTO CONTROL button in screen below. You will know it is ready to go when there is a blinking blue box around the screen. NOTE: before firmware v0.7.0 this was a yellow box. I highly recommend people using earlier versions to update.

  • We are aware of the grpcio compatibility problem and working to solve it this week. The challenge is to publish the libraries with the least restrictive requirements for maximum compatibility with user codes.

  • Unless opted out, updates to the Brain images are pushed automatically. The last update happened on July 2024. When we do our releases, we publish here, on LinkedIn and send emails for the users, therefore, stay tuned!

1 Like