Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit. On branch master Your branch is ahead of 'origin/master' by 24 commits. (use "git push" to publish your local commits) Changes to be committed: modified: src/my_robot_bringup/launch/master_launch.py deleted: src/obs.zip modified: src/vlm_detect/launch/vlm_detect.launch.py
This commit is contained in:
@@ -104,9 +104,9 @@ def generate_launch_description():
|
|||||||
)
|
)
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
# 阶段 3: TTS 语音播报服务 + 二维码播报桥接 (t=3s)
|
# 阶段 3: TTS 语音播报服务 (t=3s)
|
||||||
# tts_server: Piper 离线 TTS + espeak 降级,提供 /tts/speak 服务
|
# tts_server: Piper 离线 TTS + espeak 降级,提供 /tts/speak 服务
|
||||||
# qr_tts_bridge: 订阅 qr_results,调用 /tts/speak
|
# qr_detect / vlm_node 直接调用 /tts/speak
|
||||||
# ================================================================
|
# ================================================================
|
||||||
tts_server = Node(
|
tts_server = Node(
|
||||||
package='vlm_detect',
|
package='vlm_detect',
|
||||||
@@ -120,18 +120,10 @@ def generate_launch_description():
|
|||||||
}],
|
}],
|
||||||
)
|
)
|
||||||
|
|
||||||
qr_tts_bridge = Node(
|
|
||||||
package='vlm_detect',
|
|
||||||
executable='qr_tts_bridge',
|
|
||||||
name='qr_tts_bridge',
|
|
||||||
output='screen',
|
|
||||||
condition=IfCondition(use_tts),
|
|
||||||
)
|
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
# 阶段 4: USB 摄像头 + 二维码识别 (t=4s)
|
# 阶段 4: USB 摄像头 + 二维码识别 (t=4s)
|
||||||
# car_usb_cam: 使用 hobot_usb_cam 驱动 USB 摄像头,发布 /image_raw
|
# car_usb_cam: 使用 hobot_usb_cam 驱动 USB 摄像头,发布 /image (CompressedImage)
|
||||||
# qr_detect: 订阅 /image_raw,识别二维码,发布 qr_results
|
# qr_detect: 自动识别 /image 类型,识别二维码,发布 qr_results
|
||||||
# ================================================================
|
# ================================================================
|
||||||
usb_camera = IncludeLaunchDescription(
|
usb_camera = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource([
|
PythonLaunchDescriptionSource([
|
||||||
@@ -153,7 +145,7 @@ def generate_launch_description():
|
|||||||
name='qr_detect',
|
name='qr_detect',
|
||||||
output='screen',
|
output='screen',
|
||||||
condition=IfCondition(use_qr),
|
condition=IfCondition(use_qr),
|
||||||
parameters=[{'image_topic': '/image_raw'}],
|
parameters=[{'image_topic': '/image'}],
|
||||||
)
|
)
|
||||||
|
|
||||||
# ================================================================
|
# ================================================================
|
||||||
@@ -227,7 +219,7 @@ def generate_launch_description():
|
|||||||
# ================================================================
|
# ================================================================
|
||||||
# 阶段 8: VLM 图生文 (t=11s)
|
# 阶段 8: VLM 图生文 (t=11s)
|
||||||
# vlm_node 内部自带 TTS 服务客户端,识别完自动调用 /tts/speak
|
# vlm_node 内部自带 TTS 服务客户端,识别完自动调用 /tts/speak
|
||||||
# 注意: TTS 服务和桥接已在阶段 3 启动,这里只启动 vlm_node
|
# 注意: TTS 服务已在阶段 3 启动,这里只启动 vlm_node
|
||||||
# ================================================================
|
# ================================================================
|
||||||
vlm_launch = IncludeLaunchDescription(
|
vlm_launch = IncludeLaunchDescription(
|
||||||
PythonLaunchDescriptionSource([
|
PythonLaunchDescriptionSource([
|
||||||
@@ -237,7 +229,7 @@ def generate_launch_description():
|
|||||||
launch_arguments={
|
launch_arguments={
|
||||||
'vlm_host': vlm_host,
|
'vlm_host': vlm_host,
|
||||||
'use_tts': 'false', # tts_server 已在阶段 3 启动
|
'use_tts': 'false', # tts_server 已在阶段 3 启动
|
||||||
'use_qr_tts': 'false', # qr_tts_bridge 已在阶段 3 启动
|
'use_qr_tts': 'false', # QR 播报已集成到 qr_detect
|
||||||
}.items(),
|
}.items(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -254,7 +246,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument('use_qr', default_value='true',
|
DeclareLaunchArgument('use_qr', default_value='true',
|
||||||
description='USB 摄像头 + 二维码识别'),
|
description='USB 摄像头 + 二维码识别'),
|
||||||
DeclareLaunchArgument('use_tts', default_value='true',
|
DeclareLaunchArgument('use_tts', default_value='true',
|
||||||
description='TTS 语音播报服务 + 二维码播报桥接'),
|
description='TTS 语音播报服务'),
|
||||||
DeclareLaunchArgument('use_obstacle', default_value='true',
|
DeclareLaunchArgument('use_obstacle', default_value='true',
|
||||||
description='障碍物检测'),
|
description='障碍物检测'),
|
||||||
DeclareLaunchArgument('use_planner', default_value='true',
|
DeclareLaunchArgument('use_planner', default_value='true',
|
||||||
@@ -305,11 +297,10 @@ def generate_launch_description():
|
|||||||
lidar_launch,
|
lidar_launch,
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# t=3s: TTS 服务 + 二维码播报桥接
|
# t=3s: TTS 服务
|
||||||
TimerAction(period=3.0, actions=[
|
TimerAction(period=3.0, actions=[
|
||||||
LogInfo(msg='[3/8] Starting TTS Server + QR-TTS Bridge ...'),
|
LogInfo(msg='[3/8] Starting TTS Server ...'),
|
||||||
tts_server,
|
tts_server,
|
||||||
qr_tts_bridge,
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# t=4s: USB 摄像头 + 二维码识别
|
# t=4s: USB 摄像头 + 二维码识别
|
||||||
|
|||||||
BIN
src/obs.zip
BIN
src/obs.zip
Binary file not shown.
@@ -2,13 +2,13 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
vlm_detect 启动文件
|
vlm_detect 启动文件
|
||||||
同时启动 vlm_node (图生文) + tts_server (语音播报服务) + qr_tts_bridge (二维码播报)
|
同时启动 vlm_node (图生文) + tts_server (语音播报服务)
|
||||||
|
|
||||||
用法:
|
用法:
|
||||||
ros2 launch vlm_detect vlm_detect.launch.py # 默认全部
|
ros2 launch vlm_detect vlm_detect.launch.py # 默认全部
|
||||||
ros2 launch vlm_detect vlm_detect.launch.py vlm_host:=http://... # 指定 VLM 服务地址
|
ros2 launch vlm_detect vlm_detect.launch.py vlm_host:=http://... # 指定 VLM 服务地址
|
||||||
ros2 launch vlm_detect vlm_detect.launch.py use_tts:=false # 关闭语音播报
|
ros2 launch vlm_detect vlm_detect.launch.py use_tts:=false # 关闭语音播报
|
||||||
ros2 launch vlm_detect vlm_detect.launch.py use_qr_tts:=false # 关闭二维码播报桥接
|
ros2 launch vlm_detect vlm_detect.launch.py use_qr_tts:=true # 兼容旧二维码播报桥接
|
||||||
ros2 launch vlm_detect vlm_detect.launch.py use_vlm:=false # 只启动语音服务
|
ros2 launch vlm_detect vlm_detect.launch.py use_vlm:=false # 只启动语音服务
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -55,8 +55,8 @@ def generate_launch_description():
|
|||||||
description='启动 TTS 语音播报服务')
|
description='启动 TTS 语音播报服务')
|
||||||
|
|
||||||
declare_use_qr_tts = DeclareLaunchArgument(
|
declare_use_qr_tts = DeclareLaunchArgument(
|
||||||
'use_qr_tts', default_value='true',
|
'use_qr_tts', default_value='false',
|
||||||
description='启动二维码 → TTS 桥接节点')
|
description='启动旧二维码 → TTS 桥接节点')
|
||||||
|
|
||||||
declare_config_file = DeclareLaunchArgument(
|
declare_config_file = DeclareLaunchArgument(
|
||||||
'config_file',
|
'config_file',
|
||||||
|
|||||||
Reference in New Issue
Block a user