Undefined reference to pcl_ros::transformPointCloud
I am getting undefined reference to pcl_ros::transformPointCloud
in the linking phase of catkin_make
.
This is the source code:
void cloud_cb_cam1 (const sensor_msgs::PointCloud2ConstPtr& input)
{
cam1_data_valid = true;
sensor_msgs::PointCloud2 ros_cam1;
pcl_ros::transformPointCloud("pf1_link", *input, ros_cam1, *tf_listener);
pcl_conversions::toPCL(ros_cam1, pcl_cam1);
if (cam1_data_valid && cam2_data_valid)
{
cam1_data_valid = false;
cam2_data_valid = false;
pcl_combine();
}
}
My CMakeLists includes these libraries:
cmake_minimum_required(VERSION 2.8.3)
project(pc_combine)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
find_package(PCL REQUIRED)
catkin_package(
)
include_directories(
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
target_link_libraries( pc_combine
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
Am I missing any libraries?
do you also
find_package
thePCL
library?Yes, I use
find_package(PCL REQUIRED)
. I included my entire CMakeLists file Thanks