1

While doing catkin_make ROS_MRPT_SLAM, I got following error

In file included from /usr/include/mrpt/base/include/mrpt/utils/CFileGZInputStream.h:12:0,
                 from /home/ian/catkin_ws/src/mrpt_slam/mrpt_ekf_slam_2d/include/mrpt_ekf_slam_2d/mrpt_ekf_slam_2d.h:11,
                 from /home/ian/catkin_ws/src/mrpt_slam/mrpt_ekf_slam_2d/src/mrpt_ekf_slam_2d.cpp:7:
/usr/include/mrpt/base/include/mrpt/utils/CStream.h: In member function ‘void mrpt::utils::CStream::WriteVariant(T)’:
/usr/include/mrpt/base/include/mrpt/utils/CStream.h:313:15: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
   t.match([&](auto& o) { this->WriteObject(o); });
               ^
/usr/include/mrpt/base/include/mrpt/utils/CStream.h: In lambda function:
/usr/include/mrpt/base/include/mrpt/utils/CStream.h:313:45: error: no matching function for call to ‘mrpt::utils::CStream::WriteObject(int&)’
   t.match([&](auto& o) { this->WriteObject(o); });

I guess it's compatibility matter or something because there were missing header files and so on.

This is the ROS_PACKAGE wiki: http://wiki.ros.org/mrpt_slam

And I just followed instruction from official MRPT website.

If the developer or anyone who is familiar with mrpt toolkit sees this question, may I get some advice about these errors?

By the way, I installed mrpt toolkit using the following website's instruction: http://www.mrpt.org/MRPT_in_GNU/Linux_repositories.

tuomastik
  • 4,559
  • 5
  • 36
  • 48

1 Answers1

0

I'm the main author of MRPT and of part of the ROS packages.

Sorry for the mess, but you found us in the transition between the mrpt series 1.5.* and a new mayor rewrite based on C++14 which currently is published in git as mrpt 1.9.9 and eventually will be released as 2.0.0.

This transition must be propagated to the ros nodes, but so far we have upgraded mrpt_navigation only, mrpt_slam is in the to-do list.

So: a solution is to install an mrpt version of the 1.5.* series, and to build the ros packages from sources, paying attention to checking out the branches named compat-mrpt-1.5.

Hope this helps!

Jose Luis Blanco
  • 705
  • 6
  • 10
  • Mrpt version of the 1.5.* series means, I guess, I need to compile/install it manually. Am I right? Because when I checked packages, there were only 1.3 version and 1.9 version. One more thing, is this https://github.com/MRPT/mrpt mrpt's main git address? Thank you a lot brother. – Ian Jason Min Aug 24 '17 at 01:27
  • Yes, for now, download and build manually the latest 1.5.* release. I'm working on a [PPA for the mrpt-1.5 series](https://launchpad.net/~joseluisblancoc/+archive/ubuntu/mrpt-1.5) but it's not working properly yet... – Jose Luis Blanco Aug 25 '17 at 05:11
  • Is 1.9.* release next target after repo? – Ian Jason Min Aug 25 '17 at 10:00
  • I tried with 1.5.3 version, and I guess it has compatibility issue too. Here is errors that I got. `error: ‘mrpt::obs::CSensoryFrame::Ptr’ has not been declared CSensoryFrame::Ptr _sf, CObservationOdometry::Ptr _odometry)` I guess, I will wait for next release. – Ian Jason Min Aug 26 '17 at 02:06
  • Hi, Please, open an issue ticket in the GitHub repo and we'll discuss it there. Thanks. – Jose Luis Blanco Aug 27 '17 at 10:43