pub struct FrameTransform {
pub timestamp: Option<Timestamp>,
pub parent_frame_id: String,
pub child_frame_id: String,
pub translation: Option<Vector3>,
pub rotation: Option<Quaternion>,
}Expand description
A transform between two reference frames in 3D space. The transform defines the position and orientation of a child frame within a parent frame. Translation moves the origin of the child frame relative to the parent origin. The rotation changes the orientation of the child frame around its origin.
Examples:
-
With translation (x=1, y=0, z=0) and identity rotation (x=0, y=0, z=0, w=1), a point at (x=0, y=0, z=0) in the child frame maps to (x=1, y=0, z=0) in the parent frame.
-
With translation (x=1, y=2, z=0) and a 90-degree rotation around the z-axis (x=0, y=0, z=0.707, w=0.707), a point at (x=1, y=0, z=0) in the child frame maps to (x=-1, y=3, z=0) in the parent frame.
https://docs.foxglove.dev/docs/visualization/message-schemas/frame-transform
Fields§
§timestamp: Option<Timestamp>Timestamp of transform
parent_frame_id: StringName of the parent frame
child_frame_id: StringName of the child frame
translation: Option<Vector3>Translation component of the transform, representing the position of the child frame’s origin in the parent frame.
rotation: Option<Quaternion>Rotation component of the transform, representing the orientation of the child frame in the parent frame
Trait Implementations§
Source§impl Clone for FrameTransform
impl Clone for FrameTransform
Source§fn clone(&self) -> FrameTransform
fn clone(&self) -> FrameTransform
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FrameTransform
impl Debug for FrameTransform
Source§impl Default for FrameTransform
impl Default for FrameTransform
Source§impl<'de> Deserialize<'de> for FrameTransform
Available on crate feature serde only.
impl<'de> Deserialize<'de> for FrameTransform
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encode for FrameTransform
impl Encode for FrameTransform
Source§impl Message for FrameTransform
impl Message for FrameTransform
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for FrameTransform
impl PartialEq for FrameTransform
Source§impl Serialize for FrameTransform
Available on crate feature serde only.
impl Serialize for FrameTransform
serde only.