Public Member Functions | Public Attributes
pyHand_api.pyHand Class Reference

List of all members.

Public Member Functions

def __init__
def can_init
def can_reset
def can_status
def can_uninit
def check_error
def clean_read_buffer
def close_all
def close_finger
def close_finger_step
def close_grasp
def close_grasp_step
def close_spread
def close_spread_step
def deg_to_enc
def detect_breakaway
def done_moving
def enc_to_deg
def enc_to_per
def enc_to_rad
def enum
def get_16
def get_32
def get_full_pos_packet
def get_full_tact
def get_mode
def get_packed_position
def get_position
def get_prop_quick
def get_property
def get_role
def get_strain
def get_tact
def get_temp
def get_therm
def get_top_tact
def get_velocity
def init_finger
def init_hand
def initialize
def load_property
def move
def move_grasp
def move_to
def new_temp_mail
def onescomp
def open_all
def open_finger
def open_finger_step
def open_grasp
def open_grasp_step
def open_spread
def open_spread_step
def per_to_enc
def process_can_messages
def process_full_tact
def process_motor_temp
def process_motor_therm
def process_packed_position
def process_strain
def process_tactile_data
def rad_to_enc
def read_full_tact
def read_msg
def read_msg_resilient
def read_packed_position
def read_strain
def read_temp
def read_therm
def revert_temp_mail
def save_property
def send_msg
def set_16
def set_32
def set_hand_targets
def set_mode
def set_property
def set_puck_like
def set_velocity
def twoscomp
def wait_done_moving
def write_msg

Public Attributes

 motor_positions
 PCAN
 strain
 tactile_sensor
 temp

Detailed Description

Definition at line 88 of file pyHand_api.py.


Constructor & Destructor Documentation

def pyHand_api.pyHand.__init__ (   self,
  port = '/dev/pcan32' 
)
Creates a PCANBasic object

        @param port: CAN port used to communicate with the hand
        @type connection: string

Definition at line 90 of file pyHand_api.py.


Member Function Documentation

Initializes the CAN connection. Note that this does not initialize the hand itself.

Definition at line 161 of file pyHand_api.py.

Resets the CAN connection.
Note that this may cause a loss of data, but may also clear unwanted data. Utilize as needed.

Definition at line 140 of file pyHand_api.py.

Returns the status of the CAN connection as specified in PCANBasic's GetStatus method.

Definition at line 153 of file pyHand_api.py.

Uninitializes the CAN connection. Rarely used.

Definition at line 170 of file pyHand_api.py.

def pyHand_api.pyHand.check_error (   self,
  connection,
  result,
  location_of_error 
)
Checks error on the CAN Bus.

        @param connection: The connection on which the CAN is talking. For example, PCANBasic()
        @type connection: PCANBasic
        @param result: The number corresponding to the error returned.
        @type resulr: int
        @param location_of_error: A description of where the error occurred.
        @type location_of_error: str

Definition at line 108 of file pyHand_api.py.

Definition at line 1594 of file pyHand_api.py.

Closes every finger at once. Mainly for use in DEMO. WARNING: can be dangerous because it may cause fingers to collide if the hand is in an unknown position.

Definition at line 883 of file pyHand_api.py.

def pyHand_api.pyHand.close_finger (   self,
  puckID,
  autowait = True 
)
Close finger and wait for completion.

@param puckID: Finger to be closed.
@type puckID: int
@param autowait: calls wait_done_moving if True. Defaults to True.
@type autowait: bool

Definition at line 830 of file pyHand_api.py.

def pyHand_api.pyHand.close_finger_step (   self,
  puckID,
  step = -1,
  autowait = True 
)
Close finger by input decrement.

        @param puckID: Finger to be closed.
        @type puckID: int
        @param step: size of decrement in encoder counts. Defaults to -1.
        @type step: int
        @param autowait: calls wait_done_moving if True. Defaults to True.
        @type autowait: bool

Definition at line 963 of file pyHand_api.py.

Closes all fingers to the position encoded by Close Target (CT).

