Go to Post "Scientists investigate that which already is; Engineers create that which has never been." - Albert Einstein - JamesCH95 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 27-09-2012, 17:52
phynix phynix is offline
Registered User
FRC #3130 (ERRORs)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Minnesota
Posts: 16
phynix is an unknown quantity at this point
Creating a Dashboard

Hello everyone,

This is my second year in FRC, and first year of being one of the main coders (though I have previous C++ experience). Last year, we were using Labview, and it was fairly simple to create a custom dashboard. However, this year, we are thinking of switching to C++, and I have absolutely no idea how to create one. Could you guys help me at all with this?

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 27-09-2012, 19:03
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Creating a Dashboard

QT and bsd sockets are the way to go. Take a look at QT-Creator (qt.digia.com) for building a dashboard on the laptop side. For sending the data I use QT's QTcpSocket on the laptop and the TCPHelper Functions on the robot.

Last edited by agartner01 : 27-09-2012 at 19:31.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-09-2012, 19:54
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Creating a Dashboard

You don't have to program the Dashboard using the same language you program the robot with. If you follow the data format properly in a C++ robot program, you can easily send data to a LabVIEW Dashboard program.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-09-2012, 22:33
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: Creating a Dashboard

No need to create an entirely new dashboard from scratch (unless you want to, that is). Check out ZomB and SmartDashboard, both of which are fairly mature, have decent documentation, and work pretty well.

It's also completely possible to use the LabView dashboard with Java or C++ if you follow a few steps to make it compatible.
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
Reply With Quote
  #5   Spotlight this post!  
Unread 27-09-2012, 23:46
droswell's Avatar
droswell droswell is offline
Registered User
FRC #2370 (iBots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Rutland, VT
Posts: 72
droswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to beholddroswell is a splendid one to behold
Re: Creating a Dashboard

Yep, we used SmartDashboard this year and it was great. The more people use it, the bigger the community, the more widgets will get added, and the better it will become. I think SmartDashboard is not only the most integrated, but it was really easy to set up and get going. It's part of WPILib now, so my guess is you'll get the best support with this solution.
__________________



Reply With Quote
  #6   Spotlight this post!  
Unread 27-09-2012, 23:49
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 601
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Creating a Dashboard

Quote:
Originally Posted by agartner01 View Post
QT and bsd sockets are the way to go. Take a look at QT-Creator (qt.digia.com) for building a dashboard on the laptop side. For sending the data I use QT's QTcpSocket on the laptop and the TCPHelper Functions on the robot.
I disagree. There's no need to get into the nitty-gritty of socket programming. SmartDashboard should suffice.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #7   Spotlight this post!  
Unread 28-09-2012, 00:27
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Creating a Dashboard

Quote:
Originally Posted by connor.worley View Post
I disagree. There's no need to get into the nitty-gritty of socket programming. SmartDashboard should suffice.
If you really want a dashboard in c++, then you pretty much have to. When I responded, I thought that was the question that needed answering. If you don't need that then I guess I agree with your disagreement.

My team used Network Tables last season, and personally, I found them inefficient and inaccurate (which was probably more because of the bandwith problems rather than poor design), half of the time the data never was recieved... Hopefully Network Tables 2.0 will be better (the FirstForge page makes them sound so).

On the note of Qt, sockets, and c++: I actually got a system to send and recieve data values to the robot up and running in about an hour (with pretty much zero knowledge of socket programming). The TCPHelper functions really make it easy on the robot side... On the laptop side it's pretty much just socket.connectToHost(), then socket.write(), or socket.read() (without error checking, of course).

TL;DR: You can probably get by using NetworkTables, but don't be afraid of sockets...
Reply With Quote
  #8   Spotlight this post!  
Unread 29-09-2012, 23:43
phynix phynix is offline
Registered User
FRC #3130 (ERRORs)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2012
Location: Minnesota
Posts: 16
phynix is an unknown quantity at this point
Re: Creating a Dashboard

Thanks to everyone! I would prefer to go with the option that has the least amount of work involved, and produces acceptable results--so I think we might just use LabView. Thanks Alan/Rapture for suggesting that--I wasn't sure if they were compatible with each other. I don't have much experience building a dashboard (Though I would assume it's all pre-packaged in the 'Build Dashboard Project' option in LabView; I'm sure it won't be too hard to extend the ready-made code). Are there any finer points to deal with connecting to such a dashboard in C++? And would I just use the functions provided in the Dashboard class? The Dashboard.AddType() functions (in Dashboard.h)? I guess Labview will have similar options for reading, and writing back.

However, what functions would I use for listening to the Dashboard from the CRio?

Once again, thanks!
Reply With Quote
  #9   Spotlight this post!  
Unread 01-10-2012, 11:55
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,576
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: Creating a Dashboard

Quote:
Originally Posted by phynix View Post
Thanks to everyone! I would prefer to go with the option that has the least amount of work involved, and produces acceptable results--so I think we might just use LabView. Thanks Alan/Rapture for suggesting that--I wasn't sure if they were compatible with each other. I don't have much experience building a dashboard (Though I would assume it's all pre-packaged in the 'Build Dashboard Project' option in LabView; I'm sure it won't be too hard to extend the ready-made code). Are there any finer points to deal with connecting to such a dashboard in C++? And would I just use the functions provided in the Dashboard class? The Dashboard.AddType() functions (in Dashboard.h)? I guess Labview will have similar options for reading, and writing back.

However, what functions would I use for listening to the Dashboard from the CRio?

Once again, thanks!
There's no built-in FIRST-specific method to communicate from a LabVIEW dashboard to the robot, unlike from the robot to the dashboard. You can do it through UDP or TCP sockets.

If two way communication is important, I would suggest starting with the SmartDashboard, which supports two way communication natively. I think that managing the datatype using the Dashboard class to communicate with the LabVIEW dashboard is a pain, but that isn't necessary with SmartDashboard.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-10-2012, 07:52
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,752
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: Creating a Dashboard

While I won't discourage you from learning the lower level packing functions that are provided for sending stuff to the dashboard, a beta quality set of VIs that implement the SmartDashboard protocol were released last year.

The 2.0 version should make it far easier to mix and match languages and to allow for two-way communications. So perhaps you want to wait until more of that is available.

Greg McKaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 02-02-2013, 17:37
eipi10 eipi10 is offline
Registered User
FRC #1165
 
Join Date: Feb 2013
Location: United States
Posts: 3
eipi10 is an unknown quantity at this point
Re: Creating a Dashboard

That first link describing how to use the Labview dashboard with C++ seems to have been deleted. Is this still possible to do?
Reply With Quote
  #12   Spotlight this post!  
Unread 02-02-2013, 23:27
nightpool's Avatar
nightpool nightpool is offline
robotRectifier
AKA: Evan
no team (formerly of CORE 2062)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Waukesha, WI
Posts: 81
nightpool is on a distinguished road
Re: Creating a Dashboard

Probably, but the SmartDashboard has been more then sufficient for any task I've had for it. Unless your concerned about aesthetics, I don't see any reason to not use the SmartDashboard.
__________________
Proud alum of CORE 2062.
www.core2062.com
Reply With Quote
  #13   Spotlight this post!  
Unread 03-02-2013, 18:10
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,752
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: Creating a Dashboard

It is still possible to do. Communicating to the LV or Java SmartDashboard from C++ is identical. Simply write to a SmartDashboard variable.

Building the dashboard visuals is different and both tools have a variety of ways to accomplish it.

Greg McKaskle
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 03:33.

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