Python bindings - huge performance overhead #2154
Unanswered
davidhozic
asked this question in
Asking for Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Intro
Hi!
I am a graduate student, I use MuJoCo for a reinforcement learning.
My setup
My question
Maybe I'm using Mujoco bindings incorrectly, but I have a problem with huge overheads when iterating the
MjData.contact
array. My RL environment is setup to have a timestep of 20 ms, which I internally divide to 2 ms sub-steps - I callmj_step
10 times in a loop. After eachmj_step
call, I iterate theMjData.contact
array and check the IDs of the contact geoms. I am able to do about 720 RL steps in one real-world second when doing this, however the performance doubles to 1400 RL steps per real-world second if I comment out the collision reading.Is there some faster way I can access the collision data, or the data struct in general?
Minimal model and/or code that explain my question
720 steps in one second:
1400 steps in one second:
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions