4 releases (2 breaking)
new 0.3.0 | Mar 21, 2025 |
---|---|
0.2.0 | Mar 11, 2025 |
0.1.1 | Nov 20, 2024 |
0.1.0 | Nov 20, 2024 |
#87 in Robotics
116 downloads per month
39KB
1K
SLoC
Dynamixel Control Table
The goal of this library is to provide the information for each register in the control table of a Dynamixel servo.
This library is intended to be used with an additional library that provides the communication protocol to the Dynamixels.
The data for register is currently limited to address and size (length), however expanding this to include the data type and access level is planned.
Dynamic Control Table
Only available with std
feature
The library can be used to return a control table when the model number is not known at compile time,
allowing for a more dynamic approach to working with servos.
If the Dynamixel model doesn't implement a register, the control table will return None
.
Supported Servos
This crate focuses on Dynamixels that use Protocol2.0.
Currently supported servos include:
- X series
- Y series
- P series
MX will not be supported.
Usage
Using a known model
use dynamixel_ct::{models::XM430, Register::*};
fn main() {
println!("{:?}", XM430::get(goal_position););
println!("{:?}", XM430::goal_position(););
/// Output: Some(RegisterData { address: 116, length: 4 })
}
Using a dynamic model
use dynamixel_ct::{models, ControlTable, Register::*};
fn main() {
// ping the motor to get the correct model number
let model_num: u16 = 1030;
let model = Model::try_from(model_num).unwrap();
let control_table = ControlTable::from(model);
println!("{:?}", control_table.get(goal_position));
/// Output: Some(RegisterData { address: 116, length: 4 })
}
Other Dynamixel Rust Libraries
A few different libraries exist for communicating with Dynamixel servos in Rust:
- dynamixel2-rs by RoboHouse Delft
- This implements protocol2.0.
- rustypot by Pollen Robotics
- This library has its own method of implementing registers.
- dynamixel.rs by kjetilkjeka (seems to be unmaintained)
Dependencies
~0.4–1MB
~22K SLoC