The way the subscriber is initiated is changed according to pcl_ros library. This saves two casts from pointcloud msg to pcl. (And appears to reduce the execution time inside the callback)
My only concern is: I don't understand how the subscriber obtains the pcl cloud from the ROS messaging system. Subscribing to a pcl pointcloud might therefore have induced delay outside the callback, but I was unable to test this.
(Offtopic: I have also tried out chilimarkers in stead of artoolkit, this seems to further decrease delay and appears slightly more robust, fork is on github)
The way the subscriber is initiated is changed according to pcl_ros library. This saves two casts from pointcloud msg to pcl. (And appears to reduce the execution time inside the callback)
My only concern is: I don't understand how the subscriber obtains the pcl cloud from the ROS messaging system. Subscribing to a pcl pointcloud might therefore have induced delay outside the callback, but I was unable to test this.
(Offtopic: I have also tried out chilimarkers in stead of artoolkit, this seems to further decrease delay and appears slightly more robust, fork is on github)