Struct Legs
pub struct Legs {
pub e: f64,
pub la: f64,
pub lb: f64,
}Expand description
The legs’ geometry and the kinematics, apart from masses and drives.
Fields§
§e: f64Base radius less platform radius, upper arm, forearm.
la: f64§lb: f64Implementations§
§impl Legs
impl Legs
pub fn new(e: f64, la: f64, lb: f64) -> Legs
pub fn elbow(&self, i: usize, t: f64) -> [[f64; 2]; 3]
pub fn elbow(&self, i: usize, t: f64) -> [[f64; 2]; 3]
The elbow of leg i at arm angle t, and its first and second derivative by t, as (x, z).
pub fn inverse(&self, p: [f64; 2]) -> Option<[f64; 2]>
pub fn inverse(&self, p: [f64; 2]) -> Option<[f64; 2]>
Arm angles for a plate position (x, z), elbows out; None out of reach.
pub fn forward(&self, t: [f64; 2]) -> Option<[f64; 2]>
pub fn forward(&self, t: [f64; 2]) -> Option<[f64; 2]>
The plate position for arm angles: the lower point at a forearm’s length from both elbows. None where the
legs cannot be assembled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Legs
impl RefUnwindSafe for Legs
impl Send for Legs
impl Sync for Legs
impl Unpin for Legs
impl UnsafeUnpin for Legs
impl UnwindSafe for Legs
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