怎么做導(dǎo)購網(wǎng)站八上數(shù)學(xué)優(yōu)化設(shè)計答案
?系統(tǒng)環(huán)境:Ubuntu18.04.6 LTS
1.A-Loam的安裝前要求:
1.1 ROS安裝:參考我的另一篇博客
Ubuntu18.04安裝ROS-melodic保姆級教程_灬楊三歲灬的博客-CSDN博客還是那句話,有時候加了這行也不好使,我是瘋狂試了20+次,最后打了一局游戲,回來就過了,這就得看網(wǎng)絡(luò)看命了,不行就在網(wǎng)上搜搜終極大招(動手能力差的不建議)。有時候加了這行也不好使,我是瘋狂試了10+次,出現(xiàn)3.3之后就能用了,這就得看網(wǎng)絡(luò)看命了,不行就在網(wǎng)上搜搜終極大招(動手能力差的不建議)。多試幾十次,不行幾百次,換手機(jī)網(wǎng)絡(luò)也是,多試幾次,這東西很玄學(xué),不一定哪次就過了。多試幾十次,不行幾百次,換手機(jī)網(wǎng)絡(luò)也是,多試幾次,這東西很玄學(xué),不一定哪次就過了。1.1.設(shè)置sources.list。https://blog.csdn.net/qq_23473839/article/details/131719477https://blog.csdn.net/qq_23473839/article/details/131719477
1.2 PCL安裝:
Ubuntu18.04安裝PCL保姆級教程_灬楊三歲灬的博客-CSDN博客Ubuntu18.04安裝PCL保姆級教程https://blog.csdn.net/qq_23473839/article/details/132128455?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22132128455%22%2C%22source%22%3A%22qq_23473839%22%7Dhttps://blog.csdn.net/qq_23473839/article/details/132128455?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22132128455%22%2C%22source%22%3A%22qq_23473839%22%7D1.3 Ceres Solver安裝:
建議用ceres-solver-1.14.0版本,嘗試ceres-solver-2.2.0、ceres-solver-2.1.0編譯A-Loam報錯,嘗試修改CMakeLists.txt依舊報錯,果斷降級不要再試了!
wget ceres-solver.org/ceres-solver-1.14.0.tar.gz #下載1.14.0# 安裝依賴
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# Use ATLAS for BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse (optional)
sudo apt-get install libsuitesparse-dev# 正式安裝
tar xvf ceres-solver-1.14.0.tar.gz
cd ceres-solver-1.14.0
mkdir build
cd build
cmake .. # 如果提示cmake版本不夠,看1.4裝一下新版cmake就行
make -j4
make test
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
sudo make install # 這里一定要加sudo否則報錯# 測試一下
bin/simple_bundle_adjuster ../data/problem-16-22106-pre.txt
若結(jié)果出現(xiàn)上圖則證明ceres安裝成功。
卸載ceres命令:
sudo rm -r /usr/local/lib/cmake/Ceres
sudo rm -rf /usr/local/include/ceres /usr/local/lib/libceres.a
sudo rm -r /usr/local/share/Ceres
?1.4 cmake升級:(上面沒報錯可不升級)
Ubuntu18.04安裝Cmake教程_灬楊三歲灬的博客-CSDN博客文章瀏覽閱讀267次。注:文件路徑是可以指定的,一般選擇在/opt或/usr路徑下,這里選擇/opt。如果已經(jīng)安裝了ROS等其他庫,卸載會出現(xiàn)很多問題!_ubuntu18.04安裝cmakehttps://blog.csdn.net/qq_23473839/article/details/132132907
2.安裝:
2.1.建立catkin工作空間(我取名為A-LOAM)
2.2.建立src文件夾
2.3.編譯
cd ~/A-LOAM/src
git clone https://github.com/HKUST-Aerial-Robotics/A-LOAM.git
cd ../
catkin_make
3.編譯出現(xiàn)的問題:
3.1.ceres版本問題:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:67:21: error:?
原因:ceres版本太高
解決辦法:使用ceres1.14.0編譯A-Loam即可
4.運行Loam:
Shell1:
source devel/setup.bashroslaunch aloam_velodyne aloam_velodyne_VLP_16.launch
Shell2:(跑Loam的數(shù)據(jù)集)
rosbag play ~/Dataset/A-LOAM/nsh_indoor_outdoor.bag
Shell3:保存地圖
用bag_to_pcd方法保存點云圖
rosrun pcl_ros bag_to_pcd xxx.bag /laser_cloud_surround pcd用pointcloud_to_pcd方法保存點云圖
mkdir pcd
cd pcd
rosrun pcl_ros pointcloud_to_pcd input:=/laser_cloud_surround
運行結(jié)束,可以看到生成了一個pcd文件夾,將里面的文件按照修改時間排序,最新的就是最后的點云地圖pcd文件。
結(jié)果:
?
看到別的博客上,這個工具可以將點云地圖轉(zhuǎn)換成二維柵格地圖(暫時還沒試,感興趣的同學(xué)可以試試):
git clone -b develop https://github.com/Hinson-A/pcd2pgm_package