Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to load Gazebo #2

Open
Manolo844 opened this issue Dec 22, 2024 · 4 comments
Open

Fail to load Gazebo #2

Manolo844 opened this issue Dec 22, 2024 · 4 comments

Comments

@Manolo844
Copy link

Hi, while launching this command : ~/PX4-Autopilot/build/px4_sitl_default/bin/px4, I always get the same error :

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
ERROR [gz_bridge] Service call timed out. Check GZ_SIM_RESOURCE_PATH is set correctly.
ERROR [gz_bridge] Task start failed (-1)
ERROR [init] gz_bridge failed to start and spawn model
ERROR [px4] Startup script returned with return value: 256

I tried multiple times, but gazebo always launches with a black screen, and then crashes. I also checked the GZ_SIM_RESOURCE_PATH variable and it's empty so i tried to export it with a path that contains worlds models : export GZ_SIM_RESOURCE_PATH=/home/users/PX4-Autopilot_PATCH/Tools/simulation/gz/worlds. But it doesn't change anything.

If you have any clue, thanks in advance

@SathanBERNARD
Copy link
Owner

Hi, did you run the command immediately after installing? If so, please make sure to open a new terminal before running it. The installation script modifies the ~/.bashrc file, which is executed each time a new terminal is opened.

If it’s still not working, could you let me know if you’re using a VM or if there’s anything unique about your setup that might differ from a fresh Ubuntu installation on a dedicated machine?

@SathanBERNARD
Copy link
Owner

I can reproduce this error by running the command in a virtual machine with limited hardware resources. The issue appears to be caused by gz_bridge taking too long to initialize.

If you're using a virtual machine, could you try increasing the resources allocated to it?

@Manolo844
Copy link
Author

Thanks for the answers, I'm not using a VM, but I do have a dual boot setup. Maybe it's a resource issue because of that. I'll try using another laptop to see if I encounter the same problem. By the way, what is supposed to be modified in the ~/.bashrc file? I can't see any new lines, so maybe the installation didn't go well either

@SathanBERNARD
Copy link
Owner

The line added to .bashrc is: source /opt/ros/humble/setup.bash (or source /opt/ros/jammy/setup.bash) for the ubuntu24 branch.
It seems that people who are experiencing the same type of issue as you are modifying the timeout in this file: https://github.com/PX4/PX4-Autopilot/blob/81552fc036be687d323339b3f0a861c24a1ffb20/src/modules/simulation/gz_bridge/GZBridge.cpp#L915C34-L915C38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants