WUT Velma robot API
Functions | Variables
scripts.object_manipulation_hardware Namespace Reference

Functions

def move_jnt_imp (q_dest, time)
 
def switch2cart_imp_mode (rORl, timeout)
 
def switch2jnt_imp_mode ()
 
def closeORopen_gripper (rORl, dest_q)
 
def tool2grip_pose (rORl)
 
def move_cart_imp (rORl, T_frame, imp_list, pt_val, time)
 
def identification_movements (rightORleft, imp_list, pt_val, dest_qGrasped, dest_qOpened, T_B_Trd, T_B_Trd_Identif1, T_B_Trd_Identif2)
 
def switch_weight_compensation (rightORleft, GRAV_OBJ_COMP, imp_list, pt_val)
 
def diff_calc (rORl, T_frame)
 
def get_tf_rORl (rORl)
 
def isHandConfigClose_rORl (rORl)
 
def q_map_rORl0 (rORl)
 
def q_map_rORl (rORl, torso_angle)
 

Variables

dictionary q_map_starting
 
string rightORleft = 'right'
 INITIAL SETTINGS ###############. More...
 
bool CART_TEST = True
 ---------------------------------------—### More...
 
bool GRAV_OBJ_COMP = True
 ---------------------------------------—### More...
 
 imp_list = PyKDL.Wrench(PyKDL.Vector(500, 500, 500), PyKDL.Vector(100, 100, 100))
 
float pt_val = 0.5
 
list dest_qOpened = [0, 0, 0, 0]
 
list dest_qOpened2 = [0, 0, 0, math.pi]
 
list dest_qClosed = [90.0/180.0*math.pi, 90.0/180.0*math.pi, 90.0/180.0*math.pi, 0]
 
list dest_qGrasped = [85.0/180.0*math.pi, 85.0/180.0*math.pi, 85.0/180.0*math.pi, 0]
 
 velma = VelmaInterface()
 
 timeout_s
 
 diag = velma.getCoreCsDiag()
 
float alfa = 0.0
 
def q_map_0 = q_map_rORl0(rightORleft)
 
def q_map_1 = q_map_rORl(rightORleft, alfa)
 
 T_B_Wr = velma.getTf("B", "Wr")
 
 T_B_Wl = velma.getTf("B", "Wl")
 
 start_time
 
def T_Wo_grip = get_tf_rORl(rightORleft)
 
 T_Wo_obj1_pos = PyKDL.Vector(0.8, -0.17, 1.1)
 
 T_B_Trd = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.0))
 
tuple dr = (T_Wo_obj1_pos - T_Wo_grip.p)
 
 drL = math.sqrt(dr[0]**2 + dr[1]**2)
 
 T_B_Trd_Identif1 = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(-0.15*dr[0]/drL, -0.15*dr[1]/drL, 0.15))
 
 R_z = PyKDL.Rotation.RotZ(-math.pi/2)
 
 T_B_Trd_Identif2 = PyKDL.Frame(T_Wo_grip.M*R_z, T_Wo_obj1_pos + PyKDL.Vector(-0.15*dr[0]/drL, -0.15*dr[1]/drL, 0.15))
 
def q_map_2 = q_map_rORl(rightORleft, 0.0)
 
float pm = 1.0
 
float quat_z = 0.0
 
float quat_w = 1.0
 
 T_B_Trd2 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.2*pm, 1.45))
 
 T_B_Trd3 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.2*pm, 1.35))
 
 T_B_Trd4 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.1*pm, 1.35))
 
 T_B_Trd5 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.1*pm, 1.45))
 
int i = 0
 
def q_map_end = q_map_rORl(rightORleft, alfa)
 

Function Documentation

◆ closeORopen_gripper()

def scripts.object_manipulation_hardware.closeORopen_gripper (   rORl,
  dest_q 
)

Definition at line 55 of file object_manipulation_hardware.py.

◆ diff_calc()

def scripts.object_manipulation_hardware.diff_calc (   rORl,
  T_frame 
)

Definition at line 184 of file object_manipulation_hardware.py.

◆ get_tf_rORl()

def scripts.object_manipulation_hardware.get_tf_rORl (   rORl)

Definition at line 192 of file object_manipulation_hardware.py.

◆ identification_movements()

def scripts.object_manipulation_hardware.identification_movements (   rightORleft,
  imp_list,
  pt_val,
  dest_qGrasped,
  dest_qOpened,
  T_B_Trd,
  T_B_Trd_Identif1,
  T_B_Trd_Identif2 
)

Definition at line 113 of file object_manipulation_hardware.py.

◆ isHandConfigClose_rORl()

def scripts.object_manipulation_hardware.isHandConfigClose_rORl (   rORl)

Definition at line 199 of file object_manipulation_hardware.py.

◆ move_cart_imp()

def scripts.object_manipulation_hardware.move_cart_imp (   rORl,
  T_frame,
  imp_list,
  pt_val,
  time 
)

Definition at line 95 of file object_manipulation_hardware.py.

◆ move_jnt_imp()

def scripts.object_manipulation_hardware.move_jnt_imp (   q_dest,
  time 
)

Definition at line 13 of file object_manipulation_hardware.py.

◆ q_map_rORl()

def scripts.object_manipulation_hardware.q_map_rORl (   rORl,
  torso_angle 
)

Definition at line 235 of file object_manipulation_hardware.py.

◆ q_map_rORl0()

def scripts.object_manipulation_hardware.q_map_rORl0 (   rORl)

Definition at line 213 of file object_manipulation_hardware.py.

◆ switch2cart_imp_mode()

def scripts.object_manipulation_hardware.switch2cart_imp_mode (   rORl,
  timeout 
)

Definition at line 22 of file object_manipulation_hardware.py.

◆ switch2jnt_imp_mode()

def scripts.object_manipulation_hardware.switch2jnt_imp_mode ( )

Definition at line 41 of file object_manipulation_hardware.py.

◆ switch_weight_compensation()

def scripts.object_manipulation_hardware.switch_weight_compensation (   rightORleft,
  GRAV_OBJ_COMP,
  imp_list,
  pt_val 
)

Definition at line 176 of file object_manipulation_hardware.py.

◆ tool2grip_pose()

def scripts.object_manipulation_hardware.tool2grip_pose (   rORl)

Definition at line 74 of file object_manipulation_hardware.py.

Variable Documentation

◆ alfa

float scripts.object_manipulation_hardware.alfa = 0.0

Definition at line 334 of file object_manipulation_hardware.py.

◆ CART_TEST

bool scripts.object_manipulation_hardware.CART_TEST = True

---------------------------------------—###

Definition at line 277 of file object_manipulation_hardware.py.

◆ dest_qClosed

list scripts.object_manipulation_hardware.dest_qClosed = [90.0/180.0*math.pi, 90.0/180.0*math.pi, 90.0/180.0*math.pi, 0]

Definition at line 294 of file object_manipulation_hardware.py.

◆ dest_qGrasped

list scripts.object_manipulation_hardware.dest_qGrasped = [85.0/180.0*math.pi, 85.0/180.0*math.pi, 85.0/180.0*math.pi, 0]

Definition at line 295 of file object_manipulation_hardware.py.

◆ dest_qOpened

list scripts.object_manipulation_hardware.dest_qOpened = [0, 0, 0, 0]

Definition at line 292 of file object_manipulation_hardware.py.

◆ dest_qOpened2

list scripts.object_manipulation_hardware.dest_qOpened2 = [0, 0, 0, math.pi]

Definition at line 293 of file object_manipulation_hardware.py.

◆ diag

scripts.object_manipulation_hardware.diag = velma.getCoreCsDiag()

Definition at line 311 of file object_manipulation_hardware.py.

◆ dr

tuple scripts.object_manipulation_hardware.dr = (T_Wo_obj1_pos - T_Wo_grip.p)

Definition at line 369 of file object_manipulation_hardware.py.

◆ drL

scripts.object_manipulation_hardware.drL = math.sqrt(dr[0]**2 + dr[1]**2)

Definition at line 370 of file object_manipulation_hardware.py.

◆ GRAV_OBJ_COMP

bool scripts.object_manipulation_hardware.GRAV_OBJ_COMP = True

---------------------------------------—###

Definition at line 280 of file object_manipulation_hardware.py.

◆ i

int scripts.object_manipulation_hardware.i = 0

Definition at line 415 of file object_manipulation_hardware.py.

◆ imp_list

scripts.object_manipulation_hardware.imp_list = PyKDL.Wrench(PyKDL.Vector(500, 500, 500), PyKDL.Vector(100, 100, 100))

Definition at line 289 of file object_manipulation_hardware.py.

◆ pm

float scripts.object_manipulation_hardware.pm = 1.0

Definition at line 395 of file object_manipulation_hardware.py.

◆ pt_val

float scripts.object_manipulation_hardware.pt_val = 0.5

Definition at line 290 of file object_manipulation_hardware.py.

◆ q_map_0

def scripts.object_manipulation_hardware.q_map_0 = q_map_rORl0(rightORleft)

Definition at line 335 of file object_manipulation_hardware.py.

◆ q_map_1

def scripts.object_manipulation_hardware.q_map_1 = q_map_rORl(rightORleft, alfa)

Definition at line 336 of file object_manipulation_hardware.py.

◆ q_map_2

def scripts.object_manipulation_hardware.q_map_2 = q_map_rORl(rightORleft, 0.0)

Definition at line 390 of file object_manipulation_hardware.py.

◆ q_map_end

def scripts.object_manipulation_hardware.q_map_end = q_map_rORl(rightORleft, alfa)

Definition at line 430 of file object_manipulation_hardware.py.

◆ q_map_starting

dictionary scripts.object_manipulation_hardware.q_map_starting
Initial value:
1 = {'torso_0_joint':0,
2  'right_arm_0_joint':-0.3, 'left_arm_0_joint':0.3,
3  'right_arm_1_joint':-1.8, 'left_arm_1_joint':1.8,
4  'right_arm_2_joint':1.25, 'left_arm_2_joint':-1.25,
5  'right_arm_3_joint':0.85, 'left_arm_3_joint':-0.85,
6  'right_arm_4_joint':0, 'left_arm_4_joint':0,
7  'right_arm_5_joint':-0.5, 'left_arm_5_joint':0.5,
8  'right_arm_6_joint':0, 'left_arm_6_joint':0 }

Definition at line 261 of file object_manipulation_hardware.py.

◆ quat_w

scripts.object_manipulation_hardware.quat_w = 1.0

Definition at line 397 of file object_manipulation_hardware.py.

◆ quat_z

scripts.object_manipulation_hardware.quat_z = 0.0

Definition at line 396 of file object_manipulation_hardware.py.

◆ R_z

scripts.object_manipulation_hardware.R_z = PyKDL.Rotation.RotZ(-math.pi/2)

Definition at line 373 of file object_manipulation_hardware.py.

◆ rightORleft

string scripts.object_manipulation_hardware.rightORleft = 'right'

INITIAL SETTINGS ###############.

Definition at line 274 of file object_manipulation_hardware.py.

◆ start_time

scripts.object_manipulation_hardware.start_time

Definition at line 348 of file object_manipulation_hardware.py.

◆ T_B_Trd

scripts.object_manipulation_hardware.T_B_Trd = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.0))

Definition at line 367 of file object_manipulation_hardware.py.

◆ T_B_Trd2

scripts.object_manipulation_hardware.T_B_Trd2 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.2*pm, 1.45))

Definition at line 406 of file object_manipulation_hardware.py.

◆ T_B_Trd3

scripts.object_manipulation_hardware.T_B_Trd3 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.2*pm, 1.35))

Definition at line 407 of file object_manipulation_hardware.py.

◆ T_B_Trd4

scripts.object_manipulation_hardware.T_B_Trd4 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.1*pm, 1.35))

Definition at line 408 of file object_manipulation_hardware.py.

◆ T_B_Trd5

scripts.object_manipulation_hardware.T_B_Trd5 = PyKDL.Frame(PyKDL.Rotation.Quaternion( 0.0 , 0.0 , quat_z , quat_w ), PyKDL.Vector( 0.7, -0.1*pm, 1.45))

Definition at line 409 of file object_manipulation_hardware.py.

◆ T_B_Trd_Identif1

scripts.object_manipulation_hardware.T_B_Trd_Identif1 = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(-0.15*dr[0]/drL, -0.15*dr[1]/drL, 0.15))

Definition at line 371 of file object_manipulation_hardware.py.

◆ T_B_Trd_Identif2

scripts.object_manipulation_hardware.T_B_Trd_Identif2 = PyKDL.Frame(T_Wo_grip.M*R_z, T_Wo_obj1_pos + PyKDL.Vector(-0.15*dr[0]/drL, -0.15*dr[1]/drL, 0.15))

Definition at line 376 of file object_manipulation_hardware.py.

◆ T_B_Wl

scripts.object_manipulation_hardware.T_B_Wl = velma.getTf("B", "Wl")

Definition at line 347 of file object_manipulation_hardware.py.

◆ T_B_Wr

scripts.object_manipulation_hardware.T_B_Wr = velma.getTf("B", "Wr")

Definition at line 346 of file object_manipulation_hardware.py.

◆ T_Wo_grip

def scripts.object_manipulation_hardware.T_Wo_grip = get_tf_rORl(rightORleft)

Definition at line 359 of file object_manipulation_hardware.py.

◆ T_Wo_obj1_pos

scripts.object_manipulation_hardware.T_Wo_obj1_pos = PyKDL.Vector(0.8, -0.17, 1.1)

Definition at line 363 of file object_manipulation_hardware.py.

◆ timeout_s

scripts.object_manipulation_hardware.timeout_s

Definition at line 301 of file object_manipulation_hardware.py.

◆ velma

scripts.object_manipulation_hardware.velma = VelmaInterface()

Definition at line 299 of file object_manipulation_hardware.py.