Python Vision Tracking

Here is a sample of what my team has done this season in terms of vision processing. All the code is available at

Any questions you have I will try to answer.

Very nice! I love pythons readability and it seems like a great idea to implement vision targeting in python. I assume you didn’t program your whole robot in Python (or did you?).

Also: method Point.getTurple() – Shouldn’t it be getTuple?

Yeah they did the robot in Java. I am working on Network Tables right now. Any ideas for that so I don’t have to write my own? And yes, Ignore my spelling :stuck_out_tongue:

Use the c++ versions of networktables on non robot side. Use SIP with python. Now you have network tables in Python. Look in the Python forum on here. It tells you how.

It is the same concept of using python wrapper around opencv as you did.

I really appreciate an example in Python. A lot of people seem to think using multiple languages will be a problem, but the readability of your example might make them reconsider :slight_smile:

I like it! My only complaint is that your use of accessor methods is very un-pythonic.

My team is doing something similar, and we ended up using a library called “py4j” to use the java network tables client provided by FIRST.

What are you using as a computer? And also, what is the frisbee tracking for?

I’m another mentor for 3574, I posted our Python NT2 client here:

Unfortunately we can’t use the SIP wrapped libraries as this is running on an ARM platform (Odroid U2).

Thanks. I am VERY new to Python. I realized that it is “un-pythonic” after I was finished. The main reason for doing so though was the sider’s take an update method to call when changed, hence the setter methods.

As my mentor said we are using an ODROID-U2.

I got SIP to build.

Nice, We also use python for image processing (Team 3211 from Israel).
Why are you not using UDP or TCP to transfer the data? It is very simple with python, and very simple to get the data in Java / LV…

But not in c++. (On the robot)