Skip to main content

Geometry

Struct Geometry 

Source
pub struct Geometry {
    pub base: [V3; 6],
    pub anchors: [V3; 6],
    pub platform_radius: f64,
    pub closed: f64,
    pub stroke: f64,
    pub max_joint_angle: f64,
    pub max_condition: f64,
    pub home: [f64; 6],
}
Expand description

The hexapod’s geometry and kinematics, apart from masses and drives.

Fields§

§base: [V3; 6]

Base joints (base frame) and platform joints (platform frame).

§anchors: [V3; 6]§platform_radius: f64§closed: f64§stroke: f64§max_joint_angle: f64

The steepest angle a leg may make with the base’s normal at its base joint and with the platform’s normal at its platform joint, rad.

§max_condition: f64§home: [f64; 6]

The pose Newton’s forward kinematics starts from: the centre of the tool’s box.

Implementations§

Source§

impl Geometry

Source

pub fn new( base_radius: f64, base_half: f64, platform_radius: f64, platform_half: f64, ) -> Self

Joints at the azimuths 120 k -+ the base half angle and 120 k -+ (60 - the platform half angle), degrees.

Source

pub fn legs_at(&self, p: V3, r: &M3) -> Legs

The legs with the platform at p turned by r.

Source

pub fn legs(&self, tool: &[f64]) -> Legs

Source

pub fn jacobian(legs: &Legs) -> Vec<f64>

The Jacobian J (6 x 6, row by row) of the legs’ extension rates over the platform’s twist (v, w).

Source

pub fn inverse(&self, tool: &[f64], q: &mut [f64]) -> bool

Leg extensions for a tool pose (closed form); false where a leg would be of no length.

Source

pub fn forward(&self, q: &[f64], tool: &mut [f64])

The tool pose for leg extensions, by Newton’s method from home; NaN where it does not converge.

Source

pub fn joint_angle(&self, tool: &[f64]) -> f64

The steepest leg angle at the joints, rad: against the base’s normal and against the platform’s.

Source

pub fn condition(&self, tool: &[f64]) -> f64

The condition number of J with the turns weighed by the platform radius (the platform joints’ speed for w).

Trait Implementations§

Source§

impl Clone for Geometry

Source§

fn clone(&self) -> Geometry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Geometry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.