The Chess-bot

Overview

This is a semester-long project as part of the subject MCEN90028 - Robotics Systems, coordinated by Prof Denny Oetomo. The project focuses on the design of a serial manipulator for carrying out tasks. Specifically for this project, the manipulator needs to be able to (#1) pick and drop off a chess piece on the board as requested. Moreover, it also allows user to (#2) freely move to whichever position on the board as he/she wants or along a pre-defined path on the board such as knight's move, bishop's move, etc.

Contributor

  • Hai Dang Nguyen
  • Say Ee See
  • BhargavRam Chilukuri

Source Code

The project mainly focuses on design a serial manipulator to pick and drop a chess piece on the board from scratch with given tool kit. In order to achieve the objectives of the project, we tried to achieve different sub-goals over the course through Assignment 1 to 5.

Tool

Hardware

  • Arduino Mega
  • FE-URT-1 Serial to UART Board
  • FeeTech SCS15 Servo Motors
  • FeeTech SCS009 Servo Motors
  • Power Supply

Software

  • MATLAB
  • Simulink
  • Git
  • Fusion 360
  • Arduino

Design Procedure

cad-model

Workspace Determination

The schematic of the manipulator is shown in the following figure

Before starting to design the chess-bot, we need to make some assumptions regards to the mechanical design of the system:

  1. The "zero" position of the robot arm is as shown in the following schematic
  2. Each joint has only one degree-of-freedom
  3. For this particular application, "elbow up" configuration is chosen
  4. Link d2 and d3 have the same length
schematic of the robot

From the figure, we know that there are 4 main links connecting all the joints of the arm. Hence, it is necessary to determine the range at which each of them will fall into to ensure that the arm can cover its workspace. The workspace of the robot should include every point on the chessboard and the capture pool located on the side (not shown). Rather than considering every point, we only considered the two critical points on the board, the furthest point and the closest point (shown in the figure). With basic geometry, we can easily get the maximum and minimum length for the links. We chose the link length to be at the middle value of the range to compensate for uncertainties in the mechanical fabrication and motor encoders (those motors are cheap 😉).

schematic of the robot

After obtaining the link length, we moved on to determine the joint displacement range at which the motors are going to rotate. From there we looped through each set of values of the four and plot the position of the end-effector in the 2D space (top-view and side-view) at different height (along z axis) using MATLAB. Observing the chessboard (blue color) being fully covered in the black and red shaded region, we know that our dimensions are good for now.

result-workspace

Forward & Inverse Kinematics

We constructed the Denavit-Hartenberg table and obtained the transformation matrix for the end-effector. While, for Inverse Kinematics, we solved for joint displacements Q given a position of the end-effector in the inertial frame. Note that, for Inverse Kinematics, it is important to obtain all possible sets of answer and evaluate them. Using Forward Kinematics we can visualize different configurations of the arm in the 3D space. From there, we make sure that we got the correct expression for 'elbow up' configuration (like Case 2).

Inverse Kinematics result
Inverse Kinematics result

Trajectory Generation

The structure of trajectory generation task will be conducted in sequence. We will derive an algorithm to generate the coefficients of a cubic polynomial that describe the movement of the end-effector with respect to time given \( (x_i, x_f, \dot{x}_i, \dot{x}_f) \) as initial pose, final pose, initial velocity, final velocity respectively. Since the robot arm is in 3D space, there will 3 different sets of coefficients associated with \( x,y,z \) to present poses of the end-effector at a given time. In addition to that, the orientation displacement of the robot arm will also be generated.

Translational Motion

First of all, we will look at the use of polynomials to describe the trajectory of a variable \( x(t) \). Consider a cubic polynomial: \[ x(t) = a_3t^3+a_2t^2+a_1t+a_0 \label{x} \] \[ \dot{x}(t) = 3a_3t^2 + 2a_2t+a_1 \] From here we can use the known variables of initial and final displacement and velocity to solve for the coefficients.

Determine sets of coefficients for multiple segments

The trajectory generation equation presented in the previous part can be applied to describe a linear trajectory in 3D space. However, as the chessboard has multiple chess pieces located on it, the trajectory of the end-effector should be designed such that the picked chess piece will not collide with any of the chess pieces remained on the board. To do so, we will include 2 via points into the trajectory, these via points take the role as checkpoints the end-effector needs to reach during moving towards the final pose. In order to make sure it can clear other pieces in the way, we assign 2 via points, one that is located 100mm upwards in \( z_0 \) axis from the initial pose whereas the other one locates 100mm upwards in \( z_0 \) axis from the final pose.

Therefore, the trajectory will be separated into 3 different segments, each of which have 4 sets of polynomial coefficients to perform the move. In order to implement this in MATLAB, we have combined the 2 via points into an array called 'points' where the initial and final pose will locate at the first and end indices of the array. Then, we will loop through the array and take a pair of poses and treat them as initial and final pose and solve for the 4 sets of polynomial coefficients. Each pair of poses represents each segment in the trajectory, giving \( N \) points, we always have \( (N-1) \) segments, total we will have \( (N-1)*4 \) sets of polynomial coefficients. In addition to that, the amount of time going through each segment of the end-effector is assumed to be proportional to the ratio of the distance of that segment over the overall distance of the trajectory. The reasons behind this is to make sure the acceleration on the end-effector will not go beyond a certain threshold value, which can result in the chesspiece to be dropped off along the trajectory. Having to spend a small amount of time on a long distance will require the motor to provide much more effort to accelerate to a desirable velocity to reach to the final pose in time. Moreover, this is also to minimize the control error in the motor, preventing the chess piece from being dropped off at the incorrect square.

Result
Trajectory generation result
Trajectory generation result

Video Presentation

In the video presentation, we demonstrated 3 moves from the list of 25 assessed moves. Then we demonstrated the task of grapping and moving the end-effector along x, y and diagonal path on the chessboard by only tunning controller parameters of the task-space velocity control. Our first robot arm performed well, even through it is not perfect in mechanical design and programming aspect.

Stay tuned for more
Thanks for reading!

2021 Dang Nguyen