最近在尝试学习ROS搭建模型,突然有一天发现打不开roscore,可以编译,但是无法运行launch文件(无输出,无响应)。
Ctrl+C 后显示
(base) uos@uos-OptiPlex-7070:~$ roscore
^C… logging to /home/uos/.ros/log/5aa7bca2-3517-11ec-a238-e454e8b286c2/roslaunch-uos-OptiPlex-7070-20804.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
`
再次Ctrl+C 后显示
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/b76f92360d89f7a647e234128b7510d0.png#pic_center)
^CTraceback (most recent call last):
File “/opt/ros/melodic/bin/roscore”, line 73, in <module>
roslaunch.main([‘roscore’, ‘–core’] + sys.argv[1:])
File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/init.py”, line 332, in main
p.start()
File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 289, in start
self._start_infrastructure()
File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 247, in _start_infrastructure
self._start_server()
File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 198, in _start_server
self.server.start()
File “/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/server.py”, line 377, in start
code, msg, val = ServerProxy(self.uri).get_pid()
File “/usr/lib/python2.7/xmlrpclib.py”, line 1243, in call
return self.__send(self.__name, args)
File “/usr/lib/python2.7/xmlrpclib.py”, line 1602, in __request
verbose=self.__verbose
File “/usr/lib/python2.7/xmlrpclib.py”, line 1283, in request
return self.single_request(host, handler, request_body, verbose)
File “/usr/lib/python2.7/xmlrpclib.py”, line 1311, in single_request
self.send_content(h, request_body)
File “/usr/lib/python2.7/xmlrpclib.py”, line 1459, in send_content
connection.endheaders(request_body)
File “/usr/lib/python2.7/httplib.py”, line 1095, in endheaders
self._send_output(message_body)
File “/usr/lib/python2.7/httplib.py”, line 898, in _send_output
self.send(msg)
File “/usr/lib/python2.7/httplib.py”, line 860, in send
self.connect()
File “/usr/lib/python2.7/httplib.py”, line 837, in connect
self.timeout, self.source_address)
File “/usr/lib/python2.7/socket.py”, line 566, in create_connection
sock.connect(sa)
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
KeyboardInterrupt
本来以为是Anaconda和ROS的冲突,尝试了很多相关方法都无效。最后才想起来是在.bashrc做了如下修改
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/a9c202384a5a5de1e8ff397a17ed4ae4.png#pic_center)
如果有大神知道具体原因请指教。