ros2_topic_publish
Publish custom messages to any ROS2 topic from a remote environment. Specify topic, type, and JSON data to send commands or updates to robotics applications without local ROS2 installation.
Instructions
Publish a message to a ROS2 topic.
Args:
topic: ROS2 topic name (e.g. '/robot/cmd_vel')
topic_type: Message type string (e.g. 'geometry_msgs/msg/Twist')
data: Message content as JSON object/dict
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>",
"topic_type": "<topic_type>",
"data": "<data>"
},
"name": "ros2_topic_publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| topic | Yes | ||
| topic_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |