locuslab/lcp-physics

RuntimeError: sizes must be non-negative when running grad_demo.py

Opened this issue · 0 comments

Hi. I installed the package using setup.py and ran the grad_demo.py but received a runtime error as shown below. Do you have any ideas on how it comes out? The UI shows that the error triggers when two circles collide.

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
3 / 3 30.0 Traceback (most recent call last):
File "grad_demo.py", line 176, in
grad_demo(screen)
File "grad_demo.py", line 32, in grad_demo
run_world(world, run_time=TIME, screen=screen)
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 269, in run_world
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 83, in step
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 88, in step_dt
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/engines.py", line 87, in solve_dynamics
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/lcp/lcp.py", line 31, in forward
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/lcp/solvers/pdipm.py", line 192, in forward
RuntimeError: sizes must be non-negative

I also got another error upon starting the fixed_joint_demo.py:

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "fixed_joint_demo.py", line 57, in
fixed_joint_demo(screen)
File "fixed_joint_demo.py", line 43, in fixed_joint_demo
run_world(world, run_time=TIME, screen=screen, recorder=recorder)
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 269, in run_world
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 83, in step
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 88, in step_dt
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/engines.py", line 36, in solve_dynamics
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/world.py", line 163, in Je
File "/nfshomes/liangjb/mlenv3/lib/python3.6/site-packages/lcp_physics-0.0.6-py3.6.egg/lcp_physics/physics/constraints.py", line 74, in J
RuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated