Basic Driving with a Driver - Dutton-Christian-Robotics/Learning-to-Code GitHub Wiki

Use an if block to respond to the gamepad and call the appropriate drive functions.

Things to Note

  • Using an if block this way means that only one motion can happen at once, at those at the top of the chain have precedence
  • There needs to be a "if nothing is happening, stop" default action
  • Wouldn't it be great if we had variable speed?

To enable virtual gamepads in the simulator

From the simulator repository:

"To do this, go to the Config.java class in the virtual_robot.config package (within the Controller module), and assign "true" to the USE_VIRTUAL_GAMEPAD constant."