|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
NI Vision + Java
Is it possible to integrate code and algorithms generated by the NI Vision Assistant tool into the Java SmartDashboard and/or the SFX?
Thanks in advance ![]() |
|
#2
|
||||
|
||||
|
Re: NI Vision + Java
I think that's what our mentor is doing. He's using the sample vision code (NI Vision) and integrating it with the Robot Code. That can work with the SmartDashboard too.
|
|
#3
|
||||
|
||||
|
Re: NI Vision + Java
Any chance of getting a tutorial or something? We know how to process onboard the cRIO, but our mentor and I decided it would be much too CPU intensive, especially considering the problems with the JVM.
|
|
#4
|
||||
|
||||
|
Re: NI Vision + Java
If I'm not wrong, you can load the processing onto the driver station, still using NI Vision, or maybe use something like OpenCV/RoboRealm! I am not the one who wrote the code, so I can only get help the next time the Mentor comes along (Saturdays)
|
|
#5
|
||||
|
||||
|
Re: NI Vision + Java
The NI Vision library for Java is a little bit incomplete. If you want to use java, you can write a plugin for the smart dashboard and use openCV. Search in CD Media for 341's 2012 vision code as a starting place.
If you're open to other methods, you should try labview. They give you vi's that grab images from the camera, and they give you vi's that can communicate with your robot, even if it's programmed in Java. They are also nice enough to give you a piece of default vision code that does a pretty good job of tracking the targets. All you need to do is copy and paste it into a new project and run that on the computer. We used this in 2013, and it worked really well, and took only 2 hours to get working. I agree that vision processing on the robot can be cpu intensive if you're going at 20 fps, but if you get clever with your software, you should only need to process one image to find out where you are (or which goal is hot). Which problems with the JVM are you referring to? For any FRC applications, Java is insignificantly slower than C++. Last edited by Jared : 02-02-2014 at 17:37. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|