WUT Velma robot API
Classes | Public Member Functions | Static Public Member Functions | List of all members
velma_common.velma_interface.VelmaInterface Class Reference

ROS-based, Python interface class for WUT Velma Robot. More...

Classes

class  CoreCsDiag
 This class contains subsystem-specific diagnostic information for velma_core_cs. More...
 
class  CoreVeBodyDiag
 This class contains subsystem-specific diagnostic information for velma_core_cs. More...
 
class  Link
 This class contains information about single link of robot. More...
 
class  SubscribedTopic
 Class used for subscription for various ROS topics from the VelmaInterface class. More...
 
class  VisualMesh
 This class contains information about geometric object: mesh. More...
 

Public Member Functions

def getLastJointState (self)
 Get the newest joint state. More...
 
def getJointStateAtTime (self, time)
 Get interpolated joint state at a given time. More...
 
def getHandCurrentConfiguration (self, prefix)
 Get current configuration of a specified hand. More...
 
def getHandLeftCurrentConfiguration (self)
 Get current configuration of left hand. More...
 
def getHandRightCurrentConfiguration (self)
 Get current configuration of right hand. More...
 
def getHeadCurrentConfiguration (self)
 Get current configuration of neck. More...
 
def waitForInit (self, timeout_s=None)
 Wait for the interface until it is initialized. More...
 
def waitForJointState (self, abs_time)
 Wait for reception of joint state ROS msg with time stamp greater or equal abs_time. More...
 
def getBodyJointLimits (self)
 Gets limits of joints of both arms and torso. More...
 
def getCartImpJointLimits (self)
 Gets limits of joints of both arms and torso in cart_imp mode. More...
 
def getHeadJointLimits (self)
 Gets limits of joints of neck. More...
 
def dbgPrint (self, s)
 
def __init__ (self, debug=False)
 Initialization of the interface. More...
 
def getCoreVeDiag (self, timeout_s=None)
 Get diagnostic information for core VE. More...
 
def getCoreCsDiag (self, timeout_s=None)
 Get diagnostic information for core CS. More...
 
def allowHandsCollisions (self)
 Allow self-collisions of hands. More...
 
def disallowHandsCollisions (self)
 Disallow self-collisions of hands. More...
 
def getRawFTr (self)
 Gets right F/T sensor raw reading. More...
 
def getRawFTl (self)
 Gets left F/T sensor raw reading. More...
 
def getTransformedFTr (self)
 Gets right F/T sensor transformed reading. More...
 
def getTransformedFTl (self)
 Gets left F/T sensor transformed reading. More...
 
def getWristWrenchr (self)
 Gets estimated wrench for the right end effector. More...
 
def getWristWrenchl (self)
 Gets estimated wrench for the left end effector. More...
 
def getLeftWccPolygon (self)
 Get Polygon that defines wrist collision constraints for joints 5 and 6 of the left arm. More...
 
def getRightWccPolygon (self)
 Get Polygon that defines wrist collision constraints for joints 5 and 6 of the right arm. More...
 
def switchToRelaxBehavior (self)
 Switches the robot to relax behavior. More...
 
def enableMotor (self, motor)
 Enable motor. More...
 
def startHomingMotor (self, motor)
 Start homing procedure for specified motor. More...
 
def waitForMotor (self, motor, timeout_s=0)
 Wait for an action for a motor to complete. More...
 
def enableMotors (self, timeout=0)
 Enable all motors and wait. More...
 
def startHomingHP (self)
 Start homing procedure for head pan motor. More...
 
def startHomingHT (self)
 Start homing procedure for head tilt motor. More...
 
def waitForHP (self, timeout_s=0)
 Wait for head pan motor. More...
 
def waitForHT (self, timeout_s=0)
 Wait for head tilt motor. More...
 
def waitForT (self, timeout_s=0)
 Wait for torso motor. More...
 
def getCartImpMvTime (self, side, T_B_T, max_vel_lin, max_vel_rot, current_T_B_T=None)
 Calculate movement time for a given destination pose of end effector tool, given maximum allowed linear and rotational velocities. More...
 
def moveCartImp (self, prefix, pose_list_T_B_Td, pose_times, tool_list_T_W_T, tool_times, imp_list, imp_times, max_wrench, start_time=0.01, stamp=None, damping=PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35), PyKDL.Vector(0.35, 0.35, 0.35)), path_tol=None)
 Execute motion in cartesian impedance mode. More...
 
def moveCartImpRight (self, pose_list_T_B_Td, pose_times, tool_list_T_W_T, tool_times, imp_list, imp_times, max_wrench, start_time=0.01, stamp=None, damping=PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35), PyKDL.Vector(0.35, 0.35, 0.35)), path_tol=None)
 Execute motion in cartesian impedance mode for the right end-effector. More...
 
def moveCartImpLeft (self, pose_list_T_B_Td, pose_times, tool_list_T_W_T, tool_times, imp_list, imp_times, max_wrench, start_time=0.01, stamp=None, damping=PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35), PyKDL.Vector(0.35, 0.35, 0.35)), path_tol=None)
 Execute motion in cartesian impedance mode for the left end-effector. More...
 
def moveCartImpCurrentPos (self, side, start_time=0.2, stamp=None)
 Move right end-effector to current position. More...
 
