-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixes inconsistent data reading in body, link, com for RigidObject, RigidObjectCollection and Articulation #2736
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
Fixes inconsistent data reading in body, link, com for RigidObject, RigidObjectCollection and Articulation #2736
Conversation
… pos, quat, pose, state when write operation get performed
79589b7
to
2b78dd5
Compare
@Mayankm96 @ozhanozen could you please help review this one to make sure it resolves the reported issues? |
Hi @kellyguo11, I’d be happy to help. Quick thought: for pure-derived properties like |
Hi @ozhanozen @kellyguo11, feel free to add more input on this matter. |
I agree it'd be less error-prone to remove the lazy updates if there are no perf hits, though it would be good to profile the operations to make sure there is indeed no impact on the performance before we make that change. Some of the torch operations could still be costly if called many times within a step. |
Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
@kellyguo11 did we get a feel for the speed performance from this? |
IIRC the initial change for optimizing the APIs showed slight performance improvement, but not too significant. @ooctipus did you get to do some performance analysis with the latest changes here? |
Ok that works. I know these buffers have been monkeyed around with a lot in the last year. I think consistent beets performance |
I didn't do any formal analysis with code. But I think it is pretty easy to reason it, we basically have 3 ways to do about it: 1: get from physics: 2: invalidate time step 3: direct update to all buffers (current) I think all ways makes sense, and the performance gain is probably very minimum, if that is true, then I think style match can be important factor. |
Description
When WriteState, WriteLink, WriteCOM, WriteJoint are invoked, there is a inconsistency when reading values of ReadState, ReadLink, ReadCOM. The Source of the bug is because of missing timestamp invalidation of relative data or missing update to the related data within the write function. Below I list the all functions that is problematics
RigitObject:
write_root_link_pose_to_sim
write_root_com_velocity_to_sim
RigitObjectCollection:
write_object_link_pose_to_sim
write_object_com_velocity_to_sim
Articulation:
write_joint_state_to_sim
The bug if fixed by invalidating the relevant data timestamps in write_joint_state_to_sim function for articulation, and added direct update to the dependent data in write_(state|link|com)_to_sim of RigitObject and RigitObjectCollection.
I have added the tests cases that checks the consistency among ReadState, ReadLink, ReadCOM when either WriteState, WriteLink, WriteCOM, WriteJoint is called and passed all tests.
Fixes #2534 #2702
Type of change
Bug fix (non-breaking change which fixes an issue)
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there