The science (equations, sources, simplifications)
Wheel on soil. Soil pressure grows with sinkage (Bekker): p = (kc/b + kphi) zn A rigid wheel of load W sinks z0 = [3W / ((3-n)(k_c + b k_phi) sqrt(D))]^(2/(2n+1)). With slip ratio s = 1 - v/(r w) the shear stress builds up over the contact length L (Janosi-Hanamoto), and Wong's integral gives the thrust:
H = (A c + W tan phi) [1 - (K/(sL)) (1 - e^(-sL/K))]
Rc = (k_c + b k_phi) z^(n+1) / (n+1)
DP = H - Rc - 0.03 W
Drawbar pull DP is what is left to climb or tow. Slip also makes a wheel dig in, modelled here with the empirical slip-sinkage law z = z0 (1 + 0.6 s). DP therefore peaks at a slip s* and falls beyond it: past s* a loaded wheel digs itself deeper (Opportunity's Purgatory Dune in 2005 and Spirit's Troy sand trap in 2009 were exactly this). The rover is in equilibrium on a slope when the common slip solves sum DP_i(s) = m g sin(theta); if the sum never reaches it, the rover is stuck.
Slopes. Wheel loads shift rearward on a climb by (h/wheelbase) m g sin(theta) and to the downhill side on a side slope. Two different limits apply: traction (about atan(mu), always lower on sand) and static tip-over, atan(a/h) with a = half the wheelbase or track and h the centre-of-gravity height. Rocker-bogie rovers were designed to tolerate a 45 degree static tilt; mission rules stop the rover at much smaller tilts (adjustable above). The rocker-bogie differential holds the body pitch at the mean of the two rocker angles and distributes weight almost equally on six wheels (rocker arms 2:1). Here the linkage is solved by inverse kinematics on the actual terrain profile.
Power and the sol. Perseverance carries an MMRTG giving about 110 W electrical at launch (slowly declining) day and night; solar rovers get P = A eta G0 exp(-tau/sin E) cos(i) in daylight only (G0 about 590 W/m2 at Mars, tau = dust optical depth). A sol lasts 24 h 39 m 35 s. Driving power = fixed overhead (electronics, heaters, steering, cameras; illustrative 170 W) + wheel thrust power sum(H) v_w / eta (eta = 0.62 drive train). Slip wastes the share s of the thrust power, and energy per metre grows as 1/(1-s). The energy left for driving is what remains after the baseline load.
Planning loop. Typically one command upload per sol: the team receives yesterday's images through an orbiter relay, plans, and uplinks the drive the next morning. A blind drive is that pre-planned path, checked only against hardware limits (slip, tilt, suspension). AutoNav adds stereo-camera mapping: the rover builds a local hazard map out to about 12 m (here), re-plans with A* on grid cost 1 + 3 w (0.50 slip/limit + 0.25 (tilt/limit)^2 + 0.25 roughness), keeps a margin below the fault limits (80 % of the slip limit, 90 % of the tilt limit), and pauses to think between steps, so it covers less ground per hour but avoids hazards the orbital map cannot show. A* with an octile heuristic is optimal here (the experiment cross-checks it against Dijkstra).
Sources. Bekker 1969, Introduction to Terrain-Vehicle Systems; Wong 2008, Theory of Ground Vehicles; Ding et al. 2011 on wheel slip-sinkage for lunar rovers; Maimone, Cheng and Matthies 2007 (visual odometry on the MER rovers); NASA/JPL reporting on Opportunity's 45.16 km odometry and on the Mars 2020 AutoNav/ENav system. News about Perseverance's new distance record is as reported; this lab does not use mission data.
Approximations. Soil parameters are illustrative values in the range reported for dry simulants, not Jezero measurements. One shared slip for all wheels (real wheels slip individually); quasi-static equilibrium at each step; wheel-soil forces ignore bulldozing and lug effects; side-slope drift is a simple empirical law; wheel speed 4.2 cm/s is the nominal maximum, not a mission rule; power numbers are round figures; orbital map limits (4 m smoothing, boulders over 1.8 m) are stylised. Terrain and rocks are procedural, not a real DEM.