Computes Jacobian in the root frame inside the `DifferentialInverseKinematicsAction` class
Description
This pull request fix the bug where jacobian returned by DifferentialInverseKinematicsAction._compute_fame_jacobian are not truly in robot base frame because it did not consider robot's base rotation. After the change, _compute_fame_jacobian returns the correct local frame jacobian. In addition, properties get_jacobian_w and get_jacobian_b is added to differentiate frame differences
Fixes #911
Type of change
- Bug fix (non-breaking change which fixes an issue)
Screenshots
Checklist
- [x] I have run the
pre-commitchecks with./isaaclab.sh --format - [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] I have updated the changelog and the corresponding version in the extension's
config/extension.tomlfile - [x] I have added my name to the
CONTRIBUTORS.mdor my name already exists there
@Mayankm96 Thanks for Reviewing, and sorry for the delay, my last week schedule was overwhelming.
I have added tests for checking the implement, all tests are passing! however, there are some concerns that worries me:
-
the test is only for class:DifferentialIKController but not for class:DifferentialInverseKinematicsAction. DifferentialIKController doesn't calculates Jacobian but depends on Jacobian calculated by either physx or DifferentialInverseKinematicsAction. This bug fix in DifferentialInverseKinematicsAction, namely base frame's jacobian transformation formula, is not referenced by the test suite because test suite didn't use DifferentialInverseKinematicsAction. Instead this formula is re-implemented to make sure the base-frame-transformation is applied before given to DifferentialIKController. This worries me because there are two implementations of same formulat, one in unittest and the other one in DifferentialInverseKinematicsAction, and if at some day one formula changes, the other will not be sync and causing invalid test case or bugs. Perhaps there needs to be a test suite that specifically test for DifferentialInverseKinematicsAction?
-
There are two unit tests for DifferentialIKController in https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab/test/controllers/test_differential_ik.py , one for franka, and the other for UR10. UR 10 test is failing because UR10 is not able to be imported properly. Specifically,
# spawn single instance
prim = func(prim_paths[0], cfg, *args, **kwargs)
Will not populates UR10's links and joints into stage. Only an empty /World/envs/env_0/Robot will be created
Upon further investigation, it seems like this is an issue when ISAACLAB_NUCLEUS_DIR points to 4.2. Changing 4.2 to 4.1 resolves import issue.
Buggy usd path: 'http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2/Isaac/IsaacLab/Robots/UniversalRobots/UR10/ur10_instanceable.usd'
OK usd path: 'http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.1/Isaac/IsaacLab/Robots/UniversalRobots/UR10/ur10_instanceable.usd'
with OK usd path, both tests can pass
Thanks for the fix!
I just rebased the branch to track the newest Isaac Iab and fixed the versioning, Please have a view and let me know what else I can fix! @lorenwel @Mayankm96 @jtigue-bdai Thanks for your guys help!
I have updated versioning in CHANGE LOG and extension.toml, please take a look when you have time! Thanks! @jsmith-bdai @Mayankm96