Skip to content

MINDCUB3R: ValueError: 'ERROR:' is not in list #349

Closed

Description

@chaNcharge
  • ev3dev version: 4.4.68-20-ev3dev-ev3
  • ev3dev-lang-python version: 3.4.2

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.

Activity

  1. dwalton76 commented on Sep 6, 2017

    @dwalton76
    Collaborator

    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.

  2. chaNcharge commented on Sep 6, 2017

    @chaNcharge
    Author

    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

  3. chaNcharge commented on Sep 6, 2017

    @chaNcharge
    Author

    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.

  4. ddemidov commented on Sep 6, 2017

    @ddemidov
    Member

    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.

  5. dwalton76 commented on Sep 6, 2017

    @dwalton76
    Collaborator

    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
  6. chaNcharge commented on Sep 7, 2017

    @chaNcharge
    Author

    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

  7. self-assigned this
    on Sep 7, 2017
  8. dwalton76 commented on Sep 7, 2017

    @dwalton76
    Collaborator

    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).

  9. dwalton76 commented on Sep 7, 2017

    @dwalton76
    Collaborator

    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.

  10. chaNcharge commented on Sep 7, 2017

    @chaNcharge
    Author

    Well using the original program and rgb block doesn't return dark values, but for now, it's probably just very particular about lighting

  11. dwalton76 commented on Sep 7, 2017

    @dwalton76
    Collaborator

    fixed

  12. dwalton76 commented on Sep 8, 2017

    @dwalton76
    Collaborator

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions