• Instructions to run Turtlebot3 with Gazebo in ROS2 Dashing

  • Install Cartographer dependencies

$ sudo apt install -y
google-mock
libceres-dev
liblua5.3-dev
libboost-dev
libboost-iostreams-dev
libprotobuf-dev
protobuf-compiler
libcairo2-dev
libpcl-dev
python3-sphinx

  • Install Gazebo9

$ curl -sSL http://get.gazebosim.org sh

$ sudo apt install ros-dashing-gazebo-*

  • Install Cartographer

$ sudo apt install ros-dashing-cartographer

  • Install Navigation2

$ sudo apt install ros-dashing-navigation2

$ sudo apt install ros-dashing-nav2-bringup

  • Install vcstool

$ sudo apt install python3-vcstool

  • Install ROS2 Dashing

  • Install TurtleBot3 ROS 2 Workspace

$ mkdir -p ~/turtlebot3_ws/src

$ cd ~/turtlebot3_ws

$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/ros2/turtlebot3.repos

$ vcs import src < turtlebot3.repos

$ colcon build –symlink-install

  • Save bash command for Setup

$ echo ‘source ~/turtlebot3_ws/install/setup.bash’ » ~/.bashrc

$ echo ‘export ROS_DOMAIN_ID=30 #TURTLEBOT3’ » ~/.bashrc

$ source ~/.bashrc

  • ####Simulation####

  • Add GAZEBO_MODEL_PATH.

$ echo ‘# Add gazebo model path’ » ~/.bashrc

$ echo ‘export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models’ » ~/.bashrc

$ source ~/.bashrc

  • Load TurtleBot3 on TurtleBot3 world.

$ export TURTLEBOT3_MODEL=waffle

$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

Courtsey: Turtlebot3