This will make it possible to configure Devices without having to do name mangling. When the controller starts, create a Supervisor instead of a Robot and then immediately check the return value supervisor.getSupervisor(). If it is false, exit with an error message telling the user that they need to set their robot's supervisor field to true, save, and reload the world.
We could eventually lift this restriction if a future version of Webots allows non-supervising robots to access configuration fields on Devices, or if we feel it is worth it to work around the current limitation by mangling names as described in #22.
This will make it possible to configure
Devices without having to do name mangling. When the controller starts, create aSupervisorinstead of aRobotand then immediately check the return valuesupervisor.getSupervisor(). If it is false, exit with an error message telling the user that they need to set their robot'ssupervisorfield to true, save, and reload the world.We could eventually lift this restriction if a future version of Webots allows non-supervising robots to access configuration fields on
Devices, or if we feel it is worth it to work around the current limitation by mangling names as described in #22.