This repository contains my personal work for the Planning & High-Level Control Team in the Student Mobility Competition (Team K.A.I., Konkuk University).
It implements a full ROS2 stack that plans global paths from GPS data, generates local paths from traffic cones, and tracks them using Pure Pursuit, enabling our custom-built EV to drive autonomously on cone-marked tracks.
π Project Structure
Planning/
βββ cone_labeling_k/ # Potential Field-based Planning
β βββ cone_labeling_k
β βββ launch
β β βββ cone_labeling.launch.py
β βββ potential_field.py # latest version(fixed several problems)
β βββ potential_field.py.BAK # old version
β
βββ cones_no_color/ # Local path generation based on traffic cones
β βββ msg/ # custon msg that describes detected cones from Perception
β βββ scripts/
β β βββ cone_safe_zone.py
β β βββ reference_path_planning.py
β β βββ visualize_cones.py
β βββ launch/ β¦
β
βββ gps_global_planner/ # Global path generation using GPSΒ·RTK
β βββ data/ # CSVs containing Longitude/Latitude, UTM Coordinates, Covariances
β βββ launch/
β β βββ gps_global_planner_launch.py
β βββ scripts/
β β βββ auto_place_cones.py
β β βββ cone_roi_publisher.py
β β βββ course_csv_creator.py
β β βββ global_yaw_estimator_node.py
β β βββ publish_global_cones.py
β βββ src/
β βββ gps_to_local_cartesian.cpp
β βββ local_cartesian_path_publisher.cpp
β βββ status_colored_path_publisher.cpp
β βββ vehicle_tf_broadcaster.cpp
β
βββ reference_path_classifier/ # Classifies Cones into Left and Rigth Sides(Using Global Path)
β βββ launch/
β β βββ classify_cones_by_side.launch.py
β βββ scripts/
β β βββ classify_cones_by_side.py
β βββ src/
β βββ classify_cones_by_side.cpp
β
βββ speed_planner/ # Calculates Desired Speed for Each Waypoints based on Curvature of the Path
β βββ launch/
β β βββ simple_speed_planner.launch.py
β βββ config/
β β βββ simple_speed_planner.yaml
β βββ src/ # Publishes speed and rpm command
β βββ simple_speed_planner.cpp
β
βββ pure_pursuit/ # Path Tracking Algorithm - 3 different versions
β βββ config/ # paremeter tuning files
β β βββ adaptive_pp.yaml
β β βββ pure_pursuit_dynamic.yaml
β β βββ pure_pursuit_static.yaml
β βββ launch/
β β βββ adaptive_pure_pursuit.launch.py
β β βββ pure_pursuit_dynamic.launch.py
β β βββ pure_pursuit_static.launch.py
β βββ src/ # 3 different methods nodes
β βββ pure_pursuit_adaptive.cpp
β βββ pure_pursuit_dynamic.cpp
β βββ pure_pursuit_static.cpp
β
β How To Play.md # Contains How to Run My Packages
Ideal rqt graph
Flow Summary (Concise):
- Cone perception β Local path: /cone/* β /cones_color_subscriber β /local_planned_path, /cones_marker_array (RViz shows /cones/markers).
- AEB decision: /cones_color_subscriber β /AEB_Determination_Node β /aeb_roi, /aeb.
- Curvature/Speed planning: /local_planned_path β /path_sampler β /sp/rep_curvature β /speed_zone_planner β /cmd/speed, /cmd/rpm.
- Path tracking control: /pure_pursuit_adaptive β΅ /local_planned_path, /current_speed β /cmd/steer (+ /pure_pursuit/* debug topics).
- HUD/Visualization: /hud_overlay_node β΅ /cmd/, /odometry/filtered, /pure_pursuit/ β /hud/overlay_text, /hud/aeb_overlay, /current_kmh; /car_marker_publisher β΅ /cmd/steer β /car_marker.
| Package | Main Functions | Language |
|---|---|---|
| cones_no_color | β’ Generates an optimal reference path from cone locations β’ Provides RViz visualization nodes |
Python |
| gps_global_planner | β’ Converts RTK-GPS logs to CSV and nav_msgs/Path β’ ENU β Local Cartesian conversion β’ Colors the global path by state and speed |
C++, Python |
| reference_path_classifier | β’ Classifies cones on the left and right sides relative to the vehicle | Python |
| pure_pursuit | β’ Tracks the local path via Pure Pursuit (static/dynamic/adaptive look-ahead) β’ Subscribes nav_msgs/Path (/local_planned_path) and /current_speed; publishes /cmd/steer and RViz debug markers |
C++ |
- Refer to
How To Play.md
cd [workspace path]
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash- Use
--symlink-installfor immediate reflection of source code changes in the install directory. - Use
-DCMAKE_BUILD_TYPE=Releasefor optimized execution performance.
# 1) Generate and publish the GPS-based global path
ros2 launch gps_global_planner gps_global_planner_launch.py
# 2) Classify left-right cones using Global Planned Path
ros2 launch reference_path_classifier classify_cones_by_side.launch.py
# 3) Generate a local path based on detected cones
ros2 run cones_no_color reference_path_planning.py
# 4) Generate and publish the desired speed and RPM based on curvature of the path
ros2 launch speed_planner simple_speed_planner.launch.py
# 5) Track the local path using (Adaptive) Pure Pursuit Algorithm
ros2 launch pure_pursuit adaptive_pure_pursuit.launch.py
![]() 1. Right/Left Classification (Frenet + K-D Tree) |
![]() 2. Delaunay Triangulation |
![]() 3. Local Speed Planning |
![]() 4. Path Tracking (Pure Pursuit) |
π View More (4 Additional Steps)
![]() 5. Global Path Planning |
![]() 6. Global Cones and ROI (Sim) |
![]() 7. Interpolation & Sampling |
![]() 8. Obstacle Radius & Safe Zone |
This GIF visualizes the Adaptive Pure Pursuit algorithm, based on the paper βAccurate Path Tracking by Adjusting Look-Ahead Pointβ. The look-ahead distance dynamically adjusts depending on vehicle speed and path curvature, enabling more accurate and stable path tracking compared to standard Pure Pursuit.
- Pink Marker: Look-Ahead Point of Adaptive Pure Pursuit
- Orange Arrow: Vehicle Heading Direction based on Adaptive Pure Pursuit
In curves, the look-ahead distance is reduced to minimize path deviation, while on straights it is increased for smoother tracking, improving trajectory stability under diverse driving conditions.
This GIF demonstrates local path planning using a Potential Field method. The algorithm generates a field
around all detected cones and identifies the lowest "trough" line as the optimal drivable path,
marking these as Through Points (mandatory waypoints the path must pass through).
The selected points are then refined with Centripetal CatmullβRom Spline Interpolation to generate a smooth and continuous
local path relative to the vehicle's base_link frame.
- Colored Grid: Potential field intensity map
- Yellow Dots: Trough Points before smoothing
- Pink Line: Final smoothed local path
- Blue / Yellow Spheres: Left and Right cones respectively
This GIF demonstrates local path planning using a Greedy, graph-guided centerline search. The pipeline
reconstructs left/right boundary lines from color-labeled cones, generates robust midpoints
(Hungarian / projection / resample-align), and then selects a forward-feasible center path on a radius graph by
minimizing distance with boundary, directional, and smoothness penalties under heading-change gates.
The result is resampled and anchored to the vehicle's base_link frame, then published as nav_msgs/Path.
- Left/Right Lines: Reconstructed track boundaries from cones
- Green Dots: Midpoints between boundaries
- Green Line: Final fixed-length local center path
- Blue / Yellow Spheres: Left and Right cones respectively
You can reproduce the reference pipeline immediately using the sample bag files below (Google Drive):
-
Curve section: https://drive.google.com/drive/folders/1smqId70MtuKinn6FSc2SYskNgCNc_TE2?usp=sharing
- Driving data(including cone topics) collected on track segments with several curves
-
Straight section: https://drive.google.com/drive/folders/1rNyuKDwBvFl_HvaT3qoHntzvx84Ndx5d?usp=sharing
- Driving data(including cone topics) collected on straight-dominant segments
-
GPS+IMUβfocused bags: https://drive.google.com/drive/folders/19wzDIm6VciQ7x5rul0CGEnw3SJ7GRCzu?usp=sharing
- Data where RTK-GPS and IMU topics are the main sources (for reproducing global/local path generation and pose estimation)
| Item | Version / Tool |
|---|---|
| OS | Ubuntu 22.04 |
| ROS | ROS2 Humble |
| GPS RTK Module | ZED-F9P-04B-01 |
| IMU Module | myAHRS+ |
| Languages | Python 3.10 / C++17 |
| Localization Stack | ros2-gnss-imu-fusion |
- ROS2 Official Documentation
- MathWorks Blog: Path Planning for Formula Student Driverless Cars
- u-blox GitHub - RTKLIB, GNSS tools
- u-blox F9P Interface Description (Documentation)
- Accurate Path Tracking by Adjusting Look Ahead Point in Pure Pursuit Method











