How chj1319/forzaeth_race_stack works
This repository is a ROS 2 autonomous-racing stack for an F1TENTH-scale vehicle, usable with either simulation or hardware. Its principal runtime loop brings in sensor/localization and vehicle state, plans a global or local path, selects racing behavior, and sends drive commands; perception and opponent tracking support avoidance. The tree and excerpts show major subsystems, but not enough runtime wiring to establish most ROS topic connections, so those links are dashed and unverified. The README also cautions that some paper-version capabilities are absent from this ROS 2 stack.
Main entry points: controller_manager.py Racing Controller · state_machine.py Race State Machine · ackermann_mux.cpp Command Multiplexer · detect.py Obstacle Detection
Components 21
Vehicle and Simulation
- Teleoperation
base_system/f1tenth_system/teleop_tools/joy_teleop/joy_teleop/joy_teleop.py - Command Multiplexer
base_system/f1tenth_system/ackermann_mux/src/ackermann_mux.cpp - VESC Interface
sensors/vesc/vesc_ackermann/src/ackermann_to_vesc.cpp - F1TENTH Simulator
base_system/f110_simulator/f1tenth_gym/gym/f110_gym/envs/f110_env.py
Sensing and State
- URG LiDAR Driver
urg_node2/src/urg_node2.cpp - SLAM and Mapping
slam_toolbox/src/slam_toolbox_common.cpp - Particle Localization
particle_filter/particle_filter/particle_filter.py - Vehicle State
state_estimation/state_estimation/carstate_node.py
Planning and Perception
- Obstacle Detection
perception/perception/detect.py - Opponent Tracking
perception/perception/tracking.py - Global Trajectory
planner/global_planner/global_planner/global_planner_logic.py - Trajectory Optimization
planner/global_planner/global_planner/global_racetrajectory_optimization/global_racetrajectory_optimization/trajectory_optimizer.py - Local Planning
planner/local_planners/spline_planner/spline_planner/spline_planner.py
Behavior and Control
- Race State Machine
state_machine/state_machine/state_machine.py - Racing Controller
controller/controller/controller_manager.py - Pure Pursuit
controller/controller/pp.py - Follow the Gap
controller/controller/ftg.py - Map Controller
controller/controller/map.py
Stack Services
- Parameter Events
stack_master/stack_master/parameter_event_handler.py - Opponent Publisher
utilities/nodes/opponent_publisher/opponent_publisher/obstacle_publisher.py
Other components
- Operator
Connections 23
- Operator → Teleoperation: drives
- Teleoperation → Command Multiplexer: submits commands
- Racing Controller → Command Multiplexer: submits commands
- Command Multiplexer → VESC Interface: forwards commands
- Command Multiplexer → F1TENTH Simulator: forwards commands
- URG LiDAR Driver → SLAM and Mapping: provides scans
- URG LiDAR Driver → Obstacle Detection: provides scans
- SLAM and Mapping → Particle Localization: provides map
- Particle Localization → Race State Machine: provides pose
- Vehicle State → Racing Controller: provides state
- Obstacle Detection → Opponent Tracking: supplies detections
- Opponent Tracking → Race State Machine: supplies opponents
- Global Trajectory → Trajectory Optimization: uses optimizer
planner/global_planner/global_planner/global_planner_logic.py - Global Trajectory → Racing Controller: provides waypoints
- Local Planning → Race State Machine: provides local path
- Race State Machine → Racing Controller: selects behavior
- Racing Controller → Pure Pursuit: uses controller
controller/controller/controller_manager.py - Racing Controller → Follow the Gap: uses controller
controller/controller/controller_manager.py - Racing Controller → Map Controller: uses controller
controller/controller/controller_manager.py - Racing Controller → Parameter Events: registers updates
controller/controller/controller_manager.py - Race State Machine → Parameter Events: uses callbacks
state_machine/state_machine/state_machine.py - Obstacle Detection → Opponent Publisher: provides obstacles
- Opponent Publisher → Race State Machine: publishes opponents