Skip to main content

dynamics_joint/
lib.rs

1//! This crate is part of the `dynamics` ecosystem, and is not intended for direct use.
2//!
3//! This module provides structures and traits to represent joints in a robot model.
4//!
5//! ## Architecture
6//! In order to use static dispatch for different joint types while maintaining a common interface, the following architecture is implemented:
7//! * The `JointModel` trait defines the common interface, implemented by specific joint types.
8//! * Different joint types (e.g., `JointModelContinuous`, `JointModelPrismatic`, `JointModelRevolute`, `JointModelFixed`) implement the `JointModel` trait.
9//! * The `JointModelImpl` enum encapsulates different joint model implementations.
10//! * The `JointWrapper` struct provides a unified interface to interact with different joint types through the `JointModel` trait. This is the main entry point for users of the library.
11//!
12//! ## Joint types
13//! The following joint types are implemented:
14//! - [`continuous::JointModelContinuous`]: Represents a continuous joint that can rotate indefinitely around a fixed axis.
15//! - [`prismatic::JointModelPrismatic`]: Represents a prismatic joint that allows linear motion along a fixed axis.
16//! - [`revolute::JointModelRevolute`]: Represents a revolute joint that allows rotation around a fixed axis with limits. This is similar to the continuous joint but with defined limits on the rotation.
17//! - [`fixed::JointModelFixed`]: Represents a fixed joint with no degrees of freedom.
18//!
19//! The following table summarizes the number of configuration variables (`nq`) and velocity variables (`nv`) for each joint type:
20//! <center>
21//!
22//! | Joint      | `nq` | `nv` | Description        |
23//! |------------|------|------|--------------------|
24//! | Continuous | 2    | 1    | Unbounded rotation |
25//! | Prismatic  | 1    | 1    | Linear motion      |
26//! | Revolute   | 1    | 1    | Bounded rotation   |
27//! | Fixed      | 0    | 0    | No motion          |
28//!
29//! </center>
30
31pub mod joint;
32pub mod joint_data;
33pub mod limits;
34
35pub mod continuous;
36pub mod fixed;
37pub mod prismatic;
38pub mod revolute;
39
40#[cfg(feature = "python")]
41pub mod py_joint;
42#[cfg(feature = "python")]
43pub mod py_joint_data;