Press a button
press_buttonSimulate a button press on a robot's push-button sensor to trigger actions like toggling light tracking or stopping all operations.
Instructions
Press a push-button module (a sensor of type "button") for seconds and release it, like a person would. Held ≥ 0.8 s is a long press. The built-in program reacts: short press toggles the head's light tracking (happy face), long press stops everything (driving, autopilot, tracking; pauses the simulation). Returns the press event.
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": {
"id": "<id>"
},
"name": "press_button"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Button sensor id (list_sensors) | |
| seconds | No | How long to hold it (default 0.2 s) |