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 torque due to force offset #538

Merged

Conversation

pac48
Copy link
Contributor

@pac48 pac48 commented Jul 12, 2022

Currently, the doTransform function in tf2_geometry_msgs.hpp transforms wrenches by applying pure rotation to the force and torque parts separately. However, this does not correspond to transforming a force vector because the transnational component is ignored. So perhaps the function can be renamed doRotation or something to that effect. See https://core.ac.uk/download/pdf/154240607.pdf for a reference on transforming force vectors. I made the needed change so doTransform now applies a transformation to the given wrench according the method described in the reference I linked.

Copy link
Contributor

@destogl destogl 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 correcting this!

@clalancette
Copy link
Contributor

CI is happy because of style here:

Code style divergence in file 'include/tf2_geometry_msgs/tf2_geometry_msgs.hpp':

--- include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
+++ include/tf2_geometry_msgs/tf2_geometry_msgs.hpp.uncrustify
@@ -1189 +1189 @@
-                    transform.transform.translation.z};
+    transform.transform.translation.z};

Once that is fixed, we can consider this for inclusion.

@pac48 pac48 force-pushed the pr-fix-wrench-transformation-calculation branch from 040a014 to fa63117 Compare July 28, 2022 13:48
@pac48
Copy link
Contributor Author

pac48 commented Jul 28, 2022

Thanks for pointing that out. I made the change and it looks like CI is happy now.

@clalancette clalancette self-assigned this Aug 18, 2022
@clalancette clalancette force-pushed the pr-fix-wrench-transformation-calculation branch from fa63117 to 17ee412 Compare November 4, 2022 14:16
@clalancette
Copy link
Contributor

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette clalancette merged commit 49d4be4 into ros2:rolling Nov 4, 2022
@pac48 pac48 deleted the pr-fix-wrench-transformation-calculation branch November 9, 2022 22:14
v4hn added a commit to v4hn/geometry2 that referenced this pull request Sep 5, 2023
@swiz23
Copy link

swiz23 commented Oct 11, 2023

I saw this change wasn't yet backported to the humble branch. Is that something that's in the pipeline?

@clalancette
Copy link
Contributor

I saw this change wasn't yet backported to the humble branch. Is that something that's in the pipeline?

I can go ahead and do that.

@clalancette
Copy link
Contributor

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Oct 16, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 16, 2023
* add torque due to force offset

(cherry picked from commit 49d4be4)
ahcorde pushed a commit that referenced this pull request Oct 16, 2023
* add torque due to force offset

(cherry picked from commit 49d4be4)

Co-authored-by: Paul Gesel <paulgesel@gmail.com>
tfoote pushed a commit to ros/geometry2 that referenced this pull request Jan 4, 2024
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.

None yet

4 participants