How zju-fast-lab/dftpav works
Project Type and Purpose
• This is a full-stack, ROS-based spatial-temporal trajectory planning system for car-like robots.
High-Level Components
a. User Interface & Orchestration
• RViz (2D Nav Goal)
• run.sh / ROS launch files
• ROS Master (topics/services registry)
b. Perception & Map Management
• semantic_map_manager (loads lane networks, traffic signals via JSON, nanoflann, ray casting)
• vehicle_msgs (custom ROS message definitions for map, obstacles, state)
c. Route & Behavior Planning
• route_planner (global path through waypoints)
• behavior_planner (decides lane changes, speed profiles using IDM, MOBIL)
d. Trajectory Planning Core
• traj_planner (MinCo-based optimizer)
• External planners:
– ssc_planner (Space-State Corridor planner)
– eudm_planner (Euclidean Distance Minimization)
• Config via protobuf (.proto + .pb.txt)
• CorridorBuilder2d, kino_astar for initial guess
• traj_server_ros (node wrapper publishing PolyTraj msg)
e. Vehicle Model & Simulation
• vehicle_model (kinematic/dynamic models, ODEINT integration)
• phy_simulator (renders physics, ROS adapter, rviz)
• forward_simulator & motion_predictor (fast multi-modal predictor)
• aux_tools (terminal server, scripts)
f. Utilities & Toolchain
• DecompROS (decomposition utilities)
• catkin_simple (build helper)
• QGIS projects (GeoJSON & shapefiles)
• Third-party libs: ODEINT (numerical integration), OOQP/NLOPT (QP solver), Google Glog, Protocol Buffers
Relationships & Data Flow
1. User sets 2D Nav Goal in RViz → publishes to /move_base_simple/goal.
2. semantic_map_manager subscribes to map topics, publishes road network & obstacle sets.
3. route_planner subscribes to map + goal → publishes a global path.
4. behavior_planner consumes global path + dynamic obstacles → outputs a lane-speed decision.
5. traj_planner (and optional ssc/eudm planners) takes behavior plan + map → optimizes spatial-temporal trajectory → publishes PolyTraj msg.
6. vehicle_msgs encodes trajectory & control signals → vehicle_model simulates dynamics → phy_simulator visualizes and may publish updated state/obstacles back on topics.
7. Loop continues until goal reached.
Architectural Patterns & Principles
• Layered / pipeline architecture: Perception → Global Planning → Behavior → Local Trajectory → Execution/Simulation
• Publish–Subscribe (ROS topics) decouples components
• Modular plugin style: each planner (ssc, eudm, kino_astar) is a drop-in module under Sim/util or src/Plan
• Config-driven: protobufs for parameter sets, JSON for map data
• Separation of concerns: visualization separated (traj_visualizer, phy_simulator/rviz), core logic in C++ libraries
Technologies & Frameworks
• ROS (communication, launch, catkin)
• CMake / catkin_simple
• Protocol Buffers (.proto → config)
• Eigen, Boost.ODEINT, Glog, OOQP, NLOPT
• nanoflann, roguelike_ray_casting for spatial indexing
• RViz for visualization, QGIS for map pre-processing