ROS 2 Gazebo Simulation

Hi,

we bought a Leo Rover and installed the ROS 2 image on it; thanks for porting so far :slight_smile:
For development, being able to use it in a simulation environment would be great. Unfortunately, I cannot get it to work.

I found there is a “humble”-Branch in these repositories:

  • LeoRover/leo_common-ros2.git and
  • LeoRover/leo_desktop-ros2.git.

However, in LeoRover/leo_simulator.git, I only found a branch named “ros2”. Is it compatible with Humble?
What else is required?

I cloned the repositories in the src folder of my workspace, used rosdep install --from-paths src --ignore-src -r -y and colcon build --symlink-install and sourced the workspace afterwards.

Trying to run Gazebo with ros2 launch leo_gazebo leo_gazebo.launch.py yields an error: spawner.py not found.
I replaced spawner.py with spawner in the file leo_gazebo/launch/spawn_robot.launch.py, and it loads a little longer, but a different errors appear:

  • [spawner-6] [ERROR] [1690367129.466511236] [diff_drive_controller_spawner]: Controller manager not available
  • [gazebo_ros2_control]: parser error Couldn't parse params file: '--params-file package://leo_description/config/controllers.yaml'. Error: Error opening YAML file, at ./src/parser.c:270, at ./src/rcl/arguments.c:406

I am using Humble in a docker container with the osrf/ros:humble-desktop-full image.
What do I need to do to setup the Leo simulator with ROS 2?

Thanks in advance for help :slight_smile:

1 Like

Hi @Dennis,
For now ROS2 is not fully supported with leo, and I’m not sure if the simulation is now working with the ROS2 environment on the robot.
Regarding your problem @Blazej_Sowa might be able to help you, but for now he is on vacation.

Hi @Bitterisland6, thanks for letting me know. I’ll wait for when he is back from vacation :slight_smile:

Hey, I’m having the same problem currently using Foxy, however I was able to get the Leo model to spawn by copying the entire leo_description package and putting it in the gazebo/models directory. I found this solution here if you want to take a look for yourself. Still having issues getting the sim to work fully.

There was an effort to port the Leo Gazebo simulation to ROS2 (even before porting the rest of the packages), you can find relevant discussion here:

It ended up in me trying to merge changes to gazebo_ros_pkgs which never succeded as the project is pretty much dead.

The Gazebo team shifted its focus on their new simulation engine (formerly known as Ignition) which they named Gazebo (I know, confusing), thus they changed the name of the old engine to Gazebo Classic.

I think if we will create leo simulation packages for ROS2, they will probably target the new Gazebo simulation.

Thanks for your answers so far! :slight_smile:
I already found that discussion, but didn’t really get it running. I will try again.

Are there any plans for leo simulation packages with the new Gazebo simulation?