Closed sfchik closed 7 years ago
Hello Chik Sheng Fei, Thank you for your interest in my work. I don't have my system in front of me as of now, so I'll try to help you with a quick answer. Chipmunk Is the 2D game library from pymunk in python, and the "mass" is a property of an object created in the game, which is like the physical mass, thus positive and finite. Check if you have the latest code from the master branch, because as much as I remember there was no such conflict in the code. Also, check if you have the dependencies installed. I will have a check of the code later tonight and let you know If I find something.
Kindly let me know if I could help you in any manner.
Regards, Rishabh Jangir
On 09-Dec-2016 1:45 PM, "Chik Sheng Fei" notifications@github.com wrote:
Hi Jangirrishabh, I read your blog on "Apprenticeship learning using Inverse Reinforcement Learning", is a very interesting piece of work, which make me interested to try out IRL. I tried to run "python3 manualControl.py", but getting this error: "Aborting due to Chipmunk error: Mass must be positive and finite.", which I have no idea how to solve it. Hope you are able to give some insights on it. Thank you.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jangirrishabh/toyCarIRL/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AHqCQwL80eC50VgwngfrYQbNRlqrgo2mks5rGQ4EgaJpZM4LIrn6 .
carmunk_edit.txt Hi Rishabh Jangir,
Thanks for your explanation on Chipmunk, really still newbie in any of these libraries. I actually did some changes to the coding because initially get this error:
Loading chipmunk for Linux (64bit) [/usr/local/lib/python3.4/dist-packages/pymunk/libchipmunk64.so]
Traceback (most recent call last):
File "manualControl.py", line 12, in <module>
from flat_game import carmunk
File "/home/aimachine/workspace/python_scripts/toyCarIRL/flat_game/carmunk.py", line 15
[carmunk_edit.txt](https://github.com/jangirrishabh/toyCarIRL/files/642622/carmunk_edit.txt)
, in <module>
from pymunk.pygame_util import draw
ImportError: cannot import name 'draw'
I am not sure but I seems like draw function is not available for pymunk 5.1.0(which I installed using pip).
So I changed it to "from pymunk.pygame_util import DrawOptions" instead, which I really have no idea what am I doing, just trying out. Attached is the code that I have edited. carmunk_edit.txt
Thanks again.
Best Regards, Chik Sheng Fei
Hi Rishabh Jangir, I found out is really due to the pymunk version that I have installed. I am able to make it working by installing pymunk4.0.0 using the following method from https://github.com/harvitronix/reinforcement-learning-car
Go back to your home or downloads and get Pymunk 4:
wget https://github.com/viblo/pymunk/archive/pymunk-4.0.0.tar.gz
Unpack it:
tar zxvf pymunk-4.0.0.tar.gz
Update from Python 2 to 3:
cd pymunk-pymukn-4.0.0/pymunk
2to3 -w *.py
Install it:
cd .. python3 setup.py install
Thanks a lot. Looking forward for more project from you. Cheers!
Hi Jangirrishabh, I read your blog on "Apprenticeship learning using Inverse Reinforcement Learning", is a very interesting piece of work, which make me interested to try out IRL. I tried to run "python3 manualControl.py", but getting this error: "Aborting due to Chipmunk error: Mass must be positive and finite.", which I have no idea how to solve it. Hope you are able to give some insights on it. Thank you.