Quick Start: Gazebo Simulator¶
Launch a full autonomous navigation stack in under 5 minutes.
In this tutorial, we use a single Python script, a “Recipe”, to build a complete point-to-point navigation system. We’ll use the Gazebo simulator and a Turtlebot3 Waffle Pi to demonstrate how Kompass components link together.
1. Install Gazebo¶
If you haven’t already, install the default Gazebo version for your ROS distribution (replace ${ROS_DISTRO} with humble, jazzy, or rolling):
sudo apt-get install ros-${ROS_DISTRO}-ros-gz
2. Prepare the Environment¶
To make things easy, we created kompass_sim, a package with ready-to-launch simulation environments.
Build the Simulation: Clone and build the simulator support package in your ROS2 workspace:
git clone [https://github.com/automatika-robotics/kompass-sim.git](https://github.com/automatika-robotics/kompass-sim.git)
cd .. && rosdep install --from-paths src --ignore-src -r -y
colcon build --packages-select kompass_sim
source install/setup.bash
Set the Model: Tell the simulation to use the “Waffle Pi” model:
export TURTLEBOT3_MODEL=waffle_pi
Launch Gazebo: Start the Turtlebot3 house simulation. This will bring up Gazebo, RViz, and the localization nodes:
ros2 launch kompass_sim gazebo_turtlebot3_house.launch.py
Gazebo Simulation: Turtlebot3 Waffle Pi in a house¶
What just happened?¶
Customization: We adapted the robot configuration (
RobotConfig) to match the Waffle Pi’s rectangular geometry and adjusted theRobotFramesto match Gazebo’s standard output (base_scan).Launcher: Managed the lifecycle of the entire stack.
Perception: The Local Mapper is processing the Gazebo laser scan to provide obstacle avoidance data to the Controller.
Tip
Check the Point Navigation Guide for a deep dive into this recipe.