Skip to content

Feature/sdf obstacle#38

Open
griffin-norris wants to merge 22 commits intochungmin99:mainfrom
griffin-norris:feature/sdf-obstacle
Open

Feature/sdf obstacle#38
griffin-norris wants to merge 22 commits intochungmin99:mainfrom
griffin-norris:feature/sdf-obstacle

Conversation

@griffin-norris
Copy link
Copy Markdown

@griffin-norris griffin-norris commented Jun 2, 2025

Fixes #35

  • Add signed distance field (SDF) collision geometry CollGeom to allow users to specify arbitrary SDF as obstacles
  • Add versions of examples 07_trajopt and 06_online_planning using simple SDF as 11_trajopt_sdf and 12_online_planning_sdf, respectively.
  • ^ Above also included helper functions to define spherical SDF, as well as to visualize the 0-level set of the SDF
  • Minor tweaks to the gitignore (ignore venv/ and shawdowhand_urdf)

Copy link
Copy Markdown
Owner

@chungmin99 chungmin99 left a comment

Choose a reason for hiding this comment

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

Hi -- I took a brief pass over the contribution, it's super cool + it works well!

I left some comments / requests, but I'm also happy to tackle these if you don't have the bandwidth.

import jax.numpy as jnp
import jaxlie

def make_sphere_grid(world_center: jnp.ndarray,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This make_sphere_grid function seems generally useful -- what do you think about extending this function to make it a general constructor for SDFGrid, given a mesh (e.g., with trimesh.proximity.signed_distance?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added a generic from_mesh constructor to handle this, let me know if that's what you had in mind.

@griffin-norris
Copy link
Copy Markdown
Author

griffin-norris commented Jun 3, 2025

@chungmin99 thanks for the review! Will look into your comments, mostly seems to be small inconsistencies introduced by LLMs

@xueminchi
Copy link
Copy Markdown

This new feature is cool! SDF can represent almost any obstacles. The gradient is indeed an issue and depends on how the SDF is defined and designed. I'm eager to try this feature :D.

@griffin-norris
Copy link
Copy Markdown
Author

@chungmin99 Finally found some time to address your comments. Let me know if you have any further thoughts

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.

Possibility to import SDF directly as a CollGeom

3 participants