Chess Robot does not make a move

I assembled the Robot Arm and set up the Raspberry Pi with a USB camera. In the command prompt on the Raspberry Pi, I was able to install all the listed applications without error, except for “sudo apt-get install libqtgui4” and “sudo apt-get install libqt4-test”. Instead, I installed 1ibqt5gui5 and libqt5test5. When I run the chess program “python Interface.py”, everything appears to be fine, but after I make a move, the robot does not move. In the background command prompt, warnings showing "FindElement should not be used to look up elements window[key]. window find_element are recommended. The robot arm lights are on, but the robot arm does not make a move on it’s turn. Any suggestions?

Hello @SonOfTron and welcome to the RobotShop community!

Did you update the firmware on the servos? Did you calibrate the servos using LSS Config / FlowArm?

Please make sure you set the correct baud rate, all servos should be set to 115200.

Is the board updated in the interface after your move?

1 Like

Hello geraldinebc15,

I did confirm using LSS Config that all 5 servo baud rates are set to 115200.
The robot arm’s lights are all blue and the chess board is updated in the interface after I make the first move and tap the clock.
When I try to update the Firmware using LSS Config, “::ERR :: Firmware update cancelled; Corrupted data in master list”
Also, I am not quite sure I am calibrating the robot arm correctly.
Please advise.

1 Like

Can you try a simple firmware update for ONE of the servos you have to verify it’s working correctly?

Might want to verify that the LSS Config properly detects all servos and shows the correct IDs and baud rates.

1 Like

Hello geraldinebc15,

In the LSS Config software, I am able to verify each individual servo has an ID of 1 through 5 and that the baud rate is correctly set to 115200.
But I am unable to update the firmware via the LSS Config software. When I connect to the servo and click the firmware button, the firmware version dropdown only lists [N/A]. The computer is connected to the internet, but the master list is not being imported in.

Please advise.

1 Like

It seems the update to the new Lynxmotion site may have broken the link between the LSS Config and the file location for the firmware updates
We’re looking into it ASAP and will get back to you as soon as we have news.

2 Likes

Hello cbenson,

Since the LSS Config givew the option for firmware updates from a local drive, is there a way to download the appropriate firmware files onto my computer and update that way?

Please advise.

1 Like

Also, do you know roughly the date when the Lynxmotion site was updated?

1 Like

It was just updated so as you have already written, you should have options in the drop-down now. If you purchased the servos fairly recently, they likely have the latest firmware (feel free to compare what’s already installed versus what’s available).The Lynxmotion corporate site was updated only two weeks ago I think. The option for a local firmware file is there for specific troubleshooting or custom firmware. Is there any issue with going via the LSS Config?

1 Like

Hello cbendon,

Thank you. The LSS Config software now allows me to update the firmware to version 3.7. I have updated the firmware on each servo individually, check to make sure each servo has an ID of 1 through 5, and that each servo baud rate is 115200.

When I run the chess program on the Rasberry Pi, it executes up until after I make my move and it becomes the robot arm’s turn to move. The robot arm servos light up blue, but it still does not move.

I noticed that the README.md instructions located at GitHub - EDGE-tronics/Chess-Robot: Chess playing robot based on LSS 4DoF Robotic Arm & Raspberry Pi, may be outdated. For instance, I do not know if it made a difference that command “sudi apt-get install libqtgui4” does not work. Apparently it is no longer available. I used the substitute command “sudo apt-get install libqr5gui5”.

When I run the chess program using the command “python Interface.py”, it brings up the ChessRobot interface. The only odd thing is that in the background command prompt, I see the message: “Warning FindElement should not be used to look up elements. window[key], window find_element are recommended”.

Still not sure what can be the cause of the robot arm not taking it’s move.

Please advise.
Thanks.

1 Like

The only odd thing is that in the background command prompt, I see the message: “Warning FindElement should not be used to look up elements. window[key], window find_element are recommended”.

As this is a just a warning it is most likely not the problem.

Could you share with us a video of your setup and what the robot does?

Also, what “chessboard parameters” did you use?

For reference:

The base radius should be the measurement between the center of the arm’s base and the chessboard. The chessboard frame should be the measurement of the frame of your chessboard (most likely smaller or similar to the square size). Also, keep in mind that these measurements are in inches.

After you make your move do you get any error/warning messages?

1 Like

I am uploading 8 steps, where the first 7 are pictures and the 8th is a video.

Step 1:

Step 2:


Step 3:

Step 4:

Step 5:

Step 6:

Step 7:


Step 8:

1 Like

Looks like the issue is with the GUI, as you suggested there might be an incompatibility with the new version.

However, libqtgui4 was not a requirement but a library that could help in case you had issues with OpenCV, was this the case?

If you had no issues with OpenCV, could you do a fresh install (in a virtual environment) with just the requirements?

If the error persists please check if stockfish is in the path: “/usr/games/stockfish”
If not change the line 106 in Interface.py to the correct path

If that wasn’t the error please change the following lines in the Interface.py code (line 137)

ac.executeMove(sequence[“seq”], physicalParams, playerColor, homography, cap, selectedCam)
board.push(pcMove.move)
updateBoard(sequence, board)

change the order to:

board.push(pcMove.move)
updateBoard(sequence, board)
ac.executeMove(sequence[“seq”], physicalParams, playerColor, homography, cap, selectedCam)

and let me know what happens

1 Like

HI, I had the same mistake. You may be using a newer version of PySimpleGUI (older than 4.18.2 - which was required), which implies using the window[key] command in the code instead of findElement(). Replacing these commands in the code for the new library is quite time-consuming, it’s easier to use PySimpleGUI of the desired version. Check your installed version of the specified library with the “pip list” command. If the version is not 4.18.2, remove the PySimpleGUI library and install version 4.18.2, the error should go away.
Use a virtual environment for all necessary outdated versions of libraries for this program if it is critical for you.

1 Like

Hello Chepurko,

The good news is that the Warning went away with your suggestion. The bad news is that the robot arm still does not make a move and I now get the following errors:

Please advise.
Thanks.

Try changing the parameters to floats (numbers with decimals)

The tallest piece height should be 3.0

1 Like

Hello geraldinebc15,

I reimaged and started fresh. When I tried to install the -requirements.txt, the Opencv-python had an error. I had to follow the instructions and use “pip install opencv-python” to get it installed.

I updated the chess configuration dimensions to insure that all are in decimal form:

I also rearranged the Interface.py code starting on line 137 as you specified above. The chess interface now shows what move the robot arm is supposed to make, after I move, but the arm does not make the move.


The following error is displayed in the background:

Please advise.
Thanks.

For some reason, your parameters are turning into strings rather than floats.

I modified Interface.py to avoid this error, please update the code and let me know if that works :slight_smile:

Hello geraldinebc15,

Thank you. The robot arm attempts to make a move on its first turn now with the update code. It just slightly misses grabbing the pawn. How do I make the adjustments so that it does not miss? Is it just a case of updating the configuration dimensions in the chess program?

Please advise.

I’m glad it worked :slight_smile:

Yes, you have to be as precise as possible with the dimensions.

Also as your pieces are very different in size you might also need to tweak the code a little bit. In my case, my pieces were fairly similar in size so I didn’t have to change the way the arm grabbed each piece depending on its type.

However, in your case pawns are much smaller by comparison, so you might have to add a feature that adjusts how much the gripper lowers depending on the piece type. If you are not very familiar with programming I’d recommend simply changing your chess pieces. If you are up for the challenge let me know if you need help finding resources :slight_smile:

Regards

2 Likes