The idea of a ConstPtr& may seem convoluted and therefore, confusing but fret not, for there is actually a pretty intuitive reasoning behind its use. The idea of callbacks in ROS refers to function which perform computation on a set of data. Imagine a robot with multiple callbacks to the same topic, and multiple topics. Now further imagine that some of these callbacks are dealing with data which are…