Crate dynamixel2

Source
Expand description

An implementation of the Dynamixel Protocol 2.0.

This library aims to provide a easy to use but low level implementation of the Dynamixel Protocol 2.0. That means it allows you to execute arbitrary commands with arbitrary parameters.

The library does not aim to provide an easy interface to the higher level functions of a servo motor, such as moving it to a specific angle or at a specific speed. Instead, you will have to write the appropriate values to the correct registers yourself.

The main interface is the Bus struct, which represents the serial communication bus. The Bus struct exposes functions for all supported instructions such as Bus::ping, Bus::read, Bus::write and much more. Additionally, you can also transmit raw commands using Bus::write_instruction and Bus::read_status_response, or Bus::transfer_single.

The library currently implements all instructions except for the Control Table Backup, Fast Sync Read and Fast Sync Write instructions.

§Optional features

You can enable the log feature to have the library use log::trace!() to log all sent instructions and received replies.

Re-exports§

pub use serial2;

Modules§

checksum
Checksum calculation.
instructions
Types and functions for specific instructions.

Structs§

BufferTooSmallError
The buffer is too small to hold the entire message.
Bus
Dynamixel Protocol 2 communication bus.
InvalidChecksum
The received message has an invalid checksum value.
InvalidHeaderPrefix
The received message has an invalid header prefix.
InvalidInstruction
The received message has an invalid or unexpected instruction value.
InvalidPacketId
The received message has an invalid or unexpected packet ID.
InvalidParameterCount
The received message has an invalid or unexpected parameter count.
MotorError
An error reported by the motor.
Response
A response from a motor.
StatusPacket
A status response that is currently in the read buffer of a bus.

Enums§

ExpectedCount
The expected number of parameters.
InitializeError
An error that can occur while initializing a bus.
InvalidMessage
The received message is not valid.
ReadError
An error that can occur during a read transfer.
TransferError
An error that can occur during a read/write transfer.
WriteError
An error that can occur during a write transfer.