ros2-web-bridge
ros2-web-bridge copied to clipboard
Mismatch in service call from rosbridge protocol
Hi, I have encountered errors when creating ROS service calls using a 3rd party application (ROS#) that I have traced to what appears to be a mismatch with the rosbridge protocol being implemented here. The issue here is the list of expected parameters for a call_service op. The rosbridge protocol does not expect a type parameter (see: here); however, the type parameter is referenced in the ros2-web-bridge/lib/bridge.js script here).
This causes the following error when attempting to call a service according to the rosbridge protocol specifications:
JSON command received: {"service":"/rosapi/get_param","args":{"name":"/rosdistro","default":"default"},"fragment_size":2147483647,"compression":"none","op":"call_service","id":"/rosapi/getparam:0"}
Response: {"op":"status","level":"error","msg":"call_service: TypeError: Cannot read property 'indexOf' of undefined","id":"/rosapi/get_param:0"}
I have verified that this TypeError is being caused by attempting to pass in command.type to the _exractServiceType function in bridge.js
Thanks in advance for your help!