send_action_goal
Send a goal to a ROS 2 action server to command robot movements like navigation or arm motion. Optionally wait for the result or return the goal ID immediately for later cancellation.
Instructions
Send a goal to a ROS 2 action server via rosbridge.
CAUTION: actions typically make the robot move (navigation, arm motion). Rejected when ROSBRIDGE_MCP_READONLY is set.
Args: action_name: Action name, e.g. "/navigate_to_pose". action_type: Full action type with the "/action/" segment, e.g. "nav2_msgs/action/NavigateToPose". goal: JSON object matching the action's goal definition. Default {}. timeout: Max seconds to wait for the result when wait_for_result is true (default 30.0, clamped to at most 120.0). wait_for_result: If true (default), block until the action finishes and return its result. If false, return the goal_id immediately — use cancel_action_goal with that id to stop the goal later.
Returns, when waiting: {"action", "goal_id", "success", "status", "status_text" (succeeded/aborted/canceled/...), "values" (result fields), "last_feedback" (most recent feedback values, or null)}. When not waiting: {"action", "goal_id", "result_pending": true}.
Requires rosbridge_suite with ROS 2 action support (ops send_action_goal / cancel_action_goal). Against an older rosbridge the tool detects the rejected operation (via rosbridge status errors, or timeout as fallback) and returns an error advising to upgrade rosbridge_suite on the robot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | ||
| timeout | No | ||
| action_name | Yes | ||
| action_type | Yes | ||
| wait_for_result | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||