Skip to content

Commit

Permalink
Added None check to moma_option.py.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704265704
Change-Id: Icfb01e9bee501cee22bec887673a8d88689e027e
  • Loading branch information
Default authored and copybara-github committed Dec 9, 2024
1 parent 8c195bb commit 99d3dc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions py/moma/moma_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def _set_control(self, physics: mjcf.Physics, command: np.ndarray):
# charge of controlling individual effectors.
return

if self._action_spec is None:
raise ValueError('self._action_spec is None.')

spec_utils.validate(self._action_spec, command)

for ef in self._effectors:
Expand Down

0 comments on commit 99d3dc5

Please sign in to comment.