Skip to content

map_changer

Koki Kubota edited this page Oct 26, 2023 · 2 revisions

map_changerは、map_merger で出力したディレクトリを指定することで、orange_navigation によるナビゲーション中の地図の切り替えを実現するためのノードです。 地図の切り替えには、map_server のサービスを利用します。


1. Subscribed Topics

  • waypoint_num (std_msgs/UInt16)
    何番目のウェイポイントに向かっているか。orange_navigation のノード waypoint_nav によりパブリッシュされる。

2. Parameters

  • ~multi_map_dir (string, default: "")
    map_merger で出力したディレクトリのパス

  • ~waypoints_file (string, default: "")
    map_merger で出力したウェイポイントファイルのパス


3. Required YAML Format

基本的に、map_merger で出力したディレクトリとウェイポイントファイルの利用を前提としています。
ウェイポイントファイルの形式も、以下のような orange_navigationでの形式 が前提です。

waypoints:
- point: {x: 1.0, y: 0.0, z: 0.0, vel: 1.0, rad: 0.8, stop: false}
- point: {x: 2.0, y: 0.0, z: 0.0, vel: 1.0, rad: 0.8, stop: false}
- point: {x: 3.0, y: 0.0, z: 0.0, vel: 1.0, rad: 0.8, stop: true, change_map: 1}
...
- point: {x: 3.0, y: 0.0, z: 0.0, vel: 1.0, rad: 0.8, stop: true, change_map: 2}
finish_pose:
  header: {seq: 0, stamp: 113.132, frame_id: map}
  pose:
    position: {x: 4.0, y: 0.0, z: 0.0}
    orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}

地図の切り替え地点では、stop パラメータがtrueである必要があります。
また、change_map パラメータに指定する値は、"~multi_map_dir" に指定したディレクトリ内の地図の番号に対応します。(map0, map1, ...)

Clone this wiki locally