PX4 / PX4-Autopilot

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

[Bug] MAVSDK goto_location makes px4_sitl give many estimation errors #22861

Open VBS2004 opened 4 months ago

VBS2004 commented 4 months ago

Describe the bug

Actually,in the earlier version before even getting the STALE messages in this isssue [https://github.com/PX4/PX4-Autopilot/issues/22767].The goto_location is not having any response in the simualtion the drone just arms and stays still forever. In the latest commit, it arms and waits for some 10 to 15 seconds then crashes.

To Reproduce

1.make px4_sitl gz_x500 2.MicroXRCEAgent udp4 -p 8888 3.python goto.py

Expected behavior

px4 starting.

INFO [px4] startup script: /bin/sh etc/init.d-posix/rcS 0 INFO [init] found model autostart file as SYS_AUTOSTART=4001 INFO [param] selected parameter default file parameters.bson INFO [param] importing from 'parameters.bson' INFO [parameters] BSON document size 316 bytes, decoded 316 bytes (INT32:13, FLOAT:3) INFO [param] selected parameter backup file parameters_backup.bson INFO [dataman] data manager file './dataman' size is 7872608 bytes INFO [init] Gazebo simulator INFO [init] starting gazebo with world: /root/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf WARN [init] PX4_GZ_MODEL_POSE not set, spawning at origin. INFO [gz_bridge] world: default, model name: x500_0, simulation model: x500 INFO [gz_bridge] Requested Model Position: 0,0,0,0,0,0 INFO [gz_bridge] Model position z is less or equal 0.0, moving upwards Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Warning [Utils.cc:130] [/sdf/world[@name="default"]/spherical_coordinates/altitude:/root/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf:L153]: XML Element[altitude], child of element[spherical_coordinates], not defined in SDF. Copying[altitude] as children of [spherical_coordinates]. libEGL warning: egl: failed to create dri2 screen libEGL warning: egl: failed to create dri2 screen INFO [lockstep_scheduler] setting initial absolute time to 8000 us WARN [vehicle_angular_velocity] no gyro selected, using sensor_gyro:0 1310988 INFO [commander] LED: open /dev/led0 failed (22) INFO [tone_alarm] home set 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 [logger] logger started (mode=all) INFO [logger] Start file log (type: full) INFO [logger] [logger] ./log/2024-03-09/17_59_48.ulg
INFO [logger] Opened full log file: ./log/2024-03-09/17_5948.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 [commander] Ready for takeoff! INFO [mavlink] partner IP: 127.0.0.1 INFO [commander] Armed by external command INFO [tone_alarm] arming warning INFO [navigator] Using default takeoff altitude: 2.5 m INFO [commander] Takeoff detected
INFO [mavlink] partner IP: 127.0.0.1 WARN [health_and_arming_checks] Preflight Fail: Attitude failure (roll) WARN [failsafe] Failsafe activated INFO [tone_alarm] battery warning (fast) WARN [health_and_arming_checks] Preflight Fail: High Accelerometer Bias WARN [mc_pos_control] invalid setpoints WARN [mc_pos_control] Failsafe: blind land WARN [mc_pos_control] Failsafe: blind descent WARN [failsafe] Failsafe activated INFO [tone_alarm] battery warning (fast) ERROR [health_and_arming_checks] angular velocity no longer valid (non-finite values) WARN [health_and_arming_checks] Preflight Fail: ESC failure detected WARN [health_and_arming_checks] Preflight Fail: Flight termination active INFO [commander] Disarmed by lockdown
WARN [health_and_arming_checks] Preflight Fail: height estimate error WARN [health_and_arming_checks] Preflight Fail: velocity estimate error WARN [health_and_arming_checks] Preflight Fail: position estimate error WARN [health_and_arming_checks] Preflight Fail: ESC failure detected WARN [health_and_arming_checks] Preflight Fail: Flight termination active INFO [tone_alarm] notify neutral INFO [logger] closed logfile, bytes written: 59847230 WARN [health_and_arming_checks] Preflight Fail: height estimate error WARN [health_and_arming_checks] Preflight Fail: velocity estimate error WARN [health_and_arming_checks] Preflight Fail: position estimate error WARN [health_and_arming_checks] Preflight Fail: Flight termination active

Screenshot / Media

No response

Flight Log

https://logs.px4.io/plot_app?log=50eb054e-3f0f-4b9a-9140-840b5c3726e9

Software Version

Latest commit in main branch

Flight controller

SITL

Vehicle type

None

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

No response

Additional context

No response

brunocentanaro commented 1 month ago

Hello! could you find a solution?