ROS 2 Reference Trajectory Planning for Automated Driving
This repository provides a lightweight ROS 2 planner that combines route information, the current ego state, and optional environment information to periodically generate a reference trajectory. It is intended as a deterministic upstream reference planner for downstream trajectory optimization and control modules. Key features:
- Route following: creates reference trajectories from route lane geometry and speed limits.
- Safe-stop behavior: publishes standstill or safe-stop trajectories when required inputs are missing, outdated, or a stop is needed.
- Traffic-light handling: stops at relevant traffic-light regulatory elements with configurable stop-line offsets and state prediction support.
- Lane changes and indicators: inserts simple lane-change transitions and trigger turn-signal or hazard-light services based on route semantics.
- Object-aware speed handling: checks perceived objects and predictions against the ego trajectory and applies a conservative speed cap when conflicts are detected.
The ROS 2 node uses the open-source ROS 2 message definitions perception_interfaces and planning_interfaces for its in- and outputs, making it straightforward to integrate into larger ROS 2-based automated-driving systems.
🚀 Quick Start • 💻 Development • 📝 Documentation
Important
This repository is part of OpenADS, the Open Automated Driving Systems project. OpenADS and its modules have been initiated and are currently being maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University.
-
Launch the
demo/docker-compose.ymlsetup. This will open RViz with a visualization of a Lanelet2 map.cd demo xhost +local: # allow GUI forwarding from containers docker compose up -d
-
Select the Plan Route tool in RViz and click on a destination on the map to plan a route, which will be visualized as a green line. This is the basis for the reference trajectory planned by the
simple_planner. The reference trajectory is visualized in RViz as a red line with red dots. The hight of the dots indicates the speed along the trajectory. -
Stop the demo and clean up.
docker compose down xhost -local: # revoke GUI forwarding permissions
- Clone the repository.
git clone https://github.com/openads-project/simple_planner.git
- Initialize the
.openads-dev-environmentsubmodule containing development environment configuration.cd simple_planner git submodule update --init --recursive - Open the repository in Visual Studio Code.
code . - Install the recommended VS Code extensions.
Ctrl+Shift+P / Extensions: Show Recommended Extensions / Install Workspace Recommended Extensions (Cloud Download Icon)
- Reopen the repository in a Dev Container.
Ctrl+Shift+P / Dev Containers: Rebuild and Reopen in Container
Ctrl+Shift+B
colcon buildCtrl+Shift+P / Tasks: Run Test Task
colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1
colcon test
colcon test-result --verbosePackage and node interfaces are documented in the respective package READMEs listed below. Implementation details are found in the Source Code Documentation.
| Package | Description |
|---|---|
| simple_planner | Generates route-following reference trajectories with safe-stop, traffic-light, turn-signal, and object-aware speed handling. |
The source code in this repository is licensed under Apache-2.0, see LICENSE. Container images provided by this repository may contain third-party software shipped with their own license terms.
Development and maintenance of this repository are supported by the following projects. We acknowledge the funding of the respective institutions.
| Project | Funding Institution | Grant Number |
|---|---|---|
| AIGGREGATE | 🇪🇺 European Union | 101202457 |
| AIthena | 🇪🇺 European Union | 101076754 |
| autotech.agil | 🇩🇪 Federal Ministry for Research, Technology and Space (BMFTR) | 01IS22088A |
Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Climate, Infrastructure and Environment Executive Agency (CINEA). Neither the European Union nor CINEA can be held responsible for them.