def moveCartImpRightCurrentPos (self, start_time=0.2, stamp=None)
 Move right end-effector to current position. More...
 
def moveCartImpLeftCurrentPos (self, start_time=0.2, stamp=None)
 Move left end-effector to current position. More...
 
def waitForEffector (self, prefix, timeout_s=None)
 Wait for completion of end-effector motion in cartesian impedance mode. More...
 
def waitForEffectorLeft (self, timeout_s=None)
 Wait for completion of left end-effector motion in cartesian impedance mode. More...
 
def waitForEffectorRight (self, timeout_s=None)
 Wait for completion of right end-effector motion in cartesian impedance mode. More...
 
def lookAt (self, point, frame_id='torso_base')
 Execute look at motion of head. More...
 
def cancelLookAt (self)
 Cancel look at motion of head. More...
 
def isLookAtConnected (self)
 Check if look at action is connected. More...
 
def waitForLookAt (self, timeout_s=None)
 Wait for completion of look at motion. More...
 
def maxJointTrajLen (self)
 Get maximum number of nodes in single joint trajectory. More...
 
def maxHeadTrajLen (self)
 Get maximum number of nodes in single head trajectory. More...
 
def moveJointTrajAndWait (self, traj, start_time=0.2, stamp=None, position_tol=5.0/180.0 *math.pi, velocity_tol=5.0/180.0 *math.pi)
 Execute joint space trajectory in joint impedance mode. More...
 
def moveJointTraj (self, traj, start_time=0.2, stamp=None, position_tol=5.0/180.0 *math.pi, velocity_tol=5.0/180.0 *math.pi)
 Execute joint space trajectory in joint impedance mode. More...
 
def calculateJointTrajTime (self, q_map_start, traj_in, max_vel)
 
def getJntImpMovementTime (self, q_dest_map, max_vel)
 
def getJntImpMovementTime2 (self, q_dest_map_1, q_dest_map_2, max_vel)
 
def moveJoint (self, q_dest_map, time, max_vel=None, start_time=0.2, stamp=None, position_tol=5.0/180.0 *math.pi, velocity_tol=5.0/180.0 *math.pi)
 Execute simple joint space motion in joint impedance mode. More...
 
def moveJointImpToCurrentPos (self, start_time=0.2, stamp=None)
 Switch core_cs to jnt_imp mode. More...
 
def waitForJoint (self, timeout_s=None)
 Wait for joint space movement to complete. More...
 
def moveHeadTraj (self, traj, start_time=0.2, stamp=None, position_tol=5.0/180.0 *math.pi, velocity_tol=5.0/180.0 *math.pi)
 Execute head trajectory in joint space. More...
 
def moveHead (self, q_dest, time, max_vel=None, start_time=0.2, stamp=None, position_tol=5.0/180.0 *math.pi, velocity_tol=5.0/180.0 *math.pi)
 Execute simple head motion in joint space. More...
 
def waitForHead (self, timeout_s=None)
 Wait for head movement to complete. More...
 
def moveHand (self, prefix, q, v, t, maxPressure, hold=False)
 Executes hand motion with trapezoidal velocity profile. More...
 
def moveHandLeft (self, q, v, t, maxPressure, hold=False)
 Executes motion with trapezoidal velocity profile for left hand. More...
 
def moveHandRight (self, q, v, t, maxPressure, hold=False)
 Executes motion with trapezoidal velocity profile for right hand. More...
 
def resetHand (self, prefix)
 Executes reset command for hand. More...
 
def resetHandLeft (self)
 Executes reset command for left hand. More...
 
def resetHandRight (self)
 Executes reset command for right hand. More...
 
def waitForHand (self, prefix, timeout_s=None)
 Wait for completion of hand movement. More...
 
def waitForHandLeft (self)
 Wait for completion of left hand movement. More...
 
def waitForHandRight (self)
 Wait for completion of right hand movement. More...
 
def getAllLinksTf (self, base_frame, time=None, timeout_s=1.0)
 Lookup transformations for all links. More...
 
def getTf (self, frame_from, frame_to, time=None, timeout_s=1.0)
 Lookup tf transform and convert it to PyKDL.Frame. More...
 
def setGraspedFlag (self, side, status)
 Inform control system about grasped object. More...
 
def sendIdentificationMeasurementCommand (self, side, command_index)
 Make measurement for gravity compensation. More...
 

Static Public Member Functions

def getJointGroup (group_name)
 Get names of all joints in group. More...
 

Detailed Description

ROS-based, Python interface class for WUT Velma Robot.

This class implements methods that use ROS topics, actions and services to communicate with velma_task_cs_ros_interface subsystem of velma_task agent.

Definition at line 185 of file velma_interface.py.

Constructor & Destructor Documentation

◆ __init__()

def velma_common.velma_interface.VelmaInterface.__init__ (   self,
  debug = False 
)

Initialization of the interface.

Definition at line 730 of file velma_interface.py.

Member Function Documentation

◆ allowHandsCollisions()

def velma_common.velma_interface.VelmaInterface.allowHandsCollisions (   self)

Allow self-collisions of hands.

Returns
None

Definition at line 1075 of file velma_interface.py.

◆ calculateJointTrajTime()

