What does this Op Amp circuit do in this circuit for a line following robot?
The device that looks like an opamp is a comparator, it compares the REF_I_MAX input with ISENSE_G input. The output is low unless the sense level becomes higher than the reference voltage in which case the BRAKE_G output becomes high.

Seems to be a brake mechanism that is activated when the current of the motor exceeds the reference level (for whatever reason).