ros kinetic 下编译laser_scan_matcher 方法

来源:互联网 发布:qq飞车皮皮虾改车软件 编辑:程序博客网 时间:2024/06/05 13:54

目前,laser_scan_matcher 在kinetic下还没有可以apt-get 的包,要使用,必须要从源码编译,下面是我的编译方法:


1、sudo apt-get install libgsl0-dev


2、first install the package csm itself in directory /catkin_ws/src: git clone https://github.com/AndreaCensi/csm.git and package scan_tools: git clone https://github.com/ccny-ros-pkg/scan_...


3、in /catkin_ws do catkin_make


4、open: nano ~/.bashrc and add to end of file as a variable PKG_CONFIG_PATH tssm.pk 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


5、Next, you must explicitly register in five file path to the header files:


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)

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

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

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

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


6、Finally, go to your /catkin_ws and do catkin_make 


如果你在树莓派或者odroid板上编译,记得要设置一下swap内存,因为编译所需内存非常大,内存不够会报 编译器内部错误。具体设置方法可以参看上一篇文章。



0 0
原创粉丝点击