感知模块
感知模块(Perception)负责机器人的环境感知功能,包括目标检测、6D位姿估计、多尺度对象处理和环境对象信息管理等功能。
本模块位于 orin 开发板上,http 后端监听的端口为 58001。
Channel 接口
Section titled “Channel 接口”| 话题名 | 话题描述 | 订阅 or 发布 | 消息类型 | 备注 | 通信后端 |
|---|---|---|---|---|---|
/point_cloud_percep/tracked_obstacles | 跟踪障碍物 | 发布 | perception_msg_interface::msg::TrackedObstacles | ros2 | |
/point_cloud_percep/tracked_pedestrian | 行人检测-规划 | 发布 | perception_msg_interface::msg::TrackedObstacles | ros2 | |
/nv_cam_lidar_percep/occupancy_3d | 3D占用栅格地图 | 发布 | aimdk::protocol::PerceptionOcc3D | ros2 | |
/aima/hal/lidar/top/pointcloud | 激光雷达 | 订阅 | sensor_msgs::PointCloud2 | ros2 | |
/aima/hal/rgbd_camera/head_front/color | 头部RGB相机 | 订阅 | sensor_msgs::Image | ros2 | |
/aima/hal/rgbd_camera/head_front/depth | 头部深度相机 | 订阅 | sensor_msgs::Image | ros2 | |
/aima/hal/rgbd_camera/chassis_front/color | 底盘RGB相机 | 订阅 | sensor_msgs::Image | ros2 | |
/aima/hal/rgbd_camera/chassis_front/depth | 底盘深度相机 | 订阅 | sensor_msgs::Image | ros2 | |
/tf | TF变换数据 | 订阅 | tf2_msgs::TFMessage | ros2 |
RPC 接口
Section titled “RPC 接口”| 接口名 | 接口描述 | 请求消息类型 | 答复消息类型 | 备注 | 通信后端 |
|---|---|---|---|---|---|
pb:/aimdk.protocol.GraspObjService/UpdateGraspObjects | 更新抓取作业中的对象信息 | aimdk::protocol::UpdateGraspObjectsRequest | aimdk::protocol::UpdateGraspObjectsResponse | 为机器人动态添加附加对象 | http |
pb:/aimdk.protocol.Object2dDetectionService/Get2dDection | 2D目标检测 | aimdk::protocol::ObjectDetectionRequest | aimdk::protocol::ObjectDetectionResponse | 进行2D目标检测,返回二维边界框 | http |
pb:/aimdk.protocol.Object6dPoseEstimationService/Get6dPose | 6D位姿估计 | aimdk::protocol::ObjectPoseEstimationRequest | aimdk::protocol::ObjectPoseEstimationResponse | 进行6D位姿估计,返回二维和三维边界框 | http |
Protobuf 消息类型
Section titled “Protobuf 消息类型”aimdk::protocol::TargetType
Section titled “aimdk::protocol::TargetType”目标类型枚举
| Name | Number | Description |
|---|---|---|
| TargetType_UNKNOWN | 0 | 未知类型 |
| TargetType_PLASTIC_BOX | 1 | 塑料箱 |
| TargetType_METAL_SHELF | 2 | 金属货架 |
aimdk::protocol::ObjectDetectionRequest
Section titled “aimdk::protocol::ObjectDetectionRequest”目标检测请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| target_type | aimdk::protocol::TargetType | 目标类型枚举 |
aimdk::protocol::ObjectDetectionResponse
Section titled “aimdk::protocol::ObjectDetectionResponse”目标检测响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| box2d | aimdk::protocol::Box[] | 二维边界框列表 |
aimdk::protocol::ObjectPoseEstimationRequest
Section titled “aimdk::protocol::ObjectPoseEstimationRequest”目标位姿估计请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| target_type | aimdk::protocol::TargetType | 目标类型枚举 |
aimdk::protocol::ObjectPoseEstimationResponse
Section titled “aimdk::protocol::ObjectPoseEstimationResponse”目标位姿估计响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
| box2d | aimdk::protocol::Box[] | 二维边界框列表 |
| bbox6d | aimdk::protocol::Bbox6d[] | 三维边界框列表 |
aimdk::protocol::UpdateGraspObjectsRequest
Section titled “aimdk::protocol::UpdateGraspObjectsRequest”更新抓取对象信息请求
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::RequestHeader | 请求头 |
| grasp_objs | aimdk::protocol::GraspObject[] | 抓取对象列表 |
aimdk::protocol::UpdateGraspObjectsResponse
Section titled “aimdk::protocol::UpdateGraspObjectsResponse”更新抓取对象信息响应
| Field | Type | Description |
|---|---|---|
| success | bool | 更新结果返回值 |
aimdk::protocol::GraspObject
Section titled “aimdk::protocol::GraspObject”抓取对象
| Field | Type | Description |
|---|---|---|
| object_id | string | 物体唯一标识,例如 “box_1” |
| dims | aimdk::protocol::Vec3 | 物体长宽高 |
| pose | aimdk::protocol::SE3Pose | 物体pose |
| frame_id | string | 所属坐标系,例如 “left_arm_link07” |
aimdk::protocol::CommonResponse
Section titled “aimdk::protocol::CommonResponse”通用响应
| Field | Type | Description |
|---|---|---|
| header | aimdk::protocol::ResponseHeader | 响应头 |
aimdk::protocol::Bbox6d
Section titled “aimdk::protocol::Bbox6d”三维边界框
| Field | Type | Description |
|---|---|---|
| center | aimdk::protocol::Point3D | 中心点坐标 |
| size | aimdk::protocol::Point3D | 尺寸大小 |
| rotation | aimdk::protocol::Quaternion | 旋转四元数 |
perception_msg_interface::msg::TrackedObstacles
Section titled “perception_msg_interface::msg::TrackedObstacles”| Field | Type | Description |
|---|---|---|
| Infotracked_obstacle | aimdk::protocol::perception::TrackedObstacleInfo | |
| uint32 | track_id | 1 |
| uint32 | type_id | 2 |
| is_moving | bool | 3 |
| is_movable | bool | 4 |
| is_in_blind | bool | 5 |
| num_observation | uint32 | 6 |
| is_no_static_occluded | bool | 7 |
| center | Point | 8 |
| center_in_map | Point | 9 |
| velocity_in_map | Vector3 | 10 |
| smoothed_center_in_map | Point | 11 |
| center_in_odom | Point | 12 |
| velocity_in_odom | Vector3 | 13 |
| smoothed_center_in_odom | Point | 14 |
| polygon_in_map | Polygon | 15 |
| polygon_in_odom | Polygon | 16 |
| PointStamped prediction_center_in_odom | repeated | 17 |
| center_in_wcs | Point | 18 |
| velocity_in_wcs | Vector3 | 19 |
| smoothed_center_in_wcs | Point | 20 |
| polygon | Polygon | 21 |
| polygon_in_wcs | Polygon | 22 |
| PointStamped prediction_center_in_wcs | repeated | 23 |
提供 Http Curl 示例,需要将 127.0.0.1 替换为机器人 orin 开发板的 IP 地址:
2D目标检测
Section titled “2D目标检测”curl --location --request POST 'http://127.0.0.1:58001/rpc/aimdk.protocol.Object2dDetectionService/Get2dDection' \--header 'Content-Type: application/json' \--data-raw '{"header":{},"target_type":"TargetType_PLASTIC_BOX"}'6D位姿估计
Section titled “6D位姿估计”curl --location --request POST 'http://127.0.0.1:58001/rpc/aimdk.protocol.Object6dPoseEstimationService/Get6dPose' \--header 'Content-Type: application/json' \--data-raw '{"header":{},"target_type":"TargetType_METAL_SHELF"}'更新操作的抓取对象
Section titled “更新操作的抓取对象”curl --location --request POST 'http://127.0.0.1:58001/rpc/aimdk.protocol.GraspObjService/UpdateGraspObjectsRequest' \--header 'Content-Type: application/json' \--data-raw '{"header":{},"objects":[{"id":"obj_001","dims":{"x":1.2, "y":0.8, "z":0.6},"pose":{"position": {"x":1.2, "y":0.8, "z":0.6}, "orientation":{"x":0.15, "y":0.86, "z":0.652, "w":1.234}},"frame_id":"right_arm_01"}]}'