OCCRA
Go to Post Use checklists. If it's good enough for NASA, it's good enough for FIRST. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 03-18-2017, 05:12 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,529
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Pathfinder + Motion Profile Details

So, today we (finally!) got Talon SRX motion profiling with Pathfinder-generated trajectories working acceptably well on our practice bot.

We noticed a couple of things during the process, and were wondering if other teams have had similar experiences:

1) Measured wheel diameter does not seem to correspond exactly to "effective" wheel diameter. That is, we measured our 4'' Colsons at ~3.85'', but empirical tests (i.e. having the robot run a linear trajectory and measuring distance traveled) indicate that they're "effectively" closer to ~3.75''. This may be due to wheel slippage, but our profiles are pretty tame. Perhaps it's due to wheel compression? We don't quite know.

2) Similarly, measured wheel base size does not seem to correspond to "effective" wheel base size. That is, when we generate profiles with our measured wheel base width of ~24.5'', the robot notably under-turns - the "effective" wheel base width for turning correctly seems to be closer to 30''. We think this is due to wheel scrub, but again, we're not quite sure.

After empirically "fudging" the aforementioned quantities, the profiles seem to work quite well. Have any other teams done similarly?

(We have, indeed, verified that the profiles are being followed reasonably well - so this is not due to poor control loop tuning or unachievable profiles)
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 03-18-2017 at 05:20 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-18-2017, 05:22 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,683
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: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Oblarg View Post
Measured wheel diameter does not seem to correspond exactly to "effective" wheel diameter.
This might be related in a way to rolling radius. Have you tried running the bot on both compliant (e.g. carpeted) and non-compliant (e.g. hardwood or concrete) flooring to see what difference that makes?


Reply With Quote
  #3   Spotlight this post!  
Unread 03-18-2017, 05:22 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,529
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Ether View Post
This might be related in a way to rolling radius. Have you tried running the bot on both compliant (e.g. carpeted) and non-compliant (e.g. hardwood or concrete) flooring to see what difference that makes?


We have not! I'll put this on our list of things to try.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Reply With Quote
  #4   Spotlight this post!  
Unread 03-18-2017, 05:31 PM
jeremylee's Avatar
jeremylee jeremylee is offline
Registered User
FRC #2526 (Crimson Robotics)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Otsego, MN
Posts: 115
jeremylee is a jewel in the roughjeremylee is a jewel in the roughjeremylee is a jewel in the rough
Re: Pathfinder + Motion Profile Details

Understeer was an issue for 1736 last year for our low bar high goal due to our high scrub drivetrain with encoders only. We added a gyro with a P gain loop to maintain heading and the result was night and day when it came to repeatability of our path plan. We also had a fudge factor adjustment for distance traveled due to pneumatic wheels to get distance to within inches. With a known wheel diameter, the factor should be much closer to 1, but I wouldn't be surprised if you still need a small adjustment to get actual measurement close to your theoretical calcs. Other tweaks like preloading your gear mesh at start of the path can help a little also also.
__________________
2526 Crimson Robotics (2017 - current)
1736 Robot Casserole (2012 - 2016)
Reply With Quote
  #5   Spotlight this post!  
Unread 03-18-2017, 05:34 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,529
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by jeremylee View Post
We added a gyro with a P gain loop to maintain heading and the result was night and day when it came to repeatability of our path plan.
We're using a NavX similarly this year (simple P loop to keep us driving straight), but only employ it in teleop. It's not clear to me how we would integrate it with running motion profiling on the Talons.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 03-18-2017 at 05:37 PM.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-18-2017, 06:48 PM
jeremylee's Avatar
jeremylee jeremylee is offline
Registered User
FRC #2526 (Crimson Robotics)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Otsego, MN
Posts: 115
jeremylee is a jewel in the roughjeremylee is a jewel in the roughjeremylee is a jewel in the rough
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Oblarg View Post
We're using a NavX similarly this year (simple P loop to keep us driving straight), but only employ it in teleop. It's not clear to me how we would integrate it with running motion profiling on the Talons.
We had left and right velocity control loops for our 6wd. Then we add the output from our gyro P loop to one side (+ 1 rpm) and subtract from the other (-1 rpm) causing it to turn in the direction the heading is off. Main issue is this can cause some overall error in distance by the end of the path. More complicated implementations account for this, but we stopped here and added to our path as needed based on what happened on the field.
__________________
2526 Crimson Robotics (2017 - current)
1736 Robot Casserole (2012 - 2016)
Reply With Quote
  #7   Spotlight this post!  
