Go to Post Remember that though we come from different backgrounds and x, y, z, we are all on each other's side. We want people to love STEM, and think FIRST is a great tool to fulfill that desire. - PayneTrain [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 Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 05-01-2015, 01:07
ejb1123 ejb1123 is offline
Registered User
AKA: E.J. Bevenour
FRC #5404 (Gearaffes)
Team Role: Leadership
 
Join Date: Nov 2014
Rookie Year: 2008
Location: U.S.
Posts: 7
ejb1123 is an unknown quantity at this point
C++ dashboard

In the driver station for the FRC 2015. There is a option for C++ dashboard. I have read that the c++ was for wind river devkit, but with the transition to eclipse for c++ I don't know how I would make a dashboard in C++. How would this be done?
It might be useful for client side(DS Computer) image analysis with openCV instead of compiling it to run on the roborio.

Last edited by ejb1123 : 05-01-2015 at 09:48.
  #2   Spotlight this post!  
Unread 05-01-2015, 09:51
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: C++ dashboard

For C++ and Java, we support easy sending of data to the SmartDashboard via NetworkTables. You can find information about how use the SmartDashboard here: http://wpilib.screenstepslive.com/s/...-robot-program. Note that while many of the examples are in Java, the same functions are available in the SmartDashboard class in C++. So where Java has
Code:
SmartDashboard.putString("name", "value");
C++ would have
Code:
SmartDashboard:: PutString("name", "value");

Last edited by fsilberberg : 05-01-2015 at 09:52. Reason: Put code blocks around the code sections
  #3   Spotlight this post!  
Unread 05-01-2015, 10:29
Pratik Kunapuli's Avatar
Pratik Kunapuli Pratik Kunapuli is offline
Probably browning-out on Astro-Turf
FRC #1648 (G3 Robotics)(EWCP)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Atlanta, GA
Posts: 143
Pratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to allPratik Kunapuli is a name known to all
Re: C++ dashboard

Although the code is written in Java, the white paper here: (http://www.chiefdelphi.com/media/papers/2676) is an excellent resource for doing vision processing off-board on the laptop. This code was used by 341 for the past 3 years and it gets the image from the axis camera on robot, and then goes through a series of filters, compressions and other processes and finally displays the image to the Smart Dashboard.
__________________
Official Driving Record: 101-59-0
2012-2015 Student 341 Miss Daisy
2015-Current Mentor 1648 G3 Robotics
  #4   Spotlight this post!  
Unread 05-01-2015, 11:22
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: C++ dashboard

To clarify, the C++ Dashboard option on the Driver Station will launch the SmartDashboard, which you can interact with using the code in Fred's post. This option was there in previous years also. You can read more about SmartDashboard here: https://wpilib.screenstepslive.com/s/4485/m/26401

You can also write your own dashboard in any language you want, and have it launched by the Driver Station by modifying the ini file referenced here: https://wpilib.screenstepslive.com/s...tware#SetupTab
  #5   Spotlight this post!  
Unread 17-01-2015, 13:21
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: C++ dashboard

The link for how to set DS.INI to run the smart dashboard points to an invalid page? What is the syntax in ds.ini to start the smart dashboard?
__________________
Brian K
Team 1225 Robotics Mentor
  #6   Spotlight this post!  
Unread 17-01-2015, 21:46
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,751
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: C++ dashboard

In FRC DS Data Storage.ini, change the line
DashboardCmdLine = ""C:\\Program Files (x86)\\FRC Dashboard\\Dashboard.exe""

to point to another file built in C++. The doubled characters are so that the ini file will treat them like a path that contains spaces.

Greg McKaskle
  #7   Spotlight this post!  
Unread 17-01-2015, 22:59
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: C++ dashboard

Should this work to start the smart dashboard automatically when I select "Default Dashboard":

DashboardCmdLine=""java -jar C:\\Users\Developer\\wpilib\\tools\\SmartDashboard .jar""

Also even if I set the driver station to "C++ Dashboard", it defaults to "Labview" the next time I run it.
__________________
Brian K
Team 1225 Robotics Mentor
  #8   Spotlight this post!  
Unread 18-01-2015, 07:28
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,751
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: C++ dashboard

The ini setting you show looks like it would work. Please put it into a cmd window, without the duplication of \ and ", and see if it works there. That is pretty much all the DS does with it.

As for the second issue, yeah. The refactoring accidentally turned the Default DB into a Boolean, which turns into a 0 or 1, which means the only two settings that persist the round trip are Default and LV. Sorry bout that. We are, of course, hoping that no update will be needed, but there are a few smaller issues like this that will be fixed if/when there is. I understand that there is a known issues list, but I couldn't find it just now.

Greg McKaskle
  #9   Spotlight this post!  
Unread 18-01-2015, 10:57
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: C++ dashboard

I had one single backslash in there, but still no joy. It just starts the default dashboard. I tried it on two different computers. For now, we will just have to start it manually.
Thanks,
Brian
__________________
Brian K
Team 1225 Robotics Mentor
  #10   Spotlight this post!  
Unread 18-01-2015, 16:50
althebaker43 althebaker43 is offline
Registered User
FRC #2135
 
Join Date: Jan 2015
Location: San Jose
Posts: 3
althebaker43 is an unknown quantity at this point
Re: C++ dashboard

I was able to start the SmartDashboard JAR by specifying the absolute path to the JRE executable, like so:

Code:
DashboardCmdLine = "C:\\Program Files\\Java\\jre1.8.0_25\\bin\\java.exe -jar C:\\Users\\althebaker43\\wpilib\\tools\\SmartDashboard.jar"
  #11   Spotlight this post!  
Unread 18-01-2015, 19:22
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: C++ dashboard

Sorry, didn't work for me. java was already in the PATH. Interestingly, it pointed to c:\ProgramData\Oracle\java\javapath. I didn't know java was there and I had installed it again under "Program Files". I changed my path to that, but still get the default dashboard.
__________________
Brian K
Team 1225 Robotics Mentor
  #12   Spotlight this post!  
Unread 18-01-2015, 21:16
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,751
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: C++ dashboard

If /when the java dashboard selector worked, it would have sent

java -jar C:\Users\UserName\wpilib\tools\SmartDashboard.jar

to the a default shell.

If you cannot get the ini file to work, you can put a Dashboard.exe where the FRC Dashboard is installed. But I don't really see why the CmdLine doesn't work.

Greg McKaskle
  #13   Spotlight this post!  
Unread 18-01-2015, 23:09
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: C++ dashboard

I replaced Dashboard.exe with one of my own that executes

Code:
java -jar C:\Users\developer\wpilib\tools\SmartDashboard.jar
and it works to load the smart dashboard. I saved a copy of the default dashboard of course.

Not sure why the command line didn't work either, but enough fooling around this this for now. if anyone wants a copy of it, let me know.

Thanks for all the suggestions,
Brian
__________________
Brian K
Team 1225 Robotics Mentor
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


All times are GMT -5. The time now is 02:41.

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