pub struct RobotContext<T> {
pub model: RobotModel<T>,
pub chain: ChainSpec<T>,
pub dynamics_config: DynamicsConfig<T>,
}Expand description
Shared context binding model, serial chain, and dynamics configuration.
Fields§
§model: RobotModel<T>§chain: ChainSpec<T>§dynamics_config: DynamicsConfig<T>Implementations§
Source§impl<T: NabledReal + Default> RobotContext<T>
impl<T: NabledReal + Default> RobotContext<T>
Sourcepub fn new(
model: RobotModel<T>,
chain: ChainSpec<T>,
dynamics_config: DynamicsConfig<T>,
) -> Self
pub fn new( model: RobotModel<T>, chain: ChainSpec<T>, dynamics_config: DynamicsConfig<T>, ) -> Self
Build context without validation; call Self::validate before use.
Sourcepub fn validate(&self) -> Result<(), SimError>
pub fn validate(&self) -> Result<(), SimError>
Ensure model DOF matches serial chain joint count.
Sourcepub fn extract_chain_for_dynamics(
&self,
base_link: &str,
ee_link: &str,
) -> Result<DynamicsBranchSpec<T>, SimError>
pub fn extract_chain_for_dynamics( &self, base_link: &str, ee_link: &str, ) -> Result<DynamicsBranchSpec<T>, SimError>
Extract a serial branch for branch dynamics (compose-down to nabled-model).
Trait Implementations§
Source§impl<T: Clone> Clone for RobotContext<T>
impl<T: Clone> Clone for RobotContext<T>
Source§fn clone(&self) -> RobotContext<T>
fn clone(&self) -> RobotContext<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for RobotContext<T>
impl<T: Debug> Debug for RobotContext<T>
Source§impl<T: PartialEq> PartialEq for RobotContext<T>
impl<T: PartialEq> PartialEq for RobotContext<T>
Source§fn eq(&self, other: &RobotContext<T>) -> bool
fn eq(&self, other: &RobotContext<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T> StructuralPartialEq for RobotContext<T>
Auto Trait Implementations§
impl<T> Freeze for RobotContext<T>where
T: Freeze,
impl<T> RefUnwindSafe for RobotContext<T>where
T: RefUnwindSafe,
impl<T> Send for RobotContext<T>where
T: Send,
impl<T> Sync for RobotContext<T>where
T: Sync,
impl<T> Unpin for RobotContext<T>where
T: Unpin,
impl<T> UnsafeUnpin for RobotContext<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RobotContext<T>where
T: UnwindSafe + RefUnwindSafe,
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