Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions demo/MINDCUB3R/README.md
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

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator Author

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

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]# 

I'll add some of this text to the README

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator Author

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.

```

### 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.
2 changes: 0 additions & 2 deletions demo/MINDCUB3R/kociemba/ckociemba/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions demo/MINDCUB3R/kociemba/ckociemba/Makefile

This file was deleted.

Loading