Skip to content

Commit

Permalink
fix: set map path (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato-m126 authored Jul 23, 2024
1 parent e30cd64 commit 0c4b748
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions log_evaluator/launch/log_evaluator.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import datetime
from os.path import expandvars
from pathlib import Path

from ament_index_python.packages import get_package_share_directory
Expand Down Expand Up @@ -109,19 +108,14 @@ def ensure_arg_compatibility(context: LaunchContext) -> list:
dataset_index = int(idx_str)
for k, v in datasets[dataset_index].items():
dataset_path = dataset_dir.joinpath(k)
map_path_str: str | None = v.get("LocalMapPath")
conf["vehicle_id"] = v["VehicleId"]
launch_sensing = yaml_obj["Evaluation"].get("LaunchSensing")
launch_localization = yaml_obj["Evaluation"].get("LaunchLocalization")
if launch_sensing is not None:
conf["sensing"] = str(launch_sensing)
if launch_localization is not None:
conf["localization"] = str(launch_localization)

map_path = (
dataset_path.joinpath("map") if map_path_str is None else Path(expandvars(map_path_str))
)
conf["map_path"] = map_path.as_posix()
conf["map_path"] = dataset_path.joinpath("map").as_posix()
conf["vehicle_model"] = yaml_obj["VehicleModel"]
conf["sensor_model"] = yaml_obj["SensorModel"]
conf["t4_dataset_path"] = dataset_path.as_posix()
Expand Down

0 comments on commit 0c4b748

Please sign in to comment.