Update sensor
update_sensorModify any sensor on the 2D robot simulator by changing its name, type, mounting position, angle, detection range, or enabled status. Identify sensor IDs using the list_sensors tool.
Instructions
Change a sensor's name, type, mounting position, angle, range or enabled flag. Use list_sensors to find ids.
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": "update_sensor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Local x in px (forward +, rear −) | |
| y | No | Local y in px (right side +, left side −) | |
| id | Yes | ||
| name | No | Display name | |
| type | No | ||
| angle | No | Facing angle in degrees, 0 = forward, 90 = right side (wrapped to −180…180) | |
| range | No | Detection range in cm | |
| enabled | No |