MultiBody in multibody_dynamics::multibody - Rust
Description: API documentation for the Rust `MultiBody` struct in crate `multibody_dynamics`.
Keywords: rust, rustlang, rust-lang, MultiBody

# Struct multibody_dynamics::multibody::MultiBody

source ·

    pub struct MultiBody<const NUM_BODIES: usize, const NUM_DOFS: usize> { /* private fields */ }

## Implementations§

source§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> MultiBody<NUM_BODIES, NUM_DOFS>

source

#### pub fn new(
offset_matrices: Vec<Isometry3<f64>>,
mass_matrices: Option<Vec<Matrix6<f64>>>,
inertia_matrices: Option<Vec<Matrix3<f64>>>,
joint_types: Vec<JointType>,
parent: Vec<u16>,
gravity: Vector3<f64>,
r_com: Option<Vec<Vector3<f64>>>,
r_cob: Option<Vec<Vector3<f64>>>,
mass: Option<Vec<f64>>,
volume: Option<Vec<f64>>,
rho: Option<f64>
) -> Result<MultiBody<NUM_BODIES, NUM_DOFS>, &'static str>

source

#### pub fn minimal_to_homogenous_configuration<Configuration, const D: usize>(
&self,
six_dof_vars: &Configuration,
scalar_joint_vars: &SVector<f64, D>
) -> Vec<Isometry3<f64>>where
Configuration: IntoHomogenousConfigurationVec,

Converts a set of minimal coordinates to a set of homogenous coordinates.

source

#### pub fn generalized_newton_euler(
&mut self,
conf: &Vec<Isometry3<f64>>,
mu: &SVector<f64, NUM_DOFS>,
mu_prime: &SVector<f64, NUM_DOFS>,
sigma_prime: &SVector<f64, NUM_DOFS>,
rigid_body_forces: &Vec<Vector6<f64>>,
eta: &SVector<f64, NUM_DOFS>
) -> SVector<f64, NUM_DOFS>

$$E=mc^2$$

source

#### pub fn compute_mass_matrix(&self) -> SMatrix<f64, NUM_DOFS, NUM_DOFS>

Computes the mass matrix of the multibody system using the composite rigid body algorithm (CRB). Assumes that GNE/MNE/AB has been called.

source

#### pub fn forward_dynamics_ab(
&mut self,
conf: &Vec<Isometry3<f64>>,
mu: &SVector<f64, NUM_DOFS>,
damping_forces: &Vec<Vector6<f64>>,
thruster_forces: &Vec<Vector6<f64>>,
eta: &SVector<f64, NUM_DOFS>,
lin_vel_current: &Vector3<f64>,
lin_accel_current: &Vector3<f64>
) -> SVector<f64, NUM_DOFS>

Computes the forward dynamics using the articulated body algorithm (AB).

source

#### pub fn compute_jacobians(
&mut self,
config: &Vec<Isometry3<f64>>
) -> Vec<SMatrix<f64, 6, NUM_DOFS>>

source

#### pub fn compute_jacobian_derivatives(
&mut self,
mu: &SVector<f64, NUM_DOFS>
) -> Vec<SMatrix<f64, 6, NUM_DOFS>>

source

#### pub fn compute_jacobian(
&self,
config: &Vec<Isometry3<f64>>,
body_id: usize
) -> SMatrix<f64, 6, NUM_DOFS>

source

#### pub fn compute_jacobian_derivative(
&self,
config: &Vec<Isometry3<f64>>,
mu: &SVector<f64, NUM_DOFS>,
body_id: usize
) -> SMatrix<f64, 6, NUM_DOFS>

## Auto Trait Implementations§

§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> RefUnwindSafe for MultiBody<NUM_BODIES, NUM_DOFS>

§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> Send for MultiBody<NUM_BODIES, NUM_DOFS>

§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> Sync for MultiBody<NUM_BODIES, NUM_DOFS>

§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> Unpin for MultiBody<NUM_BODIES, NUM_DOFS>

§

### impl<const NUM_BODIES: usize, const NUM_DOFS: usize> UnwindSafe for MultiBody<NUM_BODIES, NUM_DOFS>

## Blanket Implementations§

source§

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

source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
source§

### impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

### impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

### impl<T> From<T> for T

const: unstable · source§

#### fn from(t: T) -> T

Returns the argument unchanged.

source§

### impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · 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> Same<T> for T

§

#### type Output = T

Should always be `Self`
source§

### impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,

source§

#### fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct `self` from the equivalent element of its superset. Read more
source§

#### 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

Use with care! Same as `self.to_subset` but without any property checks. Always succeeds.
source§

#### fn from_subset(element: &SS) -> SP

The inclusion map: converts `self` to the equivalent element of its superset.
source§

### impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

#### type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

### impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.