Stealing the duck
Now we know how to make your robot and computer communicate using brokers and modules, we can make a choreography with Choregraphe to explain three laws of robotics:
- Find and steal the duck
- Throw the duck with the module landmark
- Lie to another NAO about the duck
There are many ways to make this happen. We'll choose here to centralize the demonstration with a computer that commands all the robots. That computer could be a master NAO.
We suppose robot1 and robot2 both have an audio module and a memory module to store their own information. If modules are not present, the application will raise exceptions that can be caught.