Struct realsense_rust::frame::MotionFrame [−][src]
pub struct MotionFrame<Kind> { /* fields omitted */ }
Expand description
Holds the raw data pointer and derived data from an RS2 Motion Frame.
All fields in this struct are initialized during struct creation (via try_from
).
Everything called from here during runtime should be valid as long as the
Frame is in scope… like normal Rust.
Implementations
Returns a 3-item array representing the sensor motion recorded in the Accel frame.
Accelerations are reported as [x, y, z] values, and are in units of m/s^2
This function will return different data conventions entirely depending on the device used to create the measurement.
Intel RealSense D435i
motion[0]
: Positive x-axis points to the right.motion[1]
: Positive y-axis points down.motion[2]
: Positive z-axis points forward.
Intel RealSense T265
motion[0]
: Positive X direction is towards right imager.motion[1]
: Positive Y direction is upwards toward the top of the device.motion[2]
: Positive Z direction is inwards toward the back of the device.
Read more about the coordinate frames of RealSense motion in the RealSense docs
Returns a 3-item array representing the sensor motion recorded in the Gyro frame.
Gyroscope measurements are reported as [x, y, z] values, and are in units of radians/s
This function will return different data conventions entirely depending on the device used to create the measurement.
Intel RealSense D435i
motion[0]
: Positive x-axis points to the right.motion[1]
: Positive y-axis points down.motion[2]
: Positive z-axis points forward.
Intel RealSense T265
motion[0]
: Positive X direction is towards right imager.motion[1]
: Positive Y direction is upwards toward the top of the device.motion[2]
: Positive Z direction is inwards toward the back of the device.
Read more about the coordinate frames of RealSense motion in the RealSense docs
Trait Implementations
Attempt to create an Image frame of extension K from the raw rs2_frame
. All
members of the ImageFrame struct are validated and populated during this call.
Errors
There are a number of errors that may occur if the data in the rs2_frame
is not
valid, all of type FrameConstructionError.
- CouldNotGetTimestamp
- CouldNotGetTimestampDomain
- CouldNotGetFrameStreamProfile
- CouldNotGetDataSize
- CouldNotGetData
See FrameConstructionError documentation for more details.
Auto Trait Implementations
impl<Kind> RefUnwindSafe for MotionFrame<Kind> where
Kind: RefUnwindSafe,
impl<Kind> !Sync for MotionFrame<Kind>
impl<Kind> Unpin for MotionFrame<Kind> where
Kind: Unpin,
impl<Kind> UnwindSafe for MotionFrame<Kind> where
Kind: UnwindSafe,