OCCRA
Go to Post And we had to walk both ways to the venue from our hotel! Uphill! Barefoot over broken glass! - IMDWalrus [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Events   CD-Media   CD-Spy   FRC-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 01-14-2010, 12:25 PM
ajdecker1022 ajdecker1022 is offline
Registered User
FRC #2879
 
Join Date: Jan 2009
Location: SLP, Minnesota
Posts: 8
ajdecker1022 is an unknown quantity at this point
Driver Interface

Hi, all! Apologies is this has been asked before (I did a search and nothing came up), but I was wondering how/if the camera's input will be displayed during the competition. On the supplied laptop in the Kit of Parts, there is a driver login that goes directly into what appears to be a LabView program.

Is there a Java equivalent to that, and can we modify it?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-14-2010, 01:02 PM
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,318
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme Send a message via Skype™ to whytheheckme
Re: Driver Interface

The supplied laptop's driver interface is THE driver interface, and it works just great with java programs.

However, I'm also curious as to how to pass the camera feed through to the interface. Maybe someone who has experience with this can comment.

Jacob
Reply With Quote
  #3   Spotlight this post!  
Unread 01-14-2010, 05:28 PM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: Driver Interface

There are two programs that start with the driver station. One is the driver station itself. In addition, when it runs, it also starts the dashboard program. The camera images will come out in the large window on the left side of the dashboard when the camera is running.

The camera code in the robot will start the video server by default, but won't send images until the dashboard connects to it. So you don't need to do anything to make it start.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #4   Spotlight this post!  
Unread 01-14-2010, 07:51 PM
ajdecker1022 ajdecker1022 is offline
Registered User
FRC #2879
 
Join Date: Jan 2009
Location: SLP, Minnesota
Posts: 8
ajdecker1022 is an unknown quantity at this point
Re: Driver Interface

Is there anyway the dashboard program could be modified in anyway, say, for a second camera? How would one go about doing that? Thanks for your prompt replies, by the way!
Reply With Quote
  #5   Spotlight this post!  
Unread 01-15-2010, 02:10 AM
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
Re: Driver Interface

Out of curiousity, how would you wire a second camera for one CRio?
Reply With Quote
  #6   Spotlight this post!  
Unread 01-15-2010, 08:34 AM
ajdecker1022 ajdecker1022 is offline
Registered User
FRC #2879
 
Join Date: Jan 2009
Location: SLP, Minnesota
Posts: 8
ajdecker1022 is an unknown quantity at this point
Re: Driver Interface

Honestly, I hadn't even considered that...but I had read elsewhere on the forums people talking of using two cameras. Anyone know about this?
Reply With Quote
  #7   Spotlight this post!  
Unread 01-15-2010, 11:15 AM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: Driver Interface

I believe that connecting another device to the 2nd ethernet port on the cRIO is legal provided that you can come up with a switch that runs off robot power. You should check the rules yourself to be sure.

Given that, I'd expect that the cRIO might have trouble doing image processing from two cameras at the same time depending on what operations your're performing. The problem with doing that is that the AxisCamera class is currently a singleton, meaning that it assumes that there is only a single camera connected.

It might be that this can be changed in an update so that multiple cameras can be supported or it might be something that you can look at.

As for the question of modifying the dashbaord program... the source code is available as a LabVIEW application. You can modify it as needed. You have to be careful to keep the data in sync between the robot and dashboards ends. You can look at both samples to see how this works.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #8   Spotlight this post!  
Unread 01-16-2010, 04:38 PM
James Dempsey James Dempsey is offline
Overtired Programmer
AKA: Rooster Cogburn
FRC #1559 (Devil Tech)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Victor, NY
Posts: 11
James Dempsey is an unknown quantity at this point
Re: Driver Interface

For those of you using NetBeans as an IDE. Create a new project, go to samples, then Java FRC, then pick DashboardExample(possibly slightly out of order). The methods used there will interface with the Dashboard which I believe is LabView based. The basic code supplied there should give you some visual feedback when the driver station is set to tel-op with your analog, digital, io stuff(if I remember correctly). One of the other programmers on my team will be posting that details this code in a tank drive type robot. You can also look at the example code that FIRST provided for dealing with target recognition. It is example code that is used for recognizing Lunacy targets but you should get the general idea of how the AxisCamera is used and how it displays images on the driver station. Hope this helps any and all who are looking for help dealing with the Dashboard. Keep a lookout for a post that has example code that we have prepared for the forums.

-
James D
Reply With Quote
  #9   Spotlight this post!  
Unread 01-16-2010, 06:28 PM
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Driver Interface

sort of out of topic.

we updated our dashboard and now only the lower panel shows up. is this normal or do we have a problem?
Reply With Quote
  #10   Spotlight this post!  
Unread 01-16-2010, 08:42 PM
James Dempsey James Dempsey is offline
Overtired Programmer
AKA: Rooster Cogburn
FRC #1559 (Devil Tech)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Victor, NY
Posts: 11
James Dempsey is an unknown quantity at this point
Re: Driver Interface

That is a problem. If you had this after running code, then you may have a coding error which may end up causing the dashboard to not appear. However, the more likely case is that there was an error during your last install. Did you by any chance use the update installer or did you do an entire install of the WBILib and Dashboard combined?
Reply With Quote
  #11   Spotlight this post!  
Unread 01-16-2010, 09:39 PM
Greg McKaskle Greg McKaskle is offline
Registered User
no team (Team NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 3,977
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: Driver Interface

Just to clarify, the driver station is closed, but can run and communicate to a locally running dashboard that defaults to running on the upper portion of the screen, or communicating to a remote dashboard. These dashboards can indeed be written in any language you like. I'm not sure what templates are out there, but the LV sample code wizard will produce the source for the default dashboard.

To launch a custom dashboard, either name it the same and place it in the same location as the default (Program Files\FRC Dashboard\Dashboard.exe) -- I think that is the location. Another option is to modify the All Users\Documents\FRC DS Data Storage.ini and set the DashboardCmdLine to point to your new EXE.

Greg McKaskle
Reply With Quote
  #12   Spotlight this post!  
Unread 01-16-2010, 09:58 PM
whytheheckme's Avatar
whytheheckme whytheheckme is offline
Registered User
AKA: Jacob Komar
no team
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Providence, RI
Posts: 1,318
whytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond reputewhytheheckme has a reputation beyond repute
Send a message via ICQ to whytheheckme Send a message via AIM to whytheheckme Send a message via MSN to whytheheckme Send a message via Yahoo to whytheheckme Send a message via Skype™ to whytheheckme
Re: Driver Interface

Quote:
Originally Posted by BradAMiller View Post
I believe that connecting another device to the 2nd ethernet port on the cRIO is legal provided that you can come up with a switch that runs off robot power. You should check the rules yourself to be sure.

Given that, I'd expect that the cRIO might have trouble doing image processing from two cameras at the same time depending on what operations your're performing. The problem with doing that is that the AxisCamera class is currently a singleton, meaning that it assumes that there is only a single camera connected.

It might be that this can be changed in an update so that multiple cameras can be supported or it might be something that you can look at.

As for the question of modifying the dashbaord program... the source code is available as a LabVIEW application. You can modify it as needed. You have to be careful to keep the data in sync between the robot and dashboards ends. You can look at both samples to see how this works.
Might it be more viable to simply write code to pass the packets from the camera directly through to the DS/dashboard? Or would this utilized too much bandwidth?
Reply With Quote
  #13   Spotlight this post!  
Unread 01-16-2010, 11:52 PM
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Driver Interface

The cmd line in the ini file was blank. I tried setting it to "C:\Program Files\FRC Dashboard\Dashboard.exe" But it still wont come up OR it may be comming up minimized. the update disables alt-tab so i cannot bring it up

EDIT

Scratch the disabled alt tab it does work its just not launching the software

EDIT

Figured it out . . . gotta double backslash the commands
"C:\\Program Files\\FRC Dashboard\\Dashboard.exe"

Last edited by drakesword : 01-17-2010 at 12:15 AM.
Reply With Quote
  #14   Spotlight this post!  
Unread 01-17-2010, 12:15 AM
James Dempsey James Dempsey is offline
Overtired Programmer
AKA: Rooster Cogburn
FRC #1559 (Devil Tech)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Victor, NY
Posts: 11
James Dempsey is an unknown quantity at this point
Re: Driver Interface

Quote:
Originally Posted by whytheheckme View Post
Might it be more viable to simply write code to pass the packets from the camera directly through to the DS/dashboard? Or would this utilized too much bandwidth?
I haven't calculated it but I would think that passing the data stream directly to the dashboard would be a feasible option that doesn't eat up the bandwidth. However, I may be wrong since the camera feed is a direct stream of jpgs(if I am not mistaken). This may result in a large consumption of bandwidth due to the quantity and quality of the jpgs but I would assume that FIRST designed this to not eat up your bandwidth.

-
James D
Reply With Quote
  #15   Spotlight this post!  
Unread 01-17-2010, 11:58 PM
jhersh jhersh is online now
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 914
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Driver Interface

Quote:
Originally Posted by whytheheckme View Post
Might it be more viable to simply write code to pass the packets from the camera directly through to the DS/dashboard? Or would this utilized too much bandwidth?
This is essentially what the video to dashboard server on the cRIO does. The JPEGs from the camera are not recompressed... they are simply forwarded on.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2010 Driver Station Netbook Driver Account and Java joshholat FRC Control System 2 01-10-2010 03:04 PM
Serial Driver and 2K6 Encoder Driver Not compatible Tom Bottiglieri Programming 6 02-12-2006 01:11 AM
Operator interface/Driver Control board sgsdragons Robot Showcase 4 03-07-2005 08:58 AM
Driver interface Wayne Doenges Control System 7 02-16-2005 04:38 PM
operator interface tml240 Electrical 5 02-10-2004 05:50 PM


All times are GMT -5. The time now is 12:17 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi