Run ros2 launch rmf_demos_gz hotel.launch.xml but Gazebo crashes ( toggle_floors found a flEscalating to SIGKILL on [Ignition Gazebo GUI] ) (#597)

Posted by @01fpcrd:

I would like to ask, when I install Open RMF with only rmf and rmf_demo installed, running the command:ros2 launch rmf_demos_gz hotel.launch.xml

Both rviz2 and Gazebo work fine, and I can control the AMR in the demo as expected.
However, after installing Open RMF Web, when I run the same command:ros2 launch rmf_demos_gz hotel.launch.xml again

rviz2 displays correctly, but the AMR does not appear. Gazebo crashes and automatically closes after a few seconds (before fully loading), showing the following error:
1739866547.6617286 [ign-22] toggle_floors found a flEscalating to SIGKILL on [Ignition Gazebo GUI]
Has anyone experienced a similar question?

Below is my hardware and software information:
OS: Ubuntu 22.04
ROS: Humble
RMF Demo Version: 2.0.0 (by binary installation)
Gazebo Version: Fortress (installed from source)

log file

I found an issue very similar to mine:
https://github.com/open-rmf/rmf/discussions/557
I have confirmed that my Gazebo version is Fortress


Edited by @01fpcrd at 2025-02-18T09:21:01Z

Posted by @aaronchongth:

Hi @01fpcrd! As seen in your logs, gist:dd7588082c2c86acb8adc7986b17be6c · GitHub, the initial issue may have started from pydantic on your setup.

I also see gist:dd7588082c2c86acb8adc7986b17be6c · GitHub. Can you also please try with CycloneDDS instead?

Both rviz2 and Gazebo work fine, and I can control the AMR in the demo as expected.
However, after installing Open RMF Web, when I run the same command:ros2 launch rmf_demos_gz hotel.launch.xml again

rmf-web uses a python virtual environment, so nothing it installs or builds can affect your setup. My guess is that there were processes on your system from the previous run, that were not killed properly, especially on the gazebo side, which can affect future gazebo launches. You can try to check with top or htop, find and kill the zombie processes, or just try again after restarting your setup.

Posted by @01fpcrd:

@aaronchongth

Thank you for your suggestions.
I have confirmed the version of pydantic:
Name: pydantic
Version: 1.8.2
After restarting, no pydantic-related issues were found in the log files.
Thank you very much!

I have also changed the RMW from FastDDS to CycloneDDS:
RMW MIDDLEWARE
middleware name: rmw_cyclonedds_cpp

I terminated all potential zombie processes (ps aux | grep gazebo),
but the crash still occurs with the following error:

Posted by @aaronchongth:

Good to hear

I see that you’re trying to launch the hotel world, just in case this is due to a broken model upstream that is used by hotel, can you try launching office world instead?

If that doesn’t work, can you try deleting your gazebo fuel models directory and try building the rmf_demos_maps package again? This triggers the download again

# in your workspace
rm -rf build/rmf_demos_maps install/rmf_demos_maps
colcon build --packages-select rmf_demos_maps

Depending on your version of gazebo, it could be in ~/.gazebo/models, or ~/.gz/fuel/fuel.gazebosim.org, or ~/.gz/fuel/fuel.ignitionrobotics.org, or ~/.ign/fuel/......, one of these paths


Edited by @aaronchongth at 2025-02-18T11:15:28Z

Posted by @01fpcrd:

Thank you again for your suggestions.
I tried running scenarios such as an office and airport terminal, but the crash issue still occurs.
Next, I attempted the following:
rm -rf build/rmf_demos_maps install/rmf_demos_maps
and deleted the Gazebo models:
rm -rf ~/.ignition/fuel/fuel.gazebosim.org/*

Then, I rebuilt using:
colcon build --packages-select rmf_demos_maps

However, the crash issue still persists.
Reference: gist:79683ac5f5d73aa72ba18fb211495620 · GitHub

During the build process, I encountered some warnings:

I’m not sure if these warnings are causing Gazebo to crash.

Additionally, when checking the logs, I still see the error message:
“Unable to deserialize sdf::Model”

Do you have any other suggestions? I would really appreciate any help T^T

Gazebo models directory:
/.ignition/fuel/fuel.gazebosim.org$ ls
ncs_robotmanager openrobotics

Posted by @aaronchongth:

Hi @01fpcrd, I can’t seem to identify what the issue is for now, it looks like it is isolated to gazebo itself, where there is a invalid memory access (most likely from a plugin), gist:79683ac5f5d73aa72ba18fb211495620 · GitHub

Also, I still noticed that you are using fastrtps, gist:79683ac5f5d73aa72ba18fb211495620 · GitHub. Please use the same RMW implementation on all your terminals, Working with multiple ROS 2 middleware implementations — ROS 2 Documentation: Jazzy documentation

Posted by @01fpcrd:

@aaronchongth
Thank you for your suggestion.
Since I am using Ignition Gazebo 6.16.0, it seems to require SDF 1.7 or a newer version.
After updating all the models I used to SDF 1.7, the Gazebo crashes no longer occur.

However, I am now unable to load the map (Gazebo appears completely blank) T^T
I will try debugging this issue on my own first !!!
If I encounter any problems, I will come back and humbly ask for your help.
Here is the latest log file.

There might still be some issues, and I am still debugging.

However, the problems you previously mentioned are no longer present.
(RMW has already been changed to Cyclone DDS.)