Go to Post Maybe it just seemed like five hours...I had freshmen in my vehicle! - Qbot2640 [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 13-02-2010, 18:47
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
ZomB: a C# Drag and Drop Dashboard

Team 451 would like to share our ZomB Dashboard (Yes, you read that right, zombie) that we have been working on, and get some feedback. We have used this successfully for a few response testing, like ultrasonic (it looks good on a graph)

Pre-build controls: AnalogMeter, DataGraph(inspired by taskmanager), DirectionMeter, DistanceMeter, SpikeControl, RoundSpeedMeter, TacoMeter(Yes, it even has cheese), MessageDisplay, VarValue, OnOffControl, ColorFind(Totally misleading name, still testing)

There are 2 parts, the dashboard, and the robot files.
Requirements: Visual Studio 2008, .Net 2.0
Note: we use C++, but you can do this in java and LabView also, look at the bottom of this post for the format

The robot side files are ZDashboard.h and cpp, copy them into your project and add at the top of the main file #include "ZDashboard.h"
in your code, create a ZDashboard object , and initialize it.
Code:
class RobotDemo:public SimpleRobot
{
   //...
   ZDashboard ZomB;
public:
   RobotDemo():
      /* ... */ ZomB()
   {
      //...
   }
//...
Whenever you want to send some data to the dashboard, use the Add function, and then Send it off with the Send function
Code:
//...
void OperatorControl()
{
   while(IsOperatorControl())
   {
      ZomB.Add("controlName","controlValue");
      ZomB.Add("grph2",stick.GetY());
      ZomB.Send();
      Wait(0.02);
   }
}
//...
Now, Launch Visual Studio 2008 (express edition also works), and Open the Dashboard Solution, and open Form1 of the DefaultDash Project. Click on the control you want to have update, in our test case, the graph. Find the BindToInput and change it to what you specified in the code. Run both the Dashboard and the Robot and have fun!

Some notes:
THIS IS BETA!!! I am still working on bugs, the least tested feature is the VarValue control and the var and AddDebugVariable functions. please report any bugs
the .Net controls features are in the .Cat group. most have Max, Min, and Value.
DataGraphs cannot have a Min less that 0
Taco is pure fun
To see what each control does, open the test project (run it), click on a control, and move the slider at the top (EDIT: direction and analog meter barely move). onoff and spike are click state change, the thing in the lower right corner is a drag and drop sample, not related
to create a new Dashboard, make a new project, Reference System451.Communications.Dashboard.dll (in dash/System451.Communication.Dashboard/bin/Release folder), build the project. the controls will appear at the top of the toolbox, they are drag and drop. add 1 dashboardDataHub control. in the constructor (or a start button) add this code
Code:
dashboardDataHub1.AddDashboardControl(YourControls);
dashboardDataHub1.AddDashboardControl(AnotherControl);
dashboardDataHub1.StartRecieving();
It is Ready!

the Format of the strings, which can be Printf'd from the Dashboard class is
@@@451:|controlname=value|name=value|:451@@@
Attached Thumbnails
Click image for larger version

Name:	ZomB.png
Views:	384
Size:	91.4 KB
ID:	8650  
Attached Files
File Type: zip ZDashboard.zip (3.84 MB, 154 views)
__________________
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

Last edited by byteit101 : 13-02-2010 at 18:51.
  #2   Spotlight this post!  
Unread 14-02-2010, 13:34
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,086
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: ZomB: a C# Drag and Drop Dashboard

Looks shiny. I wrote some old-school looking analog meter controls for C# a few years ago, you might find it useful to use with your dashboard.

http://www.virtualroadside.com/blog/...for-c-and-net/
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #3   Spotlight this post!  
Unread 05-03-2010, 20:34
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: ZomB: a C# Drag and Drop Dashboard

I added a camera feed to this today, complements of the dashboard here: http://www.chiefdelphi.com/forums/sh...ad.php?t=82422 . It still uses .net 2, so no need to update!
I have some bug fixes that I will post tommorow (some not on this computer), so for now, here is the CS files, and the dll
Attached Files
File Type: zip CameraView.zip (264.1 KB, 59 views)
__________________
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
  #4   Spotlight this post!  
Unread 06-03-2010, 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: ZomB: a C# Drag and Drop Dashboard

Here's the latest version, I would create a new project that references the dll, and add stuff like my original post explains, as the DefaultDash is a bit of a mess.

Changes from initial release:
Fixed multithreading bugs
Added CameraView
Added CSV DataSaver
Attached Files
File Type: zip System451.Communication.Dashboard.zip (4.71 MB, 64 views)
__________________
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 07-03-2010, 19:38
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: ZomB: a C# Drag and Drop Dashboard

Can I use this with Java?
  #6   Spotlight this post!  
Unread 08-03-2010, 15:50
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: ZomB: a C# Drag and Drop Dashboard

EDIT: Java port posted at post #8

yes, I have not had a chance to port the robot side code (ZDashboard.cpp) yet, but it uses WPILib (and therefore also works with WPILibJ).

(functions may be slightly different for java, I am not a java expert (yet))
Instead of making a ZDashboard object, make a Dashboard object from Driverstation.GetInstance().GetHighPriorityDashboa rdPacker()
then, at the beginning of your code, create a string, and (either immediatly or when the value has been calculated) then assign it a string in the format of @@@451:|controlname=value|name=value|:451@@@
when you have built the string, use the dashboard object to Printf it

example:
Code:
string prints = "@@@451:|";
//code to calculate outputSpeed
prints+="out="+outputSpeed+"|";//name=value pipes (| above enter key on most keyboards, use shift) seperate values
yourDashboardObject.Printf(prints+":451@@@);//this fuction might be different for java

I will try to make a Java version of ZDashboard by this Friday. If you have any other questions, please ask
__________________
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

Last edited by byteit101 : 08-03-2010 at 16:42.
  #7   Spotlight this post!  
Unread 08-03-2010, 16:12
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: ZomB: a C# Drag and Drop Dashboard

minor bug fix: mono compatible (not tested, but MoMA say's looks good)
Attached Files
File Type: zip System451.Communication.Dashboard.zip (4.95 MB, 71 views)
__________________
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
  #8   Spotlight this post!  
Unread 08-03-2010, 16:41
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: ZomB: a C# Drag and Drop Dashboard

Got a Java port, just add the attached ZDashboard.java to your project.
Code:
import edu.wpi.first.wpilibj.SimpleRobot;
import org.thecatattack.System451.Communication.ZDashboard;
public class RobotTemplate extends SimpleRobot {

    ZDashboard ZomB = new ZDashboard();

    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
        while (isAutonomous()) {
            ZomB.Add("controlname", "value");
            ZomB.Add("dataGraph", 0.6);
            ZomB.Send();
        }
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
    }
}
Attached Files
File Type: zip ZDashboard.zip (591 Bytes, 51 views)
__________________
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
  #9   Spotlight this post!  
Unread 08-03-2010, 18:07
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: ZomB: a C# Drag and Drop Dashboard

Thanks! it will work for our purposes
  #10   Spotlight this post!  
Unread 08-03-2010, 18:29
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: ZomB: a C# Drag and Drop Dashboard

It wOnt compile, it says th dashboard packer is bad and so is the send function

edit:

The java library wont compile, it says getDashBoardPacker and send are bad calls

Last edited by Robototes2412 : 08-03-2010 at 18:31.
  #11   Spotlight this post!  
Unread 08-03-2010, 19:38
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: ZomB: a C# Drag and Drop Dashboard

Quote:
Originally Posted by Robototes2412 View Post
It wOnt compile, it says th dashboard packer is bad and so is the send function

edit:

The java library wont compile, it says getDashBoardPacker and send are bad calls
oops! I didn't update WPILibJ!
Here it is fixed
Attached Files
File Type: zip ZDashboard.zip (595 Bytes, 51 views)
__________________
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
  #12   Spotlight this post!  
Unread 08-03-2010, 19:43
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: ZomB: a C# Drag and Drop Dashboard

It says that the string is too long
  #13   Spotlight this post!  
Unread 08-03-2010, 20:46
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: ZomB: a C# Drag and Drop Dashboard

Quote:
Originally Posted by Robototes2412 View Post
It says that the string is too long
you only have a little more than 900 bytes, and if you have variable names that are to long and/or lots of variables, you will get this. does it work with 1 or 2 variables that have short names?


IMPORTANT UPDATE! - V0.3

This fixes a few bugs that were fixed with the Camera update, and lost with the mono fix (and adds the fixes to a few other new controls)
This also fixes the default Dashboard.
Adds configurable IP address for the camera, so you can actually see YOUR camera!
added some camera target options - send widthxheigth+x,y to target (ZomB.Add("Target","400x300+5,5")
added Restart to camera
Added virtuald's AnalogMeter (VirtualdAnalogMeter)

I will probably have some more detailed documentation and how-to's out by Friday

Features that are coming:
Soon:
TCP instead of dashboard, but fallback available
virtuald's oscilliscope

Before week 6:
message splitting
a few more controls

eventually:
re-write of data hub for many params
better designer support
VS-less design mode (like slavik262's dashboard)
Attached Files
File Type: zip ZomB v0.3.zip (4.29 MB, 91 views)
__________________
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

Last edited by byteit101 : 08-03-2010 at 20:49. Reason: forgot attachment!
  #14   Spotlight this post!  
Unread 08-03-2010, 22:18
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: ZomB: a C# Drag and Drop Dashboard

i just tried to send a motor value to the dashboard.
  #15   Spotlight this post!  
Unread 09-03-2010, 06:36
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: ZomB: a C# Drag and Drop Dashboard

Quote:
Originally Posted by Robototes2412 View Post
i just tried to send a motor value to the dashboard.
and?

also make sure you are not sending every loop, you don't want to overload the dashboard (50Hz)

assuming you are running ZB on a different laptop, go to the driverstation setup tab, click on remote dashboard and enter the other laptop's IP
__________________
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

Last edited by byteit101 : 09-03-2010 at 06:40.
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
Drag and drop (labview) kamocat NI LabVIEW 7 28-10-2008 08:05
Labview Dashboard and updated IFI dashboard spec Joe Ross LabView and Data Acquisition 1 04-04-2006 02:04
White Paper Discuss: 2003 Drag-Drop Scoring Program (Flash, HTML version) *UPDATE* Suneet Extra Discussion 0 12-01-2006 16:50
Visual Basic - Drag and Drop Gope Programming 11 06-01-2003 09:42
Sensing current and/or voltage drop??? archiver 2001 3 23-06-2002 23:21


All times are GMT -5. The time now is 21: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