SBPL的安装与使用
SBPL的安装
- 下载
cd ~/catkin_ws/src
git clone https://github.com/sbpl/sbpl.git
- 安装
- Build SBPL
cd sbpl
mkdir build
cmake ..
make
- Install SBPL
说明:安装位置为/usr/local
sudo make install
每一次对sbpl的更新,都需要执行该条语句
SBPL_Lattice_Planner的下载与安装
- 下载
cd ~/catkin_ws/src
git clone https://github.com/ros-planning/navigation_experimental
- CMakeLists设置
find_package(PkgConfig REQUIRED)
pkg_check_modules(SBPL REQUIRED sbpl) find_library(SBPL_LIBRARY NAMES sbpl PATHS ${SBPL_LIBRARY_DIRS} NO_DEFAULT_PATH)
set(SBPL_LIBRARIES ${SBPL_LIBRARY})
include_directories(include ${catkin_INCLUDE_DIRS} ${SBPL_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS} ${SBPL_LIBRARY_DIRS})
配置
rosmake sbpl_lattice_planner
说明
- sbpl_lattice_planner.cpp是move_base包中的一个全局规划插件
navigation_tutorials的下载与安装
cd ~/catkin_ws/src
git clone https://github.com/ros-planning/navigation_tutorials
基于stage的测试
- 启动
roscore
roslaunch navigation_stage move_base_amcl_10cm.launch
- 参数设置
- 打开move_base_amcl_10cm.launch文件
<launch>
<master auto="start"/>
<param name="/use_sim_time" value="true"/>
<include file="$(find navigation_stage)/move_base_config/move_base.xml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(find navigation_stage)/stage_config/maps/willow-full.pgm 0.1" respawn="false" />
<node pkg="stage_ros" type="stageros" name="stageros" args="$(find navigation_stage)/stage_config/worlds/willow-pr2.world" respawn="false">
<param name="base_watchdog_timeout" value="0.2"/>
</node>
<include file="$(find navigation_stage)/move_base_config/amcl_node.xml"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find navigation_stage)/single_robot.rviz"/>
</launch>
- 打开move_base.xml文件
<launch>
<node pkg="move_base" type="move_base" respawn="false" name="move_base_node" output="screen">
<param name="footprint_padding" value="0.01" />
<param name="controller_frequency" value="10.0" />
<param name="controller_patience" value="3.0" />
<param name="oscillation_timeout" value="30.0" />
<param name="oscillation_distance" value="0.5" />
<param name="base_global_planner" value="SBPLLatticePlanner" />
<param name="sbpllatticeplanner/primitive_filename" value="$(find navigation_stage)/mprim/pr2_10cm.mprim" />
<rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find navigation_stage)/move_base_config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find navigation_stage)/move_base_config/global_costmap_params.yaml" command="load" />
<rosparam file="$(find navigation_stage)/move_base_config/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find navigation_stage)/move_base_config/sbpl_global_params.yaml" command="load" />
</node>
</launch>