Trait nphysics3d::joint::Joint [−][src]
pub trait Joint<N: Real>: Any + Send + Sync { fn ndofs(&self) -> usize; fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>; fn update_jacobians(&mut self, body_shift: &Vector<N>, vels: &[N]); fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N]); fn apply_displacement(&mut self, disp: &[N]); fn jacobian(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>); fn jacobian_dot(
&self,
transform: &Isometry<N>,
out: &mut JacobianSliceMut<N>
); fn jacobian_dot_veldiff_mul_coordinates(
&self,
transform: &Isometry<N>,
vels: &[N],
out: &mut JacobianSliceMut<N>
); fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity<N>; fn jacobian_dot_mul_coordinates(&self, vels: &[N]) -> Velocity<N>; fn default_damping(&self, out: &mut DVectorSliceMut<N>); fn nimpulses(&self) -> usize { ... } fn num_velocity_constraints(&self) -> usize { ... } fn velocity_constraints(
&self,
_params: &IntegrationParameters<N>,
_link: &MultibodyLinkRef<N>,
_assembly_id: usize,
_dof_id: usize,
_ext_vels: &[N],
_ground_j_id: &mut usize,
_jacobians: &mut [N],
_velocity_constraints: &mut ConstraintSet<N>
) { ... } fn num_position_constraints(&self) -> usize { ... } fn position_constraint(
&self,
_i: usize,
_link: &MultibodyLinkRef<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>> { ... } }
Trait implemented by all joints following the reduced-coordinate formation.
Required Methods
fn ndofs(&self) -> usize
The number of degrees of freedom allowed by the joint.
fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
The position of the multibody link containing this joint relative to its parent.
fn update_jacobians(&mut self, body_shift: &Vector<N>, vels: &[N])
Update the jacobians of this joint.
fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])
Integrate the position of this joint.
fn apply_displacement(&mut self, disp: &[N])
Apply a displacement to the joint.
fn jacobian(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)
Sets in out
the non-zero entries of the joint jacobian transformed by transform
.
fn jacobian_dot(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)
Sets in out
the non-zero entries of the time-derivative of the joint jacobian transformed by transform
.
fn jacobian_dot_veldiff_mul_coordinates(
&self,
transform: &Isometry<N>,
vels: &[N],
out: &mut JacobianSliceMut<N>
)
&self,
transform: &Isometry<N>,
vels: &[N],
out: &mut JacobianSliceMut<N>
)
Sets in out
the non-zero entries of the velocity-derivative of the time-derivative of the joint jacobian transformed by transform
.
fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity<N>
Multiply the joint jacobian by generalized velocities to obtain the relative velocity of the multibody link containing this joint.
fn jacobian_dot_mul_coordinates(&self, vels: &[N]) -> Velocity<N>
Multiply the joint jacobian by generalized accelerations to obtain the relative acceleration of the multibody link containing this joint.
fn default_damping(&self, out: &mut DVectorSliceMut<N>)
Fill out
with the non-zero entries of a damping that can be applied by default to ensure a good stability of the joint.
Provided Methods
fn nimpulses(&self) -> usize
The maximum number of impulses needed by this joints for its constraints.
fn num_velocity_constraints(&self) -> usize
Maximum number of velocity constrains that can be generated by this joint.
fn velocity_constraints(
&self,
_params: &IntegrationParameters<N>,
_link: &MultibodyLinkRef<N>,
_assembly_id: usize,
_dof_id: usize,
_ext_vels: &[N],
_ground_j_id: &mut usize,
_jacobians: &mut [N],
_velocity_constraints: &mut ConstraintSet<N>
)
&self,
_params: &IntegrationParameters<N>,
_link: &MultibodyLinkRef<N>,
_assembly_id: usize,
_dof_id: usize,
_ext_vels: &[N],
_ground_j_id: &mut usize,
_jacobians: &mut [N],
_velocity_constraints: &mut ConstraintSet<N>
)
Initialize and generate velocity constraints to enforce, e.g., joint limits and motors.
fn num_position_constraints(&self) -> usize
The maximum number of non-linear position constraints that can be generated by this joint.
fn position_constraint(
&self,
_i: usize,
_link: &MultibodyLinkRef<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
&self,
_i: usize,
_link: &MultibodyLinkRef<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
Initialize and generate the i-th position constraints to enforce, e.g., joint limits.
Methods
impl<N> Joint<N> where
N: Real,
impl<N> Joint<N> where
N: Real,
pub fn is<_T>(&self) -> bool where
_T: Any,
Self: Downcast<_T>,
pub fn is<_T>(&self) -> bool where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut Rpub unsafe fn downcast_ref_unchecked<_T>(&self) -> &_T where
_T: Any,
Self: Downcast<_T>,
pub unsafe fn downcast_ref_unchecked<_T>(&self) -> &_T where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut Rpub unsafe fn downcast_mut_unchecked<_T>(&mut self) -> &mut _T where
_T: Any,
Self: Downcast<_T>,
pub unsafe fn downcast_mut_unchecked<_T>(&mut self) -> &mut _T where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for Box<R>pub unsafe fn downcast_unchecked<_T>(self: Box<Self>) -> Box<_T> where
_T: Any,
Self: Downcast<_T>,
pub unsafe fn downcast_unchecked<_T>(self: Box<Self>) -> Box<_T> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast<_T>(
self: Box<Self>
) -> Result<Box<_T>, DowncastError<Box<Self>>> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast<_T>(
self: Box<Self>
) -> Result<Box<_T>, DowncastError<Box<Self>>> where
_T: Any,
Self: Downcast<_T>,
Trait Implementations
impl<_T: Any, N> Downcast<_T> for Joint<N> where
_T: Any,
N: 'static,
N: Real,
impl<_T: Any, N> Downcast<_T> for Joint<N> where
_T: Any,
N: 'static,
N: Real,
fn is_type(&self) -> bool
[src]
fn is_type(&self) -> bool
ⓘImportant traits for &'a mut Runsafe fn downcast_ref_unchecked(&self) -> &T
[src]
unsafe fn downcast_ref_unchecked(&self) -> &T
fn downcast_ref(&self) -> Result<&T, TypeMismatch>
[src]
fn downcast_ref(&self) -> Result<&T, TypeMismatch>
ⓘImportant traits for &'a mut Runsafe fn downcast_mut_unchecked(&mut self) -> &mut T
[src]
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T
fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>
[src]
fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>
ⓘImportant traits for Box<R>unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>
[src]
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>
fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>
[src]
fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>
Implementors
impl<N: Real> Joint<N> for CartesianJoint<N>
impl<N: Real> Joint<N> for FixedJoint<N>
impl<N: Real> Joint<N> for FreeJoint<N>
impl<N: Real> Joint<N> for PrismaticJoint<N>
impl<N: Real> Joint<N> for RevoluteJoint<N>
impl<N: Real> Joint<N> for BallJoint<N>
impl<N: Real> Joint<N> for CylindricalJoint<N>
impl<N: Real> Joint<N> for HelicalJoint<N>
impl<N: Real> Joint<N> for PinSlotJoint<N>
impl<N: Real> Joint<N> for PlanarJoint<N>
impl<N: Real> Joint<N> for RectangularJoint<N>
impl<N: Real> Joint<N> for UniversalJoint<N>