Automatic .launch on OS startup

If on Ubuntu, the simplest way is to manually create a startup application. Click on the icon “Startup Application” on the activities, then “Add”. Then customize the name and fill the command field with:
terminator -e "bash -i -c 'sleep 3 && ros2 launch myrobot_bringup myrobot_bringup.launch'"

if ROS1 i guess it will be more something like :
terminator -e "bash -i -c 'sleep 3 && roslaunch myrobot_bringup myrobot_bringup.launch'"

This assumes you have terminator installed, you can adapt to whatever terminal emulator you prefer using (the flags could then be different). I use sleep 3 to wait 3 seconds after startup before launching ros (I have few things that take a bit of time starting).

And course the creation of the startup application can be automated in a script.

1 Like