Public Member Functions | |
def | checkEncoders (self, jname='all', option='') |
def | clearOfGroup (self, limb) |
Clears the Sequencer's current operation for joint groups. More... | |
def | flat2Groups (self, flatList) |
def | getJointAnglesOfGroup (self, limb) |
def | getRTCList (self) |
def | goInitial (self, tm=7, wait=True, init_pose_type=0) |
def | goOffPose (self, tm=7) |
def | hand_width2angles (self, width) |
def | HandClose (self, hand=None, effort=None) |
def | HandOpen (self, hand=None, effort=None) |
def | init (self, robotname="HiroNX(Robot)0", url="") |
def | isCalibDone (self) |
def | isServoOn (self, jname='any') |
def | moveHand (self, hand, av, tm=1) |
def | removeForceSensorOffset (self) |
def | servoOff (self, jname='all', wait=True) |
def | servoOn (self, jname='all', destroy=1, tm=3) |
def | setHandEffort (self, effort=100) |
def | setHandJointAngles (self, hand, angles, tm=1) |
def | setHandWidth (self, hand, width, tm=1, effort=None) |
def | setSelfGroups (self) |
def | startImpedance (self, arm, kwargs) |
def | 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) |
def | 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) |
def | 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) |
def | stopImpedance (self, arm) |
def | stopImpedance_315_1 (self, arm) |
def | stopImpedance_315_2 (self, arm) |
def | stopImpedance_315_3 (self, arm) |
Public Attributes | |
hrpsys_version | |
sensors | |
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 |
tuple | _MSG_IMPEDANCE_CALL_DONE |
@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 272 of file hironx_client.py.
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 878 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.clearOfGroup | ( | self, | |
limb | |||
) |
Clears the Sequencer's current operation for joint groups.
Definition at line 1167 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.flat2Groups | ( | self, | |
flatList | |||
) |
@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 686 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.getJointAnglesOfGroup | ( | self, | |
limb | |||
) |
Definition at line 1144 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.getRTCList | ( | self | ) |
@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 448 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, other command to the robot's joints wait until this command returns (done by running SequencePlayer.waitInterpolationOfGroup). @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 413 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.goOffPose | ( | self, | |
tm = 7 |
|||
) |
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 398 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.hand_width2angles | ( | self, | |
width | |||
) |
TODO: Needs documented what this method does. @type width: float @return: None if the given width is invalid.
Definition at line 604 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 532 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 518 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 333 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.isCalibDone | ( | self | ) |
Check whether joints have been calibrated. @rtype bool
Definition at line 640 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.isServoOn | ( | self, | |
jname = 'any' |
|||
) |
Check whether servo control has been turned on. Check is done by HIRONX.getActualState().servoState. @type jname: str @param jname: Name of a link (that can be obtained by "hiro.Groups" as lists of groups). Reserved values: - any: This command will check all servos available. - all: Same as 'any'. @rtype bool @return: If jname is specified either 'any' or 'all', return False if the control of any of servos isn't available.
Definition at line 654 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 588 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.removeForceSensorOffset | ( | self | ) |
Definition at line 1139 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 830 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). *Troubleshooting* When this method does not seem to function as expected, try the following first before you report to the developer's community: - Manually move the arms to the safe pose where arms do not obstruct to anything and they can move back to the initial pose by goInitial. Then run the command again. - Make sure the emergency switch is toggled back. - Try running goActual() then servoOn(). If none of the above did not solve your issue, please report with: - The result of this command (%ROSDISTRO% is "indigo" as of May 2017): Ubuntu$ rosversion hironx_ros_bridge Ubuntu$ dpkg -p ros-%ROSDISTRO%-hironx-ros-bridge @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 716 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 559 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 546 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 568 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.setSelfGroups | ( | self | ) |
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 624 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.startImpedance | ( | self, | |
arm, | |||
kwargs | |||
) |
Enable the ImpedanceController RT component. This method internally calls startImpedance-*, hrpsys version-specific method. @requires: ImpedanceController RTC to be activated on the robot's controller. @param arm: Name of the kinematic group (i.e. self.Groups[n][0]). @param 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. @change: (NOTE: This "change" block is a duplicate with the PR in the upstream https://github.com/fkanehiro/hrpsys-base/pull/1120. Once it gets merged this block should be removed to avoid duplicate maintenance effort.) 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.
Definition at line 1087 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 |
|||
) |
@type arm: str name of artm to be controlled, this must be initialized using setSelfGroups() @param ref_{force, moment}: Target values at the target position. Units: N, Nm, respectively. @param {force, 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 949 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 |
|||
) |
@type arm: str name of artm to be controlled, this must be initialized using setSelfGroups() @param {force, 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 1015 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 |
|||
) |
@type arm: str name of artm to be controlled, this must be initialized using setSelfGroups() @param {force, 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 1053 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.stopImpedance | ( | self, | |
arm | |||
) |
Definition at line 1130 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.stopImpedance_315_1 | ( | self, | |
arm | |||
) |
Definition at line 992 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.stopImpedance_315_2 | ( | self, | |
arm | |||
) |
Definition at line 1081 of file hironx_client.py.
def hironx_ros_bridge.hironx_client.HIRONX.stopImpedance_315_3 | ( | self, | |
arm | |||
) |
Definition at line 1084 of file hironx_client.py.
|
staticprivate |
Definition at line 303 of file hironx_client.py.
|
staticprivate |
Definition at line 311 of file hironx_client.py.
|
staticprivate |
Definition at line 329 of file hironx_client.py.
|
static |
Definition at line 286 of file hironx_client.py.
|
static |
Definition at line 319 of file hironx_client.py.
|
static |
Definition at line 327 of file hironx_client.py.
hironx_ros_bridge.hironx_client.HIRONX.hrpsys_version |
Definition at line 390 of file hironx_client.py.
|
static |
Definition at line 316 of file hironx_client.py.
|
static |
Definition at line 317 of file hironx_client.py.
|
static |
Definition at line 296 of file hironx_client.py.
|
static |
Definition at line 321 of file hironx_client.py.
|
static |
Definition at line 324 of file hironx_client.py.
|
static |
Definition at line 325 of file hironx_client.py.
hironx_ros_bridge.hironx_client.HIRONX.sensors |
Definition at line 364 of file hironx_client.py.