The software component of an FTC robot starts with installation of software packages on the control hub and driver station. Specifically, the REV Hardware Client (Figure 57) is the software designed to make managing REV devices easier for the user. This Client automatically detects connected device(s) such as control hub, expansion hub and driver station, downloads the latest software for those device(s) such as Control Hub Operating System for the control hub, and allows for seamless updating of the device(s). In each FTC competition, it is required to install the latest versions of those software packages during the inspection. Therefore, it is important to regularly check and update the software packages, as illustrated in Figure 58.
Typically, a laptop can be used to install the Rev hardware client software and a USB-A to USB-C cable (Figure 59) that can be used to connect the control hub and the computer with hardware client installed.
Figure 57. Download the Rev Hardware Client to your computer, connect it with your control hub, expansion hub and driver control for software installation or update. Image source: REV robotics.
Figure 58. Download the Rev Hardware Client to your computer, connect it with your control hub, expansion hub and driver control for software installation or update. Reference: https://docs.revrobotics.com/rev-hardware-client/gs/navigation. Image source: REV robotics.
Figure 59. A USB-A to USB-C cable that can be used to connect the control hub and the computer with hardware client installed. Image source: REV robotics.
Once the Control Hub Operating System is installed on the control hub, it can be used for various purposes of managing and operating the FTC robot. Figure 60 shows an example of using the software interface to set up Wi-Fi access for the control hub. The communication between driver control on an Android cellphone (Figure 61) and control hub is through Wi-Fi channels. It is important to set up a good password so that other robots won’t be able to login to your robot during FTC competitions.
Once the driver controller is connected to the control hub, it controls the robot through the interface shown in Figure 62(a). This is particularly important during the tele-operation model of the robot. Typically, a game pad is also connected to the driver controller through the Android cell phone, as shown in Figure 62(b).
Figure 60. Once in the Robot Controller Console, there are two options. If just the Wi-Fi Access Point name and password need to be found, they can be seen on the main page of the Robot Controller Console. If any of the Wi-Fi Access Point information needs to be changed, select the menu button in the upper right-hand corner of the page. Reference: https://docs.revrobotics.com/duo-control/managing-the-control-system/ch-wifi. Image source: REV robotics.
Figure 61. A Motorola G Power Android smart phone can be purchased and used as the Driver Station. It is connected to the robot’s Control Hub for the Tele-Op mode operations. Image source: Motorola.
(a)
Figure 62. The Driver Station software needs to be installed on your Android smart phone. Connected to the control hub’s Wi-Fi and etc. Image source: https://ftc-docs.firstinspires.org/en/latest/programming_resources/shared/control_system_intro/The-FTC-Control-System.html. Figure source: REV robotics.
(b)
Now, it is ready to configure all of the connected motors, servos and sensors discussed in Chapter 3 and Chapter 4 via the driver station software interface, as shown in Figure 63(a). This is a very important step to make sure the connected hardware will work together with the software and to offer an interface for your later programming on the control hub. More details of this configuration process are illustrated in Figures 63(b)-(d).
(a)
(b)
(c)
(d)
Figure 63. (a) Select the menu in the stop right corner of the Driver Station. Then select Configure Robot. Reference: https://docs.revrobotics.com/duo-control/programming/hello-robot-configuration. (b) In the Available configurations page, select New. (c) In the USB Devices in configuration page select the Control Hub Portal. Note: If you have an Expansion Hub it will appear as an Expansion Hub Portal. (d) This will bring you to the page shown in the image. From here you can configure motors, servos and sensors that you are using. Follow through the rest of the guide to figure out how to configure devices that will be used in the Test Bed section. Note: The way that Digital and Analog devices are configured versus how I2C devices are configured differ significantly. This is because each physical I2C port is a different bus that can host multiple different sensors. For more information on the different types of sensors, please check out the sensors. Figure source: REV robotics.
Figures 64-66 provide a few examples of screenshots of my driver station’s configurations. More technical details and references on hardware mapping are referred to REV robotics’ technique documents: https://docs.revrobotics.com/duo-control/programming/hello-robot-configuration.
Also, it is important to add a hardware push bot file (Figure 67) onto your programming environment so that you can code actions and parameters on these hardware interfaces mapped via the above configuration steps shown in Figures 64-66.
Figure 64. An example of my configuration.
Figure 65. Another example of my configuration.
Figure 66. An additional example of my configuration.
(a)
Figure 67. Hardware push bot file that maps the hardware items to the software interface.
(b)
Now, the robot is ready for programming. You can add your own codes onto the robot using three possible ways: blocks, OnBotJava, and Android Studio. Here, I will focus on the introduction of OnBotJave mode of programming. Figure 68 shows an example of the OnBotJava interface.
Figure 68. The OnBotJava interface on the Control Hub was employed to program the robot. Please refer to the Appendix #5. It is also provided by the FIRST website: https://ftc-docs.firstinspires.org/en/latest/programming_resources/onbot_java/OnBot-Java-Tutorial.html.
Figures 69-73 provide one example of codes for tele-operation of an FTC robot with common manipulation actions. This file starts with the declaration of TeleOp() function that tells the Java compiler that this will be a tele-operation mode. The entire tele-op code is a Java class that is derived from LinearOpMode class. In the beginning, the hardware mapping code shown in Figure 67 should be loaded for the following initialization, calling and operation of those hardware interfaces. More detailed description of each segment of the code is provided in the figure legend.
Please refer to our released codes (shared in Appendix) for more details of the LinearOpMode class (HardwarePushbot.Java).
Figure 69. The pushbot codes for tele-operation of the robot shown in Figures 49-50. Here, a few key parameters are defined. The function telemetry.addData() will output texts on the driver station’s screen for the purpose of visualization and validation of the robot’s active status.
Figure 70. The while loop for events handling. The opModeIsActive() function in the while loop keeps reading the operator’s input, and routes the operation instruction to different handling functions.
Figure 71. Moving up and down operation of the robotic arm of the robot shown in Figures 49-50.
Figure 72. Auto moving of the gripper of the robotic arm of the robot shown in Figures 49-50. This operation can save much time of manually moving the gripper during tele-op mode of the FTC robot.
Figure 73. The gripper operations (open and close) for the robot shown in Figures 49-50.
Please refer to our released codes (shared in Appendix) for more details of the gripper operations (OneDrive_Go.Java and TwoDrive_Go.Java).