Package barobo
[hide private]
[frames] | no frames]

Package barobo

source code

The Barobo Python Module

This python module can be used to control Barobo robots. The easiest way to use this package is in conjunction with BaroboLink. After connecting to the robots you want to control in BaroboLink, the following python program will move joints 1 and 3 on the first connected Linkbot in BaroboLink:

   from barobo import Linkbot
   linkbot = Linkbot()
   linkbot.connect()
   linkbot.moveTo(180, 0, -180)

You may also use this package to control Linkbots without BaroboLink. In that case, a typical control program will look something like this:

   from barobo import Linkbot, Dongle

   dongle = Dongle()
   dongle.connect() # Connect to the dongle
   linkbot = dongle.getLinkbot() # or linkbot = dongle.getLinkbot('2B2C') where 
                                 # '2B2C' should be replaced with the serial ID 
                                 # of your Linkbot. Note that the serial ID 
                                 # used here can be that of a nearby Linkbot 
                                 # that you wish to connect to wirelessly. If 
                                 # no serial ID is provided, the new linkbot 
                                 # will refer to the Linkbot currently 
                                 # connected via USB.
                                 # Also, note that this function can be called
                                 # multiple times to retrieve handles to 
                                 # multiple wireless Linkbots, which can all
                                 # be controlled in the same Python script.
   linkbot.moveTo(180, 0, -180)  # Move joint 1 180 degrees in the positive 
                                 # direction, joint 3 180 degrees in the 
                                 # negative direction

For more documentation, please refer to the documentation under the Linkbot class.

Submodules [hide private]

Classes [hide private]
  BaroboException
  Dongle
The BaroboCtx (BaroboContext) is the entity which manages all of the Linkbots in a computational environment.
  BaroboCtx
The BaroboCtx (BaroboContext) is the entity which manages all of the Linkbots in a computational environment.
Functions [hide private]
 
__FROM(x) source code
 
__SELECT() source code
 
__AND() source code
 
__SUBSYSTEM(x) source code
 
__SUBSYSTEMF(x) source code
 
__SYSATTR(x, y) source code
 
__SYSATTRF(x, y) source code
 
__FIRST() source code
 
__SELECTUP() source code
 
findDongle() source code
 
_getSerialPorts() source code
 
__checkLinkbotTTY(comport) source code
 
_unpack(fmt, buffer) source code
Variables [hide private]
  ROBOTFORM_MOBOT = 1
  ROBOTFORM_I = 2
  ROBOTFORM_L = 3
  ROBOTFORM_T = 4
  ROBOT_NEUTRAL = 0
  ROBOT_FORWARD = 1
  ROBOT_BACKWARD = 2
  ROBOT_HOLD = 3
  ROBOT_POSITIVE = 4
  ROBOT_NEGATIVE = 5
  PINMODE_INPUT = 0
  PINMODE_OUTPUT = 1
  PINMODE_INPUTPULLUP = 2
  AREF_DEFAULT = 0
  AREF_INTERNAL = 1
  AREF_INTERNAL1V1 = 2
  AREF_INTERNAL2V56 = 3
  AREF_EXTERNAL = 4
  __package__ = 'barobo'