Programming modular robots with the TOTA middleware