When the bot is moving, the motor generates torque, which is transmitted through the gearbox with some loss, into the wheels, where torque is converted to force that accelerates the bot forward, as long as the friction between wheels and floor is high enough to avoid slipping.
When you want to brake, this is inverted. The friction of the wheels against the ground and the inertia of the bot drives the wheels, which back-drives the gearbox, which makes the motor spin, which generates current (like a generator!) There are losses in this transmission, that make a lightweight bot with low inertia stop “pretty quickly” (which you’d have to measure to know exactly how quickly.) The braking comes from both gearbox losses, and motor losses.
The “shorted braking” feature means that the output of the motor, when it is working as a generator, is shorted together. This will present a large amount of load on the motor, which will significantly increase motor losses – the motor-turned-generator will now dissipate more energy, and thus bleed more inertia from the moving bot. Any inertia that is still present will move the bot a little bit, which you can sense as moving wheels as long as there is no slip.
If you want to force the wheels to not move, using motor drive to apply force, then you need to be able to detect movement of the wheels, which can be done by detecting movement of the motor shaft, which is what encoders is for. You could thus implement a control loop that detects movement on the wheels, and applies reverse force from the motor to move the wheel “back” to where it was. Do this fast enough and the wheel will be, effectively, stationary. (See PID control loops for more details.)
When it comes to “blocked wheels braking,” the reason you don’t lock your wheels in a car is twofold:
- Locked wheels will just skid forwards; you lose steering. It’s often more important to be able to steer than to stop as quickly as possible.
- On some kinds of surfaces (rain/snow? I forget) the rolling friction may actually be bigger than the sliding friction, and thus non-locked wheels will stop faster by bleeding the kinetic energy out the brake pads instead of out the road/tire contact patch.
For rubber tires on dry asphalt, if the shortest stopping distance is the only important thing, locking the wheel is typically maximally efficient.