Go to Post Go get Al, he probably isn't busy! - Jimmy Nichols [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 04-02-2016, 20:26
alambert14's Avatar
alambert14 alambert14 is offline
Student Programmer
AKA: Abby Lambert
FRC #2035 ("Rockin" Bots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Carmel
Posts: 14
alambert14 is an unknown quantity at this point
VisionException Unknown Error

We have been working on vision code with Java, and we are trying to save an image to the roboRIO. Following what we did last year, we connected to the roboRIO with SFTP (filezilla), and then created a folder in the root directory called "image" and placed a picture called test.jpg.

However, when we try to write the file using

Code:
NIVision.imaqWriteJPEGFile(frame, "/image/test.jpg", 100, colorTable);
frame is our image to be written.

However, when we run the code, we get an error on that line saying: "Unhandled exception: VisionException [com.ni.vision.VisionException: imaqError: -1232673104: Unknown error] at [com.ni.vision.NIVision._imaqWriteJPEGFile(Native Method), com.ni.vision.NIVision.imaqWriteJPEGFile(NIVision. java:25654)" on the line of code mentioned above.

It is hard to figure out what is wrong since it is an "unknown" error; however, we believe it has something to do with the file path. Has anyone seen this error before and/or know how to fix it? Anything helps, thanks!

Last edited by alambert14 : 04-02-2016 at 21:06.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2016, 21:37
rpappa rpappa is offline
Registered User
FRC #0340
 
Join Date: Feb 2016
Location: Rochester
Posts: 9
rpappa is an unknown quantity at this point
Re: VisionException Unknown Error

I ran into a similar issue earlier today when messing around with OpenCV. Make sure that all users have write access to that directory. Try SSH'ing in and running

chmod -R 0777 /image/
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2016, 12:24
alambert14's Avatar
alambert14 alambert14 is offline
Student Programmer
AKA: Abby Lambert
FRC #2035 ("Rockin" Bots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Carmel
Posts: 14
alambert14 is an unknown quantity at this point
Re: VisionException Unknown Error

Would you mind telling me how to do that step by step? We have never had a problem in the pass accessing the roboRIO's file system; I am able to write files using FTP, just not with the NIVision methods. Thanks.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2016, 17:33
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: VisionException Unknown Error

I suspect you are facing a permissions issue on the roboRIO. I believe that the Java robot program will run as the "lvuser" not as the "admin" user.

On the roboRIO, the admin user is similar to the root user and has the ability to write to or modify the entire file system.

Since your program is probably running as the lvuser, I suspect you can only write to the /home/lvuser directory on the roboRIO account (unless you log in as admin and change permissions on your /images directory).

Try opening "ftp://roborio-TEAMNUM-FRC.local/ in your web browser to verify that you see a /home/lvuser directory on the roboRIO. If so, try using "/home/lvuser" as the output directory for your image files instead of "/images". If that works, it is definitely a permissions issue.

You can either then live with using the "/home/lvuser" directory, or use a tool like Putty for Windows (http://www.putty.org/) to ssh into your roboRIO and change the permissions (or ownership) on your /images directory) as indicated in an earlier post.

Code:
chmod 777 /images
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2016, 14:18
alambert14's Avatar
alambert14 alambert14 is offline
Student Programmer
AKA: Abby Lambert
FRC #2035 ("Rockin" Bots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Carmel
Posts: 14
alambert14 is an unknown quantity at this point
Re: VisionException Unknown Error

Yes, that was definitely the problem. I had tried writing to the lvuser folder before, but it still did not work. However, I asked a student who is better versed in Linux than I to help and he changed the permissions (and it worked). Thank you guys so much!
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 10:53.

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