9.1. 執行 SLAM nodes

[Remote PC端]: 執行 roscore

$ roscore

[TurtleBot 端]: 啟用基本套件來開始 TB3 應用

$ roslaunch turtlebot3_bringup turtlebot3_robot.launch

[Remote PC端]: 開啟一個新的 terminal 視窗, 啟動 SLAM 檔案

$ export TURTLEBOT3_MODEL=${TB3_MODEL}
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
$ sudo apt-get install ninja-build libceres-dev libprotobuf-dev protobuf-compiler libprotoc-dev
$ cd ~/catkin_ws/src
$ git clone https://github.com/googlecartographer/cartographer.git
$ git clone https://github.com/googlecartographer/cartographer_ros.git
$ cd ~/catkin_ws
$ src/cartographer/scripts/install_proto3.sh
$ rm -rf protobuf/
$ rosdep install --from-paths src --ignore-src -r -y --os=ubuntu:xenial
$ catkin_make_isolated --install --use-ninja
$ source ~/catkin_ws/install_isolated/setup.bash
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=cartographer

Last updated

Was this helpful?