#!/usr/bin/env python3 """Start the HCAN-connected O12 right hand and its safe position GUI.""" from launch import LaunchDescription from launch.actions import IncludeLaunchDescription, TimerAction from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import PathJoinSubstitution from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare def generate_launch_description(): o12_driver = IncludeLaunchDescription( PythonLaunchDescriptionSource( PathJoinSubstitution([ FindPackageShare("omnihand_node"), "launch", "omnihand_pro_2025_node.launch.py", ]) ) ) o12_gui = Node( package="gui_control", executable="gui_control", name="o12_right_gui_control", output="screen", parameters=[{ "hand_type": "right", "hand_joint": "O12", # Commands are coalesced, so dragging a slider sends at most 10 Hz. "topic_hz": 10, "is_arc": False, "topic_prefix": "", }], ) return LaunchDescription([ o12_driver, # Give the CANFD driver a moment to claim and initialise the adapter. TimerAction(period=1.5, actions=[o12_gui]), ])