sail-sg / ILD

Imitation Learning via Differentiable Physics
Apache License 2.0
38 stars 3 forks source link

cannot visual cloth env #1

Open zmsn-2077 opened 2 years ago

zmsn-2077 commented 2 years ago

I try to visual cloth environment, we only change var: visualize to True, but it shows some bug about it. Errors: INFO:absl:Available devices [CpuDevice(id=0)] compiling simulation Traceback (most recent call last): File "train_on_policy.py", line 462, in train(environment_fn=envs[args.env], File "train_on_policy.py", line 101, in train core_env = environment_fn(batch_size=num_envs, episode_length=episode_length) File "/home/xxx/Desktop/ILD-main/soft/policy/cloth_task/./../../core/envs/hang_cloth_env.py", line 194, in make_env env = HangCloth(robot_step_grad_fun, max_steps=episode_length, File "/home/xxx/Desktop/ILD-main/soft/policy/cloth_task/./../../core/envs/hang_cloth_env.py", line 53, in init gripper0 = o3d.geometry.TriangleMesh.create_sphere(radius=ps0_np[3]) TypeError: create_sphere(): incompatible function arguments. The following argument types are supported:

  1. (radius: float = 1.0, resolution: int = 20, create_uv_map: bool = False) -> open3d.cuda.pybind.geometry.TriangleMesh

Invoked with: kwargs: radius=array([0. , 0.1 , 0.58, 0.01], dtype=float32)

siwei0729 commented 2 years ago

Hi,

To visualize the cloth env, you can change False to True here:

https://github.com/sail-sg/ILD/blob/0038e4f872c13e04b4cd9b9eac3278a13ba61aa6/policy/cloth_task/train_on_policy.py#L127