Skip to main content
The Innex1 Rover uses Gazebo Ignition for high-fidelity simulation of lunar terrain, physics, and sensor models.

Moon Yard World

The primary simulation environment replicates a lunar mining arena with obstacles, excavation zones, and AprilTag beacons.

World Configuration

Location: src/lunabot_simulation/worlds/moon_yard.sdf
1

Physics Engine

The world uses ODE physics with real-time simulation:
<physics name="1ms" type="ode">
  <max_step_size>0.002</max_step_size>
  <real_time_factor>1.0</real_time_factor>
  <real_time_update_rate>500</real_time_update_rate>
</physics>
  • Step size: 2ms for stable dynamics
  • Update rate: 500 Hz
2

Environment Elements

The world includes:
  • Lunar surface mesh at (2.95, -1.1, 0.0)
  • AprilTag beacon at (0, 1.08, 0.25) for localization
  • Arena walls forming a 7.9m x 4.4m enclosed area
  • 7 rocks of varying sizes distributed across obstacle zones
3

System Plugins

<plugin filename="ignition-gazebo-physics-system" />
<plugin filename="ignition-gazebo-sensors-system">
  <render_engine>ogre2</render_engine>
</plugin>
<plugin filename="ignition-gazebo-imu-system" />

Arena Layout

The moon yard arena dimensions:
BoundaryPositionSize
North wall(2.95, 1.15, 0.25)7.9m x 0.1m x 0.5m
South wall(2.95, -3.35, 0.25)7.9m x 0.1m x 0.5m
East wall(6.95, -1.1, 0.25)0.1m x 4.4m x 0.5m
West wall(-1.05, -1.1, 0.25)0.1m x 4.4m x 0.5m
The arena design follows NASA Lunabotics competition specifications with distinct starting, obstacle, and excavation zones.

Launch Configuration

Location: src/lunabot_simulation/launch/moon_yard.launch.py

Spawn Parameters

spawn_x = "0.0"
spawn_y = "0.0"
spawn_z = "0.5"  # Start above surface, gravity will settle it
The rover spawns at the origin and drops onto the lunar surface under gravity.

ROS-Gazebo Bridge

The launch file configures topic bridges for sensor and control data:
"/cmd_vel@geometry_msgs/msg/Twist]ignition.msgs.Twist"

macOS Compatibility

The launch file automatically patches the render engine for macOS:
if platform.system() == "Darwin":
    patched_content = content.replace(
        "<render_engine>ogre2</render_engine>",
        "<render_engine>ogre</render_engine>",
    )
Ogre2 is not fully supported on macOS. The launch file automatically switches to Ogre1 when running on Darwin systems.

Model Resources

The simulation uses custom models stored in models/ directory:
  • lunar_surface - Textured terrain mesh
  • apriltag_beacon - Fiducial marker for localization
  • rock_rough, rock_round, rock_large, rock_small - Obstacle models

Resource Path Configuration

models_path = os.path.join(pkg_lunabot_simulation, "models")
gz_resource_path = os.environ.get("GZ_SIM_RESOURCE_PATH", "")
os.environ["GZ_SIM_RESOURCE_PATH"] = models_path +":" + gz_resource_path
This ensures Gazebo can locate custom models at runtime.

Running the Simulation

1

Launch Gazebo with moon yard world

ros2 launch lunabot_simulation moon_yard.launch.py
2

Verify robot spawn

Check that the rover appears at (0, 0, 0.5) and settles onto the surface.
3

Confirm bridge topics

ros2 topic list | grep -E "(cmd_vel|odom|camera|imu)"
The simulation runs in headless mode (-s flag) by default to conserve resources. Add GUI by modifying gz_args in the launch file.

Build docs developers (and LLMs) love