Hi have a raspberry pi 4b, running ubuntu 20.04, have roscore and mavros working …have run scripts to perform robot actions etc. However have real trouble getting these to run automatically on boot up of RPI… have created the following below… but just doesn’t seem to run on start.
sudo nano /etc/systemd/system/roscore.service
[Unit]
Description=ROS core service
After=network.target
[Service]
Type=simple
ExecStart=/opt/ros/noetic/bin/roscore
Restart=always
[Install]
WantedBy=multi-user.target
sudo nano /etc/systemd/system/mavros.service
[Unit]
Description=MAVROS Service
After=roscore.service
[Service]
ExecStart=/opt/ros/noetic/bin/roslaunch /opt/ros/noetic/share/mavros/launch/apm.launch
[Install]
WantedBy=multi-user.target