OCCRA
Go to Post As you get more into your years in FRC, you start becoming friends with more people. You should try it out. Robotics people are pretty nice. - [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media  
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 11-08-2018, 01:42 AM
Mahim's Avatar
Mahim Mahim is offline
Registered User
FRC #4571 (Rambots)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2016
Location: New York
Posts: 3
Mahim is an unknown quantity at this point
How would I find robot constants for motion profiling?

I am just wondering how would I measure a robot's maximum velocity, acceleration, and jerk? Is there a specific method? How would I use it to generate a path using pathfinder?
Reply With Quote
  #2   Spotlight this post!  
Unread 11-08-2018, 10:26 AM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 704
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: How would I find robot constants for motion profiling?

In general it's something you'd define to limit how aggressive you want your pathplanner to be.

In theory you could set them equal to the mechanical limits of the robot, but in practice those limits can change during a competition (adding a bit of extra grease, changing tires, different carpet, changing battery charge, changing weight, motor temperature... the list goes on).

If you have encoders hooked up, you can drive your robot as fast as possible by jamming the control stick forward, and measuring the wheel RPM (which you can convert to linear velocity). The highest speed you see on carpet is probably your max velocity. The fastest you see your speed change due to control inputs alone (ie, not running into walls) is your max acceleration. The fastest you see your acceleration change is your max jerk. You could in theory measure all these things, account for a margin of error (say, multiply by 0.8), and go with those numbers.

As far as I know though, we usually start by tuning those numbers very very conservatively, and ensuring the auto routine fundamentally accomplishes what we needed (abet slowly). Then we start ratcheting up the numbers as high as we can without losing accuracy of the routine.

I should also note, I'm not super familiar with how the max parameters impact Jaci's pathplanner behavior. I'm assuming these parameters are what dictate the allowed performance envelope, and pathplanner honors them while generating its output.

Last edited by gerthworm : 11-08-2018 at 10:28 AM.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-08-2018, 10:40 AM
Prateek M's Avatar
Prateek M Prateek M is offline
Kotlin Master Race
FRC #5190 (Green Hope Falcons)
Team Role: Programmer
 
Join Date: May 2018
Rookie Year: 2018
Location: Cary, North Carolina
Posts: 41
Prateek M is on a distinguished road
Re: How would I find robot constants for motion profiling?

The version of Pathfinder that most people are familiar with (v1) honors the max velocity, acceleration, and jerk constraints when generating the velocity profile for the center of the robot. Often times, this profile has to be split into separate profiles for the left and right sides of the robot. This "splitting" does not take the constraints into consideration.

For example, if you are negotiating a sharp right-turn curve and your velocity constraint is 9 feet per second, the central profile will max out at 9 feet per second; however, when it's split up into the profiles for the left and right sides of the drivetrain, the left side profile will have velocities higher than 9 feet per second in order to negotiate the curve.

The newer version of Pathfinder which was released about a month ago takes into consideration the dynamics of the drivetrain when splitting up the central profile. This would cause the robot to slow down near the curves so that no side of the drivetrain will be commanded a velocity that is more than the constraint specified.

Last edited by Prateek M : 11-08-2018 at 10:42 AM.
Reply With Quote
  #4   Spotlight this post!  
Unread 11-08-2018, 01:16 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,905
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: How would I find robot constants for motion profiling?

Quote:
Originally Posted by gerthworm View Post
The fastest you see your speed change due to control inputs alone (ie, not running into walls) is your max acceleration. The fastest you see your acceleration change is your max jerk.
This is not correct; see the whitepaper in my signature for more details.

In order to guarantee an achievable profile, max acceleration and max velocity must be jointly chosen so that the required voltage is not greater than what the battery can provide (after taking into account voltage drop due to internal resistance of the battery and robot wiring). As mentioned above, in pathfinder v1, turning will violate these constraints and extra "headroom" is required.

Max jerk is theoretically determined by motor inductance, though in our experimental data we've found it's generally no more than a third of a second or so from 0 to max acceleration, and it can safely be neglected.
__________________
"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


FRC Drivetrain Characterization
Reply With Quote
  #5   Spotlight this post!  
Unread 11-08-2018, 01:29 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 704
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: How would I find robot constants for motion profiling?

Quote:
Originally Posted by Oblarg View Post
This is not correct; see the whitepaper in my signature for more details.

In order to guarantee an achievable profile, max acceleration and max velocity must be jointly chosen so that the required voltage is not greater than what the battery can provide (after taking into account voltage drop due to internal resistance of the battery and robot wiring). As mentioned above, in pathfinder v1, turning will violate these constraints and extra "headroom" is required.

Max jerk is theoretically determined by motor inductance, though in our experimental data we've found it's generally no more than a third of a second or so from 0 to max acceleration, and it can safely be neglected.
Hmmmm ok, looking through whitepaper. I think I understand the comment about where the battery-provided voltage dictating acceleration/velocity constraints.

I think I might have made my explanation overly complex: All I meant to imply was that you should run some trials on the robot, record some data, and use this information as the basis for determining what the drivetrain's max achievable velocity/acceleration/jerk could be.

EDIT: If I could make a guess - my error is in the detail of how you "use this information". You cannot pick the global max acceleration over a sample set independently of the global max velocity - max acceleration is a function of velocity. At best you might be able to pick a single point in time that reflects the best acceleration & velocity?

I'm assuming that if a set of input commands in teleop can produce a certain velocity profile, that same profile should be achievable in autonomous. I think this is a valid simplification, but am not as certain now.

Understood that even with those constraints entered into the V1 pathfinder, the resulting paths may actually violate it for the overall robot. With this I presume there is further "margin of error" required to correct for it? Or alter the path generation algorithm?

Last edited by gerthworm : 11-08-2018 at 01:33 PM.
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 01:26 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi