what are the specifications of default camera?

Discussion in 'Visualization' started by lin, Feb 27, 2018.

  1. lin


    Hi, I'm using mujoco-py to invoke mujoco, and PyOpenGL to visualize the model. But if I define a custom camera, the default camera is not available. Thus, I wonder how the default camera is defined, such that I can add that in the xml.

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    In the XML, under visual/global, you can define the "fovy" and "ipd" parameters of the default camera. But the camera itself is implemented in code (i.e. the code has to intercept the mouse motion and move the camera accordingly) and then that code calls the mujoco renderer with the camera position and orientation. So this is not done in the XML. If you look at the code sample simulate.cpp you will see how it is done when calling MuJoCo from C++ code. As for mujoco-py, I don't actually use it and don't know how it handles cameras; given your description, I am guessing they switch automatically to the model cameras when defined... but maybe there is option somewhere to switch back to the free camera? I don't know; check on the OpenAI forums.
  3. Hello, I am trying to fix a camera in a robot workspace. As I do not know the pos & quat of the camera precisely, I want to use the free camera(default camera) to get the pos and the quat of that and then use that as the fixed camera pos and quat. I wanted to know if it is possible for us to get this data(pos, quat) of the free camera.

    I can see options like "save XML" and "print data" in the GUI. I am not sure where exactly the XML file is saved or the data is printed. Also, if it has the camera details