Files
hjy 7163663118 add lazy REID in code, better tracking to one target
就是yolo这一帧没检测到目标,因为正常来说前后的detections都是2,他这时候只是1,确实就是没检测到
2026-04-16 21:43:44 +08:00

48 lines
1.7 KiB
Python

# USAGE:
# ros2 launch odin_ros_driver odin1_driver_ros2.launch.py
# ros2 launch odin_ros_driver odin1_reprojection_ros2.launch.py
# ros2 launch odin_ros_driver odin1_ros2.launch.py
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, SetEnvironmentVariable
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
def generate_launch_description():
package_dir = get_package_share_directory('odin_ros_driver')
launch_dir = os.path.join(package_dir, 'launch')
config_file_arg = DeclareLaunchArgument(
'config_file',
default_value=os.path.join(package_dir, 'config', 'control_command.yaml'),
description='Path to the control config YAML file'
)
driver_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_dir, 'odin1_driver_ros2.launch.py')
),
launch_arguments={
'config_file': LaunchConfiguration('config_file')
}.items()
)
reprojection_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_dir, 'odin1_reprojection_ros2.launch.py')
),
launch_arguments={
'config_file': LaunchConfiguration('config_file')
}.items()
)
ld = LaunchDescription()
ld.add_action(SetEnvironmentVariable('RCUTILS_COLORIZED_OUTPUT', '1'))
ld.add_action(config_file_arg)
ld.add_action(driver_launch)
ld.add_action(reprojection_launch)
return ld