张明明cartographer 方法编译不成功问题
2017-06-15 12:17
531 查看
谷歌自己提供了安装方法,但是安装比较繁琐,我做了一定的修改代码,ros下面的安装非常快捷,只需要catkin_make即可。
更多细节,可以看看知乎的问题https://www.zhihu.com/question/51348391/answer/125560951?from=profile_answer_card
0.安装所有依赖项
sudo apt-get install -y google-mock libboost-all-dev libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler Python-sphinx ros-indigo-tf2-eigen libatlas-base-dev libsuitesparse-dev
liblapack-dev
1.首先安装ceres solver,选择的版本是1.11,路径随意
git clone https://github.com/hitcm/ceres-solver-1.11.0.git
cd ceres-solver-1.11.0/build
cmake ..
make –j
sudo make install
2.然后安装 cartographer,路径随意
git clone https://github.com/hitcm/cartographer.git
cd cartographer/build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install
3.安装cartographer_ros。
谷歌官方提供的安装方法比较繁琐,我对原来的文件进行了少许的修改,核心代码不变,只是修改了编译文件
**下载到catkin_ws下面的src文件夹下面
git clone https://github.com/hitcm/cartographer_ros.git
然后到catkin_ws下面运行catkin_make即可。**
4.数据下载测试
2d数据,大概500M,用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
3d数据,8G左右,同样用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_deutsches_museum.bag
然后运行launch文件即可。
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=HOME/Downloads/cartographerpaperdeutschesmuseum.bagroslaunchcartographerrosdemobackpack3d.launchbagfilename:={HOME}/Downloads/cartographer_3d_deutsches_museum.bag
如下图,左侧为2d,右侧为3d。
Good luck!关于代码的原理解析,接下来的文章可能会详细探讨。
imageimage
最后编译的时候会发生错误:主要原因是依赖没有
CMake Error at /opt/ros/jade/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
***Could not find a package configuration file provided by “tf2_eigen” with
any of the following names:*
Add the installation prefix of “tf2_eigen” to CMAKE_PREFIX_PATH or set
“tf2_eigen_DIR” to a directory containing one of the above files. If
“tf2_eigen” provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
cartographer_ros/cartographer_ros/CMakeLists.txt:49 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/likai/cartograoher_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/likai/cartograoher_ws/build/CMakeFiles/CMakeError.log”.
Makefile:292: recipe for target ‘cmake_check_build_system’ failed
make: * [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed
遇到这种问题可采用:
sudo apt-get install ros-jade-tf2-eigen
重点内容
放到个人github上,https://github.com/hitcm/
更多细节,可以看看知乎的问题https://www.zhihu.com/question/51348391/answer/125560951?from=profile_answer_card
个人理解错误的地方还请不吝赐教,转载请标明出处,内容如有改动更新,请看原博:http://www.cnblogs.com/hitcm/,如有任何问题,feel free to contact me at robotsming@gmail.com 如下,需要安装3个软件包,ceres solver、和cartographer_ros
0.安装所有依赖项
sudo apt-get install -y google-mock libboost-all-dev libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler Python-sphinx ros-indigo-tf2-eigen libatlas-base-dev libsuitesparse-dev
liblapack-dev
1.首先安装ceres solver,选择的版本是1.11,路径随意
git clone https://github.com/hitcm/ceres-solver-1.11.0.git
cd ceres-solver-1.11.0/build
cmake ..
make –j
sudo make install
2.然后安装 cartographer,路径随意
git clone https://github.com/hitcm/cartographer.git
cd cartographer/build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install
3.安装cartographer_ros。
谷歌官方提供的安装方法比较繁琐,我对原来的文件进行了少许的修改,核心代码不变,只是修改了编译文件
**下载到catkin_ws下面的src文件夹下面
git clone https://github.com/hitcm/cartographer_ros.git
然后到catkin_ws下面运行catkin_make即可。**
4.数据下载测试
2d数据,大概500M,用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
3d数据,8G左右,同样用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_deutsches_museum.bag
然后运行launch文件即可。
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=HOME/Downloads/cartographerpaperdeutschesmuseum.bagroslaunchcartographerrosdemobackpack3d.launchbagfilename:={HOME}/Downloads/cartographer_3d_deutsches_museum.bag
如下图,左侧为2d,右侧为3d。
Good luck!关于代码的原理解析,接下来的文章可能会详细探讨。
imageimage
最后编译的时候会发生错误:主要原因是依赖没有
CMake Error at /opt/ros/jade/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
***Could not find a package configuration file provided by “tf2_eigen” with
any of the following names:*
tf2_eigenConfig.cmake tf2_eigen-config.cmake
Add the installation prefix of “tf2_eigen” to CMAKE_PREFIX_PATH or set
“tf2_eigen_DIR” to a directory containing one of the above files. If
“tf2_eigen” provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
cartographer_ros/cartographer_ros/CMakeLists.txt:49 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/likai/cartograoher_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/likai/cartograoher_ws/build/CMakeFiles/CMakeError.log”.
Makefile:292: recipe for target ‘cmake_check_build_system’ failed
make: * [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed
遇到这种问题可采用:
sudo apt-get install ros-jade-tf2-eigen
重点内容
相关文章推荐
- 运行VS2013编译成功后出现:无法启动程序“.exe” 系统找不到指定文件的问题的解决方法
- 在WIN10系统下运行VS2013编译成功后出现:无法启动程序“.exe” 系统找不到指定文件的问题的解决方法
- 安装VS2003出现问题——Microsoft FrontPage 2000 Web 扩展客户端安装不成功 及其解决方法
- ADT Bundle编译应用程序成功但是部署提示Could not find class的解决方法
- 在Eclipse下编译C++程序出现的Launch failed.Binary not found.问题的解决方法
- Cygwin下编译MySQL源码遇到的问题解决方法
- windows命令行下随时随地调用csc编译器的方法(解决dos下编译.net程序找不到CSC的问题)
- xvid开放源码xvidcore-1.1.3.zip在VC下成功编译的方法
- 开源CORBA OmniORB开发环境搭建及编译问题解决方法
- VC6安装SP6补丁的方法(超完整!不看后悔) 也即解决VC6编译链接问题最完整的方法!
- LINUX内核编译方法以及其步骤(在READ HAT LINUX 5.0上面运行成功)
- 编译出现:test4.5.java:1: 错误: 需要'{'public class test4.5问题的解决方法
- VC6.0 编译的程序 转换成 VS2010后,编译出错问题解决方法的总结
- ajax请求成功后无法在success方法里给外部变量赋值的问题
- Qt/QTE 编译安装问题与解决方法(2)
- xvid源码在Visual C++ 6.0下成功编译的方法(转)
- Qt/QTE 编译安装问题与解决方法 (3)
- 在Mac/Linux/Windows上编译corefx遇到的问题及解决方法
- 交叉编译库依赖问题的解决方法