rs-lidar-16运行cartographer_turtlebot 2d建图

配置:Ubuntu16.04,kinetic , turtlebot-kobuki, rslidar-16

1.配置好雷达驱动rslidar,turtlebot相关安装包。

2.在catkin_rp(雷达)工作空间下,新建launch文件

roscd pointcloud_to_laserscan/launch
gedit turtlebot_rslidar.launch

内容如下:




    
    

        
        
        
            # target_frame: rslidar # Leave disabled to output scan in pointcloud frame
            transform_tolerance: 0.01
            min_height: -0.4
            max_height: 1.0

            angle_min: -3.1415926 # -M_PI
            angle_max: 3.1415926 # M_PI
            angle_increment: 0.003 # 0.17degree
            scan_time: 0.1
            range_min: 0.2
            range_max: 100
            use_inf: true
            inf_epsilon: 1.0

            # Concurrency level, affects number of pointclouds queued for processing and number of threads used
            # 0 : Detect number of cores
            # 1 : Single threaded
            # 2->inf : Parallelism level
            concurrency_level: 1
        

    

    

主要注意:话题发布点是rslidar!TF变换中激光的frame_id也要与激光的一致!否则运行时候会报错!


2.在catkin_ws(cartographer工作空间)中,

roscd cartographer_turtlebot/luanch
gedit turtlebot_rslidar_2d.launch 

内容如下:



  
    
  

参考简书使用Turtlebot 2和Rplidar A2实现Cartographer

编写turtlebot1.launch, 内容如下:


  

  

  
    

  

  
    
    
  


  

注意: 拿原先的turtlebot.launch也试一下!

4. 重新catkin_make以上工作空间:

catkin_make_isolated --install --use-ninja

5.新开4个终端分别运行:

roslaunch rslidar_pointcloud rs_lidar_16.launch  

roslaunch pointcloud_to_laserscan turtlebot_rslidar.launch 

roslaunch cartographer_turtlebot turtlebot_rslidar_2d.launch 

roslaunch turtlebot_teleop keyboard_teleop.launch

第三个就能显示地图。

6.进行利用ROS的rviz可视化自己设计的机器人,时报错。

roslaunch turtlebot_rviz_launchers view_navigation.launch

未完待续。。。

你可能感兴趣的:(turtlebot,rslidar,16)