There are multiple pieces of software used for this project, on several different hardware platforms. The first is Arduino, which is used due to it operating at 5V and having PWM outputs that can be used with servo motors. The Arduino can also take in analog and digital inputs like sensing when to activate the electromagnet along with using the motor for the power and unwinding when having the catapult go back to its resting position.
The second piece of software is on the Raspberry Pi 3B. This was setup using Ubuntu 16.04 on Arm to be able to use the ROS and ROSARIA packages to control the robot. A startup script is used to activate the hotspot and start ROS, along with starting the program to control the robot. This is controlled over an SSH connection along with using netcat to stream the video over the network. The inputs to the system are from a GUI built using Tkinter and Python, which can also communicate over a USB serial connection to the Arduino. Finally, the SSH connection allows for a laptop to be used to control the robot moving and firing to make it easier to control the robot overall.
The GUI in detail has several different buttons to control the speed and turning radius, the current direction, the current message from the Arduino, a button to turn on or off the camera or sonar, and several buttons to control the Arduino including launching or loading a bean bag and the commands that those run individually.
The rationale for this setup is to be able to have a method to easily interact with the robot along with get more information than with a command line interface input which would need to display which keys do a command. Examples of the software showing colors on the buttons to display states of operation is shown in the gifs below. This setup also allows the Raspberry Pi to multitask using the Arduino along with use 5V logic. This setup also allows quick prototyping as the Raspberry Pi can use arduino-mk to program the Arduino to make testing the software faster especially if quick changes need to be accomplished, and run a ful ROS to control the Pioneer base properly.
Launching Example
Sonar Example