publish_topic
Publish a ROS2 message to a specified topic using its name, message type, and payload fields. This enables direct robot control and diagnostics via natural language.
Instructions
Publish a message to a ROS2 topic. Sandboxed: blocked in READ_ONLY mode; allowlisted in SAFE_WRITE mode.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>",
"msg_type": "<msg_type>",
"payload": "<payload>"
},
"name": "publish_topic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Topic name, e.g. '/cmd_vel' | |
| payload | Yes | Message fields as key-value pairs | |
| msg_type | Yes | Message type, e.g. 'geometry_msgs/Twist' |