Animating an Articulated Bus?

Hello!
I wonder if there’s a way of simulating the articulation joint movements when a bus is going along a curvy road.
The bus should have 2 non-deforming cubes and a joint object which ties 2 cubes together and when this system follows a path, cubes will remain attached to the joint and joint will deform.

I already tried using softbody and curve modifier; softbody doesn’t give that curve which matches the path it just deforms the joint. Curve modifier deforms the whole system, even the rigid parts.

Anyone have an idea?