Extended contact visualizations - #3615
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
🚧 Files skipped from review as they are similar to previous changes (10)
📝 WalkthroughWalkthroughThe viewer now renders contact normals, mode-colored disks, and force arrows through separate controls and namespaces. Contact scales adapt to model dimensions and dynamics. Kamino examples request force contact attributes. ChangesContact visualization
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ViewerBase
participant ContactKernels
participant ContactNamespaces
ViewerBase->>ContactKernels: compute contact normals, modes, and forces
ContactKernels-->>ViewerBase: geometry buffers and colors
ViewerBase->>ContactNamespaces: log normals, modes, and forces independently
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Thanks, looks like a useful feature! There is some z-fighting in the black discs for the open contact mode. Perhaps you want to just scale them slightly larger to prevent this flickering? Recording.2026-07-24.165229.mp4 |
af9f29b to
9f7c293
Compare
|
@eric-heiden thanks for reviewing! I've pushed a fix that addresses the z-fighting as suggested (sorry for not looking again into this earlier, I was on vacation). 2026-08-04.16-59-11.mp4 |
eric-heiden
left a comment
There was a problem hiding this comment.
Thanks for fixing the rendering! @Guirec-Maloisel can you fix the merge conflict? Then we can merge.
- Fix z-fighting for overlapping contact disks
9f7c293 to
9b2c582
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Description
This refines the (rigid) contact visualization options in the newton viewer, allowing to visualize the contact force, as well as the contact mode (open / sliding / sticking, using a color-coded disk in the tangential plane), on top of the contact normal (as per the current viewer).
The disk color (contact mode) and force visualization both require access to the contact force (e.g. through calling
builder.request_contact_attributes("force")), but will default to black (open contact) and no force vector if not available.Checklist
CHANGELOG.mdhas been updated (if user-facing change)Test plan
This has been incorporated for a while in my local branch for validating contact modeling and comparing solvers, so it has been indirectly tested there. Not sure what the policy is for unit testing the viewer outside of this (apart from the reviewers trying it out on the newton examples).
Summary by CodeRabbit
New Features
Documentation