Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
williamljb opened this issue Dec 10, 2018 · 0 comments
Open

Comments

@williamljb
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant