cavenel / ev3dev_examples

Examples of program for ev3dev
23 stars 22 forks source link

Does not work on current ev3dev #4

Closed akhayyat closed 8 years ago

akhayyat commented 8 years ago

I spent many hours trying to get this code to work on the current ev3dev distribution (not to mention building the Rubik solver Lego robot). I came to the conclusion that it needs major work to get it to work.

After fixing the device driver instantiations (Motor and Color_sensor), doing any actions failed due to the no longer existing run_mode files in the sysfs.

Is there any chance this project will get fixed and be operational again?

cavenel commented 8 years ago

Unfortunately there as been some major changes in ev3dev since this was programmed. I will not have time to fix the problem in the near future but any help on that would be welcome! The code is using python functions (rotate_forever, rotate_time, rotate_position, goto_position) that are now way easier to implement. So changing these functions should not be too complicated.

I am sorry you spent so much time on this and will make clear on the project page that the code is for an old version of ev3dev.

akhayyat commented 8 years ago

Would it be possible to link to an earlier ev3dev release with which this code will work as is?

dwalton76 commented 8 years ago

I noticed the same thing earlier this week. I forked it and will send a pull request once I am finished (hopefully later this week). My fork is https://github.com/dwalton76/ev3dev_examples

dwalton76 commented 8 years ago

@cavenel where can I find the twophase.py that is referenced in the code? I have all of the basics working, am working now on improving the color detection.

dwalton76 commented 8 years ago

I'm guessing it is this: https://github.com/unixpickle/Rubiks/tree/master/solver/kociemba

cavenel commented 8 years ago

Wow nice I will merge your fork asap thank you!! :) For twophase.py on the computer (in case you don't want just basic solver on ev3 but two phase on the computer with less moves) it is not the one from unixpickle but a personal python code launching a binary twophase (under linux) with the correct options. Both files are here: https://www.dropbox.com/s/dblms3bs2ivc70i/twophase.tar.gz?dl=1 If any problem with those, please open a new issue.

cavenel commented 8 years ago

About the color detection, my cube was with different color than most cubes. So the color detection may not be the best for other colors. But it was a very interesting problem and I spent quite a lot of nights on it ;) I am really curious to see your improvements!

dwalton76 commented 8 years ago

ok pull request sent. Probably the bigggest change is with resolving colors:

In my last ~20 scans I've only hit one color detection error so so far so good.

dwalton76 commented 8 years ago

@cavenel you should be able to close this ticket. Any objections to me taking the code here and adding it to a MINDCUB3R directory in https://github.com/rhempel/ev3dev-lang-python/tree/develop/demo

It would be nice to get the big demos all in one place