2026-03-15 15:21:03 -05:00
|
|
|
"""Launch single_person_loc_node in headless mode (no display windows).
|
|
|
|
|
|
|
|
|
|
Publishes 3D keypoint markers to /keypoint_markers without opening any
|
|
|
|
|
OpenCV windows. Useful for running on a server or as part of a larger
|
|
|
|
|
pipeline where visualisation is handled elsewhere.
|
|
|
|
|
"""
|
2026-03-04 15:34:57 -06:00
|
|
|
|
|
|
|
|
import os
|
2026-03-15 21:46:34 -05:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
|
|
|
from _conda_utils import find_conda_python # noqa: E402
|
|
|
|
|
|
2026-03-04 15:34:57 -06:00
|
|
|
from launch import LaunchDescription
|
|
|
|
|
from launch.actions import ExecuteProcess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def generate_launch_description():
|
2026-03-15 21:46:34 -05:00
|
|
|
python_exe = find_conda_python('mmpose')
|
2026-03-04 15:34:57 -06:00
|
|
|
|
2026-03-15 15:53:39 -05:00
|
|
|
node_module = 'tracking_re_id.single_person_loc_node'
|
2026-03-04 15:34:57 -06:00
|
|
|
|
|
|
|
|
return LaunchDescription([
|
|
|
|
|
ExecuteProcess(
|
|
|
|
|
cmd=[
|
|
|
|
|
python_exe, '-m', node_module,
|
|
|
|
|
'--ros-args',
|
|
|
|
|
'-p', 'threshold:=0.3',
|
|
|
|
|
'-p', 'device:=cuda:0',
|
|
|
|
|
'-p', 'max_residual:=0.10',
|
2026-03-15 15:21:03 -05:00
|
|
|
'-p', 'headless:=true',
|
2026-03-04 15:34:57 -06:00
|
|
|
],
|
|
|
|
|
output='screen',
|
2026-03-15 15:21:03 -05:00
|
|
|
env={**os.environ},
|
2026-03-04 15:34:57 -06:00
|
|
|
),
|
|
|
|
|
])
|