google-deepmind / google-deepmind/mujoco

Add hollow cylinder SDF

Open
#3,053 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### The feature, motivation and pitch

Thanks for all the work on mujoco!

I'm working on a simulation which uses some hollow cylinders (eg. [this shape](https://www.wolframalpha.com/input?i=cylindrical+shell&assumption=%22ClashPrefs%22+-%3E+%7B%22Solid%22%2C+%22CylindricalShell%22%7D)). I have created the SDF myself, however I feel like it is a common enough shape that it should be included in mujoco (similarly to `torus`).

In writing the plugin, I also created some utility functions for computing the gradient of prisms/[onions](https://iquilezles.org/articles/distfunctions/#:~:text=primitive(p)%20%2D%20rad%0A%7D-,Onion%20%2D%20exact,-For%20carving%20interiors), which can be reused across different sdfs.

If either of these are of interest to the mujoco maintainers, I will create a Pull Request.

### Alternatives

If you want to keep the number of sdfs shipped with mujoco limited, then it should be kept as a separate project and I'll close this issue.

### Additional context

I have already implemented these in a fork (https://github.com/TobyBoyne/mujoco).

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.