Topic Publisher
PROPublish raw JSON messages to any topic
When to reach for it
Topic Publisher is the freeform JSON editor: any topic, any schema, whatever payload you can type. Reach for it when no specific widget fits the message type. For one-shot commands of known shape, Custom Button is friendlier. For ROS 2 actions with progress and cancel, reach for Action Client (Pro) instead.
Worked example: pose goal
Topic /move_base_simple/goal, schema geometry_msgs/msg/PoseStamped. Default Message holds the full pose JSON. Tap it to edit in the JSON sheet. Turn Repeat Mode on and hold Publish at Repeat Rate 1 Hz: the setpoint stays alive only while held, not after one press.
Watch out for
- The schema is enforced by the receiver, not by Topic Publisher. A typo in a field name fails silently: the bridge accepts the JSON and the subscriber drops it. Verify with Topic Log on the same topic while you wire it up.
- Repeat Rate goes to 50 Hz on the slider, but the widget floors the publish interval at 50 ms, so nothing faster than 20 Hz ever reaches the topic no matter how high you drag it.
- Repeat Mode at high rates against an action server or a stateful controller is how you find backpressure. Start at 1 Hz and raise it only as far as the receiver needs, up to that real 20 Hz ceiling.
Configuration fields
The topic this widget publishes to. While connected, tap to pick from the topics the robot advertises.
The ROS message type for this topic, e.g. sensor_msgs/msg/Image. Usually auto-filled when you choose a topic.
Republish the message automatically at a fixed rate instead of once per send.
How many times per second to republish while Repeat Mode is on.
0.5 to 50, step 0.5