Closed qiuzhong closed 6 years ago
I am afraid that we can not keep compatible with the rosbridge v2 protocol in ROS 2. The reason is below:
In ROS 1 era, we can get the message type by calling rostopic
, see this example. But the ros2cli in ROS 2 doesn't have this interface, and we have to carry the exact message type in the request from browser. The result is what you have gotten if the request didn't have the type
part.
Close this issue as we can not keep compatible with the rosbridge protocol. And we have added the compatibility section into README to point out the differences (#60).
According to rosbridge v2 protocol section 3.4.4 subscription
Let's take a look at the
subscribe
operation:type
field is optional, however, sending asubscribe
operation withouttype
field to the bridge server will get an error response.This error happened in _exractMessageType(type) before creating the
rclnodejs
subscription.