|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#5
|
|||
|
|||
|
Re: Smooth Path Generator for RoboRio 2015
Please take a read of the ReadMe on github, i try to explain the overall workings of the algorithm. But the general idea is this:
1. The original path is a collection of straight lines (the waypoint path) 2. We can interject any number of intermediate points in a straight line without changing the line equation itself (we inject the correct number of points so that there is one sample per robot timeStep) 3. Now that we have all of these injected points, we can push and pull on them to coerce them into a smooth path. The result is a bunch of straight lines, which appears smooth globally, and has smooth transitions. 4. We use gradient descent which is a first order optimization algorithm to push or pull each point just the right amount, I have "tuned" the parameters to converge very quickly so as to be useful for near real-time applications. If tuned incorrectly, the algorithm may never converge. The default parameters, should always converge, let me know if they do not. Take a look at the ReadMe for more info. Quote:
Quote:
It is up to the user to determine if the robot can sustain the max velocoity produced by the path, or if the speed controller on the robot can keep up with the velocity transitions (most important), The velocity can be reduced by increasing the time requirement to the calculate method. I did this on purpose, because it is important to understand when the path will end for autonomous routines, so by forcing the user to specify that parameter, they too will be able to see that they may or may not be able to achieve what they want in auto because the velocity profile is too high. The difference is that you are trying to solve for a continuously smooth path. Which requires a lot of computation. The path algorithm I supplied uses the ideas behind integration to generate a smooth path from smaller straight lines. Each line has a deterministic slope for the entire line duration, You can calculate left and right paths based on a little trig and determining the point +/- 90 degrees from your original point and slope. You do not need thousands of points to travel a few feet in a match. So you can safely reduce the number of points needed to speed up computation time. Please take a look at the readme entirely, it should answer a lot of your questions. I also left my pseudo code in each algorithm to help others understand the theory better. I will try to put together some slides on how it works, but in the mean time, try it out and let me know how its working for you. I may be out of touch for a while, We have an off-season competition next sat, we are also a 2015 alpha/beta test team, and we also have a bunch of off season work we are doing. Regards, Kevin |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|