Skip to main content

Crate vvcm_rs

Crate vvcm_rs 

Source
Expand description

Forward kinematics and simulation utilities for the Virtual Variable Cables Model (VVCM).

The crate exposes nalgebra point and vector types directly. Length values are unitless to the type system and must be consistent across each solve. The FK engine normalizes coordinates internally for numerical stability and maps results back to the caller’s coordinate frames.

§Basic usage

use vvcm_rs::{point2, Point2, VvcmFk};

let formation: Vec<Point2> = vec![
    point2((213.7, 122.7)),
    point2((804.6, 37.2)),
    point2((904.0, 550.0)),
    point2((439.3, 715.9)),
];

let sheet: Vec<Point2> = vec![
    point2((-316.1, -421.9)),
    point2((803.4, -384.1)),
    point2((746.1, 712.8)),
    point2((-367.3, 664.2)),
];

let mut fk = VvcmFk::new(1000.0, sheet)?;
let solutions = fk.update_stable_solutions(&formation)?;

assert!(solutions.stable_count() > 0);

Re-exports§

pub use error::VvcmError;
pub use fk::VvcmFk;
pub use manual_simulation::VvcmManualSimulation;
pub use simulation::VvcmSimulation;
pub use types::FkSolution;
pub use types::FkSolutions;
pub use types::IntoPoint2;
pub use types::IntoPoint3;
pub use types::Point2;
pub use types::Point3;
pub use types::Scalar;
pub use types::Vector2;
pub use types::Vector3;
pub use types::distance2;
pub use types::distance3;
pub use types::point2;
pub use types::point2_zero;
pub use types::point3;
pub use types::point3_zero;
pub use types::relative_xy_to;
pub use types::translated_xy_by;

Modules§

error
Error types returned by VVCM forward-kinematics and simulation APIs.
fk
Forward-kinematics solver for the Virtual Variable Cables Model.
manual_simulation
Manual-formation simulation wrapper around the VVCM FK solver.
simulation
Velocity-driven simulation wrapper around the VVCM FK solver.
types
Public geometry and solution types used by the VVCM API.