#geometry #type

no-std softmata-core

Foundational robotics types and traits for the SOFTMATA ecosystem

3 releases

0.1.2 Mar 20, 2026
0.1.1 Mar 10, 2026
0.1.0 Mar 9, 2026

#116 in Robotics

Apache-2.0

94KB
2.5K SLoC

softmata-core

Foundational robotics types and traits for the SOFTMATA ecosystem.

Crates.io License

What's inside

Geometry — Pose2D, Pose3D, Vector2/3, Quaternion, Transform2D/3D, Twist, Wrench, Accel, covariance wrappers. Backed by nalgebra.

Sensor traitsScanData, ImuData, OdometryData, JointData, ImageData, PointCloudData, DepthImageData, WrenchData, BatteryData, RangeData, TemperatureData, MagneticFieldData, GamepadData. Write algorithms against traits, swap implementations freely.

Point typesPointXYZ, PointXYZI, PointXYZRGB, PointXYZNormal. #[repr(C)] for zero-copy interop.

TimeTimestamp, Duration, Rate with nanosecond precision.

Quick start

[dependencies]
softmata-core = "0.1"
use softmata_core::prelude::*;

let pose = Pose2D::new(1.0, 2.0, 0.0);
let goal = Pose2D::new(5.0, 3.0, 1.57);
println!("distance: {:.2}m", pose.distance_to(&goal));

let rate = Rate::from_hz(30.0);
println!("period: {:.1}ms", rate.period_secs() * 1000.0);

no_std support

Disable the default std feature for embedded / bare-metal targets:

[dependencies]
softmata-core = { version = "0.1", default-features = false }

All types derive Serialize/Deserialize via serde (also no_std compatible).

License

Apache-2.0

Dependencies

~3–4.5MB
~90K SLoC