Object Following

Hi Guys - I am going to attempt to try play with my H7 camera and I am a hobbyist/builder intermediate level programming and advance for Electronics but I am ready accept the challenge to use me RC tank to drive itself and flow specific color (Red) or even if I can print me own April tag for the camera to lock on . Below will be a couple of goal to accomplish
Lock on a color/ April tag
Move left/right when the color/ April tag move left/right .
Maintain a set distance between color/ April tag by throttling up and down .
Any help will me highly appreciated and if there is a example template out there please point me in the right direction .
I know it will take sometime and lots of research and it

Hi, yes, just try out the AprilTag example. You see see the tag position spit out on the serial terminal. Then you just need to setup the UART on the camera to send the coordinates to something else.

Is there a register of something that can tell me how far(distance) and object is in front of the camera . Thanks

No, cameras don’t actually provide such information. However, if you look at the MavLink example you can guess the AprilTag distance based on the known tag size and how it appears infront of the the camera. That said, the accuracy of this method is only really good when the tag is super close by.

Thank for the response I will put a cheap an ultrasonic distance sensor for now . thanks