Packages to simulate Leo Rover in ROS 2.
- leo_simulator - Metapackage for this repository.
- 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
- Setup a colcon workspace
- Install ros_gz package (Gazebo Fortress or Garden)
- Clone leo_common-ros2 repository into the workspace:
cd your_workspace_name/src git clone https://github.com/LeoRover/leo_common-ros2
- Clone this repository into the workspace:
git clone https://github.com/LeoRover/leo_simulator-ros2
- If using Gazebo Garden (skip this step if using Fortress):
export GZ_VERSION=garden
- Install dependencies using rosdep:
cd .. sudo rosdep init rosdep update rosdep install --from-paths src -y --ignore-src
- 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: Path to the Gazebo world file
- robot_ns: Robot namespace
Example:
ros2 launch leo_gz_bringup leo_gz.launch.py sim_world:=~/ros2_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:=your_namespace