How do I autostart a node that needs sudo permission?


Hello, I have created a ros-node in python that I want to autostart at boot of the FlytPi. I’ve tried with creating a launch-file inside “/home/flytos/catkin_ws/src/my_package_name/launch”, and then I included this XML inside “core_api_autopilot.launch” and “core_api_autopilot.launch-bak” and I did try to add it in “user.launch” beside core_api_autopilot.launch:


"include file="/home/flytos/catkin_ws/src/my_package_name/launch/test_led.launch"

The code need sudo permission to run. This isn’t working and I’m kind of stuck. My mission is to light up some RGB LEDs when arming. The code works fine but it doesn’t autostart.



Duplicate of Error when trying to launch nodes on reboot!