Struct multibody_dynamics::multibody::MultiBody
source · Implementations§
source§impl<const NUM_BODIES: usize, const NUM_DOFS: usize> MultiBody<NUM_BODIES, NUM_DOFS>
impl<const NUM_BODIES: usize, const NUM_DOFS: usize> MultiBody<NUM_BODIES, NUM_DOFS>
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>
sourcepub 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,
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.
sourcepub 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>
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$$
sourcepub fn compute_mass_matrix(&self) -> SMatrix<f64, NUM_DOFS, NUM_DOFS>
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.
sourcepub 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>
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).
pub fn compute_jacobians(
&mut self,
config: &Vec<Isometry3<f64>>
) -> Vec<SMatrix<f64, 6, NUM_DOFS>>
pub fn compute_jacobian_derivatives(
&mut self,
mu: &SVector<f64, NUM_DOFS>
) -> Vec<SMatrix<f64, 6, NUM_DOFS>>
pub fn compute_jacobian(
&self,
config: &Vec<Isometry3<f64>>,
body_id: usize
) -> SMatrix<f64, 6, NUM_DOFS>
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<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.