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
- Upgraded
grpcio
:
I used the following command to upgradegrpcio
:
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
- Successful tests:
After upgradinggrpcio
, the following examples worked as expected:
camera_client
: I can stream live camera footage from my Linux device.pendant_state
andmotor_states_stream
: Both return correct feedback.
- 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:
- Could the issue with
vehicle_twist
be related to thegrpcio
version conflict mentioned above? - Are there additional steps or configurations required to make
vehicle_twist
work? - Is a firmware or software update needed for the Brain2 version of Amiga?