You should never, EVER bully, manipulate, or slander another team for the sake of winning. - Libby K [more]
 Chief Delphi Curve Driving Generator
 User Name Remember Me? Password
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 Thread Tools Rate Thread Display Modes
#31
04-02-2012, 02:48 PM
 theNerd Registered User FRC #3329 (Cam Bots) Team Role: Programmer Join Date: Jan 2011 Rookie Year: 2110 Location: St. Marys Posts: 50
Re: Curve Driving Generator

Quote:
 Originally Posted by MICHAELABICK 254 has something like this build into their drive code, though as I said before, I believe it also integrates the current speed of the robot(faster speed, bigger arc, slower speed, smaller arc). I would check their code, as they have made it public, and it is very refined.
I have checked their code and the sections that I have seen are not well documented and I am confused on the logic behind their code.
#32
04-03-2012, 12:04 AM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Curve Driving Generator

Quote:
 Originally Posted by theNerd How would I go about working with bezier curves as I have never worked with them in my life .
First play around with these Java applets to get a feel for what a Bezier curve is:

http://www.math.ucla.edu/~baker/java/hoefer/Bezier.htm

http://www.math.ubc.ca/~cass/gfx/bezier.html

... then I will try to answer your questions

#33
04-03-2012, 07:24 AM
 dbeckwith Lead Programmer AKA: Daniel Beckwith FRC #3205 (The Patriots) Team Role: Programmer Join Date: Jan 2010 Rookie Year: 2009 Location: USA Posts: 84
Re: Curve Driving Generator

Quote:
 Originally Posted by theNerd How would I go about working with bezier curves as I have never worked with them in my life .
Bezier curves are defined by a formula that can be generalized for any degree, but for the most common, degree 3, the equation for any point along the curve is: B(t) = (1 - t)^3 * P0 + 3 * (1 - t)^2 * t * P1 + 3 * (1 - t) * t^2 * P2 + t^3 * P3 for any t between 0 and 1, inclusive. So you have four control points in a degree 3 curve which you can use to define the shape of the curve, its endpoints, and its tangents at the endpoints (the applet Ether linked to are great for seeing how these affect the curve). I'm not a math genius like Ether so I'm not really sure exactly how to implement them into your question, but in my experience with computer graphics I've found that Bezier splines are easier to control in a way that makes sense than cubic splines.

The Wikipedia article on Bezier curves has a lot of cool information on them: http://en.wikipedia.org/wiki/Bezier_curves

Also if you needed to get the slope of a Bezier curve at some point for your pathing algorithm, I found this: http://www.cs.mtu.edu/~shene/COURSES...ezier-der.html
__________________
q = (2*b) | ~(2*b);

if (life.getLemons() != null) this.lemonade = new Drink(life.getLemons());
else throw new NoLemonsException("What now?");

#34
04-03-2012, 02:08 PM
 theNerd Registered User FRC #3329 (Cam Bots) Team Role: Programmer Join Date: Jan 2011 Rookie Year: 2110 Location: St. Marys Posts: 50
Re: Curve Driving Generator

Quote:
 Originally Posted by Ether ... then I will try to answer your questions ]
Ok, I am ready. I have quite a good feel for Bezier curves now....which is great timing since my Calc class just hit parametric equations.
#35
09-13-2012, 12:46 PM
 PTC_Chris PTC Senior Academic Program Manager no team (PTC Academic Program) Join Date: Sep 2012 Rookie Year: 2011 Location: United States Posts: 3
Re: Curve Driving Generator

I have been conducting Mathcad webinars for FIRST teams. A search turned up this conversation and I have implemented the Matrix Solution as a Mathcad worksheet. The attached .zip folder contains both a Mathcad Prime 2.0 and a .pdf version of the worksheet.

PTC is once again offering Mathcad Prime for free to participants in FIRST Robotics programs. Contact FIRSTsupport@ptc.com if you are interested in obtaining a copy of Mathcad Prime.

You can learn how to create Mathcad worksheets like this on our Wednesday Night Robotalk Webinars (7 pm EST). This Wednesday night (Sept 19 2012) we will focus on the tools used in the attached worksheet. To register for the webinar click here.

Chris
Attached Files
 Curve Driving Generator.zip (700.3 KB, 33 views)
#36
09-13-2012, 01:16 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Curve Driving Generator

Quote:
 Originally Posted by PTC_Chris I have implemented the Matrix Solution as a Mathcad worksheet.
Thanks for posting this Chris. Unfortunately, the example you picked is a case where a cubic polynomial is surely not what you'd want. A Bezier curve would give a much more desirable curve for the robot to follow. Does Mathcad support Bezier curves?

Attached is a Bezier curve for the example you gave.

Also, there's an Excel spreadsheet here for those who don't have Maxima* installed:

http://www.chiefdelphi.com/media/papers/2713

* Maxima is a free open-source Computer Algebra System, available for download at the link below. Highly recommended:

http://maxima.sourceforge.net/

Attached Thumbnails

Attached Files
 Bezier Maxima macro.txt (834 Bytes, 12 views)

Last edited by Ether : 09-13-2012 at 05:34 PM.
#37
09-14-2012, 08:39 AM
 PTC_Chris PTC Senior Academic Program Manager no team (PTC Academic Program) Join Date: Sep 2012 Rookie Year: 2011 Location: United States Posts: 3
Re: Curve Driving Generator

@Ether: The example in the .pdf was more deliberate than unfortunate. I chose a tangent line slope that would exagerate the effect and help high school students to make connections to their work in schools. (I am an educator, not an engineer.)

I included the .pdf more to show what a Mathcad worksheet looks like. I think it is more transparent than either Excel or Maxima because Mathcad uses standard math notation. The .pdf was not meant to be the primary contribution.

The Mathcad worksheet is a computational document, so it is possible to change the parameters. The worksheet is therefore a general method for calculating a cubic polynomial given the endpoints and tangent slopes. As you observed in your post, there are some examples where the solution is efficient, others where it is not. With the Mathcad worksheet, it is possible to quickly derive and plot a path and determine whether or not it is a solution worth implementing.

It is certainly possible to build a Mathcad worksheet to generate the Bezier Curve. I will add this to my "Want to Do" list and post it to the Thread when I cross it off. Thanks for the suggestion and the Excel worksheet. I'll probably convert your Excel spreadsheet to Mathcad.
#38
09-14-2012, 10:42 AM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Curve Driving Generator

Quote:
 Originally Posted by PTC_Chris @Ether: The example in the .pdf was more deliberate than unfortunate. I chose a tangent line slope that would exagerate the effect and help high school students to make connections to their work in schools. (I am an educator, not an engineer.)
Ah. Thanks for that clarification. In that context, I think your example is excellent.

I'm both an engineer (now retired after 33 years) and an educator. I share your passion about teaching.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Sensors     Control System     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics Competition     Awards         Chairman's Award     Rules/Strategy         Scouting     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A Other     Chit-Chat         Games/Trivia         Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         The Blue Alliance     FIRST In the News...     FIRST Lego League     FIRST Tech Challenge     VEX     Televised Robotics     Math and Science     Robot in 3 Days (RI3D)     NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

All times are GMT -5. The time now is 06:11 AM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top

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