[−][src]Trait nphysics2d::joint::Joint
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.
fn clone(&self) -> Box<dyn Joint<N>>
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>,
_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>
)
&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>
)
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,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<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> dyn Joint<N> where
N: Any + 'static,
N: Real,
N: Any + 'static,
N: Real,
pub fn is<__T: Joint<N>>(&self) -> bool
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: Joint<N>>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>
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.
pub fn downcast_ref<__T: Joint<N>>(&self) -> Option<&__T>
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn't.
pub fn downcast_mut<__T: Joint<N>>(&mut self) -> Option<&mut __T>
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn't.
Implementors
impl<N: Real> Joint<N> for CartesianJoint<N>
[src]
fn clone(&self) -> Box<dyn Joint<N>>
[src]
fn ndofs(&self) -> usize
[src]
fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
[src]
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
fn update_jacobians(&mut self, _: &Vector<N>, _: &[N])
[src]
fn jacobian(&self, _: &Isometry<N>, out: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot(&self, _: &Isometry<N>, _: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot_veldiff_mul_coordinates(
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
[src]
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity<N>
[src]
fn jacobian_dot_mul_coordinates(&self, _: &[N]) -> Velocity<N>
[src]
fn default_damping(&self, _: &mut DVectorSliceMut<N>)
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn nimpulses(&self) -> usize
[src]
fn num_velocity_constraints(&self) -> usize
[src]
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>
)
[src]
&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>
)
fn num_position_constraints(&self) -> usize
[src]
fn position_constraint(
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
[src]
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
impl<N: Real> Joint<N> for FixedJoint<N>
[src]
fn clone(&self) -> Box<dyn Joint<N>>
[src]
fn ndofs(&self) -> usize
[src]
fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
[src]
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
fn update_jacobians(&mut self, _: &Vector<N>, _: &[N])
[src]
fn jacobian(&self, _: &Isometry<N>, _: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot(&self, _: &Isometry<N>, _: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot_veldiff_mul_coordinates(
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
[src]
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
fn integrate(&mut self, _: &IntegrationParameters<N>, _: &[N])
[src]
fn apply_displacement(&mut self, _: &[N])
[src]
fn jacobian_mul_coordinates(&self, _: &[N]) -> Velocity<N>
[src]
fn jacobian_dot_mul_coordinates(&self, _: &[N]) -> Velocity<N>
[src]
fn default_damping(&self, _: &mut DVectorSliceMut<N>)
[src]
fn nimpulses(&self) -> usize
[src]
fn num_velocity_constraints(&self) -> usize
[src]
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>
)
[src]
&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>
)
fn num_position_constraints(&self) -> usize
[src]
fn position_constraint(
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
[src]
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
impl<N: Real> Joint<N> for FreeJoint<N>
[src]
fn clone(&self) -> Box<dyn Joint<N>>
[src]
fn ndofs(&self) -> usize
[src]
fn body_to_parent(&self, _: &Vector<N>, _: &Vector<N>) -> Isometry<N>
[src]
fn update_jacobians(&mut self, _: &Vector<N>, _: &[N])
[src]
fn jacobian(&self, _: &Isometry<N>, out: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot(&self, _: &Isometry<N>, _: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot_veldiff_mul_coordinates(
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
[src]
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity<N>
[src]
fn jacobian_dot_mul_coordinates(&self, _: &[N]) -> Velocity<N>
[src]
fn default_damping(&self, _: &mut DVectorSliceMut<N>)
[src]
fn nimpulses(&self) -> usize
[src]
fn num_velocity_constraints(&self) -> usize
[src]
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>
)
[src]
&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>
)
fn num_position_constraints(&self) -> usize
[src]
fn position_constraint(
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
[src]
&self,
_i: usize,
_multibody: &Multibody<N>,
_link: &MultibodyLink<N>,
_dof_id: usize,
_jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
impl<N: Real> Joint<N> for PrismaticJoint<N>
[src]
fn clone(&self) -> Box<dyn Joint<N>>
[src]
fn ndofs(&self) -> usize
[src]
fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
[src]
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
fn update_jacobians(&mut self, _: &Vector<N>, _: &[N])
[src]
fn jacobian(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot(&self, _: &Isometry<N>, _: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot_veldiff_mul_coordinates(
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
[src]
&self,
_: &Isometry<N>,
_: &[N],
_: &mut JacobianSliceMut<N>
)
fn default_damping(&self, _: &mut DVectorSliceMut<N>)
[src]
fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn jacobian_mul_coordinates(&self, acc: &[N]) -> Velocity<N>
[src]
fn jacobian_dot_mul_coordinates(&self, _: &[N]) -> Velocity<N>
[src]
fn num_velocity_constraints(&self) -> usize
[src]
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],
constraints: &mut ConstraintSet<N>
)
[src]
&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],
constraints: &mut ConstraintSet<N>
)
fn num_position_constraints(&self) -> usize
[src]
fn position_constraint(
&self,
_: usize,
multibody: &Multibody<N>,
link: &MultibodyLink<N>,
dof_id: usize,
jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
[src]
&self,
_: usize,
multibody: &Multibody<N>,
link: &MultibodyLink<N>,
dof_id: usize,
jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
fn nimpulses(&self) -> usize
[src]
impl<N: Real> Joint<N> for RevoluteJoint<N>
[src]
fn clone(&self) -> Box<dyn Joint<N>>
[src]
fn ndofs(&self) -> usize
[src]
fn body_to_parent(
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
[src]
&self,
parent_shift: &Vector<N>,
body_shift: &Vector<N>
) -> Isometry<N>
fn update_jacobians(&mut self, body_shift: &Vector<N>, vels: &[N])
[src]
fn jacobian(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot(&self, transform: &Isometry<N>, out: &mut JacobianSliceMut<N>)
[src]
fn jacobian_dot_veldiff_mul_coordinates(
&self,
transform: &Isometry<N>,
acc: &[N],
out: &mut JacobianSliceMut<N>
)
[src]
&self,
transform: &Isometry<N>,
acc: &[N],
out: &mut JacobianSliceMut<N>
)
fn integrate(&mut self, params: &IntegrationParameters<N>, vels: &[N])
[src]
fn default_damping(&self, out: &mut DVectorSliceMut<N>)
[src]
fn apply_displacement(&mut self, disp: &[N])
[src]
fn jacobian_mul_coordinates(&self, acc: &[N]) -> Velocity<N>
[src]
fn jacobian_dot_mul_coordinates(&self, acc: &[N]) -> Velocity<N>
[src]
fn num_velocity_constraints(&self) -> usize
[src]
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],
constraints: &mut ConstraintSet<N>
)
[src]
&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],
constraints: &mut ConstraintSet<N>
)
fn num_position_constraints(&self) -> usize
[src]
fn position_constraint(
&self,
_: usize,
multibody: &Multibody<N>,
link: &MultibodyLink<N>,
dof_id: usize,
jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>
[src]
&self,
_: usize,
multibody: &Multibody<N>,
link: &MultibodyLink<N>,
dof_id: usize,
jacobians: &mut [N]
) -> Option<GenericNonlinearConstraint<N>>