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: f64The 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
impl Geometry
Sourcepub fn new(
base_radius: f64,
base_half: f64,
platform_radius: f64,
platform_half: f64,
) -> Self
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.
pub fn legs(&self, tool: &[f64]) -> Legs
Sourcepub fn jacobian(legs: &Legs) -> Vec<f64>
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).
Sourcepub fn inverse(&self, tool: &[f64], q: &mut [f64]) -> bool
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.
Sourcepub fn forward(&self, q: &[f64], tool: &mut [f64])
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.
Sourcepub fn joint_angle(&self, tool: &[f64]) -> f64
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.