跳到主要内容

VirtualWall

消息类型: map_manager/msg/VirtualWall

描述

虚拟墙定义,用于在地图上添加不可通行的虚拟障碍

字段定义

字段

字段名类型描述
idint32过渡点唯一标识符
floor_idstring楼层唯一标识符(如 "1F", "2F", "B1")
startgeometry_msgs/Point虚拟墙起点坐标(x, y, z)
endgeometry_msgs/Point虚拟墙终点坐标(x, y, z)

使用示例

在服务中使用

Bash
# 添加虚拟墙
ros2 service call ${MM}/add_virtual_wall map_manager/srv/AddVirtualWall \
"{floor_id: '1F',
wall: {
id: 1,
floor_id: '1F',
start: {x: 0.0, y: 0.0, z: 0.0},
end: {x: 5.0, y: 0.0, z: 0.0}
}
}"

Python 中构造

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

wall = VirtualWall()
wall.id = 1
wall.floor_id = '1F'
wall.start = Point(x=0.0, y=0.0, z=0.0)
wall.end = Point(x=5.0, y=0.0, z=0.0)

相关接口