MuJoCo Camera Integration
In order to access the camera frame recorded in the simulation in python we need an integration between mujoco cameras and rcsss.
There is already a camera interface defined here which should be used as a simple API to expose the latest camera frame.
Currently, the simulation model and its state are stored in the model and data attributes in the FR3 sim class. An example of its usage can be seen in the simulation gym env. Both model and state should be given to a SimCamera (which inherits from Camera) object which implements the code to render a frame from the simulation.
The following references might be useful:
- The MuJoCo documentation for visualization can be found here
- This code and especially the function
read_pixels()implements a renderer.
For now it is fine to only expose the latest image (render the camera image only upon request) from a single camera. Later on we can also think about how to index multiple cameras and how to save a fixed frame rate into a buffer. The latter would allow the caller to also access the history of past observations.
I need assistance in running the example environment. I get the following issue.
branch: master
cmd: (rcs) nava@multihead:~/robot-control-stack$ python python/rcsss/envs/sim.py
python traceback:
`Traceback (most recent call last):
File "/home/nava/robot-control-stack/python/rcsss/envs/sim.py", line 29, in
Invoked with: 114853120, 180029184, 'models/urdf/fr3_from_panda.urdf', True `
Have you also installed the latest version (with pip install -e .)?
I did at the start, let me retry and let you know.
Have you also installed the latest version (with
pip install -e .)?
I removed the existing build directory and used did a 'pip install -e .' and I get the following issue. Am I supposed to run anything else before the pip install? I attached the error.log for your reference CMakeError.log
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building editable for rcsss Failed to build rcsss ERROR: Could not build wheels for rcsss, which is required to install pyproject.toml-based projects
Hi Tobias, Could you please have a look at this branch, I have pushed an initial implementation, there are few things I need to discuss, at the moment I wish to ensure that I am on the right track. Thanks