Skip to main content

Useful functions used for path and trajectory planning at TUM/FTM

Project description

Description

This repository provides some helper functions we frequently use in our trajectory planning software stack at FTM/TUM. Many of the functions are based on third order splines because we use them as a basis for our path planning. Please keep in mind that some of the functions are designed to work on a closed (race-) track and might therefore not work properly on a common street network.

List of components

  • angle3pt: Calculates angle by turning from a to c around b.
  • calc_ax_profile: Calculate the longitudinal acceleration profile for a given velocity profile.
  • calc_head_curv_an: Analytical curvature calculation on the basis of third order splines.
  • calc_head_curv_num: Numerical curvature calculation.
  • calc_normal_vectors: Calculate normalized normal vectors on the basis of headings psi.
  • calc_spline_lengths: Calculate spline lengths.
  • calc_splines: Calculate splines for a (closable) path.
  • calc_t_profile: Calculate the temporal duration profile for a given velocity profile.
  • calc_vel_profile: Calculate velocity profile on the basis of a forward/backward solver.
  • calc_vel_profile_brake: Calculate velocity profile on the basis of a pure forward solver.
  • conv_filt: Filter a given signal using a 1D convolution (moving average) filter.
  • create_raceline: Function to create a raceline on the basis of the reference line and an optimization result.
  • get_rel_path_part: Get relevant part of a given path on the basis of a s position and a specified range.
  • import_veh_dyn_info: Import the required vehicle dynamics information from several files: ggv and ax_max_machines.
  • interp_splines: Interpolate splines to get points with a desired stepsize.
  • interp_track_widths: Interpolation function for track widths.
  • iqp_handler: Handler function to iteratively call the minimum curvature optimization.
  • normalize_psi: Normalize heading psi such that the interval [-pi, pi[ holds.
  • opt_min_curv: Minimum curvature optimization.
  • opt_shortest_path: Shortest path optimization.
  • path_matching_global: Match own vehicle position to a global (i.e. closed) path.
  • path_matching_local: Match own vehicle position to a local (i.e. unclosed) path.
  • progressbar: Commandline progressbar (to be called in a for loop).
  • side_of_line: Function determines if a point is on the left or right side of a line.
  • spline_approximation: Function used to obtain a smoothed track on the basis of a spline approximation.

Example files

The folder example_files contains an exemplary track file (berlin_2018.csv), ggv (ggv.csv) and ax_ax_machines file (ax_max_machines.csv). The two latter files can be easily imported (with checks) using import_veh_dyn_info. The files are taken from our global trajectory planner repository which can be found on https://github.com/TUMFTM/global_racetrajectory_optimization.

Solutions for possible installation problems

  1. (Ubuntu) matplotlib requires tkinter -> can be solved by sudo apt install python3-tk
  2. (Ubuntu) Python.h required for quadprog -> can be solved by sudo apt install python3-dev

Contact persons: Alexander Heilmeier, Tim Stahl.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trajectory-planning-helpers-0.58.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trajectory_planning_helpers-0.58-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

Details for the file trajectory-planning-helpers-0.58.tar.gz.

File metadata

  • Download URL: trajectory-planning-helpers-0.58.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2

File hashes

Hashes for trajectory-planning-helpers-0.58.tar.gz
Algorithm Hash digest
SHA256 6d765b29d5facb7d940e3e5fff377b3d369c620a1a90af7be61c305979375097
MD5 83ec11f75f1bf367d65a4d484fd075c3
BLAKE2b-256 3a75b6754bf46be618b566a10f9ff6138466d8becef10d558877c5d72b9b5d3c

See more details on using hashes here.

File details

Details for the file trajectory_planning_helpers-0.58-py3-none-any.whl.

File metadata

  • Download URL: trajectory_planning_helpers-0.58-py3-none-any.whl
  • Upload date:
  • Size: 50.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.9.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2

File hashes

Hashes for trajectory_planning_helpers-0.58-py3-none-any.whl
Algorithm Hash digest
SHA256 ddeaf1ec92eee76874aa0922423dfe3d9292d12ada61daee485fd35d7eaa2575
MD5 8ba5140e347f808e54455ab18b0f92d8
BLAKE2b-256 fcdb921f023134f30dc5dcfde045420a7b1ceb4d6a8893c885ef3c32aa79a114

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page