pr2+RealSense D435+3D感知配置

本文环境是ROS-Melodic,参考https://www.ncnynl.com/archives/201610/1045.html

https://blog.csdn.net/qintianhaohao/article/details/104286927

1. YAML配置文件(pointcloud)

在pr2包config目录下新建sensor_realsense_pointcloud.yaml文件,输入

sensors:
  - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
    point_cloud_topic: /camera/depth_registered/points
    max_range: 5.0
    point_subsample: 1
    padding_offset: 0.1
    padding_scale: 1.0
    filtered_cloud_topic: filtered_cloud

深度图形式的yaml文件可根据链接1创建

2. 修改launch文件

修改launch目录下的sensor_manager.launch.xml文件(建议作一下备份)

<launch>

  <!-- This file makes it easy to include the settings for sensor managers -->

  <!-- Params for 3D sensors config -->
  <rosparam command="load" file="$(find pr2_moveit_config_new)/config/sensors_realsense_points.yaml" />

  <!-- Params for the octomap monitor -->
  <!--  <param name="octomap_frame" type="string" value="some frame in which the robot moves" /> -->
  <param name="octomap_resolution" type="double" value="0.025" />
  <param name="max_range" type="double" value="5.0" />

  <!-- Load the robot specific sensor manager; this sets the moveit_sensor_manager ROS parameter -->
  <arg name="moveit_sensor_manager" default="pr2" />
  <include file="$(dirname)/$(arg moveit_sensor_manager)_moveit_sensor_manager.launch.xml" />
  <node pkg="tf2_ros" type="static_transform_publisher" name="camera_broadcaster_0" args="0 0 0 0 0 0 odom_combined camera_link" />
</launch>

记得将$(find pr2_moveit_config_new)pr2_moveit_config_new换成你自己的pr2包名。

3. 运行与结果

首先启动相机

roslaunch realsense2_camera rs_rgbd.launch

再启动机器人仿真环境

roslaunch pr2_moveit_config_new demo.launch

效果如图

 其中tf坐标系变换可以修改一下

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值