|
DYNAMIXEL Driver 0.1.0
API reference
|
Control tables of the DYNAMIXEL servo families, the model catalogue and the unit scales. More...
#include <algorithm>#include <array>#include <cstddef>#include <cstdint>#include <span>#include "dynamixel_detail.hpp"Go to the source code of this file.
Classes | |
| struct | dynamixel::RegInfo |
| One register of a family's control table. More... | |
| struct | dynamixel::FamilyInfo |
| Static facts of a family (e-Manual "Control Table" and "Specifications" pages). More... | |
| struct | dynamixel::IndirectPair |
| The area an indirect pair lives in. More... | |
| struct | dynamixel::ModelInfo |
| One known model number: its family, name and the facts that differ per model. More... | |
Namespaces | |
| namespace | dynamixel |
The DYNAMIXEL driver: everything it declares lives here; internals in detail. | |
Enumerations | |
| enum class | dynamixel::Family : uint8_t { dynamixel::Generic = 0 , dynamixel::AxRxDx , dynamixel::Mx28 , dynamixel::Mx64 , dynamixel::Mx106 , dynamixel::Mx28v2 , dynamixel::Mx64v2 , dynamixel::Xl320 , dynamixel::X330 , dynamixel::X430Basic , dynamixel::X430 , dynamixel::X540 , dynamixel::Xw } |
| A servo family: one control table layout (several models share it). More... | |
| enum class | dynamixel::Access : uint8_t { dynamixel::ReadOnly = 0 , dynamixel::ReadWrite = 1 } |
| Whether a register can be written. More... | |
| enum class | dynamixel::Area : uint8_t { dynamixel::Eeprom = 0 , dynamixel::Ram = 1 } |
| The memory a register lives in. More... | |
| enum class | dynamixel::Kind : uint8_t { dynamixel::Unsigned = 0 , dynamixel::Signed = 1 , dynamixel::SignMag10 = 2 , dynamixel::Offset2048 = 3 } |
| How the raw bytes of a register are read as a number. More... | |
| enum class | dynamixel::Reg : uint8_t { ModelNumber = 0 , FirmwareVersion = 1 , Id = 2 , BaudRate = 3 , ReturnDelayTime = 4 , CwAngleLimit = 5 , CcwAngleLimit = 6 , TemperatureLimit = 7 , MinVoltageLimit = 8 , MaxVoltageLimit = 9 , MaxTorque = 10 , StatusReturnLevel = 11 , AlarmLed = 12 , Shutdown = 13 , TorqueEnable = 14 , Led = 15 , CwComplianceMargin = 16 , CcwComplianceMargin = 17 , CwComplianceSlope = 18 , CcwComplianceSlope = 19 , GoalPosition = 20 , MovingSpeed = 21 , TorqueLimit = 22 , PresentPosition = 23 , PresentVelocity = 24 , PresentLoad = 25 , PresentVoltage = 26 , PresentTemperature = 27 , RegisteredInstruction = 28 , Moving = 29 , Lock = 30 , Punch = 31 , MultiTurnOffset = 32 , ResolutionDivider = 33 , DGain = 34 , IGain = 35 , PGain = 36 , RealtimeTick = 37 , GoalAcceleration = 38 , Current = 39 , TorqueControlModeEnable = 40 , GoalTorque = 41 , DriveMode = 42 , ModelInformation = 43 , OperatingMode = 44 , SecondaryId = 45 , ProtocolType = 46 , HomingOffset = 47 , MovingThreshold = 48 , PwmLimit = 49 , AccelerationLimit = 50 , VelocityLimit = 51 , MaxPositionLimit = 52 , MinPositionLimit = 53 , HardwareErrorStatus = 54 , VelocityIGain = 55 , VelocityPGain = 56 , PositionDGain = 57 , PositionIGain = 58 , PositionPGain = 59 , Feedforward2ndGain = 60 , Feedforward1stGain = 61 , BusWatchdog = 62 , GoalPwm = 63 , GoalVelocity = 64 , ProfileAcceleration = 65 , ProfileVelocity = 66 , MovingStatus = 67 , PresentPwm = 68 , VelocityTrajectory = 69 , PositionTrajectory = 70 , CurrentLimit = 71 , GoalCurrent = 72 , PresentCurrent = 73 , ControlMode = 74 , StartupConfiguration = 75 , PwmSlope = 76 , BackupReady = 77 , ExternalPortMode1 = 78 , ExternalPortMode2 = 79 , ExternalPortMode3 = 80 , ExternalPortData1 = 81 , ExternalPortData2 = 82 , ExternalPortData3 = 83 } |
| Family-neutral register names. | |
| enum class | dynamixel::BaudScheme : uint8_t { dynamixel::None = 0 , dynamixel::Divider = 1 , dynamixel::Table4 = 2 , dynamixel::Table7 = 3 , dynamixel::Table8 = 4 } |
| How a family encodes its Baud Rate register. More... | |
Functions | |
| constexpr std::span< const RegInfo > | dynamixel::Table (Family family) noexcept |
| The control table of a family. | |
| constexpr const FamilyInfo & | dynamixel::Info (Family family) noexcept |
| The facts of a family. | |
| constexpr const RegInfo * | dynamixel::Lookup (Family family, Reg reg) noexcept |
| Find a register of a family. | |
| constexpr IndirectPair | dynamixel::Indirect (Family family, uint32_t index) noexcept |
The registers of indirect pair index (1-based): the indirect address (2 bytes) that points at any control-table address, and the data byte that reads or writes through it (X330: 1..28; others 1..56, where 29..56 lie above address 255 and need protocol 2.0). | |
| constexpr bool | dynamixel::BaudValueFor (Family family, uint32_t bits_per_second, uint8_t &value) noexcept |
| The Baud Rate register value for a bit rate. | |
| constexpr uint32_t | dynamixel::BaudRateOf (Family family, uint8_t value) noexcept |
| The bit rate a Baud Rate register value selects. | |
| constexpr const ModelInfo * | dynamixel::FindModel (uint16_t number) noexcept |
| Look a model number up in the catalogue. | |
| constexpr Family | dynamixel::FamilyOf (uint16_t number) noexcept |
| The family of a model number. | |
| constexpr bool | dynamixel::SupportsFastRead (uint16_t number, uint8_t firmware) noexcept |
| Whether the e-Manual lists Fast Sync Read, Fast Bulk Read and Control Table Backup for a model at a firmware version. Advice only: the driver never refuses an instruction because of it. | |
Variables | |
| constexpr uint8_t | dynamixel::kProtocolBit1 = 0x01U |
Protocol bits of FamilyInfo::protocols. | |
| constexpr uint8_t | dynamixel::kProtocolBit2 = 0x02U |
| The family speaks protocol 2.0. | |
| constexpr std::array< uint32_t, 8 > | dynamixel::kRates |
| Rates of the table baud scheme (X and similar families), indexed by the register value. | |
Control tables of the DYNAMIXEL servo families, the model catalogue and the unit scales.
One logical register name (Reg) maps to an address, a size and a decoding in every family that has it (Lookup()); a family without it returns Unsupported from the typed calls. The tables are data of the ROBOTIS e-Manual "Control Table" pages (docs/datasheets.yml, docs/control-tables.md), one table per family, checked against them in tests/test_model.cpp. Names the e-Manual spells differently per family (Present Speed, Present Velocity) are one Reg; the decoding (Kind) and the unit scale (ModelInfo, FamilyInfo) differ per family. Families the table does not list (the Pro, P, H, L and Y series) are reached with raw addresses (Family::Generic).