Classes |
struct | GenericCmdHeader |
struct | SyncWriteHeader< T > |
| Allows you to do a "synchronized write", where all recipients commit the value(s) at the same time, and do not send any response packets. More...
|
struct | SyncWriteEntry |
struct | SyncWritePosSpeedEntry |
| An element that follows a SyncWriteHeader, controls position and speed. More...
|
struct | SyncWriteContinuousRotationEntry |
| An element that follows a SyncWriteHeader, enables or disables continuous rotation mode. More...
|
struct | SyncWriteLEDEntry |
| An element that follows a SyncWriteHeader, toggles LED value. More...
|
struct | SyncWriteComplianceEntry |
struct | SyncWritePunchEntry |
struct | SyncWritePIDEntry |
| For MX series servos, not AX or RX. More...
|
struct | SyncWriteTorqueEntry |
struct | SyncWriteSoundHoldEntry |
| clears the sound data max hold field of an AX-S1 More...
|
struct | SyncWriteSoundCountEntry |
| clears the sound detected count field of an AX-S1 More...
|
struct | SyncWriteSoundHoldAndCountEntry |
| clears the sound data max hold and sound detected count fields of an AX-S1 at the same time, see ClearSoundHold and ClearSoundCount More...
|
struct | WriteHeader |
struct | BroadcastTorqueCmd |
| Broadcasts a 'torque enable' (or disable) command to all servos using a write command to the appropriate address. More...
|
struct | BroadcastTorqueEntry |
| Broadcasts a 'max torque' value to all servos using a write command to the appropriate address. More...
|
struct | BroadcastFullComplianceCmd |
| Broadcasts a command to set controller parameters to 0, also disabling torque (see also BroadcastNoPunchCmd). More...
|
struct | BroadcastNoPunchCmd |
| Sets 'punch' parameter to 0, eliminating torque jump (see also BroadcastFullComplianceCmd). More...
|
struct | BroadcastZeroSpeedCmd |
| Sets 'speed' parameter to 0, ensuring no motion will occur from leftover 'free spin' commands. More...
|
struct | BroadcastBaudCmd |
| Sets 'baud rate' parameter to the specified value, where resulting bits per second will be 2M / (baud+1). More...
|
struct | SetReturnDelayTimeCmd |
| Sets 'return delay time' parameter to the specified value, where actual delay time is 2µs * value. More...
|
struct | SetStatusResponseLevelCmd |
| Sets 'status response level' parameter to the specified value, see StatusResponseLevel. More...
|
struct | SetServoIDCmd |
| Sends a command to change a servo's ID value (use carefully!). More...
|
struct | SetPosSpeedCmd |
| Sets the position and speed for a single servo. More...
|
struct | ClearSoundHoldCmd |
| clears the sound data max hold field of an AX-S1 More...
|
struct | ClearSoundCountCmd |
| clears the sound detected count field of an AX-S1 More...
|
struct | ClearSoundHoldAndCountCmd |
| clears the sound data max hold and sound detected count fields of an AX-S1 at the same time, see ClearSoundHold and ClearSoundCount More...
|
struct | GenericResponseHeader |
| contains fields global to all response packets More...
|
struct | WriteResponse |
| Expected response from a Write command (when sent to non-broadcast address). More...
|
struct | ServoSensorsResponse |
| Expected response from a ReadServoSensorsCmd, common across AX, RX, and EX series at least. More...
|
struct | AXS1SensorsResponse |
| Expected response from a ReadAXS1SensorsCmd. More...
|
struct | TorqueResponse |
| Expected response from a ReadTorqueCmd. More...
|
struct | ServoInfoResponse |
| Expected response from a ReadModelCmd. More...
|
struct | ReadCmd |
| Contains fields which are global to all read commands, which can read a block of parameters from the unit. More...
|
struct | ReadServoSensorsCmd |
| Requests a block of servo sensor values be sent, servo should respond with a ServoSensorsResponse. More...
|
struct | ReadAXS1SensorsCmd |
| Requests a block of AX-S1 sensor values be sent, module should respond with a AXS1SensorsResponse. More...
|
struct | ReadTorqueCmd |
| Requests the 'torque enable' status be sent, servo should respond with a TorqueResponse. More...
|
struct | ReadModelCmd |
| Requests the 'model number' be sent, servo should respond with a ServoInfoResponse. More...
|
class | PingThread |
| Attempts to ping the specified servo by reading its model number, and if successful, current sensor values. More...
|
Namespaces |
namespace | DynamixelProtocol |
| Contains structures which define the layout of the binary communication with Dynamixel servos.
|
Defines |
#define | IS_MXEX(m) (m==MODEL_MX28 || m==MODEL_MX64 || m==MODEL_MX106 || m==MODEL_EX106P) |
Enumerations |
enum | ModelID_t {
MODEL_DX113 = 113,
MODEL_DX116 = 116,
MODEL_DX117 = 117,
MODEL_AX12 = 12,
MODEL_AX18 = 18,
MODEL_AXS1 = 13,
MODEL_RX10 = 10,
MODEL_RX24 = 24,
MODEL_RX28 = 28,
MODEL_RX64 = 64,
MODEL_MX28 = 29,
MODEL_MX64 = 310,
MODEL_MX106 = 320,
MODEL_EX106P = 107,
MODEL_UNKNOWN = static_cast<size_t>(1<<16)
} |
enum | StatusResponseLevel { RESPOND_NONE = 0,
RESPOND_READ = 1,
RESPOND_ALL = 2
} |
| symbol names for status response level settings, see SetStatusResponseLevelCmd
More...
|
enum | ResponseError_t {
VOLTAGE_ERROR = 1,
ANGLE_ERROR = 2,
HEAT_ERROR = 4,
RANGE_ERROR = 8,
CHECKSUM_ERROR = 16,
LOAD_ERROR = 32,
INSTRUCTION_ERROR = 64
} |
| Provides bitmasks for checking various error conditions in GenericResponseHeader::error.
More...
|
Functions |
unsigned char | nchecksum (const unsigned char *p, size_t len, size_t off=0) |
| Compute a bitwise-negated checksum for a region of memory, with an optional offset.
|
unsigned char | nchecksum (const struct GenericCmdHeader &p, size_t len) |
| 'specialization' of nchecksum for the GenericCmdHeader, which should skip marker fields
|
unsigned char | nchecksum (const struct GenericResponseHeader &p, size_t len) |
| 'specialization' of nchecksum for the GenericResponseHeader, which should skip marker fields
|
template<class T > |
void | updateChecksum (T &cmd) |
| updates the checksum field of the specified structure, call this for a structure after you modify its fields
|
template<class T > |
bool | validate (const T &msg) |
| returns true if markers and checksum are valid
|
void | reportErrors (unsigned int servoID, unsigned int offset, unsigned char err) |
template<class R > |
bool | readResponse (std::istream &is, R &response, unsigned int offset) |
| reads a response from an input stream, attempts to handle line noise before response
|
template<class T > |
std::ostream & | write (std::ostream &os, const T &cmd) |
| writes a command into a stream, returning the stream for convenient ostream::flush call.
|
template<class T > |
std::ostream & | write (std::ostream &os, const T &cmd, unsigned char &checksum) |
| writes a command into a stream and incrementing a checksum, returning the stream for convenient ostream::flush call. Remember to bitwise-not (~) the checksum before transmission!
|
Variables |
const unsigned int | MAX_ID = 0xFD |
const unsigned int | BROADCAST_ID = 0xFE |
const unsigned int | INVALID_ID = 0xFF |
const unsigned int | MARKER_VALUE = 0xFF |
const std::map
< DynamixelProtocol::ModelID_t,
const std::string > | dynamixelModels |
| maps model numbers (e.g. from a ServoInfoResponse) to human-readable names
|
const unsigned char | RESPONSE_HEADER_LEN = sizeof(GenericResponseHeader)+1 |