ForbiddenArea
Message type: map_manager/msg/ForbiddenArea
Description
Defines a polygonal keepout area that the robot must not enter.
Fields
| Field | Type | Description |
|---|---|---|
id | int32 | Unique identifier. |
boundary | geometry_msgs/Polygon | Polygon or point sequence defining the boundary. |
Examples
Example 1
Bash
# Add a square forbidden area
ros2 service call ${MM}/add_forbidden_area map_manager/srv/AddForbiddenArea \
"{floor_id: '1F',
area: {
id: 1,
boundary: {
points: [
{x: 0.0, y: 0.0, z: 0.0},
{x: 2.0, y: 0.0, z: 0.0},
{x: 2.0, y: 2.0, z: 0.0},
{x: 0.0, y: 2.0, z: 0.0}
]
}
}
}"
Example 2
Python
from map_manager.msg import ForbiddenArea
from geometry_msgs.msg import Polygon, Point32
area = ForbiddenArea()
area.id = 1
area.boundary = Polygon()
area.boundary.points = [
Point32(x=0.0, y=0.0, z=0.0),
Point32(x=2.0, y=0.0, z=0.0),
Point32(x=2.0, y=2.0, z=0.0),
Point32(x=0.0, y=2.0, z=0.0)
]