Date: Fri, 29 Mar 2024 07:17:25 +0100 (CET) Message-ID: <355567878.183.1711693045296@cpm> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_182_239167550.1711693045295" ------=_Part_182_239167550.1711693045295 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Change password by using
passwd = pi=20
Activate SSH
sudo sy= stemctl enable ssh sudo systemctl start ssh=20
Install tmux
sudo a= pt install tmux=20
/usr/local/lib/
=
by copying the arm-folder from the =
Main PC under opt/rti_=
connext_dds-6.0.0/lib/armv6vfphLinux3.xgcc4.7.2/
. This can of=
course only be done after the ARM libraries have been installed on th=
e Main Computer. =
li>
It should look like this afterward:
pi@rasp= berrypi-06:~ $ find /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xg= cc4.7.2/ /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/ /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppd.= so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscd.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstrans= porttcpzd.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2z= .a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppz= .a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonito= ringd.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstrans= porttcp.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2.= so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2d= .so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonito= ringz.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstrans= porttcpd.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscz.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppzd= .a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsc.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddstrans= porttcpz.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcpp.= so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp.s= o /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscore.= so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonito= ringzd.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscorez= .a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscppz.= a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscored= .so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppd= .so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsjava.= so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscpp2z= d.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsczd.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddscorez= d.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/libnddsjavad= .so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtimonito= ring.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcz.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcppz= d.a /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlc.so /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlcd.s= o /usr/local/lib/rti_connext_dds-6.0.0/armv6vfphLinux3.xgcc4.7.2/librtidlczd.= a=20
Make the libraries available. Insert /usr/local/lib/rti_connext_dd=
s-6.0.0/armv6vfphLinux3.xgcc4.7.2
into /etc/ld.so.conf
.=
Then run
sudo ld= config=20
Copy the file git:software/vehicle_raspberry_firmware/bootloader_r=
aspberry.bash
to /root/bootloader_raspberry.bash
on the=
Raspberry.
Enable autostart, using sudo nano /etc/rc.local
and insert<=
/p>
tmux new-session -d -s "bootloader_raspberry" "bash /root/bootloader_ras= pberry.bash"
See the NUC NTP-Configuration.
Edit the /etc/hostname
file to give the Raspberry a unique =
name. The name should correspond to the vehicle ID, for example raspb=
errypi-06
or raspberrypi-42
.
Create a DHCP reservation for the Raspberry on the router. The vehicle I=
D is derived from the IP. The IP is 192.168.1.1XX
where =
XX
are the digits of the vehicle ID.
One crucial aspect regarding the Raspberry Pi is, that the vehicle will =
be turned off by using the switch on the bottom, mostly. That will directly=
cut off the power supply of the RPI. In order to avoid damage to the OS, i=
t is important to configure the filesystem to be read-only. For that, follo=
w the instructions on https://kofle=
r.info/raspbian-lite-fuer-den-read-only-betrieb/ . (As alternative https://www.mehr4u.de/raspberry-pi-mi=
t-readonly-filesystem.html may also be used. Vehicle 20 is created by f=
ollowing the first link but using fastboot noswap ro
instead o=
f fastboot noswap
.)
In order to make NTP working properly with a read-only filesystem, it is= also necessary to copy the following file
cp /lib= /systemd/system/ntp.service /etc/systemd/system/ntp.service=20
and to comment out PrivateTmp=3Dtrue
in
/etc/systemd/system/ntp.service
If you need writing access to the file system, you can use (dep= endent on the folder you need access to)
sudo mo= unt -o remount,rw / sudo mount -o remount,rw /boot=20
to remount the system.
Because the vehicle needs to be real-time capable, a real-time patch (RT= -Patch) should be applied to the underlying Linux Kernel.
Follow these instructio= ns to build the kernel. It is recommended to use the section Cross= -Compiling instead of Local Building to speed = up the process (e.g. ~15 minutes vs. ~2 hours). Additionally, there has to = be done several annotations:
head Makefile =
-n 4
make menuconfig
, navigate to General Setup =
> Preemption Model
, choose Fully Preemptible Kernel (R=
T)
and save.-j n
to configure=
how many threads are used for this command in order to speed up this proce=
ss as explained.*Restart config...
and asks =
you questions.) Then press strg+c
and replace the co=
mmand bymake ARCH=3Darm menuconfig CROSS_COMPILE=3Darm-linux-gnue=
abihf- zImage modules dtbs
It might happen that the system clock is not automatically synchronizing= via NTP if it differs too much from the real-time. Firstly, take care that= your timezone is set correctly:
sudo ra= spi-config=20
In the opening UI go to: 4 Localisation Options =E2=86=92 I2 Change Time= Zone =E2=86=92 None of the above =E2=86=92 UTC
Furthermore, you can force NTP to set the time once. Therefore, stop the= service, force it, and restart it again :
sudo /e= tc/init.d/ntp stop sudo ntpd -qg sudo /etc/init.d/ntp start=20
Afterwards, NTP should synchronize automatically.
In order to create identical vehicles it might be useful to clone the SD= -cards by using = Clonezilla. Afterwards, only the ID-Re= lated Settings have to be adapted at the cloned SD-card.
The vehicle Raspberry software is cross-compiled from the master PC. The=
build script git:software/vehicle_raspberry_firmware/build.bash creates an archive of the compiled software and other required files and=
publishes it via A=
pache. The
bootloader_raspberry.bash
autostart script=
on the Raspberry downloads and runs this software.
Because unsuccessful ARP requests sometimes block communication a static=
ARP table is sometimes useful. To generate one one needs to switch on all =
participants, ping each one from the main PC and then output the arp table =
on the main pc with e.g. https://man7.o=
rg/linux/man-pages/man8/ip-neighbour.8.html (newer) or arp -a (old).
The info can then be used to feed a script that sets up the =
arp entries statically for the participants. Currently this is done in https://git.rwth-aachen.de/CPM/Project/Lab/software/-/blob/fe=
ature/fastdds/mid_level_controller/package/start.bash and the static ar=
p table is part of the package.