Suspension disconnected from chassis?

8 views
Skip to first unread message

JC Denton

unread,
Mar 12, 2023, 6:56:38 PM3/12/23
to ProjectChrono
I'm having an issue where my vehicles suspension and spindle don't appear connected to the rest of the vehicle.

When visualizing the components at runtime, I gather the vehicle's wheels, body, suspension and spindle locations and set them according to their values.

I'm getting the body position via:
Vehicle->GetPos();

the wheel positions via:
Vehicle->GetWheel(0, RIGHT)->GetState().pos
Vehicle->GetWheel(0, LEFT)->GetState().pos
Vehicle->GetWheel(1, RIGHT)->GetState().pos
Vehicle->GetWheel(1, LEFT)->GetState().pos

The suspension locations via:
Vehicle->GetAxle(0)->m_suspension->GetRelPosition() +  Vehicle->GetPos();
Vehicle->GetAxle(1)->m_suspension->GetRelPosition() +  Vehicle->GetPos();

and the spindle locations via:
Vehicle->GetAxle(0)->m_suspension->GetSpindlePos(VehicleSide::RIGHT);
Vehicle->GetAxle(0)->m_suspension->GetSpindlePos(VehicleSide::LEFT);
Vehicle->GetAxle(1)->m_suspension->GetSpindlePos(VehicleSide::RIGHT);
Vehicle->GetAxle(1)->m_suspension->GetSpindlePos(VehicleSide::LEFT);

As you can see in this video, the chassis and wheel positions are reasonable, but the suspensions and spindles (marked with white text) are not in the correct position, and they move further and further to the rear of the vehicle the longer the simulation continues.

https://youtu.be/Rzg26OFCrW4

The relative position of the suspension continues to increase relative to the chassis as the simulation continues.

Any potential things that could cause this? I assumed the suspension was fixed to the chassis, and the spindles were fixes to the suspension (+- the suspension limits). Also assumed the wheels would be attached to the spindle, so it seems odd that they don't seem to be connected.

In addition, the vehicle continually moves backwards, despite the wheels not turning.

Reply all
Reply to author
Forward
0 new messages