PX4 / PX4-Autopilot

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

Unable to flying more than 20 minutes #17455

Closed Kim-zhi-jiang closed 3 years ago

Kim-zhi-jiang commented 3 years ago

Hello everybody

Unable to flying more than 20 minutes at v-master version in simulation environment.

1 MC iris mc

2 standard vtol vtol

julianoes commented 3 years ago

Interesting, this is probably something hanging due to lockstep.

Is this in VirtualBox? And how many CPU cores have you enabled? I'm just asking so I can try to reproduce this.

Kim-zhi-jiang commented 3 years ago

Only one Ubuntu system in laptop, But V-1.11.x no this problem. Test PX4 master version every day, still this problems (Don't know why the latency is high )

Kim-zhi-jiang commented 3 years ago

@julianoes

Thank you!

Have been used before "PX4_SIM_SPEED_FACTOR=3 make -j4 px4_sitl gazebo" If "PX4_SIM_SPEED_FACTOR=1" like this

Kim-zhi-jiang commented 3 years ago

2021-05-08 07-20-40 的屏幕截图

SalimTerryLi commented 3 years ago

Confirmed with latest master f15eefcc9503d2abe0713defe7f017519e337b0b .

make px4-sitl gazebo and crashed after 30min. Ubuntu 20.04 host without any virtualization.

Seems that something went wrong within gzserver.

Jaeyoung-Lim commented 3 years ago

@Kim-zhi-jiang Can you check your memory usage?

julianoes commented 3 years ago

I can reproduce it. It doesn't seem to happen with jmavsim.

Jaeyoung-Lim commented 3 years ago

@julianoes Thanks, I will have a look

Kim-zhi-jiang commented 3 years ago

@Jaeyoung-Lim Sometime RTL or TIMEOUT used today "541697d19" version.

2021-05-09 07-36-46 的屏幕截图 2021-05-09 07-37-37 的屏幕截图 2021-05-09 07-48-24 的屏幕截图

julianoes commented 3 years ago

Fix coming in https://github.com/PX4/PX4-SITL_gazebo/pull/747.

Kim-zhi-jiang commented 3 years ago

@julianoes @Jaeyoung-Lim Perfect!

heleidsn commented 3 years ago

Hi @julianoes and @Kim-zhi-jiang,

Is this problem solved after the PX4/PX4-SITL_gazebo#747?

I find the same problem and now I cannot simulate over 35min with export PX4_SIM_SPEED_FACTOR=20. It can be reproduced on my PC.

Screenshot from 2021-05-15 10-48-09

OS: Ubuntu 18.04 PX4: 5f14ee2a9705d746de7a87034f347db1c624fab2 px4_sitl: 2496b85dd22d2f9c1c1281d5ef77dfb86ef604a3

julianoes commented 3 years ago

@heleidsn does this happen consistently?

Kim-zhi-jiang commented 3 years ago

"PX4_SIM_SPEED_FACTOR=20" so fast!I use 3 Some code needs to be optimized.

for(i=0 i++ i=1000000000){ double xyz=11111.0f; ..... } VS double xyz; for(i=0 i++ i=1000000000){ xyz=11111.0f; ..... }

Kim-zhi-jiang commented 3 years ago

"PX4_SIM_SPEED_FACTOR=20" so fast!I use 3 Some code needs to be optimized.

for(i=0 i++ i=1000000000){ double xyz=11111.0f; ..... } VS double xyz; for(i=0 i++ i=1000000000){ xyz=11111.0f; ..... }

julianoes commented 3 years ago

@Kim-zhi-jiang like where?

Kim-zhi-jiang commented 3 years ago

I just touch drones,but find some, later will find EKF POS ATT. 2021-05-17 19-38-31 的屏幕截图 2021-05-17 19-39-52 的屏幕截图

heleidsn commented 3 years ago

@heleidsn does this happen consistently?

Hi @julianoes, this happens every time on my PC.

Hi @Kim-zhi-jiang, as for PX4_SIM_SPEED_FACTOR=20, I think it's not too fast because it will reach the hardware limitation if we set PX4_SIM_SPEED_FACTOR a big number. On my PC, it can reach 20 times of real-time speed.

julianoes commented 3 years ago

@heleidsn sorry, what happens?

heleidsn commented 3 years ago

@heleidsn sorry, what happens?

@julianoes Hi, I mean the same crash problem happens. As I said here: https://github.com/PX4/PX4-Autopilot/issues/17455#issuecomment-841588584

Kim-zhi-jiang commented 3 years ago

@heleidsn

More than this?

param set-default IMU_GYRO_RATEMAX 400 # Default 400 100 250 400 800 1000 2000Hz param set-default IMU_INTEG_RATE 200 #Default 200 100 200 250 400Hz

Annoying lazy data transfer!