Are there any alternatives to PCL for finding the position of an object?
The program I am creating must be able to avoid dynamic obstacles such as a person walking in front of the robot. I have been having issues with a low frame rate and after a bit of testing found out that my callback function for the PCL point cloud is running at around 5 fps as opposed to around 40 fps for the RGB image. Is there any way of either speeding this up or using some other, faster method to obtain the position of an object? Below is my callback function for the point cloud.
pcl::PointCloud<pcl::PointXYZ> cloud;
bool image_called;
// other code ....
void cloudCB(const snesor_msgs::PointCloud2ConstPtr& input)
{
pcl::fromROSMsg(*input, cloud);
if(image_called)
calculateCentre();
}