Definition at line 776 of file pyHand_api.py.

def pyHand_api.pyHand.close_grasp_step (   self,
  step = 0 
)
Close grasp by input decrement.

        @param step: size of decrement in encoder counts. Defaults to 0.
        @type step: int

Definition at line 911 of file pyHand_api.py.

Close spread to position determined by Close Target (CT).

Definition at line 806 of file pyHand_api.py.

def pyHand_api.pyHand.close_spread_step (   self,
  step = -1 
)
Close spread by input decrement.

        @param step: size of decrement in encoder counts. Defaults to -1.
        @type step: int 

Definition at line 934 of file pyHand_api.py.

def pyHand_api.pyHand.deg_to_enc (   self,
  deg 
)
Given a degree measure of an angle, return it in encoder counts.

        @param deg: Degrees
        @type deg: float
        @return: Encoder counts
        @rtype: int

Definition at line 1581 of file pyHand_api.py.

def pyHand_api.pyHand.detect_breakaway (   self,
  finger 
)

        @return: True if the finger has broken away, False if it hasn't

Definition at line 745 of file pyHand_api.py.

def pyHand_api.pyHand.done_moving (   self,
  motors_to_check = ALL_FINGERS 
)
Checks a given list of motors once to see if they have stopped moving, and if so, it returns true

        @param motors_to_check: A list of motors to check.
        @type motors_to_check: Array[*int]
        @rtype: bool
        @return: Whether or not the motors are done moving.

Definition at line 720 of file pyHand_api.py.

def pyHand_api.pyHand.enc_to_deg (   self,
  enc 
)
Given an angle in encoder counts, return the degree measure of the angle that represents.

        @param enc: Encoder counts.
        @type enc: int
        @return: Degrees
        @rtype: float

Definition at line 1534 of file pyHand_api.py.

def pyHand_api.pyHand.enc_to_per (   self,
  enc 
)
Given an angle in encoder counts, return the percentage of the angle that represents.

        @param enc: Encoder counts.
        @type enc: int
        @return: Percentage
        @rtype: float

Definition at line 1499 of file pyHand_api.py.

def pyHand_api.pyHand.enc_to_rad (   self,
  enc,
  type = BASE_TYPE 
)
Given an angle in encoder counts, return the radian measure of the angle that represents.

        @param enc: Encoder counts.
        @type enc: int
        @return: Radians
        @rtype: float

Definition at line 1511 of file pyHand_api.py.

def pyHand_api.pyHand.enum (   self)
Finds and returns all of the pucks that are attached to the bus.

        @rtype: Array[]
        @return: An array containing the pucks attached to the bus.

Definition at line 124 of file pyHand_api.py.

def pyHand_api.pyHand.get_16 (   self,
  msgID,
  propID 
)
Gets a 16 bit property. Please use get_property instead of this method where applicable.

        @param msgID: The puck whose property will be read from.
        @type msgID: int
        @param propID: The property be read from.
        @type propID: int
        @rtype: int
        @return: The value held in the property.

Definition at line 387 of file pyHand_api.py.

def pyHand_api.pyHand.get_32 (   self,
  msgID,
  propID 
)
Gets a 32 bit property. Please use get_property instead of this method where applicable.

        @param msgID: The puck whose property will be read from.
        @type msgID: int
        @param propID: The property be read from.
        @type propID: int
        @rtype: int
        @return: The value held in the property.

Definition at line 367 of file pyHand_api.py.

Definition at line 982 of file pyHand_api.py.

def pyHand_api.pyHand.get_full_tact (   self,
  msgID 
)
Unpack all tactile sensor values in an array.

        @param msgID: The puck or group to get full tactile array sensor data.
        @type msgID: int
        @rtype: Array[*data]
        @return: An array containing the tactile data from a given puck.
