Go to Post Impressive. A harsh reminder of the kind of force that FRC bots exert. - Racer26 [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 22 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 04-07-2014, 15:50
artK artK is offline
Just Another Person
AKA: Art Kalb
no team (No Team)
 
Join Date: Dec 2011
Rookie Year: 2010
Location: Rochester, NY
Posts: 119
artK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond reputeartK has a reputation beyond repute
Re: Team 254 - 2014 FRC Code

Quote:
Originally Posted by magnets View Post
I'm not 100% exactly sure how 254's code works, but I'd be willing to bet it uses something similar to what is described in this article. They can just chain the splines together and end up with a continuous and differentiable (smooth) curve because they can set the slope at the beginning and end of each segment equal.
Quintic Hermite Spline Interpolation is indeed what we used, though there was a fair bit of code dedicated to simplifying the coordinate system, so that the x axis was a straight line from waypoint A to waypoint B, and the headings were changed to account for this, though we added the condition that abs(Theta)< PI/2 so the spline can be solved for in our system. We assigned a value d to be the distance along the x axis. Attached is a picture showing the rotation and translation of the coordinate system.

We then solved for an h(x)= ax^5 + bx^4 + .... + f which has the following conditions.
h(0) = 0; h(d) = 0
h'(0) = tan(Theta A); h'(d) = tan(Theta B)
h"(0) = 0; h"(d) = 0
The coefficients then become functions of d, tan(Theta A), and tan(Theta B)

Initially, we ran cubic spline interpolation and saw that is was able to go from A to B smoothly. However, we soon realized that when we went from A to B to C there was some twitching in the robot at B. So to fix this we add the h" terms and set them to zero so the robot would always drive straight at the waypoints.

This was among the funnest piece of code I helped write, and I was super happy to see it impress most of the crowd during the Einstein finals.
Attached Thumbnails
Click image for larger version

Name:	Chief Delphi Quintic Hermite Spline Interpolation.png
Views:	405
Size:	17.4 KB
ID:	17148  
__________________
Art Kalb
Team 254 (2011-2014): Head Scout, Programmer
2011, 2014 World Champions
Reply With Quote
 


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 07:30.

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