360-320-6221 caperren@caperren.com

2017-2018 Mars Rover Software Lead


First off, if you haven’t seen all of the other projects I’ve worked on, take a look at those first as this is culmunation of everything I’ve learned during my time at OSU, both personal and academic. After being the emergency software lead for the 2016-2017 Mars Rover Competition I hadn’t intended to be the software lead for this particular year, but was convinced for multiple reasons. Firstly, with only nine days to write the code, starting from scratch (hence, emergency), I had managed to get a lot more done than I was expecting. Turns out years of practice had given me the skillset to get a lot done in a short period of time. Second, and the big one, is that all of my friends from the Robotics Club decided that we’d go all-in for a final year of Rover. So for the first time since 2011, before most of us were even at OSU, we would have someone one the software, electrical, and mechanical teams with many years of experience. We all agreed to try and go out with a bang!

For me, this meant that not only did I become the software lead but I also turned the ground station into my OSU senior design project, allowing me to spend school time on the project as well as my free time. Setting and even higher bar for the project, I elected to make the requirements for this ground station what I’ve always imagined a good ground station should be. Two screens absolutely packed full of data and controls, multiple video feeds, and realtime mapping. I wanted it to feel like you were at the control station of something awesome when using it. Outside of the ground station software, and any writing requirements required by the senior design course, I was also in charge of the software running on the Rover as well as the firmware running on any micro-controllers interfacing with hardware. Now, I’ve been a part of the club, its projects, and labs around OSU long enough to know that it’s easy to let a large project like this fall through, especially when you have inexperienced people working on it. So, to mitigate this I just about lived in the robotics lab for most of the year. I honestly don’t know if I want to know just how long because I’m sure it’s more than 2000 hours. Keep in mind that while this was going on I was still working at my job and taking some classes (though a lighter course load than normal).

The result of this fairly insane amount of time dedicated meant that I was able to acheive all of my baseline goals and more. This whole project is my proudest creation during my time at OSU, which I think is saying something considering all of the fun projects I’ve worked on. The ground station worked amazingly, had more features than I’d originally anticipated and was incredibly stable (it never crashed once while performing mock or real competition tasks). As of halfway through the competition, it was also feature-complete which was no small feat. The rover software was the most complex and stable we’d had as well, and ended up incredibly robust to harsh operating conditions. Specifically, one of the custom designed PCB’s that interfaced to most of the Rover sub-systems would drop connection every once and a while (15 minutes to 5 hours, very random) so I’d designed all of that software to handle these disconnects, reconnect as soon as possible, and keep running like nothing had happened. Of course there were still known bugs in both the Rover and ground station software, but nothing critical, and specifically nothing that caused crashes.

At competition, we brutally beat the other teams. Our final score was 287. The second best team got 159. We even managed to do this while spending 4/5 of our time there fixing systems and even building new ones last minute. So, as I’m sure you saw in the picture above, we got first place! In all the years that my friends and I had been leads or members of the Mars Rover team, we’d never placed better than 3rd, and that was only once. So, for all of us it was a sigh of relief and more excitement and happiness than I can convey to have finally done it.  Feel free to check out the album of images above or videos below to see more about this project. If you ever see me in person, or want to ask me questions via email, feel free to do so as well. I could talk for ages about this project and am more than happy to!

Ground Station Details

