Go to Post Maybe FIRST will just take 148's Tumbleweed and use it as the game piece for next year. - AndyB [more]
Home
Go Back   Chief Delphi > Technical > Programming > WindRiver C++
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-27-2012, 09:52 AM
dkearle's Avatar
dkearle dkearle is offline
Dianne
FRC #1280 (Ragin' C-Biscuits)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: San Ramon, CA
Posts: 14
dkearle is an unknown quantity at this point
Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Hi,

Our team is attempting to tune a PID controller using the SendablePIDController and corresponding widget on the SmartDashboard. We ran into a little problem last night. We successfully displayed the widget on the dashboard. With our robot enabled, we typed in a new P constant on the SmartDashboard and then hit the [ENTER] key, which immediately disabled our robot.

Last year on the driver station the space bar was used to disable the robot. This year it is the [ENTER] key.

Does anyone have a solution on how I can enter data into the SmartDashboard triggering the SmartDashboard to recognize the new data and send it to the robot, without me using the [ENTER] key on the driver station? I don't want to keep inadvertently disabling my robot when I'm trying to see the effect of a new P constant in my PID controller.

Thank you!
Dianne
Reply With Quote
  #2   Spotlight this post!  
Unread 01-27-2012, 11:49 PM
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

<removed>

Last edited by Sunstroke : 01-28-2012 at 12:44 AM.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-28-2012, 08:41 AM
PranavSathy PranavSathy is offline
Team Captain
AKA: Pranav Sathyanarayanan
FRC #0263 (Sachem Aftershock)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Holbrook, New York
Posts: 27
PranavSathy is an unknown quantity at this point
Send a message via Skype™ to PranavSathy
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

I have no personal experience with SmartDashboard, but since last year my team uses the UDP on port 1140 (if I recall right?) to communicate with a custom dashboard we make in C#, and if you check out the Team Update on the 24th of January, I believe the port for Dashboard to Robot communications is UDP 1150, you can, without much effort, create a C# dashboard to communicate with the robot using UDP .

I know my answer is not 100% relevant, but if you do not manage to find your answer than I hope this is of help to you. Good luck!!
__________________
This is MADNESS!

NO...
THIS...
IS....
FIRST ROBOTICS!
Reply With Quote
  #4   Spotlight this post!  
Unread 02-09-2012, 07:53 AM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Since this thread is about SendablePIDController and the original poster seems to have figured it out, can you help us please?

We are using the IterativeRobot instead of the CommandRobot and we are trying to get the SendablePIDController to work on our Smartdashboard so that we can tune our speed encoder on our shooter.

We started yesterday by putting this in our class init:

Code:
SendablePIDController *speedControl;
Then in our constructor we put:

Code:
speedControl = new SendablePIDController(0.0,0.0004,0.0, speedEncoder, shooterMotor1);
This worked fine as a PID controlled system, our shooter is obviously under control, we just want to tune the system real time. How do we get the SendablePID menu to show up on the dashboard? I know it has something to do with PutData() but nothing I try compiles. I have tried this so far in the constructor:

Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",SendablePIDController::GetInstance());
I have never gotten the hang of all the "->" and "::" with C++, I am a visual basic pro hacking C++ so make no assumptions of what I know.

Thanks
__________________
Dayjob: Rocket Scientist
Hobby: 2992 Mentor and website developer
Websites Developed: http://rubiksolve.com ; http://heliorx.com
Reply With Quote
  #5   Spotlight this post!  
Unread 02-09-2012, 02:07 PM
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by dkearle View Post
Hi,

Our team is attempting to tune a PID controller using the SendablePIDController and corresponding widget on the SmartDashboard. We ran into a little problem last night. We successfully displayed the widget on the dashboard. With our robot enabled, we typed in a new P constant on the SmartDashboard and then hit the [ENTER] key, which immediately disabled our robot.

Last year on the driver station the space bar was used to disable the robot. This year it is the [ENTER] key.

Does anyone have a solution on how I can enter data into the SmartDashboard triggering the SmartDashboard to recognize the new data and send it to the robot, without me using the [ENTER] key on the driver station? I don't want to keep inadvertently disabling my robot when I'm trying to see the effect of a new P constant in my PID controller.

