// it's for Latex

pages

[ Map merging ] #08. Install Cartographer ROS

현재까지는 드론의 하드웨어적 제약으로 인해 Lidar SLAM 보다는 Visual SLAM을 선택하여 진행을 해보았다. 하지만 하드웨어적 제약이 없다면 Lidar 센서의 클라우드 데이터를 이용한 SLAM 또한 새로운 방법이 될 수 있을 것이다.
또한 우리의 최종 목적이 Map merging인 만큼 Visual SLAM과 Lidar SLAM으로 인해 얻은 맵이 합쳐질 수 있는 요건이 갖춰지는 것이 좋을텐데, 이에 대한 대안으로 Cartographer라는 Lidar SLAM 기법이 도움이 될 수 있을 것이다. 해당 논문에 대한 페이퍼 명은 다음과 같다.
"real time loop closure in 2d lidar slam"
Visual SLAM에서 backend로 사용되는 loop closure를 사용하는 Lidar SLAM인 만큼, 차후 연구방향에 큰 도움이 될 것으로 본다.


구동환경

OS : Ubuntu 16.04 LTS
ROS : Kinetic


1. Install Cartographer ROS


기본적으로 Cartographer ROS는 다음 링크를 참조해서 설치할 수 있다.

https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html

위 링크에서는 catkin_ws에 대한 설정부터 catkin_make_isolated 까지 진행이 되지만,

현재 내 환경에는 catkin_ws는 이미 설정되어 있고, 빌드 또한 catkin_make 가 아닌 catkin build 로 진행했기 때문에 다음과 같은 순서로 설치를 진행하였다.

sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
mkdir catkin_ws
cd catkin_ws
wstool init src
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
src/cartographer/scripts/install_proto3.sh
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
catkin build
source ~/catkin_ws/devel/setup.bash

2. Run demo bag


Cartographer ROS는 bag 파일을 이용하여 실제로 SLAM 구동할 수 있도록 한다.
아래는 Deutches Museum 데이터셋을 이용하여 실제로 2D Lidar Cartographer를 구동하는 내용이다.

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag



위 사진과 같이 SLAM이 구동되는 것을 확인할 수 있다.

















































댓글 없음:

댓글 쓰기