Skip to main content

DangerousArea

Message type: map_manager/msg/DangerousArea

Description

Defines a polygonal speed-restricted area and its maximum permitted velocity.

Fields

FieldTypeDescription
idint32Unique identifier.
boundarygeometry_msgs/PolygonPolygon or point sequence defining the boundary.
speed_limitfloat32Maximum permitted speed in meters per second.

Examples

Example 1

Bash
# Add a square speed-restricted area with a 0.3 m/s limit
ros2 service call ${MM}/add_dangerous_area map_manager/srv/AddDangerousArea \
"{floor_id: '1F',
area: {
id: 1,
boundary: {
points: [
{x: 5.0, y: 5.0, z: 0.0},
{x: 8.0, y: 5.0, z: 0.0},
{x: 8.0, y: 8.0, z: 0.0},
{x: 5.0, y: 8.0, z: 0.0}
]
},
speed_limit: 0.3
}
}"

Example 2

Python
from map_manager.msg import DangerousArea
from geometry_msgs.msg import Polygon, Point32

area = DangerousArea()
area.id = 1
area.boundary = Polygon()
area.boundary.points = [
Point32(x=5.0, y=5.0, z=0.0),
Point32(x=8.0, y=5.0, z=0.0),
Point32(x=8.0, y=8.0, z=0.0),
Point32(x=5.0, y=8.0, z=0.0)
]
area.speed_limit = 0.3 # m/s