ABSTRACT

This chapter describes the philosophy of Robot Operating System (ROS), including packages, nodes, messages, and services. One very useful extension of the ROS message primitives is the ability to send and receive arbitrary-length vectors of message types. ROS does include a package stdsrvs with pre-defined service messages. Client–service interactions address concerns of publish and subscribe in terms of knowledge of the source of communications and guaranteed receipt of messages. Some useful messages are defined in additional packages, such as geometrymsgs, sensormsgs, navmsgs, pclmsgs, visualizationmsgs, trajectorymsgs, and actionlibmsgs. The package custommsgs contains no source code, but it does have files CMakeLists.txt and package.xml, as well as a msg folder that contains a message file, and VecOfDoubles.msg. The chapter presents the introduction of action servers, and explores how one can use C++ classes in constructing their nodes. It describes the steps to creating a library, and refers to the examples in the accompanying code repository within two separate packages: creatingaroslibrary and usingaroslibrary.