SCARA Colour Sorting with RosPy and OpenCV
The SCARA robot was a fully autonomous robotic arm for grabbing, identifying and sorting coloured cubes on a rotating conveyor. The robot was programmed using RosPy, with the computer vision using OpenCV. Forward kinematics were performed in real time to calculate the position of the arm, and inverse kinematics were used to calculate the joint angles required to reach a given position. The robot would use a servo-actuated gripper to collect the cube, then raise it to a camera mounted at the top and turn it to identify the colour before dropping it in an allocated bin.
The action flow was powered by a simple state machine listening to subscriber and publisher modules, to compute which action to take and to prevent locking up the robot. The robot would use a servo-actuated gripper upon reaching the cube, and would use a colour sensor to identify the colour of the cube.