Ros DWA 參數調試


博客轉自: https://www.cnblogs.com/cv-pr/p/5800270.html

Dynamic Window Approach(DWA)是重要的局部軌跡規划算法,ROS中使用了DWA算法獲得了很好的局部路徑規划的效果。具體的教程可參考官方的導航調試資料Navigation Tuning Guide。ROS的DWA(dwa_local_planner)應用到新機器人調試時,有一些技巧需要注意的,這里做一些總結。

1.設置坐標系和話題

需要訂閱的話題:

里程計話題:/odom

需要設置的坐標系:包含/map,/odom,/base_footprint

2.參數調試

a.加速度的限制

加速度限制(acc_lim_x,acc_lim_y,acc_lim_th)非常的重要,如果不知道機器人的加速度,可以盡量的往大的設置,因為如果設置太小了,往往會出現機器人往前跑斷斷續續的,轉彎轉過頭(看似加速度太大了,實際是加速度太小,以至於機器人想把機器人掰回來而掰不及),從而導致反復的震盪(oscillating over and over),例如下面的錯誤提示:

Aborting because the robot appears to be oscillating over and over. Even after executing all recovery behaviors

~<name>/acc_lim_x (double, default: 2.5)

  • The x acceleration limit of the robot in meters/sec^2
  • 開始調試盡量往大的設置

~<name>/acc_lim_y (double, default: 2.5)

  • The y acceleration limit of the robot in meters/sec^2
  • 如果是差分輪,設置為0即可

~<name>/acc_lim_th (double, default: 3.2)

  • The rotational acceleration limit of the robot in radians/sec^2
  • 開始調試盡量往大的設置

b.仿真的時間

局部路徑模擬的時間不用太長也不用太短,一般一秒左右就差不多了,如果太多會容易導致偏離全局的路徑,特別啟動的時候會轉較大的半徑,如果想啟動的時候基本原地旋轉擺正機器人的方向和全局路徑的方向一致,那么就把模擬的時間設置短點。如果太小的仿真時間也不好,容易導致頻繁的路徑規划消耗資源,甚至也會出現震盪的可能。

~<name>/sim_time (double, default: 1.7)

  • The amount of time to forward-simulate trajectories in seconds

c.軌跡的規划

主要是一些設置生成軌跡的參數。其中以下的兩個參數比較重要。

~<name>/path_distance_bias (double, default: 32.0)

  • The weighting for how much the controller should stay close to the path it was given
  • 刻畫局部路徑和全局路徑的貼合程度,該權重參數越大說明越貼合,越小說明不用那么貼合。

~<name>/goal_distance_bias (double, default: 24.0)

  • The weighting for how much the controller should attempt to reach its local goal, also controls speed
  • 達到局部目標點的權重參數,也用來控制速度。權重如果設置為0表示要求完全到達目標點,這會導致機器人走動緩慢和震盪的現象,因為要求達到目標點的精度太高,所對機器人的控制比較苛刻

3.參考資料

[1]. 機器人局部避障的動態窗口法(dynamic window approach)(*****)

[2]. Autonomous Robot Navigation

[3]. Circular Motion in 2D for graphics and robotics

[4]. A Tutorial and Elementary Trajectory Model for the Differential Steering System of robot wheel actuators

[5]. Navigation Tuning Guide

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM