Package ckbot :: Module dynamixel
[hide private]
[frames] | no frames]

Module dynamixel

source code


-- The ckbot.dynamixel python module implements classes that communicate with CKBot nodes connected
   to a ( Robotis ) Dynamixel Half-Duplex RS485 Bus, as per Robotis documentation

   Current protocol documentation is found at:
     http://support.robotis.com/en/product/actuator/dynamixel/dxl_communication.htm

   This library was written referring to the EX-106 manual v1.12 
   which Robotis no longer makes available from its website.

-- ckbot.dynamixel utilizes Bus and Protocol classes as an interface between the dynamixel hardware
   and protocol communication layers

   ... talk about meminterface, pna, and module classes ...
-- Typical usage via ckbot.logical python module:
    >>> from ckbot import logical, dynamixel
    >>> nodes = {0x01:'head', 0x06:'mid', 0x03:'tail'}
    >>> c = logical.Cluster( dynamixel.Protocol(nodes = nodes.keys()) )
    >>> c.populate( names=nodes, required=nodes.keys() )
    >>> c.at.head.set_pos(1000)

-- Subclass/extend??

-- CKbot.dynamixel depends upon the following:
 - ckbot.ckmodule
   - Module
   - AbstractBus
   - AbstractNodeAdaptor
   - AbstractProtocol
   - AbstractServoModule
   - progress
 - ckbot.port2port
   - newConnection        

Classes [hide private]
  DynamixelServoError
  Dynamixel
DESCRIPTION: -- The Dynamixel class is a namespace containing useful constants and functions RESPONSIBILITIES: -- Serve as a utility class with dynamixel commands and useful functions OWNERSHIP: -- owned by the dynamixel module THEORY: -- none CONSTRAINTS: -- none ...
  DynamixelMemMap
DESCRIPTION: Abstract superclass of all DynamixelMemMap classes.
  MemMapOpsMixin
Mixin class providing utility functions for operating on a MemMap.
  MX64Mem
DESCRIPTION: -- The MX64Mem class provides a mapping of the dynamixel control table: as per the MX-64 manual pp.
  MX28Mem
DESCRIPTION: ...
  RX64Mem
DESCRIPTION: -- The RX64Mem class provides a mapping of the dynamixel control table: as per the RX-64 manual pp.
  EX106Mem
DESCRIPTION: -- The EX106Mem class provides a mapping of the dynamixel control table: as per EX-106 section 3-4 pp.
  DynamixelMemWithOps
  EX106MemWithOps
  RX64MemWithOps
  MX64MemWithOps
  MX28MemWithOps
  AX12MemWithOps
-- The AX-12 control table in...
  Bus
( concrete ) DESCRIPTION: -- The Bus class serves as an interface between the dynamixel RS485 bus and Protocol RESPONSIBILITIES: -- intialize a serial newConnection at the desired baudrate.
  ProtocolError
  ProtocolNodeAdaptor
  Request
( internal concrete ) DESCRIPTION: -- The Request message class represents holds information about a message request RESPONSIBILITIES: -- hold nid, cmd, and params of message -- keep track of retries remaining -- hold a timestamp -- hold a promise to be updated after dynamixel.Protocol.update() OWNERSHIP: -- owned by the dynamixel module THEORY: -- An Request object serves a way to keep track of requests.
  Protocol
( concrete ) DESCRIPTION: -- The Protocol class provides the functionality needed to send messages using the Dynamixel Protocol as per section 3 of the EX-106 document RESPONSIBILITIES: -- detect modules on the bus and generate NodeAdaptors for each one -- ping modules periodically to ensure that they are still on the Bus?? -- store a queue of pending messages and handle them for during each update for a given timeslice -- act as a abstraction layer for basic Bus functionality? OWNERSHIP: -- owned by the Cluster THEORY: -- The protocol owns a dictionary of the NodeAdaptor of each module It initially checks for modules by performing a scan for all nodes that the user states should be on the Bus and for each module that exists it updates the heartbeat dictionary entry for that node
  DynamixelModule
concrete class DynamixelModule provides shared capabilities of Dynamixel modules.
  MX64Module
DESCRIPTION: -- MX64 Specific constants RESPONSIBILITIES: -- ...
  MX28Module
DESCRIPTION: -- MX28 Specific constants
  EX106Module
DESCRIPTION: -- EX106 Specific constants RESPONSIBILITIES: -- ...
  AX12Module
DESCRIPTION: -- AX12 Specific constants RESPONSIBILITIES: -- ...
  RX64Module
DESCRIPTION: -- RX64 Specific constants RESPONSIBILITIES: -- ...
  MissingDynamixel
Functions [hide private]
 
crop(val, lower, upper) source code
Variables [hide private]
  DEFAULT_PORT = dict(TYPE= 'tty', baudrate= 115200, timeout= 0.01)
  DEBUG = []
  MODELS = {'Dynamixel-006b':(EX106MemWithOps, EX106Module), 'Dy...
Variables Details [hide private]

MODELS

Value:
{'Dynamixel-006b':(EX106MemWithOps, EX106Module), 'Dynamixel-0040':(RX\
64MemWithOps, RX64Module), 'Dynamixel-0200':(RX64MemWithOps, RX64Modul\
e), 'Dynamixel-000c':(AX12MemWithOps, AX12Module), 'Dynamixel-001d':(M\
X28MemWithOps, MX28Module), 'Dynamixel-0136':(MX64MemWithOps, MX64Modu\
le), MissingDynamixel.TYPECODE:(None, MissingDynamixel),}