1.panda_moveit_config
打开后出现
进入config,修改sensors_kinect_pointcloud.yaml文件
sensors:
- sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
point_cloud_topic: /camera/depth/color/points //此处修改为rs相机的pointclound话题名称
max_range: 5.0
point_subsample: 1
padding_offset: 0.1
padding_scale: 1.0
max_update_rate: 1.0
filtered_cloud_topic: filtered_cloud
2.通过案例测试
打开moveit_tutorials -> doc -> perception_pipeline ->obstacle_avoidance_demo.launch
<launch>
<include file="$(find panda_moveit_config)/launch/demo.launch" />
<!-- Play the rosbag that contains the pointcloud data -->
<!--node pkg="moveit_tutorials" type="bag_publisher_maintain_time" name="point_clouds" /> -->
#此处使用rosbag播放,而我使用realsense测试,可以这句
<!-- If needed, broadcast static tf for robot root -->
<node pkg="tf2_ros" type="static_transform_publisher" name="to_panda" args="0 0 0 0 0 0 world panda_link0" />
<node pkg="tf2_ros" type="static_transform_publisher" name="to_camera" args="0.4 0.427 0.570 0 0.2 1.92 camera_rgb_optical_frame world" />
</launch>
3.修改rs的launch文件
在文件的末尾添加静态坐标转换信息相机坐标系与机器人底部坐标系转换关系
<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="-0.07315 0.0250 -0.0420 1.488 -0.009 -3.139 panda_link0 camera_link 100" />
4.tf树如图所示