Public Member Functions | Public Attributes | Static Public Attributes
python.hrpsys_config.HrpsysConfigurator Class Reference

List of all members.

Public Member Functions

def __init__
def activateComps
 Activate components(plugins)
def calibrateInertiaSensor
 Calibrate inertia sensor.
def calibrateInertiaSensorWithDialog
 Calibrate inertia sensor with dialog and setting calibration pose.
def checkEncoders
 Run the encoder checking sequence for specified joints, run goActual and turn on servos.
def checkSimulationMode
 Check if this is running as simulation.
def clear
 Clears the Sequencer's current operation.
def clearJointAngles
 Cancels the commanded sequence of joint angle, by overwriting the command by the values of instant the method was invoked.
def clearJointAnglesOfGroup
 Cancels the commanded sequence of joint angle for the specified joint group, by overwriting the command by the values of instant the method was invoked.
def clearLog
 Clear logger's buffer.
def clearOfGroup
 Clears the Sequencer's current operation for joint groups.
def connectComps
 Connect components(plugins)
def connectLoggerPort
 Connect port to logger.
def createComp
 Create RTC component (plugins)
def createComps
 Create components(plugins) in getRTCList()
def deactivateComps
 Deactivate components(plugins)
def deleteComp
 Delete RTC component (plugins)
def deleteComps
 Delete components(plugins) in getRTCInstanceList()
def findComp
 Find component(plugin)
def findComps
 Check if all components in getRTCList() are created.
def findModelLoader
 Try to find ModelLoader.
def flat2Groups
 Convert list of angles into list of joint list for each groups.
def getActualState
 Get actual states of the robot that includes current reference joint angles and joint torques.
def getBodyInfo
 Get bodyInfo.
def getCurrentPose
 Returns the current physical pose of the specified joint in the joint space.
def getCurrentPosition
 Returns the current physical position of the specified joint in Cartesian space.
def getCurrentRotation
 Returns the current physical rotation of the specified joint.
def getCurrentRPY
 Returns the current physical rotation in RPY of the specified joint.
def getForceSensorNames
 Get list of force sensor names.
def getJointAngleControllerList
 Get list of controller list that need to control joint angles.
def getJointAngles
 Returns the commanded joint angle values.
def getReferencePose
 Returns the current commanded pose of the specified joint in the joint space.
def getReferencePosition
 Returns the current commanded position of the specified joint in Cartesian space.
def getReferenceRotation
 Returns the current commanded rotation of the specified joint.
def getReferenceRPY
 Returns the current commanded rotation in RPY of the specified joint.
def getRTCInstanceList
 Get list of RTC Instance.
def getRTCList
 Get list of available STABLE components.
def getRTCListUnstable
 Get list of available components including stable and unstable.
def getSensors
 Get list of sensors.
def goActual
 Adjust commanded values to the angles in the physical state by calling StateHolder::goActual.
def init
 Calls init from its superclass, which tries to connect RTCManager, looks for ModelLoader, and starts necessary RTC components.
def isCalibDone
 Check whether joints have been calibrated.
def isServoOn
 Check whether servo control has been turned on.
def lengthDigitalInput
 Returns the length of digital input port.
def lengthDigitalOutput
 Returns the length of digital output port.
def loadPattern
 Load a pattern file that is created offline.
def parseUrl
def playPattern
 Play motion pattern using a given trajectory that is represented by a list of joint angles, rpy, zmp and time.
def playPatternOfGroup
 Play motion pattern using a set of given trajectories that are represented by lists of joint angles.
def readDigitalInput
 Read data from Digital Input.
def readDigitalOutput
 Read data from Digital Output.
def removeForceSensorOffset
 remove force sensor offset
def removeForceSensorOffsetRMFO
 remove force sensor offset by RemoveForceSensorOffset (RMFO) RTC.
def saveLog
 Save log to the given file name.
def servoOff
 Turn off servos.
def servoOn
 Turn on servos.
def setFootSteps
 setFootSteps
def setFootStepsWithParam
 setFootSteps
def setInterpolationMode
 Set interpolation mode.
def setJointAngle
 Set angle to the given joint.
def setJointAngles
 Set all joint angles.
def setJointAnglesOfGroup
 Set the joint angles to aim.
def setJointAnglesSequence
 Set all joint angles.
def setJointAnglesSequenceOfGroup
 Set all joint angles.
def setMaxLogLength
 Set logger's buffer.
def setSelfGroups
 Set to the hrpsys.SequencePlayer the groups of links and joints that are statically defined as member variables (Groups) within this class.
def setSensorCalibrationJointAngles
 Set joint angles for sensor calibration.
def setTargetPose
 Move the end-effector to the given absolute pose.
def setTargetPoseRelative
 Move the end-effector's location relative to its current pose.
def setupLogger
 Setup logging function.
def startAutoBalancer
 Start AutoBalancer mode.
def startDefaultUnstableControllers
 Start default unstable RTCs controller mode.
def startImpedance
 Enable the ImpedanceController RT component.
def startImpedance_315_4
 start impedance mode
def startStabilizer
 Start Stabilzier mode.
