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

Update moveToPosition to use setpoint control message instead of velocity control message #3545

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

zimmy87
Copy link
Contributor

@zimmy87 zimmy87 commented Mar 30, 2021

Fixes: #1677

About

Override moveToPosition() implementation in MavLinkMultirotorApi.hpp to use MavLink setpoint control messages for movement instead of velocity control messages. In place of velocity control messages, the MPC_XY_CRUISE parameter is set to the inputted velocity for the duration of the moveToPosition() call and then reset to its original value at the end of the call.

How Has This Been Tested?

tested with hello_drone3.py script in description of #1677

Screenshots (if appropriate):

override moveToPosition() implementation to use MavLink setpoint and cruise velocity control messages for movement
@zimmy87 zimmy87 changed the title Update MavLinkMultirotorApi.hpp Update moveToPosition to use setpoint control message instead of velocity control message Mar 30, 2021
@jonyMarino
Copy link
Collaborator

Thanks, David! Let's see if someone wants to give it a try. @ahmed-elsaharti?

@ahmed-elsaharti
Copy link
Contributor

Testing ASAP and reporting back with results 👍

use MPC_XY_VEL_MAX parameter to control movement velocity instead of MPC_XY_CRUISE (MPC_XY_CRUISE controls velocity only during mission-based movement, not setpoint-based movement) and add logic for resetting MPC_VEL_MANUAL and MPC_XY_CRUISE parameters after setting MPC_XY_VEL_MAX (these parameters get capped if MPC_XY_VEL_MAX is set to a lower value than them)
@jonyMarino
Copy link
Collaborator

Thanks, David! You did an incredible job!

@jonyMarino jonyMarino merged commit ad05928 into microsoft:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behavior of MoveToPositionAsync #1643,how to solve it?
3 participants