Mujoco Haptix runs very slow after several minutes of continually updating at 30 Hz

Discussion in 'HAPTIX' started by Suzanne Wendelken, Jun 22, 2015.

  1. The Mujoco Haptix program (v0.98) runs very slow and the model needs to be reset after several minutes (10-20 min.) of continually streaming commands at 30 Hz using the Matlab API.
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    There is a known bug in the executable itself (independent of the MATLAB API) that causes the timing to go wild after a while, but we have only seen it after an hour or so... Does this happen every time? If you open the Info text panel (lower left) what do you see for FPS, timing / realtime factor, mocap latency? Are you running it on the standard hardware system or something else? Is it running in stereoscopic mode and using the motion capture system?

    Also, can you try the new version (1.0.0 RC) and see if the problem is still there?
     
  3. The slow frames/freezing does not happen every time, only when we run for long periods of time. I tried running 1.0.0 RC for more than 50 minutes. The FPS went down to 49, then eventually disappeared (it read nothing and was pretty much frozen). We are running on the standard hardware system provided. The Mocap field was blank, probably because we were not using the motion capture system at the time.
     
  4. Vikash Kumar

    Vikash Kumar Guest

    As a short term workaround while we chase this bug, hit reload and everything will be back to normal.
     
  5. Thanks for looking into it. In the mean time, we are just reloading, and it does fix the problem. However, we notice that if we accidentally close mujoco while streaming commands from the Matlab API, this causes Matlab to freeze (to the point it has to be killed using task manager). Our work around for that problem is procedural (i.e. we just don't close mujoco while streaming commands from Matlab).
     
  6. Vikash Kumar

    Vikash Kumar Guest

    Its strongly advised that you exit Mujoco after you have closed all open client connections (mex/ cpp).

    Matlab locks mjhx.mex while communicating with Mujoco. To connect to Mujoco, mjhx internally opens a socket connection for necessary handshaking and communications. Its important that the link remains alive until you programmatically close the connection and the mjhx.mex is unlocked. Accidentally closing Mujoco will break the link and results will be similar to what you mentioned above.
     
  7. The newest release of Mujoco appears to have resolved the hanging issue reported here. I ran Mujoco overnight on my computer and the simulation was still running properly. However, I have not seen any indication/release notes indicating that this bug has been fixed. Can the developers confirm/deny if the bug has been addressed?
     
  8. Emo Todorov

    Emo Todorov Administrator Staff Member

    Yes, it is fixed. This is mentioned in the Release Notes as "timing bug" - the bug was caused by a timer overflow, which in turn caused the program to slow down intentionally, because it thought that it is too early to take another simulation step.