Servers by jDrones

Use Loiter functionality in Guided mode


(Fine D) #1

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


(Giorgio Rinolfi) #2

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!


(Fine D) #3

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


(Giorgio Rinolfi) #4

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


(Fine D) #5

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


(Giorgio Rinolfi) #6

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


(Giorgio Rinolfi) #7

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

Thanks


(Fine D) #8

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