def stopAutoBalancer
 Stop AutoBalancer mode.
def stopDefaultUnstableControllers
 Stop default unstable RTCs controller mode.
def stopImpedance
def stopImpedance_315_4
 stop impedance mode
def stopStabilizer
 Stop Stabilzier mode.
def waitForModelLoader
 Wait for ModelLoader.
def waitForRobotHardware
 Wait for RobotHardware is exists and activated.
def waitForRTCManager
 Wait for RTC manager.
def waitForRTCManagerAndRoboHardware
def waitForRTCManagerAndRobotHardware
 Wait for both RTC Manager (waitForRTCManager()) and RobotHardware (waitForRobotHardware())
def waitInterpolation
 Lets SequencePlayer wait until the movement currently happening to finish.
def waitInterpolationOfGroup
 Lets SequencePlayer wait until the movement currently happening to finish.
def writeDigitalOutput
 Using writeDigitalOutputWithMask is recommended for the less data transport.
def writeDigitalOutputWithMask
 Both dout and mask are lists with length of 32.

Public Attributes

 configurator_name

Static Public Attributes

 abc = None
 abc_version = None
 acf = None
 acf_svc = None
 acf_version = None
 bp = None
 bp_svc = None
 bp_version = None
 co = None
 co_svc = None
 co_version = None
 el = None
 el_svc = None
 el_version = None
 ep_svc = None
 es = None
 es_svc = None
 es_version = None
 fk = None
 fk_svc = None
 fk_version = None
 gc = None
 gc_svc = None
 gc_version = None
list Groups = []
 hes = None
 hes_svc = None
 hes_version = None
 hgc = None
 hrpsys_version = None
 ic = None
 ic_version = None
 kf = None
 kf_version = None
 kinematics_only_mode = False
 log = None
 log_svc = None
 log_use_owned_ec = False
 log_version = None
 ms = None
 octd = None
 octd_svc = None
 octd_version = None
 pdc = None
 rfu = None
 rfu_svc = None
 rfu_version = None
 rh = None
 rh_svc = None
 rh_version = None
 rmfo = None
 rmfo_version = None
 sc = None
 sc_svc = None
 sc_version = None
 sensors = None
 seq = None
 seq_svc = None
 seq_version = None
 sh = None
 sh_svc = None
 sh_version = None
 simulation_mode = None
 st = None
 st_version = None
 tc = None
 tc_svc = None
 tc_version = None
 te = None
 te_svc = None
 te_version = None
 tf = None
 tf_version = None
 tl = None
 tl_svc = None
 tl_version = None
 vs = None
 vs_version = None

Detailed Description

Definition at line 161 of file hrpsys_config.py.


Constructor & Destructor Documentation

def python.hrpsys_config.HrpsysConfigurator.__init__ (   self,
  cname = "[hrpsys.py] " 
)

Definition at line 2305 of file hrpsys_config.py.


Member Function Documentation

Activate components(plugins)

Definition at line 576 of file hrpsys_config.py.

Calibrate inertia sensor.

Definition at line 2001 of file hrpsys_config.py.

Calibrate inertia sensor with dialog and setting calibration pose.

Definition at line 2007 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.checkEncoders (   self,
  jname = 'all',
  option = '' 
)

Run the encoder checking sequence for specified joints, run goActual and turn on servos.

Parameters:
jnamestr: The value 'all' works iteratively for all servos.
optionstr: Possible values are follows (w/o double quote):\ "-overwrite": Overwrite calibration value.

Definition at line 1886 of file hrpsys_config.py.

Check if this is running as simulation.

Definition at line 973 of file hrpsys_config.py.

Clears the Sequencer's current operation.

Works for joint groups too.

See also:
HrpsysConfigurator.clear

Discussed in https://github.com/fkanehiro/hrpsys-base/issues/158 Examples is found in a unit test: https://github.com/start-jsk/rtmros_hironx/blob/bb0672be3e03e5366e03fe50520e215302b8419f/hironx_ros_bridge/test/test_hironx.py#L293

Definition at line 1506 of file hrpsys_config.py.

Cancels the commanded sequence of joint angle, by overwriting the command by the values of instant the method was invoked.

Note that this only cancels the queue once. Icoming commands after this method is called will be processed as usual.

Returns:
bool

Definition at line 2232 of file hrpsys_config.py.

Cancels the commanded sequence of joint angle for the specified joint group, by overwriting the command by the values of instant the method was invoked.

Note that this only cancels the queue once. Icoming commands after this method is called will be processed as usual.

Parameters:
gname,:Name of the joint group.
Returns:
bool

Definition at line 2240 of file hrpsys_config.py.

Clear logger's buffer.

Definition at line 1531 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.clearOfGroup (   self,
  gname,
  tm = 0.0 
)

Clears the Sequencer's current operation for joint groups.

Definition at line 1516 of file hrpsys_config.py.

Connect components(plugins)

Definition at line 295 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.connectLoggerPort (   self,
  artc,
  sen_name,
  log_name = None 
)

Connect port to logger.

