WRover Software
|
This document describes the setup process for the rover.
If the hardware is already configured (i.e. the rover is already put together), you can skip this section.
To begin with, you'll want to procure a Mars rover. The rover should have roughly the following hardware subsystems:
You'll want to start by flashing the Raspberry Pi's SD card with Ubuntu 20.04 "Focal Fossa".
Canonical distributes server versions of Ubuntu 20.04, these can be deloyed to an SD card via the Raspberry Pi.
After re-inserting the SD card, you'll want to boot up the Raspberry Pi and complete the first-time setup for Ubuntu, which can be done with an external monitor and keyboard. Make sure you set the user account's name to wiscrobo
!
You'll need Python 3 to run the ROS-based robot software, as well as a couple tools for installing dependencies. To install Python 3 and the pip
package management tool, you can use the command:
Then, you can use pip
to install the virtualenv
package:
You'll now want to install ROS Noetic itself. Follow the installation instructions on the ROS wiki to do this. It is recommended that you install the ros-noetic-ros-base
("bare-bones") meta-package only, as the rover doesn't necessarily need the GUI tools included in ros-noetic-desktop
.
For the base station (and any other remote machine) to interact with the rover, you'll need to install an SSH server. The recommended implementation is the OpenSSH server daemon sshd
, which can be installed with the command:
Now, you'll want to modify the configuration to allow for public key authentication. Open the file /etc/ssh/sshd_config
in your text editor of choice and ensure that the following line is uncommented:
Then, to start up the server, you can enable the SSH service with the commands:
You could now test to see if it's possible to SSH to the rover from a remote machine. Get the WRover's IP address by running this command on the WRover:
Look for an ethernet address, and substitute it in for this command on the base station.
You'll also have to configure public key authentication for any base station machines; see setup_dev.md
for more details on this.
This section does not work reliably in practice. Consider the time cost of setting this up/debugging, and don't fall for the sunk-cost fallacy.
The software system uses mDNS/zeroconf to find the rover on the network. To allow for this, you'll need to install an mDNS service on the rover which responds to name resolution requests. Ubuntu should already ship with the Avahi daemon, a popular mDNS implementation, but if not, you can install it with:
Now, you'll need to do is update the rover's mDNS hostname to wrover-pi
in the Avahi configuration file /etc/avahi/avahi-daemon.conf
:
Once this is done, you can restart the Avahi daemon using the command:
To make sure this worked correctly, you can try pinging the rover by hostname from the base station:
Use GStreamer/similar to convert the USB cameras to RTSP streams. Then, use the simple-rtsp-server
program found online to act as a transmission manager for the RTSP streams and serve cameras to the base station.
The cameras typically involve a lot of tuning to get optimal streaming characteristics. The CPU load incurred by the cameras may cause the team to use a separate camera co-processor to alliviate load from the main CPU. Good camera characteristics would probably be:
These needn't be achieved at the same time, but if they aren't, the swap should be quick.
You'll want to start by cloning this repository to /home/wiscrobo/WRover_Software
. Next, navigate into the repository and run the commands:
Then, continue setting up the WRover environment according to the Developer Setup Instructions. Keep in mind that the WRover is a shared machine, so be careful adding things like GitHub SSH keys. You will have to locally build the code to get the executables and message definitions needed to run the code.