Systemd+roslaunch fails with Turtlebot
Hi,
I am setting up a TurtleBot2i right now. I want to launch everything regarding ROS on startup and try to realize it with systemd.
I am at the point where my .sh-script works as long it contains:
#!/usr/bin/env bash
bash -c "source /home/turtlebot/.bashrc && source /opt/ros/kinetic/setup.bash && source /home/turtlebot/catkin_ws/devel/setup.bash && roslaunch astra_launch astra.launch"
This basically only launches the astra camera and works fine with:
sudo systemctl start ROSdaemon.service
Whenever I replace the launchfile with the actual command for the full robot:
roslaunch turtlebot2i_bringup turtlebot2i_basic.launch
The systemctl exits with:
ExecStart=/home/turtlebot/startup.sh (code=exited, status=1/FAILURE)
Any suggestions on why my system crashes?
Cheers
You should be able to get more logs with
journalctl -u ROSdaemon.service
. With systemd, I usually directly use the roslaunch command in the service file with:ExecStart=/home/turtlebot/catkin_ws/devel/env.sh roslaunch turtlebot2i_bringup turtlebot2i_basic.launch
Actually journalctl showed me a great hint - I will check on that now. Thanks already!