Thank you!
Dianne
I entered a bug report for this (http://firstforge.wpi.edu/sf/go/proj...d/tracker.bugs) on the FIRST Forge project site for the Smartdashboard. I was able to get around this problem by running the driver's station on one laptop and the smart dashboard on a second laptop. However, it still didn't really work out for me because there was still something funky going on with the PID tuning. Whenever i tried to set the setpoint for the PID it would go to zero. Not sure if this was a side effect of running in the two laptops configuration.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-09-2012, 02:11 PM
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by sircedric4 View Post

Code:
speedControl = new SendablePIDController(0.0,0.0004,0.0, speedEncoder, shooterMotor1);
Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",SendablePIDController::GetInstance());
It should be:

Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",speedControl);
Reply With Quote
  #7   Spotlight this post!  
Unread 02-09-2012, 02:33 PM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by jwakeman View Post
It should be:

Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",speedControl);
Thank you, that compiled! We'll give it a try tonight or tomorrow night to make sure it works at runtime.
__________________
Dayjob: Rocket Scientist
Hobby: 2992 Mentor and website developer
Websites Developed: http://rubiksolve.com ; http://heliorx.com
Reply With Quote
  #8   Spotlight this post!  
Unread 02-18-2012, 01:29 AM
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 293
otherguy is just really niceotherguy is just really niceotherguy is just really niceotherguy is just really nice
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

bump bump bump

Has anyone found an acceptable workaround for the Enter = disabled bot issue?

We don't want to have to use two laptops at every match... I'm hoping I don't have to dig through the smartdashboard code to make a fix myself. Anyone?
__________________
http://team2168.org
Reply With Quote
  #9   Spotlight this post!  
Unread 02-18-2012, 10:35 AM
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: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Yeah, big problem for me too... A fix would be much appreciated (even if it is quite hackish...)

Last edited by agartner01 : 02-18-2012 at 10:43 AM.
Reply With Quote
  #10   Spotlight this post!  
Unread 02-20-2012, 11:58 AM
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by jwakeman View Post
It should be:

Code:
SmartDashboard::GetInstance()->PutData("SendablePIDController",speedControl);
So you were able to get this to work? Even with the new WPILib we still got a crash at runtime. Don't know what the problem is. I didn't *see* any SmartDashboard initialization or anything we needed to do...
Reply With Quote
  #11   Spotlight this post!  
Unread 02-20-2012, 07:40 PM
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 293
otherguy is just really niceotherguy is just really niceotherguy is just really niceotherguy is just really nice
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

For any teams looking for a solution to the treads original problem, it looks like Team 694 developed a solution in their bug report:
Quote:
At the moment, the only way to commit a change made in a text field of the SmartDashboard back to the robot via the
NetworkTable is by typing in the new value and hitting <Enter>. However, this also happens to be the key binding for
disabling the robot in the 2012 Driver Station, thereby making it inconvenient to use the SmartDashboard's capability
for sending data to the robot.

Our team's solution is to update over the NetworkTable if the Text Box loses focus; in other words, the robot gets the
field's new value after the user inputs data and either clicks outside of the SmartDashboard's Text Box or presses <TAB> .
See their bug report on the SmartDashboard First Forge page for the diff attachment
__________________
http://team2168.org
Reply With Quote
  #12   Spotlight this post!  
Unread 03-15-2012, 01:57 PM
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Alright, I've created an extension which will simulate the enter key being pressed on the SmartDashboard when you push a button.

To use it, download the attached .zip, pull the .jar out of it and put it into "\Program Files\SmartDashboard\Extensions", then run the SmartDashboard.

Select "View/Add.../Enter Key" and there will be a button you can use.
Attached Files
File Type: zip EnterKey.jar.zip (1.7 KB, 72 views)
Reply With Quote
  #13   Spotlight this post!  
Unread 03-15-2012, 09:37 PM
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: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by Sunstroke View Post
Alright, I've created an extension which will simulate the enter key being pressed on the SmartDashboard when you push a button.

To use it, download the attached .zip, pull the .jar out of it and put it into "\Program Files\SmartDashboard\Extensions", then run the SmartDashboard.

Select "View/Add.../Enter Key" and there will be a button you can use.
Oh wow, that's awesome! I thought I was totally out of luck, but I guess not.

Suppose you've tried binding this action to a key? Because that would make it even more awesome.

Last edited by agartner01 : 03-15-2012 at 09:39 PM.
Reply With Quote
  #14   Spotlight this post!  
Unread 03-15-2012, 09:56 PM
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: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Quote:
Originally Posted by otherguy View Post
For any teams looking for a solution to the treads original problem, it looks like Team 694 developed a solution in their bug report:


See their bug report on the SmartDashboard First Forge page for the diff attachment
And then I noticed this. I'll try that now.
Reply With Quote
  #15   Spotlight this post!  
Unread 03-16-2012, 03:09 PM
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: Sending SmartDashboard Data to cRIO without pressing [ENTER] key

Alright. So I patched the dashboard, but I don't have a robot I can use. Can someone test the file for me?
Attached Files
File Type: zip SmartDashboard.zip (1.74 MB, 23 views)
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 05:06 PM.

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