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§
Sourcefn get_joint_type(&self) -> JointType
fn get_joint_type(&self) -> JointType
Returns the joint type.
Sourcefn neutral(&self) -> Configuration
fn neutral(&self) -> Configuration
Returns the neutral configuration of the joint.
Sourcefn create_joint_data(&self) -> JointDataWrapper
fn create_joint_data(&self) -> JointDataWrapper
Creates the joint data.
Sourcefn get_axis(&self) -> &SpatialMotion
fn get_axis(&self) -> &SpatialMotion
Returns the axis of the joint, if applicable.
Sourcefn random_configuration(&self, rng: &mut ThreadRng) -> Configuration
fn random_configuration(&self, rng: &mut ThreadRng) -> Configuration
Returns a random configuration for the joint.
Sourcefn subspace(&self, v: &Configuration) -> SpatialMotion
fn subspace(&self, v: &Configuration) -> SpatialMotion
Applies the joint subspace constraint to obtain the motion associated with a given velocity configuration.
Sourcefn subspace_dual(&self, f: &SpatialForce) -> Configuration
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.
Sourcefn bias(&self) -> &SpatialMotion
fn bias(&self) -> &SpatialMotion
Returns the joint bias (Coriolis and centrifugal effects).
Sourcefn subspace_se3(&self, se3: &SE3) -> SpatialMotion
fn subspace_se3(&self, se3: &SE3) -> SpatialMotion
Applies the joint subspace constraint to a given SE3 transformation, returning the resulting spatial motion.
Sourcefn integrate(&self, q: &Configuration, v: &Configuration) -> Configuration
fn integrate(&self, q: &Configuration, v: &Configuration) -> Configuration
Integrates the joint configuration given the current configuration and velocity.