Go to Post "Why yes, actually I AM a rocket scientist" - Gary Dillard [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2013, 00:34
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Switching between position PID (autonomous) and velocity PID (teleop)

First off, is speed control in teleop really useful? We've never used it, and we don't have a testing platform at the moment, so I can't hack an implementation to feel the difference.

Second, given that the answer to the previous question is "yes," how would you implement them both? I know there's been quite a bit of discussion about using velocity control with the Jaguars, but we're hoping to use Talons this year, so all of our control loops would have to be in the robot code.
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
  #2   Spotlight this post!  
Unread 10-01-2013, 09:08
Anupam Goli's Avatar
Anupam Goli Anupam Goli is offline
PCH Q&A co-founder/Scouting Mentor
AKA: noops
FRC #1648 (G3 Robotics)
Team Role: Mentor
 
Join Date: Dec 2010
Rookie Year: 2008
Location: Atlanta, Georgia
Posts: 1,242
Anupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond reputeAnupam Goli has a reputation beyond repute
Re: Switching between position PID (autonomous) and velocity PID (teleop)

I'd say that speed control in teleop is definitely useful, but mainly for a low speed and high speed setting, or if you want to have a smooth Drivetrain power curve. That smooth curve allows the driver to more smoothly drive instead of accidentally putting too much force and causing the wheels to slip.

In implementation, I think it would be simple to calculate velocity using the encoders, and have that as your actual, and use the input power and gearbox calculations for your value you want on the drivetrain, with the error being the difference in the wanted value and the actual value.
__________________
Team 1002: 2008-2012
Team 1648: 2012-2016
Georgia Tech Class of 2016
  #3   Spotlight this post!  
Unread 10-01-2013, 09:17
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Switching between position PID (autonomous) and velocity PID (teleop)

With the amount of robot-to-robot, robot-to-gamepiece, and robot-to-field contact that occurs during teleop, any feedback system on the drive is going to see a LOT of disturbances. Disturbances can make your loops unstable, or have weird "what the heck just happened" consequences. We used velocity PID during teleop for Lunacy initially (to help with traction control), but ultimately removed that in favor of a simpler motor ramp up/down limit and the drivers liked the feel better.

If you want an acceleration limit, you can simply limit the rate of change of your speed commands.

For example:

Code:
[pseudocode]
maxChange = 0.05
speed = 0

while(robot is running)
    input = joystick.getY()
    if input > (speed + maxChange)
        speed = speed + maxChange
    else if input < (speed - maxChange)
        speed = speed - maxChange
    else
        speed = input
    end if
   
    motor.set(speed)
end while
  #4   Spotlight this post!  
Unread 10-01-2013, 09:27
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: Switching between position PID (autonomous) and velocity PID (teleop)

...just want to second Jared's comments...

We've used an implementation of his pseudocode on many of our 'bots for driving and other effector applications over the years.

Eric
__________________

Don't PANIC!
S. P. A. M.
Closed Thread


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 02:31.

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