config : add touch config
This commit is contained in:
parent
7d230fa50c
commit
4c4f4971f9
31
cmvr-es/config/certs/cmvr-touch-quic-ca-60y.crt
Normal file
31
cmvr-es/config/certs/cmvr-touch-quic-ca-60y.crt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
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
|
||||||
|
SPHUV6dJqbQ=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@ -1,15 +1,15 @@
|
|||||||
# Joint-only minimal configuration; MoveJ follows joint_names order.
|
# Joint-only minimal configuration; MoveJ follows joint_names order.
|
||||||
arm {
|
arm {
|
||||||
robot_arms {
|
robot_arms {
|
||||||
id: "lingkong_mixed_arm"
|
id: "xiaozhao_lingkong_neck"
|
||||||
motor {
|
motor {
|
||||||
motor_system_id: "lingkong_mixed_motors"
|
motor_system_id: "xiaozhao_linkong_motors"
|
||||||
motor_group_ids: "lingkong_mixed_v236"
|
motor_group_ids: "lingkong_mixed_v236"
|
||||||
motor_group_ids: "lingkong_mixed_v238"
|
motor_group_ids: "lingkong_mixed_v238"
|
||||||
dof: 3
|
dof: 3
|
||||||
joint_names: "LINGKONG_MIXED_AXIS_1"
|
joint_names: "neck-joint1"
|
||||||
joint_names: "LINGKONG_MIXED_AXIS_2"
|
joint_names: "neck-joint2"
|
||||||
joint_names: "LINGKONG_MIXED_AXIS_3"
|
joint_names: "neck-joint3"
|
||||||
upd_freq: 50
|
upd_freq: 50
|
||||||
}
|
}
|
||||||
motion {
|
motion {
|
||||||
@ -35,13 +35,13 @@ arm {
|
|||||||
limits {
|
limits {
|
||||||
enable: true
|
enable: true
|
||||||
source: JOINT_LIMIT_SOURCE_CUSTOM
|
source: JOINT_LIMIT_SOURCE_CUSTOM
|
||||||
joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint2-right" q_lb: -0.65 q_ub: 1.5 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint4-right" q_lb: -2.1 q_ub: 0 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint6-right" q_lb: -0.5 q_ub: 0.4 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint7-right" q_lb: -0.70 q_ub: 0.7 qd: 1.0 qdd: 20.0 }
|
||||||
}
|
}
|
||||||
soft_limit {
|
soft_limit {
|
||||||
enable: true
|
enable: true
|
||||||
@ -139,7 +139,7 @@ arm {
|
|||||||
joint_velocity_check {
|
joint_velocity_check {
|
||||||
enable: true
|
enable: true
|
||||||
max_joint_velocity_rad_s: 1.0
|
max_joint_velocity_rad_s: 1.0
|
||||||
max_joint_acceleration_rad_s2: 5.0
|
max_joint_acceleration_rad_s2: 10.0
|
||||||
}
|
}
|
||||||
cartesian_velocity_feasibility_check {
|
cartesian_velocity_feasibility_check {
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
@ -1,20 +1,20 @@
|
|||||||
# Alternative deployment: do not enable together with the original can3 IDs 1/2/3.
|
# Xiaozhao neck on can2: node 1 uses V2.36, nodes 2 and 3 use V2.38.
|
||||||
# Both groups are loaded by the MotorConfig.id below, with unique motor IDs.
|
# Both groups are loaded by the MotorConfig.id below, with unique motor IDs.
|
||||||
motor {
|
motor {
|
||||||
id: "lingkong_mixed_motors"
|
id: "xiaozhao_linkong_motors"
|
||||||
motor_groups {
|
motor_groups {
|
||||||
id: "lingkong_mixed_v236"
|
id: "lingkong_mixed_v236"
|
||||||
bus_type: MOTOR_BUS_CAN
|
bus_type: MOTOR_BUS_CAN
|
||||||
vendor: MOTOR_VENDOR_LINGKONG
|
vendor: MOTOR_VENDOR_LINGKONG
|
||||||
protocol: MOTOR_PROTOCOL_LINGKONG_CAN
|
protocol: MOTOR_PROTOCOL_LINGKONG_CAN
|
||||||
can { channel_id: 3 }
|
can { channel_id: 2 }
|
||||||
motors {
|
motors {
|
||||||
motors {
|
motors {
|
||||||
id: 1
|
id: 1
|
||||||
joint_name: "LINGKONG_MIXED_AXIS_1"
|
joint_name: "neck-joint1"
|
||||||
gear_ratio: 10
|
gear_ratio: 10
|
||||||
limit_q_lb: -3.14
|
limit_q_lb: -2.4
|
||||||
limit_q_ub: 3.14
|
limit_q_ub: -0.4
|
||||||
limit_qd: 10
|
limit_qd: 10
|
||||||
lingkong {
|
lingkong {
|
||||||
response_timeout_ms: 100
|
response_timeout_ms: 100
|
||||||
@ -29,14 +29,14 @@ motor {
|
|||||||
bus_type: MOTOR_BUS_CAN
|
bus_type: MOTOR_BUS_CAN
|
||||||
vendor: MOTOR_VENDOR_LINGKONG
|
vendor: MOTOR_VENDOR_LINGKONG
|
||||||
protocol: MOTOR_PROTOCOL_LINGKONG_CAN_V2_38
|
protocol: MOTOR_PROTOCOL_LINGKONG_CAN_V2_38
|
||||||
can { channel_id: 3 }
|
can { channel_id: 2 }
|
||||||
motors {
|
motors {
|
||||||
motors {
|
motors {
|
||||||
id: 2
|
id: 2
|
||||||
joint_name: "LINGKONG_MIXED_AXIS_2"
|
joint_name: "neck-joint2"
|
||||||
gear_ratio: 10
|
gear_ratio: 10
|
||||||
limit_q_lb: -3.14
|
limit_q_lb: -0.75
|
||||||
limit_q_ub: 3.14
|
limit_q_ub: 0.70
|
||||||
limit_qd: 10
|
limit_qd: 10
|
||||||
lingkong {
|
lingkong {
|
||||||
response_timeout_ms: 100
|
response_timeout_ms: 100
|
||||||
@ -46,10 +46,10 @@ motor {
|
|||||||
}
|
}
|
||||||
motors {
|
motors {
|
||||||
id: 3
|
id: 3
|
||||||
joint_name: "LINGKONG_MIXED_AXIS_3"
|
joint_name: "neck-joint3"
|
||||||
gear_ratio: 10
|
gear_ratio: 10
|
||||||
limit_q_lb: -3.14
|
limit_q_lb: -0.45
|
||||||
limit_q_ub: 3.14
|
limit_q_ub: 0.40
|
||||||
limit_qd: 10
|
limit_qd: 10
|
||||||
lingkong {
|
lingkong {
|
||||||
response_timeout_ms: 100
|
response_timeout_ms: 100
|
||||||
@ -56,13 +56,13 @@ motor {
|
|||||||
joint_limits {
|
joint_limits {
|
||||||
enable: true
|
enable: true
|
||||||
source: JOINT_LIMIT_SOURCE_CUSTOM
|
source: JOINT_LIMIT_SOURCE_CUSTOM
|
||||||
joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint1-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint2-right" q_lb: -0.65 q_ub: 1.5 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint4-right" q_lb: -2.1 q_ub: 0 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint6-right" q_lb: -0.59 q_ub: 0.4 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint7-right" q_lb: -0.70 q_ub: 0.7 qd: 1.0 qdd: 20.0 }
|
||||||
joints { joint_name: "joint1-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint1-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
||||||
joints { joint_name: "joint2-left" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint2-left" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 }
|
||||||
joints { joint_name: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
joints { joint_name: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 }
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
touch {
|
touch {
|
||||||
touches {
|
touches {
|
||||||
id: "paxini_tip_1"
|
id: "paxini_tip"
|
||||||
px_6ax_genx_can {
|
px_6ax_genx_can {
|
||||||
# 系统预先配置 can0 为 1 Mbps;设备以约 2 ms 为目标采读并主动发送有效值,非严格周期。
|
# 系统预先配置 can0 为 1 Mbps;设备以约 2 ms 为目标采读并主动发送有效值,非严格周期。
|
||||||
channel_id: 0
|
channel_id: 1
|
||||||
force_can_id: 0x600
|
force_can_id: 0x600
|
||||||
# 按主机本地接收时间计算的最大有效期;超过此时间无有效报文则报不可用。
|
# 按主机本地接收时间计算的最大有效期;超过此时间无有效报文则报不可用。
|
||||||
max_sample_age_ms: 300
|
max_sample_age_ms: 1000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,35 +6,14 @@ device_manager {
|
|||||||
id: "head_carme"
|
id: "head_carme"
|
||||||
type: DEVICE_TYPE_CAMERA
|
type: DEVICE_TYPE_CAMERA
|
||||||
config_file: "devices/camera/xiaozhao_camera.pb.txt"
|
config_file: "devices/camera/xiaozhao_camera.pb.txt"
|
||||||
enable: false
|
enable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
devices {
|
devices {
|
||||||
id: "right_hand_carme"
|
id: "right_hand_carme"
|
||||||
type: DEVICE_TYPE_CAMERA
|
type: DEVICE_TYPE_CAMERA
|
||||||
config_file: "devices/camera/xiaozhao_camera.pb.txt"
|
config_file: "devices/camera/xiaozhao_camera.pb.txt"
|
||||||
enable: false
|
enable: true
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_hand_cam"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "left_hand_cam"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_hand_ap001"
|
|
||||||
type: DEVICE_TYPE_DEXHAND
|
|
||||||
config_file: "devices/dexhand/dexhand.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
devices {
|
devices {
|
||||||
@ -45,160 +24,12 @@ device_manager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
devices {
|
devices {
|
||||||
id: "hand2"
|
id: "paxini_tip"
|
||||||
type: DEVICE_TYPE_DEXHAND
|
|
||||||
config_file: "devices/dexhand/dexhand.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "paxini_tip_1"
|
|
||||||
type: DEVICE_TYPE_TOUCH
|
type: DEVICE_TYPE_TOUCH
|
||||||
config_file: "devices/touch/touch.pb.txt"
|
config_file: "devices/touch/touch.pb.txt"
|
||||||
enable: false
|
enable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "left_arm_can_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/ti5_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_arm_can_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/ti5_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "head_can_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/ti5_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "waist_can_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/ti5_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_arm_ethercat_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/ethercat_single_arm_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/arm_qp.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "aubo_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/aubo_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "huayan_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/huayan_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "bio_head"
|
|
||||||
type: DEVICE_TYPE_BIO_HEAD_ROBOT
|
|
||||||
config_file: "devices/biohead/bio_head.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "src1100"
|
|
||||||
type: DEVICE_TYPE_AGV
|
|
||||||
config_file: "devices/agv/agv.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "hikvision_cam"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "hikvision_thermal_cam"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "mic1"
|
|
||||||
type: DEVICE_TYPE_MICROPHONE
|
|
||||||
config_file: "devices/microphone/microphone.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "spk1"
|
|
||||||
type: DEVICE_TYPE_SPEAKER
|
|
||||||
config_file: "devices/speaker/speaker.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "real_cam1"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "usb_cam1"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "usb_cam2"
|
|
||||||
type: DEVICE_TYPE_CAMERA
|
|
||||||
config_file: "devices/camera/camera.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "tchl_dual_arm_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/tchl_dual_arm_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "right_tchl_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/tchl_dual_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "left_tchl_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/tchl_dual_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
# 小赵实机双臂共用一个 TCHL EtherCAT 电机组。
|
|
||||||
devices {
|
devices {
|
||||||
id: "xiaozhao_tchl_motors"
|
id: "xiaozhao_tchl_motors"
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
type: DEVICE_TYPE_MOTOR_SYSTEM
|
||||||
@ -206,6 +37,20 @@ device_manager {
|
|||||||
enable: true
|
enable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
devices {
|
||||||
|
id: "xiaozhao_linkong_motors"
|
||||||
|
type: DEVICE_TYPE_MOTOR_SYSTEM
|
||||||
|
config_file: "devices/motor/xiaozhao_linkong_motors.pb.txt"
|
||||||
|
enable: true
|
||||||
|
}
|
||||||
|
|
||||||
|
devices {
|
||||||
|
id: "xiaozhao_lingkong_neck"
|
||||||
|
type: DEVICE_TYPE_ROBOT_ARM
|
||||||
|
config_file: "devices/arm/xiaozhao_lingkong_neck.pb.txt"
|
||||||
|
enable: true
|
||||||
|
}
|
||||||
|
|
||||||
devices {
|
devices {
|
||||||
id: "xiaozhao_tchl_right_arm"
|
id: "xiaozhao_tchl_right_arm"
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
type: DEVICE_TYPE_ROBOT_ARM
|
||||||
@ -220,60 +65,4 @@ device_manager {
|
|||||||
enable: true
|
enable: true
|
||||||
}
|
}
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "tchl_single_axis"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/tchl_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "lingkong_can_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/lingkong_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "lingkong_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/lingkong_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "tchl_joint_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/tchl_multi_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "tchl_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/tchl_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
# Alternative hardware deployment; enable only on the matching device.
|
|
||||||
devices {
|
|
||||||
id: "lingkong_mixed_motors"
|
|
||||||
type: DEVICE_TYPE_MOTOR_SYSTEM
|
|
||||||
config_file: "devices/motor/lingkong_mixed_motors.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "lingkong_mixed_arm"
|
|
||||||
type: DEVICE_TYPE_ROBOT_ARM
|
|
||||||
config_file: "devices/arm/lingkong_mixed_arm.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
|
|
||||||
devices {
|
|
||||||
id: "usb_head"
|
|
||||||
type: DEVICE_TYPE_BIO_HEAD_ROBOT
|
|
||||||
config_file: "devices/biohead/bio_head_usb.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ task_manager {
|
|||||||
type: TASK_TYPE_TOUCH_SCREEN
|
type: TASK_TYPE_TOUCH_SCREEN
|
||||||
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
||||||
control_period_s: 0.001
|
control_period_s: 0.001
|
||||||
config_file: "tasks/touch_screen_task/touch_screen_task_xiaozhao_mujoco.pb.txt"
|
config_file: "tasks/touch_screen_task/touch_screen_task_xiaozhao_real.pb.txt"
|
||||||
enable: false
|
enable: false
|
||||||
}
|
}
|
||||||
tasks {
|
tasks {
|
||||||
@ -15,20 +15,12 @@ task_manager {
|
|||||||
config_file: "tasks/grpc_server_task/grpc_server_task.pb.txt"
|
config_file: "tasks/grpc_server_task/grpc_server_task.pb.txt"
|
||||||
enable: true
|
enable: true
|
||||||
}
|
}
|
||||||
tasks {
|
|
||||||
id: "right_arm_self_collision"
|
|
||||||
type: TASK_TYPE_SELF_COLLISION
|
|
||||||
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
|
||||||
control_period_s: 0.002
|
|
||||||
config_file: "tasks/self_collision_task/self_collision_task.pb.txt"
|
|
||||||
enable: false
|
|
||||||
}
|
|
||||||
# 小赵 MuJoCo 实时自碰撞监控。
|
|
||||||
tasks {
|
tasks {
|
||||||
id: "xiaozhao_left_arm_self_collision"
|
id: "xiaozhao_left_arm_self_collision"
|
||||||
type: TASK_TYPE_SELF_COLLISION
|
type: TASK_TYPE_SELF_COLLISION
|
||||||
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
||||||
control_period_s: 0.002
|
control_period_s: 0.02
|
||||||
config_file: "tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt"
|
config_file: "tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt"
|
||||||
enable: false
|
enable: false
|
||||||
}
|
}
|
||||||
@ -36,7 +28,7 @@ task_manager {
|
|||||||
id: "xiaozhao_right_arm_self_collision"
|
id: "xiaozhao_right_arm_self_collision"
|
||||||
type: TASK_TYPE_SELF_COLLISION
|
type: TASK_TYPE_SELF_COLLISION
|
||||||
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
run_mode: TASK_RUN_MODE_PERIODIC_STEP
|
||||||
control_period_s: 0.002
|
control_period_s: 0.02
|
||||||
config_file: "tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt"
|
config_file: "tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt"
|
||||||
enable: false
|
enable: false
|
||||||
}
|
}
|
||||||
@ -45,6 +37,6 @@ task_manager {
|
|||||||
type: TASK_TYPE_QUIC_EDGE
|
type: TASK_TYPE_QUIC_EDGE
|
||||||
run_mode: TASK_RUN_MODE_BLOCKING_SERVICE
|
run_mode: TASK_RUN_MODE_BLOCKING_SERVICE
|
||||||
config_file: "tasks/quic_edge_task/quic_edge_task.pb.txt"
|
config_file: "tasks/quic_edge_task/quic_edge_task.pb.txt"
|
||||||
enable: false
|
enable: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,11 +3,11 @@ quic_edge {
|
|||||||
|
|
||||||
# Task enablement is controlled by manager/task_manager.pb.txt. Configure a
|
# Task enablement is controlled by manager/task_manager.pb.txt. Configure a
|
||||||
# reachable QUIC Gateway and TLS policy before enabling the task there.
|
# reachable QUIC Gateway and TLS policy before enabling the task there.
|
||||||
server_host: "192.168.0.222"
|
server_host: "192.168.1.222"
|
||||||
server_port: 4433
|
server_port: 4433
|
||||||
alpn: "cmvr-quic-edge/1"
|
alpn: "cmvr-quic-edge/1"
|
||||||
node_id: "cmvr-edge"
|
node_id: "cmvr-edge"
|
||||||
robot_id: "CN-CMVR-MBLRV1-AIMA-20260806-002"
|
robot_id: "CN-CMVR-MBLRV1-CQCVC-20261123-003"
|
||||||
software_version: "0.1"
|
software_version: "0.1"
|
||||||
|
|
||||||
# The existing cmvr-es gRPC server remains the robot-control endpoint. "auto"
|
# The existing cmvr-es gRPC server remains the robot-control endpoint. "auto"
|
||||||
@ -24,8 +24,8 @@ quic_edge {
|
|||||||
control_response_timeout_ms: 1000
|
control_response_timeout_ms: 1000
|
||||||
|
|
||||||
tls {
|
tls {
|
||||||
ca_file: "certs/cmvr-quic-ca.crt"
|
ca_file: "certs/cmvr-touch-quic-ca-60y.crt"
|
||||||
server_name: "192.168.0.222"
|
server_name: "192.168.1.222"
|
||||||
allow_insecure: false
|
allow_insecure: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,17 +44,6 @@ quic_edge {
|
|||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
|
||||||
platforms {
|
|
||||||
id: "platform_199"
|
|
||||||
server_host: "192.168.0.199"
|
|
||||||
server_port: 4433
|
|
||||||
enable_media: false
|
|
||||||
tls {
|
|
||||||
ca_file: "certs/cmvr-quic-ca.crt"
|
|
||||||
server_name: "192.168.0.199"
|
|
||||||
allow_insecure: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reconnect {
|
reconnect {
|
||||||
initial_delay_ms: 500
|
initial_delay_ms: 500
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# 小赵右臂独立自碰撞检测:仅本臂 + 固定 base,排除另一臂与活动头部。
|
# 小赵实机右臂独立自碰撞检测:仅本臂 + 固定 base,排除另一臂与活动头部。
|
||||||
self_collision_task {
|
self_collision_task {
|
||||||
id: "xiaozhao_right_arm_self_collision"
|
id: "xiaozhao_right_arm_self_collision"
|
||||||
arm_id: "xiaozhao_mujoco_right_arm"
|
arm_id: "xiaozhao_tchl_right_arm"
|
||||||
|
|
||||||
checker {
|
checker {
|
||||||
urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf"
|
urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf"
|
||||||
|
|||||||
@ -8,7 +8,7 @@ touch_screen_task {
|
|||||||
devices {
|
devices {
|
||||||
arm_id: "right_arm"
|
arm_id: "right_arm"
|
||||||
# devices/touch/touch.pb.txt 中的 PX6AXGenXCan,使用 CAN 合力数据,单位为 N。
|
# devices/touch/touch.pb.txt 中的 PX6AXGenXCan,使用 CAN 合力数据,单位为 N。
|
||||||
touch_id: "paxini_tip_1"
|
touch_id: "paxini_tip"
|
||||||
# 手部相机和外部相机的 DeviceManager ID。
|
# 手部相机和外部相机的 DeviceManager ID。
|
||||||
camera_id: "right_hand_cam"
|
camera_id: "right_hand_cam"
|
||||||
external_camera_id: "left_hand_cam"
|
external_camera_id: "left_hand_cam"
|
||||||
|
|||||||
@ -21,9 +21,9 @@ touch_screen_task {
|
|||||||
head_initialization {
|
head_initialization {
|
||||||
enable: true
|
enable: true
|
||||||
# 头部朝向使外部相机同时看到屏幕和手背的 AprilTag。
|
# 头部朝向使外部相机同时看到屏幕和手背的 AprilTag。
|
||||||
joint_positions { joint_name: "neck-joint1" rad: 0.0 }
|
joint_positions { joint_name: "neck-joint1" rad:-1.055819 }
|
||||||
joint_positions { joint_name: "neck-joint2" rad: -0.1 }
|
joint_positions { joint_name: "neck-joint2" rad: 0.621808 }
|
||||||
joint_positions { joint_name: "neck-joint3" rad: 0.1 }
|
joint_positions { joint_name: "neck-joint3" rad: -0.160239 }
|
||||||
velocity: 0.25
|
velocity: 0.25
|
||||||
acceleration: 0.5
|
acceleration: 0.5
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,127 @@
|
|||||||
|
# 小赵实机右臂触屏任务。启用前核对 AprilTag、T_H_P、目标姿态和 Paxini 零载 Fz。
|
||||||
|
touch_screen_task {
|
||||||
|
id: "touch_screen"
|
||||||
|
debug_draw_coordinate_frames: true
|
||||||
|
debug_coordinate_axis_length_m: 0.02
|
||||||
|
|
||||||
|
devices {
|
||||||
|
arm_id: "xiaozhao_tchl_right_arm"
|
||||||
|
head_id: "xiaozhao_lingkong_neck"
|
||||||
|
touch_id: "paxini_tip"
|
||||||
|
camera_id: "right_hand_carme"
|
||||||
|
external_camera_id: "head_carme"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 参考 MuJoCo 头部姿态。实机确认视野和关节位置后,可启用启动时的头部 MoveJ。
|
||||||
|
head_initialization {
|
||||||
|
enable: false
|
||||||
|
joint_positions { joint_name: "neck-joint1" rad: -1.055819 }
|
||||||
|
joint_positions { joint_name: "neck-joint2" rad: 0.621808 }
|
||||||
|
joint_positions { joint_name: "neck-joint3" rad: -0.160239 }
|
||||||
|
velocity: 0.25 # rad/s
|
||||||
|
acceleration: 1 # rad/s^2
|
||||||
|
}
|
||||||
|
|
||||||
|
# 参考 MuJoCo 右臂姿态。按实机屏幕位置确认初始位后,再选择自动回位时机。
|
||||||
|
initialization {
|
||||||
|
motion_method: USE_MOVEJ
|
||||||
|
before_start: true
|
||||||
|
after_finish: true
|
||||||
|
after_failure: true
|
||||||
|
joint_positions { joint_name: "joint1-right" rad: -0.057569 }
|
||||||
|
joint_positions { joint_name: "joint2-right" rad: 1.044305 }
|
||||||
|
joint_positions { joint_name: "joint3-right" rad: 1.577581 }
|
||||||
|
joint_positions { joint_name: "joint4-right" rad: -1.699421 }
|
||||||
|
joint_positions { joint_name: "joint5-right" rad: -2.574735 }
|
||||||
|
joint_positions { joint_name: "joint6-right" rad: 0.038704 }
|
||||||
|
joint_positions { joint_name: "joint7-right" rad: 0.016973 }
|
||||||
|
velocity: 1 # rad/s
|
||||||
|
acceleration: 1 # rad/s^2
|
||||||
|
jerk: 5.0 # rad/s^3
|
||||||
|
skip_position_tolerance_rad: 0.001
|
||||||
|
skip_velocity_tolerance_rad_s: 0.01
|
||||||
|
}
|
||||||
|
|
||||||
|
perception {
|
||||||
|
# ID 和尺寸沿用 MuJoCo 参考。两张标签的黑框外缘应等长,size_m 不含白边。
|
||||||
|
tags {
|
||||||
|
screen { id: 2 size_m: 0.03 }
|
||||||
|
hand { id: 1 size_m: 0.03 }
|
||||||
|
}
|
||||||
|
# 实机两路相机采集 RGB。触屏像素 u/v 使用手相机 1280×720 原图坐标。
|
||||||
|
hand_camera {
|
||||||
|
depth_policy: TOUCH_SCREEN_DEPTH_POLICY_NONE
|
||||||
|
target_point_method: TOUCH_SCREEN_TARGET_POINT_METHOD_TAG_PLANE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
approach {
|
||||||
|
# MoveP 移至视觉对齐目标,再进入 PBVS。最小间隙检查针对 TCP。
|
||||||
|
enable: true
|
||||||
|
velocity: 0.25 # rad/s
|
||||||
|
acceleration: 0.5 # rad/s^2
|
||||||
|
jerk: 5.0 # rad/s^3
|
||||||
|
timeout_s: 15.0
|
||||||
|
minimum_clearance_m: 0.01
|
||||||
|
}
|
||||||
|
|
||||||
|
alignment {
|
||||||
|
calibration {
|
||||||
|
# T_H_P 为 MJCF 名义安装值,平移单位为米。用实测的手部 Tag H 到 TCP 变换复核。
|
||||||
|
hand_tag_to_tcp {
|
||||||
|
m00: -1.0 m01: 0.0 m02: 0.0 m03: -0.01
|
||||||
|
m10: 0.0 m11: 0.0 m12: 1.0 m13: -0.07
|
||||||
|
m20: 0.0 m21: 1.0 m22: 0.0 m23: -0.13
|
||||||
|
m30: 0.0 m31: 0.0 m32: 0.0 m33: 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pbvs {
|
||||||
|
position_gain { x: 2.0 y: 2.0 z: 1.5 }
|
||||||
|
rotation_gain { x: 1.5 y: 1.5 z: 1.5 }
|
||||||
|
vmax6 { x: 0.02 y: 0.02 z: 0.01 rx: 0.10 ry: 0.10 rz: 0.10 }
|
||||||
|
amax6 { x: 0.10 y: 0.10 z: 0.10 rx: 0.50 ry: 0.50 rz: 0.50 }
|
||||||
|
twist_filter_alpha: 1.0
|
||||||
|
}
|
||||||
|
target {
|
||||||
|
# H 相对 G 的目标姿态(rad)。按实机标签朝向复核,使 Tool -Y 指向屏面。
|
||||||
|
hand_orientation_G { rx: 0.0 ry: 0.0 rz: -3.141592653589793 }
|
||||||
|
# TCP 对齐至点击点沿 G +Z 外移 20 mm 的位置。
|
||||||
|
position_offset_G { x: 0.0 y: 0.0 z: 0.05 }
|
||||||
|
mode: TOUCH_SCREEN_ALIGN_MODE_POSE_AND_POSITION
|
||||||
|
}
|
||||||
|
error_threshold {
|
||||||
|
x: 0.005
|
||||||
|
y: 0.005
|
||||||
|
z: 0.003
|
||||||
|
rx: 0.08726646259971647
|
||||||
|
ry: 0.08726646259971647
|
||||||
|
rz: 0.08726646259971647
|
||||||
|
}
|
||||||
|
stable_frames: 5
|
||||||
|
timeout_s: 30.0
|
||||||
|
pause_when_reached: false
|
||||||
|
}
|
||||||
|
|
||||||
|
touch {
|
||||||
|
speed_l {
|
||||||
|
twist_tool { x: 0.0 y: -0.01 z: 0.0 rx: 0.0 ry: 0.0 rz: 0.0 }
|
||||||
|
acceleration: 0.2 # m/s^2
|
||||||
|
linear_jerk: 2.0 # m/s^3
|
||||||
|
max_distance_m: 0.03
|
||||||
|
}
|
||||||
|
tactile {
|
||||||
|
# Paxini CAN 的有符号 Fz(N)。按实机零载噪声及接触方向核对阈值。
|
||||||
|
criterion: TOUCH_SCREEN_TACTILE_CRITERION_FZ
|
||||||
|
force_threshold: 0.1
|
||||||
|
}
|
||||||
|
dwell_time_s: 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
retract {
|
||||||
|
# 接触后立即沿 Tool +Y 回撤。未触发接触而到达限距时也回撤。
|
||||||
|
twist_tool { x: 0.0 y: 0.02 z: 0.0 rx: 0.0 ry: 0.0 rz: 0.0 }
|
||||||
|
acceleration: 0.2 # m/s^2
|
||||||
|
linear_jerk: 2.0 # m/s^3
|
||||||
|
distance_m: 0.03
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -253,9 +253,6 @@ JointGroupState MotorRobotArm::getJointState() const
|
|||||||
for (const auto& motor : motors) {
|
for (const auto& motor : motors) {
|
||||||
state.current.push_back(static_cast<double>(motor->getCurrent()));
|
state.current.push_back(static_cast<double>(motor->getCurrent()));
|
||||||
}
|
}
|
||||||
if (!motor_manager_ || !motor_manager_->readFeedbacksAtomic(motors, state.position, state.velocity))
|
|
||||||
return {};
|
|
||||||
state.effort.assign(motors.size(), 0.0);
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <chrono>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <future>
|
#include <future>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -138,12 +139,17 @@ namespace cmvr {
|
|||||||
int32_t receive_error_count = 0;
|
int32_t receive_error_count = 0;
|
||||||
const int32_t ERROR_COUNT_MAX = 10;
|
const int32_t ERROR_COUNT_MAX = 10;
|
||||||
auto default_period = 10 * 1000; // 10 ms
|
auto default_period = 10 * 1000; // 10 ms
|
||||||
|
auto* socket_can_client = dynamic_cast<SocketCanClientRaw*>(can_client_);
|
||||||
|
constexpr auto socket_receive_timeout = std::chrono::milliseconds{20};
|
||||||
|
|
||||||
while (IsRunning()) {
|
while (IsRunning()) {
|
||||||
std::vector<CanFrame> buf;
|
std::vector<CanFrame> buf;
|
||||||
int32_t frame_num = MAX_CAN_RECV_FRAME_LEN;
|
int32_t frame_num = MAX_CAN_RECV_FRAME_LEN;
|
||||||
if (can_client_->receive(&buf, &frame_num) !=
|
// Polling with a timeout lets Stop() join even when the bus is idle.
|
||||||
cmvr::msgs::ErrorCode::OK) {
|
const auto result = socket_can_client
|
||||||
|
? socket_can_client->receive(&buf, &frame_num, socket_receive_timeout)
|
||||||
|
: can_client_->receive(&buf, &frame_num);
|
||||||
|
if (result != cmvr::msgs::ErrorCode::OK) {
|
||||||
CMVR_LOG_IF_EVERY_N(ERROR, receive_error_count++ > ERROR_COUNT_MAX,
|
CMVR_LOG_IF_EVERY_N(ERROR, receive_error_count++ > ERROR_COUNT_MAX,
|
||||||
ERROR_COUNT_MAX)
|
ERROR_COUNT_MAX)
|
||||||
<< "Received " << receive_error_count << " error messages.";
|
<< "Received " << receive_error_count << " error messages.";
|
||||||
@ -159,9 +165,10 @@ namespace cmvr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frame_num == 0) {
|
if (frame_num == 0) {
|
||||||
// A bounded receive timeout on a silent bus is normal,
|
// SocketCAN already waited in poll. Back off only for nonblocking clients.
|
||||||
// not a transport error. Return to the stop-flag check.
|
if (!socket_can_client) {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(default_period));
|
std::this_thread::sleep_for(std::chrono::microseconds(default_period));
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -131,7 +131,15 @@ bool LingkongCanProtocol::probe(uint8_t id)
|
|||||||
Status status;
|
Status status;
|
||||||
double q, qd;
|
double q, qd;
|
||||||
// Read-only initialization: no NMT, PDO setup, enabling or ROM writes.
|
// Read-only initialization: no NMT, PDO setup, enabling or ROM writes.
|
||||||
return readStatus(id, status) && !status.isFault() && readFeedback(id, q, qd);
|
if (!readStatus(id, status)) return false;
|
||||||
|
if (status.isFault()) {
|
||||||
|
CMVR_LOG(ERROR) << "[LingkongCanProtocol] drive status rejected initialization: node=" << int(id)
|
||||||
|
<< ", protocol=" << (version_ == V2_38 ? "V2.38" : "V2.36")
|
||||||
|
<< ", motor_state=0x" << std::hex << int(status.motor_state)
|
||||||
|
<< ", error=0x" << status.error << std::dec;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return readFeedback(id, q, qd);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LingkongCanProtocol::setMode(uint8_t id, msgs::RunMode mode)
|
bool LingkongCanProtocol::setMode(uint8_t id, msgs::RunMode mode)
|
||||||
@ -397,8 +405,10 @@ bool LingkongCanProtocol::readFeedback(uint8_t id, double& q, double& qd)
|
|||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||||
// Separate replies, not a simultaneous/atomic hardware sample.
|
// Separate replies, not a simultaneous/atomic hardware sample.
|
||||||
const double position = getQ(id), velocity = getQd(id);
|
const double position = getQ(id);
|
||||||
if (!std::isfinite(position) || !std::isfinite(velocity)) return false;
|
if (!std::isfinite(position)) return false;
|
||||||
|
const double velocity = getQd(id);
|
||||||
|
if (!std::isfinite(velocity)) return false;
|
||||||
q = position;
|
q = position;
|
||||||
qd = velocity;
|
qd = velocity;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -267,7 +267,10 @@ TEST_F(LingkongTest, MissingRepliesNeverReuseOldData) {
|
|||||||
EXPECT_TRUE(std::isnan(protocol->getQ(1)));
|
EXPECT_TRUE(std::isnan(protocol->getQ(1)));
|
||||||
EXPECT_THROW(protocol->torqueOn(1), std::runtime_error);
|
EXPECT_THROW(protocol->torqueOn(1), std::runtime_error);
|
||||||
double q = 42, qd = 43;
|
double q = 42, qd = 43;
|
||||||
|
sent.clear();
|
||||||
EXPECT_FALSE(protocol->readFeedback(1, q, qd));
|
EXPECT_FALSE(protocol->readFeedback(1, q, qd));
|
||||||
|
ASSERT_EQ(sent.size(), 1);
|
||||||
|
EXPECT_EQ(sent.front().data[0], 0x92);
|
||||||
EXPECT_EQ(q, 42); EXPECT_EQ(qd, 43);
|
EXPECT_EQ(q, 42); EXPECT_EQ(qd, 43);
|
||||||
transport_ok = false;
|
transport_ok = false;
|
||||||
EXPECT_FALSE(protocol->quickStop(1));
|
EXPECT_FALSE(protocol->quickStop(1));
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## 配置与协议
|
## 配置与协议
|
||||||
|
|
||||||
`devices/touch/touch.pb.txt` 中的 `paxini_tip_1` 默认使用 CAN:
|
`devices/touch/touch.pb.txt` 中的 `paxini_tip` 默认使用 CAN:
|
||||||
|
|
||||||
```protobuf
|
```protobuf
|
||||||
px_6ax_genx_can {
|
px_6ax_genx_can {
|
||||||
|
|||||||
BIN
docs/can协议 V2.38.pdf
Normal file
BIN
docs/can协议 V2.38.pdf
Normal file
Binary file not shown.
BIN
docs/瓴控电机CAN协议说明 V2.36 (2).pdf
Normal file
BIN
docs/瓴控电机CAN协议说明 V2.36 (2).pdf
Normal file
Binary file not shown.
@ -111,7 +111,7 @@ Python 分块测试与 C++ collision checker 测试覆盖倒角分层、层间
|
|||||||
|
|
||||||
## 在线任务状态
|
## 在线任务状态
|
||||||
|
|
||||||
两套配置分别绑定 `xiaozhao_mujoco_left_arm`、`xiaozhao_mujoco_right_arm`:
|
左臂配置绑定仿真 `xiaozhao_mujoco_left_arm`,右臂配置绑定实机 `xiaozhao_tchl_right_arm`。
|
||||||
|
|
||||||
- `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt`
|
- `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_left.pb.txt`
|
||||||
- `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt`
|
- `cmvr-es/config/tasks/self_collision_task/self_collision_task_xiaozhao_right.pb.txt`
|
||||||
|
|||||||
@ -6,6 +6,9 @@ usage() {
|
|||||||
Usage:
|
Usage:
|
||||||
sudo scripts/ethercat/stop_ethercat.sh [iface] [--restore-network]
|
sudo scripts/ethercat/stop_ethercat.sh [iface] [--restore-network]
|
||||||
|
|
||||||
|
Before unloading the drivers, the script asks cmvr_es processes using an
|
||||||
|
EtherCAT master to exit. Suspended instances are resumed to finish shutdown.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
sudo scripts/ethercat/stop_ethercat.sh eno1
|
sudo scripts/ethercat/stop_ethercat.sh eno1
|
||||||
sudo scripts/ethercat/stop_ethercat.sh eno1 --restore-network
|
sudo scripts/ethercat/stop_ethercat.sh eno1 --restore-network
|
||||||
@ -56,6 +59,43 @@ if [[ ! -x "${ETHERCATCTL}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
stop_cmvr_clients() {
|
||||||
|
(( $# > 0 )) || return 0
|
||||||
|
if ! command -v fuser >/dev/null; then
|
||||||
|
echo "error: fuser (psmisc) is required to check EtherCAT device usage." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local pid exe deadline
|
||||||
|
local -A seen=()
|
||||||
|
for pid in $(fuser "$@" 2>/dev/null); do
|
||||||
|
[[ -z "${seen[$pid]:-}" ]] || continue
|
||||||
|
seen[$pid]=1
|
||||||
|
exe=$(readlink "/proc/$pid/exe") || continue
|
||||||
|
case "$exe" in
|
||||||
|
*/cmvr_es|*/'cmvr_es (deleted)') ;;
|
||||||
|
*) continue ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Requesting shutdown of cmvr_es (PID $pid)..."
|
||||||
|
if kill -TERM "$pid" && [[ $(ps -o state= -p "$pid") == T ]]; then
|
||||||
|
kill -CONT "$pid" || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
deadline=$((SECONDS + 15))
|
||||||
|
while fuser -s "$@"; do
|
||||||
|
if (( SECONDS >= deadline )); then
|
||||||
|
echo "error: EtherCAT devices are still in use after 15s. Current holders:" >&2
|
||||||
|
fuser -v "$@" >&2 || true
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
sleep 0.2
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
stop_cmvr_clients /dev/EtherCAT[0-9]*
|
||||||
"${ETHERCATCTL}" -c "${ETHERCAT_CONF}" stop
|
"${ETHERCATCTL}" -c "${ETHERCAT_CONF}" stop
|
||||||
|
|
||||||
if [[ "${RESTORE_NETWORK}" == "true" ]]; then
|
if [[ "${RESTORE_NETWORK}" == "true" ]]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user