PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
7.87k stars 13.24k forks source link

[Bug] sitl gazebo-classic_typhoon_h480 is not working on 1.14.3 #23223

Open lcy8047 opened 1 month ago

lcy8047 commented 1 month ago

Describe the bug

When I run HEADLESS=1 make px4_sitl gazebo-classic_typhoon_h480, it was not working. Details are below.

$ HEADLESS=1 make px4_sitl gazebo-classic_typhoon_h480
[0/4] Performing build step for 'sitl_gazebo-classic'
ninja: no work to do.
[3/4] cd /PX4/1.14.3/PX4-Autopilot/build/p....14.3/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /PX4/1.14.3/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
model: typhoon_h480
world: none
src_path: /PX4/1.14.3/PX4-Autopilot
build_path: /PX4/1.14.3/PX4-Autopilot/build/px4_sitl_default
GAZEBO_PLUGIN_PATH :/PX4/1.14.3/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
GAZEBO_MODEL_PATH :/PX4/1.14.3/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models
LD_LIBRARY_PATH :/PX4/1.14.3/PX4-Autopilot/build/px4_sitl_default/build_gazebo-classic
empty world, default world typhoon_h480.world for model found
Using: /PX4/1.14.3/PX4-Autopilot/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/typhoon_h480/typhoon_h480.sdf
not running gazebo gui
SITL COMMAND: "/PX4/1.14.3/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/PX4/1.14.3/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=6011
INFO  [param] selected parameter default file parameters.bson
INFO  [param] importing from 'parameters.bson'
INFO  [parameters] BSON document size 274 bytes, decoded 274 bytes (INT32:11, FLOAT:3)
INFO  [param] selected parameter backup file parameters_backup.bson
INFO  [dataman] data manager file './dataman' size is 7866640 bytes
etc/init.d-posix/rcS: 39: [: Illegal number: 
INFO  [init] PX4_SIM_HOSTNAME: localhost
INFO  [simulator_mavlink] Waiting for simulator to accept connection on TCP port 4560
12.40
INFO  [simulator_mavlink] Simulator connected on TCP port 4560.
INFO  [lockstep_scheduler] setting initial absolute time to 216000 us
INFO  [commander] LED: open /dev/led0 failed (22)
INFO  [navigator] Mission #3 loaded, 7 WPs
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
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
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/2024-06-04/08_07_46.ulg   
INFO  [logger] Opened full log file: ./log/2024-06-04/08_07_46.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [mavlink] partner IP: 127.0.0.1
INFO  [tone_alarm] home set
INFO  [mavlink] partner IP: 127.0.0.1
WARN  [health_and_arming_checks] Preflight Fail: vertical velocity unstable
INFO  [tone_alarm] notify positive
WARN  [health_and_arming_checks] Preflight Fail: vertical velocity unstable
WARN  [health_and_arming_checks] Preflight Fail: vertical velocity unstable
WARN  [health_and_arming_checks] Preflight Fail: height estimate error
WARN  [health_and_arming_checks] Preflight Fail: horizontal velocity unstable
WARN  [health_and_arming_checks] Preflight Fail: velocity estimate error
WARN  [health_and_arming_checks] Preflight Fail: Attitude failure (roll)
... repeat ...
PX4 Exiting...
pxh> Exiting NOW.
ninja: build stopped: interrupted by user.
make: *** [Makefile:232: px4_sitl] Interrupt

Screenshot from 2024-06-04 17-08-06

To Reproduce

  1. Run QGC
  2. Run command HEADLESS=1 make px4_sitl gazebo-classic_typhoon_h480

Expected behavior

None

Screenshot / Media

No response

Flight Log

None

Software Version

PX4 1.14.3 QGC 4.3.0

Flight controller

px4_sitl gazebo-classic_typhoon_h480

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

matteodelseppia commented 1 month ago

I don't think you can use camera without opening gzclient. But don't trust me, as I'm not 100% sure about that. But without the HEADLESS=1 it should work, about that I'm sure.