Skip to content

Clarify quaternion ordering#6688

Open
pragad3sh wants to merge 2 commits into
ros2:rollingfrom
pragad3sh:clarify-quaternion-ordering
Open

Clarify quaternion ordering#6688
pragad3sh wants to merge 2 commits into
ros2:rollingfrom
pragad3sh:clarify-quaternion-ordering

Conversation

@pragad3sh
Copy link
Copy Markdown
Contributor

@pragad3sh pragad3sh commented May 12, 2026

Adds a clarification comment to the quaternion_multiply example in the Quaternion Fundamentals tutorial.

The helper function returns the quaternion in (w, x, y, z) order, while ROS 2 commonly represents quaternions as (x, y, z, w). This comment helps make the ordering difference clearer for readers following the tutorial.

Fixes ros2/lyrical_tutorial_party#2970 , ros2/lyrical_tutorial_party#2971 , ros2/lyrical_tutorial_party#2972 , ros2/lyrical_tutorial_party#2973

Did you use Generative AI?

No

This change only improves documentation clarity and does not modify the implementation logic.

@pragad3sh pragad3sh force-pushed the clarify-quaternion-ordering branch from 7282fe3 to 8ce5ff0 Compare May 12, 2026 05:13
@pragad3sh pragad3sh force-pushed the clarify-quaternion-ordering branch from 8ce5ff0 to 9c2c156 Compare May 12, 2026 05:17
@pragad3sh
Copy link
Copy Markdown
Contributor Author

@kscottz just added the clarification comments in the code block regarding the quaternion. Kindly check. Also, I am new to git, so I really don't know if I'm doing this right. Lmk if I did something wrong. Thank you.

@tfoote tfoote added the backport-all backport at reviewers discretion; from rolling to all versions label May 12, 2026
Copy link
Copy Markdown
Contributor

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for this comment it's helpful to clarify this. One request to move it up into the return value documentation to make it easier for tools to pick up and make this comment visible for those introspecting the API.

# Create a 4 element array containing the final quaternion
final_quaternion = np.array([q0q1_w, q0q1_x, q0q1_y, q0q1_z])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you add this note in the return value docs above for better visibility to tools and users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-all backport at reviewers discretion; from rolling to all versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quaternion Fundamentals

2 participants