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

Fix RodModelToMjcf.convert when no cameras argument is passed #135

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Apr 4, 2024

Regression introduced in #133.


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

@diegoferigo diegoferigo self-assigned this Apr 4, 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! I wasn't expecting that issue as in theory cameras should be converted to a list of an empty dictionary. We should probably add some tests on the visualizer for the next release

@diegoferigo
Copy link
Member Author

Thanks! I wasn't expecting that issue as in theory cameras should be converted to a list of an empty dictionary. We should probably add some tests on the visualizer for the next release

The problem is that a list of empty dictionaries like [{}] enters the for loop and triggers the construction of a MujocoCamera instance. This PR ensures that no MujocoCamera is created when cameras=None.

@diegoferigo diegoferigo changed the title Fix RodModelToMjcf.convert with no user camera specified Fix RodModelToMjcf.convert when no cameras argument is passed Apr 4, 2024
@diegoferigo diegoferigo merged commit 3f5e01c into main Apr 4, 2024
24 checks passed
@diegoferigo diegoferigo deleted the fix/mujoco_user_camera branch April 4, 2024 08:18
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