This software runs on the Raspberry Pi that communicates with the DAS via UART to handle traction control.
The setup is divided in three steps:
- Default user is
tc
and password ispiCore
- Set password to
sborato
withpasswd
- Since TC runs completely in RAM, changes are made permanent by editing
/opt/.filetool.lst
(a list of files to backup before shutdown and restore after boot). Make the password change permanent withsudo echo '/etc/shadow' >> /opt/.filetool.lst
- Trigger the backup with
filetool.sh -b
...
- If it's not already installed, run
tce-load -wi openssh
- To autostart it at every boot edit the startup script
sudo echo '/usr/local/etc/init.d/openssh start &' >> /opt/bootlocal.sh
- The SSH keys are lost and regenerated after every reboot. Add them to the filetool list with
sudo echo '/usr/local/etc/ssh' >> /opt/.filetool.lst
- Trigger the backup with
filetool.sh -b
To compile this software you need to clone the repo and run the all
Makefile recipe.
- SSH into the RPi
- Username:
tc
- Password:
sborato
- Username:
- Pull the code
-
If the repo is not already present, clone the repo
git clone git@github.com:eagletrt/fenice-traction-control-sw.git
-
Otherwise, just
cd
into it and rungit pull
-
- Update the submodules (
micro-libs
). \git submodule init
git submodule update --remote --recursive
scp -r fenice-vehicle-model/C_code tc@controllo-sborato:/home/tc/fenice-traction-control-sw/fenice-vehicle-model/C_code
scp -r micro-libs tc@controllo-sborato:/home/tc/fenice-traction-control-sw
- Download the realize of repository fenice-vehicle-model-DMT and copy the folder C_code in the folder fenice-vehicle-model
- Compile the code with
make all
- In the
build
folder you should now have:- The main binary:
fenice-traction-control
- The velocity estimation dynamic library:
libctrl-ve.so
- The four dynamic libs for the models:
libctrl-{no,sc,tc,all}.so
- A binary that loads the models and tests them against a provided dataset
- The main binary:
To execute the binary, cd
into the build folder and run ./fenice-traction-control
. Note that you need to call the binary from within its folder otherwise it won't find the dynamic libraries.
At the end, if you need to analyze or gather control data, use scp
to copy back the log files it produced (they're located inside the build
folder) otherwise at shoutdown they will be lost.
scp tc@controllo-sborato:/home/tc/fenice-traction-control-sw/build/\*.csv ./logs/