ROS+moveit配置助手进行3dPerception时闪退的解决方法(无需重装ROS or Moveit)解决gazebo与rviz联合仿真时没有点云图

1.解决问题: 新版本moveit配置摄像头出现的问题
无法通过moveit配置助手配置3D perception ,采用手动设置yaml文件的方法
①需要配置的文件:/zbs_catkin_ws/src/marm_moveit_config/config/sensors_3d.yaml
                    Point Cloud格式:
                     sensors:
                      - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
                        point_cloud_topic: /head_mount_kinect/depth_registered/points
                        max_range: 5.0
                        point_subsample: 1
                        padding_offset: 0.1
                        padding_scale: 1.0
                        filtered_cloud_topic: filtered_cloud
                    深度图rgbd格式:
                    sensors:
                      - sensor_plugin: occupancy_map_monitor/DepthImageOctomapUpdater
                        image_topic: /head_mount_kinect/depth_registered/image_raw
                        queue_size: 5
                        near_clipping_plane_distance: 0.3
                        far_clipping_plane_distance: 5.0
                        shadow_threshold: 0.2
                        padding_scale: 4.0
                        padding_offset: 0.03
                        filtered_cloud_topic: filtered_cloud
                        
              /zbs_catkin_ws/src/marm_moveit_config/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 marm_moveit_config)/config/sensors_3d.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="marm" />
                      <include file="$(dirname)/$(arg moveit_sensor_manager)_moveit_sensor_manager.launch.xml" />
             </launch>

              /zbs_catkin_ws/src/marm_moveit_config/launch/marm_moveit_sensor_manager.launch.xml
              一般空文件即可
              
②启动demo_gazebo.launch时没有出现点云图,原因是 robot_state_publisher没有打开,robot_state_publisher用于发布机器人的位置信息。
demo_gazebo启动时需要使用demo.launch文件,
需要对moveit 配置助手生成的demo.launch文件做出如下改动:
  <group if="$(eval arg('moveit_controller_manager') == 'fake')">
    <!-- We do not have a real robot connected, so publish fake joint states via a joint_state_publisher
         MoveIt's fake controller's joint states are considered via the 'source_list' parameter -->
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" unless="$(arg use_gui)">
      <rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
    </node>
    <!-- If desired, a GUI version is available allowing to move the simulated robot around manually
         This corresponds to moving around the real robot without the use of MoveIt. -->
    <node name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" if="$(arg use_gui)">
      <rosparam param="source_list">[move_group/fake_controller_joint_states]</rosparam>
    </node>
  </group>
    <!-- Given the published joint states, publish tf for the robot links -->
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" />
    
因为demo_gazebo给入demo.launch文件的参数为ALL TRUE,影响到了这里robot_state_publisher的启动。
相机,点云,深度图等的显示都需要用到TF坐标系转换。

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值