An Autonomous Robot simulation using ROS2 and Nav2
The Below Robot is simulated in Gazebo Environment and Able to move Autonomously using NAV2 Stack
TurtleBot3 (An open source Robot from Robotis)(Humble--Version)
Clone the Repository and Before Building it install ROS2 Humble and Nav2 packages You can get sufficient Guidelines from the Official Wikis of Both
You will need to install the slam_toolbox package:
$ sudo apt install ros-humble-slam-toolbox
This will be specific to your own robot. Example with simulation:
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
The Gazebo world with static Obstacles i.e Beams in the world
$ rqt_robot_steering
$ ros2 launch slam_toolbox online_async_launch.py use_sim_time:=True
$ ros2 launch nav2_bringup rviz.launch.py
Make the robot move in the environment (specific to your own robot) and for Saving the map:
$ ros2 run nav2_map_server map_saver_cli -f ~/my_map
and you can even use slam toolbox plugin in rviz to save the map it will be saved in the default terminal location -- Use Terminator for easy access
Example with simulation:
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
$ ros2 launch nav2_bringup bringup_launch.py map:=path/to/map.yaml
(add use_sim_time:=True if using Gazebo)
$ ros2 launch nav2_bringup rviz.launch.py
Use the “2D Pose Estimate” button to set the initial pose
and the “2D GOAL POSE ” button to send navigation goals.
The Green color Line is the Path Generated by NAV2 Stack and The pink color is the cost map and You can see our robot in action , The robot can Move Autonomosuly avoiding obstacles in the way , The obstacles are detected by the Lidar and form a reasonable cost cloud , This process was all done by the AMCL Package which was default localization in NAV2 Package along with that we have a DWB Local planner which will take care of obstacles and creating a safe path.
Thank you
Feel free to contact at @[email protected] or https://www.linkedin.com/in/sampath01/