Skip to content

Experiment with soft bodies - #10

Merged
jsgraf-jsc merged 6 commits into
mainfrom
experiment-with-soft-bodies
Apr 17, 2026
Merged

Experiment with soft bodies#10
jsgraf-jsc merged 6 commits into
mainfrom
experiment-with-soft-bodies

Conversation

@jsgraf-jsc

Copy link
Copy Markdown
Contributor

Added a mujoco model for a Crew Portable Carrier (CPC) with a flexible web handle.

@ndunkelb-nasa ndunkelb-nasa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jodi, this is immensely helpful! It will save a ton of time and headache as more people are looking at flexible things in the future!

It does look like the pre-commit is failing. Have you run pre-commit on stuff before?
If not, I think it should be something like.

# install pre-commit. Don't do the apt version bc apparently that isn't correct.
# Don't ask me how I know...
pip install pre-commit

# run pre-commit and see any issues it has. Run this from somewhere inside the repo.
pre-commit run -a

# fix issues then commit again, and you should see the tests here pass

Comment thread mujoco/cpc/README.md Outdated

### *dim*

At first I thought this shold be 3 dimensional, but there is no "flex" in the third dimension, so it wasn't necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At first I thought this shold be 3 dimensional, but there is no "flex" in the third dimension, so it wasn't necessary.
At first I thought this should be 3 dimensional, but there is no "flex" in the third dimension, so it wasn't necessary.

Comment thread mujoco/cpc/README.md
All of these parameters came from trial and error.
As I learned more about how the flexcomps work, I was able to get the behavior I wanted, but the way I did this is not necessarily the only way -- for instance, I suspect there is a reasonable way to use a mesh type instead of a grid type and there is likely a reasonable way to model this as more explicitly 3 dimensional.

## *Flexcomp Attributes*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## *Flexcomp Attributes*
## *Flexcomp Attributes*
The MuJoCo documentation for the flexcomp type are located [here](https://mujoco.readthedocs.io/en/3.2.6/XMLreference.html#body-flexcomp), but further explanation for this application is shown below.

Comment thread mujoco/cpc/README.md Outdated
### *dim*

At first I thought this shold be 3 dimensional, but there is no "flex" in the third dimension, so it wasn't necessary.
From a collision standpoint the *radius" parameter gives the strap volume.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
From a collision standpoint the *radius" parameter gives the strap volume.
From a collision standpoint the *radius* parameter gives the strap volume.

Comment thread mujoco/cpc/README.md Outdated
### *count*, and *spacing*

Count and spacing determine the size of the object.
Count determines how many verticies will be in each dimension. Count*Spacing gives the length in each dimension.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Count determines how many verticies will be in each dimension. Count*Spacing gives the length in each dimension.
Count determines how many verticies will be in each dimension.
Count*Spacing gives the length in each dimension.

Comment thread mujoco/cpc/README.md Outdated

### *rgba*

Selected from the CPC baseball card.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Selected from the CPC baseball card.

Comment thread mujoco/cpc/README.md
The documentation here is not clear (at least to me), but trial and error says it has to be "true".

### *solref*
Not set with much thought.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find that the more I think about some mujoco params, the less sense they make to be fair!

Comment thread mujoco/cpc/README.md Outdated
Selected from the CPC baseball card.
We should set it to whatever we want.

### *edge*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### *edge*
## *edge*

Comment thread mujoco/cpc/README.md

### *young*

I wanted no stretch, so I set the young's constant high.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiousity, did you look up any comparable numbers for this, or just trial and error? when getting into the 1.0eX, it is tough to have the intuition!

@jsgraf-jsc
jsgraf-jsc merged commit d19699c into main Apr 17, 2026
1 check passed
@jsgraf-jsc
jsgraf-jsc deleted the experiment-with-soft-bodies branch April 17, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants