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.