Closed Mockapapella closed 2 years ago
If I understand your question correctly, you cannot control the robot's mode via NetworkTables. QDriverStation controls the mode of the robot using the DS protocol, not through NetworkTables. You would need to write your own DS code to do this.
Well that kind of sucks. Just to clarify a few things:
Yes, and yes.
Alright, thank you for the extra context and the help.
I'm trying to start my robot in test mode using pynetworktables on Linux (Ubuntu 20.04) for the purposes of building my own custom dashboard. I've initialized a network table server on my RoboRIO with a basic counter that updates every cycle:
And then I have a
client.py
file that reads theCount
table:As expected, it prints out the current
Count
value from the network table when I start the robot in test mode with the third party driver station QDriverStation. Button presses and other logs with QDriverStation show up in mylogs.txt
file because it's affecting the network tables. I want to emulate this behavior using pynetworktables in myclient.py
file. Looking at the different network tables that are changed when I start the robot in test mode with QDriverStation I see this:Using that information, I'm trying to start the robot in test mode upon client connection. Modified
client.py
:Basically I'm trying to mimic what QDriverStation is doing except with Python. When I run
client.py
with the modifications above, this is what shows up inlogs.txt
:At this point I'm not sure if it's just something small that I've overlooked like a single table value or if it's something else entirely, but I feel like I'm on the right path. Any help would be much appreciated.