pub trait FKChain<const N: usize, F: FKScalar = f32>:
Clone
+ Send
+ Sync {
type Error: Into<DekeError>;
// Required methods
fn fk(&self, q: &SRobotQ<N, F>) -> Result<[F::AAffine3; N], Self::Error>;
fn fk_end(&self, q: &SRobotQ<N, F>) -> Result<F::AAffine3, Self::Error>;
fn joint_axes_positions(
&self,
q: &SRobotQ<N, F>,
) -> Result<([F::AVec3; N], [F::AVec3; N], F::AVec3), Self::Error>;
// Provided methods
fn dof(&self) -> usize { ... }
fn base_tf(&self) -> F::AAffine3 { ... }
fn max_reach(&self) -> Result<F, Self::Error> { ... }
fn all_fk(
&self,
q: &SRobotQ<N, F>,
) -> Result<(F::AAffine3, [F::AAffine3; N], F::AAffine3), Self::Error> { ... }
fn jacobian(&self, q: &SRobotQ<N, F>) -> Result<[[F; N]; 6], Self::Error> { ... }
fn jacobian_dot(
&self,
q: &SRobotQ<N, F>,
qdot: &SRobotQ<N, F>,
) -> Result<[[F; N]; 6], Self::Error> { ... }
fn jacobian_ddot(
&self,
q: &SRobotQ<N, F>,
qdot: &SRobotQ<N, F>,
qddot: &SRobotQ<N, F>,
) -> Result<[[F; N]; 6], Self::Error> { ... }
}Required Associated Types§
Required Methods§
fn fk(&self, q: &SRobotQ<N, F>) -> Result<[F::AAffine3; N], Self::Error>
fn fk_end(&self, q: &SRobotQ<N, F>) -> Result<F::AAffine3, Self::Error>
Provided Methods§
fn dof(&self) -> usize
Sourcefn base_tf(&self) -> F::AAffine3
fn base_tf(&self) -> F::AAffine3
Configuration-independent transform from the robot’s base frame to the
world frame. Defaults to identity; wrappers that install a static
prefix (e.g. TransformedFK with a prefix set, or URDFChain
with fixed leading joints baked in) override this so downstream
consumers (collision validators, visualizers) can place the static
base body at the correct pose.
Sourcefn max_reach(&self) -> Result<F, Self::Error>
fn max_reach(&self) -> Result<F, Self::Error>
Theoretical maximum reach: sum of link lengths (upper bound, ignores joint limits).
Sourcefn all_fk(
&self,
q: &SRobotQ<N, F>,
) -> Result<(F::AAffine3, [F::AAffine3; N], F::AAffine3), Self::Error>
fn all_fk( &self, q: &SRobotQ<N, F>, ) -> Result<(F::AAffine3, [F::AAffine3; N], F::AAffine3), Self::Error>
Compute base transform, per-link frames, and the end-effector frame
in one call. Consumers that need all three (collision validators,
visualizers) should prefer this over invoking base_tf, fk,
and fk_end separately.
The default implementation simply chains the three calls; chains
where the work overlaps (e.g. fk_end repeats the joint
accumulation done by fk, or wrappers like
TransformedFK/PrismaticFK that compose an inner chain)
override this to share the inner computation.
Sourcefn jacobian(&self, q: &SRobotQ<N, F>) -> Result<[[F; N]; 6], Self::Error>
fn jacobian(&self, q: &SRobotQ<N, F>) -> Result<[[F; N]; 6], Self::Error>
Geometric Jacobian (6×N) at configuration q.
Rows 0–2: linear velocity, rows 3–5: angular velocity.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.