I want to work with pcl_ros in a package but I don't know how to include it in the CMakeLists.txt file. I tried to use:
find_package(catkin REQUIRED
roscpp
sensor_msgs
pcl_ros
)
Unfortunately it is not working. I get an error when compiling.
I am using ROS Hydro (catkin system) but the perception package (pcl_ros) was downloaded manually and is inside my workspace.
I would appreciate if you can help me.
[EDIT]
CMake Error at /home/summitxl/catkin_ws/build/Compilados/pcl_msgs-hydro-devel/cmake/pcl_msgs-genmsg.cmake:53 (add_custom_target):
add_custom_target cannot create target "pcl_msgs_generate_messages_cpp"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/summitxl/catkin_ws/src/pcl2_to_scan". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
/home/summitxl/ros_catkin_ws/install_isolated/share/genmsg/cmake/genmsg-extras.cmake:299 (include)
Compilados/pcl_msgs-hydro-devel/CMakeLists.txt:14 (generate_messages)
CMake Error at /home/summitxl/catkin_ws/build/Compilados/pcl_msgs-hydro-devel/cmake/pcl_msgs-genmsg.cmake:100 (add_custom_target):
add_custom_target cannot create target "pcl_msgs_generate_messages_lisp"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/summitxl/catkin_ws/src/pcl2_to_scan". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
/home/summitxl/ros_catkin_ws/install_isolated/share/genmsg/cmake/genmsg-extras.cmake:299 (include)
Compilados/pcl_msgs-hydro-devel/CMakeLists.txt:14 (generate_messages)
CMake Error at /home/summitxl/catkin_ws/build/Compilados/pcl_msgs-hydro-devel/cmake/pcl_msgs-genmsg.cmake:147 (add_custom_target):
add_custom_target cannot create target "pcl_msgs_generate_messages_py"
because another target with the same name already exists. The existing
target is a custom target created in source directory
"/home/summitxl/catkin_ws/src/pcl2_to_scan". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
/home/summitxl/ros_catkin_ws/install_isolated/share/genmsg/cmake/genmsg-extras.cmake:299 (include)
Compilados/pcl_msgs-hydro-devel/CMakeLists.txt:14 (generate_messages)
CMake Error at /home/summitxl/ros_catkin_ws/install_isolated/share/dynamic_reconfigure/cmake/extras.cmake:60 (add_custom_target):
add_custom_target cannot create target "pcl_ros_gencfg" because another
target with the same name already exists. The existing target is a custom
target created in source directory
"/home/summitxl/catkin_ws/src/pcl2_to_scan". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
perception_pcl-hydro-devel/pcl_ros/CMakeLists.txt:43 (generate_dynamic_reconfigure_options)
CMake Warning at navigation-hydro-devel/costmap_2d/CMakeLists.txt:143 (find_package):
By not providing "Findgtest.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "gtest", but
CMake did not find one.
Could not find a package configuration file provided by "gtest" with any of
the following names:
gtestConfig.cmake
gtest-config.cmake
Add the installation prefix of "gtest" to CMAKE_PREFIX_PATH or set
"gtest_DIR" to a directory containing one of the above files. If "gtest"
provides a separate development package or SDK, be sure it has been
installed.
Originally posted by arenillas on ROS Answers with karma: 223 on 2014-08-25
Post score: 0
Original comments
Comment by BennyRe on 2014-08-25:
What is the error message?