I want to make a robot that uses The Arduino IDE controlled by an esp32 that uses a KY-033 tracking module, that a person presses a button on the controller with an esp32 there will be a button that will be a button that tells the controller to start tracking your position to create a virtual path that the robot will follow and once you are done making the path you press the same button to save the path and you have another button to press to start having robot start following the path. How would I do this?
1 Answer
KY-033 it is not somekind of sensor that able to detect human and perceive the depth of enviroment. It just a normal line detecting sensor work based on reflection of infrared. You need to look about it more to understand what it actually does. If you wanna make what you want to create, you need at least a camera preferably stereo camera. If using stereo camera, you can detect human being using some simple machine learning algorithm and compare the position of human on both side of camera to get the position in 3 dimensional space. And then you can start make your robot.
How to implement following path robot :
- Recording Stage
So when u press record button, robot would start to detect human on each side of camera and measure the position of it respect to the robot. You can set the time between position record (sampling time) maybe 0.2s-1s. System then would store the position in array. And after the button stop pressed, it stop recording the position.
- Following virtual path stage
This stage pretty simple, just set the goal position from array storing position and make robot follow it. If it reach the 1st point then go to next until it finished. And when it reach final position it simply stop
That is the approach you could use.
Additional note :
To detect object using camera, u need to use mini computer such Raspberry Pi. Then you communicate with arduino to control it. Read more about object detection and computer-microcontroler communication.
To make your project easier, instead of human you maybe detect marker. For example AprilTag. Read more : AprilTag
-
$\begingroup$ Ok great thank you but could you tell me a base to work off of? $\endgroup$ Jul 23, 2021 at 22:56
-
$\begingroup$ @LevitateGamer I just gave more explanation on my answer.. you can take a look $\endgroup$ Jul 24, 2021 at 5:13