Skip to main content

Room

Message type: map_manager/msg/Room

Description

Defines a room boundary and its vertical extent on a floor.

Fields

FieldTypeDescription
idstringUnique identifier.
namestringHuman-readable name.
typestringEntity type.
boundarygeometry_msgs/Point[]Polygon or point sequence defining the boundary.
floor_heightfloat64Room floor height in meters.
ceiling_heightfloat64Room ceiling height in meters.
connected_roomsstring[]Identifiers of rooms connected to this room.
objectsstring[]List of semantic objects.

Examples

Example 1

Bash
# Add an office room
ros2 service call ${MM}/add_room map_manager/srv/AddRoom \
"{floor_id: '1F',
room: {
id: 'room_101',
name: 'Office 101',
type: 'office',
boundary: [
{x: 0.0, y: 0.0, z: 0.0},
{x: 5.0, y: 0.0, z: 0.0},
{x: 5.0, y: 4.0, z: 0.0},
{x: 0.0, y: 4.0, z: 0.0}
],
floor_height: 0.0,
ceiling_height: 2.8,
connected_rooms: ['room_102', 'hallway_1'],
objects: ['desk_001', 'chair_001']
}
}"

Example 2

Python
from map_manager.msg import Room
from geometry_msgs.msg import Point

room = Room()
room.id = 'room_101'
room.name = 'Office 101'
room.type = 'office'
room.boundary = [
Point(x=0.0, y=0.0, z=0.0),
Point(x=5.0, y=0.0, z=0.0),
Point(x=5.0, y=4.0, z=0.0),
Point(x=0.0, y=4.0, z=0.0)
]
room.floor_height = 0.0
room.ceiling_height = 2.8
room.connected_rooms = ['room_102', 'hallway_1']
room.objects = ['desk_001', 'chair_001']