You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have created a message Allmsg in the package named my_msgs. I am not able to receive the message when subscribed to the concerned topic. I get an error stating the message required does not exist
ros2-web-bridge:Bridge JSON command received: {"op":"subscribe","id":"subscribe:/nmea:1","type":"my_msgs/Allmsg","topic":"/nmea","compression":"none","throttle_rate":0,"queue_length":0} +112ms
ros2-web-bridge:Bridge subscribe a topic named /nmea +1ms
ros2-web-bridge:Bridge Response: {"op":"status","level":"error","msg":"subscribe: Error: The message required does not exist: my_msgs, msg, Allmsg","id":"subscribe:/nmea:1"} +2ms
I am able to successfully subscribe and publish this above topic within ROS but the same with connecting over the bridge gives me and issue.
Here is my code for creating a new object for a topic with the related message type.
var txt_listener = new ROSLIB.Topic({
ros : ros,
name : '/nmea',
messageType : 'my_msgs/Allmsg'
The text was updated successfully, but these errors were encountered:
I think the root cause is that you created and compiled the message (my_msgs/Allmsg) defined by yourself after you ran the web bridge the first time. Normally, the generated JS messages are generated when the first time you run the web bridge, and if you want to add other message types later, you have to regenerate them forcibly, which is not exposed to the web bridge.
One possible solution is: delete $YOUR_APP_PATH/node_modules/rclnodejs/generated/ manually, then re-run the web bridge which will trigger the regeneration of all JS messages.
Let's say I have created a message Allmsg in the package named my_msgs. I am not able to receive the message when subscribed to the concerned topic. I get an error stating the message required does not exist
ros2-web-bridge:Bridge JSON command received: {"op":"subscribe","id":"subscribe:/nmea:1","type":"my_msgs/Allmsg","topic":"/nmea","compression":"none","throttle_rate":0,"queue_length":0} +112ms
ros2-web-bridge:Bridge subscribe a topic named /nmea +1ms
ros2-web-bridge:Bridge Response: {"op":"status","level":"error","msg":"subscribe: Error: The message required does not exist: my_msgs, msg, Allmsg","id":"subscribe:/nmea:1"} +2ms
I am able to successfully subscribe and publish this above topic within ROS but the same with connecting over the bridge gives me and issue.
Here is my code for creating a new object for a topic with the related message type.
The text was updated successfully, but these errors were encountered: