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

Use libosmesa for headless rendering in Colab #214

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

flferretti
Copy link
Collaborator

@flferretti flferretti commented Jul 22, 2024

This simplifies the headless rendering in Colab, avoiding both to set an additional environment variable and to install pyvirtualdisplay in combination with xvfb and egl.


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

@flferretti flferretti self-assigned this Jul 22, 2024
@flferretti flferretti force-pushed the flferretti-patch-2 branch from fb71ab2 to 1f110e9 Compare July 22, 2024 13:19
@flferretti flferretti marked this pull request as ready for review July 22, 2024 13:19
@flferretti flferretti requested a review from diegoferigo July 22, 2024 13:20
@diegoferigo
Copy link
Member

It's probably worth also taking advantage of this PR to simplify the positioning of the recording camera with something similar to the snippet below:

mjcf_string, assets = UrdfToMjcf.convert(
    urdf=model.built_from,
    cameras=jaxsim.mujoco.loaders.MujocoCamera.build_from_target_view(
            name="recorder", lookat=data.base_position(), distance=3, azimut=180, elevation=-20
    ),
)

and then recorder.record_frame(camera_name="recorder").

@flferretti
Copy link
Collaborator Author

Added example in 5123e78. Ready for review, thanks!

Copy link
Member

@diegoferigo diegoferigo left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@flferretti flferretti force-pushed the flferretti-patch-2 branch from 5123e78 to 0923396 Compare July 24, 2024 07:07
@flferretti flferretti enabled auto-merge July 24, 2024 07:07
@flferretti flferretti merged commit 4189a2c into main Jul 24, 2024
24 checks passed
@flferretti flferretti deleted the flferretti-patch-2 branch July 24, 2024 07:27
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