[Unit] Description=Launcher for the ROS master, parameter server and rosout logging node After=network.target [Service] User=pi 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