Ardupilot: Copter: Guided mode angle controller using SET_ATTITUDE_TARGET

Created on 1 Sep 2015  Â·  13Comments  Â·  Source: ArduPilot/ardupilot

We should extend Copter's guided mode to allow the GCS/companion computer to control the vehicle using angle targets. Using the SET_ATTITUDE_TARGET message would probably be best.
http://mavlink.org/messages/common#SET_ATTITUDE_TARGET

Note that Guided mode currently requires a GPS to function so we might need to relax that if this new angular-controller is used or more likely implement a Guided-NoGPS flight mode which only supports this angular target but doesn't require GPS to operate.

Copter Enhancement

Most helpful comment

+1 for Guided-NoGPS flight mode

All 13 comments

+1 for Guided-NoGPS flight mode

This is in master except the Guided-NoGPS isn't there yet.

I'm interested in this functionality. I'm working on an indoor drone navigation application, and it's frustrating that all of the movement commands seem to rely on the vehicle being in GUIDED or AUTO mode (both requiring GPS), even if GPS is not required for that particular movement command.

Are you using optical flow or a vision based tracking system for stability?
On Apr 6, 2016 2:47 PM, "amybear" [email protected] wrote:

I'm interested in this functionality. I'm working on an indoor drone
navigation application, and it's frustrating that all of the movement
commands seem to rely on the vehicle being in GUIDED or AUTO mode (both
requiring GPS), even if GPS is not required for that particular movement
command.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/ArduPilot/ardupilot/issues/2790#issuecomment-206585447

Vision-based, specifically a Google Tango.

@amybear,
if you're up for modifying and compiling the ardupilot code you could try modifying the mode-requires-gps so that Guided doesn't require the GPS. a more complete solution is for us to add a new Guided-noGPS flight mode that is a cut-down version of Guided mode and only accepts the attitude request. So much to do, so little time.
https://github.com/ArduPilot/ardupilot/blob/master/ArduCopter/flight_mode.cpp#L276

@rmackay9 would guided-nogps support LOCAL_POSITION_NED messages also? Unlike attitude messages, it will require optical flow. But I don't think those need gps.

@squilter, if you've got an optical flow, then the regular Guided mode can be used. So, no, I don't think LOCATION_POSITION_NED would be supported.

Yes let's have the GUIDED-NoGPS mode. It makes complete sense with so many people working on indoor drone navigation.
At this point in time, to have such a functionality, is the best bet going to be to modify the ArduCopter base code as mentioned above in one of the comments?

@rmackay9 is there a specific reason to use SET_ATTITUDE_TARGET to set an angle instead of setting acceleration in one of the
SET_POSITION_TARGET commands? Could APM support an acceleration command?

@allanm84, we don't currently accept the acceleration command although a person or two has asked for it. It could be added, it's just a day or two of work for someone (including testing).
Both acceleration and angle requests should be accepted because they're, of course, not exactly the same. In particular the acceleration request would be handled as "stabilized" acceleration request meaning that the controllers would ensure that the desired acceleration is achieved... that require require the GPS be functional while the simpler angle requests wouldn't require the GPS to work.

@rmackay9 thanks for the explanation. RE GUIDED-NOGPS, could instead of adding a new mode we just allow GUIDED to operate with no GPS, but restrict which commands would be accepted? For instance, when there is no GPS: reject SET_POSITION_TARGET commands but accept SET_ATTITUDE_TARGET. Or, alternatively, another mode (AltHold?) is modified to accept SET_ATTITUDE_TARGET commands?

Guided_NoGPS is in master and is also being released as I write this as part of Copter-3.4-rc2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

machenxiang picture machenxiang  Â·  8Comments

Saijin-Naib picture Saijin-Naib  Â·  4Comments

dongtuu picture dongtuu  Â·  3Comments

peterbarker picture peterbarker  Â·  7Comments

davidbitton picture davidbitton  Â·  3Comments