Go to Post Our robot-in-progress got set on the scale yesterday, It came to about 115 pounds. Then I walked up and took out the battery, and everyone relaxed some. - Alan Anderson [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 28-03-2015, 15:13
Sav01027's Avatar
Sav01027 Sav01027 is offline
Registered User
AKA: Sav Sidorov
FRC #5897 (Apex Robotics)
Team Role: Leadership
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Canada
Posts: 10
Sav01027 is an unknown quantity at this point
Autonomous Inconsistencies

We're coding an Autonomous mode in preparation for our next regional, and we're running into a very odd issue. We have our code set up so that it calls methods into the autonomous code (i.e. drive() would make it drive forward a set number of encoder rotations).

The issue that we're having is that when we enable the robot to run Auto, it acts unpredictably. Say, one time it would do it perfectly, but the next it would turn for a different number of degrees, or drive for a different distance, while running on identical code.

We have tried resetting the code and the roboRio, as well as checking the encoder values in Teleop. At least in Teleop, the encoders seem to be working fine.

Has anyone encountered this problem before, or has a solution for it?

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 28-03-2015, 18:07
Nyxyxylyth Nyxyxylyth is offline
Registered User
AKA: Neal Manson
FRC #1481 (The Riveters)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2013
Location: Southfield, MI
Posts: 70
Nyxyxylyth is just really niceNyxyxylyth is just really niceNyxyxylyth is just really niceNyxyxylyth is just really niceNyxyxylyth is just really nice
Re: Autonomous Inconsistencies

Quote:
Originally Posted by Sav01027 View Post
We have our code set up so that it calls methods into the autonomous code (i.e. drive() would make it drive forward a set number of encoder rotations).

The issue that we're having is that when we enable the robot to run Auto, it acts unpredictably. Say, one time it would do it perfectly, but the next it would turn for a different number of degrees, or drive for a different distance, while running on identical code.
Are you calling SetPosition(0) in your AutonomousInit() for the encoders, etc? Or whatever the appropriate equivalent initialization spot is in your setup.
Reply With Quote
  #3   Spotlight this post!  
Unread 28-03-2015, 18:51
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Autonomous Inconsistencies

What kind of Drivetrain do you have?

How are you driving? Are you using a PID loop or just driving until the encoders read a large enough value or what?
Reply With Quote
  #4   Spotlight this post!  
Unread 28-03-2015, 19:23
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,609
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Autonomous Inconsistencies

I would try printing the encoder count to the smart dashboard on a heartbeat (perhaps 0.1 or 0.5 sec, depending on how fast you're going) and compare the results of the trials that work vs the ones that don't. There should be some sort of clue there.

Also, presuming that you are driving this on some variant of tank, you need to ensure that the counts of the two sides increase together. If one is getting ahead of the other, slow that side down a notch. Otherwise, you'll wind up curving off course, though the robot should straighten out to the correct orientation at the end if it hasn't hit anything.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #5   Spotlight this post!  
Unread 29-03-2015, 13:56
WillNess's Avatar
WillNess WillNess is offline
Programmer
AKA: Will Ness
FRC #4944 (The Hi Fives)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: United States
Posts: 90
WillNess is just really niceWillNess is just really niceWillNess is just really niceWillNess is just really nice
Re: Autonomous Inconsistencies

Check how you're treating the encoder during TeleopInit and TeleopPeriodic, are you reseting it in teleopinit and not autonomous init?
__________________

Outreach Lead // Lead Programmer // Junior

2014 FRC:
Rookie Allstar, Highest Rookie Seed & Semifinalist @ Utah
Rookie Allstar, Highest Rookie Seed & Semifinalist @ Colorado
2015 FRC:
Creativity In Engineering & Semifinalist @ Arizona West
Reply With Quote
  #6   Spotlight this post!  
Unread 30-03-2015, 16:45
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Autonomous Inconsistencies

Post your code?
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 22: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