Go to Post I swear, at IRI, Gary and I only talked about coming up with a plan to do away with Billfred, we didn't actually do anything... yet... - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 09-01-2015, 16:13
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-01-2015, 15:20
weaversam8 weaversam8 is offline
Team Captain
AKA: Sam Weaver
FRC #4534 (Wired Wizards)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Wilmington, North Carolina
Posts: 137
weaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to behold
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.
__________________
ORB Haow!

Reply With Quote
  #3   Spotlight this post!  
Unread 12-01-2015, 19:21
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
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++);
}
error given
Code:
/usr/local/frc/JRE/bin/java: symbol lookup error: /var/volatile/tmp/libwpilibJavaJNI3257654380311841301.so: undefined symbol: imaqGetParticleInfo
but with the native libraries it seems like its missing the getparticleinfo class with the java wrapper.

Last edited by Fauge7 : 12-01-2015 at 19:23.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2015, 02:37
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 265
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Vision system help

Quote:
Originally Posted by Fauge7 View Post
Code:
/usr/local/frc/JRE/bin/java: symbol lookup error: /var/volatile/tmp/libwpilibJavaJNI3257654380311841301.so: undefined symbol: imaqGetParticleInfo
but with the native libraries it seems like its missing the getparticleinfo class with the java wrapper.
The java wrapper incorrectly provided that function as the wrappers were generated from the header file instead of looking at what symbols are actually in the library. Unfortunately, the nivision library does not implement imaqGetParticleInfo, so you'll need to use a different function (e.g. imaqMeasureParticle).

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.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2015, 15:49
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Vision system help

Is there an estimated release date
Reply With Quote
  #6   Spotlight this post!  
Unread 15-01-2015, 19:34
nickmcski nickmcski is offline
Registered User
AKA: Nicholas McCurry
FRC #1482 (Grandin Ghosts)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 112
nickmcski has a spectacular aura aboutnickmcski has a spectacular aura aboutnickmcski has a spectacular aura about
Quote:
Originally Posted by Fauge7 View Post
Is there an estimated release date

You can download an early release from the Jenkins build website for the allwpilib repository http://frcjenkins.wpi.edu/job/allwpilib/
Reply With Quote
  #7   Spotlight this post!  
Unread 16-01-2015, 00:45
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 148
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: Vision system help

Quote:
Originally Posted by nickmcski View Post
You can download an early release from the Jenkins build website for the allwpilib repository http://frcjenkins.wpi.edu/job/allwpilib/
That's not going to solve the issue yet, the relevant fixes are currently in code review. I don't want to give you a hard date, but we are hoping for this weekend at the latest.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-02-2016, 16:14
ScottRhine ScottRhine is offline
Registered User
FRC #3840
 
Join Date: Feb 2016
Location: Isanti, MN
Posts: 2
ScottRhine is an unknown quantity at this point
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?
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 12:37.

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