Add a new method, something like RUR.register_frame_callback(fn), which would enable a single function to be called when a frame is recorded. This function, which should only be called when a frame is being recorded, should likely be executed as follows:
recordings(false)
callback()
recordings(true)
Similarly, show how one can redefine an exception to do something else (e.g. showing an animation if a wall is hit). It might be helpful to record the robot id which caused the exception so that it is available.
Add a new method, something like
RUR.register_frame_callback(fn)
, which would enable a single function to be called when a frame is recorded. This function, which should only be called when a frame is being recorded, should likely be executed as follows:Similarly, show how one can redefine an exception to do something else (e.g. showing an animation if a wall is hit). It might be helpful to record the robot id which caused the exception so that it is available.