pub struct MotionDomain {
pub speed_mps: Option<f64>,
pub linear_velocity: Option<LinearVelocity>,
pub angular_velocity: Option<AngularVelocity>,
pub linear_acceleration: Option<LinearAcceleration>,
pub angular_acceleration: Option<AngularAcceleration>,
pub odometry: Option<Odometry>,
pub motion_state: Option<MotionState>,
pub frame_id: Option<String>,
pub commanded_linear_mps: Option<f64>,
pub commanded_angular_dps: Option<f64>,
}Expand description
Motion domain containing velocity and movement information.
Fields§
§speed_mps: Option<f64>Overall speed in meters per second
linear_velocity: Option<LinearVelocity>Linear velocity components
angular_velocity: Option<AngularVelocity>Angular velocity components
linear_acceleration: Option<LinearAcceleration>Linear acceleration components
angular_acceleration: Option<AngularAcceleration>Angular acceleration components
odometry: Option<Odometry>Odometry data
motion_state: Option<MotionState>Current motion state
frame_id: Option<String>Reference frame for velocities (e.g., “base_link”, “odom”)
commanded_linear_mps: Option<f64>Commanded linear velocity (from controller)
commanded_angular_dps: Option<f64>Commanded angular velocity (from controller)
Implementations§
Source§impl MotionDomain
impl MotionDomain
Sourcepub fn from_speed(speed_mps: f64) -> Self
pub fn from_speed(speed_mps: f64) -> Self
Create a motion domain with just speed.
Sourcepub fn from_linear(x_mps: f64, y_mps: f64, z_mps: f64) -> Self
pub fn from_linear(x_mps: f64, y_mps: f64, z_mps: f64) -> Self
Create a motion domain with linear velocity components.
Sourcepub fn with_angular(self, yaw_dps: f64) -> Self
pub fn with_angular(self, yaw_dps: f64) -> Self
Builder method to add angular velocity.
Sourcepub fn with_state(self, state: MotionState) -> Self
pub fn with_state(self, state: MotionState) -> Self
Builder method to add motion state.
Sourcepub fn with_odometry(self, distance_m: f64) -> Self
pub fn with_odometry(self, distance_m: f64) -> Self
Builder method to add odometry.
Trait Implementations§
Source§impl Clone for MotionDomain
impl Clone for MotionDomain
Source§fn clone(&self) -> MotionDomain
fn clone(&self) -> MotionDomain
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MotionDomain
impl Debug for MotionDomain
Source§impl Default for MotionDomain
impl Default for MotionDomain
Source§fn default() -> MotionDomain
fn default() -> MotionDomain
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MotionDomain
impl<'de> Deserialize<'de> for MotionDomain
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MotionDomain
impl Serialize for MotionDomain
Auto Trait Implementations§
impl Freeze for MotionDomain
impl RefUnwindSafe for MotionDomain
impl Send for MotionDomain
impl Sync for MotionDomain
impl Unpin for MotionDomain
impl UnwindSafe for MotionDomain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more