Week 27 · April 07, 2026
Evaluation of Recovery Examples and Tangent Preprocessing for Lane Keeping and 90‑Degree Turns
April 07, 2026
Analysis of dataset corrections targeting lane departure and turning performance, and an assessment of steering preprocessing using the tangent function.
During the previous week (Week 26), the primary limitations of the ego‑vehicle (ecogar) were identified as:
- Failure to maintain the right lane (the vehicle consistently drifted toward the left lane).
- Poor performance when executing 90‑degree turns.
To address these shortcomings, the following corrective actions were implemented:
- Addition of recovery examples to the dataset: 9,800 new samples were collected, representing lane‑recovery manoeuvres from the left lane back to the right lane. These samples were recorded in Towns 01, 02, 04, and 12.
- Systematic evaluation of tangent‑based steering preprocessing: Separate datasets were created — one with the standard steering preprocessing (tangent transformation) and one without — to isolate the contribution of this preprocessing step.
Tangent preprocessing function: The steering angle θ is transformed as θ' = tan(θ) before being used as the regression target. This nonlinear mapping amplifies large steering angles, potentially improving the model’s sensitivity during sharp turns.
Both modified datasets were used to train imitation learning agents (same architecture as in previous weeks). The resulting behaviour was evaluated on Towns 01, 02, and 03. The key findings are summarised below:
- Inconclusive improvements: Neither dataset produced a clear improvement over the previous Week 26 baseline. The vehicle still exhibited difficulty in maintaining the right lane and occasionally drifted over the lane divider.
- Unclear effect of tangent preprocessing: Comparison between the datasets with and without tangent preprocessing did not reveal any statistically significant or consistent advantage. The role of this preprocessing remains ambiguous.
- Best test runs: Despite the overall inconclusive results, the following video recordings show the best performance obtained for each town:
Key observation
Although the vehicle no longer stays exclusively in the left lane, it tends to drive over the lane dividing line rather than fully recovering to the centre of the right lane. This indicates that the recovery examples, while partially effective, do not yet cover the most critical boundary condition.
Based on the observed behaviour (driving over the lane divider), the following enhancements are planned:
- Diverse lane‑recovery examples: New recovery samples will be collected specifically from the lane dividing line (the position where the vehicle straddles the line). This will teach the agent to correct from that critical off‑centre state back to the right lane.
- Re‑balancing of direct driving examples: The addition of 9,800 recovery samples has relatively reduced the proportion of normal straight‑driving examples. To maintain a balanced representation, more direct driving (straight and gentle curve) samples will be added.
- Postponed tangent preprocessing analysis: Until the lane‑recovery behaviour is stabilised (i.e., the vehicle reliably returns to the right lane), any evaluation of the tangent preprocessing effect would be confounded. Therefore, a clean ablation study on preprocessing will be conducted once the baseline recovery performance is satisfactory.
Expected outcome: Including recovery examples from the lane‑divider position should eliminate the sustained driving‑over‑the‑line behaviour, leading to consistent right‑lane keeping. Re‑balancing with more direct driving samples will prevent the model from over‑specialising on recovery manoeuvres.
Parallel to the behavioural experiments, work has progressed on uploading the most effective datasets to the Huggingface Hub. Access credentials have been shared with Luis Daniel, and the datasets that yielded the best performance (including the balanced recovery sets from Week 26 and Week 27) are currently being prepared for publication. This will facilitate reproducibility and enable external collaboration.
- ✅ Access granted and repository structure defined.
- 🔄 Data formatting and metadata annotation in progress.
- 📦 Planned upload: Week 26 baseline, Week 27 recovery‑augmented sets, and future Week 28 refined sets.
The inconclusive results of Week 27 highlight two important lessons:
- Adding recovery examples from the left lane to the right lane is insufficient when the vehicle’s most common failure mode is driving on the lane divider, not fully in the left lane.
- Preprocessing choices (such as the tangent transformation) cannot be properly evaluated until the core behavioural flaws are resolved; otherwise, any observed effect is masked by the dominant error source.
Therefore, the immediate action plan for Week 28 is:
- Collect at least 5,000–7,000 new recovery samples starting from the lane‑divider position in Towns 01, 02, 04, and 12.
- Add 3,000–4,000 additional straight‑driving and gentle‑curve samples to restore the natural distribution of steering commands.
- Retrain the agent with the enhanced dataset and re‑evaluate on Towns 01–03.
- Once stable right‑lane keeping is achieved, perform a controlled experiment to compare tangent‑preprocessed vs. raw steering targets using the same improved dataset.
- Finalise the Huggingface upload of the best‑performing datasets.
Note: All training will continue to use the 1 s frame margin (temporal redundancy removal) validated in Week 22, which has successfully eliminated oscillatory zigzag behaviour.
- The addition of 9,800 left‑to‑right lane recovery samples did not yield conclusive improvements; the agent still tends to drive over the lane divider.
- The effect of tangent‑based steering preprocessing remains unclear and requires a dedicated ablation study after the core lane‑keeping behaviour is fixed.
- Driving‑over‑the‑line behaviour suggests that recovery examples must be collected from the exact off‑centre positions observed during autonomous operation (i.e., the lane dividing line).
- Balancing the dataset with more direct driving examples is necessary to avoid relative under‑representation of normal driving.
- Huggingface integration is underway, with the best datasets to be published for open use.
SUMMARY OF FINDINGS – MARCH 20, 2026 (WEEK 27):
❌ 9,800 recovery examples from left lane to right lane did not solve lane‑keeping; vehicle drives over lane divider.
❌ Effect of tangent preprocessing is inconclusive – requires cleaner baseline.
✅ Huggingface access established; dataset preparation ongoing.
🔜 Week 28: collect recovery samples from lane‑divider position, re‑balance with direct driving, then re‑evaluate tangent preprocessing.
Next steps (detailed):
Starting March 21, we will run data collection scripts that trigger when the ego‑vehicle’s centre crosses the lane dividing line. The collected frames and corresponding steering commands (return to right lane) will be added to the training set. At the same time, we will record additional straight and mild‑curve segments to restore dataset balance. After retraining, we will compare performance against the Week 27 model. Once the right‑lane keeping is robust, we will conduct a systematic ablation on the tangent preprocessing function using the improved dataset. Finally, all successful datasets will be uploaded to Huggingface under the URJC Robotics Lab organisation.
— Armando Mateus, Robotics Lab URJC