hokuyo激光雷达跑Cartographer

本文介绍了如何在安装Cartographer和hokuyo激光雷达后,通过创建launch文件、lua配置文件和rviz配置文件,进行激光雷达的建图操作。遵循教程,可以在实际环境中移动激光雷达进行地图构建。
摘要由CSDN通过智能技术生成

在安装好Cartographer和hokuyo激光雷达之后,我们就可以开始用激光雷达跑了。
本文部分参考博客https://www.cnblogs.com/wenhust/p/6047258.html,但本文安装的是谷歌源码cartographer,lua文件中的变量名字目前是最新的。

一、建立相关文件
1、首先在catkin_google_ws/src/cartographer_ros/cartographer_ros/launch文件夹下建立launch文件demo_hokuyo.launch

<launch>
  <param name="/use_sim_time" value="false" />
  
  <node name="cartographer_node" pkg="cartographer_ros"
      type="cartographer_node" args="
          -configuration_directory $(find cartographer_ros)/configuration_files
          -configuration_basename demo_hokuyo.lua"
      output="screen">
  </node>

 <node name="rviz" pkg="rviz" type="rviz" required="true"
      args="-d $(find cartographer_ros)/configuration_files/demo_hokuyo.rviz" />
</launch>

2、然后在catkin_google_ws/src/cartographer_ros/cartographer_ros/configuration_files下建立lua配置文件demo_hokuyo.lua

include "map_builder.lua"
include "trajectory_builder.lua"

options = {
  map_builder = MAP_BUILDER,
  trajectory_builder = TRAJECTORY_BUILDER,
  map_frame = "map",
  tracking_frame = "laser",
  published_frame = "laser",
  odom_frame = "odom",
  provide_odom_frame = false,
  use_odometry = false,
  use_nav_sat = false,
  use_landmarks = false,
  publish_frame_projected_to_2d = false,
  num_laser_scans = 1,
  num_multi_echo_laser_scans = 0,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.3,
  pose_publish_period_sec = 5e-3,
  num_subdivisions_per_laser_scan = 1,
  num_po
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值