forked from YikaiFu-cart/acRealman_xr
initial
This commit is contained in:
55
xr_rm_bringup/launch/dual_arm_mock.launch.py
Executable file
55
xr_rm_bringup/launch/dual_arm_mock.launch.py
Executable file
@ -0,0 +1,55 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description() -> LaunchDescription:
|
||||
config_file = PathJoinSubstitution([
|
||||
FindPackageShare("xr_rm_bringup"),
|
||||
"config",
|
||||
"dual_arm_rm75.yaml",
|
||||
])
|
||||
|
||||
return LaunchDescription([
|
||||
DeclareLaunchArgument("udp_host", default_value="0.0.0.0"),
|
||||
DeclareLaunchArgument("udp_port", default_value="15000"),
|
||||
# 接收 PICO/XR 侧 UDP 数据,并按左右手字段分发到对应手柄话题。
|
||||
Node(
|
||||
package="xr_rm_input",
|
||||
executable="udp_controller_receiver",
|
||||
name="udp_controller_receiver",
|
||||
output="screen",
|
||||
parameters=[{
|
||||
"udp_host": LaunchConfiguration("udp_host"),
|
||||
"udp_port": LaunchConfiguration("udp_port"),
|
||||
"left_topic": "/xr/left_controller",
|
||||
"right_topic": "/xr/right_controller",
|
||||
}],
|
||||
),
|
||||
# 左臂模拟节点:不连接真实 RM75,只积分速度命令用于验证坐标方向。
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="left_arm_teleop",
|
||||
output="screen",
|
||||
parameters=[config_file, {"use_mock": True}],
|
||||
),
|
||||
# 右臂模拟节点:与左臂共用同一配置文件,但读取右手柄话题。
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="right_arm_teleop",
|
||||
output="screen",
|
||||
parameters=[config_file, {"use_mock": True}],
|
||||
),
|
||||
# 右手扳机键到 OmniPicker 归一化力控指令的桥接,模拟阶段用于检查话题输出。
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="gripper_trigger_bridge",
|
||||
name="right_omnipicker_trigger_bridge",
|
||||
output="screen",
|
||||
parameters=[config_file],
|
||||
),
|
||||
])
|
||||
69
xr_rm_bringup/launch/dual_arm_realman.launch.py
Executable file
69
xr_rm_bringup/launch/dual_arm_realman.launch.py
Executable file
@ -0,0 +1,69 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description() -> LaunchDescription:
|
||||
config_file = PathJoinSubstitution([
|
||||
FindPackageShare("xr_rm_bringup"),
|
||||
"config",
|
||||
LaunchConfiguration("robot_config"),
|
||||
])
|
||||
|
||||
return LaunchDescription([
|
||||
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"),
|
||||
DeclareLaunchArgument("right_robot_ip", default_value="192.168.192.19"),
|
||||
DeclareLaunchArgument("robot_port", default_value="8080"),
|
||||
DeclareLaunchArgument("robot_config", default_value="dual_arm_rm75.yaml"),
|
||||
Node(
|
||||
package="xr_rm_input",
|
||||
executable="udp_controller_receiver",
|
||||
name="udp_controller_receiver",
|
||||
output="screen",
|
||||
parameters=[{
|
||||
"udp_host": LaunchConfiguration("udp_host"),
|
||||
"udp_port": LaunchConfiguration("udp_port"),
|
||||
"left_topic": "/xr/left_controller",
|
||||
"right_topic": "/xr/right_controller",
|
||||
}],
|
||||
),
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="left_arm_teleop",
|
||||
output="screen",
|
||||
parameters=[
|
||||
config_file,
|
||||
{
|
||||
"use_mock": False,
|
||||
"robot_ip": LaunchConfiguration("left_robot_ip"),
|
||||
"robot_port": LaunchConfiguration("robot_port"),
|
||||
},
|
||||
],
|
||||
),
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="right_arm_teleop",
|
||||
output="screen",
|
||||
parameters=[
|
||||
config_file,
|
||||
{
|
||||
"use_mock": False,
|
||||
"robot_ip": LaunchConfiguration("right_robot_ip"),
|
||||
"robot_port": LaunchConfiguration("robot_port"),
|
||||
},
|
||||
],
|
||||
),
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="gripper_trigger_bridge",
|
||||
name="right_omnipicker_trigger_bridge",
|
||||
output="screen",
|
||||
parameters=[config_file],
|
||||
),
|
||||
])
|
||||
36
xr_rm_bringup/launch/single_arm_mock.launch.py
Executable file
36
xr_rm_bringup/launch/single_arm_mock.launch.py
Executable file
@ -0,0 +1,36 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description() -> LaunchDescription:
|
||||
config_file = PathJoinSubstitution([
|
||||
FindPackageShare("xr_rm_teleop"),
|
||||
"config",
|
||||
"single_arm.yaml",
|
||||
])
|
||||
|
||||
return LaunchDescription([
|
||||
DeclareLaunchArgument("udp_host", default_value="0.0.0.0"),
|
||||
DeclareLaunchArgument("udp_port", default_value="15000"),
|
||||
Node(
|
||||
package="xr_rm_input",
|
||||
executable="udp_controller_receiver",
|
||||
name="udp_controller_receiver",
|
||||
output="screen",
|
||||
parameters=[{
|
||||
"udp_host": LaunchConfiguration("udp_host"),
|
||||
"udp_port": LaunchConfiguration("udp_port"),
|
||||
"topic": "/xr/right_controller",
|
||||
}],
|
||||
),
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="single_arm_velocity_teleop",
|
||||
output="screen",
|
||||
parameters=[config_file, {"use_mock": True}],
|
||||
),
|
||||
])
|
||||
46
xr_rm_bringup/launch/single_arm_realman.launch.py
Executable file
46
xr_rm_bringup/launch/single_arm_realman.launch.py
Executable file
@ -0,0 +1,46 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description() -> LaunchDescription:
|
||||
config_file = PathJoinSubstitution([
|
||||
FindPackageShare("xr_rm_bringup"),
|
||||
"config",
|
||||
LaunchConfiguration("robot_config"),
|
||||
])
|
||||
|
||||
return LaunchDescription([
|
||||
DeclareLaunchArgument("udp_host", default_value="0.0.0.0"),
|
||||
DeclareLaunchArgument("udp_port", default_value="15000"),
|
||||
DeclareLaunchArgument("robot_ip", default_value="192.168.192.19"),
|
||||
DeclareLaunchArgument("robot_port", default_value="8080"),
|
||||
DeclareLaunchArgument("robot_config", default_value="single_arm_rm75.yaml"),
|
||||
Node(
|
||||
package="xr_rm_input",
|
||||
executable="udp_controller_receiver",
|
||||
name="udp_controller_receiver",
|
||||
output="screen",
|
||||
parameters=[{
|
||||
"udp_host": LaunchConfiguration("udp_host"),
|
||||
"udp_port": LaunchConfiguration("udp_port"),
|
||||
"topic": "/xr/right_controller",
|
||||
}],
|
||||
),
|
||||
Node(
|
||||
package="xr_rm_teleop",
|
||||
executable="single_arm_velocity_teleop",
|
||||
name="single_arm_velocity_teleop",
|
||||
output="screen",
|
||||
parameters=[
|
||||
config_file,
|
||||
{
|
||||
"use_mock": False,
|
||||
"robot_ip": LaunchConfiguration("robot_ip"),
|
||||
"robot_port": LaunchConfiguration("robot_port"),
|
||||
},
|
||||
],
|
||||
),
|
||||
])
|
||||
Reference in New Issue
Block a user