Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 290, in main write_pid_file(options.pid_fn, options.core, options.port) File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 112, in write_pid_file with open(pid_fn, "w") as f: IOError: [Errno 13] Permission denied: '/home/louisli/.ros/roscore-11311.pid'
log文件夹写入权限不够”WARNING: cannot create log directory [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please set ROS_LOG_DIR to a writable location.”
WARNING: cannot create log directory [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please set ROS_LOG_DIR to a writable location. Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt /usr/bin/du: cannot access '/home/louisli/.ros/log': No such file or directory
started roslaunch server http://ubuntu:33151/ ros_comm version 1.14.13
auto-starting new master No handlers could be found for logger "roslaunch" [master] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[master]: started with pid [3018] ROS_MASTER_URI=http://ubuntu:11311/
setting /run_id to f37f52b6-de8d-11ed-baa4-000c29fa4201 [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3029] started core service [/rosout] [rosout-1] process has died [pid 3029, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3037] [rosout-1] process has died [pid 3037, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3042] [rosout-1] process has died [pid 3042, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3047] [rosout-1] process has died [pid 3047, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3052] [rosout-1] process has died [pid 3052, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3057] [rosout-1] process has died [pid 3057, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.] process[rosout-1]: started with pid [3062] [rosout-1] process has died [pid 3062, exit code -6, cmd /opt/ros/melodic/lib/rosout/rosout __name:=rosout]. [rosout-1] restarting process [rosout-1] ERROR: unable to configure logging [unable to create directory for log file [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please check permissions.]
可以发现,节点一直在寻找可以使用的pid,但是一直没有找到。
所以我们关注一下最开头的报错:
1 2 3 4
WARNING: cannot create log directory [/home/louisli/.ros/log/f37f52b6-de8d-11ed-baa4-000c29fa4201]. Please set ROS_LOG_DIR to a writable location. Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt /usr/bin/du: cannot access '/home/louisli/.ros/log': No such file or directory