Rosanswers logo

I am trying to install pointcloud_to_laserscan package in ROS Indigo running in Ubuntu 14.04. When I add the source from git repo and catkin_make I get the following error.

root@ramkumar-Inspiron-7720:/home/ramkumar/catkinws# catkin_make
Base path: /home/ramkumar/catkinws
Source space: /home/ramkumar/catkinws/src
Build space: /home/ramkumar/catkinws/build
Devel space: /home/ramkumar/catkinws/devel
Install space: /home/ramkumar/catkinws/install
#### Running command: "cmake /home/ramkumar/catkinws/src -DCATKIN_DEVEL_PREFIX=/home/ramkumar/catkinws/devel -DCMAKE_INSTALL_PREFIX=/home/ramkumar/catkinws/install -G Unix Makefiles" in "/home/ramkumar/catkinws/build"
-- Using CATKIN_DEVEL_PREFIX: /home/ramkumar/catkinws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ramkumar/catkinws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.11
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 7 packages in topological order:
-- ~~  - p3dx_control
-- ~~  - depthimage_to_laserscan
-- ~~  - pointcloud_to_laserscan
-- ~~  - openni_tracker
-- ~~  - rosaria
-- ~~  - p3dx_description
-- ~~  - p3dx_gazebo
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'p3dx_control'
-- ==> add_subdirectory(ua_ros_p3dx/p3dx_control)
-- +++ processing catkin package: 'depthimage_to_laserscan'
-- ==> add_subdirectory(depthimage_to_laserscan-indigo-devel)
-- +++ processing catkin package: 'pointcloud_to_laserscan'
-- ==> add_subdirectory(pointcloud_to_laserscan)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
Could not find a package configuration file provided by "tf2_sensor_msgs"
with any of the following names:


Add the installation prefix of "tf2_sensor_msgs" to CMAKE_PREFIX_PATH or
set "tf2_sensor_msgs_DIR" to a directory containing one of the above files.
If "tf2_sensor_msgs" provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
pointcloud_to_laserscan/CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/ramkumar/catkinws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ramkumar/catkinws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Please help

Originally posted by gaussian on ROS Answers with karma: 88 on 2015-01-29

Post score: 0


1 Answer 1


Rosanswers logo

As always: what have you tried yourself, and what didn't work?

The error message is particularly clear: catkin (or actually cmake) cannot find the package tf2_sensor_msgs. Do you have that package installed?

It is always a good idea to first do a rosdep check --from-paths src --ignore-src from your /path/to/catkin_ws directory before trying to compile packages you just cloned from some vcs repository.

Also: it would seem pointcloud_to_laserscan has been released into Indigo (see the wiki page). I would recommend to install the Debians instead of building from source, unless you have a specific reason.

Originally posted by gvdhoorn with karma: 86574 on 2015-01-29

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by gaussian on 2015-01-29:
Thanks. I have done that and got it working. forgot to close the post. sorry.

Comment by gaussian on 2015-01-29:
What do u mean by installing the Debians. I am a newbie. please help.

Comment by gvdhoorn on 2015-01-30:
Just install the binary distribution? sudo apt-get install ros-indigo-pointcloud-to-laserscan?

Comment by gaussian on 2015-01-30:
I solved that problem. it requires the PointCloud2 data to be published in /cloud_in topic and that node will publish the laserscan data in /scan. after i publish the pointcloud data i get the resultant scan data full of only 'Inf' and hence no plot in rviz. Any idea @gvdhoom Thanks in advance!

Comment by gvdhoorn on 2015-01-30:
Any new questions should go in new questions. Don't hijack this one (even if it is your own). If question answered, please click the check mark.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.