From mobility to autopoiesis: acquiring environmental information to deliver commands to the effectors