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 support for continuous joints #228

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Add support for continuous joints #228

merged 2 commits into from
Sep 13, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Sep 13, 2024

The support in ROD to build programmatically and parse models with continuous joints has been added in ami-iit/rod#40.

A continuous joint, contrarily to revolute joints, does not have /joint/axis/limit/lower|/joint/axis/limit/upper. The new version of ROD allows to build a trivial Limit object with all attributes set as None. In this case, we set the upper and lower limits to the maximum/minimum floating point number in the active precision of JAX (either 64 bits or 32 bits).


📚 Documentation preview 📚: https://jaxsim--228.org.readthedocs.build//228/

@diegoferigo diegoferigo self-assigned this Sep 13, 2024
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! I just have a curiosity, should these changes be propagated in JointType?

@dataclasses.dataclass(frozen=True)
class JointType:
Fixed: ClassVar[int] = 0
Revolute: ClassVar[int] = 1
Prismatic: ClassVar[int] = 2

@diegoferigo
Copy link
Member Author

diegoferigo commented Sep 13, 2024

Great question! I don't think we need to do that. The logic of this PR just introduces the support of parsing continous joints (supported in SDF). The difference between a continuous joint and a revolute joint is that continuous joints do not have position limits.

This PR basically parses continuous joints and treats them as revolute joints by setting their position limits as the maximum float in JAX precision.

@flferretti
Copy link
Collaborator

Alright, thanks for the explanation!

@diegoferigo diegoferigo merged commit 0c2a5b8 into main Sep 13, 2024
25 checks passed
@diegoferigo diegoferigo deleted the continuous_joints branch September 13, 2024 08:59
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.

2 participants