You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MINDCUB3R: ValueError: 'ERROR:' is not in list #349
Whenever I run rubiks.py through the brick's interface, it scans like normal, however, after it finishes scanning, it returns this error and stops:
2017-09-06 02:06:28,294 rubiks.py INFO: Action (kociemba): ERROR: parity error U' L B2 L' U L D F2 D' B2 D L2 U L2 F2 D'
2017-09-06 02:06:28,324 rubiks.py INFO: Move 0/19: ERROR:3 (a 'ERROR:')
2017-09-06 02:06:28,339 rubiks.py INFO: move() face_down ERROR:
2017-09-06 02:06:28,361 rubiks.py ERROR: 'ERROR:' is not in list
Traceback (most recent call last):
File "./rubiks.py", line 581, in <module>
rub.resolve()
File "./rubiks.py", line 522, in resolve
self.run_kociemba_actions(actions)
File "./rubiks.py", line 505, in run_kociemba_actions
self.move(face_down)
File "./rubiks.py", line 468, in move
position = self.state.index(face_down)
ValueError: 'ERROR:' is not in list
2017-09-06 02:06:28,434 rubiks.py INFO: Shutting down
This doesn't happen when I connect the brick to my computer and run it remotely using ssh.
Hmmm, my guess is rubikscolorresolver is getting the colors wrong and is producing an invalid cube that the kociemba solver then barfs on. Can you add the /tmp/rubiks-color-resolver.html file to the ticket here? That will have the RGB values (per the color sensor) for each square and what we think the final color is for each square.
When I played with mindcub3r, I found it depends a lot on the cube coloring. On my old cube the sensor had difficulty distinguishing between orange and yellow for example.
oh wow those colors are really dark, I don't know that I could pick out the reds vs. oranges there. Can you put a lamp nearby and see if that helps?
I can fix a couple of things though:
MINDCUBER shouldn't barf if kociemba returns a string with "ERROR" in it. It is trying to execute a cube rotate called "ERROR" where normaly rotations are things like "U", "U", "D", etc
rubikscolorresolver may not be able to get the colors all correct when they are that dark but it should be able to at least return a "valid" cube that kociemba can solve
I wonder if the color sensor normally returns dark values? The web page for debugging is something I added to rubikscolorresolver after I took my MINDCUBER apart so I don't have a point of comparison. If you put a lamp right over the top of mindcuber do the colors from the color sensor still look so dark?
Having a lot of light will help a lot. If you are using a webcam you have to worry about too much light and glare but with the color sensor the more light you can put on it the better (in my experience).
Pull request posted to have rubiks.py exit cleanly when kociemba returns an ERROR. Also opened dwalton76/rubiks-color-resolver#2 to have rubiks-color-resolver always return a valid 3x3x3 cube so that kociemba won't barf in the first place.
Activity
dwalton76 commentedon Sep 6, 2017
Hmmm, my guess is rubikscolorresolver is getting the colors wrong and is producing an invalid cube that the kociemba solver then barfs on. Can you add the
/tmp/rubiks-color-resolver.htmlfile to the ticket here? That will have the RGB values (per the color sensor) for each square and what we think the final color is for each square.chaNcharge commentedon Sep 6, 2017
Here's the html file, I looked at it myself, and it does seem to be an invalid cube. Which is strange, but I guess it really depends on the lighting?
https://drive.google.com/file/d/0B3ZoX-8LP704SkRPSUNrN2hMOVU/view?usp=sharing
chaNcharge commentedon Sep 6, 2017
I did some more testing, the interface isn't the issue, it's just that the scanning is a little bit unreliable, very particular about lighting.
ddemidov commentedon Sep 6, 2017
When I played with mindcub3r, I found it depends a lot on the cube coloring. On my old cube the sensor had difficulty distinguishing between orange and yellow for example.
dwalton76 commentedon Sep 6, 2017
oh wow those colors are really dark, I don't know that I could pick out the reds vs. oranges there. Can you put a lamp nearby and see if that helps?
I can fix a couple of things though:
chaNcharge commentedon Sep 7, 2017
I put the cube in a much brighter location, and it successfully solved the cube. I guess it really depends on lighting? Still looks kinda dark though, I'll try different locations.
https://drive.google.com/open?id=0B3ZoX-8LP704X1hmM3AzRExTakE
dwalton76 commentedon Sep 7, 2017
I wonder if the color sensor normally returns dark values? The web page for debugging is something I added to rubikscolorresolver after I took my MINDCUBER apart so I don't have a point of comparison. If you put a lamp right over the top of mindcuber do the colors from the color sensor still look so dark?
Having a lot of light will help a lot. If you are using a webcam you have to worry about too much light and glare but with the color sensor the more light you can put on it the better (in my experience).
dwalton76 commentedon Sep 7, 2017
Pull request posted to have rubiks.py exit cleanly when kociemba returns an ERROR. Also opened dwalton76/rubiks-color-resolver#2 to have rubiks-color-resolver always return a valid 3x3x3 cube so that kociemba won't barf in the first place.
chaNcharge commentedon Sep 7, 2017
Well using the original program and rgb block doesn't return dark values, but for now, it's probably just very particular about lighting
dwalton76 commentedon Sep 7, 2017
fixed
dwalton76 commentedon Sep 8, 2017
@chaNcharge if you re-install rubiks-color-resolver it will pick up the fix for dwalton76/rubiks-color-resolver#2
With that I am able to get the colors correct for the cube you sent the other day, the one that caused kociemba to barf.