self.set_property(msgID, TACT, TACT_FULL) 
#self.write_msg(msgID, [TACT])
output = [0,0,0,0,0]
read_result = self.PCAN.Read(PCAN_USBBUS1)
self.check_error(self.PCAN,read_result[0],"reading full tactile data")
read_result2 = self.PCAN.Read(PCAN_USBBUS1)
self.check_error(self.PCAN,read_result2[0],"reading full tactile data")
read_result3 = self.PCAN.Read(PCAN_USBBUS1)
self.check_error(self.PCAN,read_result3[0],"reading full tactile data")
read_result4 = self.PCAN.Read(PCAN_USBBUS1)
self.check_error(self.PCAN,read_result4[0],"reading full tactile data")
read_result5 = self.PCAN.Read(PCAN_USBBUS1)
self.check_error(self.PCAN,read_result5[0],"reading full tactile data")

output[0] = read_result[1].DATA
output[1] = read_result2[1].DATA
output[2] = read_result3[1].DATA
output[3] = read_result4[1].DATA
output[4] = read_result5[1].DATA

#print 'Init: ID1 = %x,  ID2 = %x,  ID3 = %x,  ID4 = %x,  ID5 = %x'%(read_result[1].ID, read_result2[1].ID, read_result3[1].ID, read_result4[1].ID, read_result5[1].ID)
tactileVals = range(0,24)
index_ = 0
for data in output:
        index_ = int(data[0]/16) * 5
        #print 'index = %d, data[0] = %x'%(index_, data[0])
        # Get the bits and then unpack them.
        tactileVals[index_ + 0] = round(((data[0]%0x10)*0x100 + data[1])/256.0,2)
        tactileVals[index_ + 1] = round((data[2]*0x10 + int(data[3]/0x10))/256.0,2)
        tactileVals[index_ + 2] = round(((data[3]%0x10)*0x100 + data[4])/256.0,2)
        tactileVals[index_ + 3] = round((data[5]*0x10 + int(data[6]/0x10))/256.0,2)
        if index_ != 20:
tactileVals[index_ + 4] = round(((data[6]%0x10)*0x100 + data[7])/256.0,2)
#print 'Return OK : %s'%(tactileVals)
return tactileVals

Definition at line 1106 of file pyHand_api.py.

def pyHand_api.pyHand.get_mode (   self,
  msgID 
)
Read from MODE property, and return a tuple with the number corresponding to the mode, along with
the string name of the mode.

        @param msgID: The puck from which to get the mode.
        @type msgID: int
        @rtype: Tuple(int, str)
        @return: A tuple with the number and name of the mode.

Definition at line 511 of file pyHand_api.py.

def pyHand_api.pyHand.get_packed_position (   self,
  msgID 
)
Get packed position data and return both P and JP.

        @param msgID: The puck or group to get position data.
        @type msgID: int
        @rtype: (int, int)

        @return: The position and joint position of the finger in encoder counts.
         Position in radians

Definition at line 1254 of file pyHand_api.py.

def pyHand_api.pyHand.get_position (   self,
  msgID,
  depth = 0 
)
Get packed position data and return it.

        @param msgID: The puck or group to get position data.
        @type msgID: int
        @rtype: int

        @param depth: number of times get message was retried.
        
        @return: The position of the finger in encoder counts.

Definition at line 1220 of file pyHand_api.py.

def pyHand_api.pyHand.get_prop_quick (   self,
  msgID,
  propID,
  speed 
)
Gets a property timed at a certain rate.

        @param msgID: The puck or group to have its property gotten.
        @type msgID: int
        @param propID: The property to be saved.
        @type propID: int
        @param speed: The time delay for the get.
        @type speed: float

Definition at line 431 of file pyHand_api.py.

def pyHand_api.pyHand.get_property (   self,
  msgID,
  propID 
)
Get property from pucks in msgID.

        @param msgID: The puck whose property will be read from.
        @type msgID: int
        @param propID: The property be read from.
        @type propID: int
        @rtype: int
        @return: The value held in the property.

Definition at line 347 of file pyHand_api.py.

def pyHand_api.pyHand.get_role (   self,
  msgID 
)
Read from ROLE property and return something that makes sense.
Returns an array of holding the following data:

