Hybrid A Star achieved very good results in the DARPA Urban Challenge. And after years of development, the algorithm has been verified to perform very well in parking and some autonomous driving environments without driving rules.
This code is based on the works of https://github.com/zm0612/Hybrid_A_Star and https://github.com/teddyluo/hybrid-a-star-annotation. See bilibili
(1). C++11 or C++0x Compiler
(2). ROS Melodic: I'm developing on the melodic version. Using other versions of ROS 1, it should also work normally
sudo apt-get install ros-noetic-costmap-*
sudo apt-get install ros-noetic-map-server
sudo apt-get install ros-noetic-tf
(3). Eigen 3
sudo apt-get install libeigen3-dev
(4). glog
sudo apt-get install libgoogle-glog-dev
(5). osqp
git clone --recursive -b release-0.6.3 https://github.com/oxfordcontrol/osqp.git
cd osqp
mkdir build && cd build
cmake ..
make
sudo make install
# new folder
mkdir your_ws/src -p
cd your_ws/src
# Clone the repository
git clone https://github.com/qimao7213/Hybrid_A_Star-and-mpc_controller.git
git clone https://github.com/qimao7213/MPC_car.git
# Build
cd your_ws
catkin_make
source devel/setup.bash
# Run Hybrid A Star
roslaunch hybrid_a_star_zm0612 hybrid_a_star_zm0612.launch
# Run mpc
roslaunch mpc_car simulation.launch
The starting point is selected by the 2D Pose Estimate
in rviz, and the end point is selected by the 2D Nav Goal
.
I provide multiple maps, you just need to modify the variable image in
hybrid_a_star/maps/map.yaml
file. The map resolution can be changed.
If your start and end points are too close to obstacles, the collision detection mechanism may be triggered and no feasible paths will be searched and displayed
You can change the algorithm parameters at hybrid_a_star_zm0612.launch.
当前程序可能还存在一些 Bug 或不稳定的地方。如果你在使用过程中发现了问题,或者有更好的解决方案,请不要犹豫,通过以下方式告诉我:
The current program may still have some bugs or instability issues. If you encounter any problems during use or have a better solution, please don't hesitate to let me know through the following methods:
-
提交 Issue | Submit an Issue: 你可以在 [Issues 页面] 提交一个新的 Issue,描述你遇到的问题或改进建议。
You can submit a new issue on the [Issues page], describing the problem you've encountered or your improvement suggestions.
-
Pull Request | Pull Request: 如果你已经有了解决方案,可以直接 Fork 这个仓库并提交 Pull Request,我会尽快进行审核和合并。
If you already have a solution, you can directly Fork this repository and submit a Pull Request. I will review and merge it as soon as possible.
(1). Practical Search Techniques in Path Planning for Autonomous Driving
(2). The Bresenham Line-Drawing Algorithm
(3). A simple car