Public Member Functions | |
def | checkEncoders |
def | flat2Groups |
def | getActualState |
def | getRTCList |
def | goInitial |
def | goOffPose |
def | hand_width2angles |
def | HandClose |
def | HandOpen |
def | init |
def | isCalibDone |
def | isServoOn |
def | moveHand |
def | servoOff |
def | servoOn |
def | setHandEffort |
def | setHandJointAngles |
def | setHandWidth |
def | setSelfGroups |
Static Public Attributes | |
list | Groups |
dictionary | HandGroups = {'rhand': [2, 3, 4, 5], 'lhand': [6, 7, 8, 9]} |
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 |
@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 56 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 542 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 376 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_1RobotState.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 318 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 171 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 137 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 122 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 282 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 210 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 196 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 109 of file hironx_client.py.
Check whether joints have been calibrated. @rtype bool
Definition at line 336 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 350 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 266 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 494 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 406 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 237 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 224 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 246 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 302 of file hironx_client.py.
list hironx_ros_bridge::hironx_client.HIRONX::_InitialPose [static, private] |
[[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 85 of file hironx_client.py.
list hironx_ros_bridge::hironx_client.HIRONX::_InitialPose_Factory [static, private] |
[[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 93 of file hironx_client.py.
list hironx_ros_bridge::hironx_client.HIRONX::Groups [static] |
[['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 69 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 101 of file hironx_client.py.
int hironx_ros_bridge::hironx_client.HIRONX::INITPOS_TYPE_EVEN = 0 [static] |
Definition at line 98 of file hironx_client.py.
int hironx_ros_bridge::hironx_client.HIRONX::INITPOS_TYPE_FACTORY = 1 [static] |
Definition at line 99 of file hironx_client.py.
list hironx_ros_bridge::hironx_client.HIRONX::OffPose [static] |
[[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 79 of file hironx_client.py.
list hironx_ros_bridge::hironx_client.HIRONX::RtcList = [] [static] |
Definition at line 103 of file hironx_client.py.
hironx_ros_bridge::hironx_client.HIRONX::sc = None [static] |
Definition at line 106 of file hironx_client.py.
Definition at line 107 of file hironx_client.py.