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

add new rotation #14512

Merged
merged 2 commits into from
Apr 22, 2020
Merged

add new rotation #14512

merged 2 commits into from
Apr 22, 2020

Conversation

jinchengde
Copy link
Contributor

@jinchengde jinchengde commented Mar 28, 2020

I haven't find any rotation for ROLL_270_YAW_180, add it

fix compile error

fix rotation

modify roatation
@dagar
Copy link
Member

dagar commented Mar 28, 2020

I'm wondering if there's value in trying to keep in sync with mavlink? https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION

@jlecoeur
Copy link
Contributor

@dagar yes, be careful that the current implementation assumes that enum values are consecutive, without gap. I was tricked last time I added a rotation following MAVLink's enum, which was not equal to last enum value +1. I finally added the rotation at the end of the PX4 enum by pure lazyness.

@jinchengde
Copy link
Contributor Author

and the rotation enum is so disarray, do you wish to arrange?

@julianoes
Copy link
Contributor

@jinchengde I think we need this one: mavlink/mavlink#1348

@julianoes
Copy link
Contributor

@jinchengde could you update this based on mavlink/mavlink#1348 ?

@jinchengde
Copy link
Contributor Author

@julianoes do you mean modify the enum to 41?

@julianoes
Copy link
Contributor

Yes, thanks @jinchengde. And it would be nice to also update the mavlink (c_library_v2) submodule to latest master.

@julianoes
Copy link
Contributor

Nevermind, this is already done in #14725.

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct.

@julianoes julianoes merged commit e82880d into PX4:master Apr 22, 2020
@dagar
Copy link
Member

dagar commented Apr 23, 2020

The table (rot_lookup[]) needs to align with the enum. Let's quickly add the missing rotations from mavlink.

Screenshot from 2020-04-23 10-50-58

I'm also starting to think we'd be better abstracting the mavlink constants entirely from PX4, but that's a messy change.

bkueng pushed a commit that referenced this pull request May 19, 2020
* add new rotation  ROLL_270_YAW_180

fix compile error

fix rotation

modify roatation

* modify enum to 41
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.

4 participants