Giter VIP home page Giter VIP logo

ss47816 / fiss_plus_planner Goto Github PK

View Code? Open in Web Editor NEW
35.0 2.0 5.0 226.91 MB

[IROS 2023] FISS+: Efficient and Focused Trajectory Generation and Refinement using Fast Iterative Search and Sampling Strategy

License: Apache License 2.0

Python 100.00%
autonomous-driving autonomous-vehicles autonomus-robots frenet iros2023 mobile-robot-navigation mobile-robot-path-planning mobile-robots motion-planning path-planning

fiss_plus_planner's Introduction

FISS+ Planner

[IROS 2023] FISS+: Efficient and Focused Trajectory Generation and Refinement using Fast Iterative Search and Sampling Strategy

Ubuntu Python CodeFactor GitHub Repo stars GitHub Repo forks

drawing drawing drawing

drawing drawing drawing

drawing drawing drawing

Video

video

Our paper has been accepted by IROS 2023.

@INPROCEEDINGS{Sun_fiss+_2023,
  author={Sun, Shuo and Chen, Jie and Sun, Jiawei and Yuan, Chengran and Li, Yuanchen and Zhang, Tangyike and Ang, Marcelo H.},
  booktitle={2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  title={FISS+: Efficient and Focused Trajectory Generation and Refinement Using Fast Iterative Search and Sampling Strategy},
  year={2023},
  pages={10527-10534},
  doi={10.1109/IROS55552.2023.10341498},
  organization={IEEE}
}

Dependencies

  • python>=3.8
  • commonroad==2022.3
  • cvxpy>=1.0.0

Install

We recommend using the anaconda environment

# Clone this repository to a location <PARENT_DIR> (change this part)
cd <PARENT_DIR>
git clone https://github.com/SS47816/fiss_plus_planner
cd fiss_plus_planner
# Create a conda envrionment from the file
conda env create -f environment.yml
conda activate cr
# Export path
export PYTHONPATH=$PYTHONPATH:"<PARENT_DIR>/fiss_plus_planner"

Usage

  1. You may modify the configuration file located at ./cfgs/demo_config.yaml

  2. Run the demo script:

    python3 scripts/demo_cr.py

    The result of each scenario will be save as a separate .gif file under the specified ouput directory (./data/output/gif/)

Kown Issues and Fixes

1. AttributeError: 'numpy.int64' object has no attribute 'intersects'

As pointed out by @ggosjw, you might encounter an error similar to this:

  Traceback (most recent call last):
    File "<YOUR_DIR>/fiss_plus_planner/scripts/demo_cr.py", line 28, in
    planning(cfg, output_dir, input_dir, file)
    File "<YOUR_DIR>/fiss_plus_planner/planners/benchmark/planning.py", line 314, in planning
    _, ego_vehicle_trajectory, _, time_list, _, fplist = frenet_optimal_planning(
    File "<YOUR_DIR>/fiss_plus_planner/planners/benchmark/planning.py", line 38, in frenet_optimal_planning
    global_plan = global_planner.plan_global_route(scenario, planning_problem)
    File "<YOUR_DIR>/fiss_plus_planner/planners/commonroad_interface/global_planner.py", line 38, in plan_global_route
    route_planner = RoutePlanner(scenario, planning_problem, backend=RoutePlanner.Backend.NETWORKX_REVERSED)
    File "<YOUR_DIR>/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad_route_planner/route_planner.py", line 138, in init
    self.id_lanelets_start = self._retrieve_ids_lanelets_start()
    File "<YOUR_DIR>/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad_route_planner/route_planner.py", line 192, in _retrieve_ids_lanelets_start
    list_ids_lanelets_start = self.lanelet_network.find_lanelet_by_position([post_start])[0]
    File "<YOUR_DIR>/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1549, in find_lanelet_by_position
    return [[self._get_lanelet_id_by_shapely_polygon(lanelet_shapely_polygon) for lanelet_shapely_polygon in
    File "<YOUR_DIR>/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1549, in
    return [[self._get_lanelet_id_by_shapely_polygon(lanelet_shapely_polygon) for lanelet_shapely_polygon in
    File "<YOUR_DIR>/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1551, in
    lanelet_shapely_polygon.intersects(point) or lanelet_shapely_polygon.buffer(1e-15).intersects(point)]
    AttributeError: 'numpy.int64' object has no attribute 'intersects'

which might be caused by a newer version of the commonroad pkg.

Fix

Find function find_lanelet_by_position() in commonroad/scenario/lanelet.py, and change it to:

  def find_lanelet_by_position(self, point_list: List[np.ndarray]) -> List[List[int]]:
    """
    Finds the lanelet id of a given position

    :param point_list: The list of positions to check
    :return: A list of lanelet ids. If the position could not be matched to a lanelet, an empty list is returned
    """
    assert isinstance(point_list,
                      ValidTypes.LISTS), '<Lanelet/contains_points>: provided list of points is not a list! type ' \
                                        '= {}'.format(type(point_list))

    return [[self._get_lanelet_id_by_shapely_polygon(lanelet_shapely_polygon) for lanelet_shapely_polygon in
            self._buffered_polygons.values() if
            lanelet_shapely_polygon.intersects(point) or lanelet_shapely_polygon.buffer(1e-15).intersects(point)]
            for point in [ShapelyPoint(point) for point in point_list]]

Contribution

You are welcome contributing to the package by opening a pull-request

We are following: Google Python Style Guide

License

Licensed under Apache License 2.0

fiss_plus_planner's People

Contributors

ss47816 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

Watchers

 avatar  avatar

fiss_plus_planner's Issues

Error query:AttributeError: 'numpy.int64' object has no attribute 'intersects'

Thank u for open sourcing the your great work!
I got a bug shows like following:
Traceback (most recent call last):
File "/home/jiawei/fiss_plus_planner/scripts/demo_cr.py", line 28, in
planning(cfg, output_dir, input_dir, file)
File "/home/jiawei/fiss_plus_planner/planners/benchmark/planning.py", line 314, in planning
_, ego_vehicle_trajectory, _, time_list, _, fplist = frenet_optimal_planning(
File "/home/jiawei/fiss_plus_planner/planners/benchmark/planning.py", line 38, in frenet_optimal_planning
global_plan = global_planner.plan_global_route(scenario, planning_problem)
File "/home/jiawei/fiss_plus_planner/planners/commonroad_interface/global_planner.py", line 38, in plan_global_route
route_planner = RoutePlanner(scenario, planning_problem, backend=RoutePlanner.Backend.NETWORKX_REVERSED)
File "/home/jiawei/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad_route_planner/route_planner.py", line 138, in init
self.id_lanelets_start = self._retrieve_ids_lanelets_start()
File "/home/jiawei/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad_route_planner/route_planner.py", line 192, in _retrieve_ids_lanelets_start
list_ids_lanelets_start = self.lanelet_network.find_lanelet_by_position([post_start])[0]
File "/home/jiawei/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1549, in find_lanelet_by_position
return [[self._get_lanelet_id_by_shapely_polygon(lanelet_shapely_polygon) for lanelet_shapely_polygon in
File "/home/jiawei/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1549, in
return [[self._get_lanelet_id_by_shapely_polygon(lanelet_shapely_polygon) for lanelet_shapely_polygon in
File "/home/jiawei/anaconda3/envs/cr/lib/python3.10/site-packages/commonroad/scenario/lanelet.py", line 1551, in
lanelet_shapely_polygon.intersects(point) or lanelet_shapely_polygon.buffer(1e-15).intersects(point)]
AttributeError: 'numpy.int64' object has no attribute 'intersects'

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.