Demos on Gazebo
Before running the demos it is necessary to get acquainted with the setup section of the documentation. Make sure you check: Using only the simulated robot
Launching the Simulation
Clone the
robotont_gazebopackage into your workspace:git clone https://github.com/robotont/robotont_gazebo.git
Build and source the newly added package:
colcon build --packages-select robotont_gazebo source install/setup.bash
Launch the simulator using the launch file:
ros2 launch robotont_gazebo gazebo.launch.py
Launch file arguments
Name |
Description |
Options |
|---|---|---|
|
Specify the generation of robotont model that is to be loaded |
2.1, 3 (default) |
|
Specify the model that is to be loaded into the world |
robotont_gazebo_basic, robotont_gazebo_lidar, robotont_gazebo_nuc (default) |
|
Specify world the robot is spawned in |
bangbang.sdf, between.sdf, colors.sdf, mapping.sdf, maze.sdf, minimaze.sdf, minimaze_ar.sdf, empty_world.sdf (default) |
|
Specify the robot’s spawn pose |
Number, 0 (default) |
Tip
For example, loading the generation 3 model in colors.sdf world at pose (-2, 1, 0):
ros2 launch robotont_gazebo gazebo.launch.py world:=colors.sdf x:=-2 y:=1
Worlds
2D Mapping and Localization
Setup
Hint
Before installing any packages from apt, make sure existing packages are up-to-date:
sudo apt update && sudo apt upgrade -y
Hint
ROS packages installed from apt are only available in terminals where the ROS environment has been sourced. To use these packages, you must first source the general ROS 2 environment:
source /opt/ros/jazzy/setup.bash
Install Nav2 from apt:
sudo apt install ros-jazzy-navigation2
Navigate to your colcon workspace
cd ~/<your_colcon_workspace>/src
Clone the
depthimage_to_laserscanpackagegit clone https://github.com/ros-perception/depthimage_to_laserscan.git --branch ros2
Build the package:
colcon build --packages-select depthimage_to_laserscan
The demo for 2D slam based navigation is available from this repository.
Navigate to your colcon workspace
cd ~/<your_colcon_workspace>/src
Clone the
2d_slampackagegit clone https://github.com/robotont-demos/2d_slam.git
Build the package:
colcon build --packages-select 2d_slam
Running the demo
The demo can be run on a Robotont featuring either a LIDAR or the standard Realsense D435i camera
Spawn LIDAR Robotont in a gazebo world
ros2 launch robotont_gazebo gazebo.launch.py model:=robotont_gazebo_lidar world:=<world_name>.sdf
Launch the navigation stack and slam
ros2 launch 2d_slam nav2_lidar_slam.launch.py
(Optional) Visualize costmaps and the robot’s model in Rviz2
ros2 launch 2d_slam rviz2_visualize_costmaps.launch.py
Spawn Robotont in a gazebo world
ros2 launch robotont_gazebo gazebo.launch.py world:=<world_name>.sdf
Launch the navigation stack and slam
ros2 launch 2d_slam nav2_realsense_slam.launch.py
(Optional) Visualize costmaps and the robot’s model in Rviz2
ros2 launch 2d_slam rviz2_visualize_costmaps.launch.py









