Skip to content

Commit

Permalink
launch/component. fixes pep257, E302 and W391
Browse files Browse the repository at this point in the history
Signed-off-by: amc-nu <[email protected]>
  • Loading branch information
amc-nu committed Sep 5, 2024
1 parent cb11785 commit 72fdb24
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# -=- encoding: utf-8 -=-
#
# Copyright (C) 2024 TIER IV. All rights reserved.
#
# 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 import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import OpaqueFunction
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
import json


def launch_setup(context, *args, **kwargs):
"""Returns Launch Configuration for the TF between the lidar and the camera"""
tf_file = LaunchConfiguration('tf_file_path').perform(context)
with open(tf_file, 'r') as f:
tf_data = json.load(f)
Expand Down Expand Up @@ -44,11 +62,11 @@ def launch_setup(context, *args, **kwargs):
])
]


def generate_launch_description():
return LaunchDescription(
[
DeclareLaunchArgument("tf_file_path"),
OpaqueFunction(function=launch_setup),
]
)

0 comments on commit 72fdb24

Please sign in to comment.