Toward a Compositional Theory of Sensor-Based Robotic Systems