Chess Robot - Set Up

In this tutorial we detail how to prepare everything and also share some tips to make the perfect setup.


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/chess-robot-set-up

This seems to be timed perfectly for Netflix’s series "The Queen’s Gambit.


1 Like

Hahaha yes!

My sister started watching it last week and said it is really good, and she isn’t even into chess.

1 Like

Can the AL5D robot arm be substituted for the LSS robotic arm?

Hello @Gunnar86!

You could use the AL5D arm, however, you would have to modify the code because the AL5D arm doesn’t use the LSS smart servos, these communicate using the LSS serial protocol which is what is used in the project and it doesn’t work for regular servos.

Anyway if you are interested in making it work for that arm here I shared some tips that may be useful.

You could also contact Solomon because he seems to have the same interest as you. It would be great to be able to modify the project to work with the AL5D!

Let me know if you have any other questions :grinning:

@geraldinebc15

Thank you for quick response! :grinning: At this point, I am looking into using the existing code and modifying it. I am also interested in replacing the AL5D servos with the smart servos so if you have any additional advice that would be great! I have raspberry 3 starter kit, is that sufficient or would you recommend the raspberry 4 b?

I am also interested in replacing the AL5D servos with the smart servos

Unfortunately, this isn’t possible because the two arms use very different parts (mechanics, electronics and servos) (AL5D uses the SES V1 and the LSS Arm uses the SES V2). However, if you have the AL5D version with the SSC-32 or SSC-32U they have a protocol that overlaps so the code can potentially be adapted (if you don’t make use of the “smart” aspects of the system). For example, instead of using the Degree command (#1D450), you could use the Pulse command (#1P1000) where the number for the pulse corresponds to the angle (moving a servo to 45.0 degrees would be a pulse of 1000us). In case you are interested, you can check both communication protocols here:


http://www.lynxmotion.com/images/data/lynxmotion_ssc-32u_usb_user_guide.pdf (page 24)
However, if you were already planning on investing in the smart servos a good option would be simply getting the 4DoF arm as this would be “plug and play” and you could save a lot of time, but it is up to you

I have raspberry 3 starter kit, is that sufficient or would you recommend the raspberry 4 b?

For sure, you can easily use a RPi 3 instead.

1 Like

Are there any python libraries I can import from the AL5d code?

Not a library per se but there are some sample codes:

Python:


Arduino:

PS: @Solomon123 is also working on modifying the code to work with the AL5D so you may want to reach out to him.


I am having a Math Domain Error after the first manual move

Hello @dancrissco!

Did you set the dimensions in inches? If you did make sure it is possible to reach the desired position with the arm.

For reference these are the dimensions I used:

{“baseradius”: 1.77, “cbFrame”: 0.62, “sqSize”: 1.09, “cbHeight”: 0.79, “pieceHeight”: 1.97}

Thanks for your reply Geraldine.
I had my cbframe as 10 inches.
What is cbframe?
I thought it was one side of chess board. My mistake.
Here are my parameters
{“baseradius”: 2.0, “cbFrame”: 10.0, “sqSize”: 1.25, “cbHeight”: 1.0, “pieceHeight”: 1.5}
Regards
Daniel

cbframe means chessboard frame, so in this case, it would be what is marked in red:

Hi Geraldine. It is working now. I made a few chess moves to check it out. Will now work on it to make the movement smooth and repeatable. Once again thanks for the help.

1 Like

@dancrissco We hope you might be up to providing a video of your progress here! Happy it’s working!

image
The chess robot works well for about three moves and then comes with an invalid move announcement.
This happens after I have moved the chess piece. Kindly advise.
Screen shot of the code area is provided. Is this vision related?

A nice way to find out if this is what is happening is by adding some lines to the code you screenshotted to show the "prevIMG and “curIMG”. However, it is most likely that the picture is being taken when your hand is on the chessboard, please make sure that you wait until the robot is resting in its place, make your move, and press the clock when your hand is not on the way.

Let me know if that works :slight_smile:

Thanks Geraldine. I will try that.
Regards
Daniel

Hi Geraldine, the issue is when the robot picks the Bishop or Knight. It misses or topples adjacent pieces.
This causes the invalid move
The picking of pawns is clean. Wondering if I should play with gripper angle or open close?
I think the key now may be to master the robot pick and place.
Any suggestions?

Thanks for the detailed tutorial. Must try someday.

1 Like