(repost, for posting wrong place )
I am seeking to initiate a discussion within the community regarding an issue I’ve been experiencing with my Px4-powered drone.
I have been utilizing a Pixhawk 6C in conjunction with optical flow in a GPS-denied environment.
- Software Version: v1.13.3)
- PMW3901 hex hereflow
However, I’ve encountered a peculiar problem when switching to altitude or position control modes. My commands seem to be delayed or even stuck, causing the drone to rapidly accelerate and crash after a few seconds when the control signal is finally transmitted.
In addition, I’ve noticed that the odometry topic appears to be functioning normally at 30Hz. However, the position NED topic occasionally drops to 0 before returning to its normal state after a few seconds. I am uncertain if this is related to the issue I am facing.
I have thoroughly examined the flight log, but I have not been able to identify any abnormalities. I would greatly appreciate any assistance or advice that the community can offer to help me resolve this problem. For reference, I have provided my flight log and a video documenting one of the crashes caused by this issue.
thanks in advance for any reply
stange topic behavior: (local_position_ned and odometries not the same)
Hmm, I have to agree it looks very weird with your flight. I don’t know the exact cause of the problem, but I noticed one thing on the flight log which you might need to fix. The magnetic interference is related to the thrust. This means that the current from your batteries/wires is affecting some of the sensors on the Pixhawk. This can be solved by simply moving everything where current goes through further away from the Pixhawk.
I don’t know if this will help with your problem, but it was the only thing I could see from the flight log.
thanks for your advice, i will check out this issue
- Simulate HIL in Jmavsim, try to reproduce the problem.
(i’m using ubuntu22.04, therefore i can’t simulate in gazebo garden without HIL module so far)
I’m not sure what is the ability of this HIL simulator and is it possible to simulate every parameter in HIL mode. Could someone give me a hint?
Flightlog in HIL, so far i couldn’t see any useful information.
- As @Mr_Madsen reminded, move the compass from the frame, it did reduce the correlation between magnetic field and thruttle.
I found out that in Alt mode :before throttle push over the middle position, the motor won’t react, after throttle push over middle a while, the motor will suddenly spin in a high rpm. However, i done this with propeller removed, i couldn’t judge if this is normal.
The process of reproducing error is so frustrated, i will try my best to figure out the answer.
I can’t tell you anything about HIL simulation, since I haven’t really used it. But in Alt mode, the drone is not supposed to react before having throttle stick above middle position. It is also very normally to suddenly spin to high rpm, it seems a bit scary, but the high rpm is quickly get away from the ground effect when taking off.