Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Autonomous chooser not working when connected to the field (http://www.chiefdelphi.com/forums/showthread.php?t=146871)

cpapplefamily 08-04-2016 22:07

Autonomous chooser not working when connected to the field
 
We spent the day yesterday trying to figure why when tethered out autonomous chooser worked but wirelessly on the field the bot sat dead in autonomous. We worked with a few techs and found that turning off the windows fire wall worked. We had 7 qualifying rounds today and the last one we had no autonomous again. Brought it back to the pits, tethered and worked. ANY ideas? We have one more qualifying match tomorrow before finnals. We are currently sitting in 19th with strong possibility of making to a final alience.

nickbrickmaster 08-04-2016 22:23

Re: Autonomous chooser not working when connected to the field
 
Do you have a connection indicator on the dashboard? What did it say? Are you using the LabView dashboard or the Java/C++/Python etc one?

What I would do in your position is add a connection indicator on the dashboard. This will tell you whether the dashboard can connect to the NetworkTables server. If the SD isn't connecting very soon after the robot is connected, reboot the roboRIO.

We had this same problem occur in a practice match, but not since. No guarantee of this working, but I've had trouble with the roboRIO not fully booting up a few times today.

If I have a chance, I'll come over tomorrow morning to try and help some more.

virtuald 08-04-2016 22:24

Re: Autonomous chooser not working when connected to the field
 
Quote:

Originally Posted by cpapplefamily (Post 1569764)
We spent the day yesterday trying to figure why when tethered out autonomous chooser worked but wirelessly on the field the bot sat dead in autonomous. We worked with a few techs and found that turning off the windows fire wall worked. We had 7 qualifying rounds today and the last one we had no autonomous again. Brought it back to the pits, tethered and worked. ANY ideas? We have one more qualifying match tomorrow before finnals. We are currently sitting in 19th with strong possibility of making to a final alience.

It's almost certainly not connecting to the robot... you can see this by adding a connection widget to the SmartDashboard. You should set your computer and roborio up with static IPs.

Deetman 09-04-2016 00:07

Re: Autonomous chooser not working when connected to the field
 
If you do have a connection indicator and it was green and your selected autonomous still did not run, select a different autonomous mode and then re-select your desired autonomous. You may have a race condition where your selected autonomous doesn't get sent over to the robot initially.

cpapplefamily 09-04-2016 00:34

Re: Autonomous chooser not working when connected to the field
 
We do have a connection indicator but will have to ask the drive coach and team if they noticed the status. Most likely they did not . The select / reselect was a rouble shooting step attempted yesterday but since today the entire day it was running flawlessly the drivers hadn't been doing this. We also started yesterday with static IP's but after our radio flash that didn't work. The IP was 10.32.44.5 that I believe now was wrong. Should been like 10.32.44.20. Our ip camera is static with an ip of 10.32.44.11 and is lagging but displayed on the SD.
nickbrickmaster love to pick your brain for my own knowledge. You must be here at 10,000 lakes. We have a slow start in the morning. Our first and final quality is at 11:30 ish. Our plan is to re-weigh since we beefed-up a part of our bot with about 12oz and with a 119 lbs bot yep it must be done.

cpapplefamily 09-04-2016 00:54

Re: Autonomous chooser not working when connected to the field
 
Quote:

Originally Posted by nickbrickmaster (Post 1569769)
Do you have a connection indicator on the dashboard? What did it say? Are you using the LabView dashboard or the Java/C++/Python etc one?

What I would do in your position is add a connection indicator on the dashboard. This will tell you whether the dashboard can connect to the NetworkTables server. If the SD isn't connecting very soon after the robot is connected, reboot the roboRIO.

We had this same problem occur in a practice match, but not since. No guarantee of this working, but I've had trouble with the roboRIO not fully booting up a few times today.

If I have a chance, I'll come over tomorrow morning to try and help some more.

Sorry forgot to answer we Java command based.

cpapplefamily 09-04-2016 01:14

Re: Autonomous chooser not working when connected to the field
 
Thinking about adding the line
Code:

public void autonomousIntit () {
    autonomousCommand = (Command) autonomousChooser.getSelected ();

// *******Add this******
if (autonomousCommand == null) {
autonomousCommand = new Auto_00_ReachEdgeOfObstical();

// now the normal
if (autonomousCommand != null) autonomousCommand.start ();
}


euhlmann 09-04-2016 09:40

Re: Autonomous chooser not working when connected to the field
 
If selections aren't showing up on your dashboard, restart the robot program. The dashboard relies on the initial sending of selections on program start to know what they are.

Also, as other people have said, sometimes selectors are picky. What we did was print out what the robot thought was selected in disabledInit() so we could check if we needed to reselect something.

RufflesRidge 09-04-2016 09:46

Re: Autonomous chooser not working when connected to the field
 
Quote:

Originally Posted by cpapplefamily (Post 1569819)
Thinking about adding the line

I would recommend doing this slightly differently. Adding that command to the SendableChooser using addDefault will do basically the same thing, but IMO is more clear as the default is defined right where you are specifying the whole list.

Having said that, I believe your way would work as well.

MamaSpoldi 09-04-2016 18:06

We also had this happen to us. It turns our that Windows 10 had re-enable the firewall. Very annoying but at least we know to look for that now. Also we ended up setting it to use static ip addresses as suggested by the FTAA. One of our eliminations alliance partners also saw the same problem... they had no firewall issue but fixed it by restarting their robot and driverstation to force a cleanup of the network tables.

alst 09-04-2016 21:59

Re: Autonomous chooser not working when connected to the field
 
We've had issues with GetSelected() returning null intermittently in AutonomousInit() (in C++, but it's possible that similar ones could pop up when using Java). Calling GetSelected() in DisabledPeriodic() instead and storing its return value has been somewhat more reliable.

cpapplefamily 10-04-2016 00:49

Re: Autonomous chooser not working when connected to the field
 
We endd up with this

Code:

public void autonomousIntit () {
  // autonomousCommand = (Command) autonomousChooser.getSelected ();

// *******Add this******

autonomousCommand = new Auto_02_underLowbarScoreLowGoal();

// now the normal
if (autonomousCommand != null) autonomousCommand.start ();
}

Just force this code. All day (1 qual and 3 finals) we had no trouble other than the last final tiebreaker NOTHING. Frustrating! We have a addDefault but each time we had trouble we didn't get that one either. I thought about disabledInit or periodic only couldn't recall how even though I posted this months ago
http://www.chiefdelphi.com/forums/sh...d.php?t=141684
Code:
System.out.println("Hello From the Rio"); //Print to RioLog

Just a tool this team has not ever used and I need to get and get them used to using. I'm learning and introducing the team to command based programming and more advanced controls. Thanks for you help and suggestions. With a 15 place qualify and a 7th alliance second pick we help the quarterfinals go three rounds with a close game #2 and #3. If our auto worked could had change the game

GreyingJay 10-04-2016 01:39

Re: Autonomous chooser not working when connected to the field
 
Sorry to hear you were having so much trouble, hope that it is resolved for tomorrow.

This won't help you for this year, and I may sound like I am harping on this, but my team chose to use a hardware selector switch instead of relying on SmartDashboard or other software solutions, for precisely this reason. The drive team appreciated having physical feedback to know exactly what the robot would do. An option to consider for the future.

cpapplefamily 10-04-2016 09:50

Re: Autonomous chooser not working when connected to the field
 
Quote:

Originally Posted by GreyingJay (Post 1570170)
Sorry to hear you were having so much trouble, hope that it is resolved for tomorrow.

This won't help you for this year, and I may sound like I am harping on this, but my team chose to use a hardware selector switch instead of relying on SmartDashboard or other software solutions, for precisely this reason. The drive team appreciated having physical feedback to know exactly what the robot would do. An option to consider for the future.

There is no tomorrow. We will most definitely implement a Dashboard feed back to tell us if autonomousCommand != null before completing the field connected. Weather with a senableChooser or hardware. An issue I will have is trying to test the conditions at home. We had never experience the issue when at home wifi or tethered. The biggest issue I have now with our last autonomous command code there was no selector. In code it was what it was

Code:

autonomousCommand = new Auto_02_underLowbarScoreLowGoal();

JesseK 10-04-2016 10:04

Re: Autonomous chooser not working when connected to the field
 
We code in Java on the robot, and Java on the driver's station.

We've had a LOT of problems using custom network code in the last 2 years. This year we did something way different than last year - we setup a web server on port 443 of the driver's station. We could never get it working. This weekend we let the FTA's have complete logs of our stuff in the hope that someone who understands the network architecture can figure out what was going on. The firewall was disabled in every way Windows can disable the firewall.

In the end, we swapped to NetworkTables. Sure, it requires a Labview runtime library just to develop with, we can't figure out how to get it above 4hz, and it means that without layers of interpreters we'll only ever develop displays in Java - but it works. We run a separate process from the driver's station, so it isn't Smart Dashboard stuff - just read and write to a HashMap by using the NetworkTables framework in your own code.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi