u/Solid_Internet_3503

▲ 16 r/ROS

[ROS 2 Humble / Gazebo] Vehicle Struggles to Accelerate After Traffic Light Turns Green & Oversteers Out of Lane

Hi everyone,

I am developing an autonomous car simulation using ROS 2 Humble, Gazebo, and OpenCV / YOLO for line tracking and traffic light detection.

I'm facing two specific issues as shown in the video:

  1. Traffic Light Resume Issue: The vehicle successfully detects the red traffic light and stops. However, when the light turns green, it resumes movement extremely slowly (stuck around 0.2 - 0.5 km/h) and takes too long to recover its normal cruising speed (~3 km/h).
  2. Lane Departure / Oversteering: The OpenCV lane detection algorithm loses lane continuity during slight curves/turns, causing the car to cross line boundaries and hit curbs.
  3. # Currently handling traffic light state like this:
  4. if self.traffic_light_state == 'RED':
  5. target_linear_velocity = 0.0
  6. elif self.traffic_light_state == 'GREEN':
  7. target_linear_velocity = self.normal_speed # But acceleration in Gazebo feels lagging / throttled
  • How can I smoothly transition speed state in ROS 2 after a stop condition without getting stuck in low linear velocity?
  • What ROI / Look-ahead adjustments or PID gain tuning (Kp/Kd) do you recommend for OpenCV lane tracking to prevent boundary overflow on curves?
u/Solid_Internet_3503 — 11 days ago