Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Ez Script And The Camera

Has anyone wrote scripts that used info from the camera? I want to combine the movement and colour tracking into the script so the robot can figure out what it wants to follow. Like randomly choose to follow the black cat when it moves and not the white one when she moves. I am going to try and incorporate the ping sensor not for avoidance but to follow the cat at a distance.

I am trying to create more complex stuff other than just wonder around and avoid stuff scripts.

Thanks for the help.


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
United Kingdom
#1  

Quote:

Has anyone wrote scripts that used info from the camera?

Yes...

Quote:

I want to combine the movement and colour tracking into the script so the robot can figure out what it wants to follow.

It wasn't for that though...:)

First, black and white may not be the best colours to try and track. Bright colours like red, blue, green etc. are better to track. You'll have to play with the custom colour tracking options to see if you can get the colours of the cats in there.

Then you need a script, or manually set, for Motion Tracking

Code:

ControlCommand("Camera", CameraMotionTracking)


When motion is detected you need the script to switch over to custom colour tracking

Code:

IF($CameraIsTracking = 1)
ControlCommand("Camera", CameraMultiColorTracking)
ENDIF
#2  
Dang Rich you are one sharp dude. Thanks so much for the help..
United Kingdom
#3  
It's a start at the very least, you'll probably need to do a bit more than I've posted above though.

If it comes down to it you could always script to follow the detection, the camera control adds a few variables of it's own including the x and y values of whatever it's detected. I've not done a lot with the camera tracking controls yet but I'm pretty sure it's all built in to the control anyway so minimal scripting is needed (but if not, we can do something I am sure).