--
You received this message because you are subscribed to a topic in the Google Groups "ProjectChrono" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/projectchrono/bGrK7NFxsBI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/235b7608-63bb-46a4-91e0-0f27f75e0e06n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/1730ba00-7e2a-43eb-b546-e82ce77b3293n%40googlegroups.com.
wheel = self.my_hmmwv.GetVehicle().GetWheel(0, 0).GetSpindle()
wheel_normal_abs = wheel.GetA().Get_A_Yaxis()
wheel_normal_loc = self.my_hmmwv.GetChassisBody(
).TransformDirectionParentToLocal(wheel_normal_abs)
wheel_angle = np.arctan2(
wheel_normal_loc.y, wheel_normal_loc.x) - np.pi/2
toe_in = wheel_angle
Prakhar,
You can use the functions ChFrameMoving:: GetWvel_loc() and ChFrameMoving::GetWvel_par() to get the angular velocity of a body, expressed in the local and absolute reference frames, respectively.
For a ChBody in Chrono (centroidal reference frame), you can call those methods directly on the body object (since ChBody is a ChFrameMoving).
However, when for a vehicle’s chassis body (which is modeled as a ChBodyAuxRef; i.e. a body with a non-centroidal reference frame), you will want to use something like:
auto w = vehicle. GetRefFrame().GetWvel_loc();
to get the angular velocity of the chassis reference frame expressed in the chassis reference frame. Then get the component along the Z axis of that chassis reference frame to get the yaw rate.
I should maybe provide wrapper functions to get this type of information for a ChVehicle.
--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/10a6bc2f-5519-4a21-b4e3-ab79932c2765n%40googlegroups.com.