-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrobot_params.py
More file actions
40 lines (36 loc) · 1.42 KB
/
robot_params.py
File metadata and controls
40 lines (36 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import math
import numpy as np
class PandaParams(object):
def __init__(self):
self.name = "panda"
self.num_dofs = 7
self.end_effector_idx = 11 #8
self.first_finger_idx = 9
self.num_fingers = 2
# Lower limits for null space (TODO: set them to proper range)
self.ll = [-7] * self.num_dofs
# Upper limits for null space (TODO: set them to proper range)
self.ul = [7] * self.num_dofs
# Joint ranges for null space (TODO: set them to proper range)
self.jr = [7] * self.num_dofs
# Joint positions
self.initial_joint_pos = [
0.98, 0.458, 0.31, -2.24, -0.30, 2.66, 2.32, 0.02, 0.02
]
# Rest poses for null space
self.rp = self.initial_joint_pos
self.urdf_path = "franka_panda/panda.urdf"
# Max reach for Franka panda is 850mm, setting to 830mm for safety
self.max_reach = 0.83
self.min_radius = 0.25
self.max_angles = np.array([math.pi, math.pi / 2, math.pi / 2])
self.min_angles = np.array([0, -math.pi / 2, -math.pi / 2])
self.angle_range = self.max_angles - self.min_angles
# Initial position is where the whole robot is pointing upward
self.gripper_norm = [0, 0, 1]
# Initial height of robot gripper (in vertical axis)
self.initial_gripper_height = 0.2
# Default orientation of robot gripper
self.default_orn = np.array([math.pi / 2, 0, 0])
# Default position of robot gripper
self.default_pos = [0.1376, 0.2656, -0.5222]