View Single Post
  #4   Spotlight this post!  
Unread 23-01-2017, 21:23
RileyC3826 RileyC3826 is offline
Registered User
FRC #3826 (Sequim Robotics Federation)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2013
Location: Sequim, Washington
Posts: 9
RileyC3826 is an unknown quantity at this point
Re: Multiple Vision Targets using GRIP

I believe I have found the solution. I ended up modifying the code here:
https://wpilib.screenstepslive.com/s...-robot-program
I duplicated the statement that defines rectangle 'r', changed the second one to 'q', then changed the '0' in 'filterContoursOutput().get(0)' to a '1'. I also changed centerX to two different variables, one for rectangle r and one for rectangle q. My problem now is that sometimes, when running the robot, the values from the contours just suddenly stop, and will not update until I redeploy. I believe that for some reason, the visionThread is being stopped. If I try to use visionThread.start() somewhere in the program (besides robotInit), the program crashes (we suddenly lose robot code and comms in the driverstation). Anyone have an idea how I can resolve this issue?
Reply With Quote