RE: [drones-discuss] about "leash leanth" in arducopter source code

471 views
Skip to first unread message
Message has been deleted

Randy Mackay

unread,
Jun 26, 2015, 5:29:04 AM6/26/15
to drones-...@googlegroups.com

Jason,

 

     During navigation between waypoints the vehicle chases behind a target point.  The distance between the vehicle and that target is limited by this leash.  So we never let that target point get further from the vehicle than the leash length.

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Jason Lin
Sent: 26-Jun-15 5:56 PM
To: drones-...@googlegroups.com
Subject: [drones-discuss] about "leash leanth" in arducopter source code

 

Hi all,

 

I read source found this function

 

calc_leash_length_xy() in AC_PosControl.cpp

 

Can someone explain what is the meaning of leash length?

 

 

 

 

 

 

Best regard, Jason

 

 

 

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Lin

unread,
Jun 26, 2015, 11:26:02 AM6/26/15
to drones-...@googlegroups.com
Randy , Thank you .


Jason

Randy Mackay於 2015年6月26日星期五 UTC+8下午5時29分04秒寫道:

איתי גיא

unread,
Jun 30, 2015, 3:48:55 AM6/30/15
to drones-...@googlegroups.com
Hi Randy , 
I guess the leash for the z axis works the same.

but where does the actual target z of the current wp in being remembered , surly It cant be in  _pos_target.z since it is overrun .

   // do not let target altitude get too far from current altitude
    if (_pos_error.z > _leash_up_z) {
        _pos_target.z = curr_alt + _leash_up_z;
        _pos_error.z = _leash_up_z;
        _limit.pos_up = true;
    }
    if (_pos_error.z < -_leash_down_z) {
        _pos_target.z = curr_alt - _leash_down_z;
        _pos_error.z = -_leash_down_z;
        _limit.pos_down = true;

Randy Mackay

unread,
Jun 30, 2015, 7:10:42 AM6/30/15
to drones-...@googlegroups.com

 

     Right, the pos-target.z is only used by the position controller.  The higher level waypoint target is held in the AC_WPNav library.

 

-Randy

איתי גיא

unread,
Jun 30, 2015, 7:43:43 AM6/30/15
to drones-...@googlegroups.com
Randy , I am quit sure something is wrong here.
Since you only update pos_target.z when you start auto mode, 
but you don't do it continuously in auto_wp_run()

then  pos_target.z can get overrun during auto_wp_run()

Itay

איתי גיא

unread,
Jun 30, 2015, 8:14:45 AM6/30/15
to drones-...@googlegroups.com
or do you do it inside 
advance_wp_target_along_track(dt)
in
// recalculate the desired position
    _pos_control.set_pos_target(_origin + _pos_delta_unit * _track_desired);

Randy Mackay

unread,
Jun 30, 2015, 7:48:42 PM6/30/15
to drones-...@googlegroups.com

 

      Yes, that’s it.   Well done finding it!

איתי גיא

unread,
Jul 1, 2015, 9:08:48 AM7/1/15
to drones-...@googlegroups.com
I think this problem is also leash related
the quadro got a command for  waypoint at different alt. but when it reached it . it started climbing up.  until I got control back with LOITER.

4.BIN

Robert Lefebvre

unread,
Jul 1, 2015, 9:27:35 AM7/1/15
to drones-discuss
Maybe you're on to something.  Last week I tried flying a helicopter in Alt Hold, and it kept on falling at very high rate every time I engaged Alt Hold.  I had to keep going back to Stabilize immediately.  The data logs were showing a large negative desired climb rate, even through the throttle was up.  I haven't found the problem yet, but something seems to be wrong.

Randy Mackay

unread,
Jul 1, 2015, 9:46:46 AM7/1/15
to drones-...@googlegroups.com

Itay,

 

      No, I think you vehicle’s issue is probably caused by vibration upsetting inertial nav or the EKF.  It looks a bit high (see IMU message).

 

     It looks like you’re running a non-standard version of the firmware – it’s not master, not AC3.3-rc7 and it has some parameters that I don’t recognise.  If you upgrade to the equivalent of AC3.3-rc7 and then look at the VIBE dataflash message I think you may see some clipping is happening.

איתי גיא

unread,
Jul 1, 2015, 1:52:36 PM7/1/15
to drones-...@googlegroups.com
I don't think it is the reason , since the  _pos_target.z (dAlt) which is on the graph , is climbing, although the cmd.alt , is fixed! and it is on AUTO mode.
if it was drift problem , it would keep drifting in LOITER, but it didn't.
you can also look at the graph , that it climbs nicely to the commanded alt , but when it reaches it  something gets wrong.

Randy Mackay

unread,
Jul 1, 2015, 8:52:22 PM7/1/15
to drones-...@googlegroups.com

 

     No, I don’t think so.  it’s demonstrating the classic sign of high vibration which is inconsistent alt and climb rate – i.e. an increasing altitude but negative climb rate.

 

-Randy

AltVsClimbRate.png

איתי גיא

unread,
Jul 2, 2015, 2:34:14 AM7/2/15
to drones-...@googlegroups.com
How can you see the negative climb rate, tried looking for it in the log but couldn't find it.

Randy Mackay

unread,
Jul 2, 2015, 3:09:18 AM7/2/15
to drones-...@googlegroups.com

Itay,

 

     It was included in my previous reply.  The DF’s CTUN message has a “CRt” field which is the climb rate.  I’d strongly recommend upgrading to –rc7 which has a VIBE message that shows vibration levels directly and clipping.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of ???? ???
Sent: 2-Jul-15 3:34 PM
To: drones-...@googlegroups.com
Subject: Re: [drones-discuss] about "leash leanth" in arducopter source code

 

How can you see the negative climb rate, tried looking for it in the log but couldn't find it.



On Thursday, July 2, 2015 at 3:52:22 AM UTC+3, Randy Mackay wrote:

 

     No, I don’t think so.  it’s demonstrating the classic sign of high vibration which is inconsistent alt and climb rate – i.e. an increasing altitude but negative climb rate.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Robert Lefebvre
Sent: 1-Jul-15 10:27 PM
To: drones-discuss
Subject: Re: [drones-discuss] about "leash leanth" in arducopter source code

 

Maybe you're on to something.  Last week I tried flying a helicopter in Alt Hold, and it kept on falling at very high rate every time I engaged Alt Hold.  I had to keep going back to Stabilize immediately.  The data logs were showing a large negative desired climb rate, even through the throttle was up.  I haven't found the problem yet, but something seems to be wrong.

On 1 July 2015 at 09:08, איתי גיא <ita...@gmail.com> wrote:

I think this problem is also leash related

the quadro got a command for  waypoint at different alt. but when it reached it . it started climbing up.  until I got control back with LOITER.

Casper Thule

unread,
Aug 10, 2016, 9:09:16 AM8/10/16
to drones-discuss
Hi Randy,

What is the reason for having a leash and a target point between waypoint navigation? Why does the drone not just fly to the waypoint?

Cheers,
Casper
Reply all
Reply to author
Forward
0 new messages