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

Class DynamixelModule

source code


concrete class DynamixelModule provides shared capabilities of Dynamixel modules. It is usually used as the base class in a mixin, with the model specific details provided by the mixin classes.

Instance Methods [hide private]
 
__init__(self, node_id, typecode, pna)
Concrete constructor.
source code
 
set(self, **args)
Syntactic sugar for setting a bunch of addresses in the dynamixel control table to new values
source code
 
mem_write(self, addr, val)
Write a byte to a memory address in the module's microcontroller
source code
 
mem_read(self, addr)
Read a memory address from the module's microncontroller
source code
 
mem_getterOf(self, addr)
Return a getter function for a memory address
source code
 
mem_setterOf(self, addr)
Return a setter function for a memory address
source code
 
get_mode(self)
Get the current mode of the dynamixel servo, either Motor or Servo
source code
 
set_mode(self, mode, min_pos=MN_POS, max_pos=MX_POS)
( MAYBE ) Set the current mode of the servo, either Motor or Servo
source code
 
start(self, null=None)
Enable module actuation
source code
 
stop(self)
Disable module actuation
source code
 
go_slack(self, null=None)
Disable module actuation
source code
 
get_pos(self)
Gets the actual position of the module
source code
 
get_pos_async(self)
<<Disabled>>
source code
 
set_pos(self, val)
Sets position of the module, with safety checks.
source code
 
set_pos_sync(self, val)
Sets position of the module, with safety checks.
source code
 
get_speed(self)
Get present speed of servo
source code
 
get_moving_speed(self)
Get the moving speed (set in set_speed) of servo
source code
 
set_torque(self, val)
Sets torque of the module, with safety checks.
source code
 
set_torque_limit(self, val)
Sets the maximum torque limit of the module...
source code
 
set_speed(self, val)
Sets speed of the module, with safety checks.
source code
 
get_voltage(self)
Get present voltage on bus as read by servo
source code

Inherited from ckmodule.AbstractServoModule: is_slack, set_pos_UNSAFE

Inherited from ckmodule.Module: get_od, iterattr, iterhwaddr, iterprop, reset

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
ang2dynamixel(cls, ang)
Convert angle values to Dynamixel units
source code
 
dynamixel2ang(cls, dynamixel)
Convert dynamixel units to Dynamixel angles
source code
 
torque2dynamixel(cls, torque)
Convert "torque" commands to Dynamixel commands
source code
 
dynamixel2rpm(cls, dynamixel)
Convert dynamixel units to rotations per minute
source code
 
rpm2dynamixel(cls, rpm)
Convert rpm to dynamixel units
source code
 
dynamixel2voltage(cls, dynamixel)
Convert dynamixel units to volts
source code

Inherited from ckmodule.Module: newFromDiscovery

Class Variables [hide private]
  MX_POS = 10000
maximal position value for servos
  MN_POS = -10000
minimal position value for servos

Inherited from ckmodule.AbstractServoModule: POS_LOWER, POS_UPPER

Inherited from ckmodule.Module: Types

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, node_id, typecode, pna)
(Constructor)

source code 

Concrete constructor.

ATTRIBUTES: node_id -- int -- address for a unique module typecode -- version name of module pna -- ProtocolNodeAdaptor -- specialized for this node_id

Overrides: object.__init__

set(self, **args)

source code 

Syntactic sugar for setting a bunch of addresses in the dynamixel control table to new values

Keyword arguments may be any of the addresses defined in the .mcu member, e.g. for EX106

TODO: example

get_mode(self)

source code 

Get the current mode of the dynamixel servo, either Motor or Servo

OUTPUTS: 
  mode -- string -- 1 if Motor; 0 if Servo 

set_mode(self, mode, min_pos=MN_POS, max_pos=MX_POS)

source code 
( MAYBE )
Set the current mode of the servo, either Motor or Servo 

INPUTS:
  mode -- string -- either Motor or Servo 
  pos_upper -- int -- upper range of servo 
  pos_lower -- int -- lower range of servo          

start(self, null=None)

source code 

Enable module actuation

THEORY OF OPERATION: -- set torque_en as per section 3-4-2 pp. 27

Overrides: ckmodule.Module.start

stop(self)

source code 

Disable module actuation

THEORY OF OPERATION: -- clear torque_en. as per section 3-4-2 pp. 27

Overrides: ckmodule.Module.stop

go_slack(self, null=None)

source code 

Disable module actuation

THEORY OF OPERATION: -- clear torque_en. as per section 3-4-2 pp. 27

Overrides: ckmodule.AbstractServoModule.go_slack

get_pos(self)

source code 

Gets the actual position of the module

Overrides: ckmodule.AbstractServoModule.get_pos

get_pos_async(self)

source code 

<<Disabled>>

Overrides: ckmodule.AbstractServoModule.get_pos_async

set_pos(self, val)

source code 

Sets position of the module, with safety checks.

INPUT:
  val -- units in 1/100s of degrees between -10000 and 10000

Overrides: ckmodule.AbstractServoModule.set_pos

set_pos_sync(self, val)

source code 

Sets position of the module, with safety checks.

INPUT:
  val -- units in 1/100s of degrees between -10000 and 10000

get_speed(self)

source code 

Get present speed of servo

OUTPUTS: -- speed -- float -- speed in rpm THEORY OF OPERATION: -- mem_read the present_speed register and convert

get_moving_speed(self)

source code 

Get the moving speed (set in set_speed) of servo

OUTPUTS: -- speed -- float -- speed in rpm THEORY OF OPERATION: -- mem_read the moving_speed register and convert

set_torque(self, val)

source code 

Sets torque of the module, with safety checks.

INPUT:
  val -- units in between -1.0 - 1.0

set_torque_limit(self, val)

source code 

Sets the maximum torque limit of the module
INPUT:
    val -- unit from 0.0 to 1.0 where 1.0 is the maximum torque

set_speed(self, val)

source code 

Sets speed of the module, with safety checks.

INPUT:
  val -- units in rpm from -114 to 114

get_voltage(self)

source code 

Get present voltage on bus as read by servo

OUTPUTS: -- voltage -- int -- volts THEORY OF OPERATION: -- mem_read the present_voltage register and convert