Skip to content
RoboLearn
Not completed

Robot simulation (Webots, Gazebo)

AdvancedAdvanced30 minBefore this: Introduction to ROS 2

What you’ll learn

  • Why engineers simulate robots
  • The main free 3D robot simulators
  • The sim-to-real gap

Why simulate?

  • Test ideas before buying parts.
  • Crash without breaking anything.
  • Run thousands of tests overnight (and train AI).
  • Everyone can work on the robot at once.

RoboLearn’s robot simulator is a simple 2D version of the same idea.

3D simulators

Simulator Notes
Webots Free and open source; easy to start; many ready robot models; Python, C, C++ controllers; works with ROS 2
Gazebo Free and open source; the classic partner for ROS 2
NVIDIA Isaac Sim Photorealistic; needs a powerful NVIDIA GPU; used for AI training
CoppeliaSim Flexible; free educational licence

They simulate physics (mass, friction, collisions), sensors (cameras, lidar, distance) and actuators (motors, joints).

The sim-to-real gap

Simulations are simplified. Real wheels slip, real sensors are noisy, batteries sag and floors aren’t flat. Code that works perfectly in simulation can fail on the real robot.

Reduce the gap by:

  • Adding noise to simulated sensors
  • Using realistic masses, motor limits and friction
  • Testing on the real robot early and often
  • Writing robust code (thresholds with margins, timeouts, fail-safes)

Finished this lesson?