Sim-to-Real Reinforcement Learning for Path-Safe Target Reaching in Robotic Harvesting of Hydroponic Lettuce
Organizations: Department of Biological & Agricultural Engineering, Texas A&M University, College Station, TX, 77843, USA · Texas A&M AgriLife Research, Texas A&M University System, Dallas, TX, 75252, USA · Department of Electrical & Computer Engineering, Texas A&M University, College Station, TX, 77843, USA · Department of Horticultural Sciences, Texas A&M University, College Station, TX, 77843, USA
Abstract
Robotic harvesting requires precise manipulation to ensure accurate positioning of the end-effector, especially in a constraint workspace. This study introduces the Path-Safe Approach Proximal Policy Optimization (PSA-PPO), a target-conditioned local reaching framework designed for robotic harvesting of nutrient film technique (NFT)-hydroponic lettuce in greenhouses. The proposed PSA-PPO preserves the standard clipped PPO objective while introducing a harvesting-oriented policy formulation that integrates target-conditioned observations, corridor-aware spatial constraints, trajectory-history-based safety encoding, and task-specific success criteria for constrained robotic manipulation. PSAPPO was trained entirely in Isaac Lab and successfully transferred to a physical UR10e robotic arm without any real-world policy fine-tuning. In a controlled physical benchmark against 150 scheduled targets, PSA-PPO achieved the highest reaching rate of 94.7%, outperforming Cartesian+TOTG (86.0%), RRTConnect (88.0%), and RRT* (80.0%), while reducing median RMS jerk by 39.8 to 73.0% relative to the classical planners during the final approach segment. A formulation ablation evaluated over 200 simulation targets demonstrates that path-safety and side-corridor shaping are the principal drivers of harvesting-compatible performance: removing either term substantially degrades strict success even when terminal endpoint accuracy is preserved or improved, confirming that optimization toward the endpoint alone is an insufficient objective for constrained crop-proximal manipulation. Finally, PSA-PPO was integrated with an RGB-D vision module and an end-effector and evaluated as a complete greenhouse harvesting system across 144 lettuce harvesting attempts, achieving 94.4% vision-guided target reaching and 86.1% complete harvesting success.
Figures & tables
| Evaluation | Population | Primary outcomes |
| Simulation validation | 200 workspace targets | Reaching the target w/o any safety measures, path-safe reaching, strict success, final TCP error, and maximum below-plane violation |
| Formulation ablation | Same 200 targets per formulation | Reach without safety measures, path-safe, and strict success; target-frame behavior, maximum below-plane violation, trajectory length, and episode duration |
| Physical benchmark | 150 scheduled targets per controller; common-success targets for continuous comparisons | Target-reaching reliability, endpoint error, local TCP acceleration and jerk, joint-position tracking error, normalized target convergence, and trajectory geometry |
| Greenhouse harvesting | 144 harvesting attempts | Target reaching, cutting, retention, release, and complete harvesting success |
| Metric | PSA-PPO | w/o path safety | w/o side corridor | w/o motion reg. |
| Final reach (%) | 99.0 | 89.0 | 100.0 | 98.0 |
| Path-safe (%) | 92.5 | 69.5 | 73.0 | 88.5 |
| Strict success (%) | 92.0 | 63.5 | 73.0 | 87.0 |
| Final TCP error (mm) | 32.3 [29.2, 35.1] | 32.1 [28.3, 38.3] | 25.3 [21.4, 28.6] | 35.0 [30.5, 39.2] |
| P95 maximum below-plane violation (mm) | 2.11 | 26.8 | 14.3 | 4.52 |
| Trajectory length (m) | 0.406 [0.264, 0.547] | 0.443 [0.294, 0.567] | 0.461 [0.294, 0.592] | 0.464 [0.309, 0.592] |
| Controller | Reached | Failed | Success (%) [95% CI] |
| PSA-PPO | 142/150 | 8 | 94.7 [89.8, 97.3] |
| Cartesian+TOTG | 129/150 | 21 | 86.0 [79.5, 90.7] |
| RRTConnect | 132/150 | 18 | 88.0 [81.8, 92.3] |
| RRT* | 120/150 | 30 | 80.0 [72.9, 85.6] |
| Metric | PSA-PPO | Cartesian+TOTG | RRTConnect | RRT* |
| RMS acceleration (m/s 2 ) | 0.1270 | 0.5277 | 0.5549 | 0.2668 |
| RMS jerk (m/s 3 ) | 11.38 | 42.17 | 40.74 | 18.91 |
| 99.5th-percentile jerk (m/s 3 ) | 77.72 | 131.88 | 164.77 | 127.84 |
| Joint-position tracking RMSE (rad) |
| Harvesting stage | Successful | Overall (%) | Conditional (%) |
| Target reached | 136/144 | 94.4 | 94.4 |
| Lettuce cut | 124/144 | 86.1 | 91.2 |
Appendix figures & tables24 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value | Definition |
| Observation dimension | 42 | Policy input dimension |
| Action dimension | 6 | UR10e joint-space action dimension |
| Simulation step | s | Physics integration step |
| Control decimation | 4 | Physics steps per policy action |
| Policy frequency | 30 Hz | Effective policy rate |
| Episode limit | 9.0 s | Maximum training episode duration |
| Setting | Value | Implementation |
| Training-target distribution | ||
| Target radius | m | Horizontal front-workspace radius |
| Target azimuth | Front-workspace azimuth | |
| Target height | m | Vertical target range |
| Approach distance | m | Same-height staging-to-target distance |
| Base radial sampling | Area-uniform | |
| Component | Implemented term | Weight | Definition / activation |
| Staging-distance progress; staging distance | Multiplied by | ||
| Target-distance progress; axial-error progress; line-progress increment; clipped line progress | Distance/axial increments clipped to ; line increment to ; direct term clipped to | ||
| ; target shells at m | Near-target shaping | ||
| Stop-short; staging loiter; target distance; ; ; ; axial overshoot | Staging loiter is active within 0.09 m of when m; target-overshoot margin is 0.025 m | ||
| Excessive TCP height; line-band violation; lateral-band violation; vertical-band violation; corridor axial overshoot | The first four terms use where applicable; excessive-height threshold is 0.030 m | ||
| Tool-axis alignment reward; approach-axis deficit; vertical-orientation violation; soft vertical-orientation violation | Alignment reward ; hard/soft vertical thresholds are 0.12/0.085 |
| Formulation | Training modification relative to PSA-PPO | Preserved elements |
| PSA-PPO | No component removed. The strict-capture bonus required final capture, acceptable safe-start clearance, and acceptable accumulated path clearance. Successful termination used the same strict predicate, and accumulated below-plane violation above 0.050 m triggered hard-safety termination. | Complete target, corridor, orientation, path-safety, and motion-regularization formulation. |
| w/o path safety (C2b) | Removed the five path-safety reward terms: , , , , and . The bonus remained, but its gate was changed from strict capture to final capture only. Training success termination likewise used final capture only, and hard-safety termination was disabled. | The 42-D observation, including wrist–TCP clearance channels, was unchanged. Target/corridor/orientation rewards, motion regularization, safe-start logic, and path-safety logging were retained. Strict path safety was restored only in the common post-training evaluator. |
| w/o side corridor (C2c) | Removed staging/corridor shaping: staging-progress, staging-distance, line-progress increment, clipped line progress, staging loiter, excessive-TCP-height, line-band, lateral-band, vertical-band, and corridor axial-overshoot terms. | Target-distance and target-frame error terms, orientation, path-safety rewards/history, strict-capture termination, hard-safety termination, and motion regularization were unchanged. |
| w/o motion regularization (C2d) | Removed the four action/joint regularizers: , , , and . The constant per-step cost was retained. | Target, corridor, orientation, path-safety, strict-capture, and termination logic were unchanged. |
| Parameter | Value | Setting |
| Training seed | 42 | RSL-RL seed |
| Rollout length | 32 steps/env. | Samples per environment/update |
| Maximum iterations | 12,000 | PPO iterations |
| Actor hidden layers | 256–256–128 | Fully connected |
| Critic hidden layers | 256–256–128 | Fully connected |
| Activation | ELU | Hidden activation |
| Parameter | Value | Setting |
| Targets per formulation | 200 | Identical target list |
| Target radius | m | Front workspace |
| Target azimuth | Front workspace | |
| Target height | m | Vertical range |
| Radius sampling | Area-uniform | Horizontal annulus |
| Target-generation seed | 20260724 | Fixed evaluation set |
| Outcome | Contrast | PSA-PPO (%) | Variant (%) | (pp) [95% CI] | Holm |
| Final reach | w/o path safety | 99.0 | 89.0 | 10.0 [6.0, 14.5] | |
| w/o side corridor | 99.0 | 100.0 | [ , 0.0] | 1.000 | |
| w/o motion regularization | 99.0 | 98.0 | 1.0 [ , 3.5] | 1.000 | |
| Path-safe | w/o path safety | 92.5 | 69.5 | 23.0 [16.5, 29.5] | |
| w/o side corridor | 92.5 | 73.0 | 19.5 [14.0, 25.5] | ||
| w/o motion regularization | 92.5 | 88.5 | 4.0 [1.0, 7.5] | 0.0386 |
| Dimension | Interval | Final (%) | Path-safe (%) | Strict (%) | Strict 95% CI | Median error / P95 violation (mm) | |
| Radius | [0.6000, 0.7625) m | 44 | 97.7 | 95.5 | 93.2 | [81.8, 97.7] | 33.16 / 1.34 |
| Radius | [0.7625, 0.9250) m | 45 | 100.0 | 97.8 | 97.8 | [88.4, 99.6] | 33.63 / 0.00 |
| Radius | [0.9250, 1.0875) m | 47 | 100.0 | 95.7 | 95.7 | [85.8, 98.8] | 29.89 / 0.36 |
| Radius | [1.0875, 1.2500] m | 64 | 98.4 | 84.4 | 84.4 | [73.6, 91.3] | 33.15 / 3.63 |
| Azimuth | [-85.0, -51.0) deg | 37 | 97.3 | 78.4 | 78.4 | [62.8, 88.6] | 32.40 / 6.03 |
| Azimuth | [-51.0, -17.0) deg | 42 | 100.0 | 95.2 | 95.2 | [84.2, 98.7] | 33.11 / 0.62 |
| Parameter | Value | Role |
| HOME TCP position | m | Robot observation/home pose |
| Benchmark tool orientation | Common fixed physical orientation | |
| Base frame | robot_arm_base_link | Cartesian reference frame |
| Tool frame | robot_arm_tool0 | Measured TCP frame |
| Paper evaluation tolerance | 0.020 m | Binary target-reaching criterion |
| ROS monitor tolerance | 0.002 m | Online execution-monitor threshold |
| Setting | Value | Application |
| Move group | arm | All MoveIt baselines |
| RRTConnect backend | OMPL RRTConnect ( RRTConnectkConfigDefault ) | Pose planning using the frozen RRTConnect planner ID |
| RRT* backend | OMPL RRT* ( RRTstar ) | Pose planning using the post-fix RRT* planner ID |
| Cartesian backend | Cartesian linear + TOTG ( CartesianLinearTOTG ) | Collision-checked Cartesian interpolation followed by retiming |
| Planning time | 8.0 s | OMPL pose planners |
| Planning attempts | 3 | OMPL pose planners |
| PSA-PPO | Cartesian+TOTG | RRTConnect | RRT* | |
| Scheduled targets | 150 | 150 | 150 | 150 |
| Archived measured trajectories | 150 | 150 | 150 | 125 |
| Paper-level reached targets | 142 | 129 | 132 | 120 |
| Paper-level failed targets | 8 | 21 | 18 | 30 |
| Metric | PSA-PPO | Cartesian+TOTG | RRTConnect | RRT* |
| RMS acceleration (m/s 2 ) | 0.1776 | 0.5776 | 0.5856 | 0.2739 |
| RMS jerk (m/s 3 ) | 15.82 | 47.68 | 45.01 | 19.91 |
| 99.5th-percentile jerk (m/s 3 ) | 105.11 | 143.38 | 172.29 | 127.58 |
| Joint-position tracking RMSE (rad) |
| Metric | Planner | PSA-PPO reduction (%) | Median paired difference [95% CI] | Holm-adjusted |
| RMS acceleration (m/s 2 ) | Cartesian+TOTG | 75.9 | [ ] | |
| RRTConnect | 77.1 | [ ] | ||
| RRT* | 52.4 | [ ] | ||
| RMS jerk (m/s 3 ) | Cartesian+TOTG | 73.0 | [ ] | |
| RRTConnect | 72.1 | [ ] | ||
| RRT* | 39.8 | [ ] |
| Controller | Median TCP error (mm) | Fraction of 20-mm tolerance (%) |
| PSA-PPO | 9.78 | 48.9 |
| Cartesian+TOTG | 0.06 | 0.3 |
| RRTConnect | 1.62 | 8.1 |
| RRT* | 1.61 | 8.1 |
| Metric | PSA-PPO | Cartesian+TOTG | RRTConnect | RRT* |
| Detour ratio | 1.8094 | 1.6697 | 1.6812 | 1.6962 |
| Path efficiency | 0.5527 | 0.5989 | 0.5948 | 0.5896 |
| Backtracking ratio | 0.0371 | 0.0178 | 0.0195 | 0.0218 |
| Total Cartesian turning ( ∘ ) | 410.09 | 16.91 | 75.58 | 75.14 |
| Base-azimuth travel ( ∘ ) | 26.25 | 25.73 | 25.97 | 26.45 |
| Total joint travel (rad) | 3.108 | 2.850 | 2.910 | 2.723 |
| Planner | Witnessed failures | Additional ranked identities selected | Archived trajectories | Hard-event selected trials | Highest-priorityt diagnostic target |
| Cartesian+TOTG | 21 | 19 | 150 | 0 | T119 |
| RRTConnect | 18 | 18 | 150 | 3 | T040 |
| RRT* | 30 | 5 | 125 | 4 | T087 |