Download scripts/test_maniskill_robots.py from codewithyug/certified-safe-neural-control: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/codewithyug/certified-safe-neural-control/resolve/main/scripts/test_maniskill_robots.py
- Command line
-
hf download hf://codewithyug/certified-safe-neural-control/scripts/test_maniskill_robots.py
-
curl -L -o test_maniskill_robots.py https://huggingface.co/codewithyug/certified-safe-neural-control/resolve/main/scripts/test_maniskill_robots.py
732 Bytes
| """ | |
| Test ManiSkill 3 environment creation with render_backend='cpu' and sim_backend='cpu' | |
| """ | |
| import gymnasium as gym | |
| import mani_skill.envs | |
| print("[*] Attempting gym.make with sim_backend='cpu', render_backend='cpu'...") | |
| try: | |
| env = gym.make( | |
| "PickCube-v1", | |
| obs_mode="state", | |
| control_mode="pd_joint_pos", | |
| sim_backend="cpu", | |
| render_backend="cpu", | |
| ) | |
| obs, info = env.reset() | |
| robot = env.unwrapped.agent.robot | |
| print(f"[+] Environment created successfully!") | |
| print(f"[+] Robot name: {env.unwrapped.agent.uid}") | |
| print(f"[+] Active DoF: {robot.dof}") | |
| print(f"[+] Action space: {env.action_space}") | |
| env.close() | |
| except Exception as e: | |
| print(f"[!] Error: {e}") | |