跳到主要内容

POI

消息类型: map_manager/msg/POI

描述

兴趣点(Point of Interest)定义,如充电站、等待点等

字段定义

字段

字段名类型描述
idstring过渡点唯一标识符
namestring楼层可读名称
typestringPOI 类型(如 "charging_station", "waiting_point", "door")
floor_idstring楼层唯一标识符(如 "1F", "2F", "B1")
posegeometry_msgs/Pose2D2D 位姿(x, y, theta)
heightfloat64距楼层参考高度的偏移(米)
propertiesstring自定义属性(JSON 字符串)

使用示例

在服务中使用

Bash
# 添加充电站 POI
ros2 service call ${MM}/add_poi map_manager/srv/AddPOI \
"{poi: {
id: 'charging_1',
name: 'Charging Station 1',
type: 'charging_station',
floor_id: '1F',
pose: {x: 5.0, y: 3.0, theta: 1.57},
height: 0.0,
properties: '{\"voltage\": 24, \"current\": 10}'
}}"

Python 中构造

Python
from map_manager.msg import POI
from geometry_msgs.msg import Pose2D
import json

poi = POI()
poi.id = 'charging_1'
poi.name = 'Charging Station 1'
poi.type = 'charging_station'
poi.floor_id = '1F'
poi.pose = Pose2D(x=5.0, y=3.0, theta=1.57)
poi.height = 0.0
poi.properties = json.dumps({'voltage': 24, 'current': 10})

相关接口