Go to Post Dance Dance Revolution is the only solution. That rhymed. I should not be on chief at this hour of the morning. >_< - Eugenia Gabrielov [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 20-02-2012, 18:04
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Tank Drive in Autonomous

I thought that when programming autonomous for tank drive the two values x and y in the

drive->Drive(x,y);

(we named our robot drive "drive" , we're original)

were the two motor values, but they are not. What are these values and what do I have to do to get the robot to back straight up in autonomous?
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2012, 18:17
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Tank Drive in Autonomous

I bekieve you are refering to the part like below:
Code:
myRobot.Drive(1.0, 0.0);
That represents driving forward at full speed with no turn (so I believe, unless it has been changed this year).
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 18:28
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Tank Drive in Autonomous

When i try that the motors sort of give a little twitch and then do nothing.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2012, 18:44
teh_lol's Avatar
teh_lol teh_lol is offline
Registered User
FRC #0486 (Panther Robotics)
Team Role: Driver
 
Join Date: Jan 2012
Rookie Year: 2009
Location: United States
Posts: 12
teh_lol is an unknown quantity at this point
Re: Tank Drive in Autonomous

is it humming like the motors are running?
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2012, 18:54
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Tank Drive in Autonomous

No, and the lights on the jaguars aren't lit up either.
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2012, 18:58
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Tank Drive in Autonomous

It sounds like you may have a watchdog issue? What does the Driver Station say when things stopped? Did you check your console to see if there are any messages?
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 20-02-2012, 19:02
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Tank Drive in Autonomous

ERROR: A timeout has been exceeded: RobotDrive... Output not updated often enough. ...in Check() in C:/WindRiver/workspace/WPILib/MotorSafetyHelper.cpp at line 123


I don't know what it means though...
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 20-02-2012, 19:22
teh_lol's Avatar
teh_lol teh_lol is offline
Registered User
FRC #0486 (Panther Robotics)
Team Role: Driver
 
Join Date: Jan 2012
Rookie Year: 2009
Location: United States
Posts: 12
teh_lol is an unknown quantity at this point
Re: Tank Drive in Autonomous

:/ sorry I don't know what that means either
Reply With Quote
  #9   Spotlight this post!  
Unread 20-02-2012, 19:47
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Tank Drive in Autonomous

Well with the lights not lit up on the Jaguars, it seems like the code they are getting is not telling them to run near full speed or they would go either Green/Red or for off would be Orange.

Is there an issue with how it is declared?

Could you post your Autonomous code?

And how long is your "Wait()" function set for?
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #10   Spotlight this post!  
Unread 20-02-2012, 19:56
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Tank Drive in Autonomous

Quote:
Originally Posted by dmitch View Post
No, and the lights on the jaguars aren't lit up either.
Wait, no LEDs lit on the Jaguars? You need to check if you have connected power to the Jaguar correctly. Make sure not only the +12V and GND are connected to the correct side of the Jaguar (Red and Black screws) that marked V+ and V- (not M+ and M-). Also make sure you have the polarity connected correctly and there is a fuse for each Jaguar on the PDB. To be absolute sure, use a volt meter and check if each Jaguar has 12V across the V+ and V- terminals. If there is and the LED is still dark, your Jaguars may be bad.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 20-02-2012, 20:06
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Re: Tank Drive in Autonomous

I would check the voltage (in case of a bad Jaguar), but if it runs fine in Teleop then that shouldn't be it. Sounds like it should be properly connected because he mentions that the motors twitch.
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #12   Spotlight this post!  
Unread 21-02-2012, 00:51
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Tank Drive in Autonomous

Drive motors will be turned off after a tenth of a second by the Motor Safety feature if you don't give them a command. You can disable the safeties for the duration of Autonomous (remember to turn them back on in Teleop), or you can continuously set their values in a loop.
Reply With Quote
  #13   Spotlight this post!  
Unread 21-02-2012, 02:36
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Tank Drive in Autonomous

BTW, I always thought motor safety is to safe guard buggy code from losing control of the robot. But then I think about it, even with motor safety, buggy code can still cause the robot to runaway uncontrollably. So the purpose of motor safety is really for safe guarding losing communication with the joystick such that the motors will stop instead of running at the last set speeds. Therefore, that's why there is no point of turning safety on during Autonomous since there is no joystick involved. Is my assumption correct?
__________________
Reply With Quote
  #14   Spotlight this post!  
Unread 21-02-2012, 08:01
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Tank Drive in Autonomous

Quote:
Originally Posted by mikets View Post
BTW, I always thought motor safety is to safe guard buggy code from losing control of the robot. But then I think about it, even with motor safety, buggy code can still cause the robot to runaway uncontrollably. So the purpose of motor safety is really for safe guarding losing communication with the joystick such that the motors will stop instead of running at the last set speeds. Therefore, that's why there is no point of turning safety on during Autonomous since there is no joystick involved. Is my assumption correct?
Your first thought is correct. The motor safety code is there to prevent a motor from continuing to run if the program doesn't keep controlling it. There's a separate system watchdog that shuts down all robot outputs if communication is lost.
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 14:18.

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