Skip to main content

AdjointRollout

Struct AdjointRollout 

Source
pub struct AdjointRollout<'a> {
    pub model: &'a Model,
    pub contact: Option<ContactSetup<'a>>,
    pub q0: Vec<f64>,
    pub v0: Vec<f64>,
    pub steps: usize,
    pub ctrl: &'a dyn Fn(usize) -> DVec,
}
Expand description

A differentiable rollout: model, optional contact, initial state, and an open-loop control schedule.

Fields§

§model: &'a Model

Topology, gravity, timestep, joint damping, and nominal body inertias (the π the gradient is taken at).

§contact: Option<ContactSetup<'a>>

Optional ground contact.

§q0: Vec<f64>

Initial joint positions, in super::step::DofLayout packing (length DofLayout::of(model).nq, which exceeds Model::nq when the model has spherical or free joints).

§v0: Vec<f64>

Initial joint velocities (length nv).

§steps: usize

Number of semi-implicit Euler steps.

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

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

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for AdjointRollout<'a>

§

impl<'a> !Send for AdjointRollout<'a>

§

impl<'a> !Sync for AdjointRollout<'a>

§

impl<'a> !UnwindSafe for AdjointRollout<'a>

§

impl<'a> Freeze for AdjointRollout<'a>

§

impl<'a> Unpin for AdjointRollout<'a>

§

impl<'a> UnsafeUnpin for AdjointRollout<'a>

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.