Robot Upstart not find launch files in script-Noetic
I create a service for starting launch file.This launch file start a python file which calls other launch files whenever it is necessary.When i start service with : sudo systemctl start name-of-service.service it works fine and all launch files called and do their jobs. But when i reboot the device it is not work properly.I think because it can not launch file. I check the problem with sudo name-of-service-start :
"" roslaunch.core.RLException: [/root/posemate_ws/src/pylon-ros-camera/pylon_camera/launch/pylon_camera_node.launch] is not a launch file name """
I dont understand why it is not work.Is there any guess ?
All the output is pasted below if it helps.
<14>May 7 10:49:02 mobirob: _engine_runner: Using workspace setup file /home/mobirob/posemate_ws/devel/setup.bash
<14>May 7 10:49:02 mobirob: _engine_runner: Launching ROS_HOSTNAME=mobirob-MS-7B98, ROS_IP=, ROS_MASTER_URI=http://127.0.0.1:11311, ROS_HOME=/home/mobirob/.ros, ROS_LOG_DIR=/tmp
ls: cannot access '/etc/ros/noetic/_engine_runner.d/*.xacro': No such file or directory
<14>May 7 10:49:02 mobirob: _engine_runner: Generated launchfile: /tmp/_engine_runner.launch
<14>May 7 10:49:02 mobirob: _engine_runner: Started roslaunch as background process, PID 93447, ROS_LOG_DIR=/tmp
master has started, initiating launch
... logging to /tmp/b74e8d96-aef8-11eb-ab44-2b89ed0f8691/roslaunch-mobirob-MS-7B98-93447.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-bolt.service-hIwuoj': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-systemd-resolved.service-UseM4g': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-systemd-logind.service-SON60g': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-colord.service-G2BgOg': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-systemd-timesyncd.service-I7sKkh': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-upower.service-bmUIDg': Permission denied
/usr/bin/du: cannot read directory '/tmp/systemd-private-e738669e789f453f9d39f2c5874b720d-ModemManager.service-w7eKPf': Permission denied
/usr/bin/du: cannot read directory '/tmp/tracker-extract-files.125': Permission denied
/usr/bin/du: cannot read directory '/tmp/snap.snap-store': Permission denied
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://mobirob-MS-7B98:44145/
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.10
NODES
/
engine_runner (pose_filte/engine_runner.py)
ROS_MASTER_URI=http://127.0.0.1:11311
process[engine_runner-1]: started with pid [93463]
-------------------------------------------------------------------------------
... logging to /tmp/b74e8d96-aef8-11eb-ab44-2b89ed0f8691/roslaunch-mobirob-MS-7B98-93463.log
Traceback (most recent call last):
File "/home/mobirob/posemate_ws/devel/lib/pose_filte/engine_runner.py", line 15, in <module>
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/mobirob/posemate_ws/src/pose_filte/nodes/engine_runner.py", line 41, in <module>
pylon_camera_starter()
File "/home/mobirob/posemate_ws/devel/lib/python3/dist-packages/posemate_lite_engine/utils.py", line 120, in pylon_camera_starter
roslaunch_file = [(roslaunch.rlutil.resolve_launch_arguments(cli_args)[0], roslaunch_args)]
File "/home/mobirob/posemate_ws/src/ros_comm/tools/roslaunch/src/roslaunch/rlutil.py", line 107, in resolve_launch_arguments
raise roslaunch.core.RLException("[%s] is not a launch file name" % args[0])
roslaunch.core.RLException: [/root/posemate_ws/src/pylon-ros-camera/pylon_camera/launch/pylon_camera_node.launch] is not a launch file name
[engine_runner-1] process has died [pid 93463, exit code 1, cmd /home/mobirob/posemate_ws/devel/lib/pose_filte/engine_runner.py __name:=engine_runner __log:=/tmp/b74e8d96-aef8-11eb-ab44-2b89ed0f8691/engine_runner-1.log].
log file: /tmp ...
Can you include in your post the contents of the .service file, and also the contents of the file (most likely a .sh) that is assigned to
ExecStart
?i added service and service start files if i understand what you mean correctly
_engine_runner-start
is too convoluted for me to make sense of, may be someone else can help with this. Not an answer, but the manual process of creating the .service file and then the .sh file is in my opinion much more straightforward, which is what I do. Good luck!