Understanding guided mode behavior

I am attempting to use a subclass of guided mode, specifically Planck Track (now owned by aerovironment, code https://github.com/planckaero/ardupilot/tree/Copter-4.0.7-ACE-AVEM-v2.4.0. When looking at the log, mode 27 corresponds to planck track, not autortl (if you’re using plot.ardupilot.org). Planck Track amounts to guided mode where an on board computer gives position and velocity commands to the autopilot with the goal of moving the system to a landing target.

While I am not using a modern nor mainline branch of code, my questions are more related to guided mode in general. In the attached log, for timehack 13:04:00 to 13:04:40, my system was in planck track and approaching the landing target. It seems it was either given commands for position and velocity commands where the velocity would spike above WPNAV_SPEED. The craft seemed to respect the commands from what I can tell, but would exceed WPNAV_SPEED.

My questions are as follows.

  • Are the GUID messages in the bin the inputs to guided mode, or do they include upsampling? In other words, does guided mode generate waypoints that observe the WPNAV speed and accel limits if the input path limits exceed the onboard limits?
    • if they include upsampling, is there another message that records the input waypoints (or whatever the input path is called?)
  • In spite of a WPNAV speed limit of 1m/s, the craft did not attempt to limit its speed when given a velocity command that was over speed. What is supposed to happen with respect to the guided mode plan if the craft is given a speed command that exceeds its WPNAV speed?
  • What is the best method to replay a guided mode path and tune the position controller, if this is an appropriate method? I recognize that the SITL model won’t represent my craft very well, but it would be nice to practice tuning whatever settings govern guided mode behavior before going to fly
  • What settings govern guided mode path following behavior?

This drone was made before we knew about Methodic Configurator. It seems fine and stable in hover, but this is the first time we are flying around laterally in guided, so I wouldn’t be surprised if there is more tuning necessary. Unless I’m looking in the wrong place, there isn’t much guidance for what to set the parameters in 47_position_controller and 48_guided_operation that affect how the craft follows any given plan, as in our case WPNAV_SPEED doesn’t seem to be affected. At the moment, I am trying to figure out where in the system the “original” input path is being recorded or processed, and what the GUID messages in the onboard log represent.

@Leonardthall I watched your video and reviewed this discuss post, it seems like the video refers to ideas implemented after 4.0, as you also discuss in the post. It seems that my onboard computer is pushing commands at 50hz, but I don’t have any of them recorded for this bin. It’s wired directly to the flight controller, in future flights I’ll be routing them through mavlink-router so I can record them as well. Is there something obviously wrong with my current setup?

https://drive.google.com/file/d/1tL4z7zgi7LH-r12TyAPgY8cK_BCxPygp/view?usp=sharing

Thank you all for any help you can provide

Edit. The GUID units are centimeters

They are the individual messages.

If speeds are not specified in the guided message then Guided mode will limit the speed to that defined in WPNAV. If the velocities are defined then it will use those.

The aircraft will follow the commanded guided mode speed until it hits an angle limit or similar. I have been considering adding Guided mode speed limits for this reason.

The PSC parameters define the position and velocity control parameters. We normally don’t need to tune these parameters so there are no detailed instructions on how to do this. The same principles as the manual tuning instructions for roll and pitch apply. So you could follow that procedure.

Guided messages should be recorded in the GUID message.

The target path generated by the guided commands will be shown in the PSC message.

Sorry I am not sure how much help I have been.

1 Like

Yes thank you, this is very helpful!!

I’ve googled most of the day and I haven’t been able to find much infrastructure for replaying a bin to exercise guided mode. Can you recommend an approach?

Hi Joshua,

Have you gotten in touch with AeroVironment? I work there, and that public repo is not maintained. If you have any budget, it may be worth reaching out to license the feature.

Who would be the best person to contact?