Skip to content

Latest commit

 

History

History
executable file
·
197 lines (138 loc) · 7.48 KB

README.md

File metadata and controls

executable file
·
197 lines (138 loc) · 7.48 KB

Path Planning


Logo

Path Planning

Path Planning package for the Autonomous System of Zurich UAS Racing.
Explore the thesis »

View Presentation

Table of Contents

  1. About The Project
  2. Thesis
  3. Workspace
  4. Parameters
  5. Architecture
  6. Algorithms
  7. Contact

About the Project

The implemented path planning algorithms manoeuvre the vehicle inside the track marked by cones. Sensors detect the cones (Perception) and the car's position (Localisation).

The first algorithm, the so-called “Exploration Algorithm”, calculates the middle line of the track. The output of the exploration algorithm will be delivered to the second algorithm, the so-called “Optimization Algorithm”, which optimizes the middle line with the information of the car’s attributes to an optimal racing line.

Thesis

The corresponding thesis can be found under:

https://github.com/Beomar97/path-planning-docs

Exploration Algorithm on the ''Rand'' track. Optimization Algorithm on the ''Rand'' track.

Workspace

Workspace structure

ROS_Path_Planning/ # Workspace Root
	build/
	install/
	log/
	launch/ # ROS Launch Files
		path_planning_launch.py
	src/ # All packages in src
		fszhaw_msgs/ #ROS Custom Messages (Whole ZUR Autonomous System)
		interfaces/ # ROS Custom Messages (Path Planning internally)
		path_planning/ # Path Planner
			path_planning/ # Code of package
				algorithm/ # Algorithms specific Code
					__init__.py
					exploration/ # Exploration Algorithm
					optimization/ # Optimization Algorithm
				mock/ # Mock Nodes
					__init__.py
					cone_publisher.py
					planned_trajectory_subscriber.py
				model/ # Models
					__init__.py
					coordinate.py
					mode.py
					racetrajectory.py
					refpoint.py
					setup.py
					tag.py
				util/ # Utility Classes
					__init__.py
					path_planning_helpers.py
					track_plotter.py
				__init__.py
				path_planner.py # Path Planner ROS Node
				start_finish_detector.py
				planned_path_filter.py
				optimization_service.py # Optimization Service ROS Node
				optimization_input_transformer.py
				track_config.py # Track Configurations
			resource/ # maps, parameters, ...
			test/
			package.xml # file containing meta information about the package
			setup.cfg # required when a package has executables, so `ros2 run` can find them
			setup.py # containing instructions for how to install the package

Getting Started

  1. (Optional) Edit config files

    package.xml: name, version, description, maintainer + email, license, dependencies

    setup.py: name, version, maintainer, email, description, license, entry points

    setup.cfg: should already be ok

  2. Initialize submodules (fszhaw_msgs) (Currently only available in the ZHAW network)

    git submodule update --init

  3. Install Python 3 dependencies necessary for ROS 2

    sudo apt install python3-pip python3-rosdep2 python3-colcon-common-extensions python3-pip

  4. Initialize rosdep installation

    rosdep update

  5. Install dependencies (from workspace root ROS_Path_Planning)

    rosdep install -i --from-path src --rosdistro foxy -y

  6. Install dependencies not available via rosdep (e.g. trajectory-planning-helpers)

    pip3 install trajectory_planning_helpers==0.76

  7. Build packages (from workspace root ROS_Path_Planning)

    Optional: If colcon command is still missing

    sudo apt install python3-colcon-common-extensions

    colcon build

    or

    colcon build --packages-select <package_name>

  8. Source ROS distribution

    source /setup/ros/foxy/setup.bash

  9. Source setup files

    . install/setup.bash

  10. Run package

ros2 launch launch/path_planning_launch.py

or with parameters:

ros2 launch launch/path_planning_launch.py <parameter_name>:=<parameter_value>

Parameters:

track_name, laps, timer_period, optimization_type, minimum_track_width, show_calc_times, show_plot_exploration, show_plot_optimization, mock_current_position

Parameters

Parameter Name Default Value: Type Values Description
track_name "sim_tool": string "acceleration.csv", "skidpad.csv", "small_track.csv", "rand.csv", "comp_2021.csv", "garden_light.csv" Name of the track (file).
laps 2: int Any positive Integer greater than zero (1-Infinity). Laps to be driven/published.
timer_period 0.2: float Any positive Float greater than zero. Cone to be published in seconds.
optimization_type "mincurv": string "shortest_path", "mincurv", "mincurv_iqp", "mintime" Objective to be used by the Optimization Algorithm.
minimum_track_width None: float Any positive Float greater than zero. Minimum Track Width to be used for the Optimization Algorithm.
show_calc_times False: bool True, False If Calculation Times of the Exploration Algorithm should be displayed.
show_plot_exploration False: bool True, False If figures for the Exploration Algorithm should be plotted.
show_plot_optimization False: bool True, False If figures for the Optimization Algorithm should be plotted.
mock_current_position True: bool True, False If the current position of the vehicle should be mocked with the last published path points.

Architecture

Path Planning ROS Architecture

Path Planning Path Planner Node Path Planning Optimization Service Node

Algorithms

Exploration Algorithm

Exploration Algorithm

Optimization Algorithm

Optimization Algorithm

Contact