Skip to content

Commit c4403b3

Browse files
committed
feat: update direct initial pose
1 parent 09786dd commit c4403b3

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

driving_log_replayer/driving_log_replayer/localization.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
from driving_log_replayer.result import EvaluationItem
3333
from driving_log_replayer.result import ResultBase
34-
from driving_log_replayer.scenario import InitialPose
34+
from driving_log_replayer.scenario import InitialPose as InitialPoseModel
3535
from driving_log_replayer.scenario import number
3636
from driving_log_replayer.scenario import Scenario
3737

@@ -68,8 +68,8 @@ class Evaluation(BaseModel):
6868
UseCaseName: Literal["localization"]
6969
UseCaseFormatVersion: Literal["1.2.0", "1.3.0"]
7070
Conditions: Conditions
71-
InitialPose: InitialPose | None
72-
DirectInitialPose: str | None = None
71+
InitialPose: InitialPoseModel | None
72+
DirectInitialPose: InitialPoseModel | None
7373

7474
@model_validator(mode="after")
7575
def mutually_exclusive(self) -> "Evaluation":

driving_log_replayer_cli/simulation/run.py

-3
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,6 @@ def cmd_use_bag_only(
240240
launch_localization = scenario.Evaluation.get("LaunchLocalization")
241241
if launch_localization is not None:
242242
launch_arg_dict_scenario["localization"] = launch_localization
243-
direct_initialpose = scenario.Evaluation.get("DirectInitialPose")
244-
if direct_initialpose is not None:
245-
launch_arg_dict_scenario["initial_pose"] = direct_initialpose
246243
launch_arg_dict_scenario.update(launch_args_dict)
247244
return launch_command + clean_up_cmd()
248245

sample/localization/scenario_direct_initialpose.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ Evaluation:
1818
Method: NVTL # NVTL or TP which method to use for evaluation
1919
AllowableLikelihood: 2.3 # If above this value, the localization reliability value is considered normal.
2020
NGCount: 10 # If the reliability value is lower than the threshold value for more than this number in the sequence. the evaluation is considered to have failed.
21-
DirectInitialPose: "[3839.340576171875,73731.3359375,19.639482498168945,-0.023971009814459248,0.005891999600528019,-0.9709848597542231,0.237863568369043]"
21+
DirectInitialPose:
22+
position:
23+
x: 3839.340576171875
24+
y: 73731.3359375
25+
z: 19.639482498168945
26+
orientation:
27+
x: -0.023971009814459248
28+
y: 0.005891999600528019
29+
z: -0.9709848597542231
30+
w: 0.237863568369043

0 commit comments

Comments
 (0)