Go to Post "The devil" isn't in the details... The devil is having a loud house party with lots of other devils and demons in the details. And laughing, and laughing... - pfreivald [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 21-01-2005, 16:58
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Dashboard for .NET

I have an untested dashboard application that allows you to create your own views of the dashboard data and dynamically load them into a GUI. The application loads a set of controls that inherit from a shared base class into tabs on a form. The host application does all of the serial IO and packet decoding so you only need to worry about processing the packets as they come it.

The current version has five sample views, including one that displays the information from the CMUCam data struct. Currently it shows the centroid and the bounding box only. In order to view the data within the dashboard application you will need to use the user_bytes to pass back the information as follows:

Code:
User_Byte1 = cam.x;
User_Byte2 = cam.y;
User_Byte3 = cam.x1;
User_Byte4 = cam.y1;
User_Byte5 = cam.x2;
User_Byte6 = cam.y2;
If you would like to give it a shot you can download the program HERE. Once I know its all working correctly I'll post instructions for creating your own views.

If you really want to hack at it, all you do is create a new user control that inherits from Team116.Dashboard.UI.DashboardView found in DashboardTypeLib.dll. There are four virtual methods defined in that class that you can override, one to process each of the four data packet types. Your new control is then compiled into an assembly and copied to the folder with dashboard.exe. Edit DashboardTabs.xml to add a reference to your new control and you're all set.

The CommBase.dll assembly is from a sample in MSDN Magazine, Ref: "Serial Comm: Use P/Invoke to Develop a .NET Base Class Library for Serial Device Communications" John Hind, MSDN Magazine, Oct 2002. V1.3 February 2004.

Last edited by seanwitte : 22-01-2005 at 09:46.
  #2   Spotlight this post!  
Unread 29-01-2005, 03:50
Unsung FIRST Hero
miketwalker miketwalker is offline
Robot Lifeguard
FRC #1902 (Exploding Bacon)
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Orlando, FL
Posts: 878
miketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond reputemiketwalker has a reputation beyond repute
Send a message via AIM to miketwalker
Re: Dashboard for .NET

Very nicely done. Congrats.
  #3   Spotlight this post!  
Unread 01-02-2005, 09:00
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Dashboard for .NET

The previous release worked fine. I tested it originally with the mini-rc but I was able to try it with a 2005 controller pair over the weekend.

You can download the viewer here: http://members.cox.net/seanwitte/dashboardviewer.zip.

Assembly containing a field map control: http://members.cox.net/seanwitte/FieldModel.dll

The Field control has three items of interest:

1) The property RobotImagePath can be set to a custom graphic representing your robot. This is the full windows path to the file. It should be 44x33 pixels for scale. The pixel in the upper left-hand corner will be used as the transparent color. Set this property when you initialize the container.

2) Method DrawRobot(int x, int y, int heading) draws the robot on the field. The heading is in degrees and the origin is the lower left-hand edge.

3) Method ClearField() clears the field image.

I haven't released the source, but it is not needed to create your own views. The word document in the zip file walks you through the process of creating a new Windows Control Library, setting up a view control, and adding the new view to the dashboard viewer application.

Each of the tabs in the application is loaded with a separate control at runtime. You just create a control, override some callback methods to display the dashboard data, and you're all set. I includes a control to show the centroid and bounding box output from the CMUCam, a simple LED, and a sliding bar control.

If it works out for you, please let me know. I would rate the skills required to be intermediate. At least you can find a use for the copy of VS.NET in the KOP.

I forgot to mention that the views included are just samples. You can remove them by commenting them out in the XML config file using <!-- --> tags around the <tab></tab> element you want to remove. Or you can delete them. If you muck up the file, delete it and restart the exe. It will create a fresh copy with the defaults.

Last edited by seanwitte : 01-02-2005 at 12:40. Reason: Added link to field control
  #4   Spotlight this post!  
Unread 03-02-2005, 20:47
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: Dashboard for .NET

This is great! You need .NET for the code to actually execute, or at least I did,

