Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launch: enable setpoint plugins for APM #224

Merged
merged 1 commit into from
Mar 10, 2015
Merged

launch: enable setpoint plugins for APM #224

merged 1 commit into from
Mar 10, 2015

Conversation

claymation
Copy link
Contributor

As of ArduCopter 3.2, APM supports position and velocity setpoints via SET_POSITION_TARGET_LOCAL_NED.

As of ArduCopter 3.2, APM supports position and velocity setpoints via SET_POSITION_TARGET_LOCAL_NED.
@mhkabir
Copy link
Member

mhkabir commented Feb 26, 2015

How do they handle the local frame? As far as I knew , all the controllers
worked in global...?

Do they reproject from a local to global using a reference? Or do it all in
local and reproject the global into local frame? (Like PX4?)
On 26 Feb 2015 09:26, "Clay McClure" notifications@github.com wrote:

As of ArduCopter 3.2, APM supports position and velocity setpoints via

SET_POSITION_TARGET_LOCAL_NED.

You can view, comment on, or merge this pull request online at:

#224
Commit Summary

  • launch: enable setpoint plugins for APM

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#224.

@vooon
Copy link
Member

vooon commented Feb 26, 2015

goodnewseveryone

But i need to check how do they do it :).

@claymation
Copy link
Contributor Author

It looks to me like APM computes in local coordinates and converts global lat/long to local coordinates when necessary. Compare the handling of SET_POSITION_TARGET_LOCAL_NED to that of SET_POSITION_TARGET_GLOBAL_INT below:

https://github.com/diydrones/ardupilot/blob/master/ArduCopter/GCS_Mavlink.pde#L1307

That call to pv_location_to_vector() for the global target does the conversion:

https://github.com/diydrones/ardupilot/blob/77d8f88e45331ce2a54195c14b0ea1f76a624e36/ArduCopter/position_vector.pde#L11

Also note that z in inverted, suggesting a NEU frame is used internally:

https://github.com/diydrones/ardupilot/blob/master/ArduCopter/GCS_Mavlink.pde#L1330

But internals aside, it does work—I've tested in the SITL and found the following to be true:

+vx moves east
-vx moves west
+vy moves north
-vy moves south
+vz moves up
-vz moves down

@vooon vooon mentioned this pull request Mar 9, 2015
@vooon
Copy link
Member

vooon commented Mar 10, 2015

Not checked axes (if they not NED -- that apm bug!) only handler, now they support position, velocity, acceleration setpoints. APM chould be in GUIDED mode.

vooon added a commit that referenced this pull request Mar 10, 2015
launch: enable setpoint plugins for APM
@vooon vooon merged commit 0f823f0 into mavlink:master Mar 10, 2015
nmichael pushed a commit to rislab/mavros that referenced this pull request Mar 19, 2016
Updated doc comment for mavlink_parse_char()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants