Add and enable roscore service by default

This commit is contained in:
Alexey Rogachevskiy
2020-06-08 17:10:50 +03:00
parent 63c625bc53
commit c3a1f46c59
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Launcher for the ROS master, parameter server and rosout logging node
[Service]
User=clever
ExecStart=/bin/sh -c ". /opt/ros/melodic/setup.sh; ROS_HOSTNAME=`hostname`.local exec roscore"
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target

View File

@@ -47,6 +47,11 @@
"source": "{{user `assetsDir`}}/desktop/",
"destination": "/home/clever/Desktop"
},
{
"type": "file",
"source": "{{user `assetsDir`}}/services/",
"destination": "/etc/systemd/system"
},
{
"type": "shell",
"script": "scripts/installSoftware.sh",

View File

@@ -70,6 +70,9 @@ source /opt/ros/melodic/setup.bash
cd ${HOME}/catkin_ws && catkin_make
echo "source /home/clever/catkin_ws/devel/setup.bash" >> ~/.bashrc
echo "--- Enabling roscore service"
sudo systemctl enable roscore.service
echo "--- Installing QGroundControl"
echo "${PASSWORD}" | sudo -E -S sh -c "usermod -a -G dialout $USER"
echo "${PASSWORD}" | sudo -E -S sh -c 'apt remove -y modemmanager; apt install -y gstreamer1.0-plugins-bad gstreamer1.0-libav'