This repository was archived by the owner on Jun 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexample.launch.py
More file actions
49 lines (40 loc) · 1.66 KB
/
Copy pathexample.launch.py
File metadata and controls
49 lines (40 loc) · 1.66 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
40
41
42
43
44
45
46
47
48
49
# Copyright 2022 Jacob Hartzer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
"""Generate launch description for ekf_cal example config."""
this_dir = get_package_share_directory('ekf_cal')
config_file = os.path.join(this_dir, 'config', 'example.yaml')
log_directory_arg = DeclareLaunchArgument(
'log_directory',
default_value=os.path.join(this_dir, 'config', 'example', '')
)
start_ekf_cal_node_cmd = Node(
package='ekf_cal',
executable='ekf_cal_node',
output='screen',
parameters=[
config_file,
{'log_directory': LaunchConfiguration('log_directory')}]
)
# Create the launch description and populate
ld = LaunchDescription([log_directory_arg])
ld.add_action(start_ekf_cal_node_cmd)
return ld