Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9152939
  • 博文数量: 1727
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19860
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1727)

文章存档

2024年(3)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: 其他平台

2019-03-27 10:10:24

前因: 使用 gmmaping 依赖 odom + IMU, 但是发现当前使用的IMU(sparkfun 9dof@50Hz, WT901C@200Hz 都难校准) 而且odom在gmmapping的地图会乱. 

而实际上, 如果使用激光雷达的话, 除非对于太多雷同的地理位置, 是不需要odom + IMU的, 而且对于目前 rplidarA3来说, 25m的扫描距离完全可以脱离odom和IMU, 所以试试google的 Cartographer. 

目前使用  cartographer v3.4.1 版本, 而 kinetic目前使用的是 0.2.0版本.

参考 https://www.cnblogs.com/BlueMountain-HaggenDazs/p/6691709.html 

点击(此处)折叠或打开

  1. 如果想用可以使用二进制版本或者直接从源码编译.
  2. $ sudo apt-get install ninja-build libceres-dev libprotobuf-dev protobuf-compiler libprotoc-dev
  3. $ cd ~/catkin_ws/src
  4. $ git clone https://github.com/googlecartographer/cartographer.git
  5. $ git clone https://github.com/googlecartographer/cartographer_ros.git
  6. $ cd ~/catkin_ws
  7. $ src/cartographer/scripts/install_proto3.sh
  8. $ rm -rf protobuf/
  9. $ rosdep install --from-paths src --ignore-src -r -y --os=ubuntu:xenial
  10. $ catkin_make_isolated --install --use-ninja
  11. $ source ~/catkin_ws/install_isolated/setup.bash
  12. $ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=cartographer
Cartographer是google开源的通用2D和3D定位与地图同步构建的SLAM工具,并提供ROS接口。官网地址: 

rplidar使用cartographer_ros进行地图云生成

https://www.cnblogs.com/BlueMountain-HaggenDazs/p/6691709.html

使用cartographer_ros(在线/离线)构建地图后保存地图的方法

2,使用cartographer构建号地图后怎么保存成yaml和png文件呢?
关于cartographer_ros的文档,官方


2.1 保存地图
当使用cartographer在线建图时,cartographer不知道什么时候结束,所以要先调用服务来关闭传感器数据的接收。
rosservice call /finish_trajectory 0
1
将当前地图信息的快照保存为后缀名为.pbstream
# Ask Cartographer to serialize its current state.
# (press tab to quickly expand the parameter syntax)
rosservice call /write_state "{filename: '<绝对路径存放地图信息>/<地图保存的名字>.pbstream', include_unfinished_submaps: 'true'}"
1
2
3
通过cartographer提供的ros包,将后缀名为.pbstream的地图信息,转化成ros地图信息
rosrun cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=<保存地图的绝对路径>/<地图命名> -pbstream_filename=<存放pbstream地图快照信息的绝对地址>/.pbstream -resolution=0.05
1
2.2 也可以尝试使用map_server保存地图
rosrun map_server map_saver map:=/ -f
1
不过保存cartographer的地图不是特别好,不推荐。



阅读(10238) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~