Skip to content

Robot Simulation

This section provides commands for launching the Moby robot model in a simulated environment using the Gazebo simulator. This can be useful for testing and developing robotic applications without the need for a physical robot.

Package Configuration

├── moby_gazebo
├── moby_mapping
└── moby_navigation

This section uses packages: moby_gazebo, moby_mapping and moby_navigation. The moby_gazebo package contains a description for a simulation robot, The moby_mapping contains mapping configuration to use with simulation robots. The moby_navigation contains navigation configuration to use with simulation robots.

Launch

Run the Gazebo simulator with the Moby robot model loaded using the command below.

ros2 launch moby_gazebo moby_gazebo.launch.py world_file:=example moby_type:=moby_rp

When you run the command, the Gazebo window and the Rviz window will be launched as shown below.


To Start Mapping

To use the mapping with the Gazebo simulator, run following commands:

  • Slam toolbox
    ros2 launch moby_mapping slam_toolbox.launch.py use_sim_time:=true
    


  • Cartographer 2D
ros2 launch moby_mapping cartographer_2d.launch.py use_sim_time:=true launch_rviz:=false
  • Cartographer 3D
    ros2 launch moby_mapping cartographer_3d.launch.py use_sim_time:=true launch_rviz:=false
    


To Start Navigation

To use the navigation with the Gazebo simulator, start the gazebo robot and run following command:

ros2 launch moby_navigation navigation2.launch.py use_sim_time:=true launch_rviz:=false