Team Kanaloa 5 of 7

board which cuts power to the system. In the event the Arduino shall fail, the relay boards are configured to be normally open which kills the WAM-V system. In the event the transmitter loses power, the R9 receiver has a failsafe setting to send the kill signal to the Arduino. An LED strip is used to indicate the state of the WAM-V. This LED strip is also controlled by the kill switch Arduino via the second relay board.

testing because of its ease of programming and availability. In the Figure 11 below is a view of the obstacle from the WAM-V’s perspective, on the left. Next to that image is the code’s color contrasted correction of the image used to determine not only the color detected, but also where in the image it detects it. Finally, on the far right, is the code marking the first image with a simple circle to help identify and track the detected color.

###### Figure 10: First Iteration

This is one of the first iterations of the code. In later iterations the contours’ color would not only match the identified color but also display the color’s name in text (Figure 11 ).

###### Figure 9: Kill Switch Chart

The Taranis QX7 transmitter was chosen for its 16-channel configuration on a 2.4 GHz connection. 16 channels provide more manual control of the WAM-V system.

### C. Software System

Team Kanaloa utilizes Robot Operating System (ROS), an open-source operating system for the team’s software platform. Since the team comprises of mainly mechanical engineers, the number of competent students in programming is small. Therefore, ROS allows the team to use drivers and packages that are already developed and add onto it, alleviating the amount of programming needed for the WAM-V.

###### Figure 11: Final Iteration

The camera’s used for this, and other vision software on the WAM-V, were Logitech HD Pro Webcams. These were chosen due to their low price and USB compatibility. A ROS package, usb\_cam, creates a node that interfaces with usb cameras and can publish image data to the onboard computer. This image data can then be sent to a second package, image\_transport, which turns the raw image data into a compressed format. Compressing the images allows for less bandwidth being used over the wireless communication system and smoother live data at the ground station. The Color Recognition code will be run, manually, at the ground station so as not to take up computing power from the WAM-V’s onboard computer.

Running on OpenCV2 (Open Source Computer Vision Library) environment, the Color Recognition code is written in Python. The main factor in deciding to use Python and OpenCV2 was the experience and proficiency of the team members in said languages. The code itself subscribes to a node in ROS that publishes image data. Then the code identifies color in the image through HSV thresholding. Contours are then formed around the identified pixels to show and track where the identified color is in the video or image. In initial testing of the code a simulation of the RobotX competition, developed on the platform Gazebo, was used. The simulation, Virtual Maritime RobotX Competition (VMRC), contains not only the WAMV but also sensors, including camera, and obstacles found at the competition. Most importantly is the “Scan the Code” obstacle: the light buoy. VMRC’s light buoy can be programmed to display any color or pattern of colors; which can be then captured by the simulated camera into a compressed image format. This simulated data was ideal for

The Image Recognition code was developed in MATLAB. Chosen, again, because it is the language that was most familiar to the team. Another factor for choosing MATLAB over other languages, was the many image and object detection algorithms offered with documentation. The team decided to use R-CNN detector, which allowed to train a neural network with images of the competition shapes supplied by the team itself. The detector returns the location of the objects with a labeled bounding box (Figure 13 ).