MKMinkyung Jun
RESEARCH

Sim-to-Real Mobile-Robot Driving
with Unity ML-Agents

Period 2023.09 โ€” 2024.04 Team 6 (80% contribution) Platform Clearpath Husky A200 ยท VLP-16

STEP 1Building the training environments

The Unity LiDAR was implemented to match the real Velodyne VLP-16 (channels, FOV, range) and its distances fed the RL state. Environments were built in order of difficulty: a maze, a static-obstacle course, and a replica of the lab building's corridor.

T-shaped maze training environment
Maze environment โ€” robot (left) and goal (bottom right).
LiDAR point cloud visualized in Unity scene and game views
Simulated LiDAR point cloud (left: Scene view, right: Game view) with ROS connection info.

STEP 2Reward design and training analysis

Reward and termination were designed around LiDAR usage, distance, time, and collisions โ€” and each change was analyzed through its training curves. Notably, a per-step penalty (โˆ’0.01) alone made the agent crash on purpose to end episodes early; switching to a 60-second episode time limit converged successfully while cutting training time by about 50%.

Cumulative reward curves comparing two reward designs
Training behavior by reward design โ€” top: per-step penalty (intentional crashing, no convergence), bottom: time-limit design (converged).

STEP 3Sim-to-Real transfer

The policy was exported to ONNX and wrapped in a ROS node (Ubuntu 18.04, Melodic) controlling the physical Husky A200. Early runs destabilized quickly due to differences between simulated and real LiDAR; injecting Gaussian noise into the simulated LiDAR and applying curriculum learning (straight โ†’ intersection โ†’ real corridor) fixed it.

ROS node graph centered on the ONNX inference node
ROS control graph โ€” /scan and /goal feed the ONNX inference node, which outputs velocity commands.
Curriculum environments from straight to intersection to corridor with driving logs
Curriculum learning environments (straight โ†’ intersection โ†’ lab corridor) and driving logs.
RESULT

DEMOVideos

Physical Husky A200 corridor driving (1:30)

Unity training montage โ€” maze ยท obstacles ยท corridor

Husky A200 driving autonomously along a corridor
Husky A200 driving the corridor on the learned policy.