티스토리 뷰

[kobuki] 내비게이션 파라미터 조정


내비게이션 파라미터를 조정해서 좋은 성능을 찾아보자

 

1. 원래 파라미터

costmap_common_params.yaml

obstacle_range: 3.0
raytrace_range: 3.5

footprint: [[-0.205, -0.155], [-0.205, 0.155], [0.077, 0.155], [0.077, -0.155]]
footprint_padding: 0.01
#robot_radius: 0.17

inflation_radius: 1.0
cost_scaling_factor: 8.0

map_type: costmap
observation_sources: scan
scan: {sensor_frame: base_footprint, data_type: LaserScan, topic: scan, marking: true, clearing: true, max_obstacle_height: 10.0, min_obstacle_height: 0.0, inf_is_valid: true}

 

원본

 


-한개 변환

costmap_common_params.yaml

obstacle_range: 3.0
raytrace_range: 3.5

footprint: [[-0.205, -0.155], [-0.205, 0.155], [0.077, 0.155], [0.077, -0.155]]
footprint_padding: 0.01
#robot_radius: 0.17

inflation_radius: 1.0
cost_scaling_factor: 6.0

map_type: costmap
observation_sources: scan
scan: {sensor_frame: base_footprint, data_type: LaserScan, topic: scan, marking: true, clearing: true, max_obstacle_height: 10.0, min_obstacle_height: 0.0, inf_is_valid: true}

cost_scaling_factor: 6.0 으로  줄어들면

cost_scaling_factor: 6.0

파란부분 증가

 

cost_scaling_factor: 10.0 으로 커지면

 

cost_scaling_factor: 10.0

파란색 부분이 줄어든걸 볼 수 있다.

 

inflation_radius: 1.0 ->  inflation_radius: 0.8

원본과 차이가 별로 없다

inflation_radius: 1.0 ->  inflation_radius: 0.5

inflation_radius: 0.5

 

비교

inflation_radius: 0.5  vs  cost_scaling_factor: 12.0

왼 : inflation vs 우 : cost_scaling


-global_costmap_params.yaml

원본

global_costmap:
  global_frame: map
  robot_base_frame: base_footprint

  update_frequency: 8.0
  publish_frequency: 10.0
  transform_tolerance: 0.5

  static_map: true
 

 

앞의 commom파일은 원본과 동일

global_costmap_params.yaml 만 변경

여기서 중요한 파라미터는

transform_tolerance: 0.8   // transform_tolerance: 0.5 |변환 허용 거리

 

무엇이 변하나 보자

transform_tolerance: 0.8로 변경

? 음 잘 모르겠다...

찾아보니

In order to insert data from sensor sources into the costmap, the costmap_2d::Costmap2DROS object makes extensive use of tf. Specifically, it assumes that all transforms between the coordinate frames specified by the global_frame parameter, the robot_base_frame parameter, and sensor sources are connected and up-to-date. The transform_tolerance parameter sets the maximum amount of latency allowed between these transforms. If the tf tree is not updated at this expected rate, the navigation stack stops the robot. 

출처 ros wiki

 

특히 global_frame 파라미터, robot_base_frame 파라미터 및 센서 소스에 의해 지정된 좌표 프레임 간의 모든 변환이 연결되고 최신 상태라고 가정합니다.

transform_tolerance 매개 변수는 이러한 변환 간에 허용되는 최대 지연 시간을 설정합니다. tf 트리가 이 예상 속도로 업데이트되지 않으면 탐색 스택이 로봇을 중지합니다.

 

대충 이렇다..

파라미터를 변경할려면 그 파라미터가 뭘 하는지 알아야해

그러니 파라미터 공부도 하자

 


local_costmap_params.yaml

원본

local_costmap:
  global_frame: map
  robot_base_frame: base_footprint

  plugins: 
    - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
    - {name: sensor, type: "costmap_2d::ObstacleLayer"}

  update_frequency: 8.0
  publish_frequency: 2.0
  transform_tolerance: 2.0  

  static_map: false   
  rolling_window: true
  width: 3
  height: 3
  resolution: 0.05

  inflation: 
    inflation_radius: 1.0
    cost_scaling_factor: 8.0

  obstacles: 
    observation_sources: scan 
    base_scan: {data_type: LaserScan, sensor_frame: base_laser_link, clearing: true, marking: true, topic: scan}

 

다음 두개 변환

costmap_common_params_2.yaml

inflation_radius: 0.5
cost_scaling_factor: 6.0

cost_scaling_factor: 10.0 으로

 

'robot' 카테고리의 다른 글

[map merging] OpenCv - feature matching  (0) 2021.07.14
[gmapping map size] 맵 사이즈 변경  (0) 2021.07.12
[꼬부기/kobuki] navigation  (0) 2021.06.25
[꼬부기/kobuki] slam  (0) 2021.05.26
모바일 로봇 공부하기  (0) 2021.05.03
댓글