Skip to content

[FEATURE] Add 'get_weld_constraints' API.#1370

Merged
duburcqa merged 30 commits intoGenesis-Embodied-AI:mainfrom
LeonLiu4:feature/get-weld
Aug 10, 2025
Merged

[FEATURE] Add 'get_weld_constraints' API.#1370
duburcqa merged 30 commits intoGenesis-Embodied-AI:mainfrom
LeonLiu4:feature/get-weld

Conversation

@LeonLiu4
Copy link
Contributor

@LeonLiu4 LeonLiu4 commented Jul 7, 2025

Adds RigidSolver.get_weld_constraints() – returns an (N, 3) NumPy array (env_id, link1_idx, link2_idx) of all active weld constraints, enabling quick inspection and test assertions without poking internal Taichi fields.

Resolves #1365

@LeonLiu4 LeonLiu4 force-pushed the feature/get-weld branch from 00f2534 to c176525 Compare July 7, 2025 22:39
Copy link
Collaborator

@duburcqa duburcqa left a comment

Choose a reason for hiding this comment

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

Could you take inspiration of get_contacts? i.e. return a dict instead of a raw tensor, and fetch all relevent taichi field values in a single kernel call.

@LeonLiu4 LeonLiu4 requested a review from duburcqa July 8, 2025 19:16
@LeonLiu4 LeonLiu4 requested a review from duburcqa July 10, 2025 19:05
@LeonLiu4 LeonLiu4 requested a review from duburcqa July 14, 2025 19:35
@LeonLiu4 LeonLiu4 requested a review from duburcqa July 23, 2025 18:02
@davidhommie
Copy link

Too much additions leads to error

@YilingQiao
Copy link
Collaborator

@LeonLiu4 can you merge the latest main? You might need to modify the kernel a little bit to adapt to the new struct of array access pattern

@YilingQiao
Copy link
Collaborator

YilingQiao commented Aug 4, 2025

@davidhommie can you provide a script? Or a link to the issue you mentioned?

YilingQiao
YilingQiao previously approved these changes Aug 4, 2025
@MRiabov
Copy link

MRiabov commented Aug 9, 2025

Folks, maybe you would merge a basic version of this? It's been a month since #1365. I currently have to write strange logic to assert weld constraints existence in my tests, e.g. moving a part by an arbitrary distance, and asserting that welded parts have to be equally moved.

@duburcqa duburcqa changed the title [FEATURE] get_weld_constraints API [FEATURE] Add 'get_weld_constraints' API. Aug 10, 2025
@duburcqa
Copy link
Collaborator

@MRiabov I understand your frustration but we only merge features when it is ready, and we were busy with other features during the last few weeks.

@duburcqa duburcqa merged commit b091842 into Genesis-Embodied-AI:main Aug 10, 2025
18 checks passed
YilingQiao pushed a commit to YilingQiao/Genesis that referenced this pull request Aug 22, 2025
winnieyangwannan pushed a commit to winnieyangwannan/Genesis that referenced this pull request Sep 14, 2025
Kashu7100 pushed a commit to Kashu7100/Genesis that referenced this pull request Jan 26, 2026
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.

[Feature]: Create an API to get weld constraints

5 participants