Gazebo's whole job is to fake physics well enough to be believable: gravity, friction, acceleration. Drag the sliders, drop a few objects, and watch it happen.
A real IMU publishes acceleration and orientation on a topic. Gazebo publishes the exact same kind of message, on the exact same topic. Flip the switch below and watch the display on the right. It never changes, only the label on the left does.
/imu/dataGazebo can also build the world around the robot. Paint walls and obstacles, spawn a differential-drive robot, then drive it by hand or drop a series of goal flags and let it plan and navigate to each in turn, watching its 360° laser scanner, the map it builds from that scan, and the ROS 2 messages it publishes along the way.
Spawn a robot to see its topics.
Two powered wheels, no steering. Forward speed is v = (vL + vR) / 2 and turn rate is ω = (vR − vL) / wheel_base. A ROS 2 diff_drive plugin turns the /cmd_vel (v, ω) into wheel speeds, and this demo's autonomous mode does exactly that conversion.
Every lidar beam says "free" for each cell it passes through and "occupied" for the cell it hits. Stack up many scans and the developer gets a nav_msgs/OccupancyGrid on /map, with 0 for free, 100 for occupied and -1 for unknown. Switch the pose source to odometry and drive into a few walls: the map smears, because the pose it is built from has drifted. That is the problem SLAM and localisation exist to solve.
The node the developer writes does not know or care which one it is talking to. Swap the robot underneath it and the node stays exactly the same.
Build and test a node against the simulated robot with no hardware in sight. When the real robot is ready, point that same node at it. Nothing in the code changes, because the topics and message types never changed either.