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

mapping_msgs/PolygonalMap.h: No such file or directory

asked 2016-04-21 04:25:52 -0500

ROSkinect gravatar image

Hello there

I'm trying to compile this package but I get this error:

  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/jros/rosPackage/testrospackageKinect/build'
  make[3]: Leaving directory `/home/jros/rosPackage/testrospackageKinect/build'
  make[3]: Entering directory `/home/jros/rosPackage/testrospackageKinect/build'
  [ 50%] Building CXX object CMakeFiles/tracker.dir/src/main.cpp.o
  /home/jros/rosPackage/testrospackageKinect/src/main.cpp:26:39: fatal error: mapping_msgs/PolygonalMap.h: No such file or directory
   #include <mapping_msgs/PolygonalMap.h>
                                         ^
  compilation terminated.
  make[3]: *** [CMakeFiles/tracker.dir/src/main.cpp.o] Error 1
  make[3]: Leaving directory `/home/jros/rosPackage/testrospackageKinect/build'
  make[2]: *** [CMakeFiles/tracker.dir/all] Error 2
  make[2]: Leaving directory `/home/jros/rosPackage/testrospackageKinect/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/jros/rosPackage/testrospackageKinect/build'
-------------------------------------------------------------------------------}

I downloaded mapping_msgs and I copied it in lib folder and I added this to my CMakeLists, :

include_directories ("/home/jros/rosPackage/testrospackageKinect/lib/mapping_msgs/")

I had the same Error with OpenNI but when I added this to the CMakeLists it works:

include_directories ("/home/jros/rosPackage/testrospackageKinect/lib/OpenNI/Include/")

My question is for mapping_msgs, what should I do? and how can I deal with those kind of errors in CMakeLists?

I'm using rosbuild pacakge in ROS Indigo in Ubuntu 14.04 64 bit

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-04-21 04:58:09 -0500

updated 2016-04-21 05:02:11 -0500

You shouldn't manually hardcode your paths or copy files around, that's a recipe for desaster. Usually when you notice that some ros package like mapping_msgs is missing, you should first try installing it via apt-get (sudo apt-get install ros-indigo-mapping-msgs), or alternatively clone it into your catkin (or rosbuild) workspace. Then, catkin_make (or rosmake) should pick it up.

In this case however, I doubt that you'll get it running easily on Indigo. The wiki pages haven't been updated since 2011, and they mention "Electric" as the last supported ROS distro. A lot of stuff has changed since then. So if you really must use it, try setting up a Ubuntu 10.04 machine with ROS Electric; but I wouldn't recommend that; I'm not sure even whether the deb packages for Electric are still available.

edit flag offensive delete link more

Comments

That's what I don't like about ROS, old package (not really old 2012) doesn't work in new versions. Yes I do agree, it is not a good idea to be back to older ROS version and to Ubuntu 10 haha. Thanks

ROSkinect gravatar image ROSkinect  ( 2016-04-22 02:49:55 -0500 )edit
1

That isn't a ROS problem, that's just the way it is. When all your dependencies are constantly evolving, there needs to be a maintainer that makes the required changes. WIthout a maintainer, a sofware package will not work in current versions.

Martin Günther gravatar image Martin Günther  ( 2016-04-22 03:29:55 -0500 )edit
1

Also, ROS is for developers, not consumers. So if you are interested in getting that package running, feel free to port it to a new ROS distro. :) I agree this is a problem (and it creates a lot of work for maintainers), but I don't see a way around it.

Martin Günther gravatar image Martin Günther  ( 2016-04-22 03:32:27 -0500 )edit
1

Yes I would do that and import it to new version of ROS.

Consumers in its positive meaning, to make things progress faster, rather than working on something that has been already done by others :D Thanks for opensource.

ROSkinect gravatar image ROSkinect  ( 2016-04-22 03:58:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-21 04:25:52 -0500

Seen: 242 times

Last updated: Apr 21 '16