Approaching a Waypoint

Hi guys,

I have a question about the trajectory of Copter v4.0.7 in Auto missions. I have two distinct behaviors. Attached is the mission file. The following is a video taken from the log of a real flight (log attached):

I have a mission that consists of:

  • go to waypoint A;
  • go to waypoint B;
  • arriving at B, descend a few meters to a waypoint C;
  • wait a few seconds;
  • go up to waypoint B again;
  • go to a waypoint D;
  • return to waypoint B;
  • arriving at B, descend a few meters to waypoint C;
  • wait a few seconds;
  • go up to waypoint B again;
  • repeat this n times;
  • RTL.

Below is a summary image:

When the Copter arrives at WP B from WP A or D, it starts to descend without necessarily reaching it. However, when the Copter goes up again, it passes through WP B before proceeding to WP A or D.

Why is the approach to B from points A or D different from when it leaves point C?

Any tips, @rmackay9?

Could it be something related to S-Curve @ L e o n a r d t hall?

I imagine putting a 1-second wait before leaving point B to point C could solve and avoid hitting a tree. Still, I wanted to understand what to expect in these approaches.

Thanks in advance!

mission.txt (1.0 KB)

Log file: https://drive.google.com/file/d/11Xzp6BZ_9sHj7d9FQJEtg3-QoliCpewI/view?usp=sharing

edit 1: remove Leonard mark

4.0.7 does not contain S-Curves. For S-Curves you need to use 4.1-beta1 or greater

1 Like

I couldn’t tell exactly if something is wrong with the mission, or what to do about it. I could easily be missing some issues here.

I suspect some of the problem is actually due to the tuning and setup of the quad.
For example yaw versus desired yaw, there’s deviations of up to 10 degrees.
Pitch and Roll, although actual vs desired is fairly close, it looks a bit noisy but mostly wobbly for no good reason. Plot the RCout’s too, you’ll see what I mean :frowning:
Set these:
PSC_ACCZ_I,0.6344
PSC_ACCZ_P,0.3172
Battery voltage goes down to very low. Is this Lipo or something else?
MOT_BAT_VOLT_MIN and MAX not set…
PIDs remind me of a F450 copy with the bendy arms.

I would use the Tuning Guide and spreadsheet, set up the Harmonic Notch Filter then run another Autotune. There’s no reason why this cant be flying better, and I think that would go a long way to meeting with the waypoints, or at very least make any issues more obvious and go easier on the battery.
You may not be able to increase INS_GYRO_FILTER to an optimal value until after the HNOTCH set up.
Let me know if you want help with the tuning aspect.

https://ardupilot.org/copter/docs/tuning-process-instructions.html

Thanks, xfacta! Indeed it is an old “450 like frame” with plane motors but still flies. I did notice that was wobbly. Actually flies well. I will re-do the tunning with your tips, thanks! I will post an update.

However, I do think that should be something else. It really looks like the quad “wants to do such movement.” The log video is pretty much the same as the real flight.

Arducopter has undocumented feature “fast waypoint” to pass waypoints without slowdown (no public information except https://ardupilot.org/copter/docs/auto-mode.html, last paragraph). You can make your test using sitl with different speed to clear how it works

This is the behaviour of fast waypoints. Fast waypoints will cut the corner in an attempt to maintain speed. If you put a 1 second delay at the waypoint it will spend 1 second inside the waypoint radius before continuing onto the next waypoint.

This is one of the problems that the new S-Curve navigation addresses.

The other problem is the way the corners on fast waypoints are impacted by the maximum velocity and acceleration of the aircraft.

I hope this clears it up for you.

1 Like

@Leonardthall Thank you! Indeed with another quad with 4.1.0 dev it worked very, VERY better with S-Curve. I will post some images with a same quad soon.

@speakerx Actually, I was using the usual Waypoint.

@xfacta After more tunning the yaw is better:

Before:

After:

Thank you very much!!! It is not perfect, but is much better.

If I can ask for more help, I have set up another quadcopter for the same mission, and it is shaking (or spasming) the yaw. The end of this log is a good example. Could you suggest something to me?

I see that I could work better on this VibX, VibeY and VibeZ, but I don’t think this vibration big enough for these “spasms” only in yaw.

https://drive.google.com/file/d/1NA4XyhqcjLCB8ofZ2zlSHkcceqg1ZKPk/view?usp=sharing

Vibrations are definitely and issue and there is significant clipping - meaning the IMU reaches its limits.

The Yaw and Desired Yaw is tracking very well, so it looks like your mission is commanding the yaw movements.
There doesn’t seem to be much interference to the Compass so that is a good thing, but you can always do the Compass/Motor calibration if you want to - read instructions carefully and be safe!
Can you just do a test flight around gently, smooth turns, without running any mission.

This is wrong
MOT_BAT_VOLT_MAX,168
MOT_BAT_VOLT_MIN,135
If you’ve got 4 cell Lipo then you should use these settings:
BATT_ARM_VOLT,14.70
BATT_CRT_VOLT,14.00
BATT_LOW_VOLT,14.40
MOT_BAT_VOLT_MAX,16.80
MOT_BAT_VOLT_MIN,13.20
In that log, with you existing battery settings the voltage starts to nose dive into that “never use this Lipo again” zone.
Otherwise plug your battery type and cells into the spreadsheet and use all it’s values provided.
If you find a situation like “but I cant arm when I use the spreadsheet values” or “it goes to failsafe too soon” then your voltage monitoring is not accurate or battery is dying. Don’t alter the tried-and-true values.

Thanks Shawn. The system is much better now.