Unread 03-18-2017, 06:50 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,529
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by jeremylee View Post
We had left and right velocity control loops for our 6wd. Then we add the output from our gyro P loop to one side (+ 1 rpm) and subtract from the other (-1 rpm) causing it to turn in the direction the heading is off. Main issue is this can cause some overall error in distance by the end of the path. More complicated implementations account for this, but we stopped here and added to our path as needed based on what happened on the field.
Yeah, we're not using our velocity servo to follow paths - we're using the Talon SRX motion profiling, which runs a position servo with a velocity feedforward. All of it is run on the motor controllers (you send them a buffer with the whole profile and then the motor controllers execute it), and I don't see any obvious way to add gyro feedback to it.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 03-18-2017 at 06:57 PM.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-18-2017, 06:58 PM
jeremylee's Avatar
jeremylee jeremylee is offline
Registered User
FRC #2526 (Crimson Robotics)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2011
Location: Otsego, MN
Posts: 115
jeremylee is a jewel in the roughjeremylee is a jewel in the roughjeremylee is a jewel in the rough
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Oblarg View Post
Yeah, we're not using our velocity servo to follow paths - we're using the Talon SRX motion profiling, which runs a position servo with a velocity feedforward. All of it is run on the motor controllers (you send them a buffer with the whole profile and then the motor controller executes it), and I don't see any obvious way to add gyro feedback to it.
You would have to send your setpoints from the rio to the srx make it work. This is how 2526 is doing it this year.
__________________
2526 Crimson Robotics (2017 - current)
1736 Robot Casserole (2012 - 2016)
Reply With Quote
  #9   Spotlight this post!  
Unread 03-18-2017, 09:24 PM
phurley67's Avatar
phurley67 phurley67 is offline
Programming Mentor
AKA: Patrick Hurley
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 101
phurley67 will become famous soon enough
Re: Pathfinder + Motion Profile Details

We started out using the Talons built in motion profiling, but decided (after some testing) to use the talons in closed loop velocity mode and run our motion profiles on the RIO, so we could add in gyro compensation.

That said both methods worked very well.
Reply With Quote
  #10   Spotlight this post!  
Unread 10-05-2017, 09:10 PM
JayShower JayShower is offline
Registered User
AKA: Jay Schuaer
FRC #1732 (Hilltopper Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2014
Location: Milwaukee
Posts: 29
JayShower is an unknown quantity at this point
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by phurley67 View Post
We started out using the Talons built in motion profiling, but decided (after some testing) to use the talons in closed loop velocity mode and run our motion profiles on the RIO, so we could add in gyro compensation.

That said both methods worked very well.
Can you elaborate on what you did? If the Talons are in closed loop velocity mode, are you only following the velocity portion of the profile and not the position? Are you somehow modifying the velocity setpoint based on the position and gyro error?
Reply With Quote
  #11   Spotlight this post!  
Unread 10-06-2017, 11:06 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
in hibernation
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,297
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: Pathfinder + Motion Profile Details

Quote:
Originally Posted by JayShower View Post
Can you elaborate on what you did? If the Talons are in closed loop velocity mode, are you only following the velocity portion of the profile and not the position? Are you somehow modifying the velocity setpoint based on the position and gyro error?
This is what 254 does. We compute a velocity setpoint based on the equation:

V_setpoint = V_desired + Ka * A_desired + Kp * position_error + Kv * velocity_error

V_desired itself is the result of a pure pursuit controller and motion profile generator, but is basically equivalent to:

V_desired = V_profile + (left_side ? 1.0 : -1.0) * Kg * heading_error
Reply With Quote
  #12   Spotlight this post!  
