ur5_reaching_conf.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 """
3 Created on Thu Apr 18 09:47:07 2019
4 
5 @author: student
6 """
7 
8 import os
9 
10 import numpy as np
11 
12 np.set_printoptions(precision=3, linewidth=200, suppress=True)
13 LINE_WIDTH = 60
14 
15 N_SIMULATION = 500 # number of time steps simulated
16 dt = 0.002 # controller time step
17 q0 = np.array([0.0, -1.0, 0.7, 0.0, 0.0, 0.0]) # initial configuration
18 
19 # REFERENCE SINUSOIDAL TRAJECTORY
20 amp = np.array([0.0, 0.0, 0.0]) # amplitude
21 phi = np.array([0.0, 0.5 * np.pi, 0.0]) # phase
22 two_pi_f = 2 * np.pi * np.array([1.0, 0.5, 0.5]) # frequency (time 2 PI)
23 offset = np.array([0.1, 0.0, 0.0])
24 
25 w_ee = 1.0 # weight of end-effector task
26 w_posture = 1e-3 # weight of joint posture task
27 w_torque_bounds = 1.0 # weight of the torque bounds
28 w_joint_bounds = 1.0 # weight of the joint bounds
29 
30 kp_ee = 100.0 # proportional gain of end-effector constraint
31 kp_posture = 1.0 # proportional gain of joint posture task
32 
33 tau_max_scaling = 0.4 # scaling factor of torque bounds
34 v_max_scaling = 0.4 # scaling factor of velocity bounds
35 
36 ee_frame_name = "ee_fixed_joint" # end-effector frame name
37 ee_task_mask = np.array([1.0, 1, 1, 0, 0, 0])
38 ee_task_local_frame = False # specifies whether task is formulated in local frame
39 
40 PRINT_N = 500 # print every PRINT_N time steps
41 DISPLAY_N = 20 # update robot configuration in viwewer every DISPLAY_N time steps
42 CAMERA_TRANSFORM = [
43  2.582354784011841,
44  1.620774507522583,
45  1.0674564838409424,
46  0.2770655155181885,
47  0.5401807427406311,
48  0.6969326734542847,
49  0.3817386031150818,
50 ]
51 SPHERE_RADIUS = 0.03
52 REF_SPHERE_RADIUS = 0.03
53 EE_SPHERE_COLOR = (1, 0.5, 0, 0.5)
54 EE_REF_SPHERE_COLOR = (1, 0, 0, 0.5)
55 
56 from os.path import join
57 
58 from example_robot_data.robots_loader import getModelPath
59 
60 urdf = "ur_description/urdf/ur5_robot.urdf"
61 path = getModelPath(urdf)
62 urdf = join(path, urdf)
63 path = join(path, "../..")


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sun Jul 2 2023 02:21:51