Go to Post this is ridiculous, a complete waste of time, and probably not particularly effective. I love it! - The other Gabe [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2009, 13:01
3DWolf's Avatar
3DWolf 3DWolf is offline
Boots - Head Programmer / 3D
AKA: Jake
FRC #1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Chelsea Michigan
Posts: 97
3DWolf is on a distinguished road
Send a message via AIM to 3DWolf Send a message via MSN to 3DWolf
Picture Snapshots

So I have found that you can in fact take pictures with your camera then save them onto the cRIO's solid-state memory, then retrieve them with FTP; but my team mates and I were wondering if you could skip that last step. Is there anyway you could have an interface that would accept a thumb drive (standard USB2.0 connection) on or connected to your cRIO that your code could download the images directly too, kind of like mirroring them over, so you could just unplug the thumb drive after matches and throw it in your laptop for quick viewing, that way you don't have to bother with the FTP.
__________________
You can call it the programming teams fault, but we'll just force your arguments nil.

There are 10 kinds of people in the world -> Those who understand binary and those who don't.

WYSIWYG - In FIRST: Greatness
  #2   Spotlight this post!  
Unread 06-02-2009, 14:42
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Picture Snapshots

Since your cRIO will often connect to a computer in the pits, you can pretty easily automate the ftp to grab files and store them on your PC, mem stick, iPod, or wherever you like. If you want to do this in LV, try googling for free ftp VIs. I was surprised I couldn't find them in the palettes. Of course you can write this script in anything you like that lets you access an ftp server.

Greg McKaskle
  #3   Spotlight this post!  
Unread 09-02-2009, 16:21
3DWolf's Avatar
3DWolf 3DWolf is offline
Boots - Head Programmer / 3D
AKA: Jake
FRC #1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Chelsea Michigan
Posts: 97
3DWolf is on a distinguished road
Send a message via AIM to 3DWolf Send a message via MSN to 3DWolf
Re: Picture Snapshots

OK so I had my buddy write me an autograbber (just for ease, if anyone wants a copy I'll be happy to supply you with it) that you enter in the file names you want as well as the servo info and it will quickly grab all the files in the config file automatically.

My next question is, where can I find the FTP info to actually nab the files from the cRIO? Is there an FTP server setup already on the cRIO or do we have to set one up ourselves?
__________________
You can call it the programming teams fault, but we'll just force your arguments nil.

There are 10 kinds of people in the world -> Those who understand binary and those who don't.

WYSIWYG - In FIRST: Greatness
  #4   Spotlight this post!  
Unread 09-02-2009, 16:27
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Picture Snapshots

Quote:
Originally Posted by 3DWolf View Post
OK so I had my buddy write me an autograbber (just for ease, if anyone wants a copy I'll be happy to supply you with it) that you enter in the file names you want as well as the servo info and it will quickly grab all the files in the config file automatically.

My next question is, where can I find the FTP info to actually nab the files from the cRIO? Is there an FTP server setup already on the cRIO or do we have to set one up ourselves?
ftp://10.15.2.2/
how do you save the images to the cRIO?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #5   Spotlight this post!  
Unread 09-02-2009, 16:30
3DWolf's Avatar
3DWolf 3DWolf is offline
Boots - Head Programmer / 3D
AKA: Jake
FRC #1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Chelsea Michigan
Posts: 97
3DWolf is on a distinguished road
Send a message via AIM to 3DWolf Send a message via MSN to 3DWolf
Re: Picture Snapshots

Quote:
Originally Posted by byteit101 View Post
ftp://10.15.2.2/
how do you save the images to the cRIO?
I'm not sure how someone using LV would do it, but I found some code in I think the DefaultCamera example for WR that had functions to adjust camera settings and to take snapshots.
Here is just the snapshot function, not entirely sure what includes it needs however.
Code:
	/** 
	 * Store an image on the cRIO 
	 * @param imageName stored on home directory of cRIO ( "/" )
	 **/
	void snapshot(char* imageName)	
	{
		/* this will take one picture and save it to a file
		 */
		DPRINTF(LOG_DEBUG, "taking a SNAPSHOT ");
		Image* cameraImage = frcCreateImage(IMAQ_IMAGE_HSL);
		if (!cameraImage) {
			dprintf (LOG_INFO,"frcCreateImage failed - errorcode %i",GetLastVisionError()); 
		}
		Wait(1.0);
		if ( !GetImage (cameraImage,NULL) ) {
			  dprintf (LOG_INFO,"\nCamera Acquisition failed %i", GetLastVisionError());
		} else { 
			  if (!frcWriteImage(cameraImage, imageName) ) { 
					dprintf (LOG_INFO,"frcWriteImage failed - errorcode %i",GetLastVisionError());
			  } else { 
				  	dprintf (LOG_INFO,"\n>>>>> Saved image to %s", imageName);	
					// always dispose of image objects when done
					frcDispose(cameraImage);
			  }
		}
	}
I just tried FTPing to the cRIO with ftp://10.15.2.2/ with FileZilla and I got the following errors
Code:
Status:	Connecting to 10.15.2.2:20...
Status:	Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error:	Could not connect to server
Status:	Waiting to retry...
__________________
You can call it the programming teams fault, but we'll just force your arguments nil.

There are 10 kinds of people in the world -> Those who understand binary and those who don't.

WYSIWYG - In FIRST: Greatness

Last edited by 3DWolf : 09-02-2009 at 16:33.
  #6   Spotlight this post!  
Unread 09-02-2009, 18:01
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Picture Snapshots

try ftp://10.15.02.2/ (assuming your team 1502)
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #7   Spotlight this post!  
Unread 10-02-2009, 15:14
3DWolf's Avatar
3DWolf 3DWolf is offline
Boots - Head Programmer / 3D
AKA: Jake
FRC #1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Chelsea Michigan
Posts: 97
3DWolf is on a distinguished road
Send a message via AIM to 3DWolf Send a message via MSN to 3DWolf
Re: Picture Snapshots

Quote:
Originally Posted by wt200999 View Post
try ftp://10.15.02.2/ (assuming your team 1502)
Is there any extra username/password data I need? I tried connecting with just that FTP IP and it was refusing connection - do I have to use a crossover cable directly from the cRIO to the laptop?
__________________
You can call it the programming teams fault, but we'll just force your arguments nil.

There are 10 kinds of people in the world -> Those who understand binary and those who don't.

WYSIWYG - In FIRST: Greatness
  #8   Spotlight this post!  
Unread 10-02-2009, 20:14
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Picture Snapshots

If you can download code to it you should be able to ftp to it through a web browser (you use ftp to load code on it in the first place)
Just make sure your robot is configured correctly and everything (it should be)
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Picture Software Rob2713g Computer Graphics 18 29-01-2007 18:43
no picture thefreakfrom974 Programming 0 11-02-2005 19:09
Picture Game GregTheGreat Chit-Chat 13 11-12-2003 23:15
Picture Luke H. CD Forum Support 2 08-12-2001 03:33
picture David Kelly Chit-Chat 9 06-09-2001 22:06


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

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