Hello, I’m a beginner in drones.
I flew the drone and gave the command to the offboard(position).
I’m going to the place I ordered and it moves near the value.
Why does the price keep shaking?
Please help me.
Have you done some tuning to make sure attitude and then position control is working smoothly?
And if so, what sort of offboard control setpoints are you setting? Maybe you can share some code.
I don’t know much about px4
So the PID tuning has not been touched yet.
It keeps moving even when the value is constant, is it a PID tuning problem?
offboard_msg.position = True
offboard_msg.velocity = False
offboard_msg.acceleration = False
I set it to position mode like this.
I’m also using fake gps, optical flow, lidar.
What sort of fake GPS are you using?
You will have to take really small steps.
- First tune attitude and make sure controls are solid.
- Then make sure position control works well, probably easiest with GPS but you can try with flow too.
- Then you’d add in whatever fake GPS you’re using. And carefully test again.
- Only then I’d even consider trying offboard control.
If you jump straight to 4, you have way too many uncertainties and if things don’t work perfectly, you have no idea which step along the way is the problem.
Thank you for your advice, my response was late because I was doing 1 and 2.
I flew the drone while doing position control with the controller.
The x,y values are still weird.
Is the sensor the problem?
I don’t know the sort of fake gps, so I’m posting it as a picture. (some code)
Analysis from Px4LogAssistant tool:
Maybe you can use it for more in-depth analysis of your log file.
Quick summary - Root Cause Analysis
Combining all the data, the most likely cause of the position “shaking” in offboard mode is the optical flow sensor’s moderate and variable quality. Since GPS is not being fused (ratio 0.0), the estimator relies on optical flow for horizontal velocity and position derivation. With a quality mean of 113.7 (out of 255) and occasional drops to 75, plus small rejection rates (6.2% in X, 3.9% in Y), the optical flow data introduces noise or inconsistencies into the position estimate. This manifests as oscillations around the setpoint, as seen in the earlier position error analysis (std dev of 0.236 m in X and 0.210 m in Y).
The lidar and barometer are both fused for height, and the Z-axis error was minimal (std dev 0.068 m), which aligns with more stable altitude control. The negative signal quality from the lidar is concerning but doesn’t seem to impact horizontal position directly.
Thank you for analyzing the problem.
Let me check the drone sensor.