pub struct EmbodiedKinematics { /* private fields */ }Expand description
Represents the kinematics of a three-wheeled omni-wheel robot.
Implementations§
Source§impl EmbodiedKinematics
impl EmbodiedKinematics
Sourcepub fn new(wheel_radius: f32, robot_radius: f32) -> Self
pub fn new(wheel_radius: f32, robot_radius: f32) -> Self
Instantiate with a given wheel and robot radii.
Sourcepub fn convert_to_body_frame(
speed: f32,
angle: f32,
orientation: f32,
) -> (f32, f32)
pub fn convert_to_body_frame( speed: f32, angle: f32, orientation: f32, ) -> (f32, f32)
Transform a global motion command into body-frame velocities.
speed is the translational magnitude, angle and orientation are in degrees
(0° = +X, increasing CCW). Returns (vx, vy) in the robot’s body frame.
Sourcepub fn construct_jacobian(&self) -> [[f32; 3]; 3]
pub fn construct_jacobian(&self) -> [[f32; 3]; 3]
Build Jacobian J such that ω_wheels = J * [vx, vy, ω_body]
Sourcepub fn compute_body_velocity(&self, wheel_velocity: [f32; 3]) -> (f32, f32, f32)
pub fn compute_body_velocity(&self, wheel_velocity: [f32; 3]) -> (f32, f32, f32)
Recover body velocities from measured wheel speeds.
§Returns
(vx, vy, ω) where vx/vy are linear body-frame velocities and ω is angular velocity.
Sourcepub fn compute_wheel_velocities(
&self,
speed: f32,
angle: f32,
orientation: f32,
omega: f32,
) -> [f32; 3]
pub fn compute_wheel_velocities( &self, speed: f32, angle: f32, orientation: f32, omega: f32, ) -> [f32; 3]
Compute wheel angular velocities to achieve the desired motion.
speed is forward translational speed, angle and orientation are in degrees,
and omega is rotational speed (deg/sec). Returns an array of wheel speeds.
Auto Trait Implementations§
impl Freeze for EmbodiedKinematics
impl RefUnwindSafe for EmbodiedKinematics
impl Send for EmbodiedKinematics
impl Sync for EmbodiedKinematics
impl Unpin for EmbodiedKinematics
impl UnwindSafe for EmbodiedKinematics
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