-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwarehouse_db.launch.py
More file actions
39 lines (34 loc) · 1.34 KB
/
warehouse_db.launch.py
File metadata and controls
39 lines (34 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright (c) 2024-2025, Personal Robotics Laboratory
# License: BSD 3-Clause. See LICENSE.md file in root directory.
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.utilities import normalize_to_list_of_substitutions
from launch_ros.actions import Node
from moveit_configs_utils import MoveItConfigsBuilder
from moveit_configs_utils.launches import generate_warehouse_db_launch
def generate_launch_description():
ld = LaunchDescription()
# Log Level
log_level_da = DeclareLaunchArgument(
"log_level",
default_value="info",
description="Logging level (debug, info, warn, error, fatal)",
)
log_level = LaunchConfiguration("log_level")
log_level_cmd_line_args = ["--ros-args", "--log-level", log_level]
ld.add_action(log_level_da)
moveit_config = MoveItConfigsBuilder(
"ada", package_name="ada_moveit"
).to_moveit_configs()
entities = generate_warehouse_db_launch(moveit_config).entities
for entity in entities:
if isinstance(entity, Node):
entity.cmd.extend(
[
normalize_to_list_of_substitutions(arg)
for arg in log_level_cmd_line_args
]
)
ld.add_action(entity)
return ld