def velma_common.velma_interface.VelmaInterface.calculateJointTrajTime (   self,
  q_map_start,
  traj_in,
  max_vel 
)

Definition at line 1647 of file velma_interface.py.

◆ cancelLookAt()

def velma_common.velma_interface.VelmaInterface.cancelLookAt (   self)

Cancel look at motion of head.

Returns
Returns True.

Definition at line 1500 of file velma_interface.py.

◆ dbgPrint()

def velma_common.velma_interface.VelmaInterface.dbgPrint (   self,
  s 
)

Definition at line 725 of file velma_interface.py.

◆ disallowHandsCollisions()

def velma_common.velma_interface.VelmaInterface.disallowHandsCollisions (   self)

Disallow self-collisions of hands.

Returns
None

Definition at line 1085 of file velma_interface.py.

◆ enableMotor()

def velma_common.velma_interface.VelmaInterface.enableMotor (   self,
  motor 
)

Enable motor.

Parameters
motorstring: Name of motor to enable: 'hp', 'ht' or 't'
Exceptions
NameErrorParameter motor has invalid value.

Definition at line 1179 of file velma_interface.py.

◆ enableMotors()

def velma_common.velma_interface.VelmaInterface.enableMotors (   self,
  timeout = 0 
)

Enable all motors and wait.

Parameters
timeout_sfloat: Timeout in seconds.
See also
enableMotor

Definition at line 1237 of file velma_interface.py.

◆ getAllLinksTf()

def velma_common.velma_interface.VelmaInterface.getAllLinksTf (   self,
  base_frame,
  time = None,
  timeout_s = 1.0 
)

Lookup transformations for all links.

Parameters
base_framestring: name of base frame
timerospy.Time: time at which transform should be interpolated
timeout_sfloat: timeout in seconds
Returns
dictionary {string:PyKDL.Frame} Returns dictionary that maps link names to their poses wrt. the base frame.
Exceptions
tf2_ros.TransformExceptionwhen the transform for the specified time is not avaible during the timeout_s.

Definition at line 1948 of file velma_interface.py.

◆ getBodyJointLimits()

def velma_common.velma_interface.VelmaInterface.getBodyJointLimits (   self)

Gets limits of joints of both arms and torso.

Joints of neck and grippers are not included. The joints are used in impedance control (both joint and cartesian).

Returns
dictionary: Returns a dictionary {name:(lower_limit, upper_limit)} that maps joint name to a 2-tupe with lower and upper joint limit.

Definition at line 553 of file velma_interface.py.

◆ getCartImpJointLimits()

def velma_common.velma_interface.VelmaInterface.getCartImpJointLimits (   self)

Gets limits of joints of both arms and torso in cart_imp mode.

Joints of neck and grippers are not included. The joints are used in impedance control (cart_imp mode).

Returns
dictionary: Returns a dictionary {name:(lower_limit, upper_limit, [lower_limit, upper_limit)])} that maps joint name to a 2-tupe or 4-tupe with lower and upper joint limit.

Definition at line 564 of file velma_interface.py.

◆ getCartImpMvTime()

def velma_common.velma_interface.VelmaInterface.getCartImpMvTime (   self,
  side,
  T_B_T,
  max_vel_lin,
  max_vel_rot,
  current_T_B_T = None 
)

Calculate movement time for a given destination pose of end effector tool, given maximum allowed linear and rotational velocities.

Parameters
sidestring: side: 'left' or 'right'.
T_B_TPyKDL.Frame: destination pose.
max_vel_linfloat: maximum linear velocity.
max_vel_rotfloat: maximum rotational velocity.
current_T_B_TPyKDL.Frame: (optional) current pose. If ommited, the current pose from tf is considered.
Returns
Returns float: movement time in seconds.
Exceptions
AssertionErrorRaised when prefix is neither 'left' nor 'right'.

Definition at line 1304 of file velma_interface.py.

◆ getCoreCsDiag()

def velma_common.velma_interface.VelmaInterface.getCoreCsDiag (   self,
  timeout_s = None 
)

Get diagnostic information for core CS.

Returns
Returns object of type VelmaInterface.CoreCsDiag, with diagnostic information about control subsystem.

Definition at line 1062 of file velma_interface.py.

◆ getCoreVeDiag()

def velma_common.velma_interface.VelmaInterface.getCoreVeDiag (   self,
  timeout_s = None 
)

Get diagnostic information for core VE.

Returns
Returns object of type subsystem_common.SubsystemDiag, with diagnostic information about subsystem.

Definition at line 958 of file velma_interface.py.

◆ getHandCurrentConfiguration()

def velma_common.velma_interface.VelmaInterface.getHandCurrentConfiguration (   self,
  prefix 
)

Get current configuration of a specified hand.

Parameters
prefixstring: Hand name, can be one of two values ('left' or 'right').
Returns
An 8-tuple of positions of all joints of the specified hand, or None if there is no valid joint state data. The sequence of joint positions is: FingerOneKnuckleOneJoint, FingerOneKnuckleTwoJoint, FingerOneKnuckleThreeJoint, FingerTwoKnuckleOneJoint, FingerTwoKnuckleTwoJoint, FingerTwoKnuckleThreeJoint, FingerThreeKnuckleTwoJoint, FingerThreeKnuckleThreeJoint.
Exceptions
NameErrorIf prefix is not 'left' or 'right'.

Definition at line 362 of file velma_interface.py.

◆ getHandLeftCurrentConfiguration()

def velma_common.velma_interface.VelmaInterface.getHandLeftCurrentConfiguration (   self)

Get current configuration of left hand.

Returns
tuple: An 8-tuple of positions of all joints of left hand, or None if there is no valid joint state data.
See also
getHandCurrentConfiguration

Definition at line 392 of file velma_interface.py.

◆ getHandRightCurrentConfiguration()

def velma_common.velma_interface.VelmaInterface.getHandRightCurrentConfiguration (   self)

Get current configuration of right hand.

Returns
tuple: An 8-tuple of positions of all joints of right hand, or None if there is no valid joint state data.
See also
getHandCurrentConfiguration

Definition at line 403 of file velma_interface.py.

◆ getHeadCurrentConfiguration()

def velma_common.velma_interface.VelmaInterface.getHeadCurrentConfiguration (   self)

Get current configuration of neck.

Returns
tuple: A 2-tuple of positions of neck joints, or None if there is no valid joint state data.

Definition at line 415 of file velma_interface.py.

◆ getHeadJointLimits()

def velma_common.velma_interface.VelmaInterface.getHeadJointLimits (   self)

Gets limits of joints of neck.

Returns
dictionary: Returns a dictionary {name:(lower_limit, upper_limit)} that maps joint name to a 2-tupe with lower and upper joint limit.

Definition at line 575 of file velma_interface.py.

◆ getJntImpMovementTime()

def velma_common.velma_interface.VelmaInterface.getJntImpMovementTime (   self,
  q_dest_map,
  max_vel 
)

Definition at line 1673 of file velma_interface.py.

◆ getJntImpMovementTime2()

def velma_common.velma_interface.VelmaInterface.getJntImpMovementTime2 (   self,
  q_dest_map_1,
  q_dest_map_2,
  max_vel 
)

Definition at line 1677 of file velma_interface.py.

◆ getJointGroup()

def velma_common.velma_interface.VelmaInterface.getJointGroup (   group_name)
static

Get names of all joints in group.

Parameters
group_namestring: name of group.
Returns
Returns list of names of joints in group.

Definition at line 1560 of file velma_interface.py.

◆ getJointStateAtTime()

def velma_common.velma_interface.VelmaInterface.getJointStateAtTime (   self,
  time 
)

Get interpolated joint state at a given time.

Parameters
timerospy.Time: Time of joint state to be computed.
Returns
dictionary: A dictionary (with key=joint_name, value=joint_position) of interpolated joint positions or None, if time is not within current joint state history.

Definition at line 321 of file velma_interface.py.

◆ getLastJointState()

def velma_common.velma_interface.VelmaInterface.getLastJointState (   self)

Get the newest joint state.

Returns
(rospy.Time, dictionary): A Pair of timestamp of the newest joint state and dictionary (with key=joint_name, value=joint_position), or None if there is no joint state data yet.

Definition at line 308 of file velma_interface.py.

◆ getLeftWccPolygon()

def velma_common.velma_interface.VelmaInterface.getLeftWccPolygon (   self)

Get Polygon that defines wrist collision constraints for joints 5 and 6 of the left arm.

Returns
list: Returns wrist collision constraint polygon as [x0, y0, x1, y1, x2, y2, ...].

Definition at line 1143 of file velma_interface.py.

◆ getRawFTl()

def velma_common.velma_interface.VelmaInterface.getRawFTl (   self)

Gets left F/T sensor raw reading.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1103 of file velma_interface.py.

◆ getRawFTr()

def velma_common.velma_interface.VelmaInterface.getRawFTr (   self)

Gets right F/T sensor raw reading.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1095 of file velma_interface.py.

◆ getRightWccPolygon()

def velma_common.velma_interface.VelmaInterface.getRightWccPolygon (   self)

Get Polygon that defines wrist collision constraints for joints 5 and 6 of the right arm.

Returns
list: Returns wrist collision constraint polygon as [x0, y0, x1, y1, x2, y2, ...].

Definition at line 1151 of file velma_interface.py.

◆ getTf()

def velma_common.velma_interface.VelmaInterface.getTf (   self,
  frame_from,
  frame_to,
  time = None,
  timeout_s = 1.0 
)

Lookup tf transform and convert it to PyKDL.Frame.

Frame names can be the full names or the following simplified names can be used:

  • 'Wo' - world frame ('world')
  • 'B' - robot base frame ('torso_base')
  • 'Wr' - right wrist ('right_arm_7_link')
  • 'Wl' - left wrist ('left_arm_7_link')
  • 'Er' - same as 'Wr'
  • 'El' - same as 'Wl'
  • 'Gr' - right grip frame ('right_HandGripLink')
  • 'Gl' - left grip frame ('left_HandGripLink')
  • 'Pr' - right palm frame ('right_HandPalmLink')
  • 'Pl' - left palm frame ('left_HandPalmLink')
  • 'Tr' - right tool frame ('right_arm_tool')
  • 'Tl' - left tool frame ('left_arm_tool')
  • 'Fr00' - 'right_HandFingerOneKnuckleOneLink'
  • 'Fr01' - 'right_HandFingerOneKnuckleTwoLink'
  • 'Fr02' - 'right_HandFingerOneKnuckleThreeLink'
  • 'Fr10' - 'right_HandFingerTwoKnuckleOneLink'
  • 'Fr11' - 'right_HandFingerTwoKnuckleTwoLink'
  • 'Fr12' - 'right_HandFingerTwoKnuckleThreeLink'
  • 'Fr21' - 'right_HandFingerThreeKnuckleTwoLink'
  • 'Fr22' - 'right_HandFingerThreeKnuckleThreeLink'
  • 'Fl00' - 'left_HandFingerOneKnuckleOneLink'
  • 'Fl01' - 'left_HandFingerOneKnuckleTwoLink'
  • 'Fl02' - 'left_HandFingerOneKnuckleThreeLink'
  • 'Fl10' - 'left_HandFingerTwoKnuckleOneLink'
  • 'Fl11' - 'left_HandFingerTwoKnuckleTwoLink'
  • 'Fl12' - 'left_HandFingerTwoKnuckleThreeLink'
  • 'Fl21' - 'left_HandFingerThreeKnuckleTwoLink'
  • 'Fl22' - 'left_HandFingerThreeKnuckleThreeLink'
Parameters
frame_fromstring: simplified name of base frame
frame_tostring: simplified name of target frame
timerospy.Time: time at which transform should be interpolated
timeout_sfloat: timeout in seconds
Returns
PyKDL.Frame transformation from base frame to target frame.
Exceptions
tf2_ros.TransformExceptionwhen the transform for the specified time is not avaible during the timeout_s.

Definition at line 1970 of file velma_interface.py.

◆ getTransformedFTl()

def velma_common.velma_interface.VelmaInterface.getTransformedFTl (   self)

Gets left F/T sensor transformed reading.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1119 of file velma_interface.py.

◆ getTransformedFTr()

def velma_common.velma_interface.VelmaInterface.getTransformedFTr (   self)

Gets right F/T sensor transformed reading.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1111 of file velma_interface.py.

◆ getWristWrenchl()

def velma_common.velma_interface.VelmaInterface.getWristWrenchl (   self)

Gets estimated wrench for the left end effector.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1135 of file velma_interface.py.

◆ getWristWrenchr()

def velma_common.velma_interface.VelmaInterface.getWristWrenchr (   self)

Gets estimated wrench for the right end effector.

Returns
PyKDL.Wrench: Returns KDL wrench.

Definition at line 1127 of file velma_interface.py.

◆ isLookAtConnected()

def velma_common.velma_interface.VelmaInterface.isLookAtConnected (   self)

Check if look at action is connected.

Returns
True if look at action is connected, False otherwise.

Definition at line 1510 of file velma_interface.py.

◆ lookAt()

def velma_common.velma_interface.VelmaInterface.lookAt (   self,
  point,
  frame_id = 'torso_base' 
)

Execute look at motion of head.

Returns
Returns True

Definition at line 1483 of file velma_interface.py.

◆ maxHeadTrajLen()

def velma_common.velma_interface.VelmaInterface.maxHeadTrajLen (   self)

Get maximum number of nodes in single head trajectory.

Returns
Maximum number of nodes.

Definition at line 1552 of file velma_interface.py.

◆ maxJointTrajLen()

def velma_common.velma_interface.VelmaInterface.maxJointTrajLen (   self)

Get maximum number of nodes in single joint trajectory.

Returns
Maximum number of nodes.

Definition at line 1545 of file velma_interface.py.

◆ moveCartImp()

def velma_common.velma_interface.VelmaInterface.moveCartImp (   self,
  prefix,
  pose_list_T_B_Td,
  pose_times,
  tool_list_T_W_T,
  tool_times,
  imp_list,
  imp_times,
  max_wrench,
  start_time = 0.01,
  stamp = None,
  damping = PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35),PyKDL.Vector(0.35, 0.35, 0.35)),
  path_tol = None 
)

Execute motion in cartesian impedance mode.

Parameters
prefixstring: name of end-effector: 'left' or 'right'.
pose_list_T_B_Tdlist of PyKDL.Frame: Poses of end-effector tool wrt. base frame. This is a path for the end-effector.
pose_timeslist of float: Times of the poses in pose_list_T_B_Td wrt. start_time.
tool_list_T_W_Tlist of PyKDL.Frame: Poses of tool frame wrt. wrist frame. This is a path for the tool of end-effector.
tool_timeslist of float: Times of the tool poses in tool_list_T_W_T wrt. start_time.
imp_listlist of PyKDL.Wrench: Tool impedance values expressed in tool frame. This is a path for the impedance of end-effector.
imp_timeslist of float: Times of the impedance values in imp_list wrt. start_time.
max_wrenchPyKDL.Wrench: Maximum allowed wrench during the motion expressed in tool frame.
start_timefloat: Relative start time for the movement.
stamprospy.Time: Absolute start time for the movement. If both start_time and stamp arguments are set, only stamp is taken into account.
dampingPyKDL.Wrench: Damping for the tool expressed in tool frame.
path_tolPyKDL.Twist: Maximum allowed error of tool pose expressed in the tool frame. Error of tool pose is a difference between desired tool equilibrium pose and measured tool pose.
Returns
Returns True.
Exceptions
AssertionErrorRaised when prefix is neither 'left' nor 'right'.

