pub trait Joint<N>: Downcast + Send + Syncwhere
    N: RealField + Copy,{
Show 17 methods // Required methods fn ndofs(&self) -> usize; fn body_to_parent( &self, parent_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, body_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>> ) -> Isometry<N, Unit<Complex<N>>, 2>; fn update_jacobians( &mut self, body_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, vels: &[N] ); fn integrate(&mut self, parameters: &IntegrationParameters<N>, vels: &[N]); fn apply_displacement(&mut self, disp: &[N]); fn jacobian( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> ); fn jacobian_dot( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> ); fn jacobian_dot_veldiff_mul_coordinates( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, vels: &[N], out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> ); fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity2<N>; fn jacobian_dot_mul_coordinates(&self, vels: &[N]) -> Velocity2<N>; fn default_damping( &self, out: &mut Matrix<N, Dynamic, Const<1>, SliceStorageMut<'_, N, Dynamic, Const<1>, Const<1>, Dynamic>> ); fn clone(&self) -> Box<dyn Joint<N>, Global>; // Provided methods fn nimpulses(&self) -> usize { ... } fn num_velocity_constraints(&self) -> usize { ... } fn velocity_constraints( &self, _params: &IntegrationParameters<N>, _multibody: &Multibody<N>, _link: &MultibodyLink<N>, _assembly_id: usize, _dof_id: usize, _ext_vels: &[N], _ground_j_id: &mut usize, _jacobians: &mut [N], _velocity_constraints: &mut ConstraintSet<N, (), (), usize> ) { ... } fn num_position_constraints(&self) -> usize { ... } fn position_constraint( &self, _i: usize, _multibody: &Multibody<N>, _link: &MultibodyLink<N>, _handle: BodyPartHandle<()>, _dof_id: usize, _jacobians: &mut [N] ) -> Option<GenericNonlinearConstraint<N, ()>> { ... }
}
Expand description

Trait implemented by all joints following the reduced-coordinate formation.

Required Methods§

source

fn ndofs(&self) -> usize

The number of degrees of freedom allowed by the joint.

source

fn body_to_parent( &self, parent_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, body_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>> ) -> Isometry<N, Unit<Complex<N>>, 2>

The position of the multibody link containing this joint relative to its parent.

source

fn update_jacobians( &mut self, body_shift: &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, vels: &[N] )

Update the jacobians of this joint.

source

fn integrate(&mut self, parameters: &IntegrationParameters<N>, vels: &[N])

Integrate the position of this joint.

source

fn apply_displacement(&mut self, disp: &[N])

Apply a displacement to the joint.

source

fn jacobian( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> )

Sets in out the non-zero entries of the joint jacobian transformed by transform.

source

fn jacobian_dot( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> )

Sets in out the non-zero entries of the time-derivative of the joint jacobian transformed by transform.

source

fn jacobian_dot_veldiff_mul_coordinates( &self, transform: &Isometry<N, Unit<Complex<N>>, 2>, vels: &[N], out: &mut Matrix<N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, SliceStorageMut<'_, N, Const<nalgebra::::base::dimension::U3::{constant#0}>, Dynamic, Const<1>, Const<nalgebra::::base::dimension::U3::{constant#0}>>> )

Sets in out the non-zero entries of the velocity-derivative of the time-derivative of the joint jacobian transformed by transform.

source

fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity2<N>

Multiply the joint jacobian by generalized velocities to obtain the relative velocity of the multibody link containing this joint.

source

fn jacobian_dot_mul_coordinates(&self, vels: &[N]) -> Velocity2<N>

Multiply the joint jacobian by generalized accelerations to obtain the relative acceleration of the multibody link containing this joint.

source

fn default_damping( &self, out: &mut Matrix<N, Dynamic, Const<1>, SliceStorageMut<'_, N, Dynamic, Const<1>, Const<1>, Dynamic>> )

Fill out with the non-zero entries of a damping that can be applied by default to ensure a good stability of the joint.

source

fn clone(&self) -> Box<dyn Joint<N>, Global>

Provided Methods§

source

fn nimpulses(&self) -> usize

The maximum number of impulses needed by this joints for its constraints.

source

fn num_velocity_constraints(&self) -> usize

Maximum number of velocity constrains that can be generated by this joint.

source

fn velocity_constraints( &self, _params: &IntegrationParameters<N>, _multibody: &Multibody<N>, _link: &MultibodyLink<N>, _assembly_id: usize, _dof_id: usize, _ext_vels: &[N], _ground_j_id: &mut usize, _jacobians: &mut [N], _velocity_constraints: &mut ConstraintSet<N, (), (), usize> )

Initialize and generate velocity constraints to enforce, e.g., joint limits and motors.

source

fn num_position_constraints(&self) -> usize

The maximum number of non-linear position constraints that can be generated by this joint.

source

fn position_constraint( &self, _i: usize, _multibody: &Multibody<N>, _link: &MultibodyLink<N>, _handle: BodyPartHandle<()>, _dof_id: usize, _jacobians: &mut [N] ) -> Option<GenericNonlinearConstraint<N, ()>>

Initialize and generate the i-th position constraints to enforce, e.g., joint limits.

Implementations§

source§

impl<N> dyn Joint<N>where N: Any + 'static + RealField + Copy,

source

pub fn is<__T>(&self) -> boolwhere __T: Joint<N>,

Returns true if the trait object wraps an object of type __T.

source

pub fn downcast<__T>( self: Box<dyn Joint<N>, Global> ) -> Result<Box<__T, Global>, Box<dyn Joint<N>, Global>>where __T: Joint<N>,

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

source

pub fn downcast_rc<__T>( self: Rc<dyn Joint<N>, Global> ) -> Result<Rc<__T, Global>, Rc<dyn Joint<N>, Global>>where __T: Joint<N>,

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

source

pub fn downcast_ref<__T>(&self) -> Option<&__T>where __T: Joint<N>,

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

source

pub fn downcast_mut<__T>(&mut self) -> Option<&mut __T>where __T: Joint<N>,

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Implementors§

source§

impl<N> Joint<N> for CartesianJoint<N>where N: RealField + Copy,

source§

impl<N> Joint<N> for FixedJoint<N>where N: RealField + Copy,

source§

impl<N> Joint<N> for FreeJoint<N>where N: RealField + Copy,

source§

impl<N> Joint<N> for PrismaticJoint<N>where N: RealField + Copy,

source§

impl<N> Joint<N> for RevoluteJoint<N>where N: RealField + Copy,