Skip to main content

JointModel

Trait JointModel 

Source
pub trait JointModel {
    // Required methods
    fn get_joint_type(&self) -> JointType;
    fn nq(&self) -> usize;
    fn nv(&self) -> usize;
    fn neutral(&self) -> Configuration;
    fn create_joint_data(&self) -> JointDataWrapper;
    fn get_axis(&self) -> &SpatialMotion;
    fn random_configuration(&self, rng: &mut ThreadRng) -> Configuration;
    fn subspace(&self, v: &Configuration) -> SpatialMotion;
    fn subspace_dual(&self, f: &SpatialForce) -> Configuration;
    fn bias(&self) -> &SpatialMotion;
    fn subspace_se3(&self, se3: &SE3) -> SpatialMotion;
    fn integrate(&self, q: &Configuration, v: &Configuration) -> Configuration;
}
Expand description

Joint trait for defining joints in a robotic system.

This trait provides a common interface for different joint types, allowing for polymorphic behavior when working with various joint models.

Required Methods§

Source

fn get_joint_type(&self) -> JointType

Returns the joint type.

Source

fn nq(&self) -> usize

Returns the number of position variables.

Source

fn nv(&self) -> usize

Returns the number of velocity variables.

Source

fn neutral(&self) -> Configuration

Returns the neutral configuration of the joint.

Source

fn create_joint_data(&self) -> JointDataWrapper

Creates the joint data.

Source

fn get_axis(&self) -> &SpatialMotion

Returns the axis of the joint, if applicable.

Source

fn random_configuration(&self, rng: &mut ThreadRng) -> Configuration

Returns a random configuration for the joint.

Source

fn subspace(&self, v: &Configuration) -> SpatialMotion

Applies the joint subspace constraint to obtain the motion associated with a given velocity configuration.

Source

fn subspace_dual(&self, f: &SpatialForce) -> Configuration

Applies the dual of the joint subspace constraint to obtain the force/torque associated with a given spatial force.

Source

fn bias(&self) -> &SpatialMotion

Returns the joint bias (Coriolis and centrifugal effects).

Source

fn subspace_se3(&self, se3: &SE3) -> SpatialMotion

Applies the joint subspace constraint to a given SE3 transformation, returning the resulting spatial motion.

Source

fn integrate(&self, q: &Configuration, v: &Configuration) -> Configuration

Integrates the joint configuration given the current configuration and velocity.

Implementors§