Go to Post The person that I would, without a doubt, would like to meet the most is my sanity. - lukevanoort [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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-31-2016, 01:07 PM
Roboprog77 Roboprog77 is offline
Registered User
FRC #1403
 
Join Date: Mar 2016
Location: New Jersey
Posts: 3
Roboprog77 is an unknown quantity at this point
Help with TrajectoryLib

Hello,

Based on Team 254's TrajectoryLib, can somebody explain how I can find the kTurn, kA, and kV values? Additionally, what do these values represent and control?

Thank you,
Roboprog77

Last edited by Roboprog77 : 03-31-2016 at 01:26 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-31-2016, 02:42 PM
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 688
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Help with TrajectoryLib

See the presentation that 254 gave at the 2015 Championships Conference (relevant part)
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 03-31-2016, 04:14 PM
Roboprog77 Roboprog77 is offline
Registered User
FRC #1403
 
Join Date: Mar 2016
Location: New Jersey
Posts: 3
Roboprog77 is an unknown quantity at this point
Re: Help with TrajectoryLib

Could you explain how to find kTurn and what it represents and controls. I could not find kTurn in 254's presentation.

Thank you for your help,
Roboprog77
Reply With Quote
  #4   Spotlight this post!  
Unread 03-31-2016, 04:32 PM
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Help with TrajectoryLib

kTurn is multiplied by the heading error (difference between current heading and desired heading of the trajectory segment) and added/subtracted to the left and right outputs, respectively. This helps the robot stay facing the right heading while it follows the trajectory. Another way to think about it is the P constant of a PID controller for the heading with I=0, D=0.

This the code that implements this behavior.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
Reply With Quote
  #5   Spotlight this post!  
Unread 03-31-2016, 05:26 PM
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,182
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Help with TrajectoryLib

kTurn was the P gain for a controller which tried to keep the robot's heading (measured by a gyro) on course with where it currently was in a pre computed 2d trajectory. I'd tune this by writing some code that tries to get your robot to turn 45 degrees in place and picking a gain that gets close the robot to the target with minimal overshoot. If you run the full controller and bot starts to wander off course and can't make harder turns, increase the gain. If you see oscillation, decrease the gain. If your drivetrain is relatively well balanced efficiency wise, you just need to be in the right ballpark.

Do you need 2d trajectories for your task?
Reply With Quote
  #6   Spotlight this post!  
Unread 03-31-2016, 06:45 PM
Roboprog77 Roboprog77 is offline
Registered User
FRC #1403
 
Join Date: Mar 2016
Location: New Jersey
Posts: 3
Roboprog77 is an unknown quantity at this point
Re: Help with TrajectoryLib

Quote:
Originally Posted by Tom Bottiglieri View Post
kTurn was the P gain for a controller which tried to keep the robot's heading (measured by a gyro) on course with where it currently was in a pre computed 2d trajectory. I'd tune this by writing some code that tries to get your robot to turn 45 degrees in place and picking a gain that gets close the robot to the target with minimal overshoot. If you run the full controller and bot starts to wander off course and can't make harder turns, increase the gain. If you see oscillation, decrease the gain. If your drivetrain is relatively well balanced efficiency wise, you just need to be in the right ballpark.

Do you need 2d trajectories for your task?
Thank you for your help. We do require 2d trajectories for our task.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-31-2016, 09:45 PM
JohnM's Avatar
JohnM JohnM is offline
Registered User
FRC #5854 (Glitch)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: North Carolina
Posts: 53
JohnM has a spectacular aura aboutJohnM has a spectacular aura about
Re: Help with TrajectoryLib

Quote:
Originally Posted by Tom Bottiglieri View Post
Do you need 2d trajectories for your task?
Not that I'm using 2D trajectories, but in what cases would you use them? When did you guys use them?
Reply With Quote
  #8   Spotlight this post!  
Unread 04-13-2016, 09:51 PM
axiomofdarkness's Avatar
axiomofdarkness axiomofdarkness is offline
Registered User
FRC #1403 (Cougar Robotics)
Team Role: Alumni
 
Join Date: Mar 2015
Rookie Year: 2013
Location: United States
Posts: 21
axiomofdarkness has a spectacular aura aboutaxiomofdarkness has a spectacular aura aboutaxiomofdarkness has a spectacular aura about
Re: Help with TrajectoryLib

Quote:
Originally Posted by JohnM View Post
Not that I'm using 2D trajectories, but in what cases would you use them? When did you guys use them?

We are using them to drive in autonomous - we initially did not have vision tracking and used them to drive up to the batter and shoot in autonomous. Well, in theory we did. We didn't have much time to test it and were never confident enough to run it in a real match.

We also just thought it was interesting and it was definitely a fun exercise to try and understand TrajectoryLib.

Last edited by axiomofdarkness : 04-13-2016 at 09:52 PM. Reason: Forgot to add quote block
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 09:48 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