Skip to content

Rework contact APIs - #144

Merged
amacati merged 3 commits into
mainfrom
feat.collision
Oct 25, 2026
Merged

amacati merged 3 commits into
mainfrom
feat.collision

Conversation

@amacati

@amacati amacati commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

The contacts function now always emits an (n_worlds, n_drones) boolean array. If users want to exclude collisions, they can build a new contact function that masks out specific pairs or whole geometries.

For fine-grained access to what exactly collided with the drone, you either need to create a special mask (you can build multiple collision functions with different ignores and keep them around), or use the underlying APIs directly.
Closes #124.

@amacati
amacati requested a review from ratheron as a code owner October 23, 2026 13:41
@amacati amacati added the enhancement New feature or request label Oct 23, 2026

@ratheron ratheron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for reworking this. I think this makes more sense now. Besides a little variable rename, I have nothing to suggest. The MuJoCo code is just always hard to read imo.

Comment thread crazyflow/sim/sim.py Outdated
@amacati

amacati commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

Should be good to go.

@amacati
amacati merged commit af31417 into main Oct 25, 2026
6 checks passed
@amacati
amacati deleted the feat.collision branch October 25, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revise collision implementation

2 participants