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


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sat May 3 2025 02:48:17