Skip to content

Commit

Permalink
Activations in the observation vector
Browse files Browse the repository at this point in the history
  • Loading branch information
kidzik committed Dec 21, 2017
1 parent db2f0c1 commit a49a7de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions osim/env/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def get_observation(self):

# feet = [opensim.HuntCrossleyForce.safeDownCast(self.osim_model.forceSet.get(j)) for j in range(20,22)]
self.current_state = pelvis_pos + pelvis_vel + joint_angles + joint_vel + mass_pos + mass_vel + list(flatten(body_transforms)) + muscles + obstacle

# print self.current_state + [self.osim_model.muscleSet.get(i).getActivation(self.osim_model.state) for i in range(18)]
return self.current_state

def create_obstacles(self):
Expand Down
5 changes: 1 addition & 4 deletions scripts/basic.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from osim.env.run import RunEnv

env = RunEnv(visualize=True, max_obstacles = 10)
env = RunEnv(visualize=True, max_obstacles = 0)

observation = env.reset()
for i in range(200):
observation, reward, done, info = env.step(env.action_space.sample())
if done:
env.reset()
# break


0 comments on commit a49a7de

Please sign in to comment.