Definition at line 1334 of file velma_interface.py.

◆ moveCartImpCurrentPos()

def velma_common.velma_interface.VelmaInterface.moveCartImpCurrentPos (   self,
  side,
  start_time = 0.2,
  stamp = None 
)

Move right end-effector to current position.

Switch core_cs to cart_imp mode.

Returns
Returns True.

Definition at line 1416 of file velma_interface.py.

◆ moveCartImpLeft()

def velma_common.velma_interface.VelmaInterface.moveCartImpLeft (   self,
  pose_list_T_B_Td,
  pose_times,
  tool_list_T_W_T,
  tool_times,
  imp_list,
  imp_times,
  max_wrench,
  start_time = 0.01,
  stamp = None,
  damping = PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35),PyKDL.Vector(0.35, 0.35, 0.35)),
  path_tol = None 
)

Execute motion in cartesian impedance mode for the left end-effector.

See also
moveCartImp

Definition at line 1409 of file velma_interface.py.

◆ moveCartImpLeftCurrentPos()

def velma_common.velma_interface.VelmaInterface.moveCartImpLeftCurrentPos (   self,
  start_time = 0.2,
  stamp = None 
)

Move left end-effector to current position.

Switch core_cs to cart_imp mode.

Returns
Returns True.

Definition at line 1430 of file velma_interface.py.

◆ moveCartImpRight()

def velma_common.velma_interface.VelmaInterface.moveCartImpRight (   self,
  pose_list_T_B_Td,
  pose_times,
  tool_list_T_W_T,
  tool_times,
  imp_list,
  imp_times,
  max_wrench,
  start_time = 0.01,
  stamp = None,
  damping = PyKDL.Wrench(PyKDL.Vector(0.35, 0.35, 0.35),PyKDL.Vector(0.35, 0.35, 0.35)),
  path_tol = None 
)

Execute motion in cartesian impedance mode for the right end-effector.

See also
moveCartImp

Definition at line 1402 of file velma_interface.py.

◆ moveCartImpRightCurrentPos()

def velma_common.velma_interface.VelmaInterface.moveCartImpRightCurrentPos (   self,
  start_time = 0.2,
  stamp = None 
)

Move right end-effector to current position.

Switch core_cs to cart_imp mode.

Returns
Returns True.

Definition at line 1423 of file velma_interface.py.

◆ moveHand()

def velma_common.velma_interface.VelmaInterface.moveHand (   self,
  prefix,
  q,
  v,
  t,
  maxPressure,
  hold = False 
)

Executes hand motion with trapezoidal velocity profile.

Parameters
prefixstring: name of hand, either 'left' or 'right'
q4-tuple of float: desired configuration for hand DOFs: [FingerOneKnuckleTwo, FingerTwoKnuckleTwo, FingerThreeKnuckleTwo, Spread]
v4-tuple of float: maximum velocities
t4-tuple of float: maximum current in motors
maxPressurefloat: maximum pressure for tactile sensors
holdbool: True if spread joint should hold its position after completion of motion
Exceptions
AssertionErrorwhen prefix is neither 'left' nor 'right'

Definition at line 1830 of file velma_interface.py.

◆ moveHandLeft()

def velma_common.velma_interface.VelmaInterface.moveHandLeft (   self,
  q,
  v,
  t,
  maxPressure,
  hold = False 
)

Executes motion with trapezoidal velocity profile for left hand.

See also
moveHand

Definition at line 1855 of file velma_interface.py.

◆ moveHandRight()

def velma_common.velma_interface.VelmaInterface.moveHandRight (   self,
  q,
  v,
  t,
  maxPressure,
  hold = False 
)

Executes motion with trapezoidal velocity profile for right hand.

See also
moveHand

Definition at line 1862 of file velma_interface.py.

◆ moveHead()

def velma_common.velma_interface.VelmaInterface.moveHead (   self,
  q_dest,
  time,
  max_vel = None,
  start_time = 0.2,
  stamp = None,
  position_tol = 5.0/180.0 * math.pi,
  velocity_tol = 5.0/180.0*math.pi 
)

Execute simple head motion in joint space.

Parameters
q_dest2-tuple: goal configuration of head ('head_pan_joint', 'head_tilt_joint')
start_timefloat: relative start time.
stamprospy.Time: absolute start time. float: position tolerance. float: velocity tolerance.
Returns
Returns True.
Exceptions
AssertionErrorWhen q_dest has wrong length.

Definition at line 1785 of file velma_interface.py.

◆ moveHeadTraj()

def velma_common.velma_interface.VelmaInterface.moveHeadTraj (   self,
  traj,
  start_time = 0.2,
  stamp = None,
  position_tol = 5.0/180.0 * math.pi,
  velocity_tol = 5.0/180.0*math.pi 
)

Execute head trajectory in joint space.

Parameters
trajtrajectory_msgs.msg.JointTrajectory: joint trajectory.
start_timefloat: relative start time.
stamprospy.Time: absolute start time. float: position tolerance. float: velocity tolerance.
Returns
Returns True.
Exceptions
AssertionErrorRaised when trajectory has too many nodes or not all joints are included in trajectory.

