Start and stop headless GRIP using NetworkTables #505

Merged
merged 1 commit into from Feb 16, 2016

Projects

None yet

3 participants

@ThomasJClark
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
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
Contributor

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 from Start and stop GRIP using NetworkTables to Start and stop headless GRIP using NetworkTables Feb 15, 2016
@codecov-io

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
Member

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

@ThomasJClark ThomasJClark Start and stop GRIP using NetworkTables
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);
11db640
@JLLeitschuh JLLeitschuh merged commit f5abbe6 into WPIRoboticsProjects:master Feb 16, 2016

2 of 5 checks passed

codecov/patch 30.00% of diff hit (target 70.00%)
Details
codecov/project 49.78% (-0.50%) compared to c7cbbb7 at 50.28%
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
codacy/pr Good work! A perfect pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ThomasJClark ThomasJClark deleted the ThomasJClark:start-stop-nt branch Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment