| --------------- PointAccelerationParentToLocal( const ChVector< Real > & parentpos, const ChVector< Real > & parentspeed, const ChVector< Real > & parentacc ) "Given the position of a point in parent frame coords, and assuming it has an absolute speed parentspeed and absolute acceleration parentacc, return the acceleration in local coords." -------------- I would like to ask about two things in this documentation: 1) Is parentpos the position of the point in the parent coordinate system? 2) Is the parentspeed and parentacc the speed and acceleration of the parent frame, or is it the speed and acceleration of the point in parent coordinates? I have tried the following unsuccessful code: carposition = car_array[0]->chassis->GetPos(); carspeed = car_array[0]->chassis->GetPos_dt(); caraccel = car_array[0]->chassis->GetPos_dtdt(); localaccel = car_array[0]->chassis->PointAccelerationParentToLocal (carposition, carspeed, caraccel); //gives me all zeros... | |||
Any help would be appreciated here. Also, thank you to the developers of Project Chrono for a high quality simulation product. |
|||
-Zamir |
|||
Hi Zamir,
The functions you are attempting to use deal with the case where the point on body also has relative motion to the body frame; i.e. it is not fixed in the body frame.
In particular, when you do something like:
auto acc = body->PointAccelerationParentToLocal(body->GetPos(), body->GetPos_dt(), body->GetPos_dtdt());
you should indeed get (0,0,0) indicating that the point you specified (in this case the body center of mass) has 0 acceleration *with respect to the body frame*.
By the way, I realize that these functions have somewhat confusing names and are not all that well documented -- we will have to work on fixing that.
If I understand correctly what you are after, all you need to do is take the body acceleration expressed in the global frame (as reported by ChBody::GetPos_dtdt) and express it in the body local frame. You can do this using, for example:
auto acc_local = body->TransformDirectionParentToLocal(my_body->GetPos_dtdt());
This will give you the acceleration of the body origin (its center of mass) expressed in the (centroidal) body frame.
If you want to find the acceleration of some point *fixed* in the body frame, you could use something like:
auto acc_global = body->PointAccelerationLocalToParent(local_point);
auto acc_local = body->TransformDirectionParentToLocal(acc_global);
The first line will give you the acceleration of the body-fixed point, expressed in the global frame; the second one will express that acceleration in the (centroidal) body frame.
--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 post to this group, send email to projec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/f11e226d-1ade-4e9e-8fd2-217ea9a49d18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.