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

Inconsistency in functions documentation (Matrix3x3.h) #696

Open
damien-robotsix opened this issue Jun 11, 2024 · 2 comments
Open

Inconsistency in functions documentation (Matrix3x3.h) #696

damien-robotsix opened this issue Jun 11, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@damien-robotsix
Copy link

Hi! If we look in the documentation of the functions in Matrix3x3.h there is a inconsistency as the setEulerYPR function says

/** @brief Set the matrix from euler angles YPR around ZYX axes
* @param eulerZ Yaw aboud Z axis
* @param eulerY Pitch around Y axis
* @param eulerX Roll about X axis
*
* These angles are used to produce a rotation matrix. The euler
* angles are applied in ZYX order. I.e a vector is first rotated
* about X then Y and then Z
**/

The euler angles are applied in ZYX order. I.e a vector is first rotated about X then Y and then Z is quite incoherent.

Also the getEulerRPY functions says

/**@brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
* @param yaw Yaw around Z axis
* @param pitch Pitch around Y axis
* @param roll around X axis */

Get the matrix represented as euler angles around YXZ is different than what is said in the setter (also what the name of the function suggests).

I guess (but I am not sure) that EulerYPR is rotation about ZYX fixed axes. (While RPY is rotation about XYZ fixed axis as described in the documentation).

If it is the case, then documentation of the getEulerRPY and setEulerRPY should probably be corrected.

@wjwwood
Copy link
Member

wjwwood commented Jun 20, 2024

We discussed this in the issue triage meeting and no one there felt comfortable investigating this issue right now, so we will put the help wanted label on this and invite anyone to investigate it and come up with how the think it should be done (if the current way isn't correct) and propose changes in a pull request.

@tfoote FYI also, in case you have any ideas or opinions.

@wjwwood wjwwood added the help wanted Extra attention is needed label Jun 20, 2024
@tfoote
Copy link
Contributor

tfoote commented Jun 21, 2024

There definitely looks to be consistency. This is a copy of the upstream Bullet physics lineary math codebase. We've diverged in the past from that and it as a real pain to maintain it in parallel. We don't want to diverge in behaviors. Cleaning up the inconsistent docs is fine. But in general I'd like to encourage people to use an external linear math library. My hope had been that this would not have transitioned into ROS 2 but was needed for internal purposes and c++ doesn't have convenient isolation methods and thus gets exposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants