This repository provides a collection of independent ROS2 nodes to control a TurtleBot3 robot in a Gazebo simulation. Each node offers a specific functionality, from basic movement to more advanced navigation and mapping.
This project contains several standalone ROS2 nodes that can be run independently to control a TurtleBot3 robot. The key functionalities include:
- Proportional Controller: A simple controller to move the robot to a desired
xandyposition. - Reactive Navigation: A more advanced controller that includes obstacle avoidance logic using laser scan data.
- Map Generator: A node to create a 2D grid map of the environment based on the robot's odometry and laser scan data.
- Presenter: A script that guides the robot through a pre-defined tour of different rooms in the known environment.
-
Launch the TurtleBot3 Simulation (Map for the Presenter node):
ros2 launch turtlebot3_gazebo turtlebot3_house.launch.py
-
Launch the Navigation System (Required for the Presenter node):
ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=True map:=/home/bruno/original_map.yaml
-
Run an Independent Controller Node:
-
Proportional Controller:
ros2 run turtlebot3_controller turtle3_prop_controller.py
-
Reactive Navigation:
ros2 run turtlebot3_controller turtle3_reactive_nav.py
-
Map Generator:
ros2 run turtlebot3_controller turtle3_map_generator.py
This will save a
map.txtfile in the directory where the node is run. -
Presenter:
ros2 run turtlebot3_controller turtle3_presenter.py
This script will guide the robot through a tour of predefined rooms.
-