certified-safe-neural-control / scripts /test_maniskill_robots.py
codewithyug's picture
Release: Certified-Safe Neural Control MODEL v1.0
0210a65 verified
Raw History Blame Contribute Delete
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}")