Definition at line 1738 of file velma_interface.py.

◆ moveJoint()

def velma_common.velma_interface.VelmaInterface.moveJoint (   self,
  q_dest_map,
  time,
  max_vel = None,
  start_time = 0.2,
  stamp = None,
  position_tol = 5.0/180.0 * math.pi,
  velocity_tol = 5.0/180.0*math.pi 
)

Execute simple joint space motion in joint impedance mode.

Parameters
q_dest_mapdictionary: dictionary {name:position} of goal configuration
start_timefloat: relative start time.
stamprospy.Time: absolute start time. float: position tolerance. float: velocity tolerance.
Returns
Returns True.

Definition at line 1686 of file velma_interface.py.

◆ moveJointImpToCurrentPos()

def velma_common.velma_interface.VelmaInterface.moveJointImpToCurrentPos (   self,
  start_time = 0.2,
  stamp = None 
)

Switch core_cs to jnt_imp mode.

Returns
Returns True.

Definition at line 1710 of file velma_interface.py.

◆ moveJointTraj()

def velma_common.velma_interface.VelmaInterface.moveJointTraj (   self,
  traj,
  start_time = 0.2,
  stamp = None,
  position_tol = 5.0/180.0 * math.pi,
  velocity_tol = 5.0/180.0*math.pi 
)

Execute joint space trajectory in joint impedance mode.

Trajectories of length up to 50 nodes are allowed. This method does not block the executing thread.

Parameters
trajtrajectory_msgs.msg.JointTrajectory: joint trajectory.
start_timefloat: relative start time.
stamprospy.Time: absolute start time. float: position tolerance. float: velocity tolerance.
Returns
Returns True.
Exceptions
AssertionErrorRaised when trajectory has too many nodes.

Definition at line 1601 of file velma_interface.py.

◆ moveJointTrajAndWait()

def velma_common.velma_interface.VelmaInterface.moveJointTrajAndWait (   self,
  traj,
  start_time = 0.2,
  stamp = None,
  position_tol = 5.0/180.0 * math.pi,
  velocity_tol = 5.0/180.0*math.pi 
)

Execute joint space trajectory in joint impedance mode.

Trajectories of any length are allowed. This method blocks the executing thread until trajectory is completed, or error occures.

Parameters
trajtrajectory_msgs.msg.JointTrajectory: joint trajectory.
start_timefloat: relative start time.
stamprospy.Time: absolute start time. float: position tolerance. float: velocity tolerance.
Returns
Returns True.

Definition at line 1568 of file velma_interface.py.

◆ resetHand()

def velma_common.velma_interface.VelmaInterface.resetHand (   self,
  prefix 
)

Executes reset command for hand.

Parameters
prefixstring: name of hand, either 'left' or 'right'
Exceptions
AssertionErrorwhen prefix is neither 'left' nor 'right'

Definition at line 1869 of file velma_interface.py.

◆ resetHandLeft()

def velma_common.velma_interface.VelmaInterface.resetHandLeft (   self)

Executes reset command for left hand.

See also
resetHand

Definition at line 1880 of file velma_interface.py.

◆ resetHandRight()

def velma_common.velma_interface.VelmaInterface.resetHandRight (   self)

Executes reset command for right hand.

See also
resetHand

Definition at line 1887 of file velma_interface.py.

◆ sendIdentificationMeasurementCommand()

def velma_common.velma_interface.VelmaInterface.sendIdentificationMeasurementCommand (   self,
  side,
  command_index 
)

Make measurement for gravity compensation.

This identification action requires four measurements: two before and two after object is grasped.

Parameters
sidestring: Hand name, can be one of two values ('left' or 'right').
command_indexint: measurement index - one of the following values: 1 - the first measurement before the object is grasped, 2 - the second measurement before the object is grasped, 3 - the first measurement after the object is grasped (in the same pose as for measurement 1), 4 - the second measurement after the object is grasped (in the same pose as for measurement 2).
Exceptions
NameErrorIf side is not 'left' or 'right'.

Definition at line 2054 of file velma_interface.py.

◆ setGraspedFlag()

def velma_common.velma_interface.VelmaInterface.setGraspedFlag (   self,
  side,
  status 
)

Inform control system about grasped object.

Parameters
sidestring: Hand name, can be one of two values ('left' or 'right').
statusbool: True when object is grasped and gravity compensation is active, False otherwise.
Exceptions
NameErrorIf side is not 'left' or 'right'.

Definition at line 2025 of file velma_interface.py.

◆ startHomingHP()

def velma_common.velma_interface.VelmaInterface.startHomingHP (   self)

Start homing procedure for head pan motor.

See also
startHomingMotor

Definition at line 1257 of file velma_interface.py.

◆ startHomingHT()

def velma_common.velma_interface.VelmaInterface.startHomingHT (   self)

Start homing procedure for head tilt motor.

See also
startHomingMotor

Definition at line 1265 of file velma_interface.py.

◆ startHomingMotor()

def velma_common.velma_interface.VelmaInterface.startHomingMotor (   self,
  motor 
)

Start homing procedure for specified motor.

