SBPL軟體包在ROS中的配置
阿新 • • 發佈:2019-02-07
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>