pub struct ConvexContactRollout<'a> {
pub model: &'a Model,
pub ground_height: f64,
pub material: ContactMaterial,
pub config: ContactSolverConfig,
pub q0: DVec,
pub v0: DVec,
pub steps: usize,
pub ctrl: &'a dyn Fn(usize) -> DVec,
}Expand description
A differentiable rollout through the forward simulator’s contact path.
The forward dynamics are exactly phyz::Simulator::step_with_contacts:
ground contact detection with margin, convex assembly, warm-started
active-set Newton solve, semi-implicit Euler integration.
Fields§
§model: &'a ModelTopology, gravity, timestep, damping, geometry and nominal inertias.
ground_height: f64World z of the ground plane (m).
material: ContactMaterialContact material for every body (the same single-material convention
Simulator::step_with_contacts uses).
config: ContactSolverConfigSolver configuration. Use ContactSolverConfig::simulation to
differentiate the physics the simulator ships, or
ContactSolverConfig::gradients for smoother sensitivities.
q0: DVecInitial joint positions (Model layout, length nq).
v0: DVecInitial joint velocities (length nv).
steps: usizeNumber of steps.
ctrl: &'a dyn Fn(usize) -> DVecOpen-loop control at step t (length nv; must not read the state).