config: disable devices by default and add TCHL dual-arm templates

This commit is contained in:
linbo 2026-11-09 16:13:38 +08:00
parent 02d5141444
commit cf6b07c677
4 changed files with 424 additions and 3 deletions

View File

@ -17,7 +17,7 @@ arm {
tool_frame: "tool0"
username: "aubo"
password: "123456"
auto_enable: true
auto_enable: false
}
}
}

View File

@ -0,0 +1,309 @@
arm {
robot_arms {
id: "right_tchl_arm"
motor {
motor_system_id: "tchl_dual_arm_motors"
motor_group_ids: "tchl_dual_arm_motors"
dof: 7
joint_names: "right_arm_J1"
joint_names: "right_arm_J2"
joint_names: "right_arm_J3"
joint_names: "right_arm_J4"
joint_names: "right_arm_J5"
joint_names: "right_arm_J6"
joint_names: "right_arm_J7"
upd_freq: 1000
buffer_size: 50
default_vel: 1.0
default_acc: 2.0
}
kinematics {
pinocchio_dls_ik_solver {
urdf_path: "model/gen2/robot.urdf"
base_frame_name: "body_link"
flange_frame_name: "arm_link_7_2"
max_iters: 100
pos_eps: 1e-6
rot_eps: 1e-6
damping: 1e-6
joint_limit_policy {
limits {
enable: true
source: JOINT_LIMIT_SOURCE_CUSTOM
joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J2" q_lb: -1.96 q_ub: 2.02 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J4" q_lb: -2.04 q_ub: 1.10 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J6" q_lb: -3.14 q_ub: 0.21 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
}
soft_limit {
enable: true
margin_ratio: 0.01
min_margin_rad: 0.01
}
avoidance {
enable: false
gain: 0.2
margin_ratio: 0.15
max_push: 0.25
}
}
}
}
motion {
move_j {
# MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。
settle_timeout_s: 2.0
# MoveJ 完成时允许的最大关节位置误差,单位为弧度。
settle_position_tolerance_rad: 0.002
# MoveJ 完成时允许的最大关节速度,单位为弧度/秒。
settle_velocity_tolerance_rad_s: 0.02
# 位置和速度连续满足条件的采样次数。
settle_stable_sample_count: 3
toppra_joint_motion_planner {
path_type: TOPPRA_PATH_TYPE_QUINTIC
sample_period_s: 0.001
grid_size: 150
high_grid_size: 300
}
}
move_l {
pinocchio_cartesian_motion_planner {
sample_period_s: 0.001
position_gain: 4.0
rotation_gain: 4.0
line_deviation_check {
enable: true
line_deviation_warn_m: 0.01
line_deviation_stop_m: 0.03
line_direction_warn_deg: 20.0
line_direction_stop_deg: 45.0
line_direction_reset_deg: 10.0
line_check_min_distance_m: 0.01
}
joint_continuity_check {
enable: true
max_joint_delta_rad: 0.05
max_joint_velocity_rad_s: 10.0
max_joint_acceleration_rad_s2: 5000.0
}
cartesian_step_feasibility_check {
enable: true
min_linear_speed_ratio: 0.2
max_linear_direction_deviation_deg: 45.0
min_angular_speed_ratio: 0.2
max_angular_direction_deviation_deg: 45.0
min_desired_linear_speed: 1e-4
min_desired_angular_speed: 1e-4
}
}
}
speed_l {
pinocchio_cartesian_motion_planner {
linear_velocity_max: 0.55
linear_acceleration_max: 5.0
linear_jerk_max: 10.0
angular_velocity_max: 1.0
angular_acceleration_max: 5.0
angular_jerk_max: 12.0
linear_target_replan_threshold: 1e-4
angular_target_replan_threshold: 1e-4
linear_reverse_cos_threshold: -0.8660254037844386
linear_reverse_switch_speed_threshold: 1e-3
enforce_joint_acceleration_limits: true
line_deviation_check {
enable: true
line_deviation_warn_m: 0.01
line_deviation_stop_m: 0.03
line_direction_warn_deg: 20.0
line_direction_stop_deg: 45.0
line_direction_reset_deg: 10.0
line_check_min_distance_m: 0.01
}
joint_velocity_check {
enable: true
max_joint_velocity_rad_s: 30.0
max_joint_acceleration_rad_s2: 10000.0
}
cartesian_velocity_feasibility_check {
enable: true
min_linear_speed_ratio: 0.2
max_linear_direction_deviation_deg: 5.0
min_angular_speed_ratio: 0.2
max_angular_direction_deviation_deg: 5.0
min_desired_linear_speed: 1e-4
min_desired_angular_speed: 1e-4
}
}
speed_l_controller {
cartesian_velocity_controller {
control_period_s: 0.001
stop_twist_norm: 1e-9
stop_command_velocity_norm: 1e-3
stop_measured_velocity_norm: 1e-2
stop_acceleration: 10
# 等待 Cartesian 速度运动停止的最长时间,单位为秒。
stop_timeout_s: 2.0
}
}
}
}
}
robot_arms {
id: "left_tchl_arm"
motor {
motor_system_id: "tchl_dual_arm_motors"
motor_group_ids: "tchl_dual_arm_motors"
dof: 7
joint_names: "left_arm_J1"
joint_names: "left_arm_J2"
joint_names: "left_arm_J3"
joint_names: "left_arm_J4"
joint_names: "left_arm_J5"
joint_names: "left_arm_J6"
joint_names: "left_arm_J7"
upd_freq: 1000
buffer_size: 50
default_vel: 1.0
default_acc: 2.0
}
kinematics {
pinocchio_dls_ik_solver {
urdf_path: "model/gen2/robot.urdf"
base_frame_name: "body_link"
flange_frame_name: "arm_link_7"
max_iters: 100
pos_eps: 1e-6
rot_eps: 1e-6
damping: 1e-6
joint_limit_policy {
limits {
enable: true
source: JOINT_LIMIT_SOURCE_CUSTOM
joints { joint_name: "left_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J2" q_lb: -2.02 q_ub: 1.96 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J4" q_lb: -1.10 q_ub: 2.04 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J6" q_lb: -0.21 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
}
soft_limit {
enable: true
margin_ratio: 0.01
min_margin_rad: 0.01
}
avoidance {
enable: false
gain: 0.2
margin_ratio: 0.15
max_push: 0.25
}
}
}
}
motion {
move_j {
toppra_joint_motion_planner {
path_type: TOPPRA_PATH_TYPE_QUINTIC
sample_period_s: 0.001
grid_size: 150
high_grid_size: 300
}
}
move_l {
pinocchio_cartesian_motion_planner {
sample_period_s: 0.001
position_gain: 4.0
rotation_gain: 4.0
line_deviation_check {
enable: true
line_deviation_warn_m: 0.01
line_deviation_stop_m: 0.03
line_direction_warn_deg: 20.0
line_direction_stop_deg: 45.0
line_direction_reset_deg: 10.0
line_check_min_distance_m: 0.01
}
joint_continuity_check {
enable: true
max_joint_delta_rad: 0.05
max_joint_velocity_rad_s: 10.0
max_joint_acceleration_rad_s2: 5000.0
}
cartesian_step_feasibility_check {
enable: true
min_linear_speed_ratio: 0.2
max_linear_direction_deviation_deg: 45.0
min_angular_speed_ratio: 0.2
max_angular_direction_deviation_deg: 45.0
min_desired_linear_speed: 1e-4
min_desired_angular_speed: 1e-4
}
}
}
speed_l {
pinocchio_cartesian_motion_planner {
linear_velocity_max: 0.55
linear_acceleration_max: 5.0
linear_jerk_max: 10.0
angular_velocity_max: 1.0
angular_acceleration_max: 5.0
angular_jerk_max: 12.0
linear_target_replan_threshold: 1e-4
angular_target_replan_threshold: 1e-4
linear_reverse_cos_threshold: -0.8660254037844386
linear_reverse_switch_speed_threshold: 1e-3
enforce_joint_acceleration_limits: true
line_deviation_check {
enable: true
line_deviation_warn_m: 0.01
line_deviation_stop_m: 0.03
line_direction_warn_deg: 20.0
line_direction_stop_deg: 45.0
line_direction_reset_deg: 10.0
line_check_min_distance_m: 0.01
}
joint_velocity_check {
enable: true
max_joint_velocity_rad_s: 30.0
max_joint_acceleration_rad_s2: 10000.0
}
cartesian_velocity_feasibility_check {
enable: true
min_linear_speed_ratio: 0.2
max_linear_direction_deviation_deg: 5.0
min_angular_speed_ratio: 0.2
max_angular_direction_deviation_deg: 5.0
min_desired_linear_speed: 1e-4
min_desired_angular_speed: 1e-4
}
}
speed_l_controller {
cartesian_velocity_controller {
control_period_s: 0.001
stop_twist_norm: 1e-9
stop_command_velocity_norm: 1e-3
stop_measured_velocity_norm: 1e-2
stop_acceleration: 10
}
}
}
}
}
}

View File

@ -0,0 +1,93 @@
motor {
id: "tchl_dual_arm_motors"
motor_groups {
id: "tchl_dual_arm_motors"
bus_type: MOTOR_BUS_ETHERCAT
vendor: MOTOR_VENDOR_TCHL
protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402
ethercat {
master_index: 0
cycle_us: 1000
slave_op_timeout_ms: 12000
slave_state_poll_period_ms: 10
cia402 {
state_transition_timeout_ms: 1200
velocity_stop_timeout_ms: 2000
status_poll_period_ms: 10
stopped_velocity_tolerance_rad_s: 0.001
}
zero_calibration {
timeout_ms: 2000
poll_period_ms: 10
stable_sample_count: 5
position_tolerance_counts: 10000
stable_delta_counts: 1000
}
dc {
enable: false
reference_motor_id: 1
sync0_cycle_us: 1000
sync0_shift_us: 0
sync_reference_clock_period: 1
assign_activate: 768
sync_monitor_period_ms: 1000
}
slaves { motor_id: 1 alias: 0 position: 1 }
slaves { motor_id: 2 alias: 0 position: 2 }
slaves { motor_id: 3 alias: 0 position: 3 }
slaves { motor_id: 4 alias: 0 position: 4 }
slaves { motor_id: 5 alias: 0 position: 5 }
slaves { motor_id: 6 alias: 0 position: 6 }
slaves { motor_id: 7 alias: 0 position: 7 }
slaves { motor_id: 8 alias: 0 position: 8 }
slaves { motor_id: 9 alias: 0 position: 9 }
slaves { motor_id: 10 alias: 0 position: 10 }
slaves { motor_id: 11 alias: 0 position: 11 }
slaves { motor_id: 12 alias: 0 position: 12 }
slaves { motor_id: 13 alias: 0 position: 13 }
slaves { motor_id: 14 alias: 0 position: 14 }
}
joint_limits {
enable: true
source: JOINT_LIMIT_SOURCE_CUSTOM
joints { joint_name: "right_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J2" q_lb: -1.96 q_ub: 2.02 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J4" q_lb: -2.04 q_ub: 1.10 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J6" q_lb: -3.14 q_ub: 0.21 qd: 5.0 qdd: 10.0 }
joints { joint_name: "right_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J2" q_lb: -2.02 q_ub: 1.96 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J4" q_lb: -1.10 q_ub: 2.04 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J6" q_lb: -0.21 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
joints { joint_name: "left_arm_J7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 }
}
motors {
motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 8 joint_name: "left_arm_J1" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 9 joint_name: "left_arm_J2" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 10 joint_name: "left_arm_J3" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 11 joint_name: "left_arm_J4" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 12 joint_name: "left_arm_J5" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 13 joint_name: "left_arm_J6" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
motors { id: 14 joint_name: "left_arm_J7" encoder_counts_per_rev: 131072 gear_ratio: 101.0 }
}
}
}

View File

@ -237,13 +237,13 @@ device_manager {
id: "lingkong_can_motors"
type: DEVICE_TYPE_MOTOR_SYSTEM
config_file: "devices/motor/lingkong_motors.pb.txt"
enable: true
enable: false
}
devices {
id: "lingkong_arm"
type: DEVICE_TYPE_ROBOT_ARM
config_file: "devices/arm/lingkong_arm.pb.txt"
enable: true
enable: false
}
devices {
id: "tchl_joint_motors"
@ -258,4 +258,23 @@ device_manager {
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
}
}