- Author: Rayne Milner
- Maintainer: Rayne Milner
- Contact: rmmilner@ucdavis.edu
- Org: University of California at Davis
This Path planning algorithm is a procedure for generating a path from start to goal state that respects constraints on the 0th, 1st and 2nd derivative of curvature and velocity. The algorithm is taken from Juha Backman's 2015 paper "Smooth turning path generation for agricultural vehicles in headlands".
Files are ready for use on download.
Usage only requires one import command from SmoothPlannerClass import SmoothPathPlanner
.
The planner can be used as a generic planner to find the shortest path between two states with elements: [x, y, theta, velocity, curvature].
The typical sequence of commands to call the planner method is as follows:
- Instantiate Planner Class:
inst = SmoothPathPlanner(timeStep)
- Set Constraints and desired speeds:
inst.setConstraints(kConstraints, vConstraints, headlandSpeed, headlandSpeedReverse)
- Set Start and Goal States:
inst.setStartAndGoal(initialState, finalState)
- Call Shortest planner method
shortestPath = planSmoothInst.planShortest()
The returned path then has member data which contains the sequence of states from start to goal as well as controls.
A few other functionalities are provided by the class:
-
If the user desired to plot a path with a specific turning type instead of the shortest path of any type, the user can choose to specify the path parameters with
setNominalCurvatures
and then instead of callingplanShortest()
callplan()
-
The path can be plotted using
plotPath()
-
Control inputs can be plotted with
plotControls()
once the final path has been returned (plan or planShortest has been called).
MIT License
Copyright (c) [2021] [Rayne Michael Milner]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.