Parameters
motorstring: Name of motor to enable: 'hp' or 'ht'
Exceptions
NameErrorParameter motor has invalid value.

Definition at line 1193 of file velma_interface.py.

◆ switchToRelaxBehavior()

def velma_common.velma_interface.VelmaInterface.switchToRelaxBehavior (   self)

Switches the robot to relax behavior.

Definition at line 1171 of file velma_interface.py.

◆ waitForEffector()

def velma_common.velma_interface.VelmaInterface.waitForEffector (   self,
  prefix,
  timeout_s = None 
)

Wait for completion of end-effector motion in cartesian impedance mode.

Parameters
prefixstring: name of end-effector: 'left' or 'right'.
timeout_sfloat: timeout in seconds.
Returns
Returns error code.
Exceptions
AssertionErrorRaised when prefix is neither 'left' nor 'right'

Definition at line 1437 of file velma_interface.py.

◆ waitForEffectorLeft()

def velma_common.velma_interface.VelmaInterface.waitForEffectorLeft (   self,
  timeout_s = None 
)

Wait for completion of left end-effector motion in cartesian impedance mode.

Parameters
timeout_sfloat: Timeout in seconds.
Returns
Returns error code.

Definition at line 1465 of file velma_interface.py.

◆ waitForEffectorRight()

def velma_common.velma_interface.VelmaInterface.waitForEffectorRight (   self,
  timeout_s = None 
)

Wait for completion of right end-effector motion in cartesian impedance mode.

Parameters
timeout_sfloat: Timeout in seconds.
Returns
Returns error code.

Definition at line 1473 of file velma_interface.py.

◆ waitForHand()

def velma_common.velma_interface.VelmaInterface.waitForHand (   self,
  prefix,
  timeout_s = None 
)

Wait for completion of hand movement.

Parameters
prefixstring: name of hand, either 'left' or 'right'
Exceptions
AssertionErrorwhen prefix is neither 'left' nor 'right'

Definition at line 1894 of file velma_interface.py.

◆ waitForHandLeft()

def velma_common.velma_interface.VelmaInterface.waitForHandLeft (   self)

Wait for completion of left hand movement.

See also
waitForHand

Definition at line 1913 of file velma_interface.py.

◆ waitForHandRight()

def velma_common.velma_interface.VelmaInterface.waitForHandRight (   self)

Wait for completion of right hand movement.

See also
waitForHand

Definition at line 1920 of file velma_interface.py.

◆ waitForHead()

def velma_common.velma_interface.VelmaInterface.waitForHead (   self,
  timeout_s = None 
)

Wait for head movement to complete.

Returns
Returns error code.

Definition at line 1812 of file velma_interface.py.

◆ waitForHP()

def velma_common.velma_interface.VelmaInterface.waitForHP (   self,
  timeout_s = 0 
)

Wait for head pan motor.

Parameters
timeout_sfloat: Timeout in seconds.
See also
waitForMotor

Definition at line 1274 of file velma_interface.py.

◆ waitForHT()

def velma_common.velma_interface.VelmaInterface.waitForHT (   self,
  timeout_s = 0 
)

Wait for head tilt motor.

Parameters
timeout_sfloat: Timeout in seconds.
See also
waitForMotor

Definition at line 1284 of file velma_interface.py.

◆ waitForInit()

def velma_common.velma_interface.VelmaInterface.waitForInit (   self,
  timeout_s = None 
)

Wait for the interface until it is initialized.

Parameters
timeout_sfloat: Timeout in seconds.
Returns
True if the interface was succesfully initialized within timeout, False otherwise.

Definition at line 474 of file velma_interface.py.

◆ waitForJoint()

def velma_common.velma_interface.VelmaInterface.waitForJoint (   self,
  timeout_s = None 
)

Wait for joint space movement to complete.

Returns
Returns error code.

Definition at line 1718 of file velma_interface.py.

◆ waitForJointState()

def velma_common.velma_interface.VelmaInterface.waitForJointState (   self,
  abs_time 
)

Wait for reception of joint state ROS msg with time stamp greater or equal abs_time.

Parameters
abs_timerospy.Time: absolute time.
Returns
Returns True.

Definition at line 538 of file velma_interface.py.

◆ waitForLookAt()

def velma_common.velma_interface.VelmaInterface.waitForLookAt (   self,
  timeout_s = None 
)

Wait for completion of look at motion.

Parameters
timeout_sfloat: timeout in seconds.
Returns
Returns error code.

Definition at line 1519 of file velma_interface.py.

◆ waitForMotor()

def velma_common.velma_interface.VelmaInterface.waitForMotor (   self,
  motor,
  timeout_s = 0 
)

Wait for an action for a motor to complete.

Parameters
motorstring: Name of motor to enable: 'hp', 'ht' or 't'
timeout_sfloat: Timeout in seconds.
Returns
Returns error code or None if timed out.
Exceptions
NameErrorParameter motor has invalid value.

Definition at line 1207 of file velma_interface.py.

◆ waitForT()

def velma_common.velma_interface.VelmaInterface.waitForT (   self,
  timeout_s = 0 
)

Wait for torso motor.

Parameters
timeout_sfloat: Timeout in seconds.
See also
waitForMotor

Definition at line 1294 of file velma_interface.py.


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