-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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 simulate with gazebo on Ubuntu 20.04: Segmentation fault (core dumped) gzserver $verbose $world_path $ros_args #22958
Comments
I wonder if it is this one?
Otherwise, can you try to open the core dump?
with gdb -ex run --args gzserver
|
I also encountered a similar problem. I have now determined that the problem lies in "<plugin name='mavlink_interface' filename='libgazebo_mavlink_interface.so>". After further checking its code, I found that there is a problem with the code ""mavlink_interface_ = std::make_unique". Can anyone else help check this issue? Thank you very much! |
Make sure to try to get more verbose output:
|
Would be good if you could type |
Thank you again for your patient and detailed reply! I ran
|
Hmm, I think that's the backtrace of PX4 but we need the one of |
Interesting. It's crashing related to the serial port but you're using SITL, so it shouldn't use the serial port. Are you trying HITL? Does it happen with a fresh clone? |
And I've noticed a significant improvement in success rate when using some other models for simulation, such as |
I'm sorry I'm out of ideas. |
That's OK. Thank you very much! |
I uninstalled Gazebo 11, which was installed using |
Ah nice. So you actually built it from source? Or installed? |
Yes, I built it from the latest source code and then installed by |
Wow, that's commitment! Still puzzled why that happened. |
I'm also confused about the difference that happened between these two installation methods. |
@julianoes The same problem on macOS14.3, but I can run all sitl before I update my os version from 14.2 to 14.3. Maybe the error come from gazebo,since I can run jmavsim successfully. Details on #22826 |
Maybe gazebosim/gazebo-classic#3380 ? |
I have fix! #22826 (comment) |
My gdb debug shows the same as yours, and now I've solved it. In my case, I installed Boost1.85 by compiling the source code, and then installed gazebo via apt, which also installed libboost-dev (Boost 1.71). Now I have two incompletely compatible Boost libraries on my computer. Then when I ran "make px4_sitl gazebo-classic", the generate target seemed to depend on Boost as well, and there was confusion. Due to my limited time, I didn't go into detail, but I guess it was a core dump caused by mixing two incompatible libraries. |
Describe the bug
I'm trying to run
make px4_sitl gazebo
but get the 'core dumped' error:I tried to fix it by
make distclean
andgit submodule update --init --recursive
, and it succeeded twice by accident, but running SITL again gave the same failed result with the same error information. The gazebo can run perfectly standalone.To Reproduce
I followed the instructions of the PX4 User Guide to install and configure, but got the error as described above.
All px4 commands starting SITL with gazebo-classic fail with the same core dumped error.
Expected behavior
I expect PX4 to connect to gazebo normally and successfully run SITL.
Screenshot / Media
No response
Flight Log
lw@lw-System-Product-Name:~/PX4-Autopilot$ make px4_sitl gazebo
[0/4] Performing build step for 'sitl_gazebo-classic'
ninja: no work to do.
[3/4] cd /home/lw/PX4-Autopilot/build/px4_sitl_default/src/modules...ome/lw/PX4-Autopilot /home/lw/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/lw/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
model: iris
world: none
src_path: /home/lw/PX4-Autopilot
build_path: /home/lw/PX4-Autopilot/build/px4_sitl_default
GAZEBO_PLUGIN_PATH :/home/lw/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
GAZEBO_MODEL_PATH :/home/lw/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models
LD_LIBRARY_PATH /home/lw/catkin_ws/devel/lib:/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu:/home/lw/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
empty world, setting empty.world as default
Using: /home/lw/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/iris/iris.sdf
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
/home/lw/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_run.sh: line 147: 267253 Segmentation fault (core dumped) gzserver $verbose $world_path $ros_args
SITL COMMAND: "/home/lw/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/lw/PX4-Autopilot/build/px4_sitl_default"/etc
| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /| |
| | / /^\ \ ___ |
_| / / |_/
px4 starting.
INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=10015
INFO [param] selected parameter default file parameters.bson
INFO [param] selected parameter backup file parameters_backup.bson
SYS_AUTOCONFIG: curr: 0 -> new: 1
SYS_AUTOSTART: curr: 0 -> new: 10015
CAL_ACC0_ID: curr: 0 -> new: 1310988
CAL_GYRO0_ID: curr: 0 -> new: 1310988
CAL_ACC1_ID: curr: 0 -> new: 1310996
CAL_GYRO1_ID: curr: 0 -> new: 1310996
CAL_ACC2_ID: curr: 0 -> new: 1311004
CAL_GYRO2_ID: curr: 0 -> new: 1311004
CAL_MAG0_ID: curr: 0 -> new: 197388
CAL_MAG0_PRIO: curr: -1 -> new: 50
CAL_MAG1_ID: curr: 0 -> new: 197644
CAL_MAG1_PRIO: curr: -1 -> new: 50
SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
INFO [dataman] data manager file './dataman' size is 7872608 bytes
INFO [init] PX4_SIM_HOSTNAME: localhost
INFO [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
Gazebo multi-robot simulator, version 11.14.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
[Err] [ConnectionManager.cc:121] Failed to connect to master in 30 seconds.
[Err] [gazebo_shared.cc:78] Unable to initialize transport.
[Err] [gazebo_client.cc:56] Unable to setup Gazebo
Software Version
Gazebo 11.14.0, Ubuntu 20.04
Flight controller
None
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: