pub struct TransformedFK<const N: usize, FK: FKChain<N>> { /* private fields */ }Expand description
Wraps an FKChain with an optional prefix (base) and/or suffix (tool) transform.
fkapplies only the prefix — intermediate frames stay in world coordinates without the tool offset.fk_endandjoint_axes_positionsapply both — the end-effector includes the tool tip.
Implementations§
Source§impl<const N: usize, FK: FKChain<N>> TransformedFK<N, FK>
impl<const N: usize, FK: FKChain<N>> TransformedFK<N, FK>
pub const fn new(inner: FK) -> Self
pub const fn with_prefix(self, prefix: Affine3A) -> Self
pub const fn with_suffix(self, suffix: Affine3A) -> Self
Sourcepub const fn with_prefix_opt(self, prefix: Option<Affine3A>) -> Self
pub const fn with_prefix_opt(self, prefix: Option<Affine3A>) -> Self
Infallible const-usable setter for the prefix. None clears any
previously set prefix. Pair with compose_fixed_joints (const) to
build the prefix from a slice of Fixed joints in a const context.
Sourcepub const fn with_suffix_opt(self, suffix: Option<Affine3A>) -> Self
pub const fn with_suffix_opt(self, suffix: Option<Affine3A>) -> Self
Infallible const-usable setter for the suffix. None clears any
previously set suffix. Pair with compose_fixed_joints (const) to
build the suffix from a slice of Fixed joints in a const context.
Sourcepub fn with_prefix_joints(
self,
joints: &[URDFJoint],
) -> Result<Self, URDFBuildError>
pub fn with_prefix_joints( self, joints: &[URDFJoint], ) -> Result<Self, URDFBuildError>
Compose a slice of fixed URDF joints (parent→child order) and set the
result as the base-side prefix transform, replacing any existing
prefix. Every joint in joints must be URDFJointType::Fixed. An
empty slice clears the prefix.
Sourcepub fn with_suffix_joints(
self,
joints: &[URDFJoint],
) -> Result<Self, URDFBuildError>
pub fn with_suffix_joints( self, joints: &[URDFJoint], ) -> Result<Self, URDFBuildError>
Compose a slice of fixed URDF joints (parent→child order) and set the
result as the tool-side suffix transform, replacing any existing
suffix. Every joint in joints must be URDFJointType::Fixed. An
empty slice clears the suffix.
pub fn set_prefix(&mut self, prefix: Option<Affine3A>)
pub fn set_suffix(&mut self, suffix: Option<Affine3A>)
pub fn prefix(&self) -> Option<&Affine3A>
pub fn suffix(&self) -> Option<&Affine3A>
pub fn inner(&self) -> &FK
Trait Implementations§
Source§impl<const N: usize, FK: Clone + FKChain<N>> Clone for TransformedFK<N, FK>
impl<const N: usize, FK: Clone + FKChain<N>> Clone for TransformedFK<N, FK>
Source§fn clone(&self) -> TransformedFK<N, FK>
fn clone(&self) -> TransformedFK<N, FK>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const N: usize, FK: FKChain<N>> FKChain<N> for TransformedFK<N, FK>
impl<const N: usize, FK: FKChain<N>> FKChain<N> for TransformedFK<N, FK>
type Error = <FK as FKChain<N>>::Error
Source§fn base_tf(&self) -> Affine3A
fn base_tf(&self) -> Affine3A
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.Source§fn max_reach(&self) -> Result<f32, Self::Error>
fn max_reach(&self) -> Result<f32, Self::Error>
fn fk(&self, q: &SRobotQ<N>) -> Result<[Affine3A; N], Self::Error>
fn fk_end(&self, q: &SRobotQ<N>) -> Result<Affine3A, Self::Error>
Source§fn joint_axes_positions(
&self,
q: &SRobotQ<N>,
) -> Result<([Vec3A; N], [Vec3A; N], Vec3A), Self::Error>
fn joint_axes_positions( &self, q: &SRobotQ<N>, ) -> Result<([Vec3A; N], [Vec3A; N], Vec3A), Self::Error>
q, plus the end-effector position.fn dof(&self) -> usize
Source§fn jacobian(&self, q: &SRobotQ<N>) -> Result<[[f32; N]; 6], Self::Error>
fn jacobian(&self, q: &SRobotQ<N>) -> Result<[[f32; N]; 6], Self::Error>
q.
Rows 0–2: linear velocity, rows 3–5: angular velocity.