Unread 10-11-2017, 10:09 PM
JayShower JayShower is offline
Registered User
AKA: Jay Schuaer
FRC #1732 (Hilltopper Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2014
Location: Milwaukee
Posts: 29
JayShower is an unknown quantity at this point
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Jared Russell View Post
This is what 254 does. We compute a velocity setpoint based on the equation:

V_setpoint = V_desired + Ka * A_desired + Kp * position_error + Kv * velocity_error

V_desired itself is the result of a pure pursuit controller and motion profile generator, but is basically equivalent to:

V_desired = V_profile + (left_side ? 1.0 : -1.0) * Kg * heading_error
What resources would you recomend to learn more about this (Control theory?)? I know there is a lot on Chiefdelphi but it is all very spread out. I have a lot of questions.
Reply With Quote
  #13   Spotlight this post!  
Unread 10-11-2017, 11:14 PM
JayShower JayShower is offline
Registered User
AKA: Jay Schuaer
FRC #1732 (Hilltopper Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2014
Location: Milwaukee
Posts: 29
JayShower is an unknown quantity at this point
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by Jared Russell View Post
This is what 254 does. We compute a velocity setpoint based on the equation:

V_setpoint = V_desired + Ka * A_desired + Kp * position_error + Kv * velocity_error

V_desired itself is the result of a pure pursuit controller and motion profile generator, but is basically equivalent to:

V_desired = V_profile + (left_side ? 1.0 : -1.0) * Kg * heading_error
Also, after getting the V_setpoint, how do you convert that to motor output?
Reply With Quote
  #14   Spotlight this post!  
Unread 10-12-2017, 10:32 AM
M3rcuriel's Avatar
M3rcuriel M3rcuriel is offline
Head Mentor
AKA: Lee Mracek
FRC #0299 (Valkyrie Robotics)
Team Role: Mentor
 
Join Date: Jun 2014
Rookie Year: 2012
Location: Cupertino
Posts: 35
M3rcuriel has a spectacular aura aboutM3rcuriel has a spectacular aura aboutM3rcuriel has a spectacular aura about
Re: Pathfinder + Motion Profile Details

Quote:
Originally Posted by JayShower View Post
Also, after getting the V_setpoint, how do you convert that to motor output?
Velocity PID loop on the Talon would work.
Reply With Quote
  #15   Spotlight this post!  
Unread 10-12-2017, 10:36 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
in hibernation
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,297
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: Pathfinder + Motion Profile Details

Quote:
Originally Posted by JayShower View Post
Also, after getting the V_setpoint, how do you convert that to motor output?
V_setpoint is the velocity setpoint we send to the Talon SRX controlling the drive motors (in velocity control mode). Alternatively you could multiply the V_desired term by a gain to do unit conversion and get a voltage to command.

For learning more about this stuff, there are two categories of resources (and approaches in general) that I find useful. The first is looking at literature from the industrial motion control community. For example, see this article about using feedforward with PID. Industrial motion control in this context is basically using COTS servo drives, PID controllers, and trajectory generators to do (generally single input, single output) feedback control of industrial processes. This community skews towards the practical and intuitive without getting too math-heavy. This makes it a good match for most FRC applications where students don't already have a strong controls background. The Talon SRX documentation also falls into this category and is must-read, IMO.

The second category is "formal" control systems literature, more akin to what you would learn in a college class. There are many textbooks and online resources for this. You'll read about "classical" control systems in the frequency domain (Laplace and Z transforms, Root-Locus plots...eww, etc.) and also "modern" control systems in the time domain (state-space, pole placement, LQR, etc.). There is a ton of material to cover, so absent a mentor who is fluent in this stuff and/or a *very* motivated student with a strong math background, it's easy to drown before you can swim. The upside of this approach is you learn some very powerful tools that can help you design complex control systems (multi input/multi output, nonlinear systems, etc.) with confidence that they will behave as expected on real world hardware.

Motion profile and path planning is a bit of a separate beast, and you can find resources in the robotics and video game communities. Some buzzwords to search for: "Motion profile", "Pure pursuit", "Motion planning", "Path planning", "A*", "spline"
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 04:26 AM.

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