-
Notifications
You must be signed in to change notification settings - Fork 20
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
Terrain Deformation Fixes #44
base: main
Are you sure you want to change the base?
Conversation
@@ -457,7 +466,7 @@ def get_net_contact_forces(self) -> np.ndarray: | |||
n_links = len(self.target_links) | |||
contact_forces = np.zeros((n_links, 3)) | |||
for i, prim_view in enumerate(self.prim_views): | |||
contact_force = prim_view.get_net_contact_forces().squeeze() | |||
contact_force = prim_view.get_net_contact_forces(dt = 1/60).squeeze() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anychances we could get the dt parameter from the config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or from physx)
quaternion = [orientation[1], orientation[2], orientation[3], orientation[0]] | ||
rotation = R.from_quat(quaternion) | ||
pitch_angle = 2 * np.arctan2(rotation.as_quat()[1], rotation.as_quat()[3]) | ||
pitch_correction_quat = [0, -np.sin(pitch_angle / 2), 0, np.cos(pitch_angle / 2)] | ||
inverse_pitch_rotation = R.from_quat(pitch_correction_quat) | ||
rotation_corrected = rotation * inverse_pitch_rotation | ||
quaternion_corrected = rotation_corrected.as_quat() | ||
orientation_corrected = [quaternion_corrected[3], quaternion_corrected[0], quaternion_corrected[1], quaternion_corrected[2]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you removing the pitch from the quaternion here?
The new traces looks amazing! Thanks a lot for making these mods! |
Fixed issues related to contact forces, wheeltrace amplitude, and wheeltrace orientation.
Contact Forces:
Added the dt parameter; without this parameter, the values were being treated as contact impulses instead of contact forces https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.core/docs/index.html#rigid-prim:~:text=999.99994%20999.99994%20999.99994%5D-,get_net_contact_forces,-(indices%3A
Wheeltrace Amplitude:
Corrected a discrepancy in the calculation method between the simulation and the published paper
Wheeltrace Orientation:
The wheeltrace orientation was not correctly aligned to the actual wheel orientation while turning
I’ll send you more details via Slack.