Jul 16, 2024
source /opt/ros/humble/setup.bash in .bashrc).sudo apt updatesudo apt install ros-humble-navigation2 ros-humble-nav2-bringup
sudo apt install ros-humble-turtlebot3*
export TURTLEBOT3_MODEL=waffle (add to .bashrc).ros2 launch turtlebot3_gazebo turtlebot3_world.launch.pyros2 run turtlebot3_teleop teleop_keyboardros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=truemkdir -p ~/maps
ros2 run nav2_map_server map_saver_cli -f ~/maps/mymap
.pgm file: Image of the map where white represents free space, black represents obstacles, and gray represents unknown regions..yaml file: Metadata that includes image, resolution (meters per pixel), origin, negate, and occupied_thresh and free_thresh for defining occupied and free space probabilities.sudo apt install ros-humble-rmw-cyclone-dds-cpp
export RMW_IMPLEMENTATION=rmw_cyclone_dds_cpp
(add `export RMW_IMPLEMENTATION=rmw_cyclone_dds_cpp` to `.bashrc`)
turtlebot3_navigation2 parameter file:
sudo nano /opt/ros/humble/share/turtlebot3_navigation2/param/waffle.yaml
# Modify 'robot_model_type' parameter
robot_model_type: nav2_amcl::DifferentialMotionModel
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=true map:=~/maps/mymap.yaml
2D Nav Goal tool in RViz to set a destination for the robot.Waypoint Nav Tool in RViz.Start Nav Through Poses for continuous navigation through waypoints (less stable).