Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
hironx_ros_bridge.hironx_client.HIRONX Class Reference

List of all members.

Public Member Functions

def checkEncoders
def flat2Groups
def getActualState
def getCurrentPose
def getCurrentPosition
def getCurrentRotation
def getCurrentRPY
def getReferencePose
def getReferencePosition
def getReferenceRotation
def getReferenceRPY
def getRTCList
def goInitial
def goOffPose
def hand_width2angles
def HandClose
def HandOpen
def init
def isCalibDone
def isServoOn
def moveHand
def removeForceSensorOffset
def servoOff
def servoOn
def setHandEffort
def setHandJointAngles
def setHandWidth
def setSelfGroups
def setTargetPose
def startImpedance
def startImpedance_315_1
def startImpedance_315_2
def startImpedance_315_3
def stopImpedance
def stopImpedance_315_1
def stopImpedance_315_2
def stopImpedance_315_3

Public Attributes

 hrpsys_version

Static Public Attributes

list Groups
dictionary HandGroups = {'rhand': [2, 3, 4, 5], 'lhand': [6, 7, 8, 9]}
string hrpsys_version = '0.0.0'
int INITPOS_TYPE_EVEN = 0
int INITPOS_TYPE_FACTORY = 1
list OffPose
list RtcList = []
 sc = None
 sc_svc = None

Static Private Attributes

list _InitialPose
list _InitialPose_Factory

Detailed Description

@see: <a href = "https://github.com/fkanehiro/hrpsys-base/blob/master/" +
                "python/hrpsys_config.py">HrpsysConfigurator</a>

This class holds methods that are specific to Kawada Industries' dual-arm
robot called Hiro.

For the API doc for the derived methods, please see the parent
class via the link above; nicely formatted api doc web page
isn't available yet (discussed in
https://github.com/fkanehiro/hrpsys-base/issues/268).

Definition at line 85 of file hironx_client.py.


Member Function Documentation

def hironx_ros_bridge.hironx_client.HIRONX.checkEncoders (   self,
  jname = 'all',
  option = '' 
)
Run the encoder checking sequence for specified joints,
run goActual to adjust the direction values, and then turn servos on.

@type jname: str
@param jname: The value 'all' works iteratively for all servos.
@type option: str
@param option: Possible values are follows (w/o double quote):\
        "-overwrite": Overwrite calibration value.

Definition at line 614 of file hironx_client.py.

@type flatList: [int]
@param flatList: single dimension list, with its length depends on
         'Groups' variable defined within this class. Excessive
         elements will be dropped (see example below in @return)

         eg. If the number of joints of the robot is 15,
             len(flatList) should be 15.
@rtype: [[]]
@return: 2-dimensional list that has the same format with
 'Groups' variable.

 eg.
 ipython> flatlist = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
                      100, 110, 120, 130, 140, 150]
 ipython> robot.flat2Groups(flatlist)
 [[0], [10, 20],
  [30, 40, 50, 60, 70, 80],
  [90, 100, 110, 120, 130, 140]]

Definition at line 448 of file hironx_client.py.

Returns the physical state of robot.

@rtype: <a href = "http://hrpsys-base.googlecode.com/svn/doc/df/d17/" +
          "structOpenHRP_1_1RobotHardwareService_1_1" +
          "RobotState.html">
          OpenHRP::RobotHardwareService::RobotState</a>
@return: Robot's hardware status object that contains the following
 variables accessible: angle, command, torque, servoState,
 force, rateGyro, accel, voltage, current. See the api doc
 of the class for more detail. Each variable is accessible by
 like this for example:

     servostate= robot.getActualState().servoState

Definition at line 387 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getCurrentPose (   self,
  lname = None,
  frame_name = 'WAIST' 
)

Definition at line 813 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getCurrentPosition (   self,
  lname = None,
  frame_name = 'WAIST' 
)

Definition at line 823 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getCurrentRotation (   self,
  lname = None,
  frame_name = 'WAIST' 
)

Definition at line 833 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getCurrentRPY (   self,
  lname,
  frame_name = 'WAIST' 
)

Definition at line 843 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getReferencePose (   self,
  lname,
  frame_name = 'WAIST' 
)

Definition at line 853 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getReferencePosition (   self,
  lname,
  frame_name = 'WAIST' 
)

Definition at line 863 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getReferenceRotation (   self,
  lname,
  frame_name = 'WAIST' 
)

Definition at line 873 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.getReferenceRPY (   self,
  lname,
  frame_name = 'WAIST' 
)

Definition at line 883 of file hironx_client.py.

@see: HrpsysConfigurator.getRTCList

