Our design objective is to simulate a robot that can choose the best efficient path to several targets, in this case, trash, and pick it up then go to the trash area autonomously. We decided to use turtlebot as our robot and then upgrade it with motors, IMU, and 3D-printed parts to complete the task.
3D printed scooper and arms
HiLetgo 5pcs ULN2003 28BYJ-48 4-Phase Stepper Motor with 5V Drive Board
Stemedu 5PCS MPU-6050 6DOF Accelerometer Gyro Sensor Module丨GY-521 3-Axis Gyroscope 3-Axis Acceleration
Raspberry Pi 3 Model B+
Turtlebot 3
Logitech web camera
Printed AR-tags
Connection Method
Find the optimal path between target locations
Implement a pick-up motion upon reaching the target
The software will contain four parts:
(1) Optimization of path planning
(2) Target sensing
(3) Turtlebot control
(4) Pick-up mechanism
For optimization path planning, we choose to use Prim's algorithm. For Turtlebot control, we choose to use proportional control. We use the ar_tracker package and AR_tag to build our target sensing program. We decided to build our program based on ROS because it it easier to integrate with each other.
Prim's Algorithm:
Using the distance between each node as the weight and find the minimum span tree of the graph.
Ar_tracker package can help us get the pose information of the Ar_tag.
Then we use the TF library to get the transformation between the ar_tag on the turtlebot and target ar_tags. We are only interested in the translation of each frame and use it to get the target coordinates.
We us proportional control to control our turtlebot.
Linear velocity = linear_constant * Eucliedean distance
Angular velocity = angular_constant * angle diference
(Please refer to the connection method)
Stepper Motors
1. Identify the port/pin numbers in Raspberry Pi and the hardware address of the stepper motor
2. Open & close pins in a sequential manner to turn the motor CW and CCW direction
IMU
1. Create an object called "IMU"
2. Read acceleration data from the object
3. Filter out the data with sensitivity scale factor & weight function*
*What is a weight function?
Give weights to each reading in a way that the most recent reading has the highest rating and the weights exponentially fade away as more readings are collected
Combination
1. Create a condition function to identify the turtlebot's stoppage motion
2. Implement the pick-up motion based on the condition