Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   GRIP Full of Errors (http://www.chiefdelphi.com/forums/showthread.php?t=154017)

Cybercats2872 21-01-2017 11:28

GRIP Full of Errors
 
I exported my GRIP stuff into a Java file (I'm not even sure I did it right, it only exports a .java so I copy pasted the text in that file into a class in Eclipse)

The code is riddled with errors, I'm the only programmer on my team and I'm struggling to understand what the issue is.

It's the standard GRIP code, I have an HSV Threshold, a mask, and a blob finder. In the Java code, lots of objects like VisionPipeline, Mat, and MatOfKeyPoint (and many more) are being flagged as nonexistent. What could be the issue?

Thanks!!!

SamCarlberg 21-01-2017 12:25

Re: GRIP Full of Errors
 
Sounds like the Eclipse project isn't a WPILib robot project, which explains how it can't find all those libraries

Cybercats2872 21-01-2017 14:05

Re: GRIP Full of Errors
 
It is a WPLib and it recognizes many other objects such as Joysticks, just not anything from GRIP. Any ideas??

SamCarlberg 21-01-2017 16:33

Re: GRIP Full of Errors
 
VisionPipeline is new in WPILib this year. Have you updated the Eclipse plugins?

dmelcer9 21-01-2017 17:15

Re: GRIP Full of Errors
 
Also for some reason we had to to this manually- make sure that opencv and cscore are included libraries. If you go to project properties > Java Build Path > Libraries, then "Add External JARs", select opencv and cscore in ~/wpilib/java/current/lib, that might solve the issue.

RushAHead 21-01-2017 19:17

Re: GRIP Full of Errors
 
We do C++, but it's still in Eclipse.

Did you export your code to Eclipse or copy in the code from a separate file? I had an issue earlier today with an imported file being corrupt and not recognizing anything (also refusing to even consider building), so I copied and pasted into a new project created from a random WPI-provided sample project.

In the new file, make sure your includes follow actual paths. You'll probably have to comment out/ remove the "#include <opencv2/contrib/contrib.hpp" unless you can find the folder. I was unable to, and commenting it out seems to have worked.


All times are GMT -5. The time now is 21:49.

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