Skip to main content

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​

FieldTypeDescription
floor_idstringIDL compatibility field; ignored by GRW.
areamap_manager/msg/ForbiddenAreaTarget numeric id and a four-vertex axis-aligned rectangular boundary.

Response​

FieldTypeDescription
successboolWhether the operation succeeded.
messagestringResult message.
area_idint32Numeric ID of the updated area.
wall_idsint32[]IDL response field; GRW does not create virtual walls.

Example​

Complete Environment Preparation first: the CLI examples require ROBOT_NAMESPACE to 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}]}}}"

AddForbiddenArea, ListForbiddenAreas, and RemoveForbiddenArea.