AI bolt recognition using 3D camera in ROS2

This student project was a part of a larger automatic car battery disassembly project in the robotics lab at UiA. The main goal for my project was to take a picture of a car battery, recognise the bolts, and send their position to a robot arm. This was done using Robot Operating System 2 (ROS2).

I first set up a ROS2 environment on the lab PC. Then I connected, configured, and tested a 3D camera. This camera is able to take regular pictures as well as 3D pictures that contain position information. When I got the camera working, I started on training an AI model to be able to recognise these bolts. To do this, I took multiple pictures of the car battery to create a training dataset. Then I trained the AI model to be able to find the bolts that I wanted.

When the camera and bolt finder worked, I started creating some packages in ROS2 using Python. I started with finding the position of the bolt relative to the camera using the 3D information. Then I created a package that relates the position of the camera to the robot arm. Finally, the last package that I made publishes the position of the bolt(s) to the robot arm, and the robot arm can navigate to it.

At the end of the project, it was able to consistently recognise the bolts and send the position of each bolt that it found. Overall, I learned a lot about ROS2, robotics, training AI models, data communication, problem solving and a little about networking.