Go to Post Off season is a good way to go outside the district. - 346CADmen [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 19-12-2011, 11:00
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
[FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Hi

I've had several instances where our robot continues to run at the end of of Teleop.

It appears that the Teleop program is being killed before our program has a chance to receive or respond to the Disable command. So, if we are sending driving commands to the DC Motor controllers, they continue to run until the 2.5 Sec timeout shuts them down.

Has any one else seen this sort of thing?

We are uising Labview, and have quite a few motor controllers so the program may not be looping extemely quickly.

Also, we've had a couple of instances where the FCS loses connection with the Game Controllers (the FCS screen indicates that it is missing Joystick Messages) but in one instance the robot continued to drive forward, which implies that the last joystick command was being resent, despite the fact the the FCS knew it was gone. Seems like the FCS should have either stopped sending data (to cause the Robot to go offline), or it should have sent null joystick commands. As it was, the robot ran into the wall, and smoked a motor before we could shut down the FCS.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2012, 07:20
jasonbrooks's Avatar
jasonbrooks jasonbrooks is offline
Team Captain
FTC #3540 (Roboboogie)
Team Role: Mechanical
 
Join Date: Sep 2011
Rookie Year: 2009
Location: New York
Posts: 71
jasonbrooks is an unknown quantity at this point
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by PhilBot View Post
Hi

I've had several instances where our robot continues to run at the end of of Teleop.

It appears that the Teleop program is being killed before our program has a chance to receive or respond to the Disable command. So, if we are sending driving commands to the DC Motor controllers, they continue to run until the 2.5 Sec timeout shuts them down.

Has any one else seen this sort of thing?

We are uising Labview, and have quite a few motor controllers so the program may not be looping extemely quickly.

Also, we've had a couple of instances where the FCS loses connection with the Game Controllers (the FCS screen indicates that it is missing Joystick Messages) but in one instance the robot continued to drive forward, which implies that the last joystick command was being resent, despite the fact the the FCS knew it was gone. Seems like the FCS should have either stopped sending data (to cause the Robot to go offline), or it should have sent null joystick commands. As it was, the robot ran into the wall, and smoked a motor before we could shut down the FCS.

Phil.
This used to happen to us all the time with LabView. We had two main problems while using LabView:
  1. The robot would never run properly when we were using two controllers. During "Hot Shot", if we were trying to move the robot while using our pitching-machine style shooter, and the shooter was already spinning, it would not stop spinning until the other controller stopped moving the robot, even if on controller one the spinner was stopped.
  2. After each match, the program would keep running for a few more seconds. So, once again, in Hot Shot, we kept shooting into the offield goal even after the game was over which gave us some dirty looks from the refs

My recommendation would be to try robotC with a simple program and see if you get the error message again.

Let me know how it goes!
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2012, 01:08
dickswan dickswan is offline
Registered User
no team
 
Join Date: Feb 2006
Location: dallas, TX
Posts: 13
dickswan is an unknown quantity at this point
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by PhilBot View Post
Hi
It appears that the Teleop program is being killed before our program has a chance to receive or respond to the Disable command. So, if we are sending driving commands to the DC Motor controllers, they continue to run until the 2.5 Sec timeout shuts them down.

Has any one else seen this sort of thing?
This was how the "day one" design for LabVIEW (and ROBOTC) work. And, AFAIK it is still the current implementation. ROBOTC maintains a map of which HiTechnic motor controllers are equipped and as part of the "program has ended" code stops them. LabVIEW does not keep such a map and relies on the 2.5 (or is it 2.0?) second watchdog timer in the motor controller to shut down. This occurs at the end of both autonomous and teleop.

I always thought that the LabVIEW implementation was unfair as it extra couple of seconds of motor movement might potentially allow a scoring activity to complete.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2012, 07:58
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by dickswan View Post
And, AFAIK it is still the current implementation. ROBOTC maintains a map of which HiTechnic motor controllers are equipped and as part of the "program has ended" code stops them. LabVIEW does not keep such a map and relies on the 2.5 (or is it 2.0?) second watchdog timer in the motor controller to shut down. This occurs at the end of both autonomous and teleop.

I always thought that the LabVIEW implementation was unfair as it extra couple of seconds of motor movement might potentially allow a scoring activity to complete.
No, you're not correct. There is code in the Labview template (it's FTCDisableRobot.vi) for identifying which motors need to be shut down when the robot is disabled, but It seems to depend on what else is running as to whether that code gets time to execute.

I still feel that the FCS is not giving the programs enough time to execute the motor shutdown before it kills the program. I did some tests, and a simple program with not many other tetrix commands would shut down the drive correctly when the match ended. But once I added code for the other motors that ran all the time in a different loop the drive system didn't shut down all the time. I play with adding different delays into the other loops, but I could not get reliable operation.

I guess the trade of is, if they wait too long between disbling the robot and shuttiong down the program, the team might try to take advantage of that delay to do other stuff. Still not foolproof.

If only there was a way for the NXT Firmware (not the running program) to broadcast an automatic motor shut-down whenever a program with tetrix commands was terminated.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2012, 09:14
CougarRobot CougarRobot is offline
Registered User
FTC #4251 (Cougar Robotics)
Team Role: Coach
 
Join Date: Oct 2010
Rookie Year: 2007
Location: Columbus, Ohio US
Posts: 17
CougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to beholdCougarRobot is a splendid one to behold
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Last year, while we were using LabVIEW this caused us some problems. We ended up coding our own stop in our program a few fractions of a second before the match was due to end. That way we stopped all the motors just before the FCS issued the stop and LabVIEW maybe, or maybe not stopped things. Giving up a few milliseconds for a clean stop was a good tradeoff for us. It's a 2 minute round so we just ran a timer starting when we saw teleop running.
Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2012, 09:19
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by CougarRobot View Post
Giving up a few milliseconds for a clean stop was a good tradeoff for us.
I Agree. That's a good strategy.

For what it's worth, at the Annapolis MD Qualifier, the SW Inspection team was specifically checking for correct motor stops at the end of Auto and Teleop. I did see some teams fail this, and they had to go back to their code and correct it. So, ensuring is real stop is something that everyone should check before they leave for competition.

edit: In Fact, doing a complete run through the inspection check-list before you leave for competition can be a life-saver HW and SW

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #7   Spotlight this post!  
Unread 21-01-2012, 22:36
alphadog0309's Avatar
alphadog0309 alphadog0309 is offline
Registered User
AKA: Karan Hiremath
FTC #0110 (MFS Foxes)
Team Role: Programmer
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Moorestown, New Jersey
Posts: 41
alphadog0309 will become famous soon enoughalphadog0309 will become famous soon enough
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

This tells me that FIRST should create a "Kill at 1:57:050" VI for teams to put into their code as it is obviously a big problem. Or they should out right fix the issue and do this the correct way....
__________________
Karan Hiremath
FTC Team 110- MFS Foxes
Facebook: MFS Foxes
YouTube: MFS Foxes
Twitter:
@Foxes_110
Co-Captain
Head Programmer
Service Coordinator
Builder
Electrical
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2012, 10:15
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by alphadog0309 View Post
This tells me that FIRST should create a "Kill at 1:57:050" VI for teams to put into their code as it is obviously a big problem. Or they should out right fix the issue and do this the correct way....
This assumes that there isn't a temporary loss of communications during the match that would cause the timer to reset.....

The timer has to start when the robot is enabled... for the first time..
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2012, 22:52
alphadog0309's Avatar
alphadog0309 alphadog0309 is offline
Registered User
AKA: Karan Hiremath
FTC #0110 (MFS Foxes)
Team Role: Programmer
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Moorestown, New Jersey
Posts: 41
alphadog0309 will become famous soon enoughalphadog0309 will become famous soon enough
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

this is true... is this a limitation within LabVIEW or just in the particular way the HiTechnic motor controllers are configured to run in LabVIEW?
__________________
Karan Hiremath
FTC Team 110- MFS Foxes
Facebook: MFS Foxes
YouTube: MFS Foxes
Twitter:
@Foxes_110
Co-Captain
Head Programmer
Service Coordinator
Builder
Electrical
Reply With Quote
  #10   Spotlight this post!  
Unread 23-01-2012, 09:20
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Quote:
Originally Posted by alphadog0309 View Post
this is true... is this a limitation within LabVIEW or just in the particular way the HiTechnic motor controllers are configured to run in LabVIEW?
Not sure exactly which "this" you are referring to, but if it's the run-on problem, I think it's a combination FCS timing, the labview template, and how the programmer writes their code.

This year's LabVIEW template used button events, rather than button states, so there is not a lot of motor control code running at any time, so the program is looping pretty fast, and can shut down the motors in response to a disable command quite quickly.

If the programmer has added a bunch of loops that read buttons and control servos (sending commands all the time) the drive loop gets slowed down to the point where it sometimes doesn't see the disable command before the FCS actually kills the program. In this instance, the Motor Controller keeps running the last issued command until it times out 2.5 seconds later.

I think a slightly longer delay between disable and kill in the FCS would solve this problem.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2012, 08:52
maths222 maths222 is offline
FTC FTA
AKA: Jacob Burroughs
no team
 
Join Date: Nov 2011
Rookie Year: 2010
Location: United States
Posts: 148
maths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to behold
Re: [FTC]: Robots running on at end of Teleop., and strange FCS Joystick behavior.

Just a note. RobotC does not have this issue. I have not looked at the source of "JoystickDriver.c," but I will do so and post my findings here (Hopefully teams will be able to apply this to Labview. I would, except that I only know RobotC).
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 13:16.

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