This project, named ROBVIS, was a school project aimed at establishing a connection between the ABB YuMi robot and a depth camera. It involves capturing images, processing them to extract information, and sending this data to RobotStudio for robot control.
To use our program, follow these steps:
- Capture images of the shapes for template matching using the rec_temp.py program.
- Run the template_match.py program to obtain the necessary variables for the robot.
- Use the socket.py program to send the variables to RobotStudio.
The project can be broken down into several key stages:
- Image Acquisition
- Image Processing
- Communication with RobotStudio
- Robot Actuation
We mounted an Intel camera above the YuMi robot, allowing us to capture top-down images of the objects.
Once the image is processed, we can first retrieve the centroid
Since the camera plane and the interaction plane (where the objects are placed) are parallel, this establishes a linear relationship between the coordinates of the objects in the camera's coordinate system and the robot's coordinate system.
Coordinate Transformation
The transformation between the source and destination coordinates is defined as follows:
Where :
-
$(x, y, z)$ are the coordinates of the source point, -
$(x', y', z')$ are the coordinates of the transformed point (destination), -
$(a, b, c, d, e, f, g, h, i)$ are the coefficients of the affine transformation, -
$(t_x, t_y, t_z)$ are the translation components in the$x, y$ and$z$ directions, respectively.
In this context, the matrix
is called an affine transformation matrix, where the coefficients of this matrix correspond to the parameters of the affine transformation. This matrix is obtained by performing a linear resolution using four points with known coordinates in both reference frames. We then find the coordinates of the object in the robot's coordinate system.
Next, we calculate the orientation of the object. To do this, we take the coordinates
We then create a matrix
Where:
We extract the eigenvector associated with the largest eigenvalue of matrix
We communicate with RobotStudio via the TCP/IP protocol, transmitting the coordinates
We then use the acquired variables to run the program on the robot's right arm.