SLAM with Lidar¶
2. Running the demo¶
Terminal 1: Launch the robot
echo export TURTLEBOT3_MODEL=waffle >> ~/.bashrc
echo export ROS_DOMAIN_ID=30 >> ~/.bashrc
source /opt/robot_devkit/robot_devkit_setup.bash
ros2 launch turtlebot3_bringup robot.launch.py
Note
waffle are real TB3, if you use another robot, you may change this
Terminal 2: Launch teleoperation node
source /opt/robot_devkit/robot_devkit_setup.bash
export TURTLEBOT3_MODEL=waffle
ros2 run turtlebot3_teleop teleop_keyboard
Terminal 3: Run cartographer
source /opt/robot_devkit/robot_devkit_setup.bash
source /opt/ros/dashing/local_setup.bash
ros2 launch turtlebot3_cartographer cartographer.launch.py
Terminal 4: Save the map
source /opt/robot_devkit/robot_devkit_setup.bash
source /opt/ros/dashing/local_setup.bash
ros2 run nav2_map_server map_saver -f ~/map