-
Notifications
You must be signed in to change notification settings - Fork 10
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 example notebooks in documentation #187
Conversation
d131088
to
d03b7bd
Compare
13e92c0
to
3c2c480
Compare
79366f8
to
ac791ca
Compare
It looks like when executing the notebook |
Which platform are you targeting? |
It should be |
836e49f
to
5889c55
Compare
I had no luck using FileNotFoundError: [Errno 2] No such file or directory: 'Xvfb' Trying with ---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
Cell In[6], line 18
4 data, integrator_state = js.model.step(
5 dt=dt,
6 model=model,
(...)
11 link_forces=None,
12 )
14 mj_model_helper.set_joint_positions(
15 positions=data.joint_positions(), joint_names=model.joint_names()
16 )
---> 18 recorder.record_frame(camera_name="cartpole_camera")
20 media.show_video(recorder.frames, fps=1 / dt)
21 recorder.frames = []
File ~/checkouts/readthedocs.org/user_builds/jaxsim/conda/187/lib/python3.11/site-packages/jaxsim/mujoco/visualizer.py:78, in MujocoVideoRecorder.record_frame(self, camera_name)
75 """Stores a frame in the buffer."""
76 camera_name = camera_name or "track"
---> 78 frame = self.render_frame(camera_name=camera_name)
79 self.frames.append(frame)
File ~/checkouts/readthedocs.org/user_builds/jaxsim/conda/187/lib/python3.11/site-packages/jaxsim/mujoco/visualizer.py:72, in MujocoVideoRecorder.render_frame(self, camera_name)
69 mujoco.mj_forward(self.model, self.data)
70 self.renderer.update_scene(data=self.data, camera=camera_name)
---> 72 return self.renderer.render()
File ~/checkouts/readthedocs.org/user_builds/jaxsim/conda/187/lib/python3.11/site-packages/mujoco/renderer.py:244, in Renderer.render(self, out)
242 np.copyto(self._scene.flags, original_flags)
243 else:
--> 244 _render.mjr_readPixels(out, None, self._rect, self._mjr_context)
246 out[:] = np.flipud(out)
248 return out
KeyboardInterrupt: Check 649944a |
5889c55
to
649944a
Compare
510a825
to
15564dd
Compare
6bd5f1d
to
c9f369f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Is there any reason why the functions e.g. in https://jaxsim--187.org.readthedocs.build/187/modules/_autosummary/jaxsim.api.model.html are not clickable? It's not a big deal, the website is still quite rough, I don't mind if something is not yet working as expected.
Can we remove the following duplication in the index? (again, not necessarily in this PR if you want to move it forward).
Curiosity: how did you eventually solve the problem on the rendering? With mesalib
?
c9f369f
to
fed4ede
Compare
Co-authored-by: Diego Ferigo <diego.ferigo@iit.it>
I'm not sure, but we can deal with that in a different PR.
It's not duplicated. The outer level is a sphinx-gallery item, while the inner level is a
EGL requires a |
As you prefer, not blocking the merge since you already dedicate enough time to make it work as it is right now. Feel free to merge as it is. |
This pull requests add the example notebooks in the documentation when rendered by Sphinx.
📚 Documentation preview 📚: https://jaxsim--187.org.readthedocs.build//187/