| ROS 2 version | Gazebo version | Branch | Binaries hosted at |
|---|---|---|---|
| Humble | Fortress | humble | https://packages.ros.org |
| Humble | Garden | humble | only from source |
| Humble | Harmonic | humble | only from source |
| Jazzy | Harmonic | ros2 | https://packages.ros.org |
| Rolling | Ionic | ros2 | https://packages.ros.org |
leo_simulator- Metapackage which provides all other packages.leo_gz_bringup- Launch files for starting simulation and adding Leo Rover inside a simulated world.leo_gz_plugins- Gazebo plugins for simulated Leo Rover.leo_gz_worlds- Custom simulation worlds.
This branch supports ROS Rolling. See above for other ROS versions.
Rolling binaries are available for Gazebo Harmonic. They are hosted at https://packages.ros.org.
-
Make sure you've installed ROS from binary repositories.
-
Install
ros-<distro>-leo-simulatorpackage. On Ubuntu with ROS Rolling:sudo apt install ros-rolling-leo-simulator
- Make sure you've installed ROS from binary repositories.
- Setup a colcon workspace:
mkdir -p ~/ws/src - Clone this repository into the workspace:
cd ~/ws/src git clone https://github.com/snt-spacer/leo_simulator-ros2.git -b <distro> - Install dependencies using rosdep:
cd ~/ws sudo rosdep init rosdep update rosdep install --from-paths src -y --ignore-src -r - Build the project and source the workspace:
colcon build --symlink-install source install/setup.bash
Run a simulation world with leo rover:
ros2 launch leo_gz_bringup leo_gz.launch.py
Launch agruments:
-
sim_world(default:leo_empty.sdf) - The Gazebo world to use. Refer to the leo_gz_worlds package for available worlds. -
robot_ns(default:"") - Robot namespaceExample:
ros2 launch leo_gz_bringup leo_gz.launch.py sim_world:='~/ws/src/leo_simulator-ros2/leo_gz_worlds/worlds/lunalab2024.sdf' robot_ns:=your_namespace
Add another leo rover to an already running gazebo world:
ros2 launch leo_gz_bringup spawn_robot.launch.py robot_ns:=leo2
Clone Alexandre-Frantz leo description package:
cd ~/ws/src
git clone https://github.com/Alexandre-Frantz/leo-common-ros2.git -b <distro>
Rebuild and source:
colcon build --symlink-install
source install/setup.bash
Export the Gazebo resource path for the modified leo_description package:
# For jazzy:
export GZ_SIM_RESOURCE_PATH="$(ros2 pkg prefix leo_description)/share:$GZ_SIM_RESOURCE_PATH"
# For humble:
export IGN_GAZEBO_RESOURCE_PATH"$(ros2 pkg prefix leo_description)/share:$IGN_GAZEBO_RESOURCE_PATH"
Run the simulator (robot namespace unsupported):
ros2 launch leo_gz_bringup leo_gz.launch.py sim_world:='~/ws/src/leo_simulator-ros2/leo_gz_worlds/worlds/lunalab2024.sdf'