I’m interested in changing the nodes which launch when the raspberry PI boots up. I was wondering where the current nodes were initialised, and how I could change them?
Here are the systemd service files that are relevant.
/etc/systemd/system/roscore.service
and /etc/systemd/system/magni-base.service
As you can imagine roscore.service launches roscore
magni-base.service starts the core nodes for Magni, our powerful mobile base (https://ubiquityrobotics.com/).
If you look in magni-base.service, you see that it launches the script at /usr/sbin/magni-base
The relevant part of this script is line 32 roslaunch magni_demos teleop.launch &
this launches the launch file teleop.launch from the magni_demos package.
If you already have a launch file for the nodes you should make a copy of both /etc/systemd/system/magni-base.service
/usr/sbin/magni-base
in their respective directories, naming them to whatever is relevant to your robot.
Change your version of the script in /usr/sbin/
to launch the file you want, and your version of the service file in /etc/systemd/system/
to point to your script.
Then run sudo systemctl disable magni-base
and sudo systemctl enable {YOUR SERVICE}
If you need help with making the launch files, see the 2nd half of this tutorial http://wiki.ros.org/ROS/Tutorials/UsingRqtconsoleRoslaunch.
Rohan