I'm new to ros2-web-bridge and its protocol, so it took me some time to understand that this is what happens when you try to publish without first advertising the topic and its type:
ros2-web-bridge:Bridge JSON command received: {"op":"publish","id":"publish:/example_topic2:1","topic":"/example_topic2","msg":{"data":"hello"},"latch":false} +11s
ros2-web-bridge:Bridge Publish a topic named /example_topic2 with {"data":"hello"} +0ms
ros2-web-bridge:Bridge Response: {"op":"status","level":"error","msg":"publish: TypeError: Cannot read property 'get' of undefined","id":"publish:/example_topic2:1"} +1ms
This PR adds a clearer error message (similar to what the other ops have):
ros2-web-bridge:Bridge JSON command received: {"op":"publish","id":"publish:/example_topic2:1","topic":"/example_topic2","msg":{"data":"hello"},"latch":false} +2s
ros2-web-bridge:Bridge Publish a topic named /example_topic2 with {"data":"hello"} +1ms
ros2-web-bridge:Bridge Response: {"op":"status","level":"error","msg":"publish: Error: The topic /example_topic2 does not exist","id":"publish:/example_topic2:1"} +1ms
I'm new to ros2-web-bridge and its protocol, so it took me some time to understand that this is what happens when you try to publish without first advertising the topic and its type:
This PR adds a clearer error message (similar to what the other
op
s have):