导航相关的节点和动态库之间的关系

注意devel/lib里的so文件权限是rwxrwxr-xinstall/lib里的so文件权限是rw-r--r--

节点move_base由很多库链接,一部分是/opt/ros/kinetic目录的ROS基本库文件,另一部分是/usr/lib/x86_64-linux-gnu的系统库文件,除此之外的重要库文件只有:

  • libmove_base.so
  • libbase_local_planner.so
  • libcostmap_2d.so
  • libvoxel_grid.so
  • libteb_local_planner.so

同理,libmove_base.so的重要链接库:

  • libbase_local_planner.so
  • libcostmap_2d.so
  • libvoxel_grid.so

依次检查其他库文件,由于base_local_planner一般不修改,所以重要的其实就是libmove_base.so, libcostmap_2d.so, libvoxel_grid.so

主要的库文件,比较大的几个

1
2
3
4
5
6
11M   libmove_base.so
8.5M liblayers.so

3.1M libcostmap_2d.so
2.3M libteb_local_planner.so
2.0M move_base/move_base

libteb_local_planner.so

1
2
3
4
5
6
7
8
9
10
11
12
add_library( teb_local_planner

src/timed_elastic_band.cpp
src/optimal_planner.cpp
src/obstacles.cpp
src/visualization.cpp
src/recovery_behaviors.cpp
src/teb_config.cpp
src/homotopy_class_planner.cpp
src/teb_local_planner_ros.cpp
src/graph_search.cpp
)

更新teb算法的so文件,不能只更新libteb_local_planner.so,而是包含以下文件:

1
libbase_local_planner.so libmove_base.so libcostmap_2d.so libvoxel_grid.so liblayers.so libteb_local_planner.so




libcostmap_2d.so

1
2
3
4
5
6
7
8
9
10
11
12
13
add_library(  costmap_2d

src/array_parser.cpp
src/costmap_2d.cpp
src/observation_buffer.cpp
src/layer.cpp
src/layered_costmap.cpp
src/costmap_2d_ros.cpp
src/costmap_2d_publisher.cpp
src/costmap_math.cpp
src/footprint.cpp
src/costmap_layer.cpp
)




liblayers.so:

1
2
3
4
5
6
7
8
add_library( layers  

plugins/inflation_layer.cpp
plugins/obstacle_layer.cpp
plugins/static_layer.cpp
plugins/voxel_layer.cpp
src/observation_buffer.cpp
)

问题

move_base运行时出错,可能是安装问题,更可能是链接问题,确保libtf.so/opt/ros/的那个,它还会链接libtf2_ros.solibtf2.so,它们也应该是/opt/ros/