Getting Contact Values

67 views
Skip to first unread message

Tristan Griffith

unread,
Nov 2, 2022, 4:02:04 PM11/2/22
to ProjectChrono
Hello, my name is Tristan Griffith and I'm a student researcher who is learning how to use PyChrono for a grabbing simulation. I have set up a simulation in which a cube with a NSC material is grabbed by a tentacle with smaller NSC material tabs on it. I was wondering how to access the contact values, specifically the normal force and friction force that comes from these contacts and what the best way to store/plot these values would be. Thanks!

Luning Fang

unread,
Nov 2, 2022, 10:35:09 PM11/2/22
to ProjectChrono
Hello Tristan, 

You can take a look at this demo demo_IRR_callbackNSC.py, where a callback class is used to report contact info such as contact point, contact normal, contact forces, etc, for each contact. Note that the contact force reported is expressed in the contact reference frame (plane_coord), with its X-axis being the contact normal. Given this info, you can compute normal and friction forces. 

Thank you,
Luning

Tristan Griffith

unread,
Nov 3, 2022, 5:02:04 PM11/3/22
to ProjectChrono
Hi Luning, thanks for the help!
Reply all
Reply to author
Forward
0 new messages