WUT Velma robot API
Functions | Variables
scripts.object_manipulation_hw-sim 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_Trd2, 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 = False
 ---------------------------------------—### 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_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.95, -0.12, 1.3)
 
 T_B_Trd = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.0))
 
 T_B_Trd2 = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.05))
 
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.2*dr[0]/drL, -0.2*dr[1]/drL, 0.05))
 
 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.2*dr[0]/drL, -0.2*dr[1]/drL, 0.05))
 

Function Documentation

◆ closeORopen_gripper()

def scripts.object_manipulation_hw-sim.closeORopen_gripper (   rORl,
  dest_q 
)

Definition at line 55 of file object_manipulation_hw-sim.py.

◆ diff_calc()

def scripts.object_manipulation_hw-sim.diff_calc (   rORl,
  T_frame 
)

Definition at line 186 of file object_manipulation_hw-sim.py.

◆ get_tf_rORl()

def scripts.object_manipulation_hw-sim.get_tf_rORl (   rORl)

Definition at line 194 of file object_manipulation_hw-sim.py.

◆ identification_movements()

def scripts.object_manipulation_hw-sim.identification_movements (   rightORleft,
  imp_list,
  pt_val,
  dest_qGrasped,
  dest_qOpened,
  T_B_Trd,
  T_B_Trd2,
  T_B_Trd_Identif1,
  T_B_Trd_Identif2 
)

Definition at line 113 of file object_manipulation_hw-sim.py.

◆ isHandConfigClose_rORl()

def scripts.object_manipulation_hw-sim.isHandConfigClose_rORl (   rORl)

Definition at line 201 of file object_manipulation_hw-sim.py.

◆ move_cart_imp()

def scripts.object_manipulation_hw-sim.move_cart_imp (   rORl,
  T_frame,
  imp_list,
  pt_val,
  time 
)

Definition at line 95 of file object_manipulation_hw-sim.py.

◆ move_jnt_imp()

def scripts.object_manipulation_hw-sim.move_jnt_imp (   q_dest,
  time 
)

Definition at line 13 of file object_manipulation_hw-sim.py.

◆ q_map_rORl()

def scripts.object_manipulation_hw-sim.q_map_rORl (   rORl,
  torso_angle 
)

Definition at line 237 of file object_manipulation_hw-sim.py.

◆ q_map_rORl0()

def scripts.object_manipulation_hw-sim.q_map_rORl0 (   rORl)

Definition at line 215 of file object_manipulation_hw-sim.py.

◆ switch2cart_imp_mode()

def scripts.object_manipulation_hw-sim.switch2cart_imp_mode (   rORl,
  timeout 
)

Definition at line 22 of file object_manipulation_hw-sim.py.

◆ switch2jnt_imp_mode()

def scripts.object_manipulation_hw-sim.switch2jnt_imp_mode ( )

Definition at line 41 of file object_manipulation_hw-sim.py.

◆ switch_weight_compensation()

def scripts.object_manipulation_hw-sim.switch_weight_compensation (   rightORleft,
  GRAV_OBJ_COMP,
  imp_list,
  pt_val 
)

Definition at line 178 of file object_manipulation_hw-sim.py.

◆ tool2grip_pose()

def scripts.object_manipulation_hw-sim.tool2grip_pose (   rORl)

Definition at line 74 of file object_manipulation_hw-sim.py.

Variable Documentation

◆ alfa

float scripts.object_manipulation_hw-sim.alfa = 0.0

Definition at line 339 of file object_manipulation_hw-sim.py.

◆ CART_TEST

bool scripts.object_manipulation_hw-sim.CART_TEST = False

---------------------------------------—### CART_TEST = True

Definition at line 280 of file object_manipulation_hw-sim.py.

◆ dest_qClosed

list scripts.object_manipulation_hw-sim.dest_qClosed = [90.0/180.0*math.pi, 90.0/180.0*math.pi, 90.0/180.0*math.pi, 0]

Definition at line 295 of file object_manipulation_hw-sim.py.

◆ dest_qGrasped

list scripts.object_manipulation_hw-sim.dest_qGrasped = [85.0/180.0*math.pi, 85.0/180.0*math.pi, 85.0/180.0*math.pi, 0]

Definition at line 296 of file object_manipulation_hw-sim.py.

◆ dest_qOpened

list scripts.object_manipulation_hw-sim.dest_qOpened = [0, 0, 0, 0]

Definition at line 294 of file object_manipulation_hw-sim.py.

◆ diag

scripts.object_manipulation_hw-sim.diag = velma.getCoreCsDiag()

Definition at line 312 of file object_manipulation_hw-sim.py.

◆ dr

tuple scripts.object_manipulation_hw-sim.dr = (T_Wo_obj1_pos - T_Wo_grip.p)

Definition at line 375 of file object_manipulation_hw-sim.py.

◆ drL

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

Definition at line 376 of file object_manipulation_hw-sim.py.

◆ GRAV_OBJ_COMP

bool scripts.object_manipulation_hw-sim.GRAV_OBJ_COMP = True

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

Definition at line 282 of file object_manipulation_hw-sim.py.

◆ imp_list

scripts.object_manipulation_hw-sim.imp_list = PyKDL.Wrench(PyKDL.Vector(500, 500, 500), PyKDL.Vector(100, 100, 100))

Definition at line 291 of file object_manipulation_hw-sim.py.

◆ pt_val

float scripts.object_manipulation_hw-sim.pt_val = 0.5

Definition at line 292 of file object_manipulation_hw-sim.py.

◆ q_map_0

def scripts.object_manipulation_hw-sim.q_map_0 = q_map_rORl0(rightORleft)

Definition at line 340 of file object_manipulation_hw-sim.py.

◆ q_map_1

def scripts.object_manipulation_hw-sim.q_map_1 = q_map_rORl(rightORleft, alfa)

Definition at line 341 of file object_manipulation_hw-sim.py.

◆ q_map_starting

dictionary scripts.object_manipulation_hw-sim.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 263 of file object_manipulation_hw-sim.py.

◆ R_z

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

Definition at line 379 of file object_manipulation_hw-sim.py.

◆ rightORleft

string scripts.object_manipulation_hw-sim.rightORleft = 'right'

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

Definition at line 276 of file object_manipulation_hw-sim.py.

◆ start_time

scripts.object_manipulation_hw-sim.start_time

Definition at line 353 of file object_manipulation_hw-sim.py.

◆ T_B_Trd

scripts.object_manipulation_hw-sim.T_B_Trd = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.0))

Definition at line 372 of file object_manipulation_hw-sim.py.

◆ T_B_Trd2

scripts.object_manipulation_hw-sim.T_B_Trd2 = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(0.0, 0.0, 0.05))

Definition at line 373 of file object_manipulation_hw-sim.py.

◆ T_B_Trd_Identif1

scripts.object_manipulation_hw-sim.T_B_Trd_Identif1 = PyKDL.Frame(T_Wo_grip.M, T_Wo_obj1_pos + PyKDL.Vector(-0.2*dr[0]/drL, -0.2*dr[1]/drL, 0.05))

Definition at line 377 of file object_manipulation_hw-sim.py.

◆ T_B_Trd_Identif2

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

Definition at line 382 of file object_manipulation_hw-sim.py.

◆ T_B_Wl

scripts.object_manipulation_hw-sim.T_B_Wl = velma.getTf("B", "Wl")

Definition at line 352 of file object_manipulation_hw-sim.py.

◆ T_B_Wr

scripts.object_manipulation_hw-sim.T_B_Wr = velma.getTf("B", "Wr")

Definition at line 351 of file object_manipulation_hw-sim.py.

◆ T_Wo_grip

def scripts.object_manipulation_hw-sim.T_Wo_grip = get_tf_rORl(rightORleft)

Definition at line 364 of file object_manipulation_hw-sim.py.

◆ T_Wo_obj1_pos

scripts.object_manipulation_hw-sim.T_Wo_obj1_pos = PyKDL.Vector(0.95, -0.12, 1.3)

Definition at line 368 of file object_manipulation_hw-sim.py.

◆ timeout_s

scripts.object_manipulation_hw-sim.timeout_s

Definition at line 302 of file object_manipulation_hw-sim.py.

◆ velma

scripts.object_manipulation_hw-sim.velma = VelmaInterface()

Definition at line 300 of file object_manipulation_hw-sim.py.