Callback functions are special script functions that are optionally called by V-REP in a specific state of a simulation step:
Dynamics callback functions are called by the physics engine before and after each dynamics simulation step.
The contact callback function is called by the physics engine for each contact pair.
Joint callback functions are called by the physics engine for custom joint control.
Dynamics callback functions
Contact callback function
Joint callback functions