matheecs commited on
Commit
fc60903
·
1 Parent(s): e50eb02

fix visualize

Browse files
Files changed (1) hide show
  1. rerun_visualize.py +8 -11
rerun_visualize.py CHANGED
@@ -11,11 +11,11 @@ class RerunURDF():
11
  case 'g1':
12
  self.robot = pin.RobotWrapper.BuildFromURDF('robot_description/g1/g1_29dof_rev_1_0.urdf', 'robot_description/g1', pin.JointModelFreeFlyer())
13
  self.Tpose = np.array([0,0,0.785,0,0,0,1,
14
- -0.15,0,0,0.3,-0.15,0,
15
- -0.15,0,0,0.3,-0.15,0,
16
- 0,0,0,
17
- 0, 1.57,0,1.57,0,0,0,
18
- 0,-1.57,0,1.57,0,0,0]).astype(np.float32)
19
  case 'h1_2':
20
  self.robot = pin.RobotWrapper.BuildFromURDF('robot_description/h1_2/h1_2_wo_hand.urdf', 'robot_description/h1_2', pin.JointModelFreeFlyer())
21
  assert self.robot.model.nq == 7 + 12+1+14
@@ -111,14 +111,11 @@ if __name__ == "__main__":
111
 
112
  file_name = args.file_name
113
  robot_type = args.robot_type
114
- rerun_urdf = RerunURDF(robot_type)
115
-
116
  csv_files = robot_type + '/' + file_name + '.csv'
117
  data = np.genfromtxt(csv_files, delimiter=',')
118
 
 
119
  for frame_nr in range(data.shape[0]):
120
  rr.set_time_sequence('frame_nr', frame_nr)
121
-
122
- for rt in ['g1', 'h1_2', 'h1']:
123
- configuration = data[frame_nr, :]
124
- rerun_urdf.update(configuration)
 
11
  case 'g1':
12
  self.robot = pin.RobotWrapper.BuildFromURDF('robot_description/g1/g1_29dof_rev_1_0.urdf', 'robot_description/g1', pin.JointModelFreeFlyer())
13
  self.Tpose = np.array([0,0,0.785,0,0,0,1,
14
+ -0.15,0,0,0.3,-0.15,0,
15
+ -0.15,0,0,0.3,-0.15,0,
16
+ 0,0,0,
17
+ 0, 1.57,0,1.57,0,0,0,
18
+ 0,-1.57,0,1.57,0,0,0]).astype(np.float32)
19
  case 'h1_2':
20
  self.robot = pin.RobotWrapper.BuildFromURDF('robot_description/h1_2/h1_2_wo_hand.urdf', 'robot_description/h1_2', pin.JointModelFreeFlyer())
21
  assert self.robot.model.nq == 7 + 12+1+14
 
111
 
112
  file_name = args.file_name
113
  robot_type = args.robot_type
 
 
114
  csv_files = robot_type + '/' + file_name + '.csv'
115
  data = np.genfromtxt(csv_files, delimiter=',')
116
 
117
+ rerun_urdf = RerunURDF(robot_type)
118
  for frame_nr in range(data.shape[0]):
119
  rr.set_time_sequence('frame_nr', frame_nr)
120
+ configuration = data[frame_nr, :]
121
+ rerun_urdf.update(configuration)