@rtype [[str]]
@rerutrn List of available components. Each element consists of a list
 of abbreviated and full names of the component.

Definition at line 229 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.goInitial (   self,
  tm = 7,
  wait = True,
  init_pose_type = 0 
)
Move arms to the predefined (as member variable) "initialized" pose.

@type tm: float
@param tm: Second to complete.
@type wait: bool
@param wait: If true, SequencePlayer.waitInterpolationOfGroup gets run.
     (TODO: Elaborate what this means...Even after having taken
     a look at its source code I can't tell what it means.)
@type init_pose_type: int
@param init_pose_type: 0: default init pose (specified as _InitialPose)
               1: factory init pose (specified as
                  _InitialPose_Factory)

Definition at line 194 of file hironx_client.py.

Move arms to the predefined (as member variable) pose where robot can
be safely turned off.

@type tm: float
@param tm: Second to complete.

Definition at line 179 of file hironx_client.py.

TODO: Needs documented what this method does.

@type width: float
@return: None if the given width is invalid.

Definition at line 351 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.HandClose (   self,
  hand = None,
  effort = None 
)
Close 2-finger hand, by internally calling self.setHandWidth
setting 0 width.

@type hand: str
@param hand: Name of the hand joint group. In the default
     setting of HIRONX, hand joint groups are defined
     in member 'HandGroups' where 'lhand' and 'rhand'
     are added.
@type effort: int

Definition at line 279 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.HandOpen (   self,
  hand = None,
  effort = None 
)
Set the stretch between two fingers of the specified hand as
hardcoded value (100mm), by internally calling self.setHandWidth.

@type hand: str
@param hand: Name of the hand joint group. In the default
     setting of HIRONX, hand joint groups are defined
     in member 'HandGroups' where 'lhand' and 'rhand'
     are added.
@type effort: int

Definition at line 265 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.init (   self,
  robotname = "HiroNX(Robot)0",
  url = "" 
)
Calls init from its superclass, which tries to connect RTCManager,
looks for ModelLoader, and starts necessary RTC components. Also runs
config, logger.
Also internally calls setSelfGroups().

@type robotname: str
@type url: str

Definition at line 142 of file hironx_client.py.

Check whether joints have been calibrated.
@rtype bool

Definition at line 408 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.isServoOn (   self,
  jname = 'any' 
)
Check whether servo control has been turned on.
@type jname: str
@param jname: Name of a link (that can be obtained by "hiro.Groups"
      as lists of groups).
@rtype bool

Definition at line 422 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.moveHand (   self,
  hand,
  av,
  tm = 1 
)
Negate the angle value for {2, 3, 6, 7}th element in av.

@type hand: str
@param hand: Specifies hand. (TODO: List the possible values. Should be
     listed in setHandJointAngles so just copy from its doc.)
@type av: [int]
@param av: angle of each joint of the specified arm
  (TODO: need verified. Also what's the length of the list?)
@param tm: Time in second to complete the work.

Definition at line 335 of file hironx_client.py.

Definition at line 810 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.servoOff (   self,
  jname = 'all',
  wait = True 
)
@type jname: str
@param jname: The value 'all' works iteratively for all servos.
@type wait: bool
@rtype: int
@return: 1 = all arm servo off. 2 = all servo on arms and hands off.
-1 = Something wrong happened.

Definition at line 566 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.servoOn (   self,
  jname = 'all',
  destroy = 1,
  tm = 3 
)
Turn on servo motors at joint specified.
Joints need to be calibrated (otherwise error returns).

@type jname: str
@param jname: The value 'all' works iteratively for all servos.
@param destroy: Not used.
@type tm: float
@param tm: Second to complete.
@rtype: int
@return: 1 or -1 indicating success or failure, respectively.

Definition at line 478 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.setHandEffort (   self,
  effort = 100 
)
Set maximum torque for all existing hand components.
@type effort: int

Definition at line 306 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.setHandJointAngles (   self,
  hand,
  angles,
  tm = 1 
)
@type hand: str
@param hand: Name of the hand joint group. In the default
     setting of HIRONX, hand joint groups are defined
     in member 'HandGroups' where 'lhand' and 'rhand'
     are added.
@type angles: OpenHRP::ServoControllerService::dSequence.
@param angles: List of (TODO: document). Elements are in degree.
@param tm: Time to complete the task.

Definition at line 293 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.setHandWidth (   self,
  hand,
  width,
  tm = 1,
  effort = None 
)
@type hand: str
@param hand: Name of the hand joint group. In the default
     setting of HIRONX, hand joint groups are defined
     in member 'HandGroups' where 'lhand' and 'rhand'
     are added.
@param width: Max=100.
@param tm: Time to complete the move.
@type effort: int
@param effort: Passed to self.setHandEffort if set. Not set by default.

Definition at line 315 of file hironx_client.py.

Set to the hrpsys.SequencePlayer the groups of links and joints that
are statically defined as member variables (Groups) within this class.

That said, override Groups variable if you prefer link and joint
groups set differently.

Definition at line 371 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.setTargetPose (   self,
  gname,
  pos,
  rpy,
  tm,
  frame_name = 'WAIST' 
)

Definition at line 893 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.startImpedance (   self,
  arm,
  kwargs 
)

Definition at line 794 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.startImpedance_315_1 (   self,
  arm,
  M_p = 100.0,
  D_p = 100.0,
  K_p = 100.0,
  M_r = 100.0,
  D_r = 2000.0,
  K_r = 2000.0,
  ref_force = [0,
  force_gain = [1,
  ref_moment = [0,
  moment_gain = [0,
  sr_gain = 1.0,
  avoid_gain = 0.0,
  reference_gain = 0.0,
  manipulability_limit = 0.1 
)

Definition at line 668 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.startImpedance_315_2 (   self,
  arm,
  M_p = 100.0,
  D_p = 100.0,
  K_p = 100.0,
  M_r = 100.0,
  D_r = 2000.0,
  K_r = 2000.0,
  force_gain = [1,
  moment_gain = [0,
  sr_gain = 1.0,
  avoid_gain = 0.0,
  reference_gain = 0.0,
  manipulability_limit = 0.1 
)

Definition at line 726 of file hironx_client.py.

def hironx_ros_bridge.hironx_client.HIRONX.startImpedance_315_3 (   self,
  arm,
  M_p = 100.0,
  D_p = 100.0,
  K_p = 100.0,
  M_r = 100.0,
  D_r = 2000.0,
  K_r = 2000.0,
  force_gain = [1,
  moment_gain = [0,
  sr_gain = 1.0,
  avoid_gain = 0.0,
  reference_gain = 0.0,
  manipulability_limit = 0.1 
)

Definition at line 756 of file hironx_client.py.

Definition at line 802 of file hironx_client.py.

Definition at line 715 of file hironx_client.py.

Definition at line 788 of file hironx_client.py.

Definition at line 791 of file hironx_client.py.


Member Data Documentation

Initial value:
[[0], [0, 0],
                    [-0.6, 0, -100, 15.2, 9.4, 3.2],
                    [0.6, 0, -100, -15.2, 9.4, -3.2],
                    [0, 0, 0, 0],
                    [0, 0, 0, 0]]

Definition at line 116 of file hironx_client.py.

Initial value:
[[0], [0, 0],
                            [-0, 0, -130, 0, 0, 0],
                            [0, 0, -130, 0, 0, 0],
                            [0, 0, 0, 0],
                            [0, 0, 0, 0]]

Definition at line 124 of file hironx_client.py.

Initial value:
[['torso', ['CHEST_JOINT0']],
              ['head', ['HEAD_JOINT0', 'HEAD_JOINT1']],
              ['rarm', ['RARM_JOINT0', 'RARM_JOINT1', 'RARM_JOINT2',
                        'RARM_JOINT3', 'RARM_JOINT4', 'RARM_JOINT5']],
              ['larm', ['LARM_JOINT0', 'LARM_JOINT1', 'LARM_JOINT2',
                        'LARM_JOINT3', 'LARM_JOINT4', 'LARM_JOINT5']]]

Definition at line 99 of file hironx_client.py.

dictionary hironx_ros_bridge::hironx_client.HIRONX::HandGroups = {'rhand': [2, 3, 4, 5], 'lhand': [6, 7, 8, 9]} [static]

Definition at line 132 of file hironx_client.py.

Definition at line 140 of file hironx_client.py.

Definition at line 150 of file hironx_client.py.

Definition at line 129 of file hironx_client.py.

Definition at line 130 of file hironx_client.py.

Initial value:
[[0],
               [0, 0],
               [25, -139, -157, 45, 0, 0],
               [-25, -139, -157, -45, 0, 0],
               [0, 0, 0, 0],
               [0, 0, 0, 0]]

Definition at line 109 of file hironx_client.py.

Definition at line 134 of file hironx_client.py.

Definition at line 137 of file hironx_client.py.

Definition at line 138 of file hironx_client.py.


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


hironx_ros_bridge
Author(s): Kei Okada
autogenerated on Sun Sep 13 2015 23:21:39