ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

When creating a subscriber, you tell it what function to call with each new message received. Since ROS messages may be be very large, we want to pass by-reference rather than by-value. To accomplish this, ROS uses smart pointers (in particular boost::shared_ptr in ROS1), which are a modern C++ improvement over regular old pointers.

As for the Const part - see this other ROS Answers