As mentioned above, I really wanted this ground station to feel like you’re sitting in front of the control interface for an awesome robot and not just a bunch of thrown together systems. I’d already written many front-end applications using PyQt and so chose it again so I’ve have an experienced starting point. For the desktop, we used and Intel NUC with a Core i5, 16GB ram, and nvme ssd powering two 23″ 1080p monitors. I chose two monitors so we would be able to see all primary Rover systems without having to swap between tabs or pages, which I’d had to do on some other software I’d written and knew wouldn’t be efficient when we were in the middle of a timed event. The desktop ran Ubuntu 16.04 with the ROS stack. I ended up writing all of the ground station software minus the mapping system (though I did work on that a bit too), and some of the status indications. I’ll put a list of all the features and controls below.



  • Clock
  • Event Timer
  • Status Indication
    • Rover Connection
    • Controller Connection Info
    • Radio Stats
    • GPS Stats
    • NVidia Jetson TX2 Computer Stats
    • Battery Voltage w/Low Battery Warning
    • Wheel Connections
    • Camera Connections
  • Radio Direction Finding
    • Raw Radio RSSI Indication
    • Radio RSSI Pulse Frequency w/Validity Indication
  • Arm
    • Special Movements
      • Stow Arm
      • Unstow Arm
      • Upright Arm
    • Calibrate Arm
    • Clear Arm Fault
    • Reset Arm Motor Drivers
    • Task Movements
      • Approach Oxygen Tank
      • Depart Oxygen Tank
      • Approach Light Beacon
      • Depart Light Beacon
  • Mining/Science
    • Bucket Weight Measurement
    • Bucket Lift/Tilt Position Readouts
    • Preset Bucket Movements
      • Mining Transport
      • Mining Measure
      • Mining Scoop
      • Science Panorama
      • Mining Sample
      • Mining Probe
    • Science Probe Readings
      • Temp in C
      • Moisture %
      • Loss Tangent
      • Soil Electrical Conductivity
      • Real Dielectric Permitivity
      • Imaginary Dielectric Permitivity
    • Science Camera Controls
      • Video Output Selection
        • Network Video
        • Camera LCD
      • Photo Controls
        • Zoom In One Step
        • Zoom Out One Step
        • Full Zoom In
        • Full Zoom Out
        • Shoot Photo
    • SSH Console
      • SSH Terminal Display
      • SSH Command Entry
      • Preset Commands
        • Network Host Scan
        • List Wifi Networks
        • Equipment Login and Help
        • Equipment Logout
        • Equipment Status
        • Equipment Start
        • Equipment Stop
      • Connect/Disconnect Rover Wifi by SSID
    • Settings
      • Map Selection
      • Map Zoom Level
      • Rover Wifi Radio Channel Selection
    • Mapping Display
      • Shows Google Map Terrain
      • Shows Rover Location And Orientation
      • Shows Rover GPS Coordinates
      • Shows Saved Waypoints
    • Waypoint Entry / Editing
      • Name Entry For Landmarks
      • GPS Entry in Decimal
      • GPS Entry in Degree/Minute/Second
      • Waypoint Color Choice
    • Autonomy Control (Unused)
    • Navigation Waypoints
      • Shows And Allows Editing Of Nav Waypoints
    • Landmark Waypoints
      • Shows And Allows Editing Of Landmark Waypoints
    • Arm Joint Positions
      • Positions Of Six Arm Joints In Revolutions
    • Gripper Joint Positions
      • Positions Shown As Raw Encoder Positions
    • Arm Motor Drive Statuses
      • Communication/Movement/Fault Statuses For All Six Arm Joints
    • Gripper Joint Positions
      • Positions Shown As Raw Encoder Positions
    • Arm Motor Drive Statuses
      • Communication/Movement/Fault Statuses For All Six Arm Joints
    • Gripper Mode Readouts
      • Gripper Mode Control State
    • Xbox Control Mode
      • Showed Whether Xbox Controller Moving Arm Or Mining
    • Heading and Goal Indication w/Compass
      • Raw Heading Indication
      • Goal Indication (Unused)
      • Compass Heading Indication
    • Low Resolution Mode
      • Controlled Low Resolution Fallback Mode During Radio Failure
    • Current Speed
      • GPS Speed
    • Speed Limit
      • % Of Max Rover Speed As Limit
    • Tank Drive Output
      • % Of Total Power To Left/Right Rover Drive Systems
    • IMU Readings
      • Pitch/Roll Readings In +/- 1 Readout
    • Triple Camera Displays
      • One Primary Video Display
      • Two Secondary Video Displays
      • Named Display For Currently Viewed Camera
      • Ability To Set Each Display To Any Camera
      • Ability to Disable Any Camera
      • Ability to Pan/Tilt Any Camera

    Rover Details

    The Rover itself ran on an NVidia Jetson TX2 single-boad computer powered from a 500Wh li-on battery. The electronics box also contained a fuse box, power cutoff, network switch, battery backup, composite to network video converter, usb hub, FrSky controller receiver, and custom usb->RS485 adapter board. The TX2 ran Ubuntu 16.04 with the ROS stack, just like the ground station. All remote control boards on the Rover were communicated to using the modbus protocol using RS485. Interfacing with the arm was acheived using RS485 using the custom simplemotion control library provided by the motor controller company. Using linux UDEV rules, usb->serial and cameras were symlinked to custom, repeatable names at /dev/rover/*** so that devices could be accessed through easy to use names through reboots. Custom ROS nodes were written for each system to be controlled, and the whole Rover ROS package set to start automatically at boot. The Rover could be controller with an FrSky X9D controller whether the ground station was running or not. The controller could also override all other control inputs fly flipping a switch on the controller. This was a safety feature to ensure runaway ground station or autonomy code wouldn’t allow the Rover to take off on its own. Conversely, the Rover would also work without the controller powered on, but would immediately allow for this override if turned on at any time. 

    Communication with the ground station was done using two Ubiquiti Rocket M2 long-range wifi radios, along with their 10dB omnidirectional antennas. This simple setup allowed for a transparent ethernet link to be made between the two systems, allowing for useful features such as remote debugging and code upload. The radios were tested to work at roughly a kilometer away, mostly line-of-sight. On top of writing all of the Rover software, and almost all of the ground station software, I also assembled most of the Rover PCBs and did much of the Rover wiring.