pub struct Simulator { /* private fields */ }Expand description
Main simulation driver.
Implementations§
Source§impl Simulator
impl Simulator
Sourcepub fn with_solver(solver: Box<dyn Solver>) -> Self
pub fn with_solver(solver: Box<dyn Solver>) -> Self
Create a simulator with a custom solver.
Sourcepub fn step_with_jacobians(
&self,
model: &Model,
state: &mut State,
) -> StepJacobians
pub fn step_with_jacobians( &self, model: &Model, state: &mut State, ) -> StepJacobians
Advance simulation by one timestep and return Jacobians.
Sourcepub fn step_with_contacts(
&self,
model: &Model,
state: &mut State,
ground_height: f64,
material: &ContactMaterial,
)
pub fn step_with_contacts( &self, model: &Model, state: &mut State, ground_height: f64, material: &ContactMaterial, )
Advance simulation with contact detection and resolution.
- Runs FK to get body transforms and velocities
- Detects ground contacts (and body-body contacts if geometries provided)
- Computes contact forces
- Runs ABA with contact forces as external forces
- Integrates and updates FK
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Simulator
impl !RefUnwindSafe for Simulator
impl !Send for Simulator
impl !Sync for Simulator
impl Unpin for Simulator
impl UnsafeUnpin for Simulator
impl !UnwindSafe for Simulator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.