How to setup initial wheel rotation?

25 views
Skip to first unread message

JC Denton

unread,
Dec 26, 2022, 8:25:50 PM12/26/22
to ProjectChrono
I assume  we can get the current wheel orientation using ChWheel::GetState().rot,
which seems to work for the left side of my vehicle, but the right side has the same orientation as the left side.
I setup the wheels according to their corresponding sides:

 m_axles[0]->m_wheels[0] = chrono_types::make_shared<RangeRoverSport_Wheel>("Wheel_FL", true);
    m_axles[0]->m_wheels[1] = chrono_types::make_shared<RangeRoverSport_Wheel>("Wheel_FR", false);
    m_axles[1]->m_wheels[0] = chrono_types::make_shared<RangeRoverSport_Wheel>("Wheel_RL", true);
    m_axles[1]->m_wheels[1] = chrono_types::make_shared<RangeRoverSport_Wheel>("Wheel_RR", false);

and when I query GetState() the positions and rotations are correct except for the Rotations on the Right side. Where can I setup the initial rotation? I figured setting the VehicleSide::RIGHT should do the trick?

Radu Serban

unread,
Dec 27, 2022, 2:57:28 AM12/27/22
to ProjectChrono

This is by design. All wheel reference frames have their Y axis pointing to the left of the vehicle. See https://api.projectchrono.org/vehicle_overview.html#vehicle_ISO_frame for more details on the ISO frame convention used throughout in Chrono::Vehicle.

 

There is no such thing as a “wrong” orientation (it’s all a matter of convention). You just need to take into account the vehicle side a wheel is mounted on when you use (however/wherever you do that) the rotation quaternion in the WheelState struct you get from ChWheel::GetState().

 

--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/56d16b90-f22c-4ecf-b9f4-4b01f8b98ac9n%40googlegroups.com.

JC Denton

unread,
Dec 27, 2022, 3:05:00 AM12/27/22
to ProjectChrono
Great thank you, this was what I was starting to figure, but thank you for confirming!
Reply all
Reply to author
Forward
0 new messages