diff --git a/cmvr-es/config/devices/arm/arm.pb.txt b/cmvr-es/config/devices/arm/arm.pb.txt deleted file mode 100644 index f5540dc2..00000000 --- a/cmvr-es/config/devices/arm/arm.pb.txt +++ /dev/null @@ -1,351 +0,0 @@ -arm { - robot_arms { - id: "right_arm" - - motor { - motor_system_id: "right_arm_can_motors" - motor_group_ids: "right_arm_can_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - 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: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 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 { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - 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 - } - - 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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - 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_arm" - - motor { - motor_system_id: "left_arm_can_motors" - motor_group_ids: "left_arm_can_motors" - dof: 7 - joint_names: "L_SHOULDER_P" - joint_names: "L_SHOULDER_R" - joint_names: "L_SHOULDER_Y" - joint_names: "L_ELBOW_R" - joint_names: "L_WRIST_P" - joint_names: "L_WRIST_Y" - joint_names: "L_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "L_WRIST_R_S" - tcp_frame_name: "L_FINGER_TIP_FIXED" - 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: "L_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "L_WRIST_R" q_lb: -0.57 q_ub: 1.57 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 { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "L_WRIST_P_S" second: "L_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - - 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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - 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 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt b/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt deleted file mode 100644 index f16cdbe8..00000000 --- a/cmvr-es/config/devices/arm/arm_gen2_mujoco.pb.txt +++ /dev/null @@ -1,182 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_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: 0.6 - 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: 200 - pos_eps: 1e-6 - rot_eps: 1e-6 - damping: 1e-5 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -3.14159 q_ub: 3.14159 qd: 2.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 { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/gen2/collision/robot_collision.urdf" - ignored_pairs { first: "arm_link_5_2" second: "arm_link_7_2" } - ignored_pairs { first: "body_link" second: "arm_link_2_2" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - 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 - } - - 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.005 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 4.0 - max_joint_acceleration_rad_s2: 100.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.5 - linear_acceleration_max: 2.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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - 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.005 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 4.0 - max_joint_acceleration_rad_s2: 100.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 0.01 - 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: 2.0 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_mujoco.pb.txt b/cmvr-es/config/devices/arm/arm_mujoco.pb.txt deleted file mode 100644 index d682461f..00000000 --- a/cmvr-es/config/devices/arm/arm_mujoco.pb.txt +++ /dev/null @@ -1,184 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_dls_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - 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: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 100.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 { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # 轨迹关节位置限位检查的数值容差,单位 rad;0 表示严格检查。 - joint_limit_tolerance_rad: 0.00001 - # 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 - } - - 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: 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 { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 2.0 - linear_acceleration_max: 15.0 - linear_jerk_max: 60.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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - 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: 10.0 - max_joint_acceleration_rad_s2: 5000.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 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt b/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt deleted file mode 100644 index ee8aa674..00000000 --- a/cmvr-es/config/devices/arm/arm_mujoco_qp.pb.txt +++ /dev/null @@ -1,183 +0,0 @@ -arm { - robot_arms { - id: "mujoco_right_arm" - - motor { - motor_system_id: "right_arm_mujoco_motors" - motor_group_ids: "right_arm_mujoco_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 100.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - gain: 0.2 - margin_ratio: 0.01 - max_push: 0.02 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - 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 - } - - 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: 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 { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 2.0 - linear_acceleration_max: 15.0 - linear_jerk_max: 500.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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - line_deviation_check { - enable: true - line_deviation_warn_m: 0.005 - line_deviation_stop_m: 0.005 - 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: 10.0 - max_joint_acceleration_rad_s2: 5000.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 20.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 20.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: 5 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/arm_qp.pb.txt b/cmvr-es/config/devices/arm/arm_qp.pb.txt deleted file mode 100644 index 249a5493..00000000 --- a/cmvr-es/config/devices/arm/arm_qp.pb.txt +++ /dev/null @@ -1,183 +0,0 @@ -arm { - robot_arms { - id: "right_arm" - - motor { - motor_system_id: "right_arm_can_motors" - motor_group_ids: "right_arm_can_motors" - dof: 7 - joint_names: "R_SHOULDER_P" - joint_names: "R_SHOULDER_R" - joint_names: "R_SHOULDER_Y" - joint_names: "R_ELBOW_R" - joint_names: "R_WRIST_P" - joint_names: "R_WRIST_Y" - joint_names: "R_WRIST_R" - upd_freq: 1000 - buffer_size: 50 - default_vel: 1.0 - default_acc: 2.0 - } - - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - base_frame_name: "PELVIS_S" - flange_frame_name: "R_WRIST_R_S" - tcp_frame_name: "R_FINGER_TIP_FIXED" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 100.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 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.01 - max_push: 0.02 - } - } - } - } - - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaoyan_description/dual_arm_collision.urdf" - ignored_pairs { first: "R_WRIST_P_S" second: "R_WRIST_R_S" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - # MoveJ 轨迹完成后等待关节稳定的最长时间,单位为秒。 - settle_timeout_s: 2.0 - # MoveJ 完成时允许的最大关节位置误差,单位为弧度。 - settle_position_tolerance_rad: 0.01 - # MoveJ 完成时允许的最大关节速度,单位为弧度/秒。 - settle_velocity_tolerance_rad_s: 0.02 - # 位置和速度连续满足条件的采样次数。 - settle_stable_sample_count: 3 - } - - 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.8 - linear_acceleration_max: 10.0 - linear_jerk_max: 200.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 - enforce_joint_acceleration_limits: true - adaptive_speed { - # 启用接近关节限位时的提前降速;降低后的目标仍经过 S 曲线平滑。 - # 关闭此开关不影响失解后的制动。 - enable: true - # 预判时间,单位秒;0.15 即 150 ms,实际窗口还会考虑 S 曲线停止时间。 - lookahead_s: 0.15 - # 允许速度低于原目标的 10% 时,平滑停稳后报错;0 关闭此阈值。 - # 这是停止阈值,不会强行维持最低速度,也不限制启动阶段的瞬时速度。 - min_speed_ratio: 0.10 - } - 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: 70 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 70 - 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: 5 - # 等待 Cartesian 速度运动停止的最长时间,单位为秒。 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt b/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt deleted file mode 100644 index b601ef6f..00000000 --- a/cmvr-es/config/devices/arm/ethercat_dual_arm.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Joint-only minimal configuration; MoveJ follows joint_names order. -arm { - robot_arms { - id: "right_ethercat_arm" - motor { - motor_system_id: "dual_arm_ethercat_motors" - motor_group_ids: "dual_arm_ethercat_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 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } - robot_arms { - id: "left_ethercat_arm" - motor { - motor_system_id: "dual_arm_ethercat_motors" - motor_group_ids: "dual_arm_ethercat_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 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt b/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt deleted file mode 100644 index d1e57e79..00000000 --- a/cmvr-es/config/devices/arm/ethercat_single_arm.pb.txt +++ /dev/null @@ -1,160 +0,0 @@ -arm { - robot_arms { - id: "right_ethercat_arm" - - motor { - motor_system_id: "right_arm_ethercat_motors" - motor_group_ids: "right_arm_ethercat_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.64 q_ub: 1.64 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: -1.60 q_ub: 1.60 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: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 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 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/tchl_arm.pb.txt b/cmvr-es/config/devices/arm/tchl_arm.pb.txt deleted file mode 100644 index f2ef0ece..00000000 --- a/cmvr-es/config/devices/arm/tchl_arm.pb.txt +++ /dev/null @@ -1,36 +0,0 @@ -# 七轴纯关节运动配置;MoveJ 目标向量按 joint_names 的顺序填写。 -arm { - robot_arms { - id: "tchl_arm" - - motor { - motor_system_id: "tchl_joint_motors" - motor_group_ids: "tchl_joint_motors" - dof: 7 - joint_names: "TCHL_AXIS_1" - joint_names: "TCHL_AXIS_2" - joint_names: "TCHL_AXIS_3" - joint_names: "TCHL_AXIS_4" - joint_names: "TCHL_AXIS_5" - joint_names: "TCHL_AXIS_6" - joint_names: "TCHL_AXIS_7" - upd_freq: 1000 - } - - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt b/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt deleted file mode 100644 index 0f0c63fc..00000000 --- a/cmvr-es/config/devices/arm/tchl_dual_arm.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Joint-only minimal configuration; MoveJ follows joint_names order. -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 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } - 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 - } - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.1 - } - } - move_j { - settle_timeout_s: 2.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt b/cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt deleted file mode 100644 index e99b6f4b..00000000 --- a/cmvr-es/config/devices/arm/xiaozhao_arm.pb.txt +++ /dev/null @@ -1,331 +0,0 @@ -# xiaozhao 双臂 MuJoCo 控制,所有关节位置使用 rad。 -# TCP 与第七连杆同向,局部偏移左 (0.007, 0.23, -0.045) m、右 (0.007, -0.23, -0.045) m。 -# 两臂分别规划 MoveP,检测本臂与固定基座的碰撞体,最小间距为 20 mm。 -arm { - - robot_arms { - id: "xiaozhao_left_arm" - motor { - motor_system_id: "xiaozhao_left_arm_motors" - motor_group_ids: "xiaozhao_left_arm_motors" - dof: 7 - joint_names: "joint1-left" - joint_names: "joint2-left" - joint_names: "joint3-left" - joint_names: "joint4-left" - joint_names: "joint5-left" - joint_names: "joint6-left" - joint_names: "joint7-left" - upd_freq: 1000 - buffer_size: 50 - default_vel: 0.5 - default_acc: 2.0 - } - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaozhao/urdf/xiaozhao.urdf" - base_frame_name: "base_link" - flange_frame_name: "link7-left" - tcp_frame_name: "tcp-left" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - 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: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint4-left" q_lb: 0 q_ub: 2.35 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint5-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint6-left" q_lb: -0.785 q_ub: 0.45 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint7-left" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - } - } - } - } - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" - ignored_pairs { first: "link5-left" second: "link7-left" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - settle_timeout_s: 3.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - 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.005 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 1.0 - max_joint_acceleration_rad_s2: 5.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.1 - linear_acceleration_max: 0.5 - linear_jerk_max: 5.0 - angular_velocity_max: 0.5 - angular_acceleration_max: 2.0 - angular_jerk_max: 10.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - enable: true - lookahead_s: 0.15 - min_speed_ratio: 0.10 - } - 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.005 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 1.0 - max_joint_acceleration_rad_s2: 5.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 0.01 - 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: 2.0 - stop_timeout_s: 2.0 - } - } - } - } - } - - robot_arms { - id: "xiaozhao_right_arm" - motor { - motor_system_id: "xiaozhao_right_arm_motors" - motor_group_ids: "xiaozhao_right_arm_motors" - dof: 7 - joint_names: "joint1-right" - joint_names: "joint2-right" - joint_names: "joint3-right" - joint_names: "joint4-right" - joint_names: "joint5-right" - joint_names: "joint6-right" - joint_names: "joint7-right" - upd_freq: 1000 - buffer_size: 50 - default_vel: 0.5 - default_acc: 2.0 - } - kinematics { - pinocchio_qp_ik_solver { - urdf_path: "model/xiaozhao/urdf/xiaozhao.urdf" - base_frame_name: "base_link" - flange_frame_name: "link7-right" - tcp_frame_name: "tcp-right" - lambda: 1e-4 - w_posrot: 0.5 - max_iters: 100 - tol: 1e-6 - qp_time_limit: 1e-2 - joint_limit_policy { - limits { - enable: true - 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: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } - } - soft_limit { - enable: true - margin_ratio: 0.01 - min_margin_rad: 0.01 - } - avoidance { - enable: false - } - } - } - } - motion { - joint_path { - algorithm: RRT_CONNECT - rrt_connect { - timeout_s: 2.0 - range_rad: 0.2 - collision_check_step_rad: 0.02 - } - collision_checker { - urdf_path: "model/xiaozhao/collision/xiaozhao_collision.urdf" - ignored_pairs { first: "link5-right" second: "link7-right" } - } - minimum_distance_m: 0.01 - } - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - settle_timeout_s: 3.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - 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.005 - } - joint_continuity_check { - enable: true - max_joint_delta_rad: 0.05 - max_joint_velocity_rad_s: 1.0 - max_joint_acceleration_rad_s2: 5.0 - } - cartesian_step_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 1e-4 - min_desired_angular_speed: 1e-4 - } - } - } - speed_l { - pinocchio_cartesian_motion_planner { - linear_velocity_max: 0.1 - linear_acceleration_max: 0.5 - linear_jerk_max: 5.0 - angular_velocity_max: 0.5 - angular_acceleration_max: 2.0 - angular_jerk_max: 10.0 - linear_target_replan_threshold: 1e-4 - angular_target_replan_threshold: 1e-4 - enforce_joint_acceleration_limits: true - adaptive_speed { - enable: true - lookahead_s: 0.15 - min_speed_ratio: 0.10 - } - 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.005 - } - joint_velocity_check { - enable: true - max_joint_velocity_rad_s: 1.0 - max_joint_acceleration_rad_s2: 5.0 - } - cartesian_velocity_feasibility_check { - enable: true - min_linear_speed_ratio: 0.2 - max_linear_direction_deviation_deg: 10.0 - min_angular_speed_ratio: 0.2 - max_angular_direction_deviation_deg: 10.0 - min_desired_linear_speed: 0.01 - 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: 2.0 - stop_timeout_s: 2.0 - } - } - } - } - } -} diff --git a/cmvr-es/config/devices/arm/xiaozhao_head.pb.txt b/cmvr-es/config/devices/arm/xiaozhao_head.pb.txt deleted file mode 100644 index 6803f199..00000000 --- a/cmvr-es/config/devices/arm/xiaozhao_head.pb.txt +++ /dev/null @@ -1,35 +0,0 @@ -# xiaozhao 三轴颈部按 RobotArm 注册,仅使用关节空间控制。 -# MoveJ 目标顺序为 neck-joint1、neck-joint2、neck-joint3,单位为弧度。 -arm { - robot_arms { - id: "xiaozhao_head" - - motor { - motor_system_id: "xiaozhao_head_motors" - motor_group_ids: "xiaozhao_head_motors" - dof: 3 - joint_names: "neck-joint1" - joint_names: "neck-joint2" - joint_names: "neck-joint3" - upd_freq: 1000 - buffer_size: 50 - default_vel: 0.25 - default_acc: 0.5 - } - - motion { - joint_trajectory_smoother { - sample_period_s: 0.001 - quintic_bspline { - control_point_spacing_rad: 0.05 - } - } - move_j { - settle_timeout_s: 3.0 - settle_position_tolerance_rad: 0.002 - settle_velocity_tolerance_rad_s: 0.02 - settle_stable_sample_count: 3 - } - } - } -} diff --git a/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt b/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt deleted file mode 100644 index c6b8a10b..00000000 --- a/cmvr-es/config/devices/motor/dual_arm_ethercat_motors.pb.txt +++ /dev/null @@ -1,93 +0,0 @@ -motor { - id: "dual_arm_ethercat_motors" - - motor_groups { - id: "dual_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - 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.64 q_ub: 1.64 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: -1.60 q_ub: 1.60 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: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 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: -1.64 q_ub: 1.64 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.60 q_ub: 1.60 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.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "left_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 8 joint_name: "left_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 9 joint_name: "left_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 10 joint_name: "left_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 11 joint_name: "left_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 12 joint_name: "left_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 13 joint_name: "left_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 14 joint_name: "left_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_motors.pb.txt b/cmvr-es/config/devices/motor/ethercat_motors.pb.txt deleted file mode 100644 index f8c2fe88..00000000 --- a/cmvr-es/config/devices/motor/ethercat_motors.pb.txt +++ /dev/null @@ -1,72 +0,0 @@ -motor { - id: "ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - 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: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -1.64 q_ub: 1.64 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: -1.60 q_ub: 1.60 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "R_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "R_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "R_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt b/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt deleted file mode 100644 index 4f649ab1..00000000 --- a/cmvr-es/config/devices/motor/ethercat_motors_four_real_test.pb.txt +++ /dev/null @@ -1,63 +0,0 @@ -motor { - id: "ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - protocol: MOTOR_PROTOCOL_ETHERCAT_CIA402 - - ethercat { - master_index: 0 - cycle_us: 1000 - slave_op_timeout_ms: 15000 - 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: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt b/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt deleted file mode 100644 index 36ac9978..00000000 --- a/cmvr-es/config/devices/motor/ethercat_single_arm_motors.pb.txt +++ /dev/null @@ -1,72 +0,0 @@ -motor { - id: "right_arm_ethercat_motors" - - motor_groups { - id: "right_arm_ethercat_motors" - bus_type: MOTOR_BUS_ETHERCAT - vendor: MOTOR_VENDOR_EYOU - 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: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - } - - 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.64 q_ub: 1.64 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: -1.60 q_ub: 1.60 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: -0.37 q_ub: 0.79 qd: 5.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -0.61 q_ub: 0.58 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 2 joint_name: "right_arm_J2" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 3 joint_name: "right_arm_J3" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 4 joint_name: "right_arm_J4" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 5 joint_name: "right_arm_J5" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 6 joint_name: "right_arm_J6" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 7 joint_name: "right_arm_J7" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/mujoco_motors.pb.txt b/cmvr-es/config/devices/motor/mujoco_motors.pb.txt deleted file mode 100644 index 448270e3..00000000 --- a/cmvr-es/config/devices/motor/mujoco_motors.pb.txt +++ /dev/null @@ -1,35 +0,0 @@ -motor { - id: "mujoco_motors" - - motor_groups { - id: "right_arm_mujoco_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "R_SHOULDER_P" } - motors { id: 2 joint_name: "R_SHOULDER_R" } - motors { id: 3 joint_name: "R_SHOULDER_Y" } - motors { id: 4 joint_name: "R_ELBOW_R" } - motors { id: 5 joint_name: "R_WRIST_P" } - motors { id: 6 joint_name: "R_WRIST_Y" } - motors { id: 7 joint_name: "R_WRIST_R" } - } - } -} diff --git a/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt b/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt deleted file mode 100644 index a45bafae..00000000 --- a/cmvr-es/config/devices/motor/mujoco_motors_gen2.pb.txt +++ /dev/null @@ -1,35 +0,0 @@ -motor { - id: "mujoco_motors" - - motor_groups { - id: "right_arm_mujoco_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "right_arm_J1" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J2" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J3" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J4" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J5" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J6" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - joints { joint_name: "right_arm_J7" q_lb: -3.14159 q_ub: 3.14159 qd: 2.0 qdd: 10.0 } - } - - motors { - motors { id: 1 joint_name: "right_arm_J1" } - motors { id: 2 joint_name: "right_arm_J2" } - motors { id: 3 joint_name: "right_arm_J3" } - motors { id: 4 joint_name: "right_arm_J4" } - motors { id: 5 joint_name: "right_arm_J5" } - motors { id: 6 joint_name: "right_arm_J6" } - motors { id: 7 joint_name: "right_arm_J7" } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt deleted file mode 100644 index 3ea59db9..00000000 --- a/cmvr-es/config/devices/motor/tchl_dual_arm_motors.pb.txt +++ /dev/null @@ -1,95 +0,0 @@ -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 - } - - # Junction position 0: Port 1 -> right arm J1-J7 (positions 1-7). - 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 } - # Junction Port 2 -> left arm J1-J7 (positions 8-14). - 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 } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_motors.pb.txt deleted file mode 100644 index 56672f9d..00000000 --- a/cmvr-es/config/devices/motor/tchl_motors.pb.txt +++ /dev/null @@ -1,54 +0,0 @@ -# 同川 TC600E TR 单轴模板;未注册为活动设备。 -# 当前按实机 PrD.00=0、电子齿轮1:1配置;减速比需读取实机3D06后填写。 -motor { - id: "tchl_motors" - - motor_groups { - id: "tchl_single_axis" - 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 - } - - 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: 0 } - } - - # 必须先填写实际行程及速度/加速度上限,再设 enable: true;0不是可运行值。 - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "TCHL_AXIS_1" q_lb: -3.14 q_ub: 3.14 qd: 10 qdd: 100 } - } - - motors { - motors { - id: 1 - joint_name: "TCHL_AXIS_1" - encoder_counts_per_rev: 131072 - gear_ratio: 101 - } - } - } -} diff --git a/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt b/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt deleted file mode 100644 index c528c9ec..00000000 --- a/cmvr-es/config/devices/motor/tchl_multi_motors.pb.txt +++ /dev/null @@ -1,64 +0,0 @@ -# 同川 TC600E TR 七轴模板;设备管理器默认不启用。 -# 各轴按实机确认 PrD.00、电子齿轮、编码器分辨率和减速比。 -# 以下 131072 / 101 仅为 PrD.00=0、电子齿轮 1:1 的配置示例。 -motor { - id: "tchl_motors" - - motor_groups { - id: "tchl_joint_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 - } - - dc { enable: false } - - slaves { motor_id: 1 alias: 0 position: 0 } - slaves { motor_id: 2 alias: 0 position: 1 } - slaves { motor_id: 3 alias: 0 position: 2 } - slaves { motor_id: 4 alias: 0 position: 3 } - slaves { motor_id: 5 alias: 0 position: 4 } - slaves { motor_id: 6 alias: 0 position: 5 } - slaves { motor_id: 7 alias: 0 position: 6 } - - } - - # 示例限位;启用设备前按各轴实际行程和允许速度、加速度填写。 - # q: rad,qd: rad/s,qdd: rad/s^2。 - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "TCHL_AXIS_1" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_2" q_lb: -1.96 q_ub: 2.02 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_3" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_4" q_lb: -2.04 q_ub: 1.10 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_5" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_6" q_lb: -3.14 q_ub: 0.21 qd: 5.0 qdd: 10.0 } - joints { joint_name: "TCHL_AXIS_7" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - - } - - motors { - motors { id: 1 joint_name: "TCHL_AXIS_1" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 2 joint_name: "TCHL_AXIS_2" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 3 joint_name: "TCHL_AXIS_3" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 4 joint_name: "TCHL_AXIS_4" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 5 joint_name: "TCHL_AXIS_5" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 6 joint_name: "TCHL_AXIS_6" encoder_counts_per_rev: 131072 gear_ratio: 101 } - motors { id: 7 joint_name: "TCHL_AXIS_7" encoder_counts_per_rev: 131072 gear_ratio: 101 } - - } - } -} diff --git a/cmvr-es/config/devices/motor/ti5_motors.pb.txt b/cmvr-es/config/devices/motor/ti5_motors.pb.txt deleted file mode 100644 index 173d7b1c..00000000 --- a/cmvr-es/config/devices/motor/ti5_motors.pb.txt +++ /dev/null @@ -1,99 +0,0 @@ -motor { - id: "ti5_motors" - - motor_groups { - id: "left_arm_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 0 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_URDF - urdf_path: "model/xiaoyan_description/dual_arm.urdf" - } - motors { - motors { id: 23 joint_name: "L_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 24 joint_name: "L_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 25 joint_name: "L_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 26 joint_name: "L_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 27 joint_name: "L_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 28 joint_name: "L_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 29 joint_name: "L_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "right_arm_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 1 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "R_SHOULDER_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_R" q_lb: -0.78 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_SHOULDER_Y" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_ELBOW_R" q_lb: 0 q_ub: 2.05 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_P" q_lb: -3.14 q_ub: 3.14 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_Y" q_lb: -0.78 q_ub: 0.78 qd: 5.0 qdd: 10.0 } - joints { joint_name: "R_WRIST_R" q_lb: -0.57 q_ub: 1.57 qd: 5.0 qdd: 10.0 } - } - motors { - motors { id: 16 joint_name: "R_SHOULDER_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 17 joint_name: "R_SHOULDER_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 18 joint_name: "R_SHOULDER_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 19 joint_name: "R_ELBOW_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 20 joint_name: "R_WRIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 21 joint_name: "R_WRIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 22 joint_name: "R_WRIST_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "head_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 2 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "HEAD_Y" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "HEAD_P" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "HEAD_R" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - } - motors { - motors { id: 32 joint_name: "HEAD_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 30 joint_name: "HEAD_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 31 joint_name: "HEAD_R" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } - - motor_groups { - id: "waist_can_motors" - bus_type: MOTOR_BUS_CAN - vendor: MOTOR_VENDOR_TI5 - protocol: MOTOR_PROTOCOL_CANOPEN - can { - channel_id: 3 - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "WAIST_Y" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - joints { joint_name: "WAIST_P" q_lb: -3.14 q_ub: 3.14 qd: 3.0 } - } - motors { - motors { id: 4 joint_name: "WAIST_Y" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - motors { id: 15 joint_name: "WAIST_P" encoder_counts_per_rev: 65536 gear_ratio: 101.0 } - } - } -} diff --git a/cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt b/cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt deleted file mode 100644 index 834534dc..00000000 --- a/cmvr-es/config/devices/motor/xiaozhao_motors.pb.txt +++ /dev/null @@ -1,87 +0,0 @@ -# MuJoCo 仿真限值:位置范围与 xiaozhao/config/joint_limits.csv 一致。 -# URDF 的 velocity/effort 为占位值,速度和加速度在这里显式设置。 -motor { - id: "xiaozhao_motors" - - motor_groups { - id: "xiaozhao_left_arm_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - 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: "joint3-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint4-left" q_lb: 0 q_ub: 2.35 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint5-left" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint6-left" q_lb: -0.785 q_ub: 0.45 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint7-left" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } - } - motors { - motors { id: 1 joint_name: "joint1-left" } - motors { id: 2 joint_name: "joint2-left" } - motors { id: 3 joint_name: "joint3-left" } - motors { id: 4 joint_name: "joint4-left" } - motors { id: 5 joint_name: "joint5-left" } - motors { id: 6 joint_name: "joint6-left" } - motors { id: 7 joint_name: "joint7-left" } - } - } - - motor_groups { - id: "xiaozhao_right_arm_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - joint_limits { - enable: true - 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: "joint2-right" q_lb: -1.57 q_ub: 1.57 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint3-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint4-right" q_lb: -2.35 q_ub: 0 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint5-right" q_lb: -3.14 q_ub: 3.14 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint6-right" q_lb: -0.45 q_ub: 0.785 qd: 1.0 qdd: 5.0 } - joints { joint_name: "joint7-right" q_lb: -1.05 q_ub: 1.05 qd: 1.0 qdd: 5.0 } - } - motors { - motors { id: 1 joint_name: "joint1-right" } - motors { id: 2 joint_name: "joint2-right" } - motors { id: 3 joint_name: "joint3-right" } - motors { id: 4 joint_name: "joint4-right" } - motors { id: 5 joint_name: "joint5-right" } - motors { id: 6 joint_name: "joint6-right" } - motors { id: 7 joint_name: "joint7-right" } - } - } - - motor_groups { - id: "xiaozhao_head_motors" - bus_type: MOTOR_BUS_MUJOCO - vendor: MOTOR_VENDOR_MUJOCO - protocol: MOTOR_PROTOCOL_MUJOCO - mujoco { - world_id: "mujoco_world" - } - joint_limits { - enable: true - source: JOINT_LIMIT_SOURCE_CUSTOM - joints { joint_name: "neck-joint1" q_lb: -1.57 q_ub: 1.57 qd: 0.5 qdd: 2.0 } - joints { joint_name: "neck-joint2" q_lb: -1.57 q_ub: 0.44 qd: 0.5 qdd: 2.0 } - joints { joint_name: "neck-joint3" q_lb: -0.44 q_ub: 0.44 qd: 0.5 qdd: 2.0 } - } - motors { - motors { id: 1 joint_name: "neck-joint1" } - motors { id: 2 joint_name: "neck-joint2" } - motors { id: 3 joint_name: "neck-joint3" } - } - } -} diff --git a/cmvr-es/config/manager/device_manager.pb.txt b/cmvr-es/config/manager/device_manager.pb.txt deleted file mode 100644 index 6278ca46..00000000 --- a/cmvr-es/config/manager/device_manager.pb.txt +++ /dev/null @@ -1,330 +0,0 @@ -device_manager { - name: "cmvr_es" - version: "0.1" - description: "cmvr edge system version 0.1" - # xiaozhao 双臂、颈部与右臂触屏仿真:先创建 world,再创建电机、机械臂、viewer 和传感器。 - devices { - id: "mujoco_world" - type: DEVICE_TYPE_MUJOCO_WORLD - config_file: "devices/mujoco/xiaozhao_world.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_left_arm_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_right_arm_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_head_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/xiaozhao_motors.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_left_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_arm.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_right_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_arm.pb.txt" - enable: false - } - - devices { - id: "xiaozhao_head" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/xiaozhao_head.pb.txt" - enable: false - } - - devices { - id: "right_arm_mujoco_motors" - type: DEVICE_TYPE_MOTOR_SYSTEM - config_file: "devices/motor/mujoco_motors.pb.txt" - enable: false - } - - devices { - id: "mujoco_right_arm" - type: DEVICE_TYPE_ROBOT_ARM - config_file: "devices/arm/arm_mujoco_qp.pb.txt" - enable: false - } - - devices { - id: "mujoco_viewer" - type: DEVICE_TYPE_MUJOCO_VIEWER - config_file: "devices/mujoco/mujoco_viewer.pb.txt" - enable: false - } - - devices { - id: "mujoco_hand_cam" - type: DEVICE_TYPE_CAMERA - config_file: "devices/camera/xiaozhao_camera.pb.txt" - enable: false - } - - devices { - id: "mujoco_external_touch_cam" - type: DEVICE_TYPE_CAMERA - config_file: "devices/camera/xiaozhao_camera.pb.txt" - enable: false - } - - 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 { - id: "right_hand_lites001" - type: DEVICE_TYPE_DEXHAND - config_file: "devices/dexhand/dexhand.pb.txt" - enable: false - } - - devices { - id: "hand2" - type: DEVICE_TYPE_DEXHAND - config_file: "devices/dexhand/dexhand.pb.txt" - enable: false - } - - devices { - id: "paxini_tip_1" - type: DEVICE_TYPE_TOUCH - config_file: "devices/touch/touch.pb.txt" - enable: false - } - - devices { - id: "mujoco_zero_touch" - type: DEVICE_TYPE_TOUCH - config_file: "devices/touch/touch.pb.txt" - enable: false - } - - 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 - } - - 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 - } -} diff --git a/cmvr-es/devices/canbus/CMakeLists.txt b/cmvr-es/devices/canbus/CMakeLists.txt index 76b2a460..67ed448e 100644 --- a/cmvr-es/devices/canbus/CMakeLists.txt +++ b/cmvr-es/devices/canbus/CMakeLists.txt @@ -17,22 +17,6 @@ install(TARGETS canbus LIBRARY DESTINATION lib) # -------------------------------------------------------- # Unit test # -------------------------------------------------------- -add_executable(socket_can_client_raw_test - ${CMAKE_CURRENT_SOURCE_DIR}/can_client/socket/socket_can_client_raw_test.cc -) - - -target_link_libraries(socket_can_client_raw_test - PRIVATE - canbus - gtest - gtest_main - pthread - glog - cmvr_es::proto -) - - add_executable(protocol_data_test ${CMAKE_CURRENT_SOURCE_DIR}/can_comm/protocol_data_test.cc ) diff --git a/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc b/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc deleted file mode 100644 index 306b7391..00000000 --- a/cmvr-es/devices/canbus/can_client/socket/socket_can_client_raw_test.cc +++ /dev/null @@ -1,133 +0,0 @@ -#include "canbus/can_client/socket/socket_can_client_raw.h" -#include "canbus/can_comm/can_receiver.h" -#include "cmvr/msgs/robot_detail.pb.h" -#include "gtest/gtest.h" - -#include -#include - -namespace cmvr::device { - -// Test the production receive/timeout/stop paths without a CAN adapter, -// motor commands, or privileged vcan configuration. -class SocketCanClientRawTestPeer { -public: - static bool attach(SocketCanClientRaw& client, int fd) { - client.dev_handler_ = fd; - client.is_started_ = true; - return true; - } -}; - -class SocketCanReceiveTest : public testing::Test { -protected: - config::SocketCanConfig config; - SocketCanClientRaw client{config}; - int peer = -1; - void SetUp() override { - int sockets[2]; - ASSERT_EQ(::socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets), 0); - peer = sockets[1]; - ASSERT_TRUE(SocketCanClientRawTestPeer::attach(client, sockets[0])); - } - void TearDown() override { - client.stop(); - if (peer >= 0) ::close(peer); - } -}; - -TEST_F(SocketCanReceiveTest, IdleReceiveReturnsZeroWithoutAnError) { - std::vector frames(1); - int32_t count = MAX_CAN_RECV_FRAME_LEN; - const auto start = std::chrono::steady_clock::now(); - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::OK); - EXPECT_EQ(count, 0); - EXPECT_TRUE(frames.empty()); - EXPECT_LT(std::chrono::steady_clock::now() - start, std::chrono::milliseconds(500)); -} - -TEST_F(SocketCanReceiveTest, ReceivedFrameIsReturnedWithActualCount) { - can_frame input{}; - input.can_id = 0x141; - input.can_dlc = 8; - input.data[0] = 0x9A; - ASSERT_EQ(::write(peer, &input, sizeof(input)), sizeof(input)); - std::vector frames; - int32_t count = MAX_CAN_RECV_FRAME_LEN; - ASSERT_EQ(client.receive(&frames, &count), msgs::ErrorCode::OK); - ASSERT_EQ(count, 1); - ASSERT_EQ(frames.size(), 1U); - EXPECT_EQ(frames[0].id, 0x141); - EXPECT_EQ(frames[0].len, 8); - EXPECT_EQ(frames[0].data[0], 0x9A); -} - -TEST_F(SocketCanReceiveTest, ReceiverStopsOnAnIdleBusAndCanRestart) { - MessageManager manager; - CanReceiver receiver; - ASSERT_EQ(receiver.Init(&client, &manager, false), msgs::ErrorCode::OK); - for (int attempt = 0; attempt < 3; ++attempt) { - ASSERT_EQ(receiver.Start(), msgs::ErrorCode::OK); - std::this_thread::sleep_for(std::chrono::milliseconds(5)); - const auto start = std::chrono::steady_clock::now(); - receiver.Stop(); - EXPECT_LT(std::chrono::steady_clock::now() - start, std::chrono::milliseconds(500)); - EXPECT_FALSE(receiver.IsRunning()); - receiver.Stop(); - } -} - -TEST_F(SocketCanReceiveTest, ShortFrameIsRejectedAndStopIsIdempotent) { - const char byte = 0; - ASSERT_EQ(::write(peer, &byte, 1), 1); - std::vector frames; - int32_t count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); - EXPECT_TRUE(client.stop()); - EXPECT_TRUE(client.stop()); - count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); -} - - -TEST_F(SocketCanReceiveTest, ExplicitTimeoutUsesOneCallDeadlineAndClearsOldFrames) { - std::vector frames(2); - int32_t count = 1; - const auto started = std::chrono::steady_clock::now(); - EXPECT_EQ(client.receive(&frames, &count, std::chrono::milliseconds(20)), msgs::ErrorCode::OK); - EXPECT_EQ(count, 0); - EXPECT_TRUE(frames.empty()); - EXPECT_LT(std::chrono::steady_clock::now() - started, std::chrono::milliseconds(500)); -} - -TEST_F(SocketCanReceiveTest, RejectsCanFdAndInvalidClassicDlc) { - canfd_frame fd{}; - fd.can_id = 0x141; - fd.len = 12; - ASSERT_EQ(::write(peer, &fd, sizeof(fd)), sizeof(fd)); - std::vector frames; - int32_t count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); - can_frame classic{}; - classic.can_dlc = 9; - ASSERT_EQ(::write(peer, &classic, sizeof(classic)), sizeof(classic)); - count = 1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); -} - -TEST_F(SocketCanReceiveTest, RejectsNullAndInvalidCapacity) { - std::vector frames; - int32_t count = 1; - EXPECT_EQ(client.receive(nullptr, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_RECV_FAILED); - EXPECT_EQ(count, 0); - EXPECT_EQ(client.receive(&frames, nullptr), msgs::ErrorCode::CAN_CLIENT_ERROR_FRAME_NUM); - count = -1; - EXPECT_EQ(client.receive(&frames, &count), msgs::ErrorCode::CAN_CLIENT_ERROR_FRAME_NUM); - EXPECT_EQ(count, 0); -} - -} // namespace cmvr::device