Asked — Edited

Traffic Light Detection System

Hello, We're a group of electrical engineering students working on a capstone project using the EZ-Kit. The project is traffic light detection system. The goal of the project is to build a robotic car that recognizes a traffic light and responds to the change of its lights colors, which are red, yellow and green. The robotic car should be able to move with a steady speed, and keep moving while it passes the traffic light as it's green. The robotic car should also decelerate if the traffic light is yellow, until it comes to complete stop when the traffic light turns red at a specific distance away from the traffic light

The logic of the robot is going to be: The robot should start moving with an initial speed X forward toward the traffic light. The traffic light is detected by the camera as soon as it's on sight and keeps tracking it all the time, whatever the color of the traffic is, while the robot is moving toward it. If LIGHT=GRN, the robot keeps moving forward with the same speed X. If LIGHT=YLW, the robot decreases speed to (0.5)X. As LIGHT=YLW and the speed=(0.5)X, and the robot passes the traffic light before LIGHT=RED and loses vision on the traffic, speed goes back to the initial speed X we set before. But if LIGHT=RED before the robot passes the traffic light, the robot keeps moving until it's Y distance away from the traffic light then it stops; speed is set to zero (done using distance). When LIGHT=GRN, the robot moves forward again with the same initial speed X set before.

My question is this: Can we do such a project using ONLY the ARC software and its scripts and functions, WITHOUT using other softwares and languages such as EZ-SDK or C?

Your reply is highly appreciated. We're looking forward to hearing back from you. Thank you,


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

PRO
Synthiam
#1  

You bet!

You can do it in EZ-SDK with C#

... Now, I can create the program for you in a few minutes, but I'd rather have you do it :)

You can do it with ARC also. But you'll have to wait a few days because there is a custom color tracking module in the works. I think we'll be releasing it this weekend.

#2  

Ooooh I would love to here more about the custom color tracking , whats different?

PRO
Synthiam
#3  

You can specify multiple colors that you'd like to have tracked. You can also ask the camera control which colors exist in blobs.

Oh and a few other goodies!

#4  

Hello, As of now, I have everything placed on the robotic car. This includes two continuous servos for the movement of robot placed in the front in which the left wheel is connected to D12 and the right wheel is connected to D13. Also, two stander servos were positioned on the top of the robot to be used as heads for the camera in which Head Vertical is connected to D0 and Head Horizontal is connected D1. Then, the camera was placed on the standard servos. In addition, the ultrasonic sensor was placed in front top side on the robot, which its VCC, Trig and GND are connected to D14, and its Echo to D10. A picture of my robot is attached.

I understand the current features of ARC does not allow me to track multiple colors, but I would like to know at least how I can start the programming part in general, tracking only red. User-inserted image

PRO
Synthiam
#5  

Very cool! You've done a good job in a short time :)

The multiple color tracking is coming... It'll be included in the next major release - so far there have been minor releases. I suspect we're about a week away from it

United Kingdom
#6  

To track for just one colour and, for instance, stop on a red light it should be pretty simple.

Take a look at this script here. It's for face tracking but should show how scripting works with the camera.

And rather than enabling for face tracking, you'll want to enable for colour tracking which I believe is; ControlCommand("Camera", CameraColorTrackingEnable, [red/green/blue])

(change [red/gree/blue] to red)

I wish I had more time to look in to that script but I have to get moving on some work I've been putting off for almost a day now.

#7  

Hello,

I greatly appreciate your replies. The link you sent looks very helpful. However I am a new User, and I do not know exactly how to start programming. What I have done so far is only placing and connecting the components to the ez-board (the picture is in the above discussion). I would really appreciate it if you could tell me the first steps I need to follow to start programming.

Thanks a lot.

PRO
Synthiam
#8  

Ta-da: https://synthiam.com/Community/Questions/3031

enjoy :)