WUT Velma robot API
Classes | Functions
velma_common.velma_interface Namespace Reference

Classes

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

Functions

def getSymmetricalJointName (joint_name)
 For joint names that refer to joints that are symmetrical (left or right), get the name of the another joint. More...
 
def symmetricalConfiguration (q_map)
 Get configuration based on the input configuration such that all joint positions are symmetrical. More...
 
def isConfigurationClose (q_map1, q_map2, tolerance=0.1, allow_subset=False)
 Check if two configurations of robot body are close within tolerance. More...
 
def isHeadConfigurationClose (q1, q2, tolerance=0.1)
 Check if two configurations of robot neck are close within tolerance. More...
 
def isHandConfigurationClose (current_q, dest_q, tolerance=0.1)
 Check if two configurations of robot hand are close within tolerance. More...
 
def splitTrajectory (joint_trajectory, max_traj_len)
 Split a long trajectory into a number of shorter trajectories. More...
 

Function Documentation

◆ getSymmetricalJointName()

def velma_common.velma_interface.getSymmetricalJointName (   joint_name)

For joint names that refer to joints that are symmetrical (left or right), get the name of the another joint.

Parameters
joint_namestring: name of joint.
Returns
name of the joint symmetrical to joint_name, or None, if such does not exist.

Definition at line 64 of file velma_interface.py.

◆ isConfigurationClose()

def velma_common.velma_interface.isConfigurationClose (   q_map1,
  q_map2,
  tolerance = 0.1,
  allow_subset = False 
)

Check if two configurations of robot body are close within tolerance.

Parameters
q_map1dictionary: Dictionary {name:position} that maps joint names to their positions.
q_map2dictionary: Dictionary {name:position} that maps joint names to their positions.
Returns
True if two configurations are close within tolerance (for every joint), False otherwise.
Exceptions
KeyErrorEither q_map1 or q_map2 dictionaries does not contain required key, i.e. one of robot body joint names.

Definition at line 97 of file velma_interface.py.

◆ isHandConfigurationClose()

def velma_common.velma_interface.isHandConfigurationClose (   current_q,
  dest_q,
  tolerance = 0.1 
)

Check if two configurations of robot hand are close within tolerance.

Parameters
current_qtuple: 8-tuple of hand joints positions.
dest_qtuple: 4-tuple of hand DOFs positions.
Returns
True if two configurations are close within tolerance (for every joint), False otherwise.

Definition at line 132 of file velma_interface.py.

◆ isHeadConfigurationClose()

def velma_common.velma_interface.isHeadConfigurationClose (   q1,
  q2,
  tolerance = 0.1 
)

Check if two configurations of robot neck are close within tolerance.

Parameters
q1tuple: 2-tuple of neck joints positions.
q2tuple: 2-tuple of neck joints positions.
Returns
True if two configurations are close within tolerance (for every joint), False otherwise.

Definition at line 121 of file velma_interface.py.

◆ splitTrajectory()

def velma_common.velma_interface.splitTrajectory (   joint_trajectory,
  max_traj_len 
)

Split a long trajectory into a number of shorter trajectories.

Parameters
joint_trajectorytrajectory_msgs.msg.JointTrajectory: A joint trajectory to be splitted.
max_traj_lenint: Maximum number of nodes in the result trajectory.
Returns
Returns list of trajectory_msgs.msg.JointTrajectory – the input trajectory split into a number of trajectories of length not greater than max_traj_len.

Definition at line 146 of file velma_interface.py.

◆ symmetricalConfiguration()

def velma_common.velma_interface.symmetricalConfiguration (   q_map)

Get configuration based on the input configuration such that all joint positions are symmetrical.

Parameters
q_mapDictionary: configuration {joint_name:joint_position}.
Returns
Dictionary with symmetrical configuration.

Definition at line 79 of file velma_interface.py.