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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reducing a model considering non-zero positions of removed joints #137

Merged
merged 17 commits into from
May 2, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Apr 12, 2024

  • Extend jaxsim.api.model.reduce with a new joint_position_locked dictionary that specifies the angles of the removed joints. Note that, if passed, it ignores the angles of the kept joints.
  • Extended the simple FK operating on a low-level KinematicGraph to support joint angles (it calls the jax function to compute joint transforms).
  • Moved the FK operating on a low-level KinematicGraph to a standalone class.
  • Removed support for single-axis joint types, now all joints are either fixed, revolute, or prismatic. Since jaxsim.math.joint_model.supported_joint_motion cannot be jit-compiled dynamically over the joint type, it should slightly speed up compilation of RBDAs.
  • Now KinematicGraph fully implements the Sequence protocol.
  • Update the iDynTree version since the updated test requires Expose std::unordered_map<std::string, double> to SWIG bindings聽robotology/idyntree#1180.

馃摎 Documentation preview 馃摎: https://jaxsim--137.org.readthedocs.build//137/

@diegoferigo diegoferigo self-assigned this Apr 12, 2024
@diegoferigo diegoferigo force-pushed the model_reduce_improvements branch 3 times, most recently from 4fc5fa3 to 3873b46 Compare April 15, 2024 11:00
@diegoferigo
Copy link
Member Author

Tests are temporarily failing since they need a released version of iDynTree that includes robotology/idyntree#1180.

@diegoferigo diegoferigo marked this pull request as ready for review May 2, 2024 07:14
@diegoferigo
Copy link
Member Author

diegoferigo commented May 2, 2024

This PR can be useful to both @flferretti and @YuchuanLu to compute the frame-to-parent-link transform ${}^L \mathbf{H}_F$. As far as I know, they both need to compute the Jacobian of frames rigidly attached to feets (JaxSim provides Jacobians only for link frames). Refer to #139 (comment) for an example.

In the future, we might consider to add a new jaxsim.api.frame module with frame-related logic.

Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

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

Thanks Diego, LGTM!

src/jaxsim/api/model.py Outdated Show resolved Hide resolved
@diegoferigo diegoferigo merged commit d7cfcc6 into main May 2, 2024
29 checks passed
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

2 participants