|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vision system help
I am currently making some code so the robot can recognize if there is a tote in the camera's field of view.
1. When I create a new axis camera object and set the ip address of the camera to 10.30.19.20, which works In my web browser, but gives a timeout error when connecting it to the Robot RIO. Am I using the wrong camera (axis m1013)? Am I supposed to use a Usb camera? 2. How am I supposed to use the particle filter criteria? |
|
#2
|
|||
|
|||
|
Re: Vision system help
The camera will probably not have a static IP address. If it has at all been configured to work with how control system works this year, it's IP address is dynamically allocated using DHCP. You may wish to assign it a static address.
|
|
#3
|
|||
|
|||
|
Re: Vision system help
So it looks like last years part of the library has been outdated or designed for the Crio not the robotRio. I think first wants us to use NIVision.imaq but theres a problem with the native libraries and the lack of documentation.
Code:
NIVision.IMAQdxGrab(Robot.session, Robot.RGBImage, 1);
NIVision.imaqSavePattern(Robot.RGBImage, "imagergb.png");
NIVision.imaqColorThreshold(Robot.GREYImage, Robot.RGBImage, 255, NIVision.ColorMode.HSL, RobotMap.HueRange,RobotMap.SaterationRange,RobotMap.ValueRange);
NIVision.imaqFillHoles(Robot.GREYImage,Robot.GREYImage, 4);
GetParticleInfoResult resault = NIVision.imaqGetParticleInfo(Robot.GREYImage, 4, NIVision.ParticleInfoMode.ALL_INFO);
ParticleReport[] array = resault.array;
SmartDashboard.putNumber("NumberOfParticles", array.length);
for (int i = 0; i < array.length; i++) {
targetFound(array[i], i++);
}
Code:
/usr/local/frc/JRE/bin/java: symbol lookup error: /var/volatile/tmp/libwpilibJavaJNI3257654380311841301.so: undefined symbol: imaqGetParticleInfo Last edited by Fauge7 : 12-01-2015 at 19:23. |
|
#4
|
|||
|
|||
|
Re: Vision system help
Quote:
I've been fixing a lot of bugs recently in the nivision Java wrappers so you'll almost certainly run into bugs using it right now. The next release should be a lot more functional. |
|
#5
|
|||
|
|||
|
Re: Vision system help
Is there an estimated release date
|
|
#6
|
|||
|
|||
|
You can download an early release from the Jenkins build website for the allwpilib repository http://frcjenkins.wpi.edu/job/allwpilib/ |
|
#7
|
|||
|
|||
|
Re: Vision system help
Quote:
|
|
#8
|
|||
|
|||
|
Re: Vision system help
This may sound like a stupid question, but I just spent days trying to get ni-imaq dlls on my windows box so that the example code doesn't crash trying to do a new Image(). They don't seem to come with the FRC update. The jni can't find _imaqCreateImage. NI refused to answer questions on anything but labview. My suspicion is that the example code can *only* run on the roborio.
can anyone confirm? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|