bhuman / BHumanCodeRelease

The official B-Human code releases
Other
188 stars 126 forks source link

How to improve Steps/s Speed in SimRobot #77

Open ItsBean opened 1 year ago

ItsBean commented 1 year ago

Dear authors,

I hope this message finds you well. I recently encountered an issue while using SimRobot, specifically related to its slow steps/s performance. When running game.ros2 on SimRobot, I noticed that the calculation speed is limited to approximately 24 steps/s.

However, my system's resource usage appears to be relatively low: the average CPU usage rate is 44.7%, and only 1,495 MB out of 7,708 MB of memory is being utilized. Interestingly, despite having an 8 GB GPU, no programs seem to be loaded into my GPU memory.

I would greatly appreciate any guidance on how to increase the steps/s speed in SimRobot, particularly given my system's available resources. If there are any specific settings or optimizations that could be applied, your recommendations would be invaluable.

Thank you in advance for your assistance, and I look forward to your insights on this matter.

Best regards,

roefer commented 11 months ago

SimRobot is a single-threaded app. Therefore, the physics simulation and the computation of the sensor data are all computed sequentially. The physics library Open Dynamics Engine SimRobot uses has the option to run computations in parallel, but we always experienced random errors when activating this feature, i.e. some values became NaN. And still, camera images would still not be computed in parallel with this option, because they are not computed by that library.

Removing the bottle neck would probably mean a major rewrite of the simulator.