Also, I was able to make a usb-serial work by changing the com settings in
the device driver to 19200 baud the standard rate for the dashboard interface. Also, if your laptop has a strange com port (i.e. com8), you should manually edit the .xml file with comm settings (it will generate when the .exe runs)

~Andrew Lynch
  #5   Spotlight this post!  
Unread 08-02-2005, 08:53
Crazy_Ed's Avatar
Crazy_Ed Crazy_Ed is offline
Amature Progammer
AKA: Ed Orsi
#0710 (PAW)
Team Role: Programmer
 
Join Date: Mar 2004
Location: Ft. Lauderdale, Florida
Posts: 12
Crazy_Ed has a little shameless behaviour in the past
Send a message via AIM to Crazy_Ed
Re: Dashboard for .NET

Really helpful tool, I have the same problem with a wacky usb com port.
__________________
I came, I programmed, I tore my hair out.
  #6   Spotlight this post!  
Unread 10-02-2005, 10:19
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Dashboard for .NET

I've received a few questions about extending this application, so I added a sample project. The msi installer is available here:

http://members.cox.net/seanwitte/das...ewersample.msi

The installation folder will include the latest version of everything, plus a subfolder with a VB.NET project containing the source for the tab labeled "Custom View". You sould be able to edit the content of CustomView.vb (a user control inheriting from Team116.Dashboard.UI.DashboardView) to suit your needs. Run dashboard.exe in the installation folder to start the application.

I don't use VB.NET, but it seems like the default namespace always matches the assembly name. So a class named foo in an assembly named bar would be bar.foo. The Custom View includes a field map showing the robot's location and the control showing the CMU camera tracking data.

You can change the image of the robot by setting RobotImagePath property on the Field class in CustomView.vb. The scale is roughly 1.1 pixel per inch and the pixel in the upper left-hand corner will be used as the transparent color.

Send me an email at sean.witte@cox.net if you're using this and want to be notified when an update is ready. I will be finishing it up this weekend.

Screen shot of the sample view showing the CMUCam data and field map:

Last edited by seanwitte : 10-02-2005 at 13:32.
  #7   Spotlight this post!  
Unread 11-02-2005, 00:11
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: Dashboard for .NET

Again, wow, I think every team should consider using such a powerful application for debugging and autonomous period (to actually know what your robot was sensing). That also means gyro, accelerometer, encoders and potentiometers must be fed through userbytes or maybe through some other dashboard data byte.

The next thing that seems possible for FIRST is to have real time touch screen (of the playing field) control for the operator instead of a joystick!! Seems strange but think about the precision!

this is fantastic!

~ Andrew Lynch
  #8   Spotlight this post!  
Unread 11-02-2005, 01:19
russell's Avatar
russell russell is offline
Registered User
#1430 (WRONG)
Team Role: Electrical
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Anchorage AK
Posts: 402
russell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to all
Re: Dashboard for .NET

I am pretty sure a touchscreen would be illegal. There is some sort of rule against using processors on the OI end of the link. It doesnt really make much sense to me, but there are a lot of things like that. Awesome program. I will be trying it on our robot tomorrow, assuming I have time.
  #9   Spotlight this post!  
Unread 16-02-2005, 10:09
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Dashboard for .NET

I uploaded the completed package in the Whitepapers -> Programming -> Dashboard section. It includes sample C# and VB.NET projects you can use as a starting point for creating your own views. It also explains how the custom controls in the package are used and a simple example illustrating how to squeeze more information out of the feedback data set.
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
Battery Voltages in Dashboard Ian W. Programming 10 07-03-2004 16:50
Weird Output from Dashboard Port Ian W. Programming 9 06-03-2004 21:33
New dashboard packet spec Ameya Programming 2 08-01-2004 19:59
Dashboard Decoder Release Version 1.0 Now Available! archiver 2000 1 23-06-2002 22:50
New Innovation FIRST control system and the dashboard archiver 2000 0 23-06-2002 22:15


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

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