5.4 roscore

roscore是你在运行所有ROS程序前首先要运行的命令。 运行:

$ roscore

然后你会看到类似下面的输出信息:

... logging to ~/.ros/log/9cf88ce4-b14d-11df-8a75-00251148e8cf/roslaunch-machine_name-13039.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://machine_name:33919/
ros_comm version 1.4.7

SUMMARY
======

PARAMETERS
 * /rosversion
 * /rosdistro

NODES

auto-starting new master
process[master]: started with pid [13054]
ROS_MASTER_URI=http://machine_name:11311/

setting /run_id to 9cf88ce4-b14d-11df-8a75-00251148e8cf
process[rosout-1]: started with pid [13067]
started core service [/rosout]

如果roscore运行后无法正常初始化,很有可能是存在网络配置问题。 参见 网络设置——单机设置

如果roscore不能初始化并提示缺少权限,这可能是因为~/.ros文件夹归属于root用户(只有root用户才能访问) 修改该文件夹的用户归属关系:

$ sudo chown -R <your_username> ~/.ros

Last updated