Use Loiter functionality in Guided mode

Hi,
Can the following code from Loiter mode can be also used in Guided Mode?

  1. Braking the copter when rc sticks are at zero
    AC_Loiter :: calc_desired_velocity ())

    if (_desired_accel.is_zero()) …

  2. Hover the copter above an exact point (ModeLoiter :: precision_loiter_xy ())

These are great functionality and it would be nice to combine them also in the guided mode (for example when sending a vel_command (0,0,0))

Thanks

1 Like

I’m looking for the same new flight mode, a guided mode on top of the new Loiter mode, so that all the new sophisticated way of holding the position and brake funtionality could be used not with rc command but with set SET_POSITION_TARGET_LOCAL_NED or SET_POSITION_TARGET_GLOBAL_INT for example.
How could this be accomplished?

Thanks!

I’m going to copy the relevant code from the Loiter mode into the Guided mode.
In case of Vel command (0,0,0) or Pos Command (0,0,0) - the brake code and the precision loiter code will be activated
I believe these changes would improve the guided mode

Hi JustFineD,
good news you are trying to do this, I would like to test it when it will be ready, may I ask you to share your modifications and test it together?

Thanks

sure, no problem
I believe that next week the work will be ready for testing

Thanks! we are ready for the indoor testing and this new flight mode could be reallt interesting to try

Hi JustFineD,
have you done some testing on this new flight mode?
Just wondering if you could update on this :slight_smile:

Thanks

Hi @Giorgio_Rinolfi,
There are some problems with copter 3.6 (RTK GPS, lidar, marvelmind)
I switch back to copter 3.5.5 without the loiter improvment

Hello everyone, I am trying to use loiter plus guided mode. But it gives me consecutive errors , can some one help me to sort it out?