77import importlib .util
88import urllib .error
99
10- from gym .core import ObsType
11-
1210_has_isaac = importlib .util .find_spec ("isaacgym" ) is not None
1311
1412if _has_isaac :
2523from contextlib import nullcontext
2624from pathlib import Path
2725from sys import platform
28- from typing import Optional , Tuple , Union
26+ from typing import Optional , Union
2927from unittest import mock
3028
3129import numpy as np
@@ -653,14 +651,17 @@ def __init__(self):
653651 self .observation_space = gym .spaces .Box (- 1 , 1 )
654652
655653 def step (self , action ):
654+ assert isinstance (action , dict )
655+ assert isinstance (action ["a0" ], np .ndarray )
656+ assert isinstance (action ["a1" ], np .ndarray )
656657 return (0.5 , 0.0 , False , False , {})
657658
658659 def reset (
659660 self ,
660661 * ,
661662 seed : Optional [int ] = None ,
662663 options : Optional [dict ] = None ,
663- ) -> Tuple [ ObsType , dict ] :
664+ ):
664665 return (0.0 , {})
665666
666667 env = CompositeActionEnv ()
@@ -686,14 +687,17 @@ def __init__(self):
686687 self .observation_space = gym .spaces .Box (- 1 , 1 )
687688
688689 def step (self , action ):
690+ assert isinstance (action , dict )
691+ assert isinstance (action ["a0" ], np .ndarray )
692+ assert isinstance (action ["a1" ], np .ndarray )
689693 return (0.5 , 0.0 , False , False , {})
690694
691695 def reset (
692696 self ,
693697 * ,
694698 seed : Optional [int ] = None ,
695699 options : Optional [dict ] = None ,
696- ) -> Tuple [ ObsType , dict ] :
700+ ):
697701 return (0.0 , {})
698702
699703 env = CompositeActionEnv ()
0 commit comments