Skip to main content

ConvexContactRollout

Struct ConvexContactRollout 

Source
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 Model

Topology, gravity, timestep, damping, geometry and nominal inertias.

§ground_height: f64

World z of the ground plane (m).

§material: ContactMaterial

Contact material for every body (the same single-material convention Simulator::step_with_contacts uses).

§config: ContactSolverConfig

Solver configuration. Use ContactSolverConfig::simulation to differentiate the physics the simulator ships, or ContactSolverConfig::gradients for smoother sensitivities.

§q0: DVec

Initial joint positions (Model layout, length nq).

§v0: DVec

Initial joint velocities (length nv).

§steps: usize

Number of steps.

§ctrl: &'a dyn Fn(usize) -> DVec

Open-loop control at step t (length nv; must not read the state).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.