Added a function that converts robot speed and direction to motor values.