publish_to_topic
Publish a message to a ROS 2 topic. Specify the topic name, message content, and optional message type to send data to running ROS 2 nodes.
Instructions
Publish a message to a ROS 2 topic
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_name": "<topic_name>",
"message": "<message>"
},
"name": "publish_to_topic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | The message content in ROS message format | |
| topic_name | Yes | The topic name to publish to | |
| topic_type | No | The message type (e.g., std_msgs/String) |