[4-bit Product Identifier,
Internal Thermistor,
20 MHz (vs 32 MHz),
Hall Motor Encoder,
Enc Motor Encoder,
Strain Gauge,
IMU for Force-Torque Sensor,
Optical Motor Encoder]

        @param msgID: The puck to get the ROLE from.
        @type msgID: int
        @rtype: Array[int,bool,bool,bool,bool,bool,bool,bool]
        @return: An array holding the above values.

Definition at line 479 of file pyHand_api.py.

def pyHand_api.pyHand.get_strain (   self,
  msgID 
)
Gets the fingertip torque sensor value. 

        @param msgID: The puck or group to get fingertip torque sensor data. 
        @type msgID: int
        @rtype: int
        @return: Strain Gauge Reading

Definition at line 1187 of file pyHand_api.py.

def pyHand_api.pyHand.get_tact (   self,
  msgID,
  topOrFull = "TOP10" 
)
Obtain and interpret tactile sensor data.

        @param msgID: The puck or group to get full or top 10 tactile array sensor data.
        @type msgID: int
        @param topOrFull: To get full data, enter "FULL". To get the top 10 values, enter "TOP10". Or anything else, really.
        @type topOrFull: str
        @return 

Definition at line 1155 of file pyHand_api.py.

def pyHand_api.pyHand.get_temp (   self,
  msgID 
)
Gets temperature value for all pucks in msgID.

        @param msgID: The puck or group to get temp.
        @type msgID: int
        @rtype: int
        @return: The value of the TEMP property.

Definition at line 1024 of file pyHand_api.py.

def pyHand_api.pyHand.get_therm (   self,
  msgID 
)
Gets motor temperature value for all pucks in msgID. 

        @param msgID: The puck or group to get motor temperature.
        @text msgID: int
        @rtype: int
        @return: The value of the THERM property.

Definition at line 1047 of file pyHand_api.py.

def pyHand_api.pyHand.get_top_tact (   self,
  msgID 
)
Unpack the top10 values from TACT.
Returns a dictionary with 10 items like (sensor number):(tact value).

        @param msgID: The puck or group to get top 10 tactile data.
        @type msgID: int
        @rtype: Dictionary{sensorID:value}
        @return topVals: Dictionary of the top 10 tactile array sensor values. 

Definition at line 1069 of file pyHand_api.py.

def pyHand_api.pyHand.get_velocity (   self,
  msgID 
)
Returns velocity values of finger when in motion. Mostly returns garbage. It's used to help tell when finger is stopped or near to it.

        @param msgID: The puck or group to get velocity.
        @type msgID: int
        @rtype: float
        @return: A (garbage) value representing the approximate velocity of the finger.

Definition at line 987 of file pyHand_api.py.

def pyHand_api.pyHand.init_finger (   self,
  msgID 
)
Sends a command to the puck to wake up the motor attatched to the puck.

        @param msgID: The id of the finger to initialize.
        @type msgID: int

Definition at line 225 of file pyHand_api.py.

Initialize all pucks in the hand.

        @rtype: Boolean
        @return: Succesfully Initialized Hand?

Definition at line 201 of file pyHand_api.py.

Wakes up pucks and initializes the CAN.
This function must be implemented at the beginning of a program for this library to properly work.

        @rtype: ROLE
        @return: First finger's ROLE property if initialization is successful. Otherwise it returns False.

Definition at line 179 of file pyHand_api.py.

def pyHand_api.pyHand.load_property (   self,
  msgID,
  propID 
)
Load a property's value for puck's flash memory.

        @param msgID: The puck or group to have its property loaded.
        @type msgID: int
        @param propID: The property to be loaded.
        @type propID: int

Definition at line 420 of file pyHand_api.py.

def pyHand_api.pyHand.move (   self)
Moves all fingers/spread to their default.

Definition at line 862 of file pyHand_api.py.

