Animating Mars Rovers

The Mars Rover’s six-wheeled “rocker-bogie” suspension system is an ingenious mechanical design that allows the vehicle to crawl nimbly over rocky terrain. Visualizing how this system moves has been one of my biggest challenges.

Let’s start with how the rover works in reality. Each of the six wheels has its own electric motor. When the rover wants to go somewhere, it uses those motors to turn the wheels forward. The many joints in the suspension and the rover body are pulled along by friction forces on the wheels, transmitted through the suspension structure. Disregarding side-to-side movement, turning, and slippage, there seem to be five degrees of freedom: two bogie angles, the rocker angle, plus pitch and bank on the rover body. (there is only one degree of freedom in the rocker because the left and right rockers are linked through a differential that ensures they move equally far in opposite directions). All dynamics of these five joints are determined from the geometry of the wheels contacting the ground.

Unfortunately, current off-the-shelf animation software is pretty bad at modeling this system. I have considered two basic approaches: first, what I call a “static” approach, where you specify the XZ position and heading of the rover body, and then attempt to determine the rest of the degrees of freedom based on this. The static approach is not “path-dependent” – it solves for the joint positions on each frame independently, without considering forces or inertia. Second, the “dynamic” approach would actually simulate the full physical system evolving over time.

I tried the “dynamic” approach first, but ran into serious problems. Maya’s rigid body dynamics solver appears to use forward integration and therefore has trouble dealing with the very stiff forces necessary to hold the suspension system together (e.g. the differential bar). Furthermore, its collision model does not come close to generating realistic interaction with the ground. In order to model wheels, it is important to be able to specify friction independently on the lateral and longitudinal axes, but Maya only offers a single isotropic friction control. The new nCloth solver seemed like it would give better results, but nCloth does not handle rigid bodies yet (and using very stiff soft bodies makes the joints seem like they are made of Jell-O).

The “static” approach is somewhat more animator-friendly, because you can easily scrub through time and “puppeteer” the rover motion rather than having to run a full simulation first. (and Maya’s simulation baking feature is horribly broken, but that’s a rant for another day). Disregarding forces and inertia, and just solving for the constrained joints seems like a fairly simple geometry problem. Given the rover body position, you compute the XZ coordinates of the wheels, sample the terrain there to determine the wheel heights, then derive all of the suspension joint angles and rover body pitch/bank from the mechanical constraints. Unfortunately, this seems to be a nonlinear problem, because changing the joint angles also changes the wheel positions, which affects the height of the terrain underneath them. I think a fully “correct” solver would have to use an iterative approach: sample the wheels at zero joint deflection, compute the joint angles, then re-sample the terrain at the updated wheel positions, and continue iterating until the system settles down in a stable configuration.

At this point I have built a rig based on Maya expressions that performs just one iteration. Essentially it makes the approximation that the terrain height underneath each wheel does not change as the joints rotate, which is true in the limit of small joint deflections. This is actually good enough to use for animation shots, with the addition of additional manual keyframe controls to fudge things where the rig fails.

Thinking about this some more, I bet I could develop a “second-order” rig that uses the basic rig as input, but then re-samples the terrain height at the wheel positions determined by the first-order rig. It’s like a poor-man’s iterative solver, done manually with Maya expressions…

Edit: Of course, I did go and read a bunch of papers from the robotics literature about how engineers actually simulate rocker-bogie systems. However, it seems like in all of these cases, they assume you already know the joint angles and wheel contact geometry, and are just solving for forces, or trying to figure out how to rotate the wheels to drive in a given direction. I could not find a paper that gives any guidance about how to simulate driving “from scratch” over arbitrarily complex terrain.

Leave a Reply

Your email address will not be published. Required fields are marked *