Giter Site home page Giter Site logo

libai1943 / cartesianplanner Goto Github PK

View Code? Open in Web Editor NEW
252.0 16.0 93.0 1.84 MB

Source codes of “Autonomous Driving on Curvy Roads without Reliance on Frenet Frame: A Cartesian-based Trajectory Planning Method” published in IEEE Trans. Intelligent Transportation Systems

License: GNU General Public License v3.0

CMake 1.79% C++ 91.69% Python 6.52%

cartesianplanner's Introduction

Cartesian Planner ROS Package

C++/ROS Source Codes for "Autonomous Driving on Curvy Roads without Reliance on Frenet Frame: A Cartesian-based Trajectory Planning Method" published in IEEE Trans. Intelligent Transportation Systems by Bai Li, Yakun Ouyang, Li Li, and Youmin Zhang.

OnRoadPlanning

Installation

Requirements

  • ROS Melodic or later
  • Python3

Install packages required by Ipopt

sudo apt-get install gcc g++ gfortran git patch wget pkg-config liblapack-dev libmetis-dev

Clone repository to any catkin workspace and compile workspace

cd ~/catkin_ws/src
git clone https://github.com/libai1943/CartesianPlanner.git cartesian_planner
cd .. && catkin_make
source devel/setup.bash

OPTIONAL: build and install Harwell Subroutine Library (HSL) (recommended for better performance)

git clone https://github.com/coin-or-tools/ThirdParty-HSL.git

# Obtain a tarball with HSL source code from http://www.hsl.rl.ac.uk/ipopt/ and unpack this tarball
tar -zxvf coinhsl-x.y.z.tar

# Rename the directory `coinhsl-x.y.z` to `coinhsl`, or set a symbolic link:
ln -s coinhsl-x.y.z coinhsl

./configure
make
sudo make install

# create symlink for Ipopt
sudo ln -s /usr/local/lib/libcoinhsl.so /usr/local/lib/libhsl.so
# Re-build workspace
cd ~/catkin_ws && catkin_make -DWITH_HSL=ON

Example

tits_pedestrian_static_dynamic_3.mp4

Example test case with 6 pedestrians, 3 moving vehicles and 2 static vehicles.

roslaunch cartesian_planner pedestrian_test.launch

Click anywhere in Rviz window with the 2D Nav Goal Tool to start planning.


Generate and run new random case:

roslaunch cartesian_planner random_pedestrian_test.launch

Acknowledgement

CASADi

Special thanks to Baidu Apollo for common math libraries


Copyright (C) 2022 Bai Li and Yakun Ouyang

Users must cite the following article if they use the source codes to conduct simulations in their new publications. Bai Li, Yakun Ouyang, Li Li, and Youmin Zhang, “Autonomous driving on curvy roads without reliance on Frenet frame: A Cartesian-based trajectory planning method,” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 9, pp. 15729 - 15741, 2022. available at https://doi.org/10.1109/TITS.2022.3145389

cartesianplanner's People

Contributors

libai1943 avatar yakunouyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cartesianplanner's Issues

error

-- Configuring incomplete, errors occurred!
See also "/home/olh/catkin_ws/build/vendor/src/casadi-external-build/CMakeFiles/CMakeOutput.log".
cartesian_planner/CMakeFiles/casadi-external.dir/build.make:108: recipe for target 'vendor/src/casadi-external-stamp/casadi-external-configure' failed
make[2]: *** [vendor/src/casadi-external-stamp/casadi-external-configure] Error 1
CMakeFiles/Makefile2:917: recipe for target 'cartesian_planner/CMakeFiles/casadi-external.dir/all' failed
make[1]: *** [cartesian_planner/CMakeFiles/casadi-external.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed

what happen

[reference_publisher_node-2] process has died

单启reference_publisher.py会报这样的问题
from cartesian_planner.msg import CenterLine, CenterLinePoint, Obstacles, DynamicObstacles, DynamicObstacle,
ImportError: No module named cartesian_planner.msg

Could NOT find METIS (missing: METIS_DIR)

when i run catkin_make,it outputs:

-- x86_64 architecture detected - setting flag -fPIC
get_property(PKG_HELP CACHE WITH_BUILD_IPOPT PROPERTY HELPSTRING)
get_property(PKG_HELP CACHE WITH_BUILD_MUMPS PROPERTY HELPSTRING)
METIS: find via CONFIG
-- Could NOT find METIS (missing: METIS_DIR)
METIS: 0
-- Found METIS: /usr/lib/x86_64-linux-gnu/libmetis.so
-- Found METIS include dir: /usr/include
CMake Error at cmake/FindMETIS.cmake:52 (target_link_libraries):
  Cannot specify link libraries for target "metis::metis" which is not built
  by this project.
Call Stack (most recent call first):
  CMakeLists.txt:884 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/xhy/catkin_ws/build/vendor/src/casadi-external-build/CMakeFiles/CMakeOutput.log".
cartesian_planner/CMakeFiles/casadi-external.dir/build.make:108: recipe for target 'vendor/src/casadi-external-stamp/casadi-external-configure' failed
make[2]: *** [vendor/src/casadi-external-stamp/casadi-external-configure] Error 1
CMakeFiles/Makefile2:917: recipe for target 'cartesian_planner/CMakeFiles/casadi-external.dir/all' failed
make[1]: *** [cartesian_planner/CMakeFiles/casadi-external.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

there are the installed packages:

liblapack-dev is already the newest version (3.7.1-4ubuntu1).
libmetis-dev is already the newest version (5.1.0.dfsg-5).
pkg-config is already the newest version (0.29.1-0ubuntu2).
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
gcc is already the newest version (4:7.4.0-1ubuntu2.3).
gfortran is already the newest version (4:7.4.0-1ubuntu2.3).
git is already the newest version (1:2.17.1-1ubuntu0.18).
patch is already the newest version (2.7.6-2ubuntu1.1).
wget is already the newest version (1.19.4-1ubuntu2.2).

Error : TypeError: write() argument must be str, not bytes

Error output:

Traceback (most recent call last):
  File ".../CartesianPlanner/script/reference_publisher.py", line 256, in <module>
    main()
  File ".../CartesianPlanner/script/reference_publisher.py", line 235, in main
    pickle.dump({"center": center_line, "static": static_obstacles, "dynamic": dynamic_obstacles}, f)
TypeError: write() argument must be str, not bytes

For Python 3.x.x,should be changed to open in binary read-write mode(' wb+') at line 234 in "/script/reference_publisher.py" .

//original code
with open(pickle_path, 'w') as f:

//changed code for python 3.x.x
with open(pickle_path, 'wb') as f:

一个关于代码细节的问题

非常感谢分享这么好的研究工作,我在阅读代码时候,发现trajectory_optimizer.cpp文件中的result = {{x - incremental[0], y - incremental[2]}, {x + incremental[1], y + incremental[3]}}的这行代码,更改为result = {{x - incremental[0]-radius, y - incremental[2]-radius}, {x + incremental[1]+radius, y + incremental[3]+radius}};是否更为合适??感谢您的解答

ROS2

First of all, thank you for such a great project!
May I ask if ROS2 foxy can run this project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.