Ask Your Question

CSM Package Not Found

asked 2016-03-18 10:32:20 -0500

MarkyMark2012 gravatar image


I've got an issue compiling laser_scan_matcher. When running catkin_make I get the following error:

-- checking for module 'csm' -- package 'csm' not found Cmake error

Now I've built csm and installed it. What else do I need to do to get catkin to find it?



edit retag flag offensive close merge delete


How did you install the csm package?

joq gravatar image joq  ( 2016-03-18 12:44:16 -0500 )edit

My base ROS workspace is ~/ros_ws/src Installed csm src into ~/ros_ws/src/csm and ran which successfully compiled it all and "installed" it

That installed it to: ~/ros_ws/src/csm/deploy

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-18 15:11:32 -0500 )edit

What operating system are you using?

joq gravatar image joq  ( 2016-03-18 16:26:18 -0500 )edit

Did you source ~/ros_ws/src/csm/deploy/setup.bash?

joq gravatar image joq  ( 2016-03-18 16:26:51 -0500 )edit

This is on a raspberry pi (hence the building everything) re: source - there is no ~/ros_ws/src/csm/deploy/setup.bash file

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-18 16:46:14 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-03-19 10:00:08 -0500

joq gravatar image

It looks like laser_scan_matcher uses pkg-config to find the csm headers and libraries.

You probably need to set the $PKG_CONFIG_PATH in your environment, adding the directory containing the csm.pc file installed with csm.

edit flag offensive delete link more


Cheers sir that has done the trick!! (Now it can't find csm header files - shall try and persuade it otherwise :) )

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-21 03:51:49 -0500 )edit

That should have resolved both header and library locations. What does pkg-config --cflags csm print?

joq gravatar image joq  ( 2016-03-21 09:23:04 -0500 )edit

Comes back with -I/usr/include/cairo -I/home/pi/ros_ws/install/include

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-21 09:57:25 -0500 )edit

Seems OK. Are the headers in fact there?

joq gravatar image joq  ( 2016-03-21 12:22:16 -0500 )edit

Just gotten around to checking this - so you were correct - the headers weren't there. Simply copied them into that dir and it's all complied! I now have - after some faff - LSM running on a Pi 2. Shall write all this up as a how-to...

MarkyMark2012 gravatar image MarkyMark2012  ( 2016-03-21 14:57:25 -0500 )edit

Copying the headers should not have been necessary. The csm install should have created a csm.pc that points to the right place. If you write this up, try to figure out what when wrong with that.

joq gravatar image joq  ( 2016-03-21 16:15:41 -0500 )edit

After installation (and exporting the pkg-config to $PKG_CONFIG_PATH), and checking the headers are installed where they should be, I try to catkin_make_isolated but failed to process package csm, no generated at /home/pi/ros_catkin_ws/devel_isolated/csm/

DM2 gravatar image DM2  ( 2016-07-14 19:23:31 -0500 )edit

full command is ros_catkin_ws $ sudo ./src/catkin/bin/catkin_make_isolated --install-space /opt/ros/indigo -DCMAKE_BUILD_TYPE=Release --force-cmake. I think it's somehow interpreting csm as a package.

EDIT: I added --install to the command and it seems to have passed the make :/

DM2 gravatar image DM2  ( 2016-07-14 19:26:25 -0500 )edit

answered 2017-02-10 08:59:17 -0500

Edward gravatar image

Good day to all. I have repeatedly faced with this problem: installation laser_scan_matcher for ROS kinetic. To solve this problem on three different machines, and finally I decided to write an algorithm that helped me. Probably, it is not very correct, as I replace the relative path to the libraries in the absolute, but nevertheless it - it works for me.

Now the algorithm itself. In the future, I mean that the package is the full path to my catkin_ws is: /home/edward/catkin_ws


1.first install the package csm itself in directory /catkin_ws/src: git clone and package scan_tools: git clone /catkin_ws do catkin_make nano ~/.bashrc and add to end of file as a variable PKG_CONFIG_PATH path to the file. In my case, this line looks like this:

export PKG_CONFIG_PATH=/home/edward/catkin_ws/src/csm/sm/pkg-config and make: source ~/.bashrc

4.Next, you must explicitly register in five file path to the header files:

  1. in file /home/edward/catkin_ws/src/scan_tools/laser_scan_matcher/include/laser_scan_matcher/laser_scan_matcher.h replace #include '<'csm/csm_all.h'>' on #include '<'/home/edward/catkin_ws/src/csm/sm/csm/csm_all.h'> (without apostrophes, of course)
  2. in file /home/edward/catkin_ws/src/csm/sm/csm/laser_data_json.h replace json-c/json.h and json-c/json_more_utils.h on /home/edward/catkin_ws/src/csm/sm/lib/json-c/json.h and home/edward/catkin_ws/src/csm/sm/lib/json-c/json_more_utils.h respectively
  3. in file /home/edward/catkin_ws/src/csm/sm/csm/hsm/hsm_interface.h replace options/options.h on /home/edward/catkin_ws/src/csm/sm/lib/options/options.h
  4. on file /home/edward/catkin_ws/src/csm/sm/csm/json_journal.h replace json-c/json.h and json-c/json_more_utils.h on /home/edward/catkin_ws/src/csm/sm/lib/json-c/json.h and /home/edward/catkin_ws/src/csm/sm/lib/json-c/json_more_utils.h respectivetly
  5. Lastly, in file /home/edward/catkin_ws/src/csm/sm/csm/math_utils_gsl.h replace egsl/egsl.h on /home/edward/catkin_ws/src/csm/sm/lib/egsl/egsl.h

5.Finally, go to your /catkin_ws and do catkin_make

And, wow miracle - all gathered! I hope this spike curve method will help you :) Happy ROS.

edit flag offensive delete link more


You can also add thoes path to ~/.bashrc, like this: export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/edward/catkin_ws/src/csm/sm/lib:/home/edward/catkin_ws/src/csm/sm

jinn gravatar image jinn  ( 2017-03-09 21:21:44 -0500 )edit

Maintainers of scan_tools and csm are stuck at some problem in making a release of them. If anyone can help that's great!

130s gravatar image 130s  ( 2017-03-12 10:00:55 -0500 )edit

I got an error saying "Could not find a package configuration file provided by "csm" with any of the following names: csmConfig.cmake csm-config.cmake " I thought the catkin could not find the package so I went ahead and followed your solution but doesn't seem to fix it. Any suggestion?

prasgane gravatar image prasgane  ( 2018-01-10 11:12:02 -0500 )edit

Since recently the installation from the repository has been made correctly. At least for the kinetics. I do not have any problems with CSM anymore. Just enter in the terminal

sudo apt install ros-kinetic-navigation

if you have ros kinetic distro

Edward gravatar image Edward  ( 2018-01-11 07:44:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-03-18 10:32:20 -0500

Seen: 3,914 times

Last updated: Mar 19 '16