mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
Fix the bug that the launch file in examples is not available
This commit is contained in:
@@ -242,7 +242,7 @@ def generate_launch_description():
|
|||||||
condition=UnlessCondition(attach_to_shared_component_container_arg)
|
condition=UnlessCondition(attach_to_shared_component_container_arg)
|
||||||
)
|
)
|
||||||
return [
|
return [
|
||||||
# orbbec_container,
|
orbbec_container,
|
||||||
LoadComposableNodes(
|
LoadComposableNodes(
|
||||||
target_container=component_container_name_arg,
|
target_container=component_container_name_arg,
|
||||||
composable_node_descriptions=[
|
composable_node_descriptions=[
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def load_parameters(context, args):
|
|||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
# Include launch files
|
# Include launch files
|
||||||
package_dir = get_package_share_directory("orbbec_camera")
|
package_dir = get_package_share_directory("orbbec_camera")
|
||||||
launch_file_dir = os.path.join(package_dir, "launch")
|
launch_file_dir = os.path.join(package_dir, "examples/benchmark")
|
||||||
|
|
||||||
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
||||||
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def load_parameters(context, args):
|
|||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
# Include launch files
|
# Include launch files
|
||||||
package_dir = get_package_share_directory("orbbec_camera")
|
package_dir = get_package_share_directory("orbbec_camera")
|
||||||
launch_file_dir = os.path.join(package_dir, "launch")
|
launch_file_dir = os.path.join(package_dir, "examples/benchmark")
|
||||||
|
|
||||||
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
||||||
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ def generate_launch_description():
|
|||||||
condition=UnlessCondition(attach_to_shared_component_container_arg)
|
condition=UnlessCondition(attach_to_shared_component_container_arg)
|
||||||
)
|
)
|
||||||
return [
|
return [
|
||||||
# orbbec_container,
|
orbbec_container,
|
||||||
LoadComposableNodes(
|
LoadComposableNodes(
|
||||||
target_container=component_container_name_arg,
|
target_container=component_container_name_arg,
|
||||||
composable_node_descriptions=[
|
composable_node_descriptions=[
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def load_parameters(context, args):
|
|||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
# Include launch files
|
# Include launch files
|
||||||
package_dir = get_package_share_directory("orbbec_camera")
|
package_dir = get_package_share_directory("orbbec_camera")
|
||||||
launch_file_dir = os.path.join(package_dir, "launch")
|
launch_file_dir = os.path.join(package_dir, "examples/lower_cpu_usage")
|
||||||
|
|
||||||
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
attach_to_shared_component_container_arg = LaunchConfiguration('attach_to_shared_component_container', default=False)
|
||||||
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
component_container_name_arg = LaunchConfiguration('component_container_name', default='shared_orbbec_container')
|
||||||
@@ -66,7 +66,7 @@ def generate_launch_description():
|
|||||||
condition=UnlessCondition(attach_to_shared_component_container_arg),
|
condition=UnlessCondition(attach_to_shared_component_container_arg),
|
||||||
)
|
)
|
||||||
|
|
||||||
attach_to_shared_component_container_arg = TextSubstitution(text="true")
|
|
||||||
|
|
||||||
launch1_include = IncludeLaunchDescription(
|
launch1_include = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource(
|
PythonLaunchDescriptionSource(
|
||||||
@@ -123,19 +123,19 @@ def generate_launch_description():
|
|||||||
|
|
||||||
delayed_left_camera = TimerAction(
|
delayed_left_camera = TimerAction(
|
||||||
period=2.0,
|
period=2.0,
|
||||||
actions=args+[launch1_include],
|
actions=[launch1_include],
|
||||||
)
|
)
|
||||||
delayed_right_camera = TimerAction(
|
delayed_right_camera = TimerAction(
|
||||||
period=4.0,
|
period=4.0,
|
||||||
actions=args+[launch2_include],
|
actions=[launch2_include],
|
||||||
)
|
)
|
||||||
delayed_rear_camera = TimerAction(
|
delayed_rear_camera = TimerAction(
|
||||||
period=6.0,
|
period=6.0,
|
||||||
actions=args+[launch3_include],
|
actions=[launch3_include],
|
||||||
)
|
)
|
||||||
delayed_front_camera = TimerAction(
|
delayed_front_camera = TimerAction(
|
||||||
period=8.0,
|
period=8.0,
|
||||||
actions=args+[launch4_include],
|
actions=[launch4_include],
|
||||||
)
|
)
|
||||||
ld = LaunchDescription(
|
ld = LaunchDescription(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user