diff --git a/.gitignore b/.gitignore index 823387d..b240f1e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,10 @@ CMakeLists.txt.user srv/_*.py *.pcd *.pyc +__pycache__/ +.pytest_cache/ +.mypy_cache/ +*.egg-info/ qtcreator-* *.user @@ -37,4 +41,3 @@ AMENT_IGNORE # Built Visual Studio Code Extensions *.vsix - diff --git a/README.md b/README.md index 5f2e5df..fdcb0fa 100755 --- a/README.md +++ b/README.md @@ -132,13 +132,6 @@ ros2 launch xr_rm_bringup arm_debug.launch.py arm:=both use_mock:=false ros2 launch xr_rm_bringup dual_arm_realman.launch.py move_to_initial_pose_on_connect:=true ``` -单臂入口仍保留,默认按右臂配置: - -```bash -ros2 launch xr_rm_bringup single_arm_mock.launch.py arm:=right -ros2 launch xr_rm_bringup single_arm_realman.launch.py arm:=right robot_ip:=192.168.192.19 -``` - ## UDP JSON 格式 单个手柄数据: diff --git a/xr_rm_bringup/config/single_arm_rm75.yaml b/xr_rm_bringup/config/single_arm_rm75.yaml deleted file mode 100755 index f66e5b9..0000000 --- a/xr_rm_bringup/config/single_arm_rm75.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# 单臂真机 RM75 入口配置。 -# 默认按最新 acDual-arm 配置中的右臂参数运行,便于先单独验证右臂方向和急停。 - -single_arm_velocity_teleop: - ros__parameters: - arm_name: right_rm75 - controller_topic: /xr/right_controller - control_rate_hz: 50.0 - command_timeout_sec: 0.12 - - scale: 0.75 - kp_linear: 2.0 - deadband_m: 0.002 - low_pass_alpha: 0.35 - max_linear_speed: 0.04 - enable_position_axes: [true, true, true] - - workspace_min: [-0.70, -0.60, 0.10] - workspace_max: [0.50, 0.40, 0.70] - cyl_radius_limit: [0.20, 0.60] - low_z_threshold: 0.20 - low_z_min_radius: 0.21 - - # 右臂 PICO/OpenXR 相对位移到 RM75 base 坐标的初始映射: - # 机器人位移增量 = [手柄y, -手柄z, -手柄x]。 - xr_to_robot_matrix: [0.0, 1.0, 0.0, - 0.0, 0.0, -1.0, - -1.0, 0.0, 0.0] - - use_mock: false - mock_initial_pose: [0.2663, -0.2606, 0.1027, 3.0330, 0.0000, 1.0910] - robot_ip: 192.168.192.19 - robot_port: 8080 - avoid_singularity: 1 - frame_type: 1 - follow: false - configure_safety_limits: true - max_line_speed: 1.0 - max_angular_speed: 1.5 - max_line_acc: 1.0 - max_angular_acc: 2.0 - joint_max_speed: 180.0 - joint_max_acc: 180.0 - move_to_initial_pose_on_connect: false - initial_joint_pose: [-25.60, 34.09, -19.55, 71.59, 16.97, 80.98, 59.67] - initial_tcp_pose: [0.2663, -0.2606, 0.1027, 3.0330, 0.0000, 1.0910] - init_move_speed: 20 - debug_topic_prefix: /xr_rm diff --git a/xr_rm_bringup/launch/single_arm_mock.launch.py b/xr_rm_bringup/launch/single_arm_mock.launch.py deleted file mode 100755 index d99be86..0000000 --- a/xr_rm_bringup/launch/single_arm_mock.launch.py +++ /dev/null @@ -1,28 +0,0 @@ -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription -from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch.substitutions import LaunchConfiguration, PathJoinSubstitution -from launch_ros.substitutions import FindPackageShare - - -def generate_launch_description() -> LaunchDescription: - arm_debug_launch = PathJoinSubstitution([ - FindPackageShare("xr_rm_bringup"), - "launch", - "arm_debug.launch.py", - ]) - - return LaunchDescription([ - DeclareLaunchArgument("arm", default_value="right"), - DeclareLaunchArgument("udp_host", default_value="0.0.0.0"), - DeclareLaunchArgument("udp_port", default_value="15000"), - IncludeLaunchDescription( - PythonLaunchDescriptionSource(arm_debug_launch), - launch_arguments={ - "arm": LaunchConfiguration("arm"), - "use_mock": "true", - "udp_host": LaunchConfiguration("udp_host"), - "udp_port": LaunchConfiguration("udp_port"), - }.items(), - ), - ]) diff --git a/xr_rm_bringup/launch/single_arm_realman.launch.py b/xr_rm_bringup/launch/single_arm_realman.launch.py deleted file mode 100755 index 1c58ee6..0000000 --- a/xr_rm_bringup/launch/single_arm_realman.launch.py +++ /dev/null @@ -1,37 +0,0 @@ -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription -from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch.substitutions import LaunchConfiguration, PathJoinSubstitution -from launch_ros.substitutions import FindPackageShare - - -def generate_launch_description() -> LaunchDescription: - arm_debug_launch = PathJoinSubstitution([ - FindPackageShare("xr_rm_bringup"), - "launch", - "arm_debug.launch.py", - ]) - - return LaunchDescription([ - DeclareLaunchArgument("arm", default_value="right"), - DeclareLaunchArgument("udp_host", default_value="0.0.0.0"), - DeclareLaunchArgument("udp_port", default_value="15000"), - DeclareLaunchArgument("left_robot_ip", default_value="192.168.192.18"), - # 兼容旧命令:robot_ip 仍作为右臂 IP 覆盖入口。 - DeclareLaunchArgument("robot_ip", default_value="192.168.192.19"), - DeclareLaunchArgument("robot_port", default_value="8080"), - DeclareLaunchArgument("move_to_initial_pose_on_connect", default_value="false"), - IncludeLaunchDescription( - PythonLaunchDescriptionSource(arm_debug_launch), - launch_arguments={ - "arm": LaunchConfiguration("arm"), - "use_mock": "false", - "udp_host": LaunchConfiguration("udp_host"), - "udp_port": LaunchConfiguration("udp_port"), - "left_robot_ip": LaunchConfiguration("left_robot_ip"), - "right_robot_ip": LaunchConfiguration("robot_ip"), - "robot_port": LaunchConfiguration("robot_port"), - "move_to_initial_pose_on_connect": LaunchConfiguration("move_to_initial_pose_on_connect"), - }.items(), - ), - ]) diff --git a/xr_rm_teleop/config/single_arm.yaml b/xr_rm_teleop/config/single_arm.yaml deleted file mode 100755 index 82b8afd..0000000 --- a/xr_rm_teleop/config/single_arm.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# 单臂模拟/默认配置。 -# 默认按最新 acDual-arm 配置中的右臂参数运行,使模拟和真机单臂测试使用同一套坐标约定。 - -single_arm_velocity_teleop: - ros__parameters: - arm_name: right_rm75 - controller_topic: /xr/right_controller - control_rate_hz: 50.0 - command_timeout_sec: 0.12 - - scale: 0.75 - kp_linear: 2.0 - deadband_m: 0.002 - low_pass_alpha: 0.35 - max_linear_speed: 0.04 - enable_position_axes: [true, true, true] - - workspace_min: [-0.70, -0.60, 0.10] - workspace_max: [0.50, 0.40, 0.70] - cyl_radius_limit: [0.20, 0.60] - low_z_threshold: 0.20 - low_z_min_radius: 0.21 - - # 右臂 PICO/OpenXR 相对位移到 RM75 base 坐标的初始映射: - # 机器人位移增量 = [手柄y, -手柄z, -手柄x]。 - xr_to_robot_matrix: [0.0, 1.0, 0.0, - 0.0, 0.0, -1.0, - -1.0, 0.0, 0.0] - - use_mock: true - mock_initial_pose: [0.2663, -0.2606, 0.1027, 3.0330, 0.0000, 1.0910] - - robot_ip: 192.168.192.19 - robot_port: 8080 - avoid_singularity: 1 - frame_type: 1 - follow: false - configure_safety_limits: true - max_line_speed: 1.0 - max_angular_speed: 1.5 - max_line_acc: 1.0 - max_angular_acc: 2.0 - joint_max_speed: 180.0 - joint_max_acc: 180.0 - move_to_initial_pose_on_connect: false - initial_joint_pose: [-25.60, 34.09, -19.55, 71.59, 16.97, 80.98, 59.67] - initial_tcp_pose: [0.2663, -0.2606, 0.1027, 3.0330, 0.0000, 1.0910] - init_move_speed: 20 - debug_topic_prefix: /xr_rm diff --git a/xr_rm_teleop/setup.py b/xr_rm_teleop/setup.py index d0fe314..0e61bc5 100755 --- a/xr_rm_teleop/setup.py +++ b/xr_rm_teleop/setup.py @@ -1,4 +1,3 @@ -from glob import glob from setuptools import setup package_name = "xr_rm_teleop" @@ -10,7 +9,6 @@ setup( data_files=[ ("share/ament_index/resource_index/packages", [f"resource/{package_name}"]), (f"share/{package_name}", ["package.xml"]), - (f"share/{package_name}/config", glob("config/*.yaml")), ], install_requires=["setuptools"], zip_safe=True,