File size: 732 Bytes
0210a65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
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}")