AC velocity controller working again

212 views
Skip to first unread message

Randy Mackay

unread,
Oct 13, 2014, 9:24:04 AM10/13/14
to drones-...@googlegroups.com

 

     For those interested in controlling ArduCopter from an external companion computer, the velocity controller is working again in master.  This is the controller that wasI used for the AVC red balloon finder and which will probably be used for precision landing.  Getting it working involved switching to use the MAV_CMD_NAV_GUIDED_ENABLE and SET_POSITION_TARGET_LOCAL_NED messages (see: https://pixhawk.ethz.ch/mavlink/#SET_POSITION_TARGET_LOCAL_NED).

 

     I’ve also updated the red-balloon-finder code to send the new message in case that’s useful as a reference:

            https://github.com/rmackay9/ardupilot-balloon-finder/commit/6917cd0d5ed95ad667858924a125c9b6e4872f11

 

     Of course, controlling ArduCopter via velocity requests is only for high speed CPU boards like the Pixhawk.

 

-Randy

Kristian Klausen

unread,
Oct 14, 2014, 1:38:27 AM10/14/14
to drones-...@googlegroups.com
Great news!
Is this intended to be used in guided or auto-mode?

I don't gave the code in front of me now, but I seem to remember seeing some references to velocity set point controllers in both modes.

Regards,
Kristian

Randy Mackay

unread,
Oct 14, 2014, 3:18:15 AM10/14/14
to drones-...@googlegroups.com
Kristian,

It can be used from either Guided mode or Auto mode.

If the vehicle is in Guided mode the companion computer (or GCS) can just start sending the velocity requests using the SET_POSITION_TARGET_LOCAL_NED mavlink command and the vehicle will respond.

In Auto mode the mission can/should have:
GUIDED_LIMITS command to set a timeout, min and max alt and maximum horizontal position move (optional)
GUIDED_ENABLE command to hand-over control to the companion computer
There's a request to mission planner to add these two new commands to the drop-down list in the Flight Planner screen. https://github.com/diydrones/MissionPlanner/issues/676

-Randy
--
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.

Kristian Klausen

unread,
Oct 14, 2014, 3:50:28 PM10/14/14
to drones-...@googlegroups.com
Hi,

Thank you for the explanation. I guess this is not making it to AC 3.2?

If so, do you have some tips on a convenient way to include these changes into my local builds? I am thinking git-wise, cherry-picking etc.

Regards,
Kristian

David Pawlak

unread,
Oct 14, 2014, 6:07:38 PM10/14/14
to drones-...@googlegroups.com
I think master will be the new 3.2, so it sounds like it's in.

Randy Mackay

unread,
Oct 14, 2014, 10:48:53 PM10/14/14
to drones-...@googlegroups.com

 

     This is only in master so it will go out with AC3.3.

 

     For AC3.2 we’re in the final stages of testing and so only really critical fixes are going into it.

-Randy

Al B

unread,
Feb 11, 2016, 1:42:59 AM2/11/16
to drones-discuss
Randy,

Will this still require GPS lock prior to takeoff?

> For those interested in controlling ArduCopter from an external companion computer, the velocity controller is working again...  Getting it working involved switching to use the MAV_CMD_NAV_GUIDED_ENABLE and SET_POSITION_TARGET_LOCAL_NED messages.

Randy Mackay

unread,
Feb 11, 2016, 2:43:20 AM2/11/16
to drones-...@googlegroups.com

Al,

 

     Yes, Guided mode (and the velocity controller in particular) still requires GPS or optical flow before arming.  It would be possible to allow Guided mode’s attitude controller (where the companion computer/GCS gives lean angle requests) to work without a GPS.  That would be a little bit of work to create a new GUIDED_NOGPS flight mode.

 

-Randy

--

Al B

unread,
Feb 11, 2016, 2:53:12 AM2/11/16
to drones-discuss
Randy,

How about if I use a LightWare Lidar or TeraRanger One instead of an Optical Flow?  Will those sensors allow me to arm in Guided mode too?

Randy Mackay

unread,
Feb 11, 2016, 3:22:20 AM2/11/16
to drones-...@googlegroups.com

Al,

 

     No, I’m afraid those range finders can’t be used with the EKF to cancel out the drift caused by the accels.  It’s theoretically possible that they could be used if pointed out horizontally and if we assumed that there was always some obstruction within the range of the sensors and that nothing moved within the environment.  Those are really big assumptions that don’t apply in a normal environment so it’s probably not a good approach I’d say.

 

-Randy

 

From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Al B
Sent: 11-Feb-16 4:53 PM
To: drones-discuss
Subject: Re: [Bulk] Re: [Bulk] [drones-discuss] AC velocity controller working again

 

Randy,

 

How about if I use a LightWare Lidar or TeraRanger One instead of an Optical Flow?  Will those sensors allow me to arm in Guided mode too?

--

Reply all
Reply to author
Forward
0 new messages