mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 12:07:46 +08:00
Use the dev_matrices parameter to pass arguments
This commit is contained in:
@@ -9,6 +9,7 @@ from launch.launch_description_sources import PythonLaunchDescriptionSource
|
|||||||
from launch.substitutions import LaunchConfiguration
|
from launch.substitutions import LaunchConfiguration
|
||||||
from launch.actions import TimerAction
|
from launch.actions import TimerAction
|
||||||
from launch.actions import GroupAction
|
from launch.actions import GroupAction
|
||||||
|
from launch.substitutions import PathJoinSubstitution
|
||||||
|
|
||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
orbbec_camera_bringup_dir = get_package_share_directory('orbbec_camera')
|
orbbec_camera_bringup_dir = get_package_share_directory('orbbec_camera')
|
||||||
@@ -50,9 +51,6 @@ def generate_launch_description():
|
|||||||
'component_container_name': component_container_name_arg}.items(),
|
'component_container_name': component_container_name_arg}.items(),
|
||||||
condition=UnlessCondition(LaunchConfiguration('from_bag')))
|
condition=UnlessCondition(LaunchConfiguration('from_bag')))
|
||||||
|
|
||||||
dev_matrices_arg = DeclareLaunchArgument(
|
|
||||||
'dev_matrices', default_value=default_dev_matrices_file,
|
|
||||||
description='default device extrinsics matrices')
|
|
||||||
base_static_transforms_publisher = ExecuteProcess(
|
base_static_transforms_publisher = ExecuteProcess(
|
||||||
cmd=[
|
cmd=[
|
||||||
'python3',
|
'python3',
|
||||||
@@ -61,7 +59,10 @@ def generate_launch_description():
|
|||||||
'launch',
|
'launch',
|
||||||
'base_static_transforms_publisher.py'
|
'base_static_transforms_publisher.py'
|
||||||
),
|
),
|
||||||
'--dev_matrices', LaunchConfiguration('dev_matrices')
|
'--dev_matrices', PathJoinSubstitution([
|
||||||
|
get_package_share_directory('isaac_orbbec_launch'),
|
||||||
|
LaunchConfiguration('dev_matrices')
|
||||||
|
])
|
||||||
],
|
],
|
||||||
output='screen'
|
output='screen'
|
||||||
)
|
)
|
||||||
@@ -100,10 +101,10 @@ def generate_launch_description():
|
|||||||
from_bag_arg,
|
from_bag_arg,
|
||||||
bag_path_arg,
|
bag_path_arg,
|
||||||
shared_orbbec_container,
|
shared_orbbec_container,
|
||||||
orbbec_launch,
|
# orbbec_launch,
|
||||||
base_static_transforms_publisher,
|
base_static_transforms_publisher,
|
||||||
perceptor_launch,
|
# perceptor_launch,
|
||||||
bag_play,
|
# bag_play,
|
||||||
rviz2_node,
|
# rviz2_node,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user