Parameters:
artcobject: object of component that contains sen_name port
sen_namestr: name of port for logging
log_namestr: name of port in logger

Definition at line 838 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.createComp (   self,
  compName,
  instanceName 
)

Create RTC component (plugins)

Parameters:
instanceNamestr: name of instance, choose one of https://github.com/fkanehiro/hrpsys-base/tree/master/rtc
comNamestr: name of component that to be created.

Definition at line 593 of file hrpsys_config.py.

Create components(plugins) in getRTCList()

Definition at line 613 of file hrpsys_config.py.

Deactivate components(plugins)

Definition at line 585 of file hrpsys_config.py.

Delete RTC component (plugins)

Parameters:
compNamestr: name of component that to be deleted

Definition at line 629 of file hrpsys_config.py.

Delete components(plugins) in getRTCInstanceList()

Definition at line 640 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.findComp (   self,
  compName,
  instanceName,
  max_timeout_count = 10,
  verbose = True 
)

Find component(plugin)

Parameters:
compNamestr: component name
instanceNamestr: instance name int: max timeout in seconds

Definition at line 657 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.findComps (   self,
  max_timeout_count = 10,
  verbose = True 
)

Check if all components in getRTCList() are created.

Definition at line 693 of file hrpsys_config.py.

Try to find ModelLoader.

Definition at line 1008 of file hrpsys_config.py.

Convert list of angles into list of joint list for each groups.

Parameters:
flatListlist: single dimension list with its length of 15
Returns:
list of list: 2-dimensional list of Groups.

Definition at line 1775 of file hrpsys_config.py.

Get actual states of the robot that includes current reference joint angles and joint torques.

Returns:
: This returns actual states of the robot, which is defined in RobotHardware.idl (found at https://github.com/fkanehiro/hrpsys-base/blob/3fd7671de5129101a4ade3f98e2eac39fd6b26c0/idl/RobotHardwareService.idl#L32_L57 as of version 315.11.0)
    /**
     * @brief status of the robot
     */
    struct RobotState
    {
      DblSequence               angle;  ///< current joint angles[rad]
      DblSequence               command;///< reference joint angles[rad]
      DblSequence               torque; ///< joint torques[Nm]
      /**
       * @brief servo statuses(32bit+extra states)
       *
       * 0: calib status ( 1 => done )\n
       * 1: servo status ( 1 => on )\n
       * 2: power status ( 1 => supplied )\n
       * 3-18: servo alarms (see @ref iob.h)\n
       * 19-23: unused
       * 24-31: driver temperature (deg)
       */
      LongSequenceSequence              servoState;
      sequence<DblSequence6>    force;    ///< forces[N] and torques[Nm]
      sequence<DblSequence3>    rateGyro; ///< angular velocities[rad/s]
      sequence<DblSequence3>    accel;    ///< accelerations[m/(s^2)]
      double                    voltage;  ///< voltage of power supply[V]
      double                    current;  ///< current[A]
    };

Definition at line 1692 of file hrpsys_config.py.

Get bodyInfo.

Definition at line 803 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getCurrentPose (   self,
  lname = None,
  frame_name = None 
)

Returns the current physical pose of the specified joint in the joint space.

cf. getReferencePose that returns commanded value.

eg.

     IN: robot.getCurrentPose('LARM_JOINT5')
     OUT: [-0.0017702356144599085,
      0.00019034630541264752,
      -0.9999984150158207,
      0.32556275164378523,
      0.00012155879975329215,
      0.9999999745367515,
       0.0001901314142046251,
       0.18236394191140365,
       0.9999984257434246,
       -0.00012122202968358842,
       -0.001770258707652326,
       0.07462472659364472,
       0.0,
       0.0,
       0.0,
       1.0]

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: Rotational matrix and the position of the given joint in 1-dimensional list, that is:
 [a11, a12, a13, x,
  a21, a22, a23, y,
  a31, a32, a33, z,
   0,   0,   0,  1]

Definition at line 1217 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getCurrentPosition (   self,
  lname = None,
  frame_name = None 
)

Returns the current physical position of the specified joint in Cartesian space.

cf. getReferencePosition that returns commanded value.

eg.

    robot.getCurrentPosition('LARM_JOINT5')
    [0.325, 0.182, 0.074]

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: List of x, y, z positions about the specified joint.

Definition at line 1270 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getCurrentRotation (   self,
  lname,
  frame_name = None 
)

Returns the current physical rotation of the specified joint.

cf. getReferenceRotation that returns commanded value.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: Rotational matrix of the given joint in 2-dimensional list, that is:
 [[a11, a12, a13],
  [a21, a22, a23],
  [a31, a32, a33]]

Definition at line 1295 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getCurrentRPY (   self,
  lname,
  frame_name = None 
)

Returns the current physical rotation in RPY of the specified joint.

cf. getReferenceRPY that returns commanded value.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: List of orientation in rpy form about the specified joint.

Definition at line 1320 of file hrpsys_config.py.

Get list of force sensor names.

Returns existence force sensors and virtual force sensors. self.sensors and virtual force sensors are assumed.

Definition at line 829 of file hrpsys_config.py.

Get list of controller list that need to control joint angles.

Definition at line 766 of file hrpsys_config.py.

Returns the commanded joint angle values.

See also:
: HrpsysConfigurator.getJointAngles

Note that it's not the physical state of the robot's joints, which can be obtained by getActualState().angle.

Returns:
List of float: List of angles (degree) of all joints, in the order defined in the member variable 'Groups' (eg. chest, head1, head2, ..).

Definition at line 1203 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getReferencePose (   self,
  lname,
  frame_name = None 
)

Returns the current commanded pose of the specified joint in the joint space.

cf. getCurrentPose that returns physical pose.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: Rotational matrix and the position of the given joint in 1-dimensional list, that is:
 [a11, a12, a13, x,
  a21, a22, a23, y,
  a31, a32, a33, z,
   0,   0,   0,  1]

Definition at line 1338 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getReferencePosition (   self,
  lname,
  frame_name = None 
)

Returns the current commanded position of the specified joint in Cartesian space.

cf. getCurrentPosition that returns physical value.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: List of angles (degree) of all joints, in the order defined in the member variable 'Groups' (eg. chest, head1, head2, ..).

Definition at line 1370 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getReferenceRotation (   self,
  lname,
  frame_name = None 
)

Returns the current commanded rotation of the specified joint.

cf. getCurrentRotation that returns physical value.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: Rotational matrix of the given joint in 2-dimensional list, that is:
 [[a11, a12, a13],
  [a21, a22, a23],
  [a31, a32, a33]]

Definition at line 1390 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getReferenceRPY (   self,
  lname,
  frame_name = None 
)

Returns the current commanded rotation in RPY of the specified joint.

cf. getCurrentRPY that returns physical value.

lname: str

Parameters:
lname,:Name of the link.
frame_namestr: set reference frame name (from 315.2.5) : list of float
Returns:
: List of orientation in rpy form about the specified joint.

Definition at line 1415 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.getRTCInstanceList (   self,
  verbose = True 
)

Get list of RTC Instance.

Definition at line 774 of file hrpsys_config.py.

Get list of available STABLE components.

Returns:
list of list: List of available components. Each element consists of a list of abbreviated and full names of the component.

Definition at line 708 of file hrpsys_config.py.

Get list of available components including stable and unstable.

Returns:
list of list: List of available unstable components. Each element consists of a list of abbreviated and full names of the component.

Definition at line 734 of file hrpsys_config.py.

Get list of sensors.

Parameters:
urlstr: model file url

Definition at line 815 of file hrpsys_config.py.

Adjust commanded values to the angles in the physical state by calling StateHolder::goActual.

This needs to be run BEFORE servos are turned on.

Definition at line 1036 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.init (   self,
  robotname = "Robot",
  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().

robotname: str url: str

Definition at line 2262 of file hrpsys_config.py.

Check whether joints have been calibrated.

Returns:
bool: True if all joints are calibrated

Definition at line 1728 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.isServoOn (   self,
  jname = 'any' 
)

Check whether servo control has been turned on.

Parameters:
jnamestr: Name of a link (that can be obtained by "hiro.Groups" as lists of groups). When jname = 'all' or 'any' => If all joints are servoOn, return True, otherwise, return False. When jname = 'some' => If some joint is servoOn, return True, otherwise return False.
Returns:
bool: True if servo is on

Definition at line 1742 of file hrpsys_config.py.

Returns the length of digital input port.

Definition at line 1544 of file hrpsys_config.py.

Returns the length of digital output port.

Definition at line 1550 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.loadPattern (   self,
  fname,
  tm 
)

Load a pattern file that is created offline.

Format of the pattern file:

  • example format:
      t0 j0 j1 j2...jn
      t1 j0 j1 j2...jn
      :
      tn j0 j1 j2...jn
    
  • Delimmitted by space
  • Each line consists of an action.
  • Time between each action is defined by tn+1 - tn
    • The time taken for the 1st line is defined by the arg tm.
Parameters:
fnamestr: Name of the pattern file.
tmfloat: - The time to take for the 1st line.
Returns:
: List of 2 oct(string) values.

Definition at line 1151 of file hrpsys_config.py.

Definition at line 795 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.playPattern (   self,
  jointangles,
  rpy,
  zmp,
  tm 
)

Play motion pattern using a given trajectory that is represented by a list of joint angles, rpy, zmp and time.

jointangles: [[float]]

Parameters:
jointangles,:Sequence of the sets of joint angles in radian. The whole list represents a trajectory. Each element of the 1st degree in the list consists of the joint angles.
rpylist of float: Orientation in rpy.
zmplist of float: TODO: description
tmfloat: Second to complete the command. This only includes the time taken for execution (i.e. time for planning and other misc. processes are not considered).
Returns:
bool:

Definition at line 1944 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.playPatternOfGroup (   self,
  gname,
  jointangles,
  tm 
)

Play motion pattern using a set of given trajectories that are represented by lists of joint angles.

Each trajectory aims to run within the specified time (tm), and there's no slow down between trajectories unless the next one is the last.

Example: self.playPatternOfGroup('larm', [[0.0, 0.0, -2.2689280275926285, 0.0, 0.0, 0.0], [0.0, 0.0, -1.9198621771937625, 0.0, 0.0, 0.0], [0.0, 0.0, -1.5707963, 0.0, 0.0, 0.0]], [3, 3, 10])

Parameters:
gnamestr: Name of the joint group. jointangles: [[float]]
jointangles,:Sequence of the sets of joint angles in radian. The whole list represents a trajectory. Each element of the 1st degree in the list consists of the joint angles. To illustrate:

[[a0-0, a0-1,...,a0-n], # a)ngle. 1st path in trajectory [a1-0, a1-1,...,a1-n], # 2nd path in the trajectory. : [am-0, am-1,...,am-n]] # mth path in the trajectory tm: [float]

Parameters:
tmfloat: Sequence of the time values to complete the task, each element of which corresponds to a set of jointangles in the same order.
Returns:
bool:

Definition at line 1961 of file hrpsys_config.py.

Read data from Digital Input.

See also:
: HrpsysConfigurator.readDigitalInput

Digital input consits of 14 bits. The last 2 bits are lacking and compensated, so that the last 4 bits are 0x4 instead of 0x1.

Author:
Hajime Saito (@emijah)
Returns:
list of int: List of the values (2 octtets) in digital input register. Range: 0 or 1.

#TODO: Catch AttributeError that occurs when RobotHardware not found. # Typically with simulator, erro msg might look like this; # 'NoneType' object has no attribute 'readDigitalInput'

Definition at line 1642 of file hrpsys_config.py.

Read data from Digital Output.

Digital input consits of 14 bits. The last 2 bits are lacking and compensated, so that the last 4 bits are 0x4 instead of 0x1.

#TODO: Catch AttributeError that occurs when RobotHardware not found. # Typically with simulator, erro msg might look like this; # 'NoneType' object has no attribute 'readDigitaloutput'

Author:
Hajime Saito (@emijah)
Returns:
list of int: List of the values in digital input register. Range: 0 or 1.

Definition at line 1668 of file hrpsys_config.py.

remove force sensor offset

Definition at line 1938 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.removeForceSensorOffsetRMFO (   self,
  sensor_names = [],
  tm = 8.0 
)

remove force sensor offset by RemoveForceSensorOffset (RMFO) RTC.

Parameters:
sensor_names: list of sensor names to be calibrated. If not specified, all sensors are calibrated by default.
tm: calibration time[s]. 8.0[s] by default.
Returns:
bool : true if set successfully, false otherwise

Definition at line 2249 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.saveLog (   self,
  fname = 'sample' 
)

Save log to the given file name.

Parameters:
fnamestr: name of the file

Definition at line 1522 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.servoOff (   self,
  jname = 'all',
  wait = True 
)

Turn off servos.

Parameters:
jnamestr: The value 'all' works iteratively for all servos.
waitbool: Wait for user's confirmation via GUI
Returns:
int: 1 = all arm servo off. 2 = all servo on arms and hands off. -1 = Something wrong happened.

Definition at line 1837 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.servoOn (   self,
  jname = 'all',
  destroy = 1,
  tm = 3 
)

Turn on servos.

Joints need to be calibrated (otherwise error returns).

Parameters:
jnamestr: The value 'all' works iteratively for all servos.
destroyint: Not used.
tmfloat: Second to complete.
Returns:
int: 1 or -1 indicating success or failure, respectively.

Definition at line 1789 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setFootSteps (   self,
  footstep,
  overwrite_fs_idx = 0 
)

setFootSteps

Parameters:
footstep: FootstepSequence.
overwrite_fs_idx: Index to be overwritten. overwrite_fs_idx is used only in walking.

Definition at line 2215 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setFootStepsWithParam (   self,
  footstep,
  stepparams,
  overwrite_fs_idx = 0 
)

setFootSteps

Parameters:
footstep: FootstepSequence.
stepparams: StepParamSeuqnce.
overwrite_fs_idx: Index to be overwritten. overwrite_fs_idx is used only in walking.

Definition at line 2223 of file hrpsys_config.py.

Set interpolation mode.

You may need to import OpenHRP in order to pass an argument. For more info See https://github.com/fkanehiro/hrpsys-base/pull/1012#issue-160802911.

Parameters:
modenew interpolation mode. Either { OpenHRP.SequencePlayerService.LINEAR, OpenHRP.SequencePlayerService.HOFFARBIB }.
Returns:
true if set successfully, false otherwise

Definition at line 1195 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setJointAngle (   self,
  jname,
  angle,
  tm 
)

Set angle to the given joint.

NOTE-1: It's known that this method does not do anything after
some group operation is done.
TODO: at least need to warn users.
NOTE-2: While this method does not check angle value range,
any joints could emit position limit over error, which has not yet
been thrown by hrpsys so that there's no way to catch on this python client. 
Worthwhile opening an enhancement ticket at designated issue tracker.
Parameters:
jnamestr: name of joint
anglefloat: In degree.
tmfloat: Time to complete. bool
Returns:
False upon any problem during execution.

Definition at line 1045 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setJointAngles (   self,
  angles,
  tm 
)

Set all joint angles.

NOTE: While this method does not check angle value range,
      any joints could emit position limit over error, which has not yet
      been thrown by hrpsys so that there's no way to catch on this python client. 
      Worthwhile opening an enhancement ticket at designated issue tracker.
Parameters:
angleslist of float: In degree.
tmfloat: Time to complete. bool
Returns:
False upon any problem during execution.

Definition at line 1067 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setJointAnglesOfGroup (   self,
  gname,
  pose,
  tm,
  wait = True 
)

Set the joint angles to aim.

By default it waits interpolation to be over.

NOTE: While this method does not check angle value range,
      any joints could emit position limit over error, which has not yet
      been thrown by hrpsys so that there's no way to catch on this python client. 
      Worthwhile opening an enhancement ticket at designated issue tracker.
Parameters:
gnamestr: Name of the joint group.
poselist of float: list of positions and orientations
tmfloat: Time to complete.
waitbool: If true, all other subsequent commands wait until the movement commanded by this method call finishes. bool
Returns:
False upon any problem during execution.

Definition at line 1086 of file hrpsys_config.py.

Set all joint angles.

len(angless) should be equal to len(tms).

NOTE: While this method does not check angle value range,
      any joints could emit position limit over error, which has not yet
      been thrown by hrpsys so that there's no way to catch on this python client. 
      Worthwhile opening an enhancement ticket at designated issue tracker.
Parameters:
sequentiallist of angles in float: In rad
tmsequential list of time in float: Time to complete, In Second bool
Returns:
False upon any problem during execution.

Definition at line 1112 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setJointAnglesSequenceOfGroup (   self,
  gname,
  angless,
  tms 
)

Set all joint angles.

NOTE: While this method does not check angle value range,
      any joints could emit position limit over error, which has not yet
      been thrown by hrpsys so that there's no way to catch on this python client. 
      Worthwhile opening an enhancement ticket at designated issue tracker.
Parameters:
gnamestr: Name of the joint group.
sequentiallist of angles in float: In rad
tmsequential list of time in float: Time to complete, In Second bool
Returns:
False upon any problem during execution.

Definition at line 1131 of file hrpsys_config.py.

Set logger's buffer.

Parameters:
lengthint: length of log, if the system runs at 500hz and you want to store 2min, set 2*60*500.

Definition at line 1537 of file hrpsys_config.py.

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

Definition at line 1025 of file hrpsys_config.py.

Set joint angles for sensor calibration.

Please override joint angles to avoid self collision.

Definition at line 1993 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setTargetPose (   self,
  gname,
  pos,
  rpy,
  tm,
  frame_name = None 
)

Move the end-effector to the given absolute pose.

All d* arguments are in meter.

Parameters:
gnamestr: Name of the joint group.
poslist of float: In meter.
rpylist of float: In radian.
tmfloat: Second to complete the command. This only includes the time taken for execution (i.e. time for planning and other misc. processes are not considered).
frame_namestr: Name of the frame that this particular command references to.
Returns:
bool: False if unreachable.

Definition at line 1433 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setTargetPoseRelative (   self,
  gname,
  eename,
  dx = 0,
  dy = 0,
  dz = 0,
  dr = 0,
  dp = 0,
  dw = 0,
  tm = 10,
  wait = True 
)

Move the end-effector's location relative to its current pose.

Note that because of "relative" nature, the method waits for the commands run previously to finish. Do not get confused with the "wait" argument, which regulates all subsequent commands, not previous ones.

For d*, distance arguments are in meter while rotations are in degree.

Example usage: The following moves RARM_JOINT5 joint 0.1mm forward within 0.1sec.

    robot.setTargetPoseRelative('rarm', 'RARM_JOINT5', dx=0.0001, tm=0.1)
Parameters:
gnamestr: Name of the joint group that is to be manipulated.
eenamestr: Name of the joint that the manipulated joint group references to.
dxfloat: In meter.
dyfloat: In meter.
dzfloat: In meter.
drfloat: In radian.
dpfloat: In radian.
dwfloat: In radian.
tmfloat: Second to complete the command. This only includes the time taken for execution (i.e. time for planning and other misc. processes are not considered).
waitbool: If true, all other subsequent commands wait until the movement commanded by this method call finishes.
Returns:
bool: False if unreachable.

Definition at line 1458 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.setupLogger (   self,
  maxLength = 4000 
)

Setup logging function.

Parameters:
maxLength: max length of data from DataLogger.h #define DEFAULT_MAX_LOG_LENGTH (200*20) if the robot running at 200hz (5msec) 4000 means 20 secs

Definition at line 857 of file hrpsys_config.py.

Start AutoBalancer mode.

Parameters:
limbslist of end-effector name to control. If Groups has rarm and larm, rleg, lleg, rarm, larm by default. If Groups is not defined or Groups does not have rarm and larm, rleg and lleg by default.

Definition at line 2030 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.startDefaultUnstableControllers (   self,
  ic_limbs = [],
  abc_limbs = [] 
)

Start default unstable RTCs controller mode.

Currently Stabilzier, AutoBalancer, and ImpedanceController are started based on "Groups" setting. If ic_limbs or abc_limbs is not specified, default setting is set according to "Groups". By default, If the robot has an arm, start impedance for the arm. If the robot has a leg, start st and autobalancer. autobalancer's fixed limbs are all existing arms and legs. Use cases: Biped robot (leg only) : no impedance, start st, start autobalancer with ["rleg", "lleg"]. Dual-arm robot (arm only) : start impedance ["rarm", "larm"], no st, no autobalancer. Dual-arm+biped robot (=humanoid robot) : start impedance ["rarm", "larm"], start st, start autobalancer with ["rleg", "lleg", "rarm", "larm"]. Quadruped robot : same as "humanoid robot" by default.

Definition at line 2148 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.startImpedance (   self,
  arm,
  kwargs 
)

Enable the ImpedanceController RT component.

This method internally calls startImpedance-*, hrpsys version-specific method.

: hrpsys version greather than 315.2.0. : ImpedanceController RTC to be activated on the robot's controller. : From 315.2.0 onward, following arguments are dropped and can be set by self.seq_svc.setWrenches instead of this method. See an example at https://github.com/fkanehiro/hrpsys-base/pull/434/files#diff-6204f002204dd9ae80f203901f155fa9R44:

  • ref_force[fx, fy, fz] (unit: N) and ref_moment[tx, ty, tz] (unit: Nm) can be set via self.seq_svc.setWrenches. For example:

self.seq_svc.setWrenches([0, 0, 0, 0, 0, 0, fx, fy, fz, tx, ty, tz, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,])

setWrenches takes 6 values per sensor, so the robot in the example above has 4 sensors where each line represents a sensor. See this link (https://github.com/fkanehiro/hrpsys-base/pull/434/files) for a concrete example.

Parameters:
arm,:Name of the kinematic group (i.e. self.Groups[n][0]).
kwargs,:This varies depending on the version of hrpsys your robot's controller runs on (which you can find by "self.hrpsys_version" command). For instance, if your hrpsys is 315.10.1, refer to "startImpedance_315_4" method.

Definition at line 2111 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.startImpedance_315_4 (   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,
  controller_mode = None,
  ik_optional_weight_vector = None 
)

start impedance mode

arm: str name of artm to be controlled, this must be initialized using setSelfGroups()

Parameters:
force_gain,moment_gain,:multipliers to the eef offset position vel_p and orientation vel_r. 3-dimensional vector (then converted internally into a diagonal matrix).

Definition at line 2062 of file hrpsys_config.py.

Start Stabilzier mode.

Definition at line 2050 of file hrpsys_config.py.

Stop AutoBalancer mode.

Definition at line 2044 of file hrpsys_config.py.

Stop default unstable RTCs controller mode.

Currently Stabilzier, AutoBalancer, and ImpedanceController are stopped based on "Groups" setting. Please see documentation of startDefaultUnstableControllers().

Definition at line 2187 of file hrpsys_config.py.

Definition at line 2142 of file hrpsys_config.py.

stop impedance mode

Definition at line 2105 of file hrpsys_config.py.

Stop Stabilzier mode.

Definition at line 2056 of file hrpsys_config.py.

Wait for ModelLoader.

Definition at line 1017 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.waitForRobotHardware (   self,
  robotname = "Robot" 
)

Wait for RobotHardware is exists and activated.

Parameters:
robotnamestr: name of RobotHardware component.

Definition at line 945 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.waitForRTCManager (   self,
  managerhost = nshost 
)

Wait for RTC manager.

Parameters:
managerhoststr: name of host computer that manager is running

Definition at line 931 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.waitForRTCManagerAndRoboHardware (   self,
  robotname = "Robot",
  managerhost = nshost 
)

Definition at line 992 of file hrpsys_config.py.

def python.hrpsys_config.HrpsysConfigurator.waitForRTCManagerAndRobotHardware (   self,
  robotname = "Robot",
  managerhost = nshost 
)

Wait for both RTC Manager (waitForRTCManager()) and RobotHardware (waitForRobotHardware())

Parameters:
managerhoststr: name of host computer that manager is running
robotnamestr: name of RobotHardware component.

Definition at line 997 of file hrpsys_config.py.

Lets SequencePlayer wait until the movement currently happening to finish.

Definition at line 1175 of file hrpsys_config.py.

Lets SequencePlayer wait until the movement currently happening to finish.

See also:
: SequencePlayer.waitInterpolationOfGroup
: http://wiki.ros.org/joint_trajectory_action. This method corresponds to JointTrajectoryGoal in ROS.
Parameters:
gnamestr: Name of the joint group.

Definition at line 1182 of file hrpsys_config.py.

Using writeDigitalOutputWithMask is recommended for the less data transport.

Parameters:
doutlist of int: List of bits, length of 32 bits where elements are 0 or 1.

What each element stands for depends on how the robot's imlemented. Consult the hardware manual.

Returns:
bool: RobotHardware.writeDigitalOutput returns True if writable. False otherwise.

Definition at line 1556 of file hrpsys_config.py.

Both dout and mask are lists with length of 32.

Only the bit in dout that corresponds to the bits in mask that are flagged as 1 will be evaluated.

Example:

 Case-1. Only 18th bit will be evaluated as 1.
  dout [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  mask [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

 Case-2. Only 18th bit will be evaluated as 0.
  dout [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  mask [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

 Case-3. None will be evaluated since there's no flagged bit in mask.
  dout [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  mask [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Parameters:
doutlist of int: List of bits, length of 32 bits where elements are 0 or 1.
masklist of int: List of masking bits, length of 32 bits where elements are 0 or 1.
Returns:
bool: RobotHardware.writeDigitalOutput returns True if writable. False otherwise.

Definition at line 1585 of file hrpsys_config.py.


Member Data Documentation

Definition at line 194 of file hrpsys_config.py.

Definition at line 202 of file hrpsys_config.py.

Definition at line 262 of file hrpsys_config.py.

Definition at line 263 of file hrpsys_config.py.

Definition at line 264 of file hrpsys_config.py.

Definition at line 252 of file hrpsys_config.py.

Definition at line 253 of file hrpsys_config.py.

Definition at line 254 of file hrpsys_config.py.

Definition at line 216 of file hrpsys_config.py.

Definition at line 217 of file hrpsys_config.py.

Definition at line 218 of file hrpsys_config.py.

Definition at line 2305 of file hrpsys_config.py.

Definition at line 226 of file hrpsys_config.py.

Definition at line 227 of file hrpsys_config.py.

Definition at line 228 of file hrpsys_config.py.

Definition at line 166 of file hrpsys_config.py.

Definition at line 206 of file hrpsys_config.py.

Definition at line 207 of file hrpsys_config.py.

Definition at line 208 of file hrpsys_config.py.

Definition at line 185 of file hrpsys_config.py.

Definition at line 186 of file hrpsys_config.py.

Definition at line 187 of file hrpsys_config.py.

Definition at line 221 of file hrpsys_config.py.

Definition at line 222 of file hrpsys_config.py.

Definition at line 223 of file hrpsys_config.py.

Definition at line 287 of file hrpsys_config.py.

Definition at line 211 of file hrpsys_config.py.

Definition at line 212 of file hrpsys_config.py.

Definition at line 213 of file hrpsys_config.py.

Definition at line 275 of file hrpsys_config.py.

Definition at line 289 of file hrpsys_config.py.

Definition at line 193 of file hrpsys_config.py.

Definition at line 201 of file hrpsys_config.py.

Definition at line 190 of file hrpsys_config.py.

Definition at line 198 of file hrpsys_config.py.

Definition at line 292 of file hrpsys_config.py.

Definition at line 246 of file hrpsys_config.py.

Definition at line 247 of file hrpsys_config.py.

Definition at line 249 of file hrpsys_config.py.

Definition at line 248 of file hrpsys_config.py.

Definition at line 272 of file hrpsys_config.py.

Definition at line 267 of file hrpsys_config.py.

Definition at line 268 of file hrpsys_config.py.

Definition at line 269 of file hrpsys_config.py.

Definition at line 278 of file hrpsys_config.py.

Definition at line 257 of file hrpsys_config.py.

Definition at line 258 of file hrpsys_config.py.

Definition at line 259 of file hrpsys_config.py.

Definition at line 164 of file hrpsys_config.py.

Definition at line 165 of file hrpsys_config.py.

Definition at line 167 of file hrpsys_config.py.

Definition at line 192 of file hrpsys_config.py.

Definition at line 200 of file hrpsys_config.py.

Definition at line 180 of file hrpsys_config.py.

Definition at line 181 of file hrpsys_config.py.

Definition at line 182 of file hrpsys_config.py.

Definition at line 284 of file hrpsys_config.py.

Definition at line 170 of file hrpsys_config.py.

Definition at line 171 of file hrpsys_config.py.

Definition at line 172 of file hrpsys_config.py.

Definition at line 175 of file hrpsys_config.py.

Definition at line 176 of file hrpsys_config.py.

Definition at line 177 of file hrpsys_config.py.

Definition at line 281 of file hrpsys_config.py.

Definition at line 195 of file hrpsys_config.py.

Definition at line 203 of file hrpsys_config.py.

Definition at line 241 of file hrpsys_config.py.

Definition at line 242 of file hrpsys_config.py.

Definition at line 243 of file hrpsys_config.py.

Definition at line 231 of file hrpsys_config.py.

Definition at line 232 of file hrpsys_config.py.

Definition at line 233 of file hrpsys_config.py.

Definition at line 189 of file hrpsys_config.py.

Definition at line 197 of file hrpsys_config.py.

Definition at line 236 of file hrpsys_config.py.

Definition at line 237 of file hrpsys_config.py.

Definition at line 238 of file hrpsys_config.py.

Definition at line 191 of file hrpsys_config.py.

Definition at line 199 of file hrpsys_config.py.


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


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Sep 6 2017 02:35:58