Python, Robotics, OpenCV and Vision
By Robert Seward

This talk explores mentoring a FIRST FRC Robotics Team. - FIRST stands for For Inspiration and Recognition of Science and Technology. - FRC = FIRST Robotics Challenge - https://www.firstinspites.org/ Specifically it gives an overview of using Python to teach students how to integrate Computer Vision capabilities into our FRC robot. Along the way we touch on all the juicy technical details.

Sunday 12:45 p.m.–1:15 p.m. in Barbie Tootle

A brief overview of using Python to power the Computer Vision function of our FIRST FRC Robotics Robot.

A FIRST robotics team mentor briefly talks about using Python to teach students how to integrate Computer Vision into our team's robot.

First we meet the robot. Robot baby pictures (yay!) and other fun stuff. Followed by a quick overview of what it means to be a mentor on a FIRST FRC robotics team. We end the section discussing the components of our robot and how they all fit together to integrate vision.

We explore working with the students to build GRIP pipelines. GRIP is an FRC tool to allow students to quickly build opencv feature detection routines for game elements. We discuss what opencv is and why you should care! The GRIP tool is a flexible development environment to quickly chain together opencv primitives and observe the end results. When game element features are being detected as the students need, the tool can export into our favorite language! Python!

Our team in the past has run this generated opencv GRIP Python "pipeline" on an external CPU. Due to our Team's budget constraints we use a Raspberry PI 3 with a USB web cam. (< $150) We mount and power the pi and camera on the robot. We run the "pipeline" and see things. Well almost!

In addition to the student generated pipeline, we also have a small python program that reads images from the camera as often as possible and detects features for the robot to target. This python code does some basic filtering and then sends the information to the robot control board (RoboRIO).

We end the talk with a brief description of using the vision information to control the robot.

Robert Seward

A long time open source and free software fanatic, Robert has programmed his way through C, C++, C# and Java to find python. With over twenty years of industry experience, this self proclaimed expert still finds bugs in his code on a daily basis.

Twitter
Sponsors