Segmentation Fault with typhoon h480

Hi. I’ve compiling some tools and had to recompile the autopilot. When I run make px4_sitl gazebo_typhoon_h480, the simulator gets launched, but a segmentation faults kills everything (Tools/sitl_run.sh: line 168: 19398 Segmentation fault (core dumped)). Then, I can do roslaunch px4 mavros_posix_sitl.launch vehicle:=typhoon_h480 and the segfault reappears, even with roslaunch px4 posix_sitl.launch vehicle:=typhoon_h480. It does not happen with the Iris quadrotor. This is at e4a408bc550e49a7ed98d7e82e0719bb9b8756ec, which is a commit that is working on other PC. If I update to todays master, the same happens, but the sigsegv occurs in Tools/sitl_run.sh: line 192: 19398 Segmentation fault (core dumped)).

Where can this come from? I’ll open an issue on PX4-Autopilot if necessary.

I’m using:

  • protocol buffers 3.0.0 (compiled from sources)
  • Gazebo multi-robot simulator, version 9.16.0 (compiled from sources with ignition from sources and gazebo_ros_pkgs from sources)
  • ROS distro: KINETIC
  • rosversion 1.12.17
  • OS: Ubuntu 16.04

The Iris can be switched to offboard and fly within gazebo.

I’ll leave a log below from the posix launch (without mavros):

$ roslaunch px4 posix_sitl.launch vehicle:=typhoon_h480
... logging to /.ros/log/63c7d2bc-44aa-11eb-9ac5-409f3844f6f9/roslaunch-workstation-21236.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://workstation:38027/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.17
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    sitl (px4/px4)
    vehicle_spawn_workstation_21236_6361959053223858979 (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [21246]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 63c7d2bc-44aa-11eb-9ac5-409f3844f6f9
process[rosout-1]: started with pid [21260]
started core service [/rosout]
process[sitl-2]: started with pid [21284]
INFO  [px4] Creating symlink /PX4-Autopilot/build/px4_sitl_default/etc -> /.ros/etc

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
Info: found model autostart file as SYS_AUTOSTART=6011
process[gazebo-3]: started with pid [21299]
INFO  [param] selected parameter default file eeprom/parameters_6011
[param] parameter file not found, creating eeprom/parameters_6011
process[gazebo_gui-4]: started with pid [21311]
  SYS_AUTOCONFIG: curr: 0 -> new: 1
process[vehicle_spawn_workstation_21236_6361959053223858979-5]: started with pid [21324]
  SYS_AUTOSTART: curr: 0 -> new: 6011
  BAT_N_CELLS: curr: 0 -> new: 4
  CAL_ACC0_ID: curr: 0 -> new: 1311244
  CAL_ACC1_ID: curr: 0 -> new: 1311500
  CAL_GYRO0_ID: curr: 0 -> new: 1311244
  CAL_GYRO1_ID: curr: 0 -> new: 1311500
  CAL_MAG0_ID: curr: 0 -> new: 197388
  CAL_MAG1_ID: curr: 0 -> new: 197644
  CBRK_SUPPLY_CHK: curr: 0 -> new: 894281
  COM_RC_IN_MODE: curr: 0 -> new: 1
  EKF2_ANGERR_INIT: curr: 0.1000 -> new: 0.0100
  EKF2_GBIAS_INIT: curr: 0.1000 -> new: 0.0100
  COM_ARM_EKF_AB: curr: 0.0022 -> new: 0.0050
  EKF2_REQ_GPS_H: curr: 10.0000 -> new: 0.5000
  MC_PITCH_P: curr: 6.5000 -> new: 6.0000
  MC_PITCHRATE_P: curr: 0.1500 -> new: 0.2000
  MC_ROLL_P: curr: 6.5000 -> new: 6.0000
  MC_ROLLRATE_P: curr: 0.1500 -> new: 0.2000
  MPC_Z_VEL_P_ACC: curr: 4.0000 -> new: 12.0000
  MPC_Z_VEL_I_ACC: curr: 2.0000 -> new: 3.0000
  MPC_XY_P: curr: 0.9500 -> new: 0.8000
  MPC_XY_VEL_P_ACC: curr: 1.8000 -> new: 4.0000
  MPC_XY_VEL_D_ACC: curr: 0.2000 -> new: 0.3200
  RTL_RETURN_ALT: curr: 60.0000 -> new: 30.0000
  SDLOG_MODE: curr: 0 -> new: 1
  SDLOG_PROFILE: curr: 1 -> new: 131
  SDLOG_DIRS_MAX: curr: 0 -> new: 7
  SENS_BOARD_X_OFF: curr: 0.0000 -> new: 0.0000
  SENS_DPRES_OFF: curr: 0.0000 -> new: 0.0010
  TRIG_INTERFACE: curr: 4 -> new: 3
  COM_CPU_MAX: curr: 90.0000 -> new: -1.0000
  IMU_INTEG_RATE: curr: 200 -> new: 250
  NAV_ACC_RAD: curr: 10.0000 -> new: 2.0000
  RTL_DESCEND_ALT: curr: 30.0000 -> new: 10.0000
  RTL_LAND_DELAY: curr: -1.0000 -> new: 0.0000
  PWM_MAX: curr: 2000 -> new: 1950
  PWM_MIN: curr: 1000 -> new: 1075
  GPS_UBX_DYNMODEL: curr: 7 -> new: 6
* MC_PITCHRATE_P: curr: 0.2000 -> new: 0.1000
  MC_PITCHRATE_I: curr: 0.2000 -> new: 0.0500
* MC_ROLLRATE_P: curr: 0.2000 -> new: 0.1500
  MC_ROLLRATE_I: curr: 0.2000 -> new: 0.1000
  MPC_XY_VEL_I_ACC: curr: 0.4000 -> new: 4.0000
* MPC_XY_VEL_P_ACC: curr: 4.0000 -> new: 3.0000
  TRIG_MODE: curr: 0 -> new: 4
  MNT_MODE_IN: curr: -1 -> new: 0
  MAV_PROTO_VER: curr: 0 -> new: 2
* SYS_AUTOCONFIG: curr: 1 -> new: 0
INFO  [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
[ INFO] [1608678418.550569037]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1608678418.551038261]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1608678418.563854480]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1608678418.564320305]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
[INFO] [1608678418.969162, 0.000000]: Loading model XML from file
[INFO] [1608678418.969443, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[INFO] [1608678418.970434, 0.000000]: Calling service /gazebo/spawn_sdf_model
[ INFO] [1608678418.996455756]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1608678419.000552641]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[INFO] [1608678419.472397, 0.136000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1608678419.499791276, 0.136000000]: Physics dynamic reconfigure ready.
[ INFO] [1608678419.500567180, 0.136000000]: Physics dynamic reconfigure ready.
INFO  [simulator] Simulator connected on TCP port 4560.
10.10
INFO  [commander] LED: open /dev/led0 failed (22)
  MAV_TYPE: curr: 2 -> new: 13
INFO  [init] Mixer: etc/mixers/hexa_x.main.mix on /dev/pwm_output0
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
[vehicle_spawn_workstation_21236_6361959053223858979-5] process has finished cleanly
log file: /.ros/log/63c7d2bc-44aa-11eb-9ac5-409f3844f6f9/vehicle_spawn_workstation_21236_6361959053223858979-5*.log
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14558 remote port 14530
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2020-12-22/23_06_59.ulg
INFO  [logger] Opened full log file: ./log/2020-12-22/23_06_59.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> Segmentation fault (core dumped)
[gazebo-3] process has died [pid 21299, exit code 139, cmd /catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/gzserver -e ode /PX4-Autopilot/Tools/sitl_gazebo/worlds/empty.world __name:=gazebo __log:=/.ros/log/63c7d2bc-44aa-11eb-9ac5-409f3844f6f9/gazebo-3.log].
log file: /.ros/log/63c7d2bc-44aa-11eb-9ac5-409f3844f6f9/gazebo-3*.log
[gazebo_gui-4] killing on exit
[sitl-2] killing on exit

PX4 Exiting...
pxh> Exiting NOW.
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done