You need to use
VisionThread. The code to do this would look something like this:
Code:
UsbCamera camera = CameraServer.getInstance().startAutomaticCapture(...);
VisionThread vthread = new VisionThread(camera,new GeneratedGripPipeline(), new VisionListener());
vthread.start();
Of course, the VisionListener can be replaced by a Lambda if that is your style. If you already have a VisionRunner object set up, it would simply be
Code:
VisionThread vthread = new VisionThread(visionrunner);
vthread.start();