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

Fix detection of joint connecting world to base for fixed-base models #32

Merged
merged 1 commit into from
May 5, 2023

Conversation

diegoferigo
Copy link
Member

Related to the changes introduced by #30

@diegoferigo diegoferigo self-assigned this May 5, 2023
Copy link
Collaborator

@flferretti flferretti May 5, 2023

Choose a reason for hiding this comment

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

When loading the model from urdf I get:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[6], line 1
----> 1 model = simulator.insert_model_from_description(
      2     model_description=model_urdf_path
      3 ).mutable(validate=True)

File [/conda/lib/python3.10/site-packages/jaxsim/simulation/simulator.py:242](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62656175746966756c5f676f6c69636b227d.vscode-resource.vscode-cdn.net/conda/lib/python3.10/site-packages/jaxsim/simulation/simulator.py:242), in JaxSim.insert_model_from_description(self, model_description, model_name, considered_joints)
    228 """
    229 Insert a model from a model description.
    230 
   (...)
    238     The newly inserted model.
    239 """
    241 # Build the model from the given model description
--> 242 model = jaxsim.high_level.model.Model.build_from_model_description(
    243     model_description=model_description,
    244     model_name=model_name,
    245     vel_repr=self.velocity_representation,
    246     considered_joints=considered_joints,
    247 )
    249 # Make sure the model is not already part of the simulation
    250 if model.name() in self.model_names():

File [/conda/lib/python3.10/site-packages/jaxsim/high_level/model.py:153](https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f62656175746966756c5f676f6c69636b227d.vscode-resource.vscode-cdn.net/conda/lib/python3.10/site-packages/jaxsim/high_level/model.py:153), in Model.build_from_model_description(model_description, model_name, vel_repr, gravity, is_urdf, considered_joints)
...
--> 186     raise ValueError("Pose of fixed joint connecting to 'world' link not valid")
    188 if j.pose.relative_to != j.parent:
    189     msg = "Pose of joint '{}' is not expressed wrt its parent link '{}'"

ValueError: Pose of fixed joint connecting to 'world' link not valid

Copy link
Member Author

Choose a reason for hiding this comment

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

I update the PR. There was another occurrence to update.

@diegoferigo diegoferigo force-pushed the fix_base_detection_fixed_base_models branch from e0cc195 to 56d47e6 Compare May 5, 2023 16:20
@diegoferigo diegoferigo merged commit cfdce7c into main May 5, 2023
@diegoferigo diegoferigo deleted the fix_base_detection_fixed_base_models branch May 5, 2023 17:19
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