Reinforcement learning for a Universal Robots UR7e cobot: line following (simulation and a partial hardware implementation), target reaching, and obstacle avoidance — with kinematic tools, sensor fusion (EKF), and a SAC-vs-PPO experiment.

And

The frozen simple-environment SAC checkpoint is now available as a Hugging Face model, with a portable NumPy actor, source provenance, environment files and measured CPU evaluation. Run actual browser-local inference or inspect the Kaggle benchmark notebook and evaluation dataset.
The 2026-11-18 experiment comprises 100 prespecified trajectories × 2 controllers × 3 noise conditions. With no added noise, strict endpoint completion is 93/100 for SAC and 90/100 for fixed DLS, while mean tracking RMS across acquired episodes is 5.21 mm and 2.38 mm respectively. The original episode-completed flag can be misleading; the evaluation audits endpoint tolerance separately. These results describe a kinematic benchmark, not hardware validation or a general superiority claim. Historical metrics elsewhere in this repository use different protocols.
Source, controller comparison, tests and reproduction instructions: evaluations/frozen-sac-2026-11-18.
This suite contains four independent projects. Simulations are functional, but the full transfer onto the real robot is not validated end-to-end: the vision/KLT chain loses the laser dot during motion, which currently blocks closed-loop control on hardware — see the real-implementation README for details.
| # | Folder | Role | Status |
|---|---|---|---|
| 1 | line-follower-simulation-simple |
Lightweight SAC trajectory-tracking demo (100% acquisition, 97% completion, 5.8mm RMS) | Validated in simulation |
| 2 | line-follower-simulation-complete |
Full ROS 2/Gazebo pipeline: SAC+HER, Extended Kalman Filter, LQR singularity-adaptive control, Monte Carlo trajectories | Validated in simulation (7/10 success on held-out episodes) |
| 3 | line-follower-real-implementation |
Real UR7e deployment: fixed camera + TCP-mounted laser, ROS 2 Jazzy | Partial — sim-to-real not validated |
| 4 | target-reaching-obstacle-avoidance |
Reaching, SAC vs. PPO statistical comparison, HER, curriculum learning, obstacle avoidance, hybrid IK+RL — two independent frameworks (Stable-Baselines3 and tf-agents) | Code complete; some analysis scripts require retraining (no included checkpoints) |
- Start with
line-follower-simulation-simpleto see the lightest working SAC model end-to-end. - Move to
line-follower-simulation-completefor the full sensor-fusion pipeline (EKF, LQR, Monte Carlo) and the regenerated result plots. - Read
line-follower-real-implementationbefore connecting to real hardware, and always run its shadow test first. - Explore
target-reaching-obstacle-avoidancefor the broader RL methodology: algorithm comparison, sparse-reward techniques, curriculum learning, and a hybrid classical/RL pipeline.
pie showData
title Project time breakdown — 130h total
"Reinforcement Learning (SAC, HER, reward design)" : 35
"Python Engineering (envs, wrappers, pipelines)" : 20
"ROS2 / Gazebo Integration" : 20
"Computer Vision (KLT, HSV, calibration)" : 15
"Robust / Optimal Control (LQR)" : 13
"State Estimation (EKF / Kalman)" : 12
"Robotics Modeling & Kinematics (DH, IK/FK)" : 10
"Real Robot Deployment & Debugging" : 5
Line following works in simulation but is not yet robust on the real robot. The red laser dot is correctly detected at rest, but KLT tracking is lost during motion. Leading hypotheses: ambient light too strong, laser dot too thin / weakly saturated, red reflections or parasitic objects in frame, unstable camera auto-exposure.
The Target Reaching / Obstacle Avoidance batch requires an external ur7e_pybullet/ folder (robot URDF + meshes) that is not included here — see target-reaching-obstacle-avoidance/MISSING_PREREQUISITE.md for the recovery procedure.
- ROS 2 Humble or Jazzy depending on the batch.
- Python 3.10/3.12 depending on the ROS installation.
- Stable-Baselines3, Gymnasium, PyTorch, NumPy, IKPy for RL simulations; tf-agents/TensorFlow for the alternative approach in batch 4.
- OpenCV for the real vision pipeline.
Each subfolder keeps its own README and commands — this root README is orientation only.
-
UR7e Reinforcement Learning Training Log Analysis — descriptive analysis of a public simulated training log, not a held-out or physical-robot evaluation.
-
Generating Robot Drawing Trajectories on CPU — reproducible samples from the geometric trajectory generator, without a simulator.
-
UR7e Data Quality and Failure Analysis — checks the data and explores episode-end summaries in one simulated run.
-
UR7e Laser Point Tracking with Kalman Filter — a CPU-only exploration of the project filter using synthetic observations; it does not validate physical hardware.
- UR7e Simulated Robot Line-Following Training Log — the original MIT-licensed Monitor log (520 training episodes), with field definitions and a runnable analysis. This single simulated training run is not a held-out or physical-robot evaluation.
- UR5e RL Pick-and-Place — SAC and HER for grasp-and-place in ROS 2 and Gazebo.
- TurtleBot3 ROS 2 Navigation — LiDAR and camera-based mobile robot navigation in simulation.
- Classical Computer Vision Toolkit — optical flow, pose estimation and point-cloud registration.
MIT — see LICENSE.
The Engineering Workbench / Run explorer plots the original Monitor log with selectable fields, trailing windows, per-episode inspection and unchanged CSV/provenance downloads. The Hugging Face dataset preserves the raw file and provides a typed, viewer-friendly derivative with an episode index. It distributes the same 520-episode single simulation run already on Kaggle; it is not another experiment or a held-out evaluation. Original file SHA-256: ac08bd9bae19f6883adfe51203ce7a759d8cea39fd3fcbf0ec6f3ad290b99814. The upstream MIT notice is retained.
Reinforcement Learning for UR7e Trajectory Following and UR5e Manipulation (PDF).
The complete manuscript is hosted on the portfolio. Author order and distribution terms are stated in the PDF. The code licence applies to the software; it does not relicense the manuscript.