Difference between ChBody and ChBodyEasy

70 views
Skip to first unread message

Jacqueline Heaton

unread,
Mar 16, 2022, 12:43:22 PM3/16/22
to ProjectChrono
Hello!

I'm fairly new to PyChrono, and I've tried using the documentation to figure this out but I haven't managed to find anything on this.

I want to create objects with flat irregular shape. To do this it is my understanding that I need to use ChBody and add a ChBoxShape (with a small ysize value) etc. But the object doesn't seem to react to the physics as I would expect (see version = "bad" in main).

I switched to using a ChBodyEasyBox just to see and that seems to work as expected (see version = "good" in main).

I've attached a minimum working example in case that will make it clearer. I assume I need to set some variable with the ChBody that ChBodyEasyBox sets automatically, but I haven't been able to figure out what. Any help would be appreciated.
MinWorking.py

Jacqueline Heaton

unread,
Mar 18, 2022, 4:55:29 PM3/18/22
to ProjectChrono
Update: I've tried comparing density, inertia, and mass. While some were difference (mass, density, inertia, etc) changing them had no noticeable impact. The material added is the same for both, and modifying compliance makes the tile clip through the floor, while no noticeable change occurs on modifying friction. I also tried changing the ground to ChBody as well, instead of ChBodyEasyBox, since I thought maybe they interacted differently, but that also had no effect.

When I run it with just a rectangle (so not even the irregular F shape) it will fall to the ground normally, but then on making contact with the ground, flip up towards the camera, seem to meet a soft wall, slide back (on an angle) and then, instead of falling flat on the floor again, falls upwards until it's standing upright. Then it gently sways, often at an angle that means it should absolutely fall towards the ground, but instead stays stubbornly upright.

So I'm really stumped. Does anyone have any idea of why this is happening?

I've attached pictures for reference.

Thanks,
J
StandingUp.png
GentlyWaving.png
InitialFall.png

Jacqueline Heaton

unread,
Mar 24, 2022, 6:14:45 PM3/24/22
to ProjectChrono
Okay solved it - the issue was the inertia, but I had to set the rotation matrix, not the quaternion. Setting the rotation matrix to have a diagonal of 145912, 162000, 16312.5 fixed the issue.
Reply all
Reply to author
Forward
0 new messages