roscore is a collection of nodes and programs that are pre-requisites of a ROS-based system. You must have a roscore running in order for ROS nodes to communicate. It is launched using the roscore command.
NOTE: If you use roslaunch, it will automatically start roscore if it detects that it is not already running.
roscore will start up:
There are currently no plans to add to roscore.
The roscore can be launched using the roscore executable:
It will also automatically be launched part of any roslaunch process if roslaunch detects that it is not running.
You can also specify a port to run the master on:
roscore -p 1234
NOTE: if you use the port switch, you will probably have to pass in this switch to any separate roslaunch files you launch as well. In addition, do not forget to change the environment variable ROS_MASTER_URI before, e.g.
$export ROS_MASTER_URI=http://YourPC:1234/ $roscore -p 1234
The nodes launched as part of roscore are defined in roslaunch/roscore.xml. It is generally not recommended that new nodes be added to this file as it affects every roslaunch. These changes are also less portable to other people using ROS.
roslaunch treats nodes listed in roscore.xml differently: it searches for nodes running with the same name and will only launch ones that aren't already running.