Not a StalkBot! (2024)
Not a StalkBot! (2024)
Did not!, Does not!, Will not!
Functions:
Scan: Search in it's vicinity for any humans, rotates right every 4 seconds to check if there are any humans.
If humans are found: Goes towards them
Additional Functionalities:
Finds how far a human really is using computer vision with just the 2D frame data.
Know the x coordinate of where the human is relative to the frame. Y coordinate can be found too, but is irrelevant for the use case since there is no pitch axis movement.
Limitations:
Motor rotate commands ~ left or right based on position of humans in the frame works but yet to be fine-tuned to be very accurate. Possible solutions could be PID tuning.
Step by step process on how to make this work:
Use a basic YOLO model whose class is a human.
Use the bounding box data to estimate the x, y and z distance of the object
Make the raspberry Pi work, install OS, Python, OpenCV, numpy if not there, PiCamera2, motor modules
OpenCV's vanilla code for video capture won't work because to get the video array of frames from PiCamera, you need to use PiCamera's camera_array function, correct the memory shape and feed it to the OpenCV model. Not doing this otherwise could cause problems like not getting the frames at all or inconsistent memory shapes.
Parallel processing of object detection function and wait function(4 seconds) has to be done to still perform the object detection during the waiting phase. Whenever not waiting is a very short duration, a minuscule amount of frames will be collected which is not a good (quantity of data / net time) to perform any function.
Specifications:
Raspberry Pi - 4B - 2GB RAM Variant
PiCamera 2
2 Motors
A body
Motor Driver - L298 Driver
Battery Array and Battery Units
Micro SD Card - 16GB Preferable
Use Cases:
Implement this in a cart to make it autonomous for heavy lifting that cannot just be simply pushed.
Contributors:
Sukanth
Rithvik
Sivaranjini
Demonstration ~v1, 21 April 2024:
Forward motion has been slowed down purposefully ~ Hardware constraints
Software works perfectly
Phase1:
Until 00:19, attempts to go straight because it detected a person in the frame
Phase2:
Then it attempts the scanning phase, turns right and checks for humans.
Watch it in 2x for better experience.