Closed chaNcharge closed 6 years ago
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.
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
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.
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:
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
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 https://github.com/dwalton76/rubiks-color-resolver/issues/2 to have rubiks-color-resolver always return a valid 3x3x3 cube so that kociemba won't barf in the first place.
Well using the original program and rgb block doesn't return dark values, but for now, it's probably just very particular about lighting
fixed
@chaNcharge if you re-install rubiks-color-resolver it will pick up the fix for https://github.com/dwalton76/rubiks-color-resolver/issues/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.
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:
This doesn't happen when I connect the brick to my computer and run it remotely using ssh.