Files
linkerhand_retarget_ros2/src/linkerhand_calibration/config/calibration.yaml
T

137 lines
6.5 KiB
YAML

g20_thumb_calibration:
ros__parameters:
command_topic: /g20/cb_left_hand_control_cmd
state_topic: /g20/cb_left_hand_state
info_topic: /g20/cb_left_hand_info
camera_info_topic: /camera/camera/color/camera_info
image_topic: /camera/camera/color/image_rect
detections_topic: /apriltag/detections
tf_topic: /tf
# Use PnP translations as 3-D Tag centres and fit the directly observable
# root/MCP circles. The passive IP output follows the G20 URDF mimic
# relation below; its small residual T5 circle is diagnostic only. PnP
# orientations remain auxiliary quality checks. Command 255 is zero.
angle_estimation_mode: trajectory_center_3d
passive_ip_multiplier: 1.02
publish_debug_image: false
debug_max_rate_hz: 10.0
debug_scale: 0.5
# Default: send one end-to-end command per direction and pair every valid
# AprilTag frame with the timestamp-interpolated actual G20 state.
scan_mode: continuous
continuous_motion_mode: endpoint
repetitions: 1
# Used only by point-mode fallback and validation approach offsets.
command_step: 8
auto_start_tip: true
maximum_state_image_skew_ms: 150.0
continuous_endpoint_tolerance_u8: 2.0
continuous_endpoint_hold_seconds: 1.0
continuous_timeout_seconds: 90.0
continuous_invalid_timeout_seconds: 3.0
continuous_minimum_valid_frames: 40
continuous_minimum_state_span_u8: 240.0
continuous_minimum_bins: 32
continuous_maximum_bin_gap: 16
# Keep the responsive firmware speed, but pace it through the same
# 8-unit grid without waiting for static image captures at each point.
continuous_segment_minimum_seconds: 0.1
continuous_segment_timeout_seconds: 5.0
continuous_prepare_timeout_seconds: 30.0
preflight_frames: 150
minimum_detection_rate: 0.95
minimum_detection_hz: 15.0
maximum_hamming: 0
minimum_decision_margin: 30.0
# Trial threshold for small/far tags (historically observed at 32-38 px).
# Final acceptance is still guarded by static RMS and random validation.
minimum_edge_pixels: 30.0
# Current 30 px tags measure about 0.50-0.53 deg RMS while stationary.
# Keep a small practical margin here; final random validation stays at
# MAE <= 2 deg and P95 <= 3 deg.
# Match the preflight noise gate to the 3 deg robust capture gate below.
# The final calibration is still accepted only by the independent
# validation MAE/P95 limits, not by this readiness check.
maximum_static_std_deg: 3.0
pose_outlier_threshold_deg: 5.0
minimum_pose_inlier_rate: 0.90
pnp_minimum_valid_rate: 0.95
# 30-38 px tags are usable, but only if IPPE gives a tight image fit and
# a pose continuous with the preceding frame.
pnp_maximum_reprojection_error_px: 1.5
# All four tags keep a temporally continuous IPPE solution throughout the
# complete session. With 30 px planar tags, tiny reprojection differences
# do not reliably identify the physical branch and previously caused
# stationary T0 to flip by about 25 deg between scan and validation.
pnp_reprojection_tie_px: 1.5
pnp_maximum_pose_jump_deg: 35.0
pnp_maximum_translation_jump_m: 0.04
pnp_maximum_tag_tilt_deg: 75.0
# Preserve the branch through short detector gaps. A continuous sweep
# already pauses after 3 s without valid synchronised observations.
pnp_tracker_reset_seconds: 5.0
# Select all four IPPE branches as one kinematic chain. This prevents T4
# and T5 from independently changing mirror branches at the turnaround or
# during validation while still allowing real joint motion frame-to-frame.
pnp_group_relative_rotation_scale_deg: 5.0
pnp_group_relative_translation_scale_m: 0.01
# Reprojection remains a tie-breaker; temporal joint-chain continuity is
# deliberately dominant for the current 30-38 px planar tags.
pnp_group_reprojection_weight: 0.05
# Whole-sweep branch review. During a root sweep T3/T4/T5 should retain
# rigid relative poses; during a tip sweep T0/T3 should remain fixed.
pnp_trajectory_reprojection_scale_px: 0.1
pnp_rigid_rotation_scale_deg: 5.0
pnp_rigid_translation_scale_m: 0.01
# Judge the complete rigid trajectory against a robust sweep reference.
# Reject persistent drift at P95; keep a looser hard maximum so one noisy
# 30 px endpoint frame does not discard an otherwise sound sweep.
pnp_rigid_p95_accepted_drift_deg: 8.0
pnp_rigid_maximum_accepted_drift_deg: 15.0
# Centre-trajectory mode judges branch consistency by the Euclidean
# distance between rigid Tag centres. This is deliberately independent
# of the noisy planar-Tag orientation returned by PnP.
pnp_rigid_p95_accepted_distance_drift_m: 0.003
pnp_rigid_maximum_accepted_distance_drift_m: 0.006
# Three-dimensional centre-trajectory geometry gates. T0 stays on the
# palm as the translation anchor; T3/T4/T5 are the moving thumb points.
trajectory_maximum_plane_rms_m: 0.004
trajectory_maximum_radial_rms_m: 0.004
trajectory_minimum_radius_m: 0.005
trajectory_minimum_arc_deg: 15.0
trajectory_maximum_root_role_disagreement_deg: 5.0
trajectory_maximum_anchor_drift_m: 0.005
trajectory_static_translation_outlier_m: 0.005
trajectory_maximum_static_translation_rms_m: 0.002
# Static captures are now used only for sweep preparation and validation.
stable_frames: 5
capture_frames: 8
minimum_settle_seconds: 0.4
# This only confirms that the hand has stopped before an 8-frame robust
# median capture. The passive T4->T5 pair currently has about 2.3 deg
# peak spread over five 30 px PnP frames, while its two IPPE branches are
# separated by about 5.5 deg. A 3 deg gate accepts measurement jitter but
# still rejects a branch change. Final MAE/P95 limits remain unchanged.
maximum_stable_spread_deg: 3.0
# In centre mode the stationary capture gate is expressed in metres.
maximum_stable_translation_spread_m: 0.003
settle_timeout_seconds: 10.0
capture_timeout_seconds: 10.0
validation_command_count: 5
# The backlash approach point only waits for feedback to reach the target;
# it no longer performs an unnecessary image capture.
validation_approach_minimum_seconds: 0.2
validation_approach_timeout_seconds: 10.0
validation_position_tolerance_u8: 2.0
validation_seed: 20260727
maximum_validation_mae_deg: 2.0
maximum_validation_p95_deg: 3.0
maximum_coupling_drift_deg: 2.0
minimum_ip_coupling_r_squared: 0.98
maximum_monotonic_correction_deg: 2.0
maximum_hysteresis_deg: 5.0