Skip to content

Commit

Permalink
feat: ndt convergence (#103)
Browse files Browse the repository at this point in the history
* feat: switch launch

Signed-off-by: Hayato Mizushima <[email protected]>

* fix: LogInfo

Signed-off-by: Hayato Mizushima <[email protected]>

---------

Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 authored Feb 26, 2025
1 parent 4787389 commit dba8669
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2025 TIER IV.inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from launch.actions import DeclareLaunchArgument

# This file is a dummy file prepared for compatibility with the existing system.

RECORD_TOPIC = ""

AUTOWARE_DISABLE = {}

AUTOWARE_ARGS = {}

NODE_PARAMS = {}

USE_CASE_ARGS: list[DeclareLaunchArgument] = []
35 changes: 26 additions & 9 deletions driving_log_replayer_v2/launch/driving_log_replayer_v2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,37 @@ def launch_goal_pose_node(context: LaunchContext) -> list:
]


def select_launch(context: LaunchContext) -> list:
conf = context.launch_configurations
if conf["use_case"] == "ndt_convergence":
return launch_ndt_convergence()
return launch_use_case()


def launch_ndt_convergence() -> list:
return [LogInfo(msg="ndt_convergence")]


def launch_use_case() -> list:
return [
OpaqueFunction(function=add_use_case_arguments), # after ensure_arg_compatibility
OpaqueFunction(function=launch_autoware),
OpaqueFunction(function=launch_map_height_fitter),
OpaqueFunction(function=launch_evaluator_node),
OpaqueFunction(function=launch_bag_player),
OpaqueFunction(function=launch_bag_recorder),
OpaqueFunction(function=launch_topic_state_monitor),
OpaqueFunction(function=launch_initial_pose_node),
OpaqueFunction(function=launch_goal_pose_node),
]


def generate_launch_description() -> LaunchDescription:
launch_arguments = get_launch_arguments()
return LaunchDescription(
[
*launch_arguments,
OpaqueFunction(function=ensure_arg_compatibility),
OpaqueFunction(function=add_use_case_arguments), # after ensure_arg_compatibility
OpaqueFunction(function=launch_autoware),
OpaqueFunction(function=launch_map_height_fitter),
OpaqueFunction(function=launch_evaluator_node),
OpaqueFunction(function=launch_bag_player),
OpaqueFunction(function=launch_bag_recorder),
OpaqueFunction(function=launch_topic_state_monitor),
OpaqueFunction(function=launch_initial_pose_node),
OpaqueFunction(function=launch_goal_pose_node),
OpaqueFunction(function=select_launch),
],
)

0 comments on commit dba8669

Please sign in to comment.