close_session
function, which automatically detaches all the behaviors and routines running on all robots and also stops the simulator. Then restart the notebook (Kernel->Restart
in the menu) and call the open_session
function again.epuck.detach_all_behaviors()
and epuck.detach_all_routines()
on all robots. This has the advantage of not having to re-execute all your code since you will keep the references to the ePucks and the simulator. The simulator will still be running. This means that for example the present spheres will still be there. The sphere apparition will also still be running if it has been previously started (to stop it, you have to call simulator.stop_sphere_apparition()
). If this method causes trouble, switch the one above.epuck.has_eaten()
for the latter, as seen in class). You will have demonstrated that it works as expected if we clearly see on the figure that eating events occur more when the glucose level is low. You can apply this method on most of your behaviors and/or routines.