ROS API 说明¶
dmcam_ros发布的话题¶
/smarttof/image_dist
使用命令 rosrun image_view image_view image:=/smarttof/image_dist 功能描述 从image_dist发布的话题中获取深度数据 /smarttof/image_gray
使用命令 rosrun image_view image_view image:=/smarttof/image_gray 功能描述 从image_gray发布的话题中获取灰度数据 /smarttof/camera_info
使用命令 rosrun image_view image_view image:=/smarttof/camera_info 功能描述 从camera_info发布的话题中打印摄像头的信息 /smarttof/pointcloud
使用命令 rosrun image_view image_view image:=/smarttof/pointcloud 功能描述 从rviz中显示通过pointcloud发布的话题中的点云数据
dmcam_ros发布的服务¶
/smarttof/change_power
使用命令 rosservice call /smarttof/change_power “power_value:<value>” 功能描述 动态修改PARAM_ILLUM_POWER的值 函数参数 value值默认为0 /smarttof/change_intg
使用命令 rosservice call /smarttof/change_intg “intg_value:<value>” 功能描述 动态修改PARAM_INTG_TIME的值,PARAM_INTG_TIME为积分时间 函数参数 积分时间的value值范围为0-1500 /smarttof/change_mod_freq
使用命令 rosservice call /smarttof/ change_mod_freq “mod_freq_value:<value>” 功能描述 动态修改PARAM_MOD_FREQ的值,PARAM_MOD_FREQ为时钟频率 函数参数 value值目前固定为12MHz /smarttof/change_frame_rate
使用命令 rosservice call /smarttof/ change_frame_rate “frame_rate_value:<value>” 功能描述 动态修改PARAM_FRAME_RATE的值,PARAM_FRAME_RATE为帧率 函数参数 vallue的范围为10-30 /smarttof/change_sync_delay
使用命令 rosservice call /smarttof/ change_sync_delay “sync_delay_value:<value>” 功能描述 动态修改PARAM_SYNC_DELAY的值,PARAM_SYNC_DELAY为同步延时时间 函数参数 value值0为自动,1-10为指定范围 /smarttof/change_filter
使用命令 rosservice call /smarttof/change_filter “filter_id: ‘<id>’filter_value:<value>” 功能描述 打开filter_id中指定id值的滤波功能 函数参数 filter_id中的id值可以设置为 DMCAM_FILTER_ID_LEN_CALIB //镜头校准 DMCAM_FILTER_ID_PIXEL_CALIB //像素校准 DMCAM_FILTER_ID_RESERVED //暂不支持 DMCAM_FILTER_ID_AMP //幅值滤波器 DMCAM_FILTER_ID_AUTO_INTG //积分时间 DMCAM_FILTER_ID_SYNC_DELAY //暂不支持 DMCAM_FILTER_ID_TEMP_MONITOR //暂不支持 DMCAM_FILTER_ID_HDR //HDR模式 DMCAM_FILTER_ID_OFFSET //距离偏移 DMCAM_FILTER_ID_SPORT_MODE //运动模式 DMCAM_FILTER_ID_SYS_CALIB //暂不支持 DMCAM_FILTER_ID_AMBIENT_LIGHT_CALIB //暂不支持 目前仅DMCAM_FILTER_ID_AMP中需要设置filter_value的value值,范围为0-100 其它filter_value中的value值默认为0即可 /smarttof/disable_filter
使用命令 rosservice call /smarttof/disable_filter “filter_id: ‘<id>’” 功能描述 关闭filter_id中id值的滤波功能 函数参数 filter_id中的id值可以设置为 DMCAM_FILTER_ID_LEN_CALIB //镜头校准 DMCAM_FILTER_ID_PIXEL_CALIB //像素校准 DMCAM_FILTER_ID_RESERVED //暂不支持 DMCAM_FILTER_ID_AMP //幅值滤波器 DMCAM_FILTER_ID_AUTO_INTG //积分时间 DMCAM_FILTER_ID_SYNC_DELAY //暂不支持 DMCAM_FILTER_ID_TEMP_MONITOR //暂不支持 DMCAM_FILTER_ID_HDR //HDR模式 DMCAM_FILTER_ID_OFFSET //距离偏移 DMCAM_FILTER_ID_SPORT_MODE //运动模式 DMCAM_FILTER_ID_SYS_CALIB //暂不支持 DMCAM_FILTER_ID_AMBIENT_LIGHT_CALIB //暂不支持