update_forbidden_area
Service type: map_manager/srv/AddForbiddenArea
Service name: /forbidden/update
Description
Updates an existing forbidden area. The endpoint reuses AddForbiddenArea and locates the target by numeric area.id; the ID is unchanged after success. The boundary must be an axis-aligned rectangle with four vertices. GRW ignores floor_id and does not create virtual walls.
Request
| Field | Type | Description |
|---|---|---|
| floor_id | string | IDL compatibility field; ignored by GRW. |
| area | map_manager/msg/ForbiddenArea | Target numeric id and a four-vertex axis-aligned rectangular boundary. |
Response
| Field | Type | Description |
|---|---|---|
| success | bool | Whether the operation succeeded. |
| message | string | Result message. |
| area_id | int32 | Numeric ID of the updated area. |
| wall_ids | int32[] | IDL response field; GRW does not create virtual walls. |
Example
Complete Environment Preparation first: the CLI examples require
ROBOT_NAMESPACEto be set.
Bash
ros2 service call $ROBOT_NAMESPACE/forbidden/update map_manager/srv/AddForbiddenArea \
"{area: {id: 17, boundary: {points: [{x: 1.0, y: 1.0}, {x: 4.0, y: 1.0}, {x: 4.0, y: 3.0}, {x: 1.0, y: 3.0}]}}}"
Related APIs
AddForbiddenArea, ListForbiddenAreas, and RemoveForbiddenArea.