Branch | Build status |
---|---|
master | |
develop |
https://github.com/pontuslaestadius/carpet
Contributors |
---|
Sebastian Fransson |
Kosara Golemshinska |
Pontus Laestadius |
Elaine Qvarnström |
A self driving university car project based on the cloun library. The software is able to utitlize the OpenDaVinci library to follow a lane and perform Vehicle to Vehicle communication as well as platooning.
The development branch serves as a place where tested code is integrated and collected in-between releases, while the master branch will serve as a place for the latest release/stable version. Development of features is separated into branches with appropriate naming. Test-cases will put within a separate folder to separate tests from deployment code.
When merging to master a release will be created to provide traceability.
Travis CI is used in development to build and test the code. Whenever a contributor pushes a change to the master or development branch and the build/tests fail the contributors to the project are notified via mail.
Following these guidelines
git clone https://github.com/pontuslaestadius/carpet
The carpet repository has a help script. With predefined functions. It's documentation can be viewed using the following command.
sh chain.sh -h
Building the repository can be done using cmake in a seperate directory, before using make in the source code directory. There are three different commands which can generate an executable output.
Runs it on your local machine and generates an output inside the build directory.
sh chain.sh -l
Generates it as a docker image
sh chain.sh -b
Generates it as an arm docker imaged tagged as :armhf
sh chain.sh -ba
cd build/
./carpet
If the image is not copied correctly, try pulling it direcly from our hub:
sh chain.sh --pull
Deployment of the software is handled using an alpine docker image which compiles and extracts the binaries which can be uploaded to the car using a docker image. Uploading to the car is done via a docker image stored on the docker hub. Which is remotly downlaoded and executed on the desired platform.
sh chain.sh --push
The build command is used to push the images to your docker hub. Which in our case would be located at pontusla/carpet_compile To use a different docker hub account, this needs to be specified in the chain.sh bash script.
If you prefer not to use the docker hub to distrubute your images. There is a ssh transfer command for your docker images. You will be asked to enter your device's password twice as it uses scp and ssh.
sh chain.sh --pull
sh chain.sh -t
These commands can also be chained together, as the name says. So the following is valid.
sh chain.sh -ba --push -t
It will build an arm:hf tagged image, push it to the remote docker hub and run the image on the car over ssh.
How to run the test cases:
Having linked Travis CI to the repository, tests are run after every pushed commit / during pull-requests.
Testing the current software can be done through the following:
sudo apt-get install socat
socat UDP4-RECVFROM:1236,ip-add-membership=225.0.0.111:0.0.0.0,fork –
mkdir build
cd build/
cmake ..
make test
sh chain.sh -l