@@ -178,8 +178,8 @@ def get_obs_dict(self, sim):
178
178
obs_dict ['terrain' ] = np .array ([self .terrain_type ])
179
179
180
180
# proprioception
181
- obs_dict ['internal_qpos' ] = self .get_internal_qpos () #sim.data.qpos[7:].copy()
182
- obs_dict ['internal_qvel' ] = self .get_internal_qvel () #sim.data.qvel[6:].copy() * self.dt
181
+ obs_dict ['internal_qpos' ] = self .get_internal_qpos ()
182
+ obs_dict ['internal_qvel' ] = self .get_internal_qvel ()
183
183
obs_dict ['grf' ] = self ._get_grf ().copy ()
184
184
obs_dict ['socket_force' ] = self ._get_socket_force ().copy ()
185
185
obs_dict ['torso_angle' ] = self .sim .data .body ('pelvis' ).xquat .copy ()
@@ -533,6 +533,7 @@ def get_internal_qpos(self):
533
533
counter = 0
534
534
for jnt in self .biological_jnt :
535
535
temp_qpos [counter ] = self .sim .data .joint (jnt ).qpos [0 ].copy ()
536
+ counter += 1
536
537
return temp_qpos
537
538
538
539
def get_internal_qvel (self ):
@@ -543,6 +544,7 @@ def get_internal_qvel(self):
543
544
counter = 0
544
545
for jnt in self .biological_jnt :
545
546
temp_qvel [counter ] = self .sim .data .joint (jnt ).qvel [0 ].copy ()
547
+ counter += 1
546
548
return temp_qvel * self .dt
547
549
548
550
def muscle_lengths (self ):
@@ -553,6 +555,7 @@ def muscle_lengths(self):
553
555
counter = 0
554
556
for jnt in self .biological_act :
555
557
temp_len [counter ] = self .sim .data .actuator (jnt ).length [0 ].copy ()
558
+ counter += 1
556
559
return temp_len
557
560
558
561
def muscle_forces (self ):
@@ -563,6 +566,7 @@ def muscle_forces(self):
563
566
counter = 0
564
567
for jnt in self .biological_act :
565
568
temp_frc [counter ] = self .sim .data .actuator (jnt ).force [0 ].copy ()
569
+ counter += 1
566
570
567
571
return np .clip (temp_frc / 1000 , - 100 , 100 )
568
572
@@ -574,6 +578,7 @@ def muscle_velocities(self):
574
578
counter = 0
575
579
for jnt in self .biological_act :
576
580
temp_vel [counter ] = self .sim .data .actuator (jnt ).velocity [0 ].copy ()
581
+ counter += 1
577
582
578
583
return np .clip (temp_vel , - 100 , 100 )
579
584
0 commit comments