Skip to content

Conversation

ThomasJClark
Copy link
Contributor

This lets robot programs start and stop GRIP to save CPU without having
to wait for the process to start up again.

For example,

NetworkTable table = NetworkTable.getTable("GRIP");

table.putBoolean("run", false); // Stop GRIP without killing the process

doSomeStuffThatDoesntNeedVision();

table.putBoolean("run", true); // Start GRIP again

This should be useful for teams that want to do auto alignment in teleop, since they could start and stop vision processing whenever the driver presses the button to auto aim.

Closes #501

@JLLeitschuh
Copy link
Member

If I have grip on a roborio and running via deploy then this will start both pipelines which will create unexpected (and really hard to diagnose) issues.

@ThomasJClark
Copy link
Contributor Author

It'll only start both of them if they're both connected to the same NetworkTables server, which is probably a bad idea anyways

We could maybe make this only work on headless mode. I doubt anyone would need to use it in GUI mode

@ThomasJClark ThomasJClark changed the title Start and stop GRIP using NetworkTables Start and stop headless GRIP using NetworkTables Feb 15, 2016
@ThomasJClark ThomasJClark force-pushed the start-stop-nt branch 2 times, most recently from eb7fba9 to ebfdd64 Compare February 15, 2016 20:36
@codecov-io
Copy link

Current coverage is 49.78%

Merging #505 into master will decrease coverage by -0.50% as of f8f8d26

@@            master    #505   diff @@
======================================
  Files          130     131     +1
  Stmts         3884    3903    +19
  Branches       428     433     +5
  Methods          0       0       
======================================
- Hit           1953    1943    -10
+ Partial        110     108     -2
- Missed        1821    1852    +31

Review entire Coverage Diff as of f8f8d26


Uncovered Suggestions

  1. +0.54% via .../ExceptionAlert.java#83...103
  2. +0.38% via ...cketPreviewView.java#88...102
  3. +0.38% via ...indowController.java#219...233
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@JLLeitschuh
Copy link
Member

This needs to work with the new --headless parameter.

@ThomasJClark ThomasJClark force-pushed the start-stop-nt branch 2 times, most recently from 373039b to e399372 Compare February 16, 2016 22:59
This lets robot programs start and stop GRIP to save CPU without having
to wait for the process to start up again.

For example,

    NetworkTable table = NetworkTable.getTable("GRIP");

    // Stop GRIP without killing the process
    table.putBoolean("run", false);

    doSomeStuffThatDoesntNeedVision();

    // Start GRIP again
    table.putBoolean("run", true);
JLLeitschuh added a commit that referenced this pull request Feb 16, 2016
Start and stop headless GRIP using NetworkTables
@JLLeitschuh JLLeitschuh merged commit f5abbe6 into WPIRoboticsProjects:master Feb 16, 2016
@ThomasJClark ThomasJClark deleted the start-stop-nt branch February 24, 2016 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants