【機器人學:運動規劃】OMPL開源運動規劃庫的安裝和demo
阿新 • • 發佈:2018-11-25
開源運動規劃庫(OMPL)是美國萊斯大學的kavrakilab開發的,包含了當下主流的運動規劃器。對於機器人方向的同學來說,無論是做移動機器人還是機械臂,這是必須要學習的工具。
在ubuntu14.04環境下,安裝OMPL是比較簡單的。
- 首先進入OMPL的官網http://ompl.kavrakilab.org/
- 點選Getting Started下的install OMPL,進入下邊的頁面
點選“Download the OMPL installation script”,會下載一個名為“install-ompl-ubuntu.sh”的檔案。 - 在install-ompl-ubuntu.sh的目錄下,執行命令
chmod u+x install-ompl-ubuntu.sh
和./install-ompl-ubuntu.sh
需要注意的是安裝OMPL之前需要提前安裝g++5.0和CMake 3.4以上,這樣在編譯的時候就不會報錯了。 - 安裝後在安裝目錄下會出現一個ompl-1.3.1-Source的資料夾。
- 在/ompl-1.3.1-Source/build/Release/bin下有很多生成的demo可執行檔案
- 在終端中執行
./demo_Point2DPlanning
這是一個質點在二維平面空間中的規劃算例,結果為:
[email protected]:~/ompl/ompl-1.3.1-Source/build/Release/bin$ ./demo_Point2DPlanning
OMPL version: 1.3.1
Info: No planner specified. Using default.
Info: LBKPIECE1: Attempting to use default projection.
Debug: LBKPIECE1: Planner range detected to be 486.395107
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 1043 (615 start + 428 goal) states in 277 cells (184 start (127 on boundary) + 93 goal (65 on boundary))
Info: Solution found in 0.055480 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 520 (401 start + 119 goal) states in 153 cells (130 start (92 on boundary) + 23 goal (20 on boundary))
Info: Solution found in 0.033183 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 594 (461 start + 133 goal) states in 160 cells (127 start (86 on boundary) + 33 goal (27 on boundary))
Info: Solution found in 0.039627 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 609 (470 start + 139 goal) states in 215 cells (170 start (110 on boundary) + 45 goal (40 on boundary))
Info: Solution found in 0.023786 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 608 (509 start + 99 goal) states in 232 cells (210 start (163 on boundary) + 22 goal (19 on boundary))
Info: Solution found in 0.024900 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 269 (163 start + 106 goal) states in 121 cells (86 start (81 on boundary) + 35 goal (31 on boundary))
Info: Solution found in 0.008904 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 333 (199 start + 134 goal) states in 202 cells (108 start (98 on boundary) + 94 goal (86 on boundary))
Info: Solution found in 0.006044 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 250 (137 start + 113 goal) states in 135 cells (85 start (78 on boundary) + 50 goal (43 on boundary))
Info: Solution found in 0.011098 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 521 (345 start + 176 goal) states in 202 cells (187 start (160 on boundary) + 15 goal (13 on boundary))
Info: Solution found in 0.027484 seconds
Info: LBKPIECE1: Starting planning with 1 states already in datastructure
Info: LBKPIECE1: Created 376 (281 start + 95 goal) states in 143 cells (108 start (92 on boundary) + 35 goal (31 on boundary))
Info: Solution found in 0.021535 seconds
Info: Found 10 solutions
Info: SimpleSetup: Path simplification took 0.001149 seconds and changed from 21 to 49 states