今天在使用ros环境的时候出现了下面的问题:
➜ ~ roscore
... logging to /home/eric/.ros/log/4f4e2e38-d093-11eb-85c4-0242323584ca/roslaunch-eric-ms-7a54-2130.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Unable to contact my own server at [http://eric-ms-7a54:42579/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check
for errors by running:
ping eric-ms-7a54
For more tips, please see
http://www.ros.org/wiki/ROS/NetworkSetup
The traceback for the exception was written to the log file
解决方法
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
结果跑通了
➜ ~ roscore
... logging to /home/eric/.ros/log/eed4c4da-d093-11eb-85c4-0242323584ca/roslaunch-eric-ms-7a54-6906.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://localhost:34153/
ros_comm version 1.12.17
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.17
NODES
auto-starting new master
process[master]: started with pid [6926]
ROS_MASTER_URI=http://localhost:11311/
setting /run_id to eed4c4da-d093-11eb-85c4-0242323584ca
process[rosout-1]: started with pid [6940]
started core service [/rosout]