Open qiuzhong opened 6 years ago
Would you please check if the roslibjs
can support the id
section, as roslibjs
is the only JavaScript library we can use.
I checked the examples by launching two subscription.html instances. They have the same id when sending request to create subscription. So I guest roslibjs
doesn't require id
section when calling the API but it will construct the id
field automatically.
{"op":"subscribe","id":"subscribe:/example_topic:1","type":"std_msgs/String","topic":"/example_topic","compression":"none","throttle_rate":0,"queue_length":0}
And both instances work well.
In terms of the subscribe-related operations, like
subscribe
andunsubscribe
, theid
field is to identify the subscriptions when thetopic
is same. According to the rosbridge v2 protocol subscribe section:and unsubscribe section:
All the operations should support multiple subscriptions action. The
id
field can be useful to identify them.This feature should be supported by the bridge.