Vision Tracking Demonstration for Teams

Hi teams.

We wanted to do a demonstration video for the vision tracking project we created in Labview. Please check out the demo video below and leave your comments.


Link to Vision Tracking Demonstration

Will you be posting your code?

please post ur code

Indeed me two


We have code like that written but we haven’t been able to test it
first time in a while programming is waiting on someone else
testing should commence tomorrow.
If we get it working I might post code,
or just talk you through it, that’s probably easier

Is there any Team have code for C++

From experience, tracking with servos is awesome. The next step, translating the servo position to the robot’s position gets a bit more complicated. Then add in both the servos and the robot moving at once and you really start complicating things.

We have made it work, but it takes a good understanding of how the robot and camera work together to get it right.

How are you planning on handling the situation where a robot parks right in your line of site?

Also, where do you plug in your servos?
we can track but the gimbal won’t move
well, it buzzes and occasionally twitches.

Motherofgod.jpg - Dude you’ve got to post at least a tutorial please! :smiley:

Very slick! Are you using an 8-slot or a 4-slot CRio?

Hi fellow FIRST members.

Thanks so much for the comments. The team is continuing to work on our test robot. The code involves multiple loops, variables, case structures, wiring diagrams, etc. Almost everything is dependent on something else on this robot as well as the robot we are constructing for Rebound Rumble. For this reason, we will not be posting the code to this robot, however things might change.

Please stay tuned to our posts.

If you haven’t already seen our robot demonstration, please check it out here.

Thanks! :slight_smile:

There is a “simple” way though. Just use the servo position as your “sensor” for a pid loop ther turns your robot/turret. The servo follows the image tracking results and the robot follows the servo. We did this in 2006.
The advantage is the servos can react very quickly. Nice job by the way!

You are correct in that it is simple to use the servos as the signal input to the robot control system. The difficulty comes while calibrating two motion control systems to work together. Remember that they will be working against each other. Robot motion will cause the camera to move, and vise verse. Calibration is key and for good calibration you will need to understand how each motion control system relates to the other.
It looks like you are well on your way to achieving that.

Hey everyone,
I havent noticed all the feedback weve had on this thread so far. Thanks so much!

If everyone is interested you can find our complete source code on

Search for “Team 871” and click on project hosting. Im not posting the link here because I dont want the thread to be removed for “Spamming like behavior” Our code is two portions, the driver station which does all the hard work, and the robot code which just listens for particles over the network and does the servo PID and Robot drive PID.

Our design is HEAVILY based on the white paper posted on the NI first subsection.

I hope everyone enjoys!

Please continue your comments and questions for us!
We would be happy to respond.

Thanks once again.

Quick Question, how are you sending data back to the robot? Do you have access to the driver station code (the lower part of the screen)? I thought we could only modify the data dashboard (the top part of the screen), which can only receive data from the robot, can’t send back anything?


You are free to open data sockets on the open ports from the dashboard.

Ports 1130 and 1160 are available for the Dashboard to transmit data TO the robot (1130) and receive data FROM the robot (1160).

We just open a socket on 1130 and xmit the sorted list of targets on that port. The robot code just listens on that port.

So in summary, you don’t need to mess with the DS code, and more to the point, that’s against the rules :slight_smile: