Cannot launch RMF_Demos successfully (Rviz2 launches successfully, but Gazebo crashes in about 5 seconds) (#557)

Posted by @Narayan-007:

I currently have Ubuntu version 22.04 and ROS2 Humble. I have managed to successfully install Open-RMF by following the Build from Source instructions. I can successfully colcon build it, however as mentioned in the title, I cannot launch RMF Demos successfully. Here is the link to the gists that I have attached regarding this issue:

Please look at the following titles for the gists:
colcon build --event-handlers=console_cohesion
The content of the file ~/.pit_crew/model_cache.json
Running hotel.launch.xml after building from source for humble (Rviz launches but gazebo crashes again)

Chosen answer

Answer chosen by @mxgrey at 2024-11-07T07:14:10Z.
Answered by @mxgrey:

The instructions from the multirobotbook are for Ubuntu 20.04 while the instructions for the README are for Ubuntu 22.04, so if you try to mix those together then it’s not surprising if you run into errors.

Instead of setting up Gazebo based on the old instructions in the multirobot book, you should follow the instructions in the README very precisely, and the correct version of Gazebo will be automatically installed by rosdep.

If you are using Ubuntu 22.04 then I recommend purging all apt-installed packages related to gazebo and Open-RMF, remove all gazebo packages from your colcon workspace (if you were trying to build gazebo from source), and then follow the README instructions very carefully. Use the humble version of the repos file to make sure all the source code is compatible with Ubuntu 22.04.

There isn’t anything we can do from our end to sort out the state of your system packages. Ubuntu/Debian gives you a lot of power to modify your system packages in ways that can create problems for you, and we can’t know what you’ve done or what state your packages might be in. The best thing to do is start from the cleanest slate possible and try again carefully. In my early days of using Ubuntu I would sometimes completely reinstall Ubuntu after I made too many mistakes with my system packages and was too confused to fix them.

Posted by @mxgrey:

Glancing over the logs it looks you’re trying to bounce between many different combinations of package versions. Sometimes I see gz, other times I see ign. I see rmf_demos_fleet_adapter reporting that rmf_adapter.easy_full_control does not exist which suggests you’re using incompatible versions of rmf_demos and rmf_ros2.

Specifically what instructions are you following to build up your workspace and how are you deciding on what versions of various packages to use?

For the smoothest possible experience in getting Open-RMF working, I suggest using Ubuntu 24.04 and the jazzy distro of ROS. That will allow all Open-RMF packages to work from their main branches and it will allow you to install gz-sim very easily from the build farm.

Posted by @Narayan-007:

Oh, the instructions I have followed are from the following links:
Installation - Programming Multiple Robots with ROS 2 (the Setup Gazebo repositories portion)
rmf/README.md at main · open-rmf/rmf · GitHub (the Setup and Building from source portion, for the pulling demo repositories, I used the link https://raw.githubusercontent.com/open-rmf/rmf/refs/heads/humble/rmf.repos for installation instead of the provided link)

I hope this can help you better understand why I am getting these errors. I will consider upgrading to Ubuntu 24.04 and ROS2 Jazzy if these issues still persist. Hope you can help.

Posted by @mxgrey:

The instructions from the multirobotbook are for Ubuntu 20.04 while the instructions for the README are for Ubuntu 22.04, so if you try to mix those together then it’s not surprising if you run into errors.

Instead of setting up Gazebo based on the old instructions in the multirobot book, you should follow the instructions in the README very precisely, and the correct version of Gazebo will be automatically installed by rosdep.

If you are using Ubuntu 22.04 then I recommend purging all apt-installed packages related to gazebo and Open-RMF, remove all gazebo packages from your colcon workspace (if you were trying to build gazebo from source), and then follow the README instructions very carefully. Use the humble version of the repos file to make sure all the source code is compatible with Ubuntu 22.04.

There isn’t anything we can do from our end to sort out the state of your system packages. Ubuntu/Debian gives you a lot of power to modify your system packages in ways that can create problems for you, and we can’t know what you’ve done or what state your packages might be in. The best thing to do is start from the cleanest slate possible and try again carefully. In my early days of using Ubuntu I would sometimes completely reinstall Ubuntu after I made too many mistakes with my system packages and was too confused to fix them.


Edited by @mxgrey at 2024-11-07T07:06:05Z


This is the chosen answer.

Posted by @Narayan-007:

Hmm, I see. So what do you suggest I do other than start from scratch? Is it to remove the Gazebo packages I installed based on the multirobot book, or remove everything I have installed so far? I am also not sure which section of the README enables the Gazebo to be installed. Because based on what you said, right now if I can fix the gazebo issues the RMF Demos should not have any issues running. What exactly should I do now? Am a bit confused and would like some clarity.

Posted by @mxgrey:

We’ve provided you with all the information that can possibly help you. Please carefully and patiently read what you’re being provided

I am also not sure which section of the README enables the Gazebo to be installed

I already answered this:

the correct version of Gazebo will be automatically installed by rosdep.

There is no further information that any of us can provide to help you across the various conversations that you’ve had with us on this discussion board and on Discord. If you remain stuck then please more carefully reread what you’ve already been provided.

Posted by @01fpcrd:

Did you manage to resolve the issue?
I’m facing the same problem.

Posted by @aaronchongth:

Just a mention that a separate thread is happening here, Run ros2 launch rmf_demos_gz hotel.launch.xml but Gazebo crashes ( toggle_floors found a flEscalating to SIGKILL on [Ignition Gazebo GUI] ) · open-rmf/rmf · Discussion #597 · GitHub, and it is a different issue.