-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement video capturing system #29
base: main
Are you sure you want to change the base?
Conversation
- Generalised urdf_path input for robotModel class to pass either string or a pathlib object - [To review] Added save_xml flag on robotModel.get_mujoco_model to save the modified xml file
… with associated default values taken from mujoco
Still work in progress, implemented basic structure for PR. - ScoreCallback associates a simulation to a score which can be customly defined - TrackerCallback helps to store variable values for either printing or eventual plotting
- Dumping urdf string to temp file if mujoco fails to load - Added should_stop flag to mujocoSimulator class
…ontactInfo wrapper
First draft of a video recording system for mujoco. The idea is to read an image at each frame and save it in a temporary folder. At the end of the simulation, save the video using opencv. Unfortunately for now it is quite slow. |
@flferretti Do you have any suggestions on the implementation by any chance? (The changes are in the last commit only) |
I'd avoid writing each frame to a tempfile as it is extremely slow. You can just save it as a numpy array (the default output) in a class attribute. Moreover, try to use the mujoco passive viewer, so the process of headless rendering does not overlap with the interactive viewer used in
You might also take inspiration from how we use the mujoco passive viewer in JaxSim https://github.com/ami-iit/jaxsim/blob/main/src/jaxsim/mujoco/visualizer.py |
As of the last commit, the recorder kills the python process because it runs out of memory. Investigating... |
No description provided.