Go to Post For years, Dave Lavery couldn't fart without people trying to interpret it as a game hint. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 23-01-2011, 16:34
will_1359 will_1359 is offline
Registered User
FRC #1359
 
Join Date: Jan 2010
Location: lebanon
Posts: 15
will_1359 is an unknown quantity at this point
Robot going backwards!

I've put the line tracking code into my robot, but it keeps going backwards whether I invert the motors or not. Could this be because it uses arcadeDrive while the rest of my code uses tankDrive? If so, how can I fix it? If not, what else could it be and how can I fix it?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2011, 16:43
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: Robot going backwards!

Quote:
Originally Posted by will_1359 View Post
I've put the line tracking code into my robot, but it keeps going backwards whether I invert the motors or not. Could this be because it uses arcadeDrive while the rest of my code uses tankDrive? If so, how can I fix it? If not, what else could it be and how can I fix it?
You should use the drive(speed, curve) function, since a joystick isn't actually being used in the tracking code.
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2011, 16:52
will_1359 will_1359 is offline
Registered User
FRC #1359
 
Join Date: Jan 2010
Location: lebanon
Posts: 15
will_1359 is an unknown quantity at this point
Re: Robot going backwards!

Do you mean that I should be able to use the arcade drive thing anyway? Or do I need to change that?
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2011, 17:00
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Robot going backwards!

Quote:
Originally Posted by will_1359 View Post
I've put the line tracking code into my robot, but it keeps going backwards whether I invert the motors or not. Could this be because it uses arcadeDrive while the rest of my code uses tankDrive? If so, how can I fix it? If not, what else could it be and how can I fix it?
Are you sure that removing the code to invert the motors didn't change the robot direction? You can also change the sign of the computed robot speed in the code and that should also flip the direction.

The use of the arcade vs. tank functions don't stick, they just set the speeds at that moment based on the parameters passed.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2011, 17:05
will_1359 will_1359 is offline
Registered User
FRC #1359
 
Join Date: Jan 2010
Location: lebanon
Posts: 15
will_1359 is an unknown quantity at this point
Re: Robot going backwards!

Quote:
Originally Posted by BradAMiller View Post
Are you sure that removing the code to invert the motors didn't change the robot direction? You can also change the sign of the computed robot speed in the code and that should also flip the direction.

The use of the arcade vs. tank functions don't stick, they just set the speeds at that moment based on the parameters passed.
I tried inverting the motors, and I tried changing the sign. Neither one worked.

I didn't think that the use of arcade vs. tank would matter, but I wanted to make sure.

Do you have any other suggestions?
Reply With Quote
  #6   Spotlight this post!  
Unread 24-01-2011, 02:33
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Robot going backwards!

If you are changing each of these things (only one at a time, I hope, since changing both would double negate and wind back up where you started), then perhaps we need to consider that you are changing the code in the wrong place. Can you post the code you're using and note where you and making these changes?

-Joe
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 12:36.

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