https://github.com/LiJiangnanBit/path_optimizer
Optimization-based real-time path planning for vehicles.
https://github.com/LiJiangnanBit/path_optimizer
autonomous-driving osqp osqp-eigen path-optimization path-planning quadratic-programming robotics
Last synced: 2 months ago
JSON representation
Optimization-based real-time path planning for vehicles.
- Host: GitHub
- URL: https://github.com/LiJiangnanBit/path_optimizer
- Owner: LiJiangnanBit
- License: mit
- Created: 2020-02-13T08:59:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-24T01:17:19.000Z (over 1 year ago)
- Last Synced: 2024-11-14T04:34:41.183Z (8 months ago)
- Topics: autonomous-driving, osqp, osqp-eigen, path-optimization, path-planning, quadratic-programming, robotics
- Language: C++
- Homepage:
- Size: 11.3 MB
- Stars: 540
- Watchers: 13
- Forks: 140
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# path_optimizer
# :bell: CHECK OUT THE NEWER VERSION [path_optimizer_2](https://github.com/LiJiangnanBit/path_optimizer_2) and [path_optimizer_ilqr](https://github.com/LiJiangnanBit/path_optimizer_ilqr)
 
**This ROS package generates feasible paths for non-holonomic vehicles.**
## Simulation videos
#### (1) [Simulation in dynamic environment](https://vimeo.com/498950818)
#### (2) [Simulation with complex static obstacles](https://vimeo.com/498591477)
## Run demos
### 0. Install dependencies and build
- ROS kinetic on Ubuntu 16.04
- OpenCV 3
~~~
mkdir -p workspace/src && cd workspace/src
git clone [email protected]:LiJiangnanBit/path_optimizer.git
sudo bash path_optimizer/scripts/install_deps.sh
cd ..
catkin build path_optimizer
source devel/setup.bash
~~~
*install_deps.sh* will install other dependencies (Those already installed will be skipped).
These dependencies include:
- [ipopt 3.12.4](https://coding.net/u/aRagdoll/p/Ipopt-3.12.4/git)
- [cppad 20180000.0](https://www.coin-or.org/download/source/CppAD/cppad-20180000.0.gpl.tgz)
- [google benchmark](https://github.com/google/benchmark)
- [glog](https://github.com/google/glog)
- [gflags](https://github.com/gflags/gflags)
- [osqp-eigen](https://github.com/robotology/osqp-eigen)
- [grid_map](https://github.com/ANYbotics/grid_map)
- [ros_viz_tools](https://github.com/Magic-wei/ros_viz_tools)
- [tinyspline_ros](https://github.com/qutas/tinyspline_ros).### 1. Demo
A png image is loaded as the grid map. You can click to specify the global reference path and the start/goal state of the vehicle.
~~~
roslaunch path_optimizer demo.launch
~~~
#### (1) Pick reference points using "Publish Point" tool in RViz.
- Pick at least six points.
- There are no hard and fast rules about the spacing of the points.
- If you want to abandon the chosen points, just double click anywhere when using the "Publish Point" tool.
- You can replace `gridmap.png` with other black and white images. Note that the resolution in `demo.cpp` is set to 0.2m, whick means that the length of one pixel is 0.2m on the map.
- In application, the reference path is given by a global path or by a search algorithm like A*.
#### (2) Pick start state using "2D Pose Estimate" tool and pick goal state using "2D Nav Goal" tool.
- Currently, it's not strictly required to reach the goal state. But this can be changed.
- The start state must be ahead of the first reference point.
### 2. Benchmark test
This is a computation time test.```
rosrun path_optimizer path_optimizer_benchmark
```## Usage
Refer to [demo.cpp](https://github.com/LiJiangnanBit/path_optimizer/blob/master/src/test/demo.cpp)
The parameters that you can change can be found in `planning_flags.cpp`.## How it works
### Refer [here](https://github.com/LiJiangnanBit/path_optimizer/wiki).
1. Take inputs (red dots):

2. (Optional) Use B spline curve fitting to make the path continuous and then search around it for a more reasonable reference path (yellow dots).
This step can be skipped by changing settings.

3. Smooth the reference path using IPOPT (yellow curve).

4. Represent the path planning problem as a QP and solve it using OSQP.
