Added team configuration to toid_vision launch file
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import launch
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch_ros.actions import ComposableNodeContainer
|
||||
from launch_ros.descriptions import ComposableNode
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
@@ -10,6 +12,12 @@ def generate_launch_description():
|
||||
vision_share = FindPackageShare("").find("toid_vision")
|
||||
camera_info = os.path.join(vision_share, 'config/camera_info.yaml')
|
||||
|
||||
is_blue_arg = DeclareLaunchArgument(
|
||||
name= "is_blue",
|
||||
default_value = "True"
|
||||
)
|
||||
|
||||
is_blue = LaunchConfiguration("is_blue")
|
||||
|
||||
container = ComposableNodeContainer(
|
||||
name='vision_container',
|
||||
@@ -22,7 +30,7 @@ def generate_launch_description():
|
||||
plugin='toid::NutDetector',
|
||||
name='nut_detector',
|
||||
parameters= [{
|
||||
'is_blue': True,
|
||||
'is_blue': is_blue,
|
||||
}]),
|
||||
ComposableNode(
|
||||
package='camera_ros',
|
||||
@@ -41,4 +49,7 @@ def generate_launch_description():
|
||||
output='screen',
|
||||
)
|
||||
|
||||
return launch.LaunchDescription([container])
|
||||
return launch.LaunchDescription([
|
||||
is_blue_arg,
|
||||
container
|
||||
])
|
||||
Reference in New Issue
Block a user