MCPcopy Create free account
hub / github.com/InternRobotics/UniHSI / step

Method step

unihsi/env/tasks/base_task.py:126–144  ·  view source on GitHub ↗
(self, actions)

Source from the content-addressed store, hash-verified

124 return sim
125
126 def step(self, actions):
127 if self.dr_randomizations.get('actions', None):
128 actions = self.dr_randomizations['actions']['noise_lambda'](actions)
129
130 # apply actions
131 self.pre_physics_step(actions)
132
133 # step physics and render each frame
134 self._physics_step()
135
136 # to fix!
137 if self.device == 'cpu':
138 self.gym.fetch_results(self.sim, True)
139
140 # compute observations, rewards, resets, ...
141 self.post_physics_step()
142
143 if self.dr_randomizations.get('observations', None):
144 self.obs_buf = self.dr_randomizations['observations']['noise_lambda'](self.obs_buf)
145
146 def get_states(self):
147 return self.states_buf

Callers

nothing calls this directly

Calls 3

pre_physics_stepMethod · 0.95
_physics_stepMethod · 0.95
post_physics_stepMethod · 0.95

Tested by

no test coverage detected