Go to Post I think another really awsome thing about FIRST can be summed up by what Dan, the Wildstang operator, said when they won nats: "I built that!" I mean, the feeling of satisfaction you get knowing that something you created can perform such unbelievable tasks is amazing. - Jupee [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
  #16   Spotlight this post!  
Unread 13-06-2010, 20:12
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Pat Fairbank View Post
I suspect that your problem is that your RobotDrive class is not set up properly for the way your robot is wired (one side is either not inverted (using RobotDrive::SetInvertedMotor()), or inverted when it shouldn't be).
I'm not sure how that would work, cause then wouldn't teleop not drive correctly at all? There's only one way a drivetrain will correctly work, yeah (unless the joystick values are strange)?

Quote:
Originally Posted by Pat Fairbank View Post
It's probably just working in teleop mode by lucky coincidence, because your joystick setup looks strange - you're feeding what seems to be the twist axis (4) into the moveValue parameter of ArcadeDrive, and the Y-axis (2) into the rotateValue parameter.
Well, I'm not using the kit joysticks. I'm using two XBox 360 controllers, so the numbers don't exactly correspond to the names in the WPI library.

-Tanner
Reply With Quote
  #17   Spotlight this post!  
Unread 13-06-2010, 20:18
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is online now
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Tanner View Post
I'm using two XBox 360 controllers, so the numbers don't exactly correspond to the names in the WPI library.
Okay, that makes sense, then. If you haven't already, maybe you should check the outputs of those axes directly with printf statements to make sure they are doing what you think they are doing in terms of axis and polarity.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com
Reply With Quote
  #18   Spotlight this post!  
Unread 13-06-2010, 20:32
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Pat Fairbank View Post
I'm pretty sure all the Periodic/Continuous methods in IterativeRobot execute in the same thread.
Good point.
Reply With Quote
  #19   Spotlight this post!  
Unread 13-06-2010, 20:34
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Pat Fairbank View Post
Okay, that makes sense, then. If you haven't already, maybe you should check the outputs of those axes directly with printf statements to make sure they are doing what you think they are doing in terms of axis and polarity.
Yeah, I should do that. I kinda just took it directly from LabVIEW thinking that things would be the same, but you never really know. I'll write that down to check as well.

-Tanner
Reply With Quote
  #20   Spotlight this post!  
Unread 15-06-2010, 21:38
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: Arcade Drive Troubles in Autonomous

Haven't been able to get to the office to test on the robot. Worked overtime today.

Yeah...

-Tanner
Reply With Quote
  #21   Spotlight this post!  
Unread 16-06-2010, 12:46
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: Arcade Drive Troubles in Autonomous

Tested autonomous with just the drivetrain movement (i.e. - drivetrain->ArcadeDrive(autonomousForwardPower, 0.0);, and it still turns.

Didn't have time to test anything else (I was on my lunch break), but I will this afternoon. We're doing nothing at work today so I should be able to get off early.

-Tanner
Reply With Quote
  #22   Spotlight this post!  
Unread 16-06-2010, 14:01
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Arcade Drive Troubles in Autonomous

Quote:
Originally Posted by Tanner View Post
Tested autonomous with just the drivetrain movement (i.e. - drivetrain->ArcadeDrive(autonomousForwardPower, 0.0);, and it still turns.
Well it wasn't time wasted - you've eliminated an entire realm of possibilities and narrowed down the problem.

Try putting
drivetrain->ArcadeDrive(0.5, 0.0);
in TeleOp and see if it still turns there.

If so, maybe "0.0" doesn't mean "straight ahead".

Do a printf of the value you are feeding in when the 'bot is going straight ahead in TeleOp, and see if it is "0.0" or some other number.


~
Reply With Quote
  #23   Spotlight this post!  
Unread 16-06-2010, 15:44
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: Arcade Drive Troubles in Autonomous

I think the arguments for RobotDrive::ArcadeDrive are backwards somehow. Cause when I do drivetrain->ArcadeDrive(0.0, autonomousForwardPower); the robot goes forward, but when I do drivetrain->ArcadeDrive(autonomousForwardPower, 0.0); the robot turns left.

So, I checked the joystick numbers and the inversion of the drivetrain motors - they were totally wacky. The joysticks for the ArcadeDrive function were backwards and the inversion was programmed in that format, hence the robot worked, but everything was backward. Heh.

Autonomous drives in the right direction now (or rather it turns in the right direction...). All is well.

What did we learn? Never program the drivetrain with joysticks first and then do the inversions. Figure out what those values are, determine what they should be (positive or negative) or use magic numbers (like 1 and 0), then figure out the inversions.

Glad that is figured out. Now to see if it still crashes...

Thanks all!

-Tanner

Edit: And it doesn't crash with the updates, yay!

Last edited by Tanner : 16-06-2010 at 15:53.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Semi-Omni-Arcade Drive byteit101 Programming 20 24-01-2010 08:21
Programming Arcade Drive kyungjin C/C++ 4 06-04-2009 11:28
Non-Arcade Drive causes problems in Autonomous... pinballwizard96 NI LabVIEW 2 01-02-2009 20:45
Arcade/Tank Drive Malfunction piedmont Programming 2 19-01-2009 17:37
Arcade Drive Anfony VEX 4 08-11-2006 19:46


All times are GMT -5. The time now is 13:38.

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