Go to Post Your best friends are all team members and you could never live without any of them because robotics people are the best people. - Riverdance [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2017, 13:41
neilmart neilmart is offline
Registered User
FRC #2130
 
Join Date: Jan 2016
Location: idaho
Posts: 4
neilmart is an unknown quantity at this point
Building a dedicated GRIP Thread

Our team's programmers have been hard at work trying to get GRIP to work since kickoff day, and as far as we can tell, we are one error message away from finally being able to run it in our code. We can upload the code, but when we enable it it gives us a "robots don't quit error." As far as we can can tell, this would be gone if we could figure out how to put the openCV pipeline into a dedicated thread. Anyone who's had and fixed this problem, or knows how, would be greatly appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2017, 16:14
dmelcer9 dmelcer9 is offline
Registered User
AKA: Daniel
FRC #0810 (Mechanical Bulls)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Smithtown
Posts: 51
dmelcer9 is an unknown quantity at this point
Re: Building a dedicated GRIP Thread

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();
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi