-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Handle velocity frames correctly for rover offboard velocity control #13363
Conversation
@Jaeyoung-Lim it would be great if we could start adding simple CI testing that goes along with the various levels of OFFBOARD we want to support on different vehicle types. Otherwise they tend to to quietly break over time and slip through a release cycle. FYI @Pedro-Roque Simple tests here: https://github.com/PX4/Firmware/tree/master/integrationtests/python_src/px4_it/mavros Running on Jenkins SITL Tests here: http://ci.px4.io:8080/blue/organizations/jenkins/PX4_misc%2FFirmware-SITL_tests/detail/PR-13363/2/pipeline/54 |
@dagar That makes a lot of sense. I think that is what happened before with fw offboard mode. I will have a look. |
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.
Nice!
One small input / question though.
|
@junwoo091400 I am aware of that part of the code, and I was thinking of fixing it for sometime. The FlightTask Offboard conversion is not correct, since it is assuming the body xy plane matches the local xy plane. I believe this was never surfaced since in multirotors having velocity reference in the bodyframe doesn't make much sense. But nevertheless, we should fix it. Would be awesome if you can make a PR for it! |
@Jaeyoung-Lim Created #13373! |
Thanks @dagar , I'll check on this and will also talk with @Jaeyoung-Lim to see which tests to create. |
Describe problem solved by this pull request
While support for offboard velocity setpoints were added in #13225, the velocity frames were not considered properly.
Describe your solution
For multirotors, this is handled by the Offboard flight task but for rover since flight task is not running the conversion needs to happen in the rover position control module.
Test data / coverage
The following logs show the same velocity setpoint v = [1.0, 1.0, 0.0] streamed to the vehicle with the following frame IDs:
VELOCITY_FRAME_LOCAL_NED = 1
: LogVELOCITY_FRAME_BODY_NED = 8
: LogAs expected the local frame velocity leads to a straight line trajectory, while a body frame velocity leads to a circular trajectory of the vehicle.
Additional context
This was a bug reported by @jbeyerstedt