Implementation Page

This page details the implementation of the Sockrates project.

Implementation

Sawyer Robot in Action

Diagram of Software. (On Hover) Conceptual Diagram.

Our project can be broken down into 3 main components in terms of software written. We have our first file, folding_actuation.py that performs the folding functionality of our project. This is done by specifying certain joint configurations for the Sawyer to move to which then actuates the robot to perform the fold. Then, we have our second file, sock_image_process.py that performs the color detection of the sock (either pink or green) in this case. This code uses an HSV mask to determine the amount of green versus pink in the image. It does this by viewing the image processed through the external USB cam and applying the HSV mask and based on if there is more green or pink, returns the color of the sock. Then our final file, find_ar_tag.py, based on the output of sock_image_process.py uses inverse kinematics to find the specific AR marker (AR 0 for green and 1 for pink) and place the folded sock neatly on the AR tag. We save this trajectory the first time we find a green or pink sock and continuously re-execute this trajectory when we find another pink or green sock. This way even when the AR tag is obstructed by the first sock, Sawyer still is able to stack subsequent socks.

In totality, the above steps are executed in sequence to perform the sorting for a single sock. This process can be repeated an arbitrary number of times to accommodate a user’s sock folding needs (we arbitrarily have set the loop value to 10). The execution of these processes is orchestrated by the master_script.py for ease of running the entire sock folding pipeline from one central location.

Additional Hardware

We built a cardboard box with prongs made out of paper clips and tape to elevate the socks, making it easier for Sawyer to pick up the sock.

CAD Model of Our Custom Elevated Platform

Testing Videos

Below are several videos from us testing the three tasks of actuation, sensing, and planning.

Actuation: Folding the Sock

Sensing: Color Detection

Planning: Using IK to Place Sock on Appropriate AR Tag