google-deepmind / google-deepmind/mujoco

Optimizing Collision Detection for Large Terrain Maps in MuJoCo Simulations

Open
#1,841 1 comment 0 reactions 1 assignee Claimed by @quagla View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

Dear MuJoCo Team,

I am currently working on terrain simulations using MuJoCo. I have encountered performance issues primarily due to the size of the terrain maps involved. There are two main factors contributing to the slowdown:

An increase in the number of columns (ncol) and rows (nrow) of the terrain, which seems to directly affect the simulation speed.
The size of the terrain geom elements also inferences the simulation speed.
I am seeking advice on how to optimize collision detection to only consider the terrain surrounding the current robot, thereby ignoring other parts of the map that are not in immediate proximity to the robot. This would ideally help in reducing the computational load and increase the simulation speed.

Could you please suggest any settings or methods within MuJoCo that would allow for such selective collision detection? Or are there other optimization techniques you would recommend for handling large terrain maps in simulations?

As suggested by @yuvaltassa, I have opened a following bug issue from: https://github.com/google-deepmind/mujoco/issues/1839#issuecomment-2244848557. Thanks for your prompt response and assistance.

Here is a related demo, which is quite slow for both model loading and simulation when loading with `scene_terrain.xml`:

[demo_with_go2.zip](https://github.com/user-attachments/files/16347870/demo_with_go2.zip)

Thank you for your assistance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.