ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

laser_scan_matcher building problem

asked 2019-11-11 08:44:15 -0600

asbird gravatar image

updated 2019-11-11 09:09:17 -0600

Basically I'm trying to get laser scanner data in world coordinates. I would like to make it possible to get the whole point cloud data with subscriber node from python code to work on it (I'm making project of detecting moving objects from laser scanner data). If any of you guys reading this post have some experience in this topic i would like to ask some more questions.

I'm new to ROS and I'm not sure if this is the right package to use in this case. So the problem is, while I'm trying to build package from these steps (From THIS post):

$ cd [indigo catkin workspace directory]
$ git clone
$ sudo apt-get install libgsl0-dev
$ catkin_make
$ roslaunch laser_scan_matcher demo.launch

After running catkin build I receive an error saying :

Errors     << laser_scan_matcher:cmake /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/logs/laser_scan_matcher/build.cmake.000.log
CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:415 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal)
  CMakeLists.txt:21 (pkg_check_modules)

cd /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/build/laser_scan_matcher; catkin build --get-env laser_scan_matcher | catkin env -si  /usr/bin/cmake /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/src/scan_tools/laser_scan_matcher --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/devel/.private/laser_scan_matcher -DCMAKE_INSTALL_PREFIX=/media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/install; cd -
Failed     << laser_scan_matcher:cmake               [ Exited with code 1 ]    
Failed    <<< laser_scan_matcher                     [ 5.3 seconds ]           
Finished  <<< ncd_parser                             [ 9.5 seconds ]           
Warnings   << laser_scan_sparsifier:make /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/logs/laser_scan_sparsifier/build.make.000.log
In file included from /opt/ros/melodic/include/ros/ros.h:40:0,
                 from /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/src/scan_tools/laser_scan_sparsifier/include/laser_scan_sparsifier/laser_scan_sparsifier.h:33,
                 from /media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/src/scan_tools/laser_scan_sparsifier/src/laser_scan_sparsifier.cpp:30:
/media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/src/scan_tools/laser_scan_sparsifier/src/laser_scan_sparsifier.cpp: In constructor ‘scan_tools::LaserScanSparsifier::LaserScanSparsifier(ros::NodeHandle, ros::NodeHandle)’:
/opt/ros/melodic/include/ros/console.h:348:176: warning: unknown conversion type character ‘,’ in format [-Wformat=]
     ::ros::console::print(filter, __rosconsole_define_location__loc.logger_, __rosconsole_define_location__loc.level_, __FILE__, __LINE__, __ROSCONSOLE_FUNCTION__, __VA_ARGS__)
/opt/ros/melodic/include/ros/console.h:351:5: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER’
/opt/ros/melodic/include/ros/console.h:387:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION’
/opt/ros/melodic/include/ros/console.h:572:35: note: in expansion of macro ‘ROS_LOG_COND’
 #define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, __VA_ARGS__)
/opt/ros/melodic/include/rosconsole/macros_generated.h:266:24: note: in expansion of macro ‘ROS_LOG’
 #define ROS_FATAL(...) ROS_LOG(::ros::console::levels::Fatal, ROSCONSOLE_DEFAULT_NAME, __VA_ARGS__)
/opt/ros/melodic/include/ros/assert.h:134:7: note: in expansion of macro ‘ROS_FATAL’
       ROS_FATAL(__VA_ARGS__); \
/media/wojtek/48ee3ba1-28bb-493d-b2ff-de733667d003/wojtek/wstool_ws2/src/scan_tools/laser_scan_sparsifier/src/laser_scan_sparsifier.cpp:45:3: note: in expansion of macro ‘ROS_ASSERT_MSG’
   ROS_ASSERT_MSG(step_ > 0,
/opt/ros/melodic/include/ros/console.h:348:176: warning: too many arguments for format [-Wformat-extra-args]
     ::ros::console ...
edit retag flag offensive close merge delete


You're trying to build a package that was last released in Kinetic under Melodic. It's not uncommon to run into issues in such cases.

There appears to be an open issue about this already though, see: ccny-ros-pkg/scan_tools#63.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-11 10:23:55 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-11-11 10:32:28 -0600

gvdhoorn gravatar image

The following works for me in a ros:melodic Docker image (docker run -it --rm ros:melodic):

# activate main ROS install
source /opt/ros/melodic/setup.bash

# update local indices
sudo apt update
rosdep update

# catkin-tools supports workspaces with 'mixed' build types, (ie:
# catkin and non-catkin packages). We could also use catkin_make_isolated.
sudo apt install python-catkin-tools

# create workspace (skip if you already have one)
mkdir -p $HOME/catkin_ws/src
cd $HOME/catkin_ws

# clone all sources
git clone src/csm
git clone src/scan_tools

# install all dependencies (note: not adding '-y' here, so you'll have to
# accept all installation commands manually)
rosdep install --from-paths $HOME/catkin_ws/src --ignore-src

# build the workspace (or: catkin_make_isolated)
catkin build

# activate the workspace
source devel/setup.bash

at this point you should be able to use the packages from ccny-ros-pkg/scan_tools.

Inspired by the comments on ccny-ros-pkg/scan_tools#63.

edit flag offensive delete link more


Note that this is essentially the same process as in #q252478, but with a manual git clone of csm, as that has not been released for Melodic (but seems to build OK).

gvdhoorn gravatar image gvdhoorn  ( 2019-11-11 10:33:25 -0600 )edit

Ok it worked thank you @gvdhoorn Could you contact me via email ? I would like to ask you few questions to not spam the forum. Of course if you don't mind.

asbird gravatar image asbird  ( 2019-11-11 14:11:47 -0600 )edit

No, I won't contact you. Any question you may have should be posted here on ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-11 14:22:48 -0600 )edit

@gvdhoorn So I'll ask the same question I've asked at the beginning. I wan't to apply transform to the laser scanner data, to give to the point cloud world coordinates. Can i achieve that with scan_tools ?

asbird gravatar image asbird  ( 2019-11-11 15:18:44 -0600 )edit

You should post that as a new question. Don't post follow-up questions in comments under accepted answers. Comments have very limited visibility.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-11 15:42:06 -0600 )edit

Question Tools

1 follower


Asked: 2019-11-11 08:44:15 -0600

Seen: 638 times

Last updated: Nov 11 '19