Skip to main content

ROS initialization

The first line of the main function is ros::Init. It has four parameters, and the fourth parameter is usually omitted.

Parameters

ParameterTypeDescription
argcint&Number of remapping arguments
agvchar**List of remapping arguments
namestring&Node name, must be a base name and cannot contain namespaces
options = 0uint32_t[Optional] options for starting the node (a set of bitflags from ros::init_options)

Example

ros::init (argc , argv , "name")