Ground Support Equipment Software for the Cornell Rocketry Team including fill station and ground server
First, install Docker for your specific computer. Then, to start the ground server run:
docker pull ghcr.io/cornellrocketryteam/ground-server
docker run -it -d --network="host" ghcr.io/cornellrocketryteam/ground-server
If you want to build the docker image locally, navigate to the root directory then build:
cd Ground-Software/ground-server
docker build -t ground-server -f ./ground-server/Dockerfile .
First, install Docker for your specific computer. Then, to start the ground server run:
docker pull ghcr.io/cornellrocketryteam/fill-station
docker run -it -d --network="host" ghcr.io/cornellrocketryteam/fill-station
If you want to build the docker image locally, navigate to the root directory then build:
cd Ground-Software
docker build -t fill-station -f ./fill/Dockerfile .
Buildifier will fix a lot and format all bazel files by running
bazel run //:buildifier.fix
FOR x86 LINUX OR WSL (NOT RASPBERRY PI)
- Install bazel:
sudo apt install bazel
- Check version (tested with version 7.3.1):
bazel --version
Clone Fill-Station repository:
git clone https://github.com/cornellrocketryteam/Fill-Station.git
cd Fill-Station
bazel build ground:all
bazel build fill:all
bazel run ground:all -- --server_port=<port>
50051 is default
bazel run fill:all -- --client_target="<hostname>:<port>"
localhost:50051 is default
bazel run ground:all -- --server_port=50052
bazel run fill:all -- --client_target="localhost:50052"
-
Follow all the Linux/WSL instructions to install Bazel and build natively
-
Install the gcc cross compiler:
sudo apt install gcc-11-arm-linux-gnueabihf
- Cross compile services (this will take longer the first time: ~9 minutes for me)
Build ground. Note this needs both arguments for some reason due to an issue with the absl library :(
bazel build ground:all --platforms=platform:rpi4 --cpu="aarch64"
bazel build fill:all --platforms=platform:rpi4 --cpu="aarch64"
There are many ways to do this, but I prefer to directly connect it with an ethernet cable, then configure my laptop to have a static ip of 192.168.1.202 (no DHCP), then run:
cd <path to>/Fill-Station
Copy to Pis. Note scp does not overwrite the files, so you have to delete/rename them on the pi first.
scp bazel-bin/fill/fill_station crt@192.168.1.201:/home/crt/Desktop
scp bazel-bin/ground/ground_station crt@192.168.1.200:/home/crt/Desktop
To run on pis, we must make sure they have the correct loader, "/lib/ld-linux-armhf.so.3" If they do not, you may see an error such as "cannot execute: required file not found"
cd ~/Desktop
./ground_station --server_port=<port>
./fill_station --client_target="<hostname>:<port>"
./start_ground_station
./start_fill_station
./ground_station --server_port=50052
./fill_station --client_target="ground:50052"
FOR RASPBERRY PI (and other arm processors) Install bazel via bazelisk
- Install bazelisk
pushd ~/Downloads
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-arm64
chmod +x bazelisk-linux-arm64
sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel
- Install bazel (tested with version 7.1.1)
bazel --version
- Clone Fill-Station repository
popd
git clone https://github.com/cornellrocketryteam/Fill-Station.git
cd Fill-Station
The discard_analysis_cache flag limits ram usage to prevent Pi 4 crashing
bazel build ground:all --discard_analysis_cache
bazel build fill:all --discard_analysis_cache
After building, run as in the native linux installation instructions above.