Skip to content

Add Capsule geom - #2163

Merged
oleflb merged 2 commits into
HULKs:mainfrom
oleflb:twix-mujoco/support-capsules
Dec 9, 2025
Merged

Add Capsule geom#2163
oleflb merged 2 commits into
HULKs:mainfrom
oleflb:twix-mujoco/support-capsules

Conversation

@oleflb

@oleflb oleflb commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Why? What?

Adds Capsule Geom to our bevy mujoco visualizer.
These will be required in #2158

Also fixes an orientation mismatch between cylinders and capsules between mujoco and bevy.
In mujoco these geoms are aligned along the z-axis, whereas bevy aligns them along the x-axis by default.
This is fixed with an extra transform component.

Additionally, mujoco often uses half lengths, whereas bevy uses full lengths. This PR fixes that by doubling some of the lengths on the bevy side.

Twix:
image

MuJoCo Native Visualizer:
image

Describe here why you created this PR and what it does

Fixes #

ToDo / Known Issues

If this is a WIP describe which problems are to be fixed.

Ideas for Next Iterations (Not This PR)

  • Add remaining geoms

How to Test

  • Run simulator and visualizer, inspect capsule and cylinder

Comment thread crates/bevy_mujoco/src/lib.rs

@knoellle knoellle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One minor comment, looks good otherwise

@knoellle knoellle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@oleflb
oleflb added this pull request to the merge queue Dec 9, 2025
Merged via the queue into HULKs:main with commit 15c458b Dec 9, 2025
24 checks passed
@oleflb
oleflb deleted the twix-mujoco/support-capsules branch December 9, 2025 18:32
@github-project-automation github-project-automation Bot moved this from Request for Review to Done in Development Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:MuJoCo tools:Debug Tooling Related to twix et.al.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants