You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.9 KiB
Python

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import (
PathJoinSubstitution,
LaunchConfiguration,
TextSubstitution,
)
from launch_ros.substitutions import FindPackageShare
from launch_ros.actions import Node
from launch_ros.descriptions import ParameterFile
def generate_launch_description():
pkg_unity_robot_controller = FindPackageShare(package="").find("unity_robot_controller")
# Launch arguments
launch_args = [
DeclareLaunchArgument(
"use_sim_time",
description="Use clock from simulation",
default_value="True",
),
DeclareLaunchArgument(
"namespace", default_value="sirius_bot", description="Top-level namespace"
),
]
base_gesture_control_node = Node(
package="unity_robot_controller",
executable="base_gesture_control_node",
name="base_gesture_control",
namespace=LaunchConfiguration("namespace"),
output="both",
parameters=[
{"fire_ext_max_capacity": 100},
],
remappings=[
('image', '/camera_node/image_raw')
]
)
camera_node = Node(
package='camera_ros',
executable='camera_node',
name='camera_node',
#namespace='camera',
output='screen',
parameters=[{
# Camera selection index (0 for the first detected libcamera device)
'camera': 0,
# Image streams configuration
'width': 640,
'height': 480,
'frame_rate': 10.0,
# Available options depend on your camera (e.g., 'sensor', 'video', 'still')
'role': 'video',
}]
)
return LaunchDescription(
launch_args
+ [
base_gesture_control_node,
camera_node
]
)