Go to Post Bottom line: hobbiests, hackers, and tinkerers can fiddle with something and make it work. Engineers are people who [b]engineer[/b] solutions to problems. - Dave Flowerday [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 21-02-2012, 15:09
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Autonomous Mode Issues

As the title implies we are having problems with our autonomous (all 5 of em).
Everything runs and in the correct order but some of the values aren't working correctly.
When I plug the same values into TeleOp Everything works as planned.
The specific things that aren't happening are
1. The drive motors oscillate forward and back when they are told to run
2. The shooter spins but, not at the correct speed

(see attatched vi)
Attached Files
File Type: vi Autonomous Independent.vi (107.7 KB, 43 views)
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2012, 00:13
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Autonomous Mode Issues

Anyone.
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-02-2012, 08:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Mode Issues

Did you really mean to set the PID coefficients for driving to 0, 0, and 0?

Did you really mean to se the Left and Right Drive values to 0 and 0?

I didn't look as closely at the shooter, but it looks like globals that describe the set points of the control loops aren't telling the robot to do much. If 16 isn't the auto you wanted comments on, post another picture.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 23-02-2012, 08:46
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: Autonomous Mode Issues

Are you trying to drive the robot to a specified location? Your P gain might be too high in the "1" case, making it oscillate around the setpoint. This will happen if your wheels are off the ground without any significant load.

Your shooter encoder is obviously configured with 4x decoding. If you change it to 1x (and change the associated constant 1440 to 360), you can get slightly better results, though since you're computing the rate yourself from the position it isn't a big deal. You should definitely see an improvement in shooter speed stability if you change its simple delay-throttled while loop to a timed loop, or if you do a similar delta computation on the actual system millisecond timer instead of just assuming the loop runs at a fixed rate. I think the constant 20 is involved there -- are you commanding the shooter speed in revolutions per second?

In your While loops, I see a consistent pattern of testing for (i+1) being greater than or equal to a constant. Why not just test for i being greater?
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2012, 13:12
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Autonomous Mode Issues

Quote:
Originally Posted by Alan Anderson View Post
Are you trying to drive the robot to a specified location? Your P gain might be too high in the "1" case, making it oscillate around the setpoint. This will happen if your wheels are off the ground without any significant load.

Your shooter encoder is obviously configured with 4x decoding. If you change it to 1x (and change the associated constant 1440 to 360), you can get slightly better results, though since you're computing the rate yourself from the position it isn't a big deal. You should definitely see an improvement in shooter speed stability if you change its simple delay-throttled while loop to a timed loop, or if you do a similar delta computation on the actual system millisecond timer instead of just assuming the loop runs at a fixed rate. I think the constant 20 is involved there -- are you commanding the shooter speed in revolutions per second?

In your While loops, I see a consistent pattern of testing for (i+1) being greater than or equal to a constant. Why not just test for i being greater?
The testing was done on the ground.
The shooter is configured to 2x. and the code for the shooter (conversions and stuff) is from teleop, where it works perfect. I'm commanding the shooter to an arbitrary value not a RPS


Quote:
Originally Posted by Greg McKaskle View Post
Did you really mean to set the PID coefficients for driving to 0, 0, and 0?

Did you really mean to se the Left and Right Drive values to 0 and 0?

I didn't look as closely at the shooter, but it looks like globals that describe the set points of the control loops aren't telling the robot to do much. If 16 isn't the auto you wanted comments on, post another picture.

Greg McKaskle
The default values are set to 0 UNTIL the case structures come in and tell it otherwise, via a local variable.


Now here's what I think the problem is. When I found those setpoints and PID gains it was in TeleOp mode not autonomous. does TeleOp run at a different speed than the while loop with a 50 ms timer in it?



Could I just take the timers out of all of em and put the whole thing in a 50ms While loop?
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.

Last edited by j.cole : 27-02-2012 at 13:22.
Reply With Quote
  #6   Spotlight this post!  
Unread 28-02-2012, 08:27
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Mode Issues

Teleop runs nominally at 20ms. So yes, your tuning is for a different loop rate. I don't remember your symptoms well enough to say this is the issue, but it should be pretty simple to change the lower loops to run at 20ms and test -- if you have the mechanisms.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 28-02-2012, 16:55
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Autonomous Mode Issues

Which would cause a slower rate WHOOO Thanks for the help. I'm unsure if this will remedy the drive system because of the whole bag thing but it will definitely work on the shooter.
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
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:06.

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