Copyright 2024 - Capnetix, LLC

We need a drivers station....

I wanted to include "teleoperation" in the PiBot.  That meant that I had to setup a driver station.  I needed some type of joystick or gaming console.  So, I found a local Game Stop, and bought a refurbished one for about $15.  This "Rock Candy" job should do the trick. 

I know that at some point, I'm going to need to map at least the axes of the joysticks to drive the left and right motors, so I found an open source Python program, called "Joystick Analyzer" (based on PyGame library), that let me plug the console in the laptop, push buttons, and see what axis or button was being pushed.  From that, I'm sure later, I'll see it someplace in the robot software and do something with it.

My thanks Mike Doty for his contribution of Joystick Analyzer that helped me map this console.



Now that we have a physical console and a map, we need to figure out how to hook this up to the bot.  Scratching my head, I wondered if someone else had the same idea of using Pi based robots in the FRC off-season, and thought, well, let's pull up DuckDuckGo (a competitor to Google search engine, can you believe it?) and search around.

Well, lo and behold FRC team 2733 "The Pigmice" had developed and released

# Pigmice Python DriverStation
This is a project to create a Python-based driver station for our Raspberry Pi minibots. 

Here is the repo I downloaded

With a little setup of the Python environment, it came right up.

Thanks to the Pigmice!  You made our off season a lot more productive!



There was only one problem.  The py_driverstation program came up, but what was it doing?  I scratched my head, and thought about the software/networking architecture used during FRC competition...and knew there was this thing called "NetworkTables".

I had used Publish/Subscribe (pub sub) systems before, and I kind of figured out this was a table based PubSub kind of interprocess communications over the wireless network to the robot program.

I didn't really have any documentation to figure out what that structure was, because I was going to need to pickout the axis values of the two joysticks in order to drive the motors.

Hmmm, I bet someone has built an easy to use, open source NetworkTables analyzer out there.  Handy web search, and Bingo!  There it was:

# NetworkTablesMonitor
A tool for monitoring and debugging NetworkTables traffic on the robot.


This one was a Java app, developed by Team FRC 2706, Merge Robotics hailing from Ottowa, Canada.

The git repo is here.


Thank you Merge Robotics for this useful tool.


But wait.  This isn't working yet.



Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

f t g m