Expand description
Cross-platform robot control for CAN motors using the target’s native hardware transport.
This crate is intentionally vendor-agnostic above the codec seam: it depends
only on the [motor_codec] trait crate, never on a specific vendor codec.
Re-exports§
pub use bus::Bus;pub use bus::RouteKey;pub use config::CodecFactory;pub use config::CodecRegistry;pub use config::MotorTypeParser;pub use error::Error;pub use group::Arm;pub use group::Generic;pub use group::Gripper;pub use group::GroupKind;pub use group::MitCmd;pub use group::MotorGroup;pub use group::PosForceCmd;pub use group::PosVelCmd;pub use group::VelCmd;pub use motor::FaultCode;pub use motor::Motor;pub use robot::Robot;pub use robot::RobotBuilder;pub use spec::GripperOpeningSpec;pub use spec::GroupSpecKind;pub use spec::MotorSpec;pub use spec::OpeningDirection;pub use transport::SocketCanBus;pub use transport::BusPoller;pub use transport::CanBus;pub use transport::MockCanBus;pub use transport::MockRecordedCall;pub use transport::TransportError;
Modules§
- bus
- Bus = transport + codec + per-bus recv-id routing table.
- config
- TOML config schema, loader, and vendor codec registry.
- error
- Layered error type for the
can-motor-controlcrate. - group
- Group types:
MotorGroupbase +Arm,Gripper,Genericnewtypes and theGroupKinddispatcher. - motor
- Per-motor identity and state cache.
- robot
RobotandRobotBuilder.- spec
- Builder input types.
- transport
- CAN transport abstraction.
Structs§
- BusCapabilities
- Runtime feature set of a CAN transport.
- CanFrame
- Unified CAN frame: covers both classical CAN (8-byte payload) and CAN-FD (up to 64-byte payload).
- Frame
Flags - Metadata bits attached to every
CanFrame. - Limits
- Per-motor-type physical limits used to scale MIT commands and unscale state replies.
- Motor
Ref - Borrowed view of a motor’s identity, suitable for passing into codec encode methods without taking ownership of the motor’s mutable state.
Enums§
- Codec
Error - Errors returned by
MotorCodecimplementations. - Command
- A control command directed at a single motor.
- Command
Kind - Tagged discriminant of
Command, suitable for error-reporting “this codec does not support mode X”. - Event
- A decoded inbound message from a motor.
- Frame
Error - Errors that can arise constructing a
CanFrame. - Motor
Type Id - Vendor-tagged motor type identifier.
- Param
Value - Union of value encodings used by vendor parameter sub-protocols.
Traits§
- Motor
Codec - The vendor-agnostic codec contract.