View Single Post
  #2   Spotlight this post!  
Unread 19-02-2013, 23:59
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: Pure Python NetworkTables 2 client

Quote:
Originally Posted by sparkytwd View Post
For this year, I've been working with Team 3574 on doing vision processing on an embedded ARM board (Odroid U2). As part of that work I implemented a NetworkTables client in Python.

There is some roughness to it, it's not pythonic, it has no support for array types (couldn't create those in either Python or Java), has some weirdness about reading your writes (sometimes you won't, sometimes you will, you could read invalid data), and makes liberal use of sleeps to make sure events happen in sequence rather than explicit checking.

If that hasn't scared you off, the nice things about it are; its dead simple with a single constructor that takes your team number, and just 2 methods, getValue, setValue. Types are enforced through exceptions (so be careful in non test code).

If you use this only to read values, or be the only client updating another value, it should work just fine.

https://github.com/Team3574/2013Visi...c/nt_client.py

WOW ... I hope this works. I am using the ODRIOD-U2 as well. Need it for vision. I tried to SIP the c++ network tables per instruction I could not get it to work. I posted in that thread as to why. Thanks for this. Though I do want to get SIP working. If you find any bugs please update! I will let you know if I make any improvements or fix any problems.
Reply With Quote