Functions
hrl_haptic_mpc::haptic_mpc_util Namespace Reference

Functions

def divRound
 Rounds the value provided to the nearest 'unit'.
def get_skew_matrix
 Return a skew matrix as a numpy matrix given an vector (n=3) input.
def getAllTaxelArrayDataAsLists
 Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).
def getLocations
 Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).
def getLocationsFromTaxelArray
 Return a taxel array force location vector data as a list (formats it nicely for iteration).
def getNormals
 Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).
def getNormalsFromTaxelArray
 Return a taxel array normal vector data as a list (formats it nicely for iteration).
def getNumDecimalPlaces
 Get number of decimal points in a float.
def getSkewMatrix
 Return a skew matrix as a numpy matrix given an vector (n=3) input.
def getTaxelArrayDataAsLists
 Return a taxel array message data as lists (formats it nicely for iteration).
def getValidInput
 Takes an optparse.OptionParser as an input, and returns a valid opt structure (or flags an error).
def getValues
 Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).
def getValuesFromTaxelArray
 Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).
def goalOrientationInQuat
 Interpolate a step towards the given goal orientation.
def initialiseOptParser
 Sets up options for an optparse.OptionParser.

Function Documentation

def hrl_haptic_mpc.haptic_mpc_util.divRound (   value,
  unit 
)

Rounds the value provided to the nearest 'unit'.

Parameters:
valueThe number being rounded
unitThe step size to round the value to.

Definition at line 214 of file haptic_mpc_util.py.

Return a skew matrix as a numpy matrix given an vector (n=3) input.

Identical to getSkewMatrix - needs to be cleaned up.

Parameters:
vecList of length 3
Returns:
3x3 numpy skew matrix

Definition at line 166 of file haptic_mpc_util.py.

Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).

Parameters:
ta_msg_listA list of TaxelArray message objects.
Return values:
locations_listList of taxel locations, specified as numpy matrices: [x,y,z].T
normals_listList of normal vectors, specified as numpy matrices: [x,y,z].T
values_listList of force (or distance) magnitudes, specified as numpy matrices: [x,y,z].T
joints_listList of taxel locations, specified as numpy matrices: [x,y,z].T

Definition at line 89 of file haptic_mpc_util.py.

Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).

Parameters:
ta_msg_listA list of TaxelArray message objects.
Return values:
locations_listList of taxel locations, specified as numpy matrices: [x,y,z].T

Definition at line 106 of file haptic_mpc_util.py.

Return a taxel array force location vector data as a list (formats it nicely for iteration).

Parameters:
ta_msgTaxelArray message object
Return values:
locations_listList of contact locations, specified as numpy matrices: [x,y,z].T

Definition at line 66 of file haptic_mpc_util.py.

Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).

Parameters:
ta_msg_listA list of TaxelArray message objects.
Return values:
normals_listList of normal vectors, specified as numpy matrices: [x,y,z].T

Definition at line 126 of file haptic_mpc_util.py.

Return a taxel array normal vector data as a list (formats it nicely for iteration).

Parameters:
ta_msgTaxelArray message object
Return values:
normals_listList of normal vectors, specified as numpy matrices: [x,y,z].T

Definition at line 56 of file haptic_mpc_util.py.

Get number of decimal points in a float.

Parameters:
float_valueThe number being evaluated for the number of decimal places

Definition at line 208 of file haptic_mpc_util.py.

Return a skew matrix as a numpy matrix given an vector (n=3) input.

Parameters:
vecList of length 3
Returns:
3x3 numpy skew matrix

Definition at line 136 of file haptic_mpc_util.py.

Return a taxel array message data as lists (formats it nicely for iteration).

Parameters:
ta_msgTaxelArray message object
Return values:
locations_listList of taxel locations, specified as numpy matrices: [x,y,z].T
normals_listList of normal vectors, specified as numpy matrices: [x,y,z].T
values_listList of force (or distance) magnitudes, specified as numpy matrices: [x,y,z].T
joints_listList of taxel locations, specified as numpy matrices: [x,y,z].T

Definition at line 38 of file haptic_mpc_util.py.

Takes an optparse.OptionParser as an input, and returns a valid opt structure (or flags an error).

Parameters:
poptparse.OptionParser object
Returns:
Validated options from parsed input.

Definition at line 192 of file haptic_mpc_util.py.

def hrl_haptic_mpc.haptic_mpc_util.getValues (   ta_msg_list,
  force = True,
  distance = False 
)

Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).

Parameters:
ta_msg_listA list of TaxelArray message objects.
Return values:
values_listList of force (or distance) magnitudes, specified as numpy matrices: [x,y,z].T

Definition at line 116 of file haptic_mpc_util.py.

Return a taxel array force magnitude vector data as a list (formats it nicely for iteration).

Parameters:
ta_msgTaxelArray message object
Return values:
values_listList of taxel values (eg, force or proximity), specified as numpy matrices: [x,y,z].T

Definition at line 76 of file haptic_mpc_util.py.

def hrl_haptic_mpc.haptic_mpc_util.goalOrientationInQuat (   q_h_orient,
  q_g_orient,
  max_ang_step 
)

Interpolate a step towards the given goal orientation.

Parameters:
q_h_orientThe current hand orientation as a quaternion in list form: [x,y,z,w]
q_g_orientThe current goal orientation as a quaternion in list form: [x,y,z,w]
Returns:
Desired change in orientation as a delta
Todo:
clean this up so it doesn't use the "step" multiplier

Definition at line 148 of file haptic_mpc_util.py.

Sets up options for an optparse.OptionParser.

These parameters are used across multiple classes - eg, robot haptic state publisher, arm trajectory generator, etc

Parameters:
poptparse.OptionParser object

Definition at line 173 of file haptic_mpc_util.py.



hrl_haptic_mpc
Author(s): Jeff Hawke, Phillip Grice, Marc Killpack, Advait Jain. Advisor and Co-author: Prof. Charlie Kemp. Healthcare Robotics Lab, Georgia Tech
autogenerated on Wed Nov 27 2013 12:27:09