ros noetic使用pointcloud_to_laserscan 将2d激光雷达与深度摄像头数据融合

配置文件

src/wpb_home/wpb_home_tutorials/nav_depth/local_costmap_params.yaml

复制代码
local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  update_frequency: 10.0
  publish_frequency: 10.0
  transform_tolerance: 1.0
  plugins:
    - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

配置文件

src/wpb_home/wpb_home_tutorials/nav_depth/costmap_common_params.yaml

复制代码
robot_radius: 0.25

obstacle_layer:
  obstacle_range: 3.0
  raytrace_range: 6.0
  observation_sources: base_lidar depth_scan

  base_lidar:
    data_type: LaserScan
    topic: /scan
    marking: true
    clearing: true

  depth_scan:
    data_type: LaserScan
    topic: /depth_scan
    marking: true
    clearing: true

inflation_layer:
  inflation_radius: 0.5

配置文件

src/wpb_home/wpb_home_tutorials/nav_depth/global_costmap_params.yaml

复制代码
global_costmap:
  global_frame: map
  robot_base_frame: base_footprint
  static_map: false
  rolling_window: true
  update_frequency: 1.0
  publish_frequency: 1.0
  transform_tolerance: 1.0

recovery_behaviors:
  - name: 'conservative_reset'
    type: 'clear_costmap_recovery/ClearCostmapRecovery'
  - name: 'rotate_recovery'
    type: 'rotate_recovery/RotateRecovery'
  - name: 'aggressive_reset'
    type: 'clear_costmap_recovery/ClearCostmapRecovery'

conservative_reset:
  reset_distance: 2.0
  layer_names: ["obstacle_layer"]

aggressive_reset:
  reset_distance: 0.0
  layer_names: ["obstacle_layer"]

配置文件

src/wpb_home/wpb_home_tutorials/nav_depth/depth_to_scan.yaml

复制代码
target_frame: base_footprint
transform_tolerance: 0.3

min_height: 0.10
max_height: 2.00

angle_min: -1.57
angle_max:  1.57
angle_increment: 0.005

scan_time: 0.1
range_min: 0.4
range_max: 6.0
use_inf: true

launch文件

复制代码
<launch>

  <!-- 载入 机器人 和 RoboCup@Home 的仿真场景 -->
  <include file="$(find wpr_simulation)/launch/wpb_stage_robocup.launch"/>

  <!-- Gmapping -->
  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping"/>

  <!-- Rviz -->
  <arg name="rvizconfig" default="$(find wpr_simulation)/rviz/slam.rviz" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true" />

  <!-- 手柄控制 -->
  <node respawn="true" pkg="joy" type="joy_node" name="joy_node" >
    <param name="dev" type="string" value="/dev/input/js0" />
    <param name="deadzone" value="0.12" />
  </node>
  <param name="axis_linear" value="1" type="int"/>
  <param name="axis_angular" value="0" type="int"/>
  <param name="scale_linear" value="0.5" type="double"/>
  <param name="scale_angular" value="1" type="double"/>
  <node pkg="wpr_simulation" type="teleop_js_node" name="teleop_js_node"/>

      <node pkg="move_base" type="move_base" name="move_base">
        <rosparam file="$(find wpb_home_tutorials)/nav_depth/costmap_common_params.yaml" command="load" ns="global_costmap" />
        <rosparam file="$(find wpb_home_tutorials)/nav_depth/costmap_common_params.yaml" command="load" ns="local_costmap" />
        <rosparam file="$(find wpb_home_tutorials)/nav_depth/global_costmap_params.yaml" command="load" />
        <rosparam file="$(find wpb_home_tutorials)/nav_depth/local_costmap_params.yaml" command="load" />
        <param name="base_global_planner" value="global_planner/GlobalPlanner" /> 
        <param name="base_local_planner" value="wpbh_local_planner/WpbhLocalPlanner" />
    </node>

      <node pkg="pointcloud_to_laserscan"
        type="pointcloud_to_laserscan_node"
        name="pointcloud_to_laserscan"             
        output="screen">
    <!-- name="pointcloud_to_laserscan" 将命名空间载入 rosparam,所以-->
    <!-- 载入参数 -->
    <rosparam file="$(find wpb_home_tutorials)/nav_depth/depth_to_scan.yaml" />

    <!-- 输入点云 -->
    <remap from="cloud_in" to="/kinect2/sd/points"/>

    <!-- 输出 LaserScan -->
    <remap from="scan" to="/depth_scan"/>
  </node>

      <node pkg="wpr_simulation"
      type="demo_map.py"
      name="explore_then_return"
      output="screen"
      >
      </node>
      
            <node pkg="wpr_simulation"
      type="save_map_and_start_amcl.py"
      name="save_map_and_start_amcl"
      output="screen"
      >
      </node>
                  <node pkg="wpr_simulation"
      type="initialpose_service.py"
      name="initialpose_service"
      output="screen"
      >
      </node>
</launch>
相关推荐
熊猫_豆豆7 天前
家庭扫地机器人路径规划Python版本
机器人·扫地机器人·slam·路径规划
徒慕风流11 天前
激光雷达回波信号滤波与时刻鉴别算法:原理、代码实现与仿真验证
python·算法·激光雷达
事已至此_先吃饭吧11 天前
调试 ORB_SLAM2 非ROS版本
slam
全息数据15 天前
里程计运动模型及标定【激光slam(一)】
slam·激光slam·定位与建图
zh路西法15 天前
【3D SLAM源码解读系列】(四) GTSAM与iSAM2——从回环约束到位姿图优化
c++·slam·gtsam·pgo·isam2
陈嘿萌22 天前
ECCV 2026|相机 × 激光雷达 × 4D 雷达:RAF 如何实现恶劣天气下的鲁棒 3D 检测?
人工智能·目标检测·计算机视觉·激光雷达·eccv
乱七八糟的屋子24 天前
TooN 超详细入门实战教程|C++轻量极致精简矩阵库(机器人/SLAM专用)
矩阵·机器人·数值计算·slam·c++矩阵库·轻量线性代数·机器人数学
kobesdu1 个月前
激光雷达运动畸变是怎么来的,FAST-LIO又如何用IMU反向传播消除它?
ros·slam·fastlio
见合八方1 个月前
【噪声系数】高偏SOA噪声系数测试方法
网络·自动化·soa·光通信·激光雷达·半导体光放大器
酸梅果茶1 个月前
【7】lightning_lm项目-LIO 前端 -IVox 局部地图
前端·slam