Repository navigation
Remove kociemba and rubiks_rgb_solver.py from MINDCUB3R demo #272
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,34 @@ | ||
| # MINDCUB3R | ||
|
|
||
| ### Installation | ||
| This can take a minute on an EV3 | ||
| * cd ~/ev3dev-lang-python/demo/MINDCUB3R/kociemba/ckociemba/ | ||
| * sudo apt-get update | ||
| * sudo apt-get install build-essential | ||
| * make | ||
| * sudo make install | ||
|
|
||
| The first time you run this it creates a cache directory, this takes about 30s on an EV3 | ||
|
|
||
| * cd ~/ev3dev-lang-python/demo/MINDCUB3R/ | ||
| * kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD | ||
|
|
||
| This can take several minutes on an EV3 | ||
| ``` | ||
| sudo apt-get install build-essential python3-pip libffi-dev | ||
| sudo pip3 install git+https://github.com/dwalton76/kociemba.git | ||
| sudo pip3 install git+https://github.com/dwalton76/rubiks-color-resolver.git | ||
| kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD | ||
| ``` | ||
|
|
||
| ### Running | ||
| ./rubiks.py | ||
|
|
||
|
|
||
| ### Credit | ||
| Much of rubiks.py and rubiks_rgb_solver.py were ported from | ||
| https://github.com/cavenel/ev3dev_examples | ||
|
|
||
| The kociemba code is from | ||
| https://github.com/muodov/kociemba | ||
| ### About kociemba | ||
| You may have noticed that the | ||
| `kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD` | ||
| step of the install looks a little odd. The "DRLUU..." string is a | ||
| representation of the colors of each of the 54 squares of a 3x3x3 cube. So | ||
| the D at the beginning means that square `#1` is the same color as the middle | ||
| square of the Down side (the bottom), the R means that square `#2` is the same | ||
| color as the middle square of the Right side, etc. The kociemba program takes | ||
| that color data and returns a sequence of moves that can be used to solve the | ||
| cube. | ||
|
|
||
| ``` | ||
| robot@beaglebone[lego-crane-cuber]# kociemba DRLUUBFBRBLURRLRUBLRDDFDLFUFUFFDBRDUBRUFLLFDDBFLUBLRBD | ||
| D2 R' D' F2 B D R2 D2 R' F2 D' F2 U' B2 L2 U2 D R2 U | ||
| robot@beaglebone[lego-crane-cuber]# | ||
| ``` | ||
|
|
||
| Running the kociemba program is part of the install process because the first | ||
| time you run it, it takes about 30 seconds to build a series of tables that | ||
| it caches to the filesystem. After that first run it is nice and fast. | ||
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like gibberish 😆 Is the idea here that you're feeding it a series of motions for testing purposes? If so, can you add a comment (not necessarily a code comment, just a note) with expected output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does look like greek doesn't it :) The string is a representation of the colors of each of the 54 squares of a 3x3x3 cube. So the D at the beginning means that square #1 is the same color as the middle square of the Down side (the bottom), the R means that square #2 is the same color as the middle square of the Right side, etc. The kociemba program takes that color data and returns a sequence of moves that can be used to solve the cube. Just to keep things consistent the syntax for the sequence of moves also looks like greek
I'll add some of this text to the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have that step in the install process because the first time you run it, it takes about 30 seconds because it builds some tables that it caches to the filesystem. After that first run it is nice and fast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep confirmed that the motors spin, etc.