manually rotate a body

13 views
Skip to first unread message

Guan Yu

unread,
Jul 2, 2022, 1:01:59 AMJul 2
to ProjectChrono
Hi all,

I am doing a simple rocket launch simulation which has a EasyCylinderBody with a constant thrust force attached at the center of mass, the force has fixed direction along the cylinder frame. During the fly, I would like to manually give the cylinder body a rotation by defining the designated angle (manually rotate the body) .

I was wondering which should be s proper way to do this?

Thank you in advance,
Best,
Yu 

Radu Serban

unread,
Jul 2, 2022, 5:19:54 AMJul 2
to ProjectChrono

Hi Yu,

 

All integrators in Chrono are single step, meaning you can set the state of the body at any step within your main simulation loop without any issues.  Simply use ChBody::SetRot(). Of course, you’ll want to make sure you do that only once, at the time you want, and not also at all subsequent steps.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/843fe9e6-8452-4f87-ac39-db0f2ad077a1n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages