Improbable-AI / rapid-locomotion-rl

Code for Rapid Locomotion via Reinforcement Learning
Other
162 stars 38 forks source link

AssertionError: You must specify a action space. #1

Closed manipulability closed 2 years ago

manipulability commented 2 years ago

Thanks for sharing your code!!

When I run python scripts/test.py to verify the installation, the following error message appears.

.../mini_gym/envs/base/legged_robot.py:1033: DeprecationWarning: np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations self.env_command_bins = np.zeros(len(env_ids), dtype=np.int) Traceback (most recent call last): File "scripts/test.py", line 50, in run_env(render=True, headless=False) File "scripts/test.py", line 31, in run_env env = gym.make("VelocityTrackingEasyEnv-v0", headless=headless, cfg=Cfg) File ".../lib/python3.8/site-packages/gym/envs/registration.py", line 601, in make env = PassiveEnvChecker(env) File ".../lib/python3.8/site-packages/gym/wrappers/env_checker.py", line 22, in init assert hasattr( AssertionError: You must specify a action space. https://www.gymlibrary.ml/content/environment_creation/_

I have confirmed that the isaac gym is well installed. Have you ever experienced or solved this problem?

Thanks.

gmargo11 commented 2 years ago

Hi, thanks for reporting this issue. This code was tested with older OpenAI Gym 0.22.0, but the newer release 0.25.0 seems to have different requirements for environment registration, generating the error you're seeing.

I've added new commit e05213b which removes gym registration to resolve this issue. This should resolve your issue; let me know if the problem persists

Gabe

manipulability commented 2 years ago

Thank you so much!!