-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Added moveByVelocityBodyFrame #3169
Conversation
added an API that works like movebyvelocity but in the vehicle's frame.
Great Ahmed! Thank you! Why are you not using the pitch and roll in the transformation? This is just for 2D? |
Hi @jonyMarino, You're right, This is to control the motion direction in the 2D plane of the vehicle similar to moveByVelocity where it's always in the horizontal direction. Example: if the drone was moving previously and the command is complete, it will still have a slight residual pitch angle while trying to stop (due to inertia), if that gets incorporated in the API, the resulting motion in the drone's X direction would not be truly horizontal if we consider pitch and roll: The way it is now (without pitch and yaw): Edit: another example would be the drone resisting wind (so the drone would be pitched forward while standing still) which if pitch and roll are considered would make this API impossible to use to make the drone move forward. |
Thanks, Ahmed, for your excellent explanations! I will learn a lot from you! But don't get tired of generating so many graphics. |
@jonyMarino Thank you for your kind words! I'm the one who's learning from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me other than my 2 comments.
Added a
moveByVelocityBodyFrameAsync
API that allows movement by velocity in the direction of the vehicle's X-Y frame based on the 2-D vector decomposition shown in #3138 where:Usage:
moveByVelocityBodyFrameAsync(vx, vy, vz, duration, drivetrain (optional), yaw_mode (optional), vehicle_name (optional))
Demo video:
https://drive.google.com/file/d/1G5ihjNSVyxDBw8GXOCeqlGpWFwCxeelZ/view?usp=sharing
Any testing and/or review of the method would be greatly appreciated.
Thanks again to @jonyMarino for suggesting this.