map_loader
役割
map_loader は CSV 地図を rogi_msgs/msg/Map に変換して publish します。線分と円弧を 1 つの map message にまとめ、map_converter、ransac_localizer、可視化ノードへ渡します。
Interface
種別 |
名前 |
型 / 内容 |
|---|---|---|
publish |
|
|
parameter |
|
線分 CSV path |
parameter |
|
円弧 CSV path |
parameter |
|
y 軸反転の有効化 |
parameter |
|
y 軸反転後に足す offset |
座標変換
線分の始点と終点を \(p_s=(x_s,y_s,z_s)\)、\(p_e=(x_e,y_e,z_e)\) とします。reverse_y=false ならそのまま publish します。reverse_y=true の場合、y 座標だけを次式で反転します。
ここで \(y_0\) は reverse_y_offset です。
円弧は中心 \(c=(x_c,y_c,z_c)\)、半径 \(r\)、開始角 \(\theta_s\)、終了角 \(\theta_e\) として読みます。y 軸反転時は次式です。
Publish
publisher は transient_local + reliable です。起動直後に publish し、その後 500 ms 間隔で数回再送します。静的地図を想定しているため、再送後は timer を停止します。
設定ファイル
sample では example/sample/config/map/config.yaml がこのノードの入力ファイルを指定します。
key |
例 |
対応する parameter / 用途 |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
後段 |
rogi_nav.launch.py は config_dir/map を基準に相対 path を絶対 path へ変換します。
line_segments.csv は header 後に次の 6 列を持ちます。
start_x,start_y,start_z,end_x,end_y,end_z
circles.csv は次の 6 列です。
center_x,center_y,center_z,radius,start_angle,end_angle
profile 側では real.yaml / sim.yaml の次の key で起動を切り替えます。
launch:
components:
map:
map_loader:
enabled: true