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

HOTFIX correct variables now used for euler-quaternion conversions #116

Merged

Conversation

AstroStucky
Copy link
Contributor

@AstroStucky AstroStucky commented May 26, 2023

Problem discovered in #115. No Jira Ticket available.

Summary of Changes

  • The wrong variables were being used to compute the orientation quaternion, this has been fixed.
  • Replaced setEuler with setRPY.
    • To explain why: The function setEuler was resulting in quaternions that did not agree with the ones computed from Euler angles given to the action client script for the same action. For example, I could pass to the action client script the exact same set of Euler angles used for the first ArmMoveCartesian in TestArmMoveCartesianGuarded.plx, which are (3.14, 0, 0), but the orientation that resulted from the action client script would be different from the orientation that resulted from the plexil action call. (3.14, 0, 0) should result in the scoop's bottom facing down, and its opening facing away from the lander (+x-direction), but when called by plexil it would result in bottom up and facing toward lander, so it was as if the roll and yaw were being swapped.
    • This looks to be a bug in tf2. setEuler bad parameter names ros/geometry2#190 Another development team worked around it by using setRPY instead.

Test

Make sure you run the following on this branch, and every other repo on the master branch

  1. Boot any world and run TestArmMoveCartesian.plx.
    The ArmMoveCartesian should result in the scoop's bottom pointing directly up, and its opening pointing away from the lander. The subsequent ArmMoveCartesian_Q should result in the scoop's bottom pointing directly down, and its opening pointing away from the lander.

  2. In the same world run TestArmMoveCartesianGuarded.plx.
    The scoop's bottom should first point down at the ground, then be moved down into the ground and report that the force threshold was breached. It will then raise up high, then back down but will not quite reached the ground resulting in the force threshold not being breached.

Copy link
Contributor

@kmdalal kmdalal left a comment

Choose a reason for hiding this comment

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

The variable error was a dumb mistake of mine, but good insight on the use of setRPY.

@AstroStucky AstroStucky merged commit 93c9224 into master May 30, 2023
@AstroStucky AstroStucky deleted the hotfix/euler_angles_not_used_by_armmovecartesian_actions branch May 30, 2023 17:18
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.

3 participants