Automatic pionier RosAria installer
This commit is contained in:
parent
507d13f459
commit
349f97c7db
@ -1,6 +1,7 @@
|
||||
FROM irth7/ros:hydro as build
|
||||
|
||||
RUN apt-get update && apt-get install -y ros-hydro-tf ros-hydro-dynamic-reconfigure ros-hydro-nav-msgs ros-hydro-hokuyo-node && rm -rf /var/lib/apt/lists/*
|
||||
RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list && cat /etc/apt/sources.list
|
||||
RUN apt-get update && apt-get install -y ros-hydro-tf ros-hydro-dynamic-reconfigure ros-hydro-nav-msgs ros-hydro-hokuyo-node
|
||||
COPY ws_linux /home/lab1_5/ws/ws_linux
|
||||
ADD Aria /usr/local/Aria
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
12
install.sh
Executable file
12
install.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Check if root
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
cp rosaria-docker.service /etc/systemd/system/
|
||||
chmod g+w /etc/systemd/system/rosaria-docker.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable rosaria-docker.service
|
||||
systemctl start rosaria-docker.service
|
9
rosaria-docker.service
Normal file
9
rosaria-docker.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
After=network.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/lab1_5/rosaria/run.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
6
run.sh
Executable file
6
run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Script running rosaria inside docker container
|
||||
echo "ID: $PIONIER_ID"
|
||||
|
||||
docker run --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g'
|
||||
) irth7/rosaria-legacy
|
Loading…
Reference in New Issue
Block a user