Overlay/print data on mujoco sim window

Discussion in 'Support requests' started by Deepak, Aug 28, 2019.

  1. I want to write/print/overlay data like qpos of an agent on the Mujoco sim window to know the exact position and orientation of it. How I can stream/print data on the mujoco window?
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    See the code sample simulate.cpp. It uses the internal tools for printing text on the screen. There is a simple function mjr_text(), and a more elaborate function mjr_overlay() which does two-column printing on multiple lines (using '\n' in the strings passed to the function). You should call these functions after mjr_render() in your rendering loop.