dynamixel_ct

Crates.iodynamixel_ct
lib.rsdynamixel_ct
version0.5.0
created_at2024-11-20 02:02:43.459484+00
updated_at2025-04-14 21:38:47.143435+00
descriptionA crate for working with the control tables of Dynamixel servos
homepage
repositoryhttps://github.com/omelia-iliffe/dynamixel_ct
max_upload_size
id1454185
size33,444
Omelia Iliffe (omelia-iliffe)

documentation

README

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)
Commit count: 44

cargo fmt