The description of my Tic-Tac-Toe playing robotic arm is now available from my web site at http://www.hessmer.org/robotics/lynxmotion-robotic-arm. It includes a detailed explanation of the formulas used for the inverse kinematics of the arm. The vision system leverages the OpenCV computer vision library through the Emgu CV cross platform .Net wrapper. The complete C# source code for the project is provided. Here is a short video of the robot playing against a human opponent:
This is a great project for kids at school thanks for posting this. I think they will really love working on something like this.
I have just one problem. I can’t get it to work with the Lynxmotion AL5D, a little bigger then the AL5A that you used. The program works as is, but will not pick or place right. If I edit the Robot.Kinematics\robotArm.cs to fit the measurements for the AL5D arm the arm will not move. If i edit the robotconfig file the arm will not move.
Any thoughts on where to start looking for the problem?
Hi Todd,
You write that the program works as is, so I am assuming that the communication between the program and the SSC32 board works. Changing the length parameters in RobotArm.cs is certainly the correct first step to adapt the program to your bigger robot arm. Next I would run the project Robot.Kinematics.UI within the Robot.Kinematics\Robot.Kinematics.sln solution, load your RobotCalibration.cfg, and try to move to various locations.
Do you get any errors / exceptions in your case?
The arm will move some but i get this in the debug window i get
In Load Calibration
Specified angle falls outside the accessible range
Parameter name: angleDeg
Specified angle falls outside the accessible range
Parameter name: angleDeg
Specified angle falls outside the accessible range
Parameter name: angleDeg
Moving to home position.
Program fails at this point.
I think maybe i have messed up making the arm config file. Can you step me through making one?
Yes, this is caused by either wrong values in the arm config file or by asking the robot arm to move to a position that is physically not possible (due to angle contraints).
It is best to first drive the servos directly by specifying their position in milliseconds. For this I created the SSC32Communication.UI project which is part of the solution SSC32Communication\SSC32Communication.sln. It is a simplified version of the servo configuration app that ships with the robot arm. The main difference is that it operates directly on the millisecond values of the servos. Using this application you can move the servos to various positions and then measure the angles. Then you can put the resulting values in the spreadsheet and use linear regression to improve the quality of the measured values (see http://www.hessmer.org/robotics/lynxmotion-robotic-arm/servo-calibration for details). Finally the results for slope and y intercept for each servo can be plugged into the robot arm config file. Yes, this is a tedious process …
Good luck!