MAVSDK-Python
MAVSDK-Python copied to clipboard
ComponentInformationServer plugin "UNIMPLEMENTED"
When running the attached code and connecting to the headless px4 docker container (jonasvautherin/px4-gazebo-headless) I receive this error.
Traceback (most recent call last):
File "/Users/fibonacci/Desktop/Mines/Fall-2022/Field-Session/MAVSDK-Python/custom_examples/component_infomation_server.py", line 20, in <module>
loop.run_until_complete(run())
File "/usr/local/Cellar/[email protected]/3.10.7/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/Users/fibonacci/Desktop/Mines/Fall-2022/Field-Session/MAVSDK-Python/custom_examples/component_infomation_server.py", line 13, in run
await drone.component_information_server.provide_float_param(param)
File "/usr/local/lib/python3.10/site-packages/mavsdk/component_information_server.py", line 472, in provide_float_param
response = await self._stub.ProvideFloatParam(request)
File "/usr/local/lib/python3.10/site-packages/aiogrpc/channel.py", line 40, in __call__
return await fut
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = ""
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B::1%5D:50051 {created_time:"2022-10-10T13:58:06.105218-06:00", grpc_status:12, grpc_message:""}"
>
Based on a prior reported issue (#394), I think this might be some simple issue with the library.
Code
import asyncio
from mavsdk import System
from mavsdk.component_information_server import FloatParam
async def run():
drone = System()
await drone.connect(system_address="udp://:14540")
param = FloatParam("test", "test", "test", "test_unit", 2, 0, 0, -100, 100)
await drone.component_information_server.provide_float_param(param)
if __name__ == "__main__":
# Start the main function
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(run())
See https://github.com/mavlink/MAVSDK-Python/issues/520#issuecomment-1273923201