def pyHand_api.pyHand.move_grasp (   self,
  position = -1 
)
Moves all fingers to input argument or default position (50).

        @param position: position of fingers. Defaults to -1. Valid position range is from 0-195,000 encoder counts.
        @type position: int

Definition at line 847 of file pyHand_api.py.

def pyHand_api.pyHand.move_to (   self,
  puckID,
  target,
  autowait = True 
)
Move the motor to a specific position.

        @param puckID: The puck to move.
        @type puckID: int
        @param target: The end position to move to.
        @type target: int
        @param autowait: Does the program wait until the motor is done moving?
        @type autowait: bool

Definition at line 705 of file pyHand_api.py.

def pyHand_api.pyHand.new_temp_mail (   self,
  fingers_to_change 
)

Definition at line 1486 of file pyHand_api.py.

def pyHand_api.pyHand.onescomp (   self,
  binstr 
)

Definition at line 1212 of file pyHand_api.py.

Opens every fingers at once. Mainly used in DEMO. WARNING: can be dangerous because it may cause fingers to collide if the hand is in an unknown position.

Definition at line 869 of file pyHand_api.py.

def pyHand_api.pyHand.open_finger (   self,
  puckID,
  autowait = True 
)
Open finger and wait for completion.

        @param puckID: Finger to be opened.
        @type puckID: int
        @param autowait: calls wait_done_moving if True. Defaults to True.
        @type autowait: bool

Definition at line 813 of file pyHand_api.py.

def pyHand_api.pyHand.open_finger_step (   self,
  puckID,
  step = -1,
  autowait = True 
)
Open finger by input increment.

        @param puckID: Finger to be opened.
        @type puckID: int
        @param step: size of increment in encoder counts. Defaults to -1.
        @type step: int
        @param autowait: calls wait_done_moving if True. Defaults to True.
        @type autowait: bool

Definition at line 945 of file pyHand_api.py.

Opens all fingers to the position encoded by Open Target (OT)

Definition at line 754 of file pyHand_api.py.

def pyHand_api.pyHand.open_grasp_step (   self,
  step = 0 
)
Open grasp by input increment.

        @param step: size of increment in encoder counts. Defaults to 0.
        @type step: int

Definition at line 899 of file pyHand_api.py.

Open spread to position determined by Open Target (OT).

Definition at line 798 of file pyHand_api.py.

def pyHand_api.pyHand.open_spread_step (   self,
  step = -1 
)
Open spread by input increment.

        @param step: size of increment in encoder counts. Defaults to -1.
        @type step: int

Definition at line 923 of file pyHand_api.py.

def pyHand_api.pyHand.per_to_enc (   self,
  per 
)
Given a percentage of an angle, return it in encoder counts.

        @param per: Percentage
        @type per: float
        @return: Encoder counts
        @rtype: int

Definition at line 1546 of file pyHand_api.py.

        Reads and process all the msgs in the bus
        Depending on the CAN id, it'll use different methods

Definition at line 1283 of file pyHand_api.py.

def pyHand_api.pyHand.process_full_tact (   self,
  msg 
)
        Process and saves all the messages containing the tactile information

Definition at line 1410 of file pyHand_api.py.

def pyHand_api.pyHand.process_motor_temp (   self,
  msg 
)
        Process the msg and extract the temperature of the motor puck on the CAN ID

Definition at line 1370 of file pyHand_api.py.

def pyHand_api.pyHand.process_motor_therm (   self,
  msg 
)
        Process the msg and extract the temperature of the motor on the CAN ID

Definition at line 1390 of file pyHand_api.py.

def pyHand_api.pyHand.process_packed_position (   self,
  msg 
)
        Process the CAN msgs and saves the position depending on the MSG ID

Definition at line 1316 of file pyHand_api.py.

def pyHand_api.pyHand.process_strain (   self,
  msg 
)
        Process the msg and extract the strain value depending on the CAN ID

Definition at line 1356 of file pyHand_api.py.

def pyHand_api.pyHand.process_tactile_data (   self,
  data_array 
)
        Process the array of data and returns a tactile array

Definition at line 1466 of file pyHand_api.py.

def pyHand_api.pyHand.rad_to_enc (   self,
  rad,
  type = BASE_TYPE 
)
Given the readian measure of an angle, return it in encoder counts.

        @param rad: Radians
        @type rad: float
        @return: Encoder counts
        @rtype: int

Definition at line 1558 of file pyHand_api.py.

def pyHand_api.pyHand.read_full_tact (   self,
  msgID 
)
        Read all tactile sensors

Definition at line 1100 of file pyHand_api.py.

Read a general message from PCAN_USBBUS1
Typically, msg[1] (where msg is the thing returned), contains the pertinent information.

        @rtype: (TPCANStatus, TPCANMsg, TPCANTimestamp)
        @return: A tuple containing the status, message, and timestamp.

Definition at line 236 of file pyHand_api.py.

def pyHand_api.pyHand.read_msg_resilient (   self,
  expect_puck,
  expect_prop,
  max_recurse = 10,
  counter = 0 
)
Reads message given the puckID and the propertyID. 
It will read as normal, until it gets some expected output from the puck.

        @param expect_puck: The puck to read from.
        @type expect_puck: int
        @param expect_prop: The property read from.
        @type expect_prop: int
        @param max_recurse: The most number of times to repeat the get.
        @type max_recurse: int
        @param counter: Used internally. Do not set.
        @type counter: int
        @rtype: int
        @return: The value held in the property of the given puck.

Definition at line 449 of file pyHand_api.py.

def pyHand_api.pyHand.read_packed_position (   self,
  msgID 
)
Get packed position data and return both P and JP.

        @param msgID: The puck or group to get position data.
        @type msgID: int
        @rtype: (int, int)

        @return: sends a msg to read the position.

Definition at line 1269 of file pyHand_api.py.

def pyHand_api.pyHand.read_strain (   self,
  msgID 
)
Sends the message to get the fingertip torque sensor value. 

        @param msgID: The puck or group to get fingertip torque sensor data. 
        @type msgID: int
        @rtype: int
        @return: CAN status

Definition at line 1199 of file pyHand_api.py.

def pyHand_api.pyHand.read_temp (   self,
  msgID 
)
Sends a message to get the temperature value for all pucks in msgID.

        @param msgID: The puck or group to get temp.
        @type msgID: int
        @rtype: int
        @return: The value of the TEMP property.

Definition at line 1036 of file pyHand_api.py.

def pyHand_api.pyHand.read_therm (   self,
  msgID 
)
Gets motor temperature value for all pucks in msgID. 

        @param msgID: The puck or group to get motor temperature.
        @text msgID: int
        @rtype: int
        @return: The value of the THERM property.

Definition at line 1058 of file pyHand_api.py.

def pyHand_api.pyHand.revert_temp_mail (   self,
  fingers_to_change,
  former 
)

Definition at line 1493 of file pyHand_api.py.

def pyHand_api.pyHand.save_property (   self,
  msgID,
  propID 
)
Save a property.

        @param msgID: The puck or group to have its property saved.
        @type msgID: int
        @param propID: The property to be saved.
        @type propID: int

Definition at line 408 of file pyHand_api.py.

def pyHand_api.pyHand.send_msg (   self,
  msgID,
  data 
)
        Send a general message to PCAN_USBBUS1. This can be a get, set, or even garbage.
        It does not apply any sleep
        
        @param msgID: The puck or group to which the message will be sent.
        @type msgID: int
        @param data: The array containing the data for the TPCANMsg.
        @type data: Array[]
        
        @return the return status after writing in the bus

Definition at line 273 of file pyHand_api.py.

def pyHand_api.pyHand.set_16 (   self,
  msgID,
  propID,
  value 
)
Set property to a given value for a 16 bit property.
Avoid usage of this method. Use self.set_property instead.

        @param msgID: The puck or group whose property will be set.
        @type msgID: int
        @param propID: The number corresponding to the property to be set.
        @type propID: int
        @param value: The value to which the property will be set.
        @type value: int

Definition at line 329 of file pyHand_api.py.

def pyHand_api.pyHand.set_32 (   self,
  msgID,
  propID,
  value 
)
Set property to a given value for a 32 bit property.
Avoid usage of this method. Use self.set_property instead.

        @param msgID: The puck or group whose property will be set.
        @type msgID: int
        @param propID: The number corresponding to the property to be set.
        @type propID: int
        @param value: The value to which the property will be set.
        @type value: int

Definition at line 313 of file pyHand_api.py.

def pyHand_api.pyHand.set_hand_targets (   self,
  f1_target,
  f2_target,
  f3_target,
  sp_target 
)
Given fingers and spread target values, move the hand to that position.
Will mainly be used to load user-defined hand positions.
Takes Barrett Units as inputs.

        @param f1_target: The position (in encoder ticks) for finger 1 to move to.
        @type f1_target: int
        @param f2_target: The position for finger 2 to move to.
        @type f2_target: int
        @param f3_target: The position for finger 3 to move to.
        @type f3_target: int
        @param sp_target: The position for spread to move to.
        @type sp_target: int

Definition at line 679 of file pyHand_api.py.

def pyHand_api.pyHand.set_mode (   self,
  msgID,
  value 
)
Set the mode property using either strings or numbers.

        @param msgID: The puck or group to set the mode.
        @type msgID: int
        @param value: The value to which the mode should be set.
        @type value: int

Definition at line 536 of file pyHand_api.py.

def pyHand_api.pyHand.set_property (   self,
  msgID,
  propID,
  value 
)
Set property to a given value.

        @param msgID: The puck or group whose property will be set.
        @type msgID: int
        @param propID: The number corresponding to the property to be set.
        @type propID: int
        @param value: The value to which the property will be set.
        @type value: int

Definition at line 296 of file pyHand_api.py.

def pyHand_api.pyHand.set_puck_like (   self,
  puckID,
  virtID 
)
Set the puck to have all the default properties of the indicated puck ID.

        @param puckID: The original puck to change.
        @type puckID: int
        @param virtID: The ID of the puck to load defaults from.
        @type virtID: int

Definition at line 552 of file pyHand_api.py.

def pyHand_api.pyHand.set_velocity (   self,
  puckID,
  velocity 
)
Set the velocity and make the motor move.

        @param puckID: The ID of the puck to set the velocity of.
        @type puckID: int
        @param velocity: The velocity (in cts/ms) of the motor.
        @type velocity: int

Definition at line 1170 of file pyHand_api.py.

def pyHand_api.pyHand.twoscomp (   self,
  number 
)

Definition at line 1215 of file pyHand_api.py.

def pyHand_api.pyHand.wait_done_moving (   self,
  motors_to_check = ALL_FINGERS 
)
Waits until the given list of motors have all stopped moving.

        @param motors_to_check: A list of motors to wait for.
        @type motors_to_check: Array[*int]

Definition at line 735 of file pyHand_api.py.

def pyHand_api.pyHand.write_msg (   self,
  msgID,
  data,
  delay = .002 
)
Send a general message to PCAN_USBBUS1. This can be a get, set, or even garbage.

        @param msgID: The puck or group to which the message will be sent.
        @type msgID: int
        @param data: The array containing the data for the TPCANMsg.
        @type data: Array[]
        @param delay: The time delay to wait for the message to be written.
        @type delay: float
        @rtype: TPCANStatus
        @return: Status of the self.PCAN bus.

Definition at line 248 of file pyHand_api.py.


Member Data Documentation

Definition at line 95 of file pyHand_api.py.

Definition at line 95 of file pyHand_api.py.

Definition at line 95 of file pyHand_api.py.

Definition at line 95 of file pyHand_api.py.

Definition at line 95 of file pyHand_api.py.


The documentation for this class was generated from the following file:


bhand_controller
Author(s): Román Navarro , Jorge Ariño
autogenerated on Sun Oct 5 2014 22:24:40