diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_23dof.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_23dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c9526e7765f74c0e74515335757ef99b19069d3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_23dof.xml @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..958650e7e0866af70ea9e55a383da6e7c6b2c6ec --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_old.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_old.xml new file mode 100644 index 0000000000000000000000000000000000000000..0707bb3eed19ac01c848c70e2b158dd780a716d0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_old.xml @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_with_hand.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_with_hand.xml new file mode 100644 index 0000000000000000000000000000000000000000..726211e4820241c9bc102a3fd074c7c0a2704e7f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/g1_29dof_with_hand.xml @@ -0,0 +1,743 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_23dof.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_23dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..b697dc54b2c1cecc1a6fefa1daef5655a6bc7a4f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_23dof.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof.xml new file mode 100644 index 0000000000000000000000000000000000000000..9aa74d44bdeb06f1fb1b2f4e8d0a7541a8d81c31 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof_with_hand.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof_with_hand.xml new file mode 100644 index 0000000000000000000000000000000000000000..515ea20575de4032b1c8bb324537e36cb97ba7a1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_29dof_with_hand.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_empty.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_empty.xml new file mode 100644 index 0000000000000000000000000000000000000000..19e909878d88115e34caab4f3b8bf316eb31b205 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/g1/scene_empty.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/observation_config_example.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/observation_config_example.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a80682d265c9891e87e790759b4111d008a97811 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/observation_config_example.yaml @@ -0,0 +1,150 @@ +# =================================================================== +# G1 Deploy - Observation Configuration Example +# =================================================================== +# This file demonstrates the complete observation configuration format +# This example matches the default configuration exactly +# +# Instructions: +# 1. Copy this file to create your custom configuration +# 2. Modify enabled: true/false to enable/disable observations +# 3. Reorder observations by changing their position in the list +# 4. The system automatically calculates offsets based on order +# 5. Ensure total enabled dimensions match your ONNX model input +# =================================================================== + +# Observation definitions - processed in the order listed below +observations: + # --------------------------------------------------------------- + # Motion Reference Data (from loaded motion sequences) + # --------------------------------------------------------------- + + - name: "motion_joint_positions" + enabled: true + # Description: Joint positions from motion reference data + # Dimension: 29 elements (one per joint) + # Units: radians + # Purpose: Provides target joint positions for the current motion frame + + - name: "motion_joint_velocities" + enabled: true + # Description: Joint velocities from motion reference data + # Dimension: 29 elements (one per joint) + # Units: radians/second + # Purpose: Provides target joint velocities for the current motion frame + # Note: Only active when motion is playing (is_playing_ = true) + + - name: "motion_anchor_orientation" + enabled: true + # Description: Motion anchor orientation relative to robot base + # Dimension: 6 elements (rotation matrix first 2 columns flattened) + # Units: dimensionless (rotation matrix elements) + # Purpose: Encodes relative orientation between robot and motion reference + # Calculation: Includes heading compensation and delta heading adjustments + + # --------------------------------------------------------------- + # Robot State Data (from sensors and estimation) + # --------------------------------------------------------------- + + - name: "base_angular_velocity" + enabled: true + # Description: Robot base angular velocity in body frame + # Dimension: 3 elements (roll, pitch, yaw rates) + # Units: radians/second + # Source: IMU sensor data + # Purpose: Provides current rotational motion of the robot base + + - name: "body_joint_positions" + enabled: true + # Description: Current robot joint positions + # Dimension: 29 elements (one per joint) + # Units: radians + # Source: Joint encoders via robot low-level state + # Purpose: Current actual joint positions for feedback control + + - name: "body_joint_velocities" + enabled: true + # Description: Current robot joint velocities + # Dimension: 29 elements (one per joint) + # Units: radians/second + # Source: Joint encoders via robot low-level state + # Purpose: Current actual joint velocities for feedback control + + # --------------------------------------------------------------- + # Control History + # --------------------------------------------------------------- + + - name: "last_actions" + enabled: true + # Description: Previous control action output + # Dimension: 29 elements (one per joint) + # Units: dimensionless (normalized action values) + # Purpose: Provides action history for temporal consistency + # Note: Helps with smooth control transitions + +# =================================================================== +# Configuration Summary +# =================================================================== +# +# Default Configuration Totals: +# - motion_joint_positions: 29D (enabled) [offset: 0] +# - motion_joint_velocities: 29D (enabled) [offset: 29] +# - motion_anchor_orientation: 6D (enabled) [offset: 58] +# - base_angular_velocity: 3D (enabled) [offset: 64] +# - body_joint_positions: 29D (enabled) [offset: 67] +# - body_joint_velocities: 29D (enabled) [offset: 96] +# - last_actions: 29D (enabled) [offset: 125] +# ---------------------------------------------------------------- +# Total Enabled Dimension: 154D +# +# This matches the standard G1 policy model input dimension of 154 +# +# =================================================================== +# Customization Examples +# =================================================================== +# +# Example 1: Disable motion velocities (for position-only policies) +# - name: "motion_joint_velocities" +# enabled: false +# +# Example 2: Disable last actions (for non-temporal policies) +# - name: "last_actions" +# enabled: false +# +# Example 3: Minimal configuration (position-only) +# observations: +# - name: "motion_joint_positions" +# enabled: true +# - name: "body_joint_positions" +# enabled: true +# # Total: 58D (29+29) +# +# Example 4: Reorder observations (offsets calculated automatically) +# observations: +# - name: "body_joint_positions" # Will get offset: 0 +# enabled: true +# - name: "motion_joint_positions" # Will get offset: 29 +# enabled: true +# # Automatic offset calculation based on order +# +# Example 5: Multi-frame observations with step intervals (for temporal dynamics) +# observations: +# - name: "motion_joint_positions_5frame_step5" # 145D (29 joints * 5 frames, step=5) +# enabled: true +# - name: "motion_joint_velocities_5frame_step5" # 145D (29 joints * 5 frames, step=5) +# enabled: true +# - name: "base_angular_velocity" # 3D (current frame only) +# enabled: true +# # Total: 293D (145+145+3) +# # Captures frames at: current, current+5, current+10, current+15, current+20 +# +# Example 6: Multi-frame with different step sizes +# observations: +# - name: "motion_joint_positions_5frame_step10" # 145D (step=10 for longer intervals) +# enabled: true +# # Captures frames at: current, current+10, current+20, current+30, current+40 +# +# Note: Multi-frame observations capture temporal patterns by sampling +# future frames at configurable intervals (step sizes) +# If future frames exceed motion length, repeats the last frame +# +# =================================================================== diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..893b960b226ea329a2936040502ce3bfd365360b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config.yaml @@ -0,0 +1,80 @@ +# G1 Deploy - Observation Configuration +# ==================================== +# Total dimension: 436 (64+12+116+116+116+12) + +observations: + + - name: "token_state" + enabled: true + + - name: "his_base_angular_velocity_10frame_step1" + enabled: true + + - name: "his_body_joint_positions_10frame_step1" + enabled: true + + - name: "his_body_joint_velocities_10frame_step1" + enabled: true + + - name: "his_last_actions_10frame_step1" + enabled: true + + - name: "his_gravity_dir_10frame_step1" + enabled: true + +encoder: + dimension: 64 + use_fp16: false + encoder_observations: + - name: "encoder_mode_4" + enabled: true + - name: "motion_joint_positions_10frame_step5" + enabled: true + - name: "motion_joint_velocities_10frame_step5" + enabled: true + - name: "motion_root_z_position_10frame_step5" + enabled: true + - name: "motion_root_z_position" + enabled: true + - name: "motion_anchor_orientation" + enabled: true + - name: "motion_anchor_orientation_10frame_step5" + enabled: true + - name: "motion_joint_positions_lowerbody_10frame_step5" + enabled: true + - name: "motion_joint_velocities_lowerbody_10frame_step5" + enabled: true + - name: "vr_3point_local_target" + enabled: true + - name: "vr_3point_local_orn_target" + enabled: true + - name: "smpl_joints_10frame_step1" + enabled: true + - name: "smpl_anchor_orientation_10frame_step1" + enabled: true + - name: "motion_joint_positions_wrists_10frame_step1" + enabled: true + encoder_modes: + - name: "g1" + mode_id: 0 + required_observations: + - encoder_mode_4 + - motion_joint_positions_10frame_step5 + - motion_joint_velocities_10frame_step5 + - motion_anchor_orientation_10frame_step5 + - name: "teleop" + mode_id: 1 + required_observations: + - encoder_mode_4 + - motion_joint_positions_lowerbody_10frame_step5 + - motion_joint_velocities_lowerbody_10frame_step5 + - vr_3point_local_target + - vr_3point_local_orn_target + - motion_anchor_orientation + - name: "smpl" + mode_id: 2 + required_observations: + - encoder_mode_4 + - smpl_joints_10frame_step1 + - smpl_anchor_orientation_10frame_step1 + - motion_joint_positions_wrists_10frame_step1 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_low_latency.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_low_latency.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d95ff3bad2124180be8d0a056eb8884eb186ce3f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_low_latency.yaml @@ -0,0 +1,92 @@ +# SONIC Release (Low-Latency) - Observation Configuration +# ======================================================= +# For ONNX models exported from the low-latency sonic_release checkpoint +# (smpl 4-frame lookahead; g1/teleop lookahead at step1, body-frame orientation). +# +# Encoder input dimension: 1247 Decoder/policy dimension: 994 token: 64 +# Uses the unitoken_all_noz tokenizer config (3 encoders: g1, teleop, smpl) +# +# Requires the smpl_*_4frame_step1 entries in GetObservationRegistry() +# (src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp) + a rebuild to load. + +observations: + + - name: "token_state" + enabled: true + + - name: "his_base_angular_velocity_10frame_step1" + enabled: true + + - name: "his_body_joint_positions_10frame_step1" + enabled: true + + - name: "his_body_joint_velocities_10frame_step1" + enabled: true + + - name: "his_last_actions_10frame_step1" + enabled: true + + - name: "his_gravity_dir_10frame_step1" + enabled: true + +encoder: + dimension: 64 + use_fp16: false + encoder_observations: + # Shared + - name: "encoder_mode_4" + enabled: true + # g1 encoder: command_multi_future_nonflat (positions + velocities), step1 + - name: "motion_joint_positions_10frame_step1" + enabled: true + - name: "motion_joint_velocities_10frame_step1" + enabled: true + # g1 encoder: motion_anchor_ori_b_mf_nonflat (body, multi-frame FIRST), step1 + - name: "motion_anchor_orientation_10frame_step1" + enabled: true + # teleop encoder: motion_anchor_ori_b (body, single-frame SECOND) + - name: "motion_anchor_orientation" + enabled: true + # teleop encoder: command_multi_future_lower_body, step1 + - name: "motion_joint_positions_lowerbody_10frame_step1" + enabled: true + - name: "motion_joint_velocities_lowerbody_10frame_step1" + enabled: true + # teleop encoder: vr_3point + - name: "vr_3point_local_target" + enabled: true + - name: "vr_3point_local_orn_target" + enabled: true + # smpl encoder: smpl_joints_multi_future_local_nonflat (4 frames, step1) <-- LOW-LATENCY + - name: "smpl_joints_4frame_step1" + enabled: true + # smpl encoder: smpl_root_ori_b_multi_future (body, 4 frames, step1) <-- LOW-LATENCY + - name: "smpl_anchor_orientation_4frame_step1" + enabled: true + # smpl encoder: joint_pos_multi_future_wrist_for_smpl (4 frames, step1) <-- LOW-LATENCY + - name: "motion_joint_positions_wrists_4frame_step1" + enabled: true + encoder_modes: + - name: "g1" + mode_id: 0 + required_observations: + - encoder_mode_4 + - motion_joint_positions_10frame_step1 + - motion_joint_velocities_10frame_step1 + - motion_anchor_orientation_10frame_step1 + - name: "teleop" + mode_id: 1 + required_observations: + - encoder_mode_4 + - motion_joint_positions_lowerbody_10frame_step1 + - motion_joint_velocities_lowerbody_10frame_step1 + - vr_3point_local_target + - vr_3point_local_orn_target + - motion_anchor_orientation + - name: "smpl" + mode_id: 2 + required_observations: + - encoder_mode_4 + - smpl_joints_4frame_step1 + - smpl_anchor_orientation_4frame_step1 + - motion_joint_positions_wrists_4frame_step1 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_release.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_release.yaml new file mode 100644 index 0000000000000000000000000000000000000000..07e2025ee02987f2704314d13d1430fd4a03806a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_release.yaml @@ -0,0 +1,79 @@ +# SONIC Release - Observation Configuration +# ========================================== +# For ONNX models exported from sonic_release checkpoint via: +# python gear_sonic/eval_agent_trl.py +checkpoint=sonic_release/last.pt \ +# +headless=True ++num_envs=1 +export_onnx_only=true +# +# Encoder input dimension: 1751 (1 encoder_index + 1750 tokenizer obs) +# Uses the unitoken_all_noz tokenizer config (3 encoders: g1, teleop, smpl) + +observations: + + - name: "token_state" + enabled: true + + - name: "his_base_angular_velocity_10frame_step1" + enabled: true + + - name: "his_body_joint_positions_10frame_step1" + enabled: true + + - name: "his_body_joint_velocities_10frame_step1" + enabled: true + + - name: "his_last_actions_10frame_step1" + enabled: true + + - name: "his_gravity_dir_10frame_step1" + enabled: true + +encoder: + dimension: 64 + use_fp16: false + encoder_observations: + # Used by all encoder modes + - name: "encoder_index" + enabled: true + # G1 mode + - name: "command_multi_future_nonflat" + enabled: true + - name: "motion_anchor_ori_b_mf_nonflat" + enabled: true + # Teleop mode + - name: "command_multi_future_lower_body" + enabled: true + - name: "vr_3point_local_target" + enabled: true + - name: "vr_3point_local_orn_target" + enabled: true + - name: "motion_anchor_ori_b" + enabled: true + # SMPL mode + - name: "smpl_joints_multi_future_local_nonflat" + enabled: true + - name: "smpl_root_ori_b_multi_future" + enabled: true + - name: "joint_pos_multi_future_wrist_for_smpl" + enabled: true + encoder_modes: + - name: "g1" + mode_id: 0 + required_observations: + - encoder_index + - command_multi_future_nonflat + - motion_anchor_ori_b_mf_nonflat + - name: "teleop" + mode_id: 1 + required_observations: + - encoder_index + - command_multi_future_lower_body + - vr_3point_local_target + - vr_3point_local_orn_target + - motion_anchor_ori_b + - name: "smpl" + mode_id: 2 + required_observations: + - encoder_index + - smpl_joints_multi_future_local_nonflat + - smpl_root_ori_b_multi_future + - joint_pos_multi_future_wrist_for_smpl diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_v1_1.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_v1_1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..986bc2af0f6e7835d1453ae3902da388759e328b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/release/observation_config_sonic_v1_1.yaml @@ -0,0 +1,74 @@ +# SONIC v1.1 - Observation Configuration +# ================================================= +# Matches sonic_v1_1/model_encoder.onnx and model_decoder.onnx. +# +# Encoder input: 1751 Decoder input: 994 Token: 64 +# G1/teleop references use 10 frames at step5. SMPL and wrist references use +# 10 frames at step1. Root orientations are normalized by robot heading. + +observations: + - name: "token_state" + enabled: true + - name: "his_base_angular_velocity_10frame_step1" + enabled: true + - name: "his_body_joint_positions_10frame_step1" + enabled: true + - name: "his_body_joint_velocities_10frame_step1" + enabled: true + - name: "his_last_actions_10frame_step1" + enabled: true + - name: "his_gravity_dir_10frame_step1" + enabled: true + +encoder: + dimension: 64 + use_fp16: false + encoder_observations: + - name: "encoder_mode_4" + enabled: true + - name: "motion_joint_positions_10frame_step5" + enabled: true + - name: "motion_joint_velocities_10frame_step5" + enabled: true + - name: "motion_anchor_orientation_heading_10frame_step5" + enabled: true + - name: "motion_anchor_orientation_heading" + enabled: true + - name: "motion_joint_positions_lowerbody_10frame_step5" + enabled: true + - name: "motion_joint_velocities_lowerbody_10frame_step5" + enabled: true + - name: "vr_3point_local_target" + enabled: true + - name: "vr_3point_local_orn_target" + enabled: true + - name: "smpl_joints_10frame_step1" + enabled: true + - name: "smpl_anchor_orientation_heading_10frame_step1" + enabled: true + - name: "motion_joint_positions_wrists_10frame_step1" + enabled: true + encoder_modes: + - name: "g1" + mode_id: 0 + required_observations: + - encoder_mode_4 + - motion_joint_positions_10frame_step5 + - motion_joint_velocities_10frame_step5 + - motion_anchor_orientation_heading_10frame_step5 + - name: "teleop" + mode_id: 1 + required_observations: + - encoder_mode_4 + - motion_joint_positions_lowerbody_10frame_step5 + - motion_joint_velocities_lowerbody_10frame_step5 + - vr_3point_local_target + - vr_3point_local_orn_target + - motion_anchor_orientation_heading + - name: "smpl" + mode_id: 2 + required_observations: + - encoder_mode_4 + - smpl_joints_10frame_step1 + - smpl_anchor_orientation_heading_10frame_step1 + - motion_joint_positions_wrists_10frame_step1 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/sonic_v1_1/observation_config.yaml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/sonic_v1_1/observation_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..986bc2af0f6e7835d1453ae3902da388759e328b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/policy/sonic_v1_1/observation_config.yaml @@ -0,0 +1,74 @@ +# SONIC v1.1 - Observation Configuration +# ================================================= +# Matches sonic_v1_1/model_encoder.onnx and model_decoder.onnx. +# +# Encoder input: 1751 Decoder input: 994 Token: 64 +# G1/teleop references use 10 frames at step5. SMPL and wrist references use +# 10 frames at step1. Root orientations are normalized by robot heading. + +observations: + - name: "token_state" + enabled: true + - name: "his_base_angular_velocity_10frame_step1" + enabled: true + - name: "his_body_joint_positions_10frame_step1" + enabled: true + - name: "his_body_joint_velocities_10frame_step1" + enabled: true + - name: "his_last_actions_10frame_step1" + enabled: true + - name: "his_gravity_dir_10frame_step1" + enabled: true + +encoder: + dimension: 64 + use_fp16: false + encoder_observations: + - name: "encoder_mode_4" + enabled: true + - name: "motion_joint_positions_10frame_step5" + enabled: true + - name: "motion_joint_velocities_10frame_step5" + enabled: true + - name: "motion_anchor_orientation_heading_10frame_step5" + enabled: true + - name: "motion_anchor_orientation_heading" + enabled: true + - name: "motion_joint_positions_lowerbody_10frame_step5" + enabled: true + - name: "motion_joint_velocities_lowerbody_10frame_step5" + enabled: true + - name: "vr_3point_local_target" + enabled: true + - name: "vr_3point_local_orn_target" + enabled: true + - name: "smpl_joints_10frame_step1" + enabled: true + - name: "smpl_anchor_orientation_heading_10frame_step1" + enabled: true + - name: "motion_joint_positions_wrists_10frame_step1" + enabled: true + encoder_modes: + - name: "g1" + mode_id: 0 + required_observations: + - encoder_mode_4 + - motion_joint_positions_10frame_step5 + - motion_joint_velocities_10frame_step5 + - motion_anchor_orientation_heading_10frame_step5 + - name: "teleop" + mode_id: 1 + required_observations: + - encoder_mode_4 + - motion_joint_positions_lowerbody_10frame_step5 + - motion_joint_velocities_lowerbody_10frame_step5 + - vr_3point_local_target + - vr_3point_local_orn_target + - motion_anchor_orientation_heading + - name: "smpl" + mode_id: 2 + required_observations: + - encoder_mode_4 + - smpl_joints_10frame_step1 + - smpl_anchor_orientation_heading_10frame_step1 + - motion_joint_positions_wrists_10frame_step1 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/convert_motions.py b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/convert_motions.py new file mode 100644 index 0000000000000000000000000000000000000000..98e7d99c0eee1875e4a46f85fd570dc793bc0b40 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/convert_motions.py @@ -0,0 +1,274 @@ +#!/usr/bin/env python3 +""" +Convert G1 motion capture data from joblib pickle to C++ readable formats +Converts motion sequences with joint positions, velocities, and full body kinematics +""" + +import sys +import os + +def convert_motion_data(pkl_file, base_output_dir=None): + """Convert the motion pickle file to C++ readable formats""" + + # Create organized folder structure: reference/{pkl_name}/ + pkl_name = os.path.splitext(os.path.basename(pkl_file))[0] # Extract filename without extension + + if base_output_dir is None: + # Default: put in reference folder structure + base_output_dir = os.path.join(os.path.dirname(pkl_file), pkl_name) + + print(f"Converting motion data from: {pkl_file}") + print(f"Output directory structure: {base_output_dir}/") + + # Load the data + try: + import joblib + data = joblib.load(pkl_file) + print("✓ Successfully loaded with joblib") + except ImportError: + print("✗ joblib not available, trying pickle...") + try: + import pickle + with open(pkl_file, 'rb') as f: + data = pickle.load(f) + print("✓ Successfully loaded with pickle") + except Exception as e: + print(f"✗ Failed to load: {e}") + return False + except Exception as e: + print(f"✗ Failed to load with joblib: {e}") + return False + + # Create base output directory + os.makedirs(base_output_dir, exist_ok=True) + + print(f"\nFound {len(data)} motion sequences:") + for motion_name in data.keys(): + print(f" - {motion_name}") + + # Convert each motion sequence + success_count = 0 + for motion_name, motion_data in data.items(): + print(f"\nProcessing: {motion_name}") + + # Create individual folder for this motion + motion_output_dir = os.path.join(base_output_dir, motion_name) + print(f"Creating individual folder for this motion: {motion_output_dir}") + os.makedirs(motion_output_dir, exist_ok=True) + + if convert_single_motion(motion_name, motion_data, motion_output_dir): + success_count += 1 + + # Create summary file in base directory + create_summary_file(data, base_output_dir) + + print(f"\n✓ Successfully converted {success_count}/{len(data)} motions") + print(f"Output files saved to: {base_output_dir}/") + + # Extract counts from first motion for summary + joint_count = None + body_count = None + if data: + first_motion = next(iter(data.values())) + joint_count = first_motion['joint_pos'].shape[1] + body_count = first_motion['body_pos_w'].shape[1] + + return success_count > 0, len(data), joint_count, body_count + +def convert_single_motion(motion_name, motion_data, output_dir): + """Convert a single motion sequence to various formats""" + + try: + # Extract ALL available data arrays + joint_pos = motion_data['joint_pos'] # Shape: (timesteps, 29) + joint_vel = motion_data['joint_vel'] # Shape: (timesteps, 29) + body_pos_w = motion_data['body_pos_w'] # Shape: (timesteps, 14, 3) + body_quat_w = motion_data['body_quat_w'] # Shape: (timesteps, 14, 4) + body_lin_vel_w = motion_data['body_lin_vel_w'] # Shape: (timesteps, 14, 3) + body_ang_vel_w = motion_data['body_ang_vel_w'] # Shape: (timesteps, 14, 3) + + timesteps = joint_pos.shape[0] + print(f" Timesteps: {timesteps}, Joints: {joint_pos.shape[1]}, Body parts: {body_pos_w.shape[1]}") + + # 1. Save joint data as CSV + joint_pos_file = os.path.join(output_dir, "joint_pos.csv") + save_array_as_csv(joint_pos, joint_pos_file, + [f"joint_{i}" for i in range(joint_pos.shape[1])]) + + joint_vel_file = os.path.join(output_dir, "joint_vel.csv") + save_array_as_csv(joint_vel, joint_vel_file, + [f"joint_vel_{i}" for i in range(joint_vel.shape[1])]) + + # 2. Save body position data (reshape to 2D for CSV) + body_pos_reshaped = body_pos_w.reshape(timesteps, -1) # (timesteps, 14*3) + body_pos_file = os.path.join(output_dir, "body_pos.csv") + body_pos_headers = [f"body_{i//3}_{'xyz'[i%3]}" for i in range(body_pos_reshaped.shape[1])] + save_array_as_csv(body_pos_reshaped, body_pos_file, body_pos_headers) + + # 3. Save body quaternion data (reshape to 2D for CSV) + body_quat_reshaped = body_quat_w.reshape(timesteps, -1) # (timesteps, 14*4) + body_quat_file = os.path.join(output_dir, "body_quat.csv") + body_quat_headers = [f"body_{i//4}_{'wxyz'[i%4]}" for i in range(body_quat_reshaped.shape[1])] + save_array_as_csv(body_quat_reshaped, body_quat_file, body_quat_headers) + + # 4. Save body linear velocity data + body_lin_vel_reshaped = body_lin_vel_w.reshape(timesteps, -1) # (timesteps, 14*3) + body_lin_vel_file = os.path.join(output_dir, "body_lin_vel.csv") + body_lin_vel_headers = [f"body_{i//3}_vel_{'xyz'[i%3]}" for i in range(body_lin_vel_reshaped.shape[1])] + save_array_as_csv(body_lin_vel_reshaped, body_lin_vel_file, body_lin_vel_headers) + + # 5. Save body angular velocity data + body_ang_vel_reshaped = body_ang_vel_w.reshape(timesteps, -1) # (timesteps, 14*3) + body_ang_vel_file = os.path.join(output_dir, "body_ang_vel.csv") + body_ang_vel_headers = [f"body_{i//3}_angvel_{'xyz'[i%3]}" for i in range(body_ang_vel_reshaped.shape[1])] + save_array_as_csv(body_ang_vel_reshaped, body_ang_vel_file, body_ang_vel_headers) + + # 6. Save metadata + metadata_file = os.path.join(output_dir, "metadata.txt") + save_metadata(motion_name, motion_data, metadata_file) + + # 7. Save detailed info + info_file = os.path.join(output_dir, "info.txt") + save_motion_info(motion_name, motion_data, info_file) + + print(f" ✓ Saved 7 files for {motion_name} (joints + full body kinematics)") + return True + + except Exception as e: + print(f" ✗ Error processing {motion_name}: {e}") + return False + +def save_array_as_csv(array, filename, headers=None): + """Save numpy array as CSV file""" + import numpy as np + + with open(filename, 'w') as f: + # Write header + if headers: + f.write(",".join(headers) + "\n") + else: + f.write(",".join([f"col_{i}" for i in range(array.shape[1])]) + "\n") + + # Write data + for row in array: + f.write(",".join([f"{val:.6f}" for val in row]) + "\n") + + +def save_metadata(motion_name, motion_data, filename): + """Save metadata and indices information""" + + with open(filename, 'w') as f: + f.write(f"Metadata for: {motion_name}\n") + f.write("=" * 30 + "\n\n") + + # Save body indexes if available + if '_body_indexes' in motion_data: + f.write("Body part indexes:\n") + f.write(f"{motion_data['_body_indexes']}\n\n") + + # Save total timestep count + if 'time_step_total' in motion_data: + f.write(f"Total timesteps: {motion_data['time_step_total']}\n\n") + + # Data summary + f.write("Data arrays summary:\n") + for key, value in motion_data.items(): + if hasattr(value, 'shape'): + f.write(f" {key}: {value.shape} ({value.dtype})\n") + +def save_motion_info(motion_name, motion_data, filename): + """Save detailed motion information""" + + with open(filename, 'w') as f: + f.write(f"Motion Information: {motion_name}\n") + f.write("=" * 50 + "\n\n") + + for key, value in motion_data.items(): + f.write(f"{key}:\n") + if hasattr(value, 'shape'): + f.write(f" Shape: {value.shape}\n") + f.write(f" Dtype: {value.dtype}\n") + if value.size > 0: + flat_vals = value.flatten() + f.write(f" Range: [{flat_vals.min():.3f}, {flat_vals.max():.3f}]\n") + f.write(f" Sample: {flat_vals[:5]}\n") + else: + f.write(f" Value: {value}\n") + f.write("\n") + +def create_summary_file(data, output_dir): + """Create a summary file with all motion information""" + + summary_file = os.path.join(output_dir, "motion_summary.txt") + + with open(summary_file, 'w') as f: + f.write("G1 Motion Capture Data Summary\n") + f.write("=" * 40 + "\n\n") + f.write(f"Total motion sequences: {len(data)}\n\n") + + + # Detailed motion list + f.write("Detailed motion list:\n") + for motion_name, motion_data in data.items(): + joint_pos = motion_data['joint_pos'] + f.write(f" {motion_name}:\n") + f.write(f" Timesteps: {joint_pos.shape[0]}\n") + f.write(f" Joints: {joint_pos.shape[1]}\n") + f.write(f" Body parts: {motion_data['body_pos_w'].shape[1]}\n") + f.write("\n") + +def main(): + if len(sys.argv) < 2: + print("Usage: python3 convert_motions.py [output_base_dir]") + print("Examples:") + print(" python3 convert_motions.py bones_072925_test.pkl") + print(" python3 convert_motions.py bones_072925_test.pkl custom_output/") + print("") + print("Default output structure: reference/{pkl_name}/{motion_name}/") + return + + pkl_file = sys.argv[1] + output_base_dir = sys.argv[2] if len(sys.argv) > 2 else None + + if not os.path.exists(pkl_file): + print(f"Error: File not found: {pkl_file}") + return + + # Extract pkl name for output messages + pkl_name = os.path.splitext(os.path.basename(pkl_file))[0] + + print("G1 Motion Data Converter") + print("========================") + + success, motion_count, joint_count, body_count = convert_motion_data(pkl_file, output_base_dir) + if success: + print("\n✓ Conversion completed successfully!") + print("\nExtracted data for each motion:") + print(f"- Joint positions & velocities ({joint_count} joints)") + print(f"- Body positions in world coordinates ({body_count} body parts)") + print("- Body orientations (quaternions)") + print("- Body linear & angular velocities") + print("- Metadata and body part indices") + print("\nNext steps:") + print(f"1. Build C++ reader: make motion_data_reader") + print(f"2. Test reading: ./bin/motion_data_reader reference/{pkl_name}/") + print("3. Use full kinematic data in your G1 control programs") + print("\nFile structure created:") + print(f"reference/{pkl_name}/") + print("├── [motion_name_1]/") + print("│ ├── joint_pos.csv") + print("│ ├── joint_vel.csv") + print("│ ├── body_pos.csv") + print("│ ├── body_quat.csv") + print("│ ├── body_lin_vel.csv") + print("│ ├── body_ang_vel.csv") + print("│ ├── metadata.txt") + print("│ └── info.txt") + print("├── [motion_name_2]/") + print("├── motion_summary.txt") + print(f"└── ... ({motion_count} motion folders total)") + else: + print("\n✗ Conversion failed") + +if __name__ == "__main__": + main() diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..c745c551d0917b175c688bb2002745cf9aab6923 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/info.txt @@ -0,0 +1,52 @@ +Motion Information: dance_in_da_party_001__A464 +================================================== + +joint_pos: + Shape: (497, 29) + Dtype: float32 + Range: [-1.868, 2.226] + Sample: [ 0.12844084 0.10271313 0.0201158 -0.01923597 0.02096039] + +joint_vel: + Shape: (497, 29) + Dtype: float32 + Range: [-20.223, 20.504] + Sample: [0.14367104 0.14386438 0. 0. 0. ] + +body_pos_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-0.525, 1.307] + Sample: [2.7894555e-04 1.4439992e-02 7.9243100e-01 1.1525212e-01 1.0816078e-02] + +body_quat_w: + Shape: (497, 14, 4) + Dtype: float32 + Range: [-0.707, 0.998] + Sample: [-0.7035716 0.02096497 0.01313119 0.71019363 -0.70268404] + +body_lin_vel_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-2.763, 2.750] + Sample: [-0.00116042 -0.02408473 -0.00280159 -0.00131542 -0.02102444] + +body_ang_vel_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-12.991, 16.331] + Sample: [ 2.82337610e-03 9.97470808e-04 -2.06027436e-03 1.01761095e-01 + -4.19195203e-05] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [497.000, 497.000] + Sample: [497] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..df7e43f432c377a7504f4c4bab7f68b35353e8fa --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: dance_in_da_party_001__A464 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 497 + +Data arrays summary: + joint_pos: (497, 29) (float32) + joint_vel: (497, 29) (float32) + body_pos_w: (497, 14, 3) (float32) + body_quat_w: (497, 14, 4) (float32) + body_lin_vel_w: (497, 14, 3) (float32) + body_ang_vel_w: (497, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..afa759c6007aed1edb3e95ead8ed5594f21ad9ed --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/info.txt @@ -0,0 +1,52 @@ +Motion Information: dance_in_da_party_001__A464_M +================================================== + +joint_pos: + Shape: (497, 29) + Dtype: float32 + Range: [-1.868, 2.226] + Sample: [ 0.10277859 0.12832902 -0.02010582 -0.0212364 0.01920657] + +joint_vel: + Shape: (497, 29) + Dtype: float32 + Range: [-20.223, 20.504] + Sample: [0.14217682 0.14665052 0. 0. 0. ] + +body_pos_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-0.537, 1.307] + Sample: [-2.83326663e-04 1.44427223e-02 7.92431474e-01 1.17636755e-01 + 1.22397467e-02] + +body_quat_w: + Shape: (497, 14, 4) + Dtype: float32 + Range: [-0.707, 0.998] + Sample: [ 0.7101825 -0.01322068 -0.0210839 -0.7035777 0.70851105] + +body_lin_vel_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-2.763, 2.579] + Sample: [ 0.00117058 -0.02414531 -0.00281086 0.00139649 -0.02009862] + +body_ang_vel_w: + Shape: (497, 14, 3) + Dtype: float32 + Range: [-16.230, 12.991] + Sample: [ 0.00225733 -0.00063545 0.00251273 0.10681088 0.0040871 ] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [497.000, 497.000] + Sample: [497] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..d5d4431311cec4e7d36024b3430e7615f2ab3a91 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/dance_in_da_party_001__A464_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: dance_in_da_party_001__A464_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 497 + +Data arrays summary: + joint_pos: (497, 29) (float32) + joint_vel: (497, 29) (float32) + body_pos_w: (497, 14, 3) (float32) + body_quat_w: (497, 14, 4) (float32) + body_lin_vel_w: (497, 14, 3) (float32) + body_ang_vel_w: (497, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..886074dde3cc72aaa29ca8001675849a3f8a520d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/info.txt @@ -0,0 +1,51 @@ +Motion Information: forward_lunge_R_001__A359_M +================================================== + +joint_pos: + Shape: (399, 29) + Dtype: float32 + Range: [-1.516, 1.847] + Sample: [ 0.21495092 0.21319595 -0.0629773 -0.03622465 0.0364784 ] + +joint_vel: + Shape: (399, 29) + Dtype: float32 + Range: [-6.573, 7.911] + Sample: [ 0. -0.07231236 0. 0. 0. ] + +body_pos_w: + Shape: (399, 14, 3) + Dtype: float32 + Range: [-0.749, 1.083] + Sample: [0.00151141 0.01061182 0.79061526 0.11847792 0.00413224] + +body_quat_w: + Shape: (399, 14, 4) + Dtype: float32 + Range: [-0.707, 0.951] + Sample: [ 0.7101441 -0.0368785 -0.03962614 -0.70197237 0.71026546] + +body_lin_vel_w: + Shape: (399, 14, 3) + Dtype: float32 + Range: [-2.788, 2.510] + Sample: [ 0.00209634 -0.00167504 -0.01071004 -0.00232031 0.00457859] + +body_ang_vel_w: + Shape: (399, 14, 3) + Dtype: float32 + Range: [-6.113, 7.547] + Sample: [ 0.1587345 0.02668758 -0.10707712 0.09136587 0.00318161] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [399.000, 399.000] + Sample: [399] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..574e3a7eaa1c9f704cd31a8480624599278d7def --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/forward_lunge_R_001__A359_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: forward_lunge_R_001__A359_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 399 + +Data arrays summary: + joint_pos: (399, 29) (float32) + joint_vel: (399, 29) (float32) + body_pos_w: (399, 14, 3) (float32) + body_quat_w: (399, 14, 4) (float32) + body_lin_vel_w: (399, 14, 3) (float32) + body_ang_vel_w: (399, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..741f0f87ec07289c86e3bb58b57974fff3863d06 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/info.txt @@ -0,0 +1,54 @@ +Motion Information: macarena_001__A545 +================================================== + +joint_pos: + Shape: (1375, 29) + Dtype: float32 + Range: [-1.839, 1.703] + Sample: [-0.10820262 -0.12627353 -0.04614628 0.17931442 0.03701398] + +joint_vel: + Shape: (1375, 29) + Dtype: float32 + Range: [-16.128, 17.410] + Sample: [-0.6181218 0. 0.19610636 0.40379167 0.22178088] + +body_pos_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-0.461, 1.258] + Sample: [-5.8091094e-04 1.5418809e-02 7.8600091e-01 1.1273000e-01 + 3.0267565e-03] + +body_quat_w: + Shape: (1375, 14, 4) + Dtype: float32 + Range: [-0.707, 1.000] + Sample: [-6.7035830e-01 -5.1285548e-04 -1.2871666e-02 7.4192578e-01 + -6.7212301e-01] + +body_lin_vel_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-2.083, 2.181] + Sample: [-0.07513097 0.0133487 -0.02677997 -0.09454302 0.01350545] + +body_ang_vel_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-16.576, 15.656] + Sample: [-5.7085539e-04 1.4832462e-01 1.8231243e-01 -7.0407879e-01 + -1.9635165e-01] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [1375.000, 1375.000] + Sample: [1375] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..416e44eacab5e7fd5c88690dfecbccc6427856ca --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: macarena_001__A545 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 1375 + +Data arrays summary: + joint_pos: (1375, 29) (float32) + joint_vel: (1375, 29) (float32) + body_pos_w: (1375, 14, 3) (float32) + body_quat_w: (1375, 14, 4) (float32) + body_lin_vel_w: (1375, 14, 3) (float32) + body_ang_vel_w: (1375, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..ea72016a5ae026c70b1a24c7cd3632c8b1888fcd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/info.txt @@ -0,0 +1,52 @@ +Motion Information: macarena_001__A545_M +================================================== + +joint_pos: + Shape: (1375, 29) + Dtype: float32 + Range: [-1.752, 1.839] + Sample: [-0.12627211 -0.1081429 0.04614829 -0.03699337 -0.17927563] + +joint_vel: + Shape: (1375, 29) + Dtype: float32 + Range: [-17.410, 16.353] + Sample: [ 0. -0.6198224 -0.19615404 -0.22224468 -0.4047744 ] + +body_pos_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-0.428, 1.258] + Sample: [5.7239551e-04 1.5415414e-02 7.8600442e-01 1.1899064e-01 2.5980033e-02] + +body_quat_w: + Shape: (1375, 14, 4) + Dtype: float32 + Range: [-0.707, 1.000] + Sample: [ 7.4192613e-01 1.2869124e-02 5.1390840e-04 -6.7035794e-01 + 7.3185688e-01] + +body_lin_vel_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-1.572, 2.181] + Sample: [ 0.07525253 0.0134165 -0.02684434 0.09596311 -0.00692309] + +body_ang_vel_w: + Shape: (1375, 14, 3) + Dtype: float32 + Range: [-15.288, 16.576] + Sample: [-0.00054383 -0.14689815 -0.18050767 0.00343074 0.08365735] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [1375.000, 1375.000] + Sample: [1375] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..4ee76bcb5170cb24be301842c0351e2d43f5c4ec --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/macarena_001__A545_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: macarena_001__A545_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 1375 + +Data arrays summary: + joint_pos: (1375, 29) (float32) + joint_vel: (1375, 29) (float32) + body_pos_w: (1375, 14, 3) (float32) + body_quat_w: (1375, 14, 4) (float32) + body_lin_vel_w: (1375, 14, 3) (float32) + body_ang_vel_w: (1375, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..742cc0176981f200d2d51fc5a1549677e48e5b39 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/info.txt @@ -0,0 +1,52 @@ +Motion Information: neutral_kick_R_001__A543 +================================================== + +joint_pos: + Shape: (165, 29) + Dtype: float32 + Range: [-1.511, 2.231] + Sample: [ 0.0102154 -0.02437789 -0.00672904 0.01929011 0.01479329] + +joint_vel: + Shape: (165, 29) + Dtype: float32 + Range: [-18.290, 20.364] + Sample: [-0.20629734 -0.50493777 0. 0. -0.0665314 ] + +body_pos_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-0.350, 1.138] + Sample: [ 2.5986615e-04 -2.1045217e-03 7.8969425e-01 -1.1502424e-01 + -9.6319402e-03] + +body_quat_w: + Shape: (165, 14, 4) + Dtype: float32 + Range: [-0.658, 0.962] + Sample: [ 0.70344394 -0.01907959 0.01310167 0.7103738 0.7017253 ] + +body_lin_vel_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-3.077, 4.037] + Sample: [-0.00510128 -0.00777466 -0.01248983 -0.01428711 -0.00505795] + +body_ang_vel_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-13.461, 10.895] + Sample: [-0.18448198 0.06041717 -0.20089665 0.01372697 0.04333916] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [165.000, 165.000] + Sample: [165] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..403a86c202e83cc09e10e60f80d9716f1fb353ed --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: neutral_kick_R_001__A543 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 165 + +Data arrays summary: + joint_pos: (165, 29) (float32) + joint_vel: (165, 29) (float32) + body_pos_w: (165, 14, 3) (float32) + body_quat_w: (165, 14, 4) (float32) + body_lin_vel_w: (165, 14, 3) (float32) + body_ang_vel_w: (165, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..d47981a9c9977db101dfbb88dbfa864a05f53463 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/info.txt @@ -0,0 +1,52 @@ +Motion Information: neutral_kick_R_001__A543_M +================================================== + +joint_pos: + Shape: (165, 29) + Dtype: float32 + Range: [-1.511, 2.231] + Sample: [-0.02438436 0.01020973 0.0067296 -0.01478768 -0.01928544] + +joint_vel: + Shape: (165, 29) + Dtype: float32 + Range: [-18.290, 20.364] + Sample: [-0.5047629 -0.20612705 0. 0.06651222 0. ] + +body_pos_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-0.351, 1.138] + Sample: [-2.5653988e-04 -2.1049839e-03 7.8969407e-01 -1.1784680e-01 + -6.2525691e-03] + +body_quat_w: + Shape: (165, 14, 4) + Dtype: float32 + Range: [-0.674, 0.962] + Sample: [ 0.71037376 -0.0131016 0.01907985 0.703444 0.7091498 ] + +body_lin_vel_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-3.077, 4.037] + Sample: [ 0.00510508 -0.00776416 -0.01248534 0.01384882 -0.0365492 ] + +body_ang_vel_w: + Shape: (165, 14, 3) + Dtype: float32 + Range: [-10.156, 13.797] + Sample: [-0.18570669 -0.06071702 0.20189351 0.40606773 0.00312011] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [165.000, 165.000] + Sample: [165] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..86b1149cdcf6032b6b3fe36e0120d2637e5a3f9c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/neutral_kick_R_001__A543_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: neutral_kick_R_001__A543_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 165 + +Data arrays summary: + joint_pos: (165, 29) (float32) + joint_vel: (165, 29) (float32) + body_pos_w: (165, 14, 3) (float32) + body_quat_w: (165, 14, 4) (float32) + body_lin_vel_w: (165, 14, 3) (float32) + body_ang_vel_w: (165, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..1a3588457a4920fc2ef99eff709d936c66a66426 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/info.txt @@ -0,0 +1,51 @@ +Motion Information: squat_001__A359 +================================================== + +joint_pos: + Shape: (424, 29) + Dtype: float32 + Range: [-2.215, 2.576] + Sample: [ 0.15727139 0.15096666 0.04344312 -0.00495214 0.00737908] + +joint_vel: + Shape: (424, 29) + Dtype: float32 + Range: [-4.688, 4.380] + Sample: [0.06294921 0.07401705 0. 0. 0. ] + +body_pos_w: + Shape: (424, 14, 3) + Dtype: float32 + Range: [-0.364, 1.085] + Sample: [-0.00253593 0.01265665 0.79256266 0.11277536 0.00799088] + +body_quat_w: + Shape: (424, 14, 4) + Dtype: float32 + Range: [-0.707, 0.778] + Sample: [ 0.7121807 -0.03302116 -0.02697971 -0.70069987 0.711816 ] + +body_lin_vel_w: + Shape: (424, 14, 3) + Dtype: float32 + Range: [-1.232, 1.069] + Sample: [-0.00345908 0.01068808 0.00030054 -0.00323385 0.01278332] + +body_ang_vel_w: + Shape: (424, 14, 3) + Dtype: float32 + Range: [-4.028, 3.743] + Sample: [ 0.00429551 -0.00147157 0.01170849 -0.00151611 -0.00085008] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [424.000, 424.000] + Sample: [424] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..a484e1268214df01302fafd3f70c1b1db0ebba2e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/squat_001__A359/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: squat_001__A359 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 424 + +Data arrays summary: + joint_pos: (424, 29) (float32) + joint_vel: (424, 29) (float32) + body_pos_w: (424, 14, 3) (float32) + body_quat_w: (424, 14, 4) (float32) + body_lin_vel_w: (424, 14, 3) (float32) + body_ang_vel_w: (424, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..0181cb5782276205bda070b870a98409857f4472 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/info.txt @@ -0,0 +1,51 @@ +Motion Information: tired_forward_lunge_R_001__A359_M +================================================== + +joint_pos: + Shape: (810, 29) + Dtype: float32 + Range: [-1.681, 2.251] + Sample: [ 0.10455281 0.12311819 -0.13420933 0.0210929 0.01301001] + +joint_vel: + Shape: (810, 29) + Dtype: float32 + Range: [-29.172, 24.785] + Sample: [0. 0. 0. 0. 0.] + +body_pos_w: + Shape: (810, 14, 3) + Dtype: float32 + Range: [-0.830, 1.122] + Sample: [ 0.00363829 0.01252624 0.78668284 0.11977606 -0.00450246] + +body_quat_w: + Shape: (810, 14, 4) + Dtype: float32 + Range: [-0.707, 0.968] + Sample: [-0.6985865 0.04820039 0.04724668 0.71233517 -0.6972264 ] + +body_lin_vel_w: + Shape: (810, 14, 3) + Dtype: float32 + Range: [-2.633, 2.705] + Sample: [ 0.00514652 -0.0242208 0.00147181 0.0059143 -0.02151402] + +body_ang_vel_w: + Shape: (810, 14, 3) + Dtype: float32 + Range: [-9.584, 12.844] + Sample: [ 0.01855543 -0.00674082 0.00205783 0.04113024 0.00938711] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [810.000, 810.000] + Sample: [810] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..c054b637577ae8fd5a5ed1c4cd24fd24e63bf2fa --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_forward_lunge_R_001__A359_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: tired_forward_lunge_R_001__A359_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 810 + +Data arrays summary: + joint_pos: (810, 29) (float32) + joint_vel: (810, 29) (float32) + body_pos_w: (810, 14, 3) (float32) + body_quat_w: (810, 14, 4) (float32) + body_lin_vel_w: (810, 14, 3) (float32) + body_ang_vel_w: (810, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a0f73fb2fae81f95db15ed8f4a3740e8fb3d4dd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/info.txt @@ -0,0 +1,53 @@ +Motion Information: tired_one_leg_jumping_R_001__A359 +================================================== + +joint_pos: + Shape: (500, 29) + Dtype: float32 + Range: [-2.466, 2.544] + Sample: [ 0.19818522 0.18190861 0.05533926 -0.01394359 0.01180514] + +joint_vel: + Shape: (500, 29) + Dtype: float32 + Range: [-24.277, 29.521] + Sample: [0.08117855 0.10404438 0. 0. 0. ] + +body_pos_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-0.638, 1.389] + Sample: [-3.7561040e-03 1.1930190e-02 7.9080468e-01 1.1164543e-01 + -1.8159859e-04] + +body_quat_w: + Shape: (500, 14, 4) + Dtype: float32 + Range: [-0.707, 0.994] + Sample: [-0.7018543 0.04748023 0.04207473 0.7094899 -0.7020061 ] + +body_lin_vel_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-2.468, 3.083] + Sample: [-0.00731237 0.00322476 -0.00184366 -0.0072301 0.0033868 ] + +body_ang_vel_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-13.765, 14.489] + Sample: [-2.3229383e-02 9.2615977e-05 7.7703241e-03 3.2781955e-02 + -2.4797707e-03] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [500.000, 500.000] + Sample: [500] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..e0c04aa7da47c55aecf8061065d981e28efb9b95 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: tired_one_leg_jumping_R_001__A359 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 500 + +Data arrays summary: + joint_pos: (500, 29) (float32) + joint_vel: (500, 29) (float32) + body_pos_w: (500, 14, 3) (float32) + body_quat_w: (500, 14, 4) (float32) + body_lin_vel_w: (500, 14, 3) (float32) + body_ang_vel_w: (500, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..61492c27d645b0c207bd8f6d59f0c87988508955 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/info.txt @@ -0,0 +1,51 @@ +Motion Information: tired_one_leg_jumping_R_001__A359_M +================================================== + +joint_pos: + Shape: (500, 29) + Dtype: float32 + Range: [-2.466, 2.544] + Sample: [ 0.18195386 0.19815134 -0.05533458 -0.01181217 0.01394258] + +joint_vel: + Shape: (500, 29) + Dtype: float32 + Range: [-25.521, 29.521] + Sample: [0.10270029 0.0821501 0. 0. 0. ] + +body_pos_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-0.638, 1.389] + Sample: [0.00375429 0.0119299 0.7908045 0.12123838 0.00211857] + +body_quat_w: + Shape: (500, 14, 4) + Dtype: float32 + Range: [-0.707, 0.994] + Sample: [ 0.70963436 -0.04173436 -0.04712047 -0.7017528 0.709552 ] + +body_lin_vel_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-2.468, 3.083] + Sample: [ 0.00727609 0.00323505 -0.00185661 0.00736587 -0.00425211] + +body_ang_vel_w: + Shape: (500, 14, 3) + Dtype: float32 + Range: [-14.474, 12.502] + Sample: [-0.04819455 -0.00166482 -0.01665068 0.0203299 0.0001879 ] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [500.000, 500.000] + Sample: [500] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..37e1e0e6518667f18676a28fecf50202919e08a1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/tired_one_leg_jumping_R_001__A359_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: tired_one_leg_jumping_R_001__A359_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 500 + +Data arrays summary: + joint_pos: (500, 29) (float32) + joint_vel: (500, 29) (float32) + body_pos_w: (500, 14, 3) (float32) + body_quat_w: (500, 14, 4) (float32) + body_lin_vel_w: (500, 14, 3) (float32) + body_ang_vel_w: (500, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..e6a1cd5ad3c261a373a6b1377ddaf48a623258f1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/info.txt @@ -0,0 +1,51 @@ +Motion Information: walking_quip_360_R_002__A428 +================================================== + +joint_pos: + Shape: (455, 29) + Dtype: float32 + Range: [-1.350, 1.403] + Sample: [ 0.0239802 0.01111414 -0.06473327 0.01455649 -0.05278705] + +joint_vel: + Shape: (455, 29) + Dtype: float32 + Range: [-10.128, 10.542] + Sample: [ 0. -0.06379467 0. 0. 0. ] + +body_pos_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-5.178, 1.205] + Sample: [0.00238936 0.01172794 0.7911665 0.11803366 0.01129898] + +body_quat_w: + Shape: (455, 14, 4) + Dtype: float32 + Range: [-0.707, 0.993] + Sample: [ 0.7112312 -0.00883037 -0.00456219 -0.70288795 0.7092943 ] + +body_lin_vel_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-2.853, 1.454] + Sample: [-0.00302621 0.01039287 0.0045207 -0.00268457 0.01099243] + +body_ang_vel_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-10.792, 10.693] + Sample: [ 0.00032408 -0.00011129 0.00044492 -0.00352303 0.0018626 ] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [455.000, 455.000] + Sample: [455] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..874949f4c1a7ead3be5663ea297cbf1393831000 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: walking_quip_360_R_002__A428 +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 455 + +Data arrays summary: + joint_pos: (455, 29) (float32) + joint_vel: (455, 29) (float32) + body_pos_w: (455, 14, 3) (float32) + body_quat_w: (455, 14, 4) (float32) + body_lin_vel_w: (455, 14, 3) (float32) + body_ang_vel_w: (455, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/info.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/info.txt new file mode 100644 index 0000000000000000000000000000000000000000..911d087531797b17c70daefcc7f312ce44e51711 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/info.txt @@ -0,0 +1,51 @@ +Motion Information: walking_quip_360_R_002__A428_M +================================================== + +joint_pos: + Shape: (455, 29) + Dtype: float32 + Range: [-1.003, 1.403] + Sample: [ 0.01109954 0.02397734 0.06473204 0.05247362 -0.01430147] + +joint_vel: + Shape: (455, 29) + Dtype: float32 + Range: [-10.128, 10.542] + Sample: [-0.06343862 0. 0. 0. 0. ] + +body_pos_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-5.178, 1.205] + Sample: [-0.00239508 0.01172869 0.7911661 0.1148396 0.00817287] + +body_quat_w: + Shape: (455, 14, 4) + Dtype: float32 + Range: [-0.707, 0.993] + Sample: [-0.702888 0.00456196 0.00883033 0.7112312 -0.70121443] + +body_lin_vel_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-2.853, 1.454] + Sample: [0.00306987 0.01037478 0.00453062 0.00270815 0.00906713] + +body_ang_vel_w: + Shape: (455, 14, 3) + Dtype: float32 + Range: [-10.691, 10.791] + Sample: [ 0.0003236 0.00011099 -0.00044414 -0.02917245 0.00046786] + +_body_indexes: + Shape: (14,) + Dtype: int64 + Range: [0.000, 29.000] + Sample: [ 0 4 10 18 5] + +time_step_total: + Shape: () + Dtype: int64 + Range: [455.000, 455.000] + Sample: [455] + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/metadata.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/metadata.txt new file mode 100644 index 0000000000000000000000000000000000000000..85fc566443a0e450b0fd355121db1b6ea672b541 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/reference/example/walking_quip_360_R_002__A428_M/metadata.txt @@ -0,0 +1,17 @@ +Metadata for: walking_quip_360_R_002__A428_M +============================== + +Body part indexes: +[ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + +Total timesteps: 455 + +Data arrays summary: + joint_pos: (455, 29) (float32) + joint_vel: (455, 29) (float32) + body_pos_w: (455, 14, 3) (float32) + body_quat_w: (455, 14, 4) (float32) + body_lin_vel_w: (455, 14, 3) (float32) + body_ang_vel_w: (455, 14, 3) (float32) + _body_indexes: (14,) (int64) + time_step_total: () (int64) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_deps.sh b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_deps.sh new file mode 100644 index 0000000000000000000000000000000000000000..a8e413ec3838bb4f307216547055e95970cc01b7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_deps.sh @@ -0,0 +1,926 @@ +#!/bin/bash + +set -e + +echo "🚀 Installing G1 Deploy system dependencies..." +sudo apt-get update && sudo apt-get install -y libgtest-dev + +# Detect system type and architecture +ARCH=$(uname -m) +OS_ID=$(lsb_release -si 2>/dev/null || echo "Unknown") +OS_VERSION=$(lsb_release -sr 2>/dev/null || echo "Unknown") + +# Common CUDA installation paths (used by multiple functions) +CUDA_PATHS=( + "/usr/local/cuda" + "/usr/local/cuda-12.6" # CUDA 12.6 on newer Jetson + "/usr/local/cuda-12.5" # CUDA 12.5 variant + "/usr/local/cuda-12.4" # CUDA 12.4 variant + "/usr/local/cuda-12" # Generic CUDA 12.x + "/usr/local/cuda-11.4" # Common on older Jetson + "/usr/local/cuda-10.2" # Common on older Jetson + "/usr/local/cuda-11" + "/usr/local/cuda-10" + "/opt/cuda" + "/usr/cuda" +) + +# Common CUDA runtime library paths (used by multiple functions) +CUDA_RUNTIME_PATHS=( + "/usr/local/cuda/lib64/libcudart.so" + "/usr/local/cuda-12.6/lib64/libcudart.so" + "/usr/local/cuda-12.5/lib64/libcudart.so" + "/usr/local/cuda-12.4/lib64/libcudart.so" + "/usr/local/cuda-12/lib64/libcudart.so" + "/usr/local/cuda-11.4/lib64/libcudart.so" + "/usr/local/cuda-10.2/lib64/libcudart.so" + "/usr/lib/aarch64-linux-gnu/libcudart.so" + "/usr/lib/x86_64-linux-gnu/libcudart.so" + "/usr/lib64/libcudart.so" + "/usr/lib/libcudart.so" +) + +# Common CUDA header paths (used by multiple functions) +CUDA_HEADER_PATHS=( + "/usr/local/cuda/include/cuda_runtime.h" + "/usr/local/cuda-12.6/include/cuda_runtime.h" + "/usr/local/cuda-12.5/include/cuda_runtime.h" + "/usr/local/cuda-12.4/include/cuda_runtime.h" + "/usr/local/cuda-12/include/cuda_runtime.h" + "/usr/local/cuda-11.4/include/cuda_runtime.h" + "/usr/local/cuda-10.2/include/cuda_runtime.h" + "/usr/local/cuda-11/include/cuda_runtime.h" + "/usr/include/cuda_runtime.h" + "/usr/include/cuda/cuda_runtime.h" +) + +# Common utility functions +has_cuda_in_ldconfig() { + ldconfig -p 2>/dev/null | grep -q "libcudart\|libcuda" +} + +# Update package cache (with deduplication) +update_package_cache() { + if [ "$PACKAGE_MANAGER" = "apt" ] && [ "$APT_UPDATED" != "true" ]; then + sudo apt-get update + export APT_UPDATED="true" + fi +} + +# Enhanced Jetson detection +IS_JETSON=false +JETSON_MODEL="" + +if [[ "$ARCH" == "aarch64" ]]; then + # Check for Jetson-specific indicators + if [[ -f "/etc/nv_tegra_release" ]] || \ + [[ -d "/usr/src/jetson_multimedia_api" ]] || \ + ls /etc/apt/sources.list.d/ 2>/dev/null | grep -q jetson || \ + [[ -f "/proc/device-tree/model" && $(cat /proc/device-tree/model 2>/dev/null) =~ "Jetson" ]]; then + IS_JETSON=true + + # Detect Jetson model for optimized package selection + if [[ -f "/proc/device-tree/model" ]]; then + JETSON_MODEL=$(cat /proc/device-tree/model 2>/dev/null | tr -d '\0' | sed 's/NVIDIA //') + echo "🤖 Jetson system detected: $JETSON_MODEL" + else + echo "🤖 Jetson system detected (model unknown)" + fi + + # Check JetPack version if available + if command -v jetson_release &> /dev/null; then + JETPACK_VERSION=$(jetson_release -v 2>/dev/null | grep "JETPACK" | cut -d' ' -f2 || echo "unknown") + echo "📦 JetPack version: $JETPACK_VERSION" + fi + fi +fi + +echo "🔍 System: $OS_ID $OS_VERSION ($ARCH)$([ "$IS_JETSON" = true ] && echo " - Jetson")" + +# Detect the operating system and package manager +if command -v apt-get &> /dev/null; then + PACKAGE_MANAGER="apt" +elif command -v yum &> /dev/null; then + PACKAGE_MANAGER="yum" +elif command -v pacman &> /dev/null; then + PACKAGE_MANAGER="pacman" +else + echo "❌ Unsupported package manager. This script supports apt, yum, and pacman." + exit 1 +fi + +# Function to install packages based on the package manager +install_packages() { + case $PACKAGE_MANAGER in + apt) + update_package_cache + sudo apt-get install -y "$@" + ;; + yum) + sudo yum install -y "$@" + ;; + pacman) + sudo pacman -S --noconfirm "$@" + ;; + esac +} + +echo "📦 Installing base development tools..." +case $PACKAGE_MANAGER in + apt) + if [ "$IS_JETSON" = true ]; then + echo "🤖 Installing packages optimized for Jetson system..." + # Jetson systems may have some tools pre-installed + JETSON_PACKAGES="build-essential clang cmake git git-lfs pkg-config patchelf zlib1g-dev curl wget" + + # Add optional packages if available + if apt-cache show cmake-format &>/dev/null; then + JETSON_PACKAGES="$JETSON_PACKAGES cmake-format" + fi + if apt-cache show cppcheck &>/dev/null; then + JETSON_PACKAGES="$JETSON_PACKAGES cppcheck" + fi + + install_packages $JETSON_PACKAGES + else + install_packages \ + build-essential \ + clang \ + cmake \ + cmake-format \ + cppcheck \ + git \ + git-lfs \ + pkg-config \ + patchelf \ + zlib1g-dev \ + curl \ + wget + fi + ;; + yum) + install_packages \ + gcc \ + gcc-c++ \ + clang \ + cmake \ + cppcheck \ + git \ + git-lfs \ + pkgconfig \ + patchelf \ + zlib-devel \ + curl \ + wget + ;; + pacman) + install_packages \ + base-devel \ + clang \ + cmake \ + cppcheck \ + git \ + git-lfs \ + pkgconf \ + patchelf \ + zlib \ + curl \ + wget + ;; +esac + +echo "📚 Installing C++ libraries..." +case $PACKAGE_MANAGER in + apt) + install_packages \ + libyaml-cpp-dev \ + libeigen3-dev \ + libmsgpack-dev \ + libzmq3-dev \ + nlohmann-json3-dev \ + libgtest-dev + ;; + yum) + install_packages \ + yaml-cpp-devel \ + eigen3-devel \ + msgpack-devel \ + zeromq-devel \ + cppzmq-devel \ + nlohmann-json-devel \ + gtest-devel + ;; + pacman) + install_packages \ + yaml-cpp \ + eigen \ + msgpack-cxx \ + zeromq \ + cppzmq \ + nlohmann-json \ + gtest + ;; +esac + +# Ensure ZeroMQ C++ headers (cppzmq) are available. +# On some Ubuntu releases (e.g., 24.04), the 'cppzmq' or 'libcppzmq-dev' package may be missing. +# If not found, vendor the header-only repo to third_party/cppzmq. +echo "🧩 Ensuring ZeroMQ C++ headers (cppzmq)..." + +# Resolve repository root relative to this script +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +THIRD_PARTY_DIR="$REPO_ROOT/third_party" + +have_cppzmq_header=false +if [ -f "/usr/include/zmq.hpp" ]; then + have_cppzmq_header=true +fi + +if [ "$have_cppzmq_header" = false ]; then + if [ "$PACKAGE_MANAGER" = "apt" ]; then + # Try distro packages if available + if apt-cache policy cppzmq 2>/dev/null | grep -q "Candidate:" && \ + ! apt-cache policy cppzmq 2>/dev/null | grep -q "(none)"; then + update_package_cache + if sudo apt-get install -y cppzmq; then + have_cppzmq_header=true + fi + elif apt-cache policy libcppzmq-dev 2>/dev/null | grep -q "Candidate:" && \ + ! apt-cache policy libcppzmq-dev 2>/dev/null | grep -q "(none)"; then + update_package_cache + if sudo apt-get install -y libcppzmq-dev; then + have_cppzmq_header=true + fi + fi + fi +fi + +if [ "$have_cppzmq_header" = false ]; then + echo "📦 Vendoring header-only cppzmq into third_party..." + mkdir -p "$THIRD_PARTY_DIR" + if [ ! -d "$THIRD_PARTY_DIR/cppzmq/.git" ]; then + if git clone --depth 1 https://github.com/zeromq/cppzmq.git "$THIRD_PARTY_DIR/cppzmq"; then + echo "✅ cppzmq headers cloned to $THIRD_PARTY_DIR/cppzmq" + echo " Add include path: -I$THIRD_PARTY_DIR/cppzmq" + else + echo "❌ Failed to clone cppzmq repo. Please install headers manually." + fi + else + if git -C "$THIRD_PARTY_DIR/cppzmq" pull --ff-only; then + echo "✅ cppzmq headers updated in $THIRD_PARTY_DIR/cppzmq" + else + echo "⚠️ Failed to update cppzmq headers. Using existing copy." + fi + fi +else + echo "✅ ZeroMQ C++ headers found in system includes" +fi + +# Ensure JSON headers (nlohmann/json) are available (similar to cppzmq ensure) +echo "🧩 Ensuring JSON headers (nlohmann/json)..." + +have_json_header=false +if [ -f "/usr/include/nlohmann/json.hpp" ] || [ -f "/usr/local/include/nlohmann/json.hpp" ]; then + have_json_header=true +fi + +if [ "$have_json_header" = false ]; then + case $PACKAGE_MANAGER in + apt) + update_package_cache + sudo apt-get install -y nlohmann-json3-dev || true + ;; + yum) + sudo yum install -y nlohmann-json-devel || true + ;; + pacman) + sudo pacman -S --noconfirm nlohmann-json || true + ;; + esac + if [ -f "/usr/include/nlohmann/json.hpp" ] || [ -f "/usr/local/include/nlohmann/json.hpp" ]; then + have_json_header=true + fi +fi + +if [ "$have_json_header" = false ]; then + echo "📦 Vendoring nlohmann/json into third_party..." + # Reuse THIRD_PARTY_DIR from earlier cppzmq ensure block if set; otherwise define + if [ -z "$THIRD_PARTY_DIR" ]; then + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + THIRD_PARTY_DIR="$REPO_ROOT/third_party" + fi + mkdir -p "$THIRD_PARTY_DIR" + if [ ! -d "$THIRD_PARTY_DIR/nlohmann_json/.git" ]; then + if git clone --depth 1 https://github.com/nlohmann/json.git "$THIRD_PARTY_DIR/nlohmann_json"; then + echo "✅ nlohmann/json cloned to $THIRD_PARTY_DIR/nlohmann_json" + echo " Add include path: -I$THIRD_PARTY_DIR/nlohmann_json/single_include" + else + echo "❌ Failed to clone nlohmann/json. Please install headers manually." + fi + else + if git -C "$THIRD_PARTY_DIR/nlohmann_json" pull --ff-only; then + echo "✅ nlohmann/json updated in $THIRD_PARTY_DIR/nlohmann_json" + else + echo "⚠️ Failed to update nlohmann/json. Using existing copy." + fi + fi +else + echo "✅ JSON headers found in system includes" +fi + +# Install Just command runner +echo "⚡ Installing Just command runner..." +if ! command -v just &> /dev/null; then + case $PACKAGE_MANAGER in + apt|yum) + # Install Just from GitHub releases for Ubuntu/Debian and RHEL/CentOS + JUST_VERSION="1.43.0" + JUST_ARCH=$(uname -m) + + # Map architecture names to just release naming + case $JUST_ARCH in + x86_64) + JUST_ARCH_NAME="x86_64-unknown-linux-musl" + ;; + aarch64|arm64) + JUST_ARCH_NAME="aarch64-unknown-linux-musl" + ;; + armv7l) + JUST_ARCH_NAME="armv7-unknown-linux-musleabihf" + ;; + arm*) + JUST_ARCH_NAME="arm-unknown-linux-musleabihf" + ;; + *) + echo "❌ Unsupported architecture for just: $JUST_ARCH" + echo " Supported architectures: x86_64, aarch64, armv7l, arm" + exit 1 + ;; + esac + + echo "📥 Downloading Just ${JUST_VERSION} for ${JUST_ARCH}..." + JUST_URL="https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_ARCH_NAME}.tar.gz" + curl -L "$JUST_URL" | tar xz -C /tmp + sudo mv /tmp/just /usr/local/bin/ + ;; + pacman) + install_packages just + ;; + esac +else + echo "✅ Just is already installed" +fi + +# Install ONNX Runtime +echo "🧠 Setting up ONNX Runtime..." + +# Allow configurable installation path +ONNX_INSTALL_PATH="${ONNX_INSTALL_PATH:-/opt/onnxruntime}" + +if [ ! -d "$ONNX_INSTALL_PATH" ]; then + ONNX_VERSION="1.16.3" + ONNX_ARCH=$(uname -m) + + if [ "$ONNX_ARCH" = "x86_64" ]; then + ONNX_URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-x64-${ONNX_VERSION}.tgz" + elif [ "$ONNX_ARCH" = "aarch64" ]; then + # Same URL for all ARM64 systems (Jetson and regular ARM64) + ONNX_URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-aarch64-${ONNX_VERSION}.tgz" + if [ "$IS_JETSON" = true ]; then + echo "🤖 Jetson system detected - using ARM64 ONNX Runtime..." + fi + else + echo "❌ Unsupported architecture: $ONNX_ARCH" + exit 1 + fi + + echo "📥 Downloading ONNX Runtime ${ONNX_VERSION} for ${ONNX_ARCH}$([ "$IS_JETSON" = true ] && echo " (Jetson-optimized)")..." + cd /tmp + + # Download with retry for Jetson systems (sometimes have slower network) + if [ "$IS_JETSON" = true ]; then + curl -L --retry 3 --retry-delay 2 "$ONNX_URL" -o onnxruntime.tgz + else + curl -L "$ONNX_URL" -o onnxruntime.tgz + fi + + tar xzf onnxruntime.tgz + + # Move to configured location (may need sudo for system paths) + ONNX_DIR=$(ls -d onnxruntime-linux-* | head -n1) + + if [[ "$ONNX_INSTALL_PATH" =~ ^(/opt|/usr) ]]; then + # System path - needs sudo + sudo mv "$ONNX_DIR" "$ONNX_INSTALL_PATH" + sudo ln -sf "$ONNX_INSTALL_PATH/lib/libonnxruntime.so" /usr/local/lib/ 2>/dev/null || true + sudo ln -sf "$ONNX_INSTALL_PATH/include" /usr/local/include/onnxruntime 2>/dev/null || true + echo "$ONNX_INSTALL_PATH/lib" | sudo tee /etc/ld.so.conf.d/onnxruntime.conf + sudo ldconfig + else + # User path - no sudo needed + mv "$ONNX_DIR" "$ONNX_INSTALL_PATH" + # Create user-accessible symlinks if possible + if [ -w /usr/local/lib ]; then + ln -sf "$ONNX_INSTALL_PATH/lib/libonnxruntime.so" /usr/local/lib/ 2>/dev/null || true + fi + fi + + # For Jetson systems, add to environment + if [ "$IS_JETSON" = true ]; then + echo "# ONNX Runtime for Jetson" | sudo tee -a /etc/environment + echo "LD_LIBRARY_PATH=\"$ONNX_INSTALL_PATH/lib:\$LD_LIBRARY_PATH\"" | sudo tee -a /etc/environment + fi + + echo "✅ ONNX Runtime installed to $ONNX_INSTALL_PATH$([ "$IS_JETSON" = true ] && echo " with Jetson optimizations")" +else + echo "✅ ONNX Runtime is already installed at $ONNX_INSTALL_PATH" +fi + +echo "💡 To install to a different location, set ONNX_INSTALL_PATH environment variable" + +# Function to check for CUDA toolkit (nvcc compiler) - silent check +check_cuda_toolkit() { + # Check for nvcc in PATH + if command -v nvcc &> /dev/null; then + return 0 + fi + + # Check common CUDA installation paths (using shared variable) + + for cuda_path in "${CUDA_PATHS[@]}"; do + if [ -f "$cuda_path/bin/nvcc" ]; then + return 0 + fi + done + + return 1 +} + +# Function to check for CUDA runtime libraries AND headers (needed for compilation) +check_cuda_runtime() { + # Check for CUDA runtime libraries + local has_libraries=false + if has_cuda_in_ldconfig; then + has_libraries=true + else + # Check specific paths for runtime libraries (using shared variable) + for lib_path in "${CUDA_RUNTIME_PATHS[@]}"; do + if [ -f "$lib_path" ]; then + has_libraries=true + break + fi + done + fi + + # Check for CUDA headers (essential for compilation) - using shared variable + local has_headers=false + for header_path in "${CUDA_HEADER_PATHS[@]}"; do + if [ -f "$header_path" ]; then + has_headers=true + break + fi + done + + # Need both libraries and headers + if [ "$has_libraries" = true ] && [ "$has_headers" = true ]; then + return 0 + else + return 1 + fi +} + +# Check what CUDA components we have and provide clear, non-confusing output +echo "🔍 Checking CUDA installation..." + + +# Function to handle non-Jetson ARM64 systems +install_cuda_for_arm64() { + echo "🔧 Installing CUDA packages for ARM64 system..." + + if sudo apt-get install -y cuda-cudart-dev-12-2 cuda-runtime-12-2 2>/dev/null || \ + sudo apt-get install -y cuda-cudart-dev-11-8 cuda-runtime-11-8 2>/dev/null || \ + sudo apt-get install -y libcudart-dev nvidia-cuda-runtime-cu12 2>/dev/null; then + echo "✅ CUDA runtime and development packages installed for ARM64!" + return 0 + else + echo "❌ Failed to install CUDA packages for ARM64 system" + return 1 + fi +} + +# Function to handle x86_64 systems +install_cuda_for_x86_64() { + echo "🔧 Installing CUDA packages for x86_64 system..." + + # Detect CUDA version from nvidia-smi if available + local DETECTED_CUDA_VERSION="" + if command -v nvidia-smi &> /dev/null; then + DETECTED_CUDA_VERSION=$(nvidia-smi | grep "CUDA Version:" | sed 's/.*CUDA Version: \([0-9]\+\.[0-9]\+\).*/\1/' | head -n1) + if [ -n "$DETECTED_CUDA_VERSION" ]; then + echo "📍 Detected CUDA $DETECTED_CUDA_VERSION from nvidia-smi" + fi + fi + + # Check if NVIDIA CUDA repository is configured + local has_cuda_repo=false + if [ -f /etc/apt/sources.list.d/cuda*.list ] || \ + grep -r "developer.download.nvidia.com/compute/cuda" /etc/apt/sources.list* &>/dev/null; then + has_cuda_repo=true + fi + + # Add NVIDIA CUDA repository if not present + if [ "$has_cuda_repo" = false ]; then + echo "📦 NVIDIA CUDA repository not found, adding it now..." + + # Detect Ubuntu version for correct repository + local ubuntu_version="" + if [ "$OS_ID" = "Ubuntu" ]; then + case "$OS_VERSION" in + 22.04) + ubuntu_version="ubuntu2204" + ;; + 20.04) + ubuntu_version="ubuntu2004" + ;; + 24.04) + ubuntu_version="ubuntu2404" + ;; + *) + # Default to 22.04 for unknown versions + ubuntu_version="ubuntu2204" + echo "⚠️ Ubuntu $OS_VERSION detected, using ubuntu2204 repository (may need adjustment)" + ;; + esac + else + ubuntu_version="ubuntu2204" + echo "⚠️ Non-Ubuntu system detected, using ubuntu2204 repository (may not work)" + fi + + # Download and install CUDA keyring + local cuda_keyring_url="https://developer.download.nvidia.com/compute/cuda/repos/${ubuntu_version}/x86_64/cuda-keyring_1.1-1_all.deb" + + if [ -f /tmp/cuda-keyring.deb ]; then + rm /tmp/cuda-keyring.deb + fi + + echo "📥 Downloading CUDA repository keyring for $ubuntu_version..." + if wget -q "$cuda_keyring_url" -O /tmp/cuda-keyring.deb 2>/dev/null; then + if sudo dpkg -i /tmp/cuda-keyring.deb 2>/dev/null; then + echo "✅ NVIDIA CUDA repository keyring installed" + # Force apt-get update after adding new repository + echo "🔄 Updating package cache with new CUDA repository..." + sudo apt-get update + has_cuda_repo=true + else + echo "⚠️ Failed to install CUDA keyring" + fi + rm -f /tmp/cuda-keyring.deb + else + echo "⚠️ Failed to download CUDA keyring from $cuda_keyring_url" + fi + + # If keyring install failed, provide manual instructions + if [ "$has_cuda_repo" = false ]; then + echo "" + echo "⚠️ Automatic CUDA repository setup failed. Please add it manually:" + echo " wget https://developer.download.nvidia.com/compute/cuda/repos/${ubuntu_version}/x86_64/cuda-keyring_1.1-1_all.deb" + echo " sudo dpkg -i cuda-keyring_1.1-1_all.deb" + echo " sudo apt-get update" + echo "" + fi + else + echo "✅ NVIDIA CUDA repository already configured" + fi + + # Try to install CUDA packages - prioritize detected version + local cuda_installed=false + + if [ -n "$DETECTED_CUDA_VERSION" ]; then + # Convert version like "12.4" to package suffix like "12-4" + local version_suffix=$(echo "$DETECTED_CUDA_VERSION" | sed 's/\./-/') + echo "🎯 Attempting to install CUDA $DETECTED_CUDA_VERSION packages..." + + # IMPORTANT: We need BOTH cuda-compiler (for complete headers) AND cuda-cudart-dev (for runtime) + # Try to install both together first + echo "📦 Installing cuda-compiler-${version_suffix} and cuda-cudart-dev-${version_suffix}..." + if sudo apt-get install -y cuda-compiler-${version_suffix} cuda-cudart-dev-${version_suffix}; then + echo "✅ CUDA $DETECTED_CUDA_VERSION compiler and runtime development packages installed!" + cuda_installed=true + else + # If combined install fails, try separately + echo "⚠️ Combined install failed, trying packages separately..." + local compiler_installed=false + local cudart_installed=false + + if sudo apt-get install -y cuda-compiler-${version_suffix}; then + echo "✅ cuda-compiler-${version_suffix} installed" + compiler_installed=true + else + echo "❌ Failed to install cuda-compiler-${version_suffix}" + fi + + if sudo apt-get install -y cuda-cudart-dev-${version_suffix}; then + echo "✅ cuda-cudart-dev-${version_suffix} installed" + cudart_installed=true + else + echo "❌ Failed to install cuda-cudart-dev-${version_suffix}" + fi + + if [ "$compiler_installed" = true ] || [ "$cudart_installed" = true ]; then + if [ "$compiler_installed" = false ]; then + echo "⚠️ Warning: cuda-compiler not installed - headers may be incomplete!" + fi + if [ "$cudart_installed" = false ]; then + echo "⚠️ Warning: cuda-cudart-dev not installed - runtime dev files missing!" + fi + cuda_installed=true + fi + fi + + # If version-specific install failed, try toolkit + if [ "$cuda_installed" = false ]; then + echo "📦 Trying cuda-toolkit-${version_suffix} as fallback..." + if sudo apt-get install -y cuda-toolkit-${version_suffix}; then + echo "✅ CUDA $DETECTED_CUDA_VERSION toolkit installed!" + cuda_installed=true + fi + fi + fi + + # Fall back to trying various package names if version-specific install failed + if [ "$cuda_installed" = false ]; then + echo "🔄 Trying generic CUDA package installation..." + + # List available CUDA packages for debugging + echo "🔍 Checking available CUDA packages..." + local available_cuda_pkgs=$(apt-cache search "^cuda-cudart-dev" 2>/dev/null | head -5) + if [ -n "$available_cuda_pkgs" ]; then + echo " Found packages:" + echo "$available_cuda_pkgs" | sed 's/^/ /' + fi + + # Try installing with specific version numbers first, then fall back to generic + # Always try to get both compiler (for headers) and cudart-dev (for runtime) + if sudo apt-get install -y cuda-compiler-12-4 cuda-cudart-dev-12-4; then + echo "✅ CUDA 12.4 compiler and runtime development installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-compiler-12-6 cuda-cudart-dev-12-6; then + echo "✅ CUDA 12.6 compiler and runtime development installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-compiler-12-2 cuda-cudart-dev-12-2; then + echo "✅ CUDA 12.2 compiler and runtime development installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-compiler-12-0 cuda-cudart-dev-12-0; then + echo "✅ CUDA 12.0 compiler and runtime development installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-toolkit-12-4; then + echo "✅ CUDA 12.4 toolkit installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-toolkit-12-6; then + echo "✅ CUDA 12.6 toolkit installed!" + cuda_installed=true + elif sudo apt-get install -y cuda-toolkit; then + echo "✅ CUDA toolkit (latest) installed!" + cuda_installed=true + elif sudo apt-get install -y cuda; then + echo "✅ CUDA (full package) installed!" + cuda_installed=true + fi + fi + + if [ "$cuda_installed" = true ]; then + return 0 + else + echo "❌ Failed to install CUDA packages for x86_64 system" + echo " 💡 You may need to manually install CUDA toolkit from:" + echo " https://developer.nvidia.com/cuda-downloads" + return 1 + fi +} + +# CUDA detection and installation - optimized for Jetson systems +install_cuda_for_jetson() { + echo "🚀 Installing CUDA development packages for Jetson..." + + # First, try to install CUDA development headers for existing CUDA installation + local success=false + + # Check if we can install from JetPack repositories (try newer versions first) + if sudo apt-get install -y nvidia-jetpack-dev 2>/dev/null; then + echo "✅ JetPack development packages installed!" + success=true + elif sudo apt-get install -y cuda-toolkit-12-6-dev 2>/dev/null || \ + sudo apt-get install -y cuda-toolkit-12-5-dev 2>/dev/null || \ + sudo apt-get install -y cuda-toolkit-12-4-dev 2>/dev/null || \ + sudo apt-get install -y cuda-toolkit-11-4-dev 2>/dev/null || \ + sudo apt-get install -y cuda-toolkit-10-2-dev 2>/dev/null; then + echo "✅ CUDA toolkit development packages installed!" + success=true + elif sudo apt-get install -y cuda-compiler-12-6 cuda-cudart-dev-12-6 2>/dev/null || \ + sudo apt-get install -y cuda-compiler-12-5 cuda-cudart-dev-12-5 2>/dev/null || \ + sudo apt-get install -y cuda-compiler-12-4 cuda-cudart-dev-12-4 2>/dev/null || \ + sudo apt-get install -y cuda-compiler-11-4 cuda-cudart-dev-11-4 2>/dev/null || \ + sudo apt-get install -y cuda-compiler-10-2 cuda-cudart-dev-10-2 2>/dev/null; then + echo "✅ CUDA compiler and runtime dev packages installed!" + success=true + else + # Try generic packages that might work + echo "⚠️ Jetson-specific packages not found. Trying generic CUDA packages..." + if sudo apt-get install -y cuda-cudart-dev libcuda1-dev 2>/dev/null || \ + sudo apt-get install -y cuda-toolkit 2>/dev/null; then + echo "✅ Generic CUDA development packages installed!" + success=true + fi + fi + + # If all else fails, try to create symlinks to existing CUDA installation + if [ "$success" = false ]; then + echo "⚠️ Package installation failed. Trying to link existing CUDA installation..." + + # Find existing CUDA installation (using shared variable) + for cuda_dir in "${CUDA_PATHS[@]}"; do + if [ -d "$cuda_dir/include" ]; then + echo "📍 Found CUDA at $cuda_dir, creating development symlinks..." + sudo mkdir -p /usr/include/cuda + sudo ln -sf $cuda_dir/include/* /usr/include/cuda/ 2>/dev/null || true + sudo ln -sf $cuda_dir/include/cuda_runtime.h /usr/include/ 2>/dev/null || true + echo "✅ CUDA headers linked successfully!" + success=true + break + fi + done + fi + + return $([ "$success" = true ] && echo 0 || echo 1) +} + +# Check CUDA installation status +if check_cuda_toolkit; then + if command -v nvcc &> /dev/null; then + CUDA_VERSION=$(nvcc --version | grep "release" | sed 's/.*release \([0-9]\+\.[0-9]\+\).*/\1/') + echo "✅ CUDA Toolkit found: nvcc version $CUDA_VERSION" + else + # Found in custom path - add to PATH suggestion (using shared variable) + for cuda_path in "${CUDA_PATHS[@]}"; do + if [ -f "$cuda_path/bin/nvcc" ]; then + CUDA_VERSION=$($cuda_path/bin/nvcc --version | grep "release" | sed 's/.*release \([0-9]\+\.[0-9]\+\).*/\1/' 2>/dev/null || echo "unknown") + echo "✅ CUDA Toolkit found at: $cuda_path (version $CUDA_VERSION)" + echo " 💡 Consider adding $cuda_path/bin to your PATH" + break + fi + done + fi + + # Even with toolkit found, verify runtime libraries and headers are available + echo "🔍 Verifying CUDA runtime libraries and headers are complete..." + if check_cuda_runtime; then + echo "✅ CUDA toolkit is complete with runtime libraries and headers!" + else + echo "⚠️ CUDA toolkit found but runtime libraries/headers missing!" + + if [ "$IS_JETSON" = true ]; then + echo "🤖 Installing missing CUDA runtime development packages for Jetson..." + if install_cuda_for_jetson; then + echo "✅ Jetson CUDA runtime packages installed successfully!" + else + echo "❌ Jetson CUDA runtime installation failed" + echo " 💡 System may already have working CUDA runtime" + fi + fi + fi +elif check_cuda_runtime; then + echo "✅ CUDA runtime libraries and headers found (sufficient for this project!)" + echo " ℹ️ Full toolkit not detected, but runtime + headers are all you need" +else + # CUDA components missing - install them + echo "⚠️ CUDA components missing or incomplete. Installing CUDA runtime libraries..." + + if [ "$IS_JETSON" = true ]; then + echo "🤖 Installing CUDA runtime development packages for Jetson..." + update_package_cache + + # Install CUDA runtime development packages for Jetson + if sudo apt install -y cuda-cudart-dev-12-6 cuda-headers-12-6 2>/dev/null; then + echo "✅ CUDA 12.6 development packages installed!" + elif sudo apt install -y cuda-cudart-dev cuda-toolkit-12-6 2>/dev/null; then + echo "✅ CUDA development packages installed!" + elif sudo apt install -y libcudart-dev cuda-toolkit 2>/dev/null; then + echo "✅ Generic CUDA development packages installed!" + else + echo "❌ Failed to install CUDA development packages" + echo " Try manually: sudo apt install -y cuda-cudart-dev-12-6" + fi + else + # Non-Jetson installation logic (existing) + if [[ "$ARCH" == "aarch64" ]]; then + install_cuda_for_arm64 + elif [[ "$ARCH" == "x86_64" ]]; then + install_cuda_for_x86_64 + fi + fi + + # Verify CUDA is now available + echo "🔍 Verifying CUDA installation after package installation..." + if check_cuda_runtime; then + echo "✅ CUDA runtime and headers now available!" + else + echo "❌ CUDA verification still failing - manual intervention may be needed" + fi +fi + +# Initialize Git LFS +echo "📁 Setting up Git LFS..." +if git lfs install --force 2>/dev/null; then + echo "✅ Git LFS hooks installed successfully" +else + echo "⚠️ Git LFS hook installation had issues, trying manual resolution..." + # Try to update existing hooks + if git lfs update --force 2>/dev/null; then + echo "✅ Git LFS hooks updated successfully" + else + echo "⚠️ Git LFS hooks may need manual attention" + echo " You can run 'git lfs update --force' later if needed" + fi +fi + +echo "" +echo "🎉 System dependencies installation complete!" +echo "" + +if [ "$IS_JETSON" = true ]; then + echo "🤖 Jetson-specific setup completed!" + echo "" + echo "📋 Next steps for Jetson system:" + echo " 1. Ensure TensorRT is available (usually pre-installed with JetPack)" + echo " 2. Run 'source scripts/setup_env.sh' to configure paths for Jetson" + echo " 3. Run 'just build' to build the project" + echo "" + echo "💡 Jetson tips:" + echo " - CUDA is typically pre-installed at /usr/local/cuda-12.6, /usr/local/cuda-11.4 or /usr/local/cuda-10.2" + echo " - TensorRT is usually available at /usr/lib/aarch64-linux-gnu/" + echo " - If build fails, you may need to install JetPack SDK development components" + echo " - Monitor system temperature during compilation (use 'tegrastats')" + echo " - For CUDA 12.6 systems, ensure you have the latest JetPack SDK Manager" + echo "" + + # Install JetPack for Jetson systems (includes all DLA libraries) + echo "🔧 Installing JetPack for complete Jetson development environment..." + + update_package_cache + + if sudo apt install -y nvidia-jetpack; then + echo "✅ JetPack installed successfully - includes all DLA libraries!" + echo " This resolves all TensorRT DLA dependencies" + else + echo "⚠️ JetPack installation failed (may have version conflicts)" + echo " 💡 Try: sudo apt update && sudo apt install -y nvidia-jetpack" + echo " 🔄 If issues persist, build should still work with existing libraries" + fi +else + # Non-Jetson systems + echo "📋 Next steps for $ARCH system:" +echo " 1. Make sure TensorRT is installed and TensorRT_ROOT is set" +echo " 2. Run 'source scripts/setup_env.sh' to set up the environment" +echo " 3. Run 'just build' to build the project" +echo "" + + if [[ "$ARCH" == "aarch64" ]]; then + echo "💡 ARM64 tips:" + echo " - CUDA may be installed at /usr/local/cuda or system locations" + echo " - TensorRT typically installed via package manager" + echo " - DLA libraries not needed on non-Jetson ARM64 systems" + elif [[ "$ARCH" == "x86_64" ]]; then + echo "💡 x86_64 tips:" + echo " - CUDA typically at /usr/local/cuda or via CUDA toolkit" + echo " - TensorRT available from NVIDIA or package repositories" + echo " - Use nvidia-smi to check GPU compatibility" + echo " - DLA libraries typically not needed on desktop GPUs" + fi +fi + +echo "" +echo "⚠️ If you encounter any issues:" +if [ "$IS_JETSON" = true ]; then + echo " 🤖 Jetson-specific troubleshooting:" + echo " - Check JetPack version: jetson_release" + echo " - Verify CUDA installation: ls -la /usr/local/cuda*" + echo " - Monitor resources: tegrastats" + echo " - For DLA linking errors: Install full JetPack SDK" + echo " - For help: https://developer.nvidia.com/embedded/jetpack" +elif [[ "$ARCH" == "aarch64" ]]; then + echo " 🔧 ARM64 troubleshooting:" + echo " - Check CUDA: ls -la /usr/local/cuda*" + echo " - Verify libraries: ldconfig -p | grep cuda" + echo " - DLA errors: DLA not supported on non-Jetson ARM64" +elif [[ "$ARCH" == "x86_64" ]]; then + echo " 🖥️ x86_64 troubleshooting:" + echo " - Check GPU: nvidia-smi" + echo " - Verify CUDA: nvcc --version" + echo " - Check environment: echo \$CUDA_HOME \$TensorRT_ROOT" + echo " - DLA errors: DLA typically not supported on desktop GPUs" +else + echo " - Check that all environment variables are set correctly" + echo " - Verify CUDA installation for your architecture" +fi diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_ros2_humble.sh b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_ros2_humble.sh new file mode 100644 index 0000000000000000000000000000000000000000..b0aba5f569a44daac673b601776708980ffd827c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/install_ros2_humble.sh @@ -0,0 +1,163 @@ +#!/bin/bash + +set -e + +echo "🤖 Installing ROS2 Humble..." + +# Detect system type and architecture +ARCH=$(uname -m) +OS_ID=$(lsb_release -si 2>/dev/null || echo "Unknown") +OS_VERSION=$(lsb_release -sr 2>/dev/null || echo "Unknown") + +echo "🔍 System: $OS_ID $OS_VERSION ($ARCH)" + +# Check if running Ubuntu (ROS2 Humble officially supports Ubuntu 22.04) +if [ "$OS_ID" != "Ubuntu" ]; then + echo "⚠️ Warning: ROS2 Humble is officially supported on Ubuntu 22.04 (Jammy Jellyfish)" + echo " Your system ($OS_ID $OS_VERSION) may have compatibility issues" + read -p "Continue anyway? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi +fi + +if [ "$OS_VERSION" != "22.04" ] && [ "$OS_ID" = "Ubuntu" ]; then + echo "⚠️ Warning: ROS2 Humble is officially supported on Ubuntu 22.04" + echo " Your version ($OS_VERSION) may have compatibility issues" + read -p "Continue anyway? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi +fi + + + +# Set locale +echo "🌍 Setting up locale..." +sudo apt-get update +sudo apt-get install -y locales +sudo locale-gen en_US en_US.UTF-8 +sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 +export LANG=en_US.UTF-8 + +echo "✅ Locale configured" + +# Enable Ubuntu Universe repository +echo "📦 Enabling Ubuntu Universe repository..." +sudo apt-get install -y software-properties-common +sudo add-apt-repository universe -y + +# Add ROS2 GPG key +echo "🔑 Adding ROS2 GPG key..." +sudo apt-get update +sudo apt-get install -y curl gnupg lsb-release + +if [ ! -f /usr/share/keyrings/ros-archive-keyring.gpg ]; then + sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg + echo "✅ ROS2 GPG key added" +else + echo "✅ ROS2 GPG key already exists" +fi + +# Add ROS2 repository to sources list +echo "📋 Adding ROS2 repository..." +ROS2_LIST="/etc/apt/sources.list.d/ros2.list" + +if [ ! -f "$ROS2_LIST" ]; then + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee $ROS2_LIST > /dev/null + echo "✅ ROS2 repository added" +else + echo "✅ ROS2 repository already configured" +fi + +# Update apt cache +echo "🔄 Updating package cache..." +sudo apt-get update + +# Upgrade packages (optional but recommended) +echo "⬆️ Upgrading packages..." +sudo apt-get upgrade -y + +# Install ROS2 Humble Desktop (full installation with GUI tools) +echo "📦 Installing ROS2 Humble Desktop..." +echo " This may take several minutes..." + +if sudo apt-get install -y ros-humble-desktop; then + echo "✅ ROS2 Humble Desktop installed successfully!" +else + echo "❌ Failed to install ROS2 Humble Desktop" + echo " Trying ROS2 Humble Base instead..." + if sudo apt-get install -y ros-humble-ros-base; then + echo "✅ ROS2 Humble Base installed successfully!" + else + echo "❌ Failed to install ROS2 Humble" + exit 1 + fi +fi + +# Install development tools +echo "🔧 Installing ROS2 development tools..." +sudo apt-get install -y \ + ros-dev-tools \ + python3-colcon-common-extensions \ + python3-rosdep \ + python3-vcstool \ + python3-argcomplete + +echo "✅ Development tools installed" + +# Initialize rosdep +echo "🔧 Initializing rosdep..." +if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then + sudo rosdep init + echo "✅ rosdep initialized" +else + echo "✅ rosdep already initialized" +fi + +rosdep update +echo "✅ rosdep updated" + +# Set up environment +echo "🌱 Setting up ROS2 environment..." + +SETUP_SCRIPT="/opt/ros/humble/setup.bash" +BASHRC="$HOME/.bashrc" + +# Check if ROS2 sourcing is already in .bashrc +if ! grep -q "source $SETUP_SCRIPT" "$BASHRC"; then + echo "" >> "$BASHRC" + echo "# ROS2 Humble setup" >> "$BASHRC" + echo "source $SETUP_SCRIPT" >> "$BASHRC" + echo "✅ Added ROS2 Humble to .bashrc" +else + echo "✅ ROS2 Humble already in .bashrc" +fi + +# Source ROS2 setup for current session +source $SETUP_SCRIPT + +echo "" +echo "🎉 ROS2 Humble installation complete!" +echo "" +echo "📋 Installation Summary:" +echo " - ROS2 Humble Desktop: Installed" +echo " - Development tools: Installed" +echo " - rosdep: Initialized and updated" +echo " - Environment: Configured in ~/.bashrc" +echo "" +echo "🚀 Next steps:" +echo " 1. Open a new terminal or run: source ~/.bashrc" +echo " 2. Verify installation: ros2 --help" +echo " 3. Test with: ros2 run demo_nodes_cpp talker" +echo "" +echo "📚 Useful commands:" +echo " - Check ROS2 version: ros2 --version" +echo " - List available packages: ros2 pkg list" +echo " - Create a workspace: mkdir -p ~/ros2_ws/src && cd ~/ros2_ws && colcon build" +echo "" +echo "📖 Documentation: https://docs.ros.org/en/humble/" +echo "" + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/restore_ubuntu_sources.sh b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/restore_ubuntu_sources.sh new file mode 100644 index 0000000000000000000000000000000000000000..c62b475a44032978de11cf095fb3245d98d79203 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/restore_ubuntu_sources.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Script to restore official Ubuntu repositories +# Removes Tsinghua University mirrors and restores official sources + +echo "Creating backup of current sources.list..." +sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup.$(date +%Y%m%d_%H%M%S) + +echo "Restoring official Ubuntu repositories for Ubuntu 22.04 (Jammy) ARM64..." + +# Create new sources.list with official repositories +sudo tee /etc/apt/sources.list > /dev/null << 'SOURCES' +# Official Ubuntu repositories for ARM64 (ports.ubuntu.com) +deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted +deb http://ports.ubuntu.com/ubuntu-ports/ jammy universe +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe +deb http://ports.ubuntu.com/ubuntu-ports/ jammy multiverse +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security universe +deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security multiverse + +# Source repositories (uncomment if you need source packages) +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy universe +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy multiverse +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security universe +# deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security multiverse +SOURCES + +echo "Updated sources.list with official Ubuntu repositories" +echo "Updating package lists..." +sudo apt update + +echo "Done! Ubuntu repositories restored to official sources." +echo "Backup saved as: /etc/apt/sources.list.backup.$(date +%Y%m%d_%H%M%S)" diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_env.sh b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_env.sh new file mode 100644 index 0000000000000000000000000000000000000000..842efa5699f7329a3e067182040a7ec571fee35a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_env.sh @@ -0,0 +1,351 @@ +#!/bin/bash + +# Environment setup script to replace shell.nix functionality +# Source this file: source scripts/setup_env.sh + +echo "🔧 Setting up G1 Deploy environment..." + +# Run jetson_clocks on Jetson systems (bare-metal only) +if command -v jetson_clocks &> /dev/null; then + if [ -f "/.dockerenv" ]; then + # Inside Docker - skip (jetson_clocks needs host access) + echo "ℹ️ Inside Docker - jetson_clocks should be run on host" + else + # Bare-metal Jetson - set max performance + echo "🚀 Setting Jetson to max performance..." + sudo jetson_clocks 2>/dev/null || echo "⚠️ jetson_clocks failed (needs sudo)" + fi +fi + +# Detect system architecture for platform-specific setup +ARCH=$(uname -m) + +# Set up ONNX Runtime environment - check multiple possible locations +ONNX_RUNTIME_PATHS=( + "/opt/onnxruntime" + "/usr/local/onnxruntime" + "/usr/lib/onnxruntime" + "$HOME/.local/onnxruntime" + "/opt/intel/openvino/runtime/3rdparty/onnx_runtime" +) + +ONNX_FOUND=false +for path in "${ONNX_RUNTIME_PATHS[@]}"; do + if [ -d "$path" ]; then + export onnxruntime_DIR="$path/lib/cmake/onnxruntime" + echo "✅ ONNX Runtime found at: $path" + ONNX_FOUND=true + break + fi +done + +if [ "$ONNX_FOUND" = false ]; then + # Try to use system package manager installation + if pkg-config --exists libonnxruntime 2>/dev/null; then + echo "✅ ONNX Runtime found via system package manager" + else + echo "⚠️ ONNX Runtime not found in common locations:" + printf " %s\n" "${ONNX_RUNTIME_PATHS[@]}" + echo " Please run scripts/install_deps.sh or install ONNX Runtime manually" + fi +fi + +# Auto-detect system architecture and library paths for different distributions +DISTRO_ID="" + +# Detect Linux distribution +if [ -f /etc/os-release ]; then + DISTRO_ID=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"') +elif [ -f /etc/redhat-release ]; then + DISTRO_ID="rhel" +elif [ -f /etc/debian_version ]; then + DISTRO_ID="debian" +fi + +# Set system library directory based on distribution and architecture +case "$DISTRO_ID" in + ubuntu|debian|linuxmint) + # Debian-based distributions use multiarch paths + if [ "$ARCH" = "x86_64" ]; then + SYSTEM_LIB_DIR="/usr/lib/x86_64-linux-gnu" + elif [ "$ARCH" = "aarch64" ]; then + SYSTEM_LIB_DIR="/usr/lib/aarch64-linux-gnu" + else + SYSTEM_LIB_DIR="/usr/lib" + fi + ;; + fedora|rhel|centos|rocky|almalinux) + # Red Hat-based distributions typically use lib64 for 64-bit + if [[ "$ARCH" == "x86_64" || "$ARCH" == "aarch64" ]]; then + SYSTEM_LIB_DIR="/usr/lib64" + else + SYSTEM_LIB_DIR="/usr/lib" + fi + ;; + opensuse*|sles) + # SUSE distributions also use lib64 + if [[ "$ARCH" == "x86_64" || "$ARCH" == "aarch64" ]]; then + SYSTEM_LIB_DIR="/usr/lib64" + else + SYSTEM_LIB_DIR="/usr/lib" + fi + ;; + arch|manjaro) + # Arch Linux uses standard lib structure + SYSTEM_LIB_DIR="/usr/lib" + ;; + *) + # Generic fallback - try to detect best path + if [ -d "/usr/lib/$ARCH-linux-gnu" ]; then + SYSTEM_LIB_DIR="/usr/lib/$ARCH-linux-gnu" + elif [ -d "/usr/lib64" ] && [[ "$ARCH" == "x86_64" || "$ARCH" == "aarch64" ]]; then + SYSTEM_LIB_DIR="/usr/lib64" + else + SYSTEM_LIB_DIR="/usr/lib" + fi + ;; +esac + +echo "🔍 Detected: $DISTRO_ID on $ARCH, using library path: $SYSTEM_LIB_DIR" + +# Set up CMake paths - use dynamically detected paths +CMAKE_PATHS="$SYSTEM_LIB_DIR/cmake" + +# Add ONNX Runtime path if we found one +if [ -n "$onnxruntime_DIR" ]; then + ONNX_BASE_PATH=$(dirname $(dirname $onnxruntime_DIR)) # Remove /lib/cmake/onnxruntime to get base path + CMAKE_PATHS="$ONNX_BASE_PATH:$CMAKE_PATHS" +fi + +export CMAKE_PREFIX_PATH="$CMAKE_PATHS:$CMAKE_PREFIX_PATH" +export OPENSSL_ROOT_DIR="/usr" + +# ROS2 Environment Setup - dynamically find ROS2 installation +ROS2_FOUND=false + +# Common ROS2 distributions in order of preference (newest first) +ROS2_DISTROS=("jazzy" "iron" "humble" "galactic" "foxy" "eloquent" "dashing" "crystal") +ROS2_INSTALL_PATHS=("/opt/ros" "/usr/local/ros" "$HOME/ros2_ws/install") + +for install_path in "${ROS2_INSTALL_PATHS[@]}"; do + if [ "$ROS2_FOUND" = true ]; then + break + fi + + for distro in "${ROS2_DISTROS[@]}"; do + ros2_setup_file="$install_path/$distro/setup.bash" + if [ -f "$ros2_setup_file" ]; then + source "$ros2_setup_file" + export RMW_IMPLEMENTATION=rmw_fastrtps_cpp + # Remove problematic system library path that conflicts with system GLIBC + export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr ':' '\n' | grep -v "$SYSTEM_LIB_DIR" | tr '\n' ':' | sed 's/:$//') + echo "✅ ROS2 $distro found at $install_path/$distro - system manages all ROS2 dependencies" + export HAS_ROS2=1 + export ROS_LOCALHOST_ONLY=1 + ROS2_FOUND=true + break + fi + done +done + +if [ "$ROS2_FOUND" = false ]; then + echo "⚠️ ROS2 not found in common locations:" + printf " %s/\n" "${ROS2_INSTALL_PATHS[@]}" + echo " Install ROS2 system-wide for ROS2InputHandler support" + echo " Building will continue without ROS2InputHandler" + export HAS_ROS2=0 +fi + +# Set up production FastRTPS profile +if [ -f "src/g1/g1_deploy_onnx_ref/config/fastrtps_profile.xml" ]; then + export FASTRTPS_DEFAULT_PROFILES_FILE="$(pwd)/src/g1/g1_deploy_onnx_ref/config/fastrtps_profile.xml" + echo "✅ FastRTPS production profile configured" +fi + +# TensorRT Environment Setup +# Check if TensorRT_ROOT is already set, if not try to load from .bashrc +if [ -z "$TensorRT_ROOT" ] && [ -f "$HOME/.bashrc" ]; then + # Extract TensorRT_ROOT from .bashrc if it exists + BASHRC_TENSORRT=$(grep -o 'export TensorRT_ROOT=.*' "$HOME/.bashrc" | head -n1 | cut -d'=' -f2 | tr -d '"' | envsubst) + if [ -n "$BASHRC_TENSORRT" ]; then + export TensorRT_ROOT="$BASHRC_TENSORRT" + echo "📋 Loaded TensorRT_ROOT from ~/.bashrc: $TensorRT_ROOT" + fi +fi + +if [ -n "$TensorRT_ROOT" ]; then + export LD_LIBRARY_PATH="$TensorRT_ROOT/lib:$LD_LIBRARY_PATH" + echo "✅ TensorRT environment configured" + + # For Jetson systems, ensure DLA libraries are accessible for runtime + if [[ "$ARCH" == "aarch64" ]] && [[ -f "/etc/nv_tegra_release" || -d "/usr/src/jetson_multimedia_api" ]]; then + echo "🤖 Jetson system detected - setting up DLA library paths for runtime" + + # Create missing libcudla.so.1 symlink if needed (TensorRT expects this name) + if [ -f "/usr/lib/aarch64-linux-gnu/nvidia/libnvcudla.so" ] && [ ! -f "/usr/lib/aarch64-linux-gnu/nvidia/libcudla.so.1" ]; then + echo " 🔗 Creating libcudla.so.1 symlink for TensorRT compatibility..." + sudo ln -sf libnvcudla.so /usr/lib/aarch64-linux-gnu/nvidia/libcudla.so.1 2>/dev/null || echo " ⚠️ Could not create symlink (may need sudo)" + sudo ln -sf libnvcudla.so /usr/lib/aarch64-linux-gnu/nvidia/libcudla.so 2>/dev/null || echo " ⚠️ Could not create symlink (may need sudo)" + echo " ✅ libcudla.so.1 → libnvcudla.so" + fi + + # CRITICAL: Add DLA library path for runtime (this is why your executable can't run) + export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/nvidia:$LD_LIBRARY_PATH" + # Also add to LIBRARY_PATH so the build-time linker finds -lcudla here. + # GCC/ld doesn't search ldconfig paths for -l resolution by default; LIBRARY_PATH + # is the build-time analogue of LD_LIBRARY_PATH and feeds directly into -L search. + export LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/nvidia:${LIBRARY_PATH:-}" + echo " 📁 Added DLA library path to current session (runtime + build-time)" + + # Make it persistent so you don't need to run setup_env.sh every time + if ! grep -q "/usr/lib/aarch64-linux-gnu/nvidia" ~/.bashrc 2>/dev/null; then + echo 'export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/nvidia:$LD_LIBRARY_PATH"' >> ~/.bashrc + echo " ✅ Added DLA library path to ~/.bashrc for future sessions" + fi + + echo " ℹ️ Your executable should now be able to find DLA libraries at runtime" + fi +else + echo "⚠️ TensorRT_ROOT is not set" + echo " Please install TensorRT and add 'export TensorRT_ROOT=/path/to/tensorrt' to your ~/.bashrc" + echo " Or source ~/.bashrc before running this script" +fi + +# CUDA Environment Setup +echo "🔧 Setting up CUDA environment..." + +# Function to detect and set CUDA toolkit root +setup_cuda_toolkit() { + # Check if CUDAToolkit_ROOT is already set + if [ -n "$CUDAToolkit_ROOT" ] && [ -f "$CUDAToolkit_ROOT/bin/nvcc" ]; then + echo "✅ CUDA toolkit found: CUDAToolkit_ROOT already set to $CUDAToolkit_ROOT" + return 0 + fi + + # Check for nvcc in PATH first + if command -v nvcc &> /dev/null; then + NVCC_PATH=$(command -v nvcc) + CUDA_ROOT=$(dirname $(dirname "$NVCC_PATH")) + export CUDAToolkit_ROOT="$CUDA_ROOT" + echo "✅ CUDA toolkit found in PATH: $CUDAToolkit_ROOT" + return 0 + fi + + # Check common CUDA installation paths (including CUDA 12.6 for newer Jetson) + CUDA_PATHS=( + "/usr/local/cuda" + "/usr/local/cuda-12.6" # CUDA 12.6 on newer Jetson + "/usr/local/cuda-12.5" # CUDA 12.5 variant + "/usr/local/cuda-12.4" # CUDA 12.4 variant + "/usr/local/cuda-12" + "/usr/local/cuda-11.4" # Common on older Jetson + "/usr/local/cuda-11" + "/usr/local/cuda-10.2" # Common on older Jetson + "/usr/local/cuda-10" + "/opt/cuda" + "/usr/cuda" + ) + + for cuda_path in "${CUDA_PATHS[@]}"; do + if [ -f "$cuda_path/bin/nvcc" ]; then + export CUDAToolkit_ROOT="$cuda_path" + export CUDA_HOME="$cuda_path" # Alternative name CMake might use + export PATH="$cuda_path/bin:$PATH" + export LD_LIBRARY_PATH="$cuda_path/lib64:$cuda_path/lib:$LD_LIBRARY_PATH" + echo "✅ CUDA toolkit found at: $CUDAToolkit_ROOT" + echo " Added to PATH: $cuda_path/bin" + echo " Added CUDA libraries to LD_LIBRARY_PATH" + return 0 + fi + done + + return 1 +} + +# Set up CUDA toolkit +if setup_cuda_toolkit; then + # Add CUDA library paths + if [ -n "$CUDAToolkit_ROOT" ]; then + export LD_LIBRARY_PATH="$CUDAToolkit_ROOT/lib64:$CUDAToolkit_ROOT/lib:$LD_LIBRARY_PATH" + + # For Jetson with CUDA 12.6+, also add the targets/aarch64-linux/lib path for libcudla + if [[ "$ARCH" == "aarch64" ]] && [ -d "$CUDAToolkit_ROOT/targets/aarch64-linux/lib" ]; then + export LD_LIBRARY_PATH="$CUDAToolkit_ROOT/targets/aarch64-linux/lib:$LD_LIBRARY_PATH" + echo " ✅ Added CUDA aarch64-linux libraries (includes libcudla for TensorRT DLA support)" + fi + fi +else + echo "ℹ️ CUDA toolkit (nvcc) not found. This is OK - checking for runtime libraries..." + echo " Note: Full toolkit is preferred for development but runtime-only is sufficient for execution" +fi + +# Set up CUDA runtime libraries (fallback) +# Note: Only add nvidia path if we don't already have CUDA toolkit paths set up +# This prevents conflicts where libnvcudla.so shadows the correct libcudla.so from CUDA toolkit +if [ -z "$CUDAToolkit_ROOT" ] && [ -d "/usr/lib/aarch64-linux-gnu/nvidia/" ]; then + export LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/nvidia/:$LD_LIBRARY_PATH" + echo "✅ CUDA runtime libraries found (aarch64)" +elif [ -n "$CUDAToolkit_ROOT" ]; then + echo "✅ Using CUDA libraries from toolkit (prioritized over system runtime libs)" +else + cuda_so_path=$(find /usr -name libcuda.so.1 2>/dev/null | head -n1) + if [ -n "$cuda_so_path" ]; then + export LD_PRELOAD="$cuda_so_path" + echo "✅ CUDA runtime library found at $cuda_so_path" + else + echo "========================================================================" + echo "⚠️ Warning: CUDA libraries not found. GPU functionality may be unavailable." + echo " Please install NVIDIA drivers and CUDA toolkit for GPU support." + echo "========================================================================" + fi +fi + +# Add ONNX Runtime to library path if not already there +if [ -d "/opt/onnxruntime/lib" ]; then + export LD_LIBRARY_PATH="/opt/onnxruntime/lib:$LD_LIBRARY_PATH" +fi + +# Set up Git LFS (if not already done) +if command -v git-lfs &> /dev/null; then + git lfs install &> /dev/null + echo "✅ Git LFS configured" + + # Pull large files if in git repository + if [ -d ".git" ]; then + echo "📥 Pulling Git LFS files..." + git lfs pull + fi +else + echo "⚠️ Git LFS not found. Please install git-lfs package." +fi + +# Verify essential tools +echo "" +echo "🔍 Verifying essential tools:" + +check_command() { + if command -v "$1" &> /dev/null; then + echo "✅ $1: $(command -v $1)" + else + echo "❌ $1: not found" + fi +} + +check_command cmake +check_command clang +check_command just +check_command git + +echo "" +echo "🎉 Environment setup complete!" +echo "" +echo "📝 You can now run:" +echo " just build # Build the project" +echo " just --list # See all available commands" +echo "" + +# Optional: Add this setup to the current shell session persistence +if [ -n "$BASH_VERSION" ]; then + export PS1="(g1_deploy) $PS1" +fi + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_wifi.sh b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_wifi.sh new file mode 100644 index 0000000000000000000000000000000000000000..186aa7cb82c0197f58f7273396480f589a4e1c3b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/scripts/setup_wifi.sh @@ -0,0 +1,265 @@ +#!/bin/bash + +echo "=== [WiFi Setup Script] Starting... ===" + +# WiFi network configuration (set via env or flags) +# Usage: +# WIFI_SSID="MyWifi" WIFI_PASSWORD="secret" WIFI_GATEWAY="192.168.x.x" ./setup_wifi.sh +# ./setup_wifi.sh --ssid "MyWifi" --password "secret" --interface "wlan0" --gateway "192.168.x.x" +WIFI_SSID="${WIFI_SSID:-}" +WIFI_PASSWORD="${WIFI_PASSWORD:-}" +CONNECTION_NAME="${CONNECTION_NAME:-}" +WIFI_INTERFACE="${WIFI_INTERFACE:-}" +FALLBACK_SSID="${FALLBACK_SSID:-}" + +usage() { + cat << 'USAGE_EOF' +Usage: setup_wifi.sh [options] + +Options: + --ssid WiFi SSID (required) + --password WiFi password (required for secured networks) + --interface WiFi interface (optional; auto-detect if omitted) + --connection Connection profile name (optional; defaults to SSID) + --gateway Gateway IP (optional; sets route/DNS) + --fallback-ssid Fallback SSID (optional) + -h, --help Show this help + +You can also set environment variables: + WIFI_SSID, WIFI_PASSWORD, WIFI_INTERFACE, CONNECTION_NAME, FALLBACK_SSID, WIFI_GATEWAY, + ROUTE_CLEANUP_GW +USAGE_EOF +} + +while [ $# -gt 0 ]; do + case "$1" in + --ssid) WIFI_SSID="$2"; shift 2 ;; + --password) WIFI_PASSWORD="$2"; shift 2 ;; + --interface) WIFI_INTERFACE="$2"; shift 2 ;; + --connection) CONNECTION_NAME="$2"; shift 2 ;; + --fallback-ssid) FALLBACK_SSID="$2"; shift 2 ;; + --gateway) WIFI_GATEWAY="$2"; shift 2 ;; + -h|--help) usage; exit 0 ;; + *) + echo "[!] Unknown option: $1" + usage + exit 2 + ;; + esac +done + +if [ -z "$WIFI_SSID" ]; then + echo "[✗] Missing WiFi SSID. Provide --ssid or WIFI_SSID." + usage + exit 2 +fi + +if [ -z "$CONNECTION_NAME" ]; then + CONNECTION_NAME="$WIFI_SSID" +fi + +if [ -z "$WIFI_INTERFACE" ]; then + WIFI_INTERFACE=$(nmcli -t -f DEVICE,TYPE device status | awk -F: '$2=="wifi"{print $1; exit}') +fi + +if [ -z "$WIFI_INTERFACE" ]; then + echo "[✗] No WiFi interface detected. Provide --interface or WIFI_INTERFACE." + exit 2 +fi + +# Network configuration +# If WIFI_GATEWAY is set, routing and DNS will be configured to use it. +WIFI_GATEWAY="${WIFI_GATEWAY:-}" +# Optional default gateway to remove from routing table. +ROUTE_CLEANUP_GW="${ROUTE_CLEANUP_GW:-}" +WIRED_CONNECTION="Wired connection 1" + +# Step 1: Unblock and enable WiFi +echo "[1] Unblocking WiFi and enabling interface..." +sudo rfkill unblock wifi +sudo ip link set $WIFI_INTERFACE up + +# Step 2: Scan for networks to verify NetworkManager is working +echo "[2] Scanning for WiFi networks..." +sudo nmcli device wifi rescan +sleep 3 + +# Step 3: Check if the target network is visible +echo "[3] Checking for '$WIFI_SSID' network..." +if sudo nmcli device wifi list | grep -q "$WIFI_SSID"; then + echo "[✓] Network '$WIFI_SSID' found in scan" + # Try direct connection + echo "[4] Attempting direct connection to '$WIFI_SSID'..." + if [ -n "$WIFI_PASSWORD" ]; then + CONNECT_CMD=(sudo nmcli device wifi connect "$WIFI_SSID" password "$WIFI_PASSWORD") + else + CONNECT_CMD=(sudo nmcli device wifi connect "$WIFI_SSID") + fi + if "${CONNECT_CMD[@]}"; then + echo "[✓] Successfully connected directly" + CONNECTION_SUCCESS=true + else + echo "[!] Direct connection failed, trying manual profile method..." + CONNECTION_SUCCESS=false + fi +else + echo "[!] Network '$WIFI_SSID' not found in scan (possibly hidden)" + CONNECTION_SUCCESS=false +fi + +# Step 4: If direct connection failed or network not found, create manual connection profile +if [ "$CONNECTION_SUCCESS" != "true" ]; then + echo "[4] Creating manual connection profile for '$WIFI_SSID'..." + + # Remove existing connection profile if it exists + sudo nmcli connection delete "$CONNECTION_NAME" 2>/dev/null || true + + # Create new connection profile + if [ -n "$WIFI_PASSWORD" ]; then + ADD_ARGS=(wifi-sec.key-mgmt wpa-psk wifi-sec.psk "$WIFI_PASSWORD") + else + ADD_ARGS=() + fi + if sudo nmcli connection add type wifi con-name "$CONNECTION_NAME" ifname "$WIFI_INTERFACE" ssid "$WIFI_SSID" "${ADD_ARGS[@]}"; then + echo "[✓] Connection profile created successfully" + + echo "[5] Activating connection profile..." + if sudo nmcli connection up "$CONNECTION_NAME"; then + echo "[✓] Connection profile activated successfully" + CONNECTION_SUCCESS=true + else + echo "[✗] Failed to activate connection profile" + CONNECTION_SUCCESS=false + fi + else + echo "[✗] Failed to create connection profile" + CONNECTION_SUCCESS=false + fi +fi + +# Step 5: Configure network routing priorities if connection successful +if [ "$CONNECTION_SUCCESS" = "true" ]; then + echo "[5] Configuring network routing priorities..." + + # Set WiFi connection to high priority (low metric) + echo " Setting WiFi connection priority to 100..." + sudo nmcli connection modify "$CONNECTION_NAME" ipv4.route-metric 100 + + # Set wired connection to very low priority (high metric) + echo " Setting wired connection priority to 30000..." + sudo nmcli connection modify "$WIRED_CONNECTION" ipv4.route-metric 30000 2>/dev/null || true + + # Remove any problematic default routes + echo " Cleaning up routing table..." + if [ -n "$ROUTE_CLEANUP_GW" ]; then + sudo ip route del default via "$ROUTE_CLEANUP_GW" 2>/dev/null || true + fi + + # Ensure WiFi route has highest priority + if [ -n "$WIFI_GATEWAY" ]; then + sudo ip route add default via "$WIFI_GATEWAY" dev "$WIFI_INTERFACE" metric 50 2>/dev/null || true + + # Configure DNS to use router and public DNS + echo " Configuring DNS..." + sudo tee /etc/resolv.conf > /dev/null << DNS_EOF +nameserver $WIFI_GATEWAY +nameserver 8.8.8.8 +nameserver 1.1.1.1 +DNS_EOF + fi + + echo "[✓] Network routing configured for WiFi priority" +fi + +# Step 6: Verify connection status +echo "[6] Checking connection status..." +if [ "$CONNECTION_SUCCESS" = "true" ]; then + CURRENT_CONNECTION=$(nmcli device status | grep "$WIFI_INTERFACE" | awk '{print $4}') + if [[ "$CURRENT_CONNECTION" == "$CONNECTION_NAME" ]] || [[ "$CURRENT_CONNECTION" == "$WIFI_SSID" ]]; then + echo "[✓] Successfully connected to '$WIFI_SSID'" + echo " Interface: $WIFI_INTERFACE" + echo " Connection: $CURRENT_CONNECTION" + else + echo "[!] Connection status unclear" + CONNECTION_SUCCESS=false + fi +fi + +# Step 7: Test internet connectivity +if [ "$CONNECTION_SUCCESS" = "true" ]; then + echo "[7] Testing internet connectivity..." + MAX_RETRIES=3 + COUNT=0 + INTERNET_OK=false + + while [ "$COUNT" -lt "$MAX_RETRIES" ]; do + if ping -c 2 -W 5 8.8.8.8 >/dev/null 2>&1; then + echo "[✓] Internet connectivity verified (ping test)" + + # Also test DNS resolution + if curl -s --connect-timeout 5 -I http://google.com >/dev/null 2>&1; then + echo "[✓] DNS resolution and HTTP connectivity verified" + INTERNET_OK=true + break + else + echo "[!] DNS/HTTP test failed, but ping works. Retrying... ($((COUNT+1))/$MAX_RETRIES)" + fi + else + echo "[!] Internet test failed. Retrying... ($((COUNT+1))/$MAX_RETRIES)" + fi + + sleep 3 + ((COUNT++)) + done + + if [ "$INTERNET_OK" != "true" ]; then + echo "[!] Internet connectivity test failed after $MAX_RETRIES attempts" + CONNECTION_SUCCESS=false + fi +fi + +# Step 8: Fallback to previous network if connection failed +if [ "$CONNECTION_SUCCESS" != "true" ] && [ -n "$FALLBACK_SSID" ]; then + echo "[8] Connection to '$WIFI_SSID' failed. Attempting fallback to '$FALLBACK_SSID'..." + + # Try to connect to fallback network + if sudo nmcli device wifi list | grep -q "$FALLBACK_SSID"; then + echo "[!] Attempting to connect to fallback network '$FALLBACK_SSID'..." + if sudo nmcli device wifi connect "$FALLBACK_SSID"; then + echo "[✓] Connected to fallback network '$FALLBACK_SSID'" + + # Apply routing fixes for fallback network too + echo " Applying routing fixes for fallback network..." + if [ -n "$ROUTE_CLEANUP_GW" ]; then + sudo ip route del default via "$ROUTE_CLEANUP_GW" 2>/dev/null || true + fi + sudo nmcli connection modify "$WIRED_CONNECTION" ipv4.route-metric 30000 2>/dev/null || true + else + echo "[✗] Failed to connect to fallback network" + fi + else + echo "[!] Fallback network '$FALLBACK_SSID' not available" + fi +fi + +# Step 9: Final status report +echo "[9] Final WiFi status:" +nmcli device status | grep wifi +echo "" +echo "Active connections:" +nmcli connection show --active | head -5 +echo "" +echo "Current routing table:" +ip route show | head -5 +echo "" +echo "DNS configuration:" +cat /etc/resolv.conf | grep nameserver + +echo "=== [WiFi Setup Script] Completed ===" + +# Exit with appropriate code +if [ "$CONNECTION_SUCCESS" = "true" ]; then + exit 0 +else + exit 1 +fi diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9471d2f33713ad47cdbff8bbe975258950b41b95 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(TRTInference) +add_subdirectory(g1) +add_subdirectory(audio_thread) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..57077dbac705e5976493c3553513d7fa0f3a3686 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/CMakeLists.txt @@ -0,0 +1,38 @@ +message(STATUS "blah = ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake") + +set(SRC_FILES + "InferenceEngine.cpp" + "InferenceEngine.h" + "InferenceEngine.inl" + "Utility.h" +) + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC_FILES}) + +add_library(TRTInference ${SRC_FILES}) + +# Explicitly set C++ standard for this library +set_target_properties(TRTInference PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF +) + +# Set up include directories +set(CUDA_INCLUDES "") +if(CUDAToolkit_FOUND) + set(CUDA_INCLUDES ${CUDAToolkit_INCLUDE_DIRS}) +elseif(CUDA_INCLUDE_DIR) + set(CUDA_INCLUDES ${CUDA_INCLUDE_DIR}) +endif() + +target_include_directories(TRTInference + PRIVATE ${PROJECT_SOURCE_DIR}/src + PRIVATE ${TensorRT_INCLUDE_DIRS} + PRIVATE ${CUDA_INCLUDES}) + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") + target_compile_options(TRTInference PRIVATE -Wno-deprecated-declarations -std=c++20) +endif() + +target_link_libraries(TRTInference ${TensorRT_LIBRARIES} ${CUDA_LIBRARIES}) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12435008cfed752e18946c8179b4e04bdee7af6a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.cpp @@ -0,0 +1,794 @@ +#include "InferenceEngine.h" +#include "Log.h" +#include "picosha2.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +namespace +{ + class Logger : public nvinfer1::ILogger + { + public: + Logger( bool verbose ) + : m_flags( UINT8_MAX ) + { + m_flags.set( static_cast( Severity::kVERBOSE ), verbose ); + } + + void log( Severity severity, const char* msg ) noexcept override + { + if ( !m_flags.test( static_cast( severity ) ) ) + return; + + switch ( severity ) + { + case Severity::kINFO: + case Severity::kVERBOSE: + LOG_INFO( msg ); + break; + case Severity::kWARNING: + LOG_WARNING( msg ); + break; + case Severity::kERROR: + case Severity::kINTERNAL_ERROR: + LOG_ERROR( msg ); + break; + } + } + + void log( cudaError_t error ) + { + if ( error == cudaError_t::cudaSuccess ) + return; + + LOG_ERROR( "CUDA failed with error [ " + std::to_string( error ) + " : " + cudaGetErrorName( error ) + " ]: " + cudaGetErrorString( error ) ); + } + + private: + static constexpr uint8_t NB_FLAGS = static_cast( Severity::kVERBOSE ) + 1; + std::bitset m_flags; + }; + + Logger s_logger(false); + + bool FileExists( const std::string& filepath ) + { + return std::ifstream( filepath.c_str() ).good(); + } + + std::string GetCudaDeviceName( int deviceID ) + { + int deviceCount = 0; + cudaGetDeviceCount( &deviceCount ); + + if ( deviceID >= deviceCount ) + return std::string(); + + cudaDeviceProp prop; + cudaGetDeviceProperties( &prop, deviceID ); + return std::string( prop.name ); + } + + int SizeOfTensorDataType( nvinfer1::DataType dataType ) + { + int size = -1; + switch ( dataType ) + { + case nvinfer1::DataType::kINT64: + size = sizeof( uint64_t ); + break; + + case nvinfer1::DataType::kINT32: + case nvinfer1::DataType::kFLOAT: + size = sizeof( uint32_t ); + break; + + case nvinfer1::DataType::kHALF: + case nvinfer1::DataType::kBF16: + size = sizeof( uint16_t ); + break; + + case nvinfer1::DataType::kFP8: + case nvinfer1::DataType::kINT8: + case nvinfer1::DataType::kBOOL: + case nvinfer1::DataType::kUINT8: + size = sizeof( uint8_t ); + break; + + default: + break; + } + + return size; + } +} + +bool ConvertONNXToTRT( + const Options& options, + const std::string& onnxModelPath, + std::string& trtFile, + const std::string prefix, + bool forceConvert +) +{ + if ( !FileExists( onnxModelPath ) ) + { + LOG_ERROR( "Cannot find ONNX mode at path: " + onnxModelPath ); + return false; + } + + // Find a hash string identifying the onnx we're going to convert to + // tensorrt, plus the gpu we're going to convert it for: + std::ifstream file(onnxModelPath, std::ios::binary); + std::string trtHash = picosha2::hash256_hex_string( + std::istreambuf_iterator(file), std::istreambuf_iterator() + ); + + // hash in the cuda device name and precision:: + trtHash = picosha2::hash256_hex_string(trtHash + GetCudaDeviceName( options.deviceID )); + trtHash = picosha2::hash256_hex_string(trtHash + std::to_string(int(options.precision))); + + // name of the tensorrt we're going to write to (same directory as the ONNX model): + const auto filenamePos = onnxModelPath.find_last_of( '/' ) + 1; + const auto onnxDir = onnxModelPath.substr(0, filenamePos); + trtFile = onnxDir + prefix + onnxModelPath.substr( filenamePos, onnxModelPath.find_last_of( '.' ) - filenamePos ); + trtFile += ".trt"; + + if (!forceConvert && FileExists( trtFile ) ) + { + std::ifstream file(trtFile, std::ios::binary); + + std::string hashInFile; + hashInFile.resize(trtHash.size()); + + file.read(const_cast(hashInFile.c_str()), trtHash.size()); + + std::cerr << "hash value in file " << hashInFile << std::endl; + std::cerr << "hash of onnx/gpu type " << trtHash << std::endl; + + if(hashInFile == trtHash) + { + return true; + } + LOG_INFO( "TRT file " + trtFile + " is out of date and needs to be regenerated. This could take a while..." ); + } + else + { + LOG_INFO( "TRT file " + trtFile + " not found. This could take a while to generate..." ); + } + + + // Create engine builder + auto builder = std::unique_ptr( nvinfer1::createInferBuilder( s_logger ) ); + if ( !builder ) + { + LOG_ERROR( "Could not create builder." ); + return false; + } + + // Create network + const uint32_t explicitBatch = 1U << static_cast( nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH ); + auto network = std::unique_ptr( builder->createNetworkV2( explicitBatch ) ); + if ( !network ) + { + LOG_ERROR( "Could not create network." ); + return false; + } + + // Create a parser for reading the onnx file. + auto parser = std::unique_ptr( nvonnxparser::createParser( *network, s_logger ) ); + if ( !parser ) + { + LOG_ERROR( "Could not create ONNX parser." ); + return false; + } + + // Read and parse the ONNX file + auto parsed = parser->parseFromFile( onnxModelPath.c_str(), 0 ); + if ( !parsed ) + { + LOG_ERROR( "Unable to parse the ONNX model at: " + onnxModelPath ); + return false; + } + + // Ensure that all the inputs have the same batch size + const int32_t inputCount = network->getNbInputs(); + if ( inputCount < 1 ) + { + LOG_ERROR( "Model has no inputs." ); + return false; + } + + // Set dynamic axis info for inputs: + auto profile = builder->createOptimizationProfile(); + for ( int32_t i = 0; i < inputCount; ++i ) + { + auto t = network->getInput( i ); + const auto name = t->getName(); + auto dims = t->getDimensions(); + + bool hasDynamicAxes = false; + auto dimsMin = dims; + auto dimsOpt = dims; + auto dimsMax = dims; + + for ( int32_t n = 0; n < dims.nbDims; ++n ) + { + if ( dims.d[n] == -1 ) + { + auto axis_sizes = options.defaultSizes; + if (options.dynamic_axes_names.contains(t->getName())) + { + auto& dynamic_axis_names = options.dynamic_axes_names.at(t->getName()); + if (!dynamic_axis_names.contains(n)) + { + LOG_ERROR("Tensor " + std::string(t->getName()) + " has a dynamic axes, but its name isn't specified in options.input_dynamic_axes"); + return false; + } + + auto axis_name = dynamic_axis_names.at(n); + if (!options.dynamic_axes_sizes.contains(axis_name)) + { + LOG_ERROR("Named axis " + axis_name + " has no entry in options.dynamic_axes_sizes"); + return false; + } + axis_sizes = options.dynamic_axes_sizes.at(axis_name); + } + + hasDynamicAxes = true; + dimsMin.d[n] = std::get<0>( axis_sizes ); + dimsOpt.d[n] = std::get<1>( axis_sizes ); + dimsMax.d[n] = std::get<2>( axis_sizes ); + } + } + profile->setDimensions( name, nvinfer1::OptProfileSelector::kMIN, dimsMin ); + profile->setDimensions( name, nvinfer1::OptProfileSelector::kOPT, dimsOpt ); + profile->setDimensions( name, nvinfer1::OptProfileSelector::kMAX, dimsMax ); + + if ( t->isShapeTensor() ) + { + if ( !options.shape_tensor_sizes.contains( name ) ) + { + LOG_ERROR( "Tensor " + std::string( name ) + " controls the shape of an internal tensor and needs an entry in options.shape_tensor_sizes" ); + return false; + } + auto &sizes = options.shape_tensor_sizes.at( name ); + + profile->setShapeValues( name, nvinfer1::OptProfileSelector::kMIN, std::get<0>( sizes ).data(), std::get<0>( sizes ).size()); + profile->setShapeValues( name, nvinfer1::OptProfileSelector::kOPT, std::get<1>( sizes ).data(), std::get<1>( sizes ).size() ); + profile->setShapeValues( name, nvinfer1::OptProfileSelector::kMAX, std::get<2>( sizes ).data(), std::get<2>( sizes ).size() ); + } + } + + auto config = std::unique_ptr( builder->createBuilderConfig() ); + if ( !config ) + { + LOG_ERROR( "Could not create builder config." ); + return false; + } + config->addOptimizationProfile( profile ); + + // Set the precision level + if ( options.precision == Precision::FP16 ) + { + // Ensure the GPU supports FP16 inference + if ( !builder->platformHasFastFp16() ) + { + LOG_ERROR( "GPU does not support FP16 precision." ); + return false; + } + config->setFlag( nvinfer1::BuilderFlag::kFP16 ); + } + + // CUDA stream used for profiling by the builder. + cudaStream_t stream; + s_logger.log( cudaStreamCreate( &stream ) ); + config->setProfileStream( stream ); + + // Build the engine + // If this call fails, it is suggested to increase the logger verbosity to kVERBOSE and try rebuilding the engine. + // Doing so will provide you with more information on why exactly it is failing. + auto serializedNetwork = builder->buildSerializedNetwork( *network, *config ); + if ( !serializedNetwork ) + { + s_logger.log( cudaStreamDestroy( stream ) ); + + LOG_ERROR( "Failed to build the engine!" ); + return false; + } + + // Write the engine to disk + std::ofstream outfile( trtFile, std::ofstream::binary ); + + // Write the onnx/gpu hash first: + outfile.write( trtHash.c_str(), trtHash.size() ); + + // Write the engine: + outfile.write( reinterpret_cast( serializedNetwork->data() ), serializedNetwork->size() ); + + LOG_INFO( "Saved TRT file to " + trtFile ); + s_logger.log( cudaStreamDestroy( stream ) ); + + return true; +} + +class TRTInferenceEngine::Impl +{ +public: + + ~Impl() + { + Destroy(); + } + + bool Initialize( const std::string& trtPath, int deviceIndex, const Options::AxisNames& axisNames ) + { + Destroy(); + + // Read the serialized model from disk + std::ifstream file( trtPath, std::ios::binary | std::ios::ate ); + std::streamsize size = file.tellg(); + if (size < 0) + { + LOG_ERROR("Unable to read engine file!"); + return false; + } + + file.seekg( 0, std::ios::beg ); + std::vector buffer( size ); + if ( !file.read( buffer.data(), size ) ) + { + LOG_ERROR( "Unable to read engine file!" ); + return false; + } + + // Create runtime to deserialize the engine file. + m_runtime = std::unique_ptr( nvinfer1::createInferRuntime( s_logger ) ); + if ( !m_runtime ) + { + LOG_ERROR( "Unable to create a runtime inference model." ); + return false; + } + + // Set the device index + if ( cudaSetDevice( deviceIndex ) != cudaError_t::cudaSuccess ) + { + int gpuCount; + cudaGetDeviceCount( &gpuCount ); + LOG_ERROR( "Unable to set GPU device index to " + std::to_string( deviceIndex ) + ". Current device has " + std::to_string( gpuCount ) + " CUDA - capable GPU(s)." ); + return false; + } + + // Create an engine, a representation of the optimized model. + // skip the first 64 bytes when deserializing the engine file as they just contain a hash: + m_engine = std::unique_ptr( m_runtime->deserializeCudaEngine( buffer.data() + 64, buffer.size() - 64 ) ); + if ( !m_engine ) + { + LOG_ERROR("Unable to create engine."); + return false; + } + + // The execution context contains all of the state associated with a particular invocation + m_context = std::unique_ptr( m_engine->createExecutionContext() ); + if ( !m_context ) + { + LOG_ERROR("Unable to create execution context."); + return false; + } + + m_axis_names = axisNames; + + const uint32_t tensorCount = m_engine->getNbIOTensors(); + for (int32_t i = 0; i < tensorCount; ++i) + { + const auto tensorName = m_engine->getIOTensorName(i); + const auto tensorIOMode = m_engine->getTensorIOMode(tensorName); + m_dataTypeSizes[tensorName] = SizeOfTensorDataType(m_engine->getTensorDataType(tensorName)); + } + + return true; + } + + + bool InitInputs(const AxisSizes& axisSizes) + { + DestroyBuffers(); + + const uint32_t tensorCount = m_engine->getNbIOTensors(); + for (int32_t i = 0; i < tensorCount; ++i) + { + const auto tensorName = m_engine->getIOTensorName(i); + const auto tensorIOMode = m_engine->getTensorIOMode(tensorName); + auto tensorShape = m_engine->getTensorShape(tensorName); + const auto tensorDataType = m_engine->getTensorDataType(tensorName); + + for (int32_t n = 0; n < tensorShape.nbDims; ++n) + { + if (tensorShape.d[n] == -1) + { + int64_t batchSize = 1; + if (m_axis_names.contains(tensorName)) + { + + auto& dynamic_axis_names = m_axis_names.at(tensorName); + if (!dynamic_axis_names.contains(n)) + { + LOG_ERROR("Tensor " + std::string(tensorName) + " has a dynamic axes, but its name isn't specified in axisNames"); + return false; + } + + auto axis_name = dynamic_axis_names.at(n); + if (!axisSizes.contains(axis_name)) + { + LOG_ERROR("Named axis " + axis_name + " has no entry in axisSizes"); + return false; + } + + batchSize = axisSizes.at(axis_name); + } + else if (axisSizes.size() > 0) + { + batchSize = axisSizes.begin()->second; + } + + tensorShape.d[n] = batchSize; + if (tensorIOMode == nvinfer1::TensorIOMode::kINPUT) + { + auto batchMin = m_engine->getProfileShape(tensorName, 0, nvinfer1::OptProfileSelector::kMIN).d[n]; + auto batchMax = m_engine->getProfileShape(tensorName, 0, nvinfer1::OptProfileSelector::kMAX).d[n]; + if (batchSize < batchMin || batchSize > batchMax) + { + LOG_ERROR("Batch size " + std::to_string(batchSize) + " is outside of possible range [ " + std::to_string(batchMin) + ", " + std::to_string(batchMax) + "]."); + return false; + } + } + } + } + + m_tensorShapes[tensorName] = tensorShape; + static const std::string dataTypeStr[] = { "FLOAT", "HALF", "INT8", "INT32", "BOOL", "UINT8", "FP8", "BF16", "INT64" }; + static const std::string ioTypeStr[] = { "NONE", "INPUT", "OUTPUT" }; + std::string tensorInfo = ioTypeStr[int(tensorIOMode)] + " Tensor: " + std::string(tensorName) + " ["; + size_t elementCount = 1; + for (int32_t d = 0; d < tensorShape.nbDims; ++d) + { + if (d != 0) + tensorInfo += ", "; + + tensorInfo += std::to_string(tensorShape.d[d]); + + if (elementCount > INT64_MAX / tensorShape.d[d]) + { + LOG_ERROR("Tensor too large: element count overflow"); + return false; + } + elementCount *= tensorShape.d[d]; + } + tensorInfo += "]. " + std::to_string(elementCount) + " elements of type " + dataTypeStr[int(tensorDataType)]; + LOG_INFO(tensorInfo); + + const auto sizeOfTensorData = SizeOfTensorDataType(tensorDataType); + if (sizeOfTensorData == -1) + { + LOG_ERROR("Unknown tensor data type " + std::to_string((int)tensorDataType) + "."); + return false; + } + + void* cudaBuffer; + size_t size = elementCount * sizeOfTensorData; + auto err = cudaMalloc(&cudaBuffer, size); + s_logger.log(err); + if (err != cudaSuccess) + { + LOG_ERROR("Failed to allocate CUDA memory"); + return false; + } + + s_logger.log(cudaMemset(cudaBuffer, 0, size)); + + m_context->setTensorAddress(tensorName, cudaBuffer); + if (tensorIOMode == nvinfer1::TensorIOMode::kINPUT) + { + m_inputBuffers[tensorName] = cudaBuffer; + } + else + { + m_outputBuffers[tensorName] = cudaBuffer; + } + } + + // Set input tensor shapes to specified batch size + for (int i = 0; i < tensorCount; ++i) + { + const auto tensorName = m_engine->getIOTensorName(i); + if (m_engine->getTensorIOMode(tensorName) != nvinfer1::TensorIOMode::kINPUT) + continue; + + auto tensorShape = m_tensorShapes[tensorName]; + + m_context->setInputShape(tensorName, tensorShape); + } + + return true; + } + + void DestroyBuffers() + { + for (auto& kv : m_inputBuffers) + { + s_logger.log(cudaFree(kv.second)); + } + for (auto& kv : m_outputBuffers) + { + s_logger.log(cudaFree(kv.second)); + } + + m_inputBuffers.clear(); + m_outputBuffers.clear(); + m_tensorShapes.clear(); + } + + void Destroy() + { + DestroyBuffers(); + + m_context.reset(); + m_engine.reset(); + m_runtime.reset(); + } + + bool ValidateTensorSize(const std::string& name, size_t byteCount) const + { + if (m_tensorShapes.empty()) + { + LOG_ERROR("ValidateTensorSize: InitInputs has not been called."); + return false; + } + + if (!m_tensorShapes.contains(name)) + { + LOG_ERROR("ValidateTensorSize: Tensor " + name + " not found."); + return false; + } + + size_t elementCount = 1; + const auto& tensorShape = m_tensorShapes.at(name); + for (int32_t d = 0; d < tensorShape.nbDims; ++d) + elementCount *= tensorShape.d[d]; + + const size_t expectedByteCount = elementCount * m_dataTypeSizes.at(name); + if (expectedByteCount != byteCount) + { + LOG_ERROR( + "Invalid data size for tensor [" + name + "] containing " + std::to_string(elementCount) + " elements. Expected " + + std::to_string(expectedByteCount) + " bytes, got " + std::to_string(byteCount) + " bytes instead."); + return false; + } + + return true; + } + + std::vector GetInputBufferNames() const + { + std::vector names; + names.reserve(m_inputBuffers.size()); + + for (const auto& pair : m_inputBuffers) + { + names.push_back(pair.first); + } + return names; + } + + std::vector GetOutputBufferNames() const + { + std::vector names; + names.reserve(m_outputBuffers.size()); + + for (const auto& pair : m_outputBuffers) + { + names.push_back(pair.first); + } + return names; + } + + void SetInputData(const std::string& name, const void* data, size_t byteCount) + { + if(!ValidateTensorSize(name, byteCount)) + { + LOG_ERROR("SetInputData: Tensor " + name + " is not valid."); + return; + } + s_logger.log(cudaMemcpy(m_inputBuffers[name], data, byteCount, cudaMemcpyHostToDevice)); + } + + void SetInputDataAsync(const std::string& name, const void* data, size_t byteCount, cudaStream_t stream) + { + if(!ValidateTensorSize(name, byteCount)) + { + LOG_ERROR("SetInputDataAsync: Tensor " + name + " is not valid."); + return; + } + s_logger.log(cudaMemcpyAsync(m_inputBuffers[name], data, byteCount, cudaMemcpyHostToDevice, stream)); + } + + void GetOutputData(const std::string& name, void* data, size_t byteCount) + { + if(!ValidateTensorSize(name, byteCount)) + { + LOG_ERROR("GetOutputData: Tensor " + name + " is not valid."); + return; + } + s_logger.log(cudaMemcpy(data, m_outputBuffers[name], byteCount, cudaMemcpyDeviceToHost)); + } + + void GetOutputDataAsync(const std::string& name, void* data, size_t byteCount, cudaStream_t stream) + { + if(!ValidateTensorSize(name, byteCount)) + { + LOG_ERROR("GetOutputDataAsync: Tensor " + name + " is not valid."); + return; + } + s_logger.log(cudaMemcpyAsync(data, m_outputBuffers[name], byteCount, cudaMemcpyDeviceToHost, stream)); + } + + bool Enqueue( cudaStream_t stream ) + { + if (m_tensorShapes.empty()) + { + LOG_ERROR("Enqueue: InitInputs has not been called."); + return false; + } + + if (!m_context->allInputDimensionsSpecified()) + { + LOG_ERROR("Inference engine inputs aren't defined."); + return false; + } + + if(!m_context->enqueueV3(stream)) + { + LOG_ERROR("Enqueue: Failed to enqueue."); + return false; + } + return true; + } + + bool GetTensorShape(std::string name, std::vector& shape) const + { + if (m_tensorShapes.empty()) + { + LOG_ERROR("ValidateTensorSize: InitInputs has not been called."); + return false; + } + + if (!m_tensorShapes.contains(name)) + { + LOG_ERROR("ValidateTensorSize: Tensor " + name + " not found."); + return false; + } + + const auto& tensorShape = m_tensorShapes.at(name); + shape.clear(); + for (int dim=0; dim < tensorShape.nbDims; ++dim) + { + shape.push_back(tensorShape.d[dim]); + } + return true; + } + + nvinfer1::DataType GetTensorDataType(std::string name) const + { + auto tensorDataType = m_engine->getTensorDataType(name.c_str()); + return tensorDataType; + } + + std::unique_ptr m_context = nullptr; + std::unique_ptr m_engine = nullptr; + std::unique_ptr m_runtime = nullptr; + + std::map m_tensorShapes; + + std::map m_inputBuffers; + std::map m_outputBuffers; + + std::map m_dataTypeSizes; + + Options::AxisNames m_axis_names; +}; + +TRTInferenceEngine::TRTInferenceEngine() : m_impl( new Impl ) +{ +} + +TRTInferenceEngine::~TRTInferenceEngine() +{ +} + +bool TRTInferenceEngine::Initialize(const std::string& trtPath, int deviceIndex, const Options::AxisNames& axisNames) +{ + return m_impl->Initialize(trtPath, deviceIndex, axisNames); +} + +bool TRTInferenceEngine::InitInputs(const AxisSizes& axisSizes) +{ + return m_impl->InitInputs(axisSizes); +} + +void TRTInferenceEngine::Destroy() +{ + m_impl->Destroy(); +} + +std::vector TRTInferenceEngine::GetInputTensorNames() const +{ + return m_impl->GetInputBufferNames(); +} + +std::vector TRTInferenceEngine::GetOutputTensorNames() const +{ + return m_impl->GetOutputBufferNames(); +} + +void TRTInferenceEngine::SetInputData(const std::string& name, const void* data, size_t byteCount) +{ + m_impl->SetInputData(name, data, byteCount); +} + +void TRTInferenceEngine::GetOutputData(const std::string& name, void* data, size_t byteCount) +{ + m_impl->GetOutputData( name, data, byteCount); +} + +void TRTInferenceEngine::SetInputDataAsync(const std::string& name, const void* data, size_t byteCount, cudaStream_t stream) +{ + m_impl->SetInputDataAsync(name, data, byteCount, stream); +} + +void TRTInferenceEngine::GetOutputDataAsync(const std::string& name, void* data, size_t byteCount, cudaStream_t stream) +{ + m_impl->GetOutputDataAsync(name, data, byteCount, stream); +} + +bool TRTInferenceEngine::Enqueue(cudaStream_t stream) +{ + return m_impl->Enqueue(stream); +} + +bool TRTInferenceEngine::GetTensorShape(std::string name, std::vector& shape) const +{ + return m_impl->GetTensorShape(name, shape); +} + +DataType TRTInferenceEngine::GetTensorDataType(std::string name) const +{ + auto dataType = m_impl->GetTensorDataType(name); + switch (dataType) + { + case nvinfer1::DataType::kFLOAT: + return DataType::FLOAT; + case nvinfer1::DataType::kHALF: + return DataType::HALF; + case nvinfer1::DataType::kINT8: + return DataType::INT8; + case nvinfer1::DataType::kINT32: + return DataType::INT32; + case nvinfer1::DataType::kBOOL: + return DataType::BOOL; + case nvinfer1::DataType::kUINT8: + return DataType::UINT8; + case nvinfer1::DataType::kINT64: + return DataType::INT64; + default: + LOG_ERROR("ValidateTensorSize: Tensor " + name + " not found."); + return DataType::UNKNOWN; + } +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.h new file mode 100644 index 0000000000000000000000000000000000000000..e4ee68442198284ed695acc2d88e02271e1f727f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.h @@ -0,0 +1,93 @@ +#pragma once + +#include "Utility.h" + +#include +#include +#include +#include + +enum class Precision +{ + FP32, + FP16 +}; + +enum class DataType +{ + FLOAT, + HALF, + INT8, + INT32, + BOOL, + UINT8, + INT64, + UNKNOWN +}; + + +struct Options +{ + using AxisNames = std::map< std::string, std::map >; + using AxisSizes = std::map >; + using ShapeTensorSizes = std::map, std::vector, std::vector> >; + + Precision precision = Precision::FP32; + AxisNames dynamic_axes_names; + AxisSizes dynamic_axes_sizes; + ShapeTensorSizes shape_tensor_sizes; + std::tuple defaultSizes = { 1,8,16 }; + int deviceID = 0; +}; + +bool ConvertONNXToTRT( + const Options& options, + const std::string& onnxModelPath, + std::string& generatedTRTFile, + const std::string prefix = "", + bool forceConvert = false +); + +// Forward declaration +typedef struct CUstream_st *cudaStream_t; + +class TRTInferenceEngine +{ +public: + TRTInferenceEngine(); + ~TRTInferenceEngine(); + + using AxisSizes = std::map; + bool Initialize(const std::string& trtPath, int deviceID, const Options::AxisNames& axisNames = {}); + bool InitInputs(const AxisSizes& axisSizes = {}); + void Destroy(); + + void SetInputData(const std::string& name, const void* data, size_t byteCount); + template void SetInputData(const std::string& name, const T* data, size_t elementCount); + template void SetInputData(const std::string& name, const TPinnedVector& data); + + void GetOutputData(const std::string& name, void* data, size_t byteCount); + template void GetOutputData(const std::string& name, T* data, size_t elementCount); + template void GetOutputData(const std::string& name, TPinnedVector& data); + + void SetInputDataAsync(const std::string& name, const void* data, size_t byteCount, cudaStream_t stream); + template void SetInputDataAsync(const std::string& name, const T* data, size_t elementCount, cudaStream_t stream); + template void SetInputDataAsync(const std::string& name, const TPinnedVector& data, cudaStream_t stream); + + void GetOutputDataAsync(const std::string& name, void* data, size_t byteCount, cudaStream_t stream); + template void GetOutputDataAsync(const std::string& name, T* data, size_t elementCount, cudaStream_t stream); + template void GetOutputDataAsync(const std::string& name, TPinnedVector& data, cudaStream_t stream); + + std::vector GetInputTensorNames() const; + std::vector GetOutputTensorNames() const; + + bool GetTensorShape(std::string name, std::vector& shape) const; + DataType GetTensorDataType(std::string name) const; + bool Enqueue(cudaStream_t stream); + +private: + class Impl; + std::shared_ptr m_impl = nullptr; +}; + +#include "InferenceEngine.inl" diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.inl b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.inl new file mode 100644 index 0000000000000000000000000000000000000000..3f308ec02968f909ff08ea90461bf932811cf838 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/InferenceEngine.inl @@ -0,0 +1,50 @@ +#pragma once + +template +void TRTInferenceEngine::SetInputData(const std::string& name, const T* data, size_t elementCount) +{ + SetInputData(name, static_cast(data), sizeof(T) * elementCount); +} + +template +void TRTInferenceEngine::SetInputData(const std::string& name, const TPinnedVector& data) +{ + SetInputData(name, static_cast(data.data()), sizeof(T) * data.size()); +} + +template +void TRTInferenceEngine::GetOutputData(const std::string& name, T* data, size_t elementCount) +{ + GetOutputData(name, static_cast(data), sizeof(T) * elementCount); +} + +template +void TRTInferenceEngine::GetOutputData(const std::string& name, TPinnedVector& data) +{ + GetOutputData(name, static_cast(data.data()), sizeof(T) * data.size()); +} + +template +void TRTInferenceEngine::SetInputDataAsync(const std::string& name, const T* data, size_t elementCount, cudaStream_t stream) +{ + SetInputDataAsync(name, static_cast(data), sizeof(T) * elementCount, stream); +} + +template +void TRTInferenceEngine::SetInputDataAsync(const std::string& name, const TPinnedVector& data, cudaStream_t stream) +{ + SetInputDataAsync(name, static_cast(data.data()), sizeof(T) * data.size(), stream); +} + +template +void TRTInferenceEngine::GetOutputDataAsync(const std::string& name, T* data, size_t elementCount, cudaStream_t stream) +{ + GetOutputDataAsync(name, static_cast(data), sizeof(T) * elementCount, stream); +} + +template +void TRTInferenceEngine::GetOutputDataAsync(const std::string& name, TPinnedVector& data, cudaStream_t stream) +{ + GetOutputDataAsync(name, static_cast(data.data()), sizeof(T) * data.size(), stream); +} + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Log.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Log.h new file mode 100644 index 0000000000000000000000000000000000000000..a0d1b414927d4ff0f9fca683b71b867f614fce63 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Log.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +#define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) + +#define LOG_MSG(stream, category, msg) (stream << category << " [" << __FILENAME__ << "(" << __LINE__ << ")]: " << msg << std::endl) + +#define LOG_ERROR(msg) LOG_MSG(std::cerr, "ERROR", msg) +#define LOG_WARNING(msg) LOG_MSG(std::cout, "WARNING", msg) +#define LOG_DEBUG(msg) LOG_MSG(std::cout, "DEBUG", msg) +#define LOG_INFO(msg) LOG_MSG(std::cout, "INFO", msg) + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Utility.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Utility.h new file mode 100644 index 0000000000000000000000000000000000000000..c5fae5dbcc478b5b75e0bec003748968ddb366cd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/Utility.h @@ -0,0 +1,54 @@ +#pragma once + +#include +#include +#include + +// Allocator using pinned memory allocations to bypass the extra memcpy from pageable host memory. +// +// Host data allocations (CPU) are pageable by default and the GPU cannot access data directly +// from pageable host memory. When a data transfer from pageable host memory to device memory +// is invoked, the CUDA driver must first allocate a temporary page-locked, or “pinned”, host array, +// copy the host data to the pinned array, and then transfer the data from the pinned array to device +// memory. + +template +class PinnedAllocator +{ +public: + using value_type = T; + + PinnedAllocator() noexcept = default; + + template + PinnedAllocator(const PinnedAllocator&) noexcept {} + + T* allocate(size_t n) + { + T* tmp; + auto error = cudaMallocHost((void**)&tmp, n * sizeof(T)); + if (error != cudaSuccess) + throw std::runtime_error(cudaGetErrorString(error)); + + return tmp; + } + + void deallocate(T* p, size_t n) + { + if (p) + { + auto error = cudaFreeHost(p); + if (error != cudaSuccess) + throw std::runtime_error(cudaGetErrorString(error)); + } + } +}; + +// Stateless allocator type, equality operators always return true... +template +bool operator==(PinnedAllocator const&, PinnedAllocator const&) { return true; } +template +bool operator!=(PinnedAllocator const&, PinnedAllocator const&) { return false; } + +template +using TPinnedVector = std::vector>; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/picosha2.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/picosha2.h new file mode 100644 index 0000000000000000000000000000000000000000..cf0aab964021ac54f9185bf8148b28418ed4680d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/TRTInference/picosha2.h @@ -0,0 +1,377 @@ +/* +The MIT License (MIT) + +Copyright (C) 2017 okdshin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +#ifndef PICOSHA2_H +#define PICOSHA2_H +// picosha2:20140213 + +#ifndef PICOSHA2_BUFFER_SIZE_FOR_INPUT_ITERATOR +#define PICOSHA2_BUFFER_SIZE_FOR_INPUT_ITERATOR \ + 1048576 //=1024*1024: default is 1MB memory +#endif + +#include +#include +#include +#include +#include +#include +namespace picosha2 { +typedef unsigned long word_t; +typedef unsigned char byte_t; + +static const size_t k_digest_size = 32; + +namespace detail { +inline byte_t mask_8bit(byte_t x) { return x & 0xff; } + +inline word_t mask_32bit(word_t x) { return x & 0xffffffff; } + +const word_t add_constant[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, + 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, + 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, + 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, + 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, + 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; + +const word_t initial_message_digest[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, + 0xa54ff53a, 0x510e527f, 0x9b05688c, + 0x1f83d9ab, 0x5be0cd19}; + +inline word_t ch(word_t x, word_t y, word_t z) { return (x & y) ^ ((~x) & z); } + +inline word_t maj(word_t x, word_t y, word_t z) { + return (x & y) ^ (x & z) ^ (y & z); +} + +inline word_t rotr(word_t x, std::size_t n) { + assert(n < 32); + return mask_32bit((x >> n) | (x << (32 - n))); +} + +inline word_t bsig0(word_t x) { return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); } + +inline word_t bsig1(word_t x) { return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); } + +inline word_t shr(word_t x, std::size_t n) { + assert(n < 32); + return x >> n; +} + +inline word_t ssig0(word_t x) { return rotr(x, 7) ^ rotr(x, 18) ^ shr(x, 3); } + +inline word_t ssig1(word_t x) { return rotr(x, 17) ^ rotr(x, 19) ^ shr(x, 10); } + +template +void hash256_block(RaIter1 message_digest, RaIter2 first, RaIter2 last) { + assert(first + 64 == last); + static_cast(last); // for avoiding unused-variable warning + word_t w[64]; + std::fill(w, w + 64, word_t(0)); + for (std::size_t i = 0; i < 16; ++i) { + w[i] = (static_cast(mask_8bit(*(first + i * 4))) << 24) | + (static_cast(mask_8bit(*(first + i * 4 + 1))) << 16) | + (static_cast(mask_8bit(*(first + i * 4 + 2))) << 8) | + (static_cast(mask_8bit(*(first + i * 4 + 3)))); + } + for (std::size_t i = 16; i < 64; ++i) { + w[i] = mask_32bit(ssig1(w[i - 2]) + w[i - 7] + ssig0(w[i - 15]) + + w[i - 16]); + } + + word_t a = *message_digest; + word_t b = *(message_digest + 1); + word_t c = *(message_digest + 2); + word_t d = *(message_digest + 3); + word_t e = *(message_digest + 4); + word_t f = *(message_digest + 5); + word_t g = *(message_digest + 6); + word_t h = *(message_digest + 7); + + for (std::size_t i = 0; i < 64; ++i) { + word_t temp1 = h + bsig1(e) + ch(e, f, g) + add_constant[i] + w[i]; + word_t temp2 = bsig0(a) + maj(a, b, c); + h = g; + g = f; + f = e; + e = mask_32bit(d + temp1); + d = c; + c = b; + b = a; + a = mask_32bit(temp1 + temp2); + } + *message_digest += a; + *(message_digest + 1) += b; + *(message_digest + 2) += c; + *(message_digest + 3) += d; + *(message_digest + 4) += e; + *(message_digest + 5) += f; + *(message_digest + 6) += g; + *(message_digest + 7) += h; + for (std::size_t i = 0; i < 8; ++i) { + *(message_digest + i) = mask_32bit(*(message_digest + i)); + } +} + +} // namespace detail + +template +void output_hex(InIter first, InIter last, std::ostream& os) { + os.setf(std::ios::hex, std::ios::basefield); + while (first != last) { + os.width(2); + os.fill('0'); + os << static_cast(*first); + ++first; + } + os.setf(std::ios::dec, std::ios::basefield); +} + +template +void bytes_to_hex_string(InIter first, InIter last, std::string& hex_str) { + std::ostringstream oss; + output_hex(first, last, oss); + hex_str.assign(oss.str()); +} + +template +void bytes_to_hex_string(const InContainer& bytes, std::string& hex_str) { + bytes_to_hex_string(bytes.begin(), bytes.end(), hex_str); +} + +template +std::string bytes_to_hex_string(InIter first, InIter last) { + std::string hex_str; + bytes_to_hex_string(first, last, hex_str); + return hex_str; +} + +template +std::string bytes_to_hex_string(const InContainer& bytes) { + std::string hex_str; + bytes_to_hex_string(bytes, hex_str); + return hex_str; +} + +class hash256_one_by_one { + public: + hash256_one_by_one() { init(); } + + void init() { + buffer_.clear(); + std::fill(data_length_digits_, data_length_digits_ + 4, word_t(0)); + std::copy(detail::initial_message_digest, + detail::initial_message_digest + 8, h_); + } + + template + void process(RaIter first, RaIter last) { + add_to_data_length(static_cast(std::distance(first, last))); + std::copy(first, last, std::back_inserter(buffer_)); + std::size_t i = 0; + for (; i + 64 <= buffer_.size(); i += 64) { + detail::hash256_block(h_, buffer_.begin() + i, + buffer_.begin() + i + 64); + } + buffer_.erase(buffer_.begin(), buffer_.begin() + i); + } + + void finish() { + byte_t temp[64]; + std::fill(temp, temp + 64, byte_t(0)); + std::size_t remains = buffer_.size(); + std::copy(buffer_.begin(), buffer_.end(), temp); + temp[remains] = 0x80; + + if (remains > 55) { + std::fill(temp + remains + 1, temp + 64, byte_t(0)); + detail::hash256_block(h_, temp, temp + 64); + std::fill(temp, temp + 64 - 4, byte_t(0)); + } else { + std::fill(temp + remains + 1, temp + 64 - 4, byte_t(0)); + } + + write_data_bit_length(&(temp[56])); + detail::hash256_block(h_, temp, temp + 64); + } + + template + void get_hash_bytes(OutIter first, OutIter last) const { + for (const word_t* iter = h_; iter != h_ + 8; ++iter) { + for (std::size_t i = 0; i < 4 && first != last; ++i) { + *(first++) = detail::mask_8bit( + static_cast((*iter >> (24 - 8 * i)))); + } + } + } + + private: + void add_to_data_length(word_t n) { + word_t carry = 0; + data_length_digits_[0] += n; + for (std::size_t i = 0; i < 4; ++i) { + data_length_digits_[i] += carry; + if (data_length_digits_[i] >= 65536u) { + carry = data_length_digits_[i] >> 16; + data_length_digits_[i] &= 65535u; + } else { + break; + } + } + } + void write_data_bit_length(byte_t* begin) { + word_t data_bit_length_digits[4]; + std::copy(data_length_digits_, data_length_digits_ + 4, + data_bit_length_digits); + + // convert byte length to bit length (multiply 8 or shift 3 times left) + word_t carry = 0; + for (std::size_t i = 0; i < 4; ++i) { + word_t before_val = data_bit_length_digits[i]; + data_bit_length_digits[i] <<= 3; + data_bit_length_digits[i] |= carry; + data_bit_length_digits[i] &= 65535u; + carry = (before_val >> (16 - 3)) & 65535u; + } + + // write data_bit_length + for (int i = 3; i >= 0; --i) { + (*begin++) = static_cast(data_bit_length_digits[i] >> 8); + (*begin++) = static_cast(data_bit_length_digits[i]); + } + } + std::vector buffer_; + word_t data_length_digits_[4]; // as 64bit integer (16bit x 4 integer) + word_t h_[8]; +}; + +inline void get_hash_hex_string(const hash256_one_by_one& hasher, + std::string& hex_str) { + byte_t hash[k_digest_size]; + hasher.get_hash_bytes(hash, hash + k_digest_size); + return bytes_to_hex_string(hash, hash + k_digest_size, hex_str); +} + +inline std::string get_hash_hex_string(const hash256_one_by_one& hasher) { + std::string hex_str; + get_hash_hex_string(hasher, hex_str); + return hex_str; +} + +namespace impl { +template +void hash256_impl(RaIter first, RaIter last, OutIter first2, OutIter last2, int, + std::random_access_iterator_tag) { + hash256_one_by_one hasher; + // hasher.init(); + hasher.process(first, last); + hasher.finish(); + hasher.get_hash_bytes(first2, last2); +} + +template +void hash256_impl(InputIter first, InputIter last, OutIter first2, + OutIter last2, int buffer_size, std::input_iterator_tag) { + std::vector buffer(buffer_size); + hash256_one_by_one hasher; + // hasher.init(); + while (first != last) { + int size = buffer_size; + for (int i = 0; i != buffer_size; ++i, ++first) { + if (first == last) { + size = i; + break; + } + buffer[i] = *first; + } + hasher.process(buffer.begin(), buffer.begin() + size); + } + hasher.finish(); + hasher.get_hash_bytes(first2, last2); +} +} + +template +void hash256(InIter first, InIter last, OutIter first2, OutIter last2, + int buffer_size = PICOSHA2_BUFFER_SIZE_FOR_INPUT_ITERATOR) { + picosha2::impl::hash256_impl( + first, last, first2, last2, buffer_size, + typename std::iterator_traits::iterator_category()); +} + +template +void hash256(InIter first, InIter last, OutContainer& dst) { + hash256(first, last, dst.begin(), dst.end()); +} + +template +void hash256(const InContainer& src, OutIter first, OutIter last) { + hash256(src.begin(), src.end(), first, last); +} + +template +void hash256(const InContainer& src, OutContainer& dst) { + hash256(src.begin(), src.end(), dst.begin(), dst.end()); +} + +template +void hash256_hex_string(InIter first, InIter last, std::string& hex_str) { + byte_t hashed[k_digest_size]; + hash256(first, last, hashed, hashed + k_digest_size); + std::ostringstream oss; + output_hex(hashed, hashed + k_digest_size, oss); + hex_str.assign(oss.str()); +} + +template +std::string hash256_hex_string(InIter first, InIter last) { + std::string hex_str; + hash256_hex_string(first, last, hex_str); + return hex_str; +} + +inline void hash256_hex_string(const std::string& src, std::string& hex_str) { + hash256_hex_string(src.begin(), src.end(), hex_str); +} + +template +void hash256_hex_string(const InContainer& src, std::string& hex_str) { + hash256_hex_string(src.begin(), src.end(), hex_str); +} + +template +std::string hash256_hex_string(const InContainer& src) { + return hash256_hex_string(src.begin(), src.end()); +} +templatevoid hash256(std::ifstream& f, OutIter first, OutIter last){ + hash256(std::istreambuf_iterator(f), std::istreambuf_iterator(), first,last); + +} +}// namespace picosha2 +#endif // PICOSHA2_H diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..319af10d35b134a75bfc72f4a16cef161e75d61d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(audio_thread audio_thread.cpp) +target_include_directories(audio_thread PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(audio_thread PRIVATE unitree_sdk2) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.cpp new file mode 100644 index 0000000000000000000000000000000000000000..846206c544ff911273f58125720d6bdc0b77aa6b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.cpp @@ -0,0 +1,64 @@ +#include "audio_thread.hpp" +#include + +static const std::string PLANNER_MODE = "Planner mode"; +static const std::string POSE_MODE = "Pose mode"; +static const std::string WARNING_STREAMING_DATA_ABSENT = "Streaming data absent"; +static const std::string WARNING_MOTOR_ERROR = "Motor error detected"; +static const std::string WARNING_LOW_STATE_LATE = "ROBOT DATA LATE"; + +AudioThread::AudioThread(): + client_() { + client_.Init(); + client_.SetTimeout(10.0f); + client_.SetVolume(100); + thread_ = std::jthread([this](std::stop_token st) { loop(st); }); +} + +void AudioThread::SetCommand(const AudioCommand& command) { + std::lock_guard lock(command_mutex_); + std::string prev_tts = std::move(command_.tts_message); + command_ = command; + + if (command_.tts_message.empty()) { + // No new tts, keep pending + command_.tts_message = std::move(prev_tts); + } else if (!prev_tts.empty()) { + // Both have tts, concatenate + command_.tts_message = prev_tts + ". " + command_.tts_message; + } +} + +void AudioThread::loop(std::stop_token st) { + while (!st.stop_requested()) { + AudioCommand command; + { + std::lock_guard lock(command_mutex_); + command = command_; + // Clear one-shot TTS so it's only spoken once + command_.tts_message.clear(); + } + if (command.streaming_data_absent && !command_last_.streaming_data_absent) { + client_.TtsMaker(WARNING_STREAMING_DATA_ABSENT, 1); + } + if (command.motor_error && !command_last_.motor_error) { + client_.TtsMaker(WARNING_MOTOR_ERROR, 1); + } + if (!command.tts_message.empty()) { + client_.TtsMaker(command.tts_message, 1); + } + if (command.high_temperature && !command.high_temperature_message.empty()) { + auto now = std::chrono::steady_clock::now(); + if (now - last_high_temp_tts_ >= HIGH_TEMP_TTS_INTERVAL) { + client_.TtsMaker(command.high_temperature_message, 1); + last_high_temp_tts_ = now; + } + } + if (command.low_state_late && !command_last_.low_state_late) { + client_.TtsMaker(WARNING_LOW_STATE_LATE, 1); + } + + command_last_ = command; + std::this_thread::sleep_for(std::chrono::seconds(1)); + } +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d79d38c5122359d50fa9ccc8ad7b5ef7fecdaeaf --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/audio_thread/audio_thread.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include +#include +#include +#include +#include + +struct AudioCommand { + bool streaming_data_absent = false; + bool motor_error = false; + bool low_state_late = false; + std::string tts_message; // One-shot TTS message (spoken once when non-empty) + bool high_temperature = false; // Continuous warning while true + std::string high_temperature_message; // Spoken every poll while high_temperature is true +}; + +class AudioThread { + public: + AudioThread(); + + void SetCommand(const AudioCommand& command); + + private: + void loop(std::stop_token st); + + unitree::robot::g1::AudioClient client_; + std::jthread thread_; + + std::mutex command_mutex_; + AudioCommand command_; + AudioCommand command_last_; + + // Cooldown for high temperature warning (avoid repeating every 1s loop) + std::chrono::steady_clock::time_point last_high_temp_tts_{}; + static constexpr std::chrono::seconds HIGH_TEMP_TTS_INTERVAL{5}; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..61f3b7b66bd589aa6ad08ce113262c2a18bde819 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(freq_test) +add_subdirectory(g1_deploy_onnx_ref) + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6874ac14ac9d30742b15dd18d7fce08fd5493042 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/CMakeLists.txt @@ -0,0 +1,15 @@ +set(EXECUTABLE_NAME freq_test) + +file(GLOB_RECURSE PROJECT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) +file(GLOB_RECURSE PROJECT_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include/) + +add_executable(${EXECUTABLE_NAME} ${PROJECT_SRCS}) +target_include_directories(${EXECUTABLE_NAME} PUBLIC ${PROJECT_INCLUDES}) +target_link_libraries(${EXECUTABLE_NAME} PRIVATE ${PROJECT_NAME} unitree_sdk2 + onnxruntime::onnxruntime) + +# Setting our output directory +set_target_properties( + ${EXECUTABLE_NAME} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + OUTPUT_NAME ${EXECUTABLE_NAME}) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/src/freq_test.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/src/freq_test.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e87e73310c787b06e23ccd09ff57d42cb255b4a1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/freq_test/src/freq_test.cpp @@ -0,0 +1,283 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +// ONNX +#include + +const int G1_NUM_MOTOR = 29; + +class ONNXFreqTest { + public: + enum class DataGenerationMode { + ZEROS, // All zeros + RANDOM, // Small random values + ONES // All ones + }; + private: + Ort::Env env; + Ort::Session* policy_session; + Ort::AllocatorWithDefaultOptions allocator; + std::vector input_node_names_str; + std::vector output_node_names_str; + std::vector input_node_names; + std::vector output_node_names; + std::vector> input_shapes; + std::vector input_types; + std::vector> input_data_float; + std::vector> input_data_int64; + DataGenerationMode data_mode = DataGenerationMode::RANDOM; + std::string model_path; + public: + ONNXFreqTest(const std::string& model_file_path) + : env(ORT_LOGGING_LEVEL_WARNING, "FreqTest"), + model_path(model_file_path) { + // Initialize random seed for fake data generation + std::srand(static_cast(std::time(nullptr))); + + try { + std::cout << "Loading ONNX model: " << model_path << std::endl; + policy_session = new Ort::Session(env, model_path.c_str(), Ort::SessionOptions {nullptr}); + Ort::SessionOptions policy_session_options; + policy_session_options.SetIntraOpNumThreads(1); + policy_session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED); + + // Query input names from the ONNX model + size_t num_input_nodes = policy_session->GetInputCount(); + std::cout << "Model has " << num_input_nodes << " inputs:" << std::endl; + for (size_t i = 0; i < num_input_nodes; i++) { + auto input_name = policy_session->GetInputNameAllocated(i, allocator); + std::string name_str(input_name.get()); + + // Get shape information + auto input_type_info = policy_session->GetInputTypeInfo(i); + auto tensor_info = input_type_info.GetTensorTypeAndShapeInfo(); + auto shape = tensor_info.GetShape(); + auto element_type = tensor_info.GetElementType(); + + std::cout << " Input " << i << ": " << name_str << " - Shape: ["; + for (size_t j = 0; j < shape.size(); j++) { + if (shape[j] == -1) { + std::cout << "dynamic"; + } else { + std::cout << shape[j]; + } + if (j < shape.size() - 1) std::cout << ", "; + } + std::cout << "] - Type: " << element_type << std::endl; + + input_node_names_str.push_back(name_str); + input_shapes.push_back(shape); + input_types.push_back(element_type); + } + + // Query output names from the ONNX model + size_t num_output_nodes = policy_session->GetOutputCount(); + std::cout << "Model has " << num_output_nodes << " outputs:" << std::endl; + for (size_t i = 0; i < num_output_nodes; i++) { + auto output_name = policy_session->GetOutputNameAllocated(i, allocator); + std::string name_str(output_name.get()); + + // Get shape information + auto output_type_info = policy_session->GetOutputTypeInfo(i); + auto tensor_info = output_type_info.GetTensorTypeAndShapeInfo(); + auto shape = tensor_info.GetShape(); + + std::cout << " Output " << i << ": " << name_str << " - Shape: ["; + for (size_t j = 0; j < shape.size(); j++) { + if (shape[j] == -1) { + std::cout << "dynamic"; + } else { + std::cout << shape[j]; + } + if (j < shape.size() - 1) std::cout << ", "; + } + std::cout << "] - Type: " << tensor_info.GetElementType() << std::endl; + + output_node_names_str.push_back(name_str); + } + + // Initialize input data storage based on input shapes + InitializeInputData(); + + // Convert string vectors to const char* vectors for ONNX Runtime + for (const auto& name : input_node_names_str) { input_node_names.push_back(name.c_str()); } + for (const auto& name : output_node_names_str) { output_node_names.push_back(name.c_str()); } + + std::cout << "Successfully loaded policy model for frequency test" << std::endl; + } catch (const Ort::Exception& e) { std::cerr << "Error loading policy model: " << e.what() << std::endl; } + } + + ~ONNXFreqTest() { delete policy_session; } + + void InitializeInputData() { + input_data_float.clear(); + input_data_int64.clear(); + input_data_float.resize(input_shapes.size()); + input_data_int64.resize(input_shapes.size()); + + for (size_t i = 0; i < input_shapes.size(); i++) { + // Calculate total size for this input + int64_t total_size = 1; + for (int64_t dim : input_shapes[i]) { + if (dim > 0) { // Skip dynamic dimensions (-1) + total_size *= dim; + } + } + + // Initialize storage based on data type + if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT) { + input_data_float[i].resize(total_size, 0.0f); + } else if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64) { + input_data_int64[i].resize(total_size, 0); + } + + std::cout << "Initialized input " << i << " (" << input_node_names_str[i] << ") with " << total_size + << " elements" << std::endl; + } + } + + void CreateFakeInputData() { + for (size_t i = 0; i < input_types.size(); i++) { + if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT) { + for (size_t j = 0; j < input_data_float[i].size(); j++) { + switch (data_mode) { + case DataGenerationMode::ZEROS: input_data_float[i][j] = 0.0f; break; + case DataGenerationMode::RANDOM: + // Generate small random values between -0.1 and 0.1 + input_data_float[i][j] = (static_cast(rand()) / RAND_MAX - 0.5f) * 0.2f; + break; + case DataGenerationMode::ONES: input_data_float[i][j] = 1.0f; break; + } + } + } else if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64) { + for (size_t j = 0; j < input_data_int64[i].size(); j++) { + switch (data_mode) { + case DataGenerationMode::ZEROS: input_data_int64[i][j] = 0; break; + case DataGenerationMode::RANDOM: + // Generate small random integers (0 to 9 for general use) + input_data_int64[i][j] = rand() % 10; + break; + case DataGenerationMode::ONES: input_data_int64[i][j] = 1; break; + } + } + } + } + } + + void RunInference() { + // Update fake input data + CreateFakeInputData(); + + // Create input tensors dynamically based on model structure and data types + std::vector input_tensors; + + for (size_t i = 0; i < input_shapes.size(); i++) { + // Create tensor with appropriate data type + if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT) { + Ort::Value tensor = + Ort::Value::CreateTensor(allocator.GetInfo(), input_data_float[i].data(), input_data_float[i].size(), + input_shapes[i].data(), input_shapes[i].size()); + input_tensors.emplace_back(std::move(tensor)); + } else if (input_types[i] == ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64) { + Ort::Value tensor = + Ort::Value::CreateTensor(allocator.GetInfo(), input_data_int64[i].data(), input_data_int64[i].size(), + input_shapes[i].data(), input_shapes[i].size()); + input_tensors.emplace_back(std::move(tensor)); + } + } + + // Run inference + auto output_tensors = + policy_session->Run(Ort::RunOptions {nullptr}, input_node_names.data(), input_tensors.data(), + input_tensors.size(), output_node_names.data(), output_node_names.size()); + + // For frequency testing, we don't need to process outputs + // Just complete the inference to measure performance + } + + void RunFrequencyTest(int num_iterations = 1000) { + std::cout << "\nRunning ONNX policy inference frequency test..." << std::endl; + std::cout << "Number of iterations: " << num_iterations << std::endl; + + std::string mode_name = (data_mode == DataGenerationMode::ZEROS) ? "ZEROS" + : (data_mode == DataGenerationMode::RANDOM) ? "RANDOM" + : "ONES"; + std::cout << "Using input data mode: " << mode_name << std::endl; + + // Warmup run + RunInference(); + + auto start = std::chrono::steady_clock::now(); + + for (int i = 0; i < num_iterations; ++i) { RunInference(); } + + auto end = std::chrono::steady_clock::now(); + + auto duration = std::chrono::duration_cast(end - start); + double avg_time_us = static_cast(duration.count()) / num_iterations; + double frequency_hz = 1000000.0 / avg_time_us; + + std::cout << "\n=== Results ===" << std::endl; + std::cout << "Total time: " << duration.count() << " μs" << std::endl; + std::cout << "Average time per inference: " << avg_time_us << " μs" << std::endl; + std::cout << "Maximum frequency: " << frequency_hz << " Hz" << std::endl; + } + + void SetDataGenerationMode(DataGenerationMode mode) { + data_mode = mode; + std::string mode_name = (mode == DataGenerationMode::ZEROS) ? "ZEROS" + : (mode == DataGenerationMode::RANDOM) ? "RANDOM" + : "ONES"; + std::cout << "Set input data generation mode to: " << mode_name << std::endl; + } +}; + +int main(int argc, char* argv[]) { + if (argc < 2) { + std::cout << "ONNX Policy Frequency Test" << std::endl; + std::cout << "===========================" << std::endl; + std::cout << "Usage: " << argv[0] << " [iterations] [data_mode]" << std::endl; + std::cout << " model_file: path to ONNX model file (required)" << std::endl; + std::cout << " iterations: number of inference iterations (default: 1000)" << std::endl; + std::cout << " data_mode: zeros|random|ones (default: random)" << std::endl; + std::cout << "\nExample: " << argv[0] << " policy.onnx 5000 random" << std::endl; + return 1; + } + + std::string model_file = argv[1]; + int num_iterations = 1000; + ONNXFreqTest::DataGenerationMode mode = ONNXFreqTest::DataGenerationMode::RANDOM; + + if (argc > 2) { num_iterations = std::atoi(argv[2]); } + + if (argc > 3) { + std::string mode_str = argv[3]; + if (mode_str == "zeros") { + mode = ONNXFreqTest::DataGenerationMode::ZEROS; + } else if (mode_str == "ones") { + mode = ONNXFreqTest::DataGenerationMode::ONES; + } else if (mode_str == "random") { + mode = ONNXFreqTest::DataGenerationMode::RANDOM; + } + } + + std::cout << "ONNX Policy Frequency Test" << std::endl; + std::cout << "===========================" << std::endl; + + try { + ONNXFreqTest freq_test(model_file); + freq_test.SetDataGenerationMode(mode); + freq_test.RunFrequencyTest(num_iterations); + } catch (const std::exception& e) { + std::cerr << "Error: " << e.what() << std::endl; + return -1; + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..b71392209209bccb4b08082c6e4efd6d5545ad56 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/CMakeLists.txt @@ -0,0 +1,261 @@ +set(EXECUTABLE_NAME g1_deploy_onnx_ref) + +# ROS2 discovery can be controlled via env var HAS_ROS2: +# - 1: try ROS2 (find_package QUIET) +# - 0 or unset: disable ROS2 entirely (skip find_package) +set(ROS2_ENV_REQUEST "off") +if(DEFINED ENV{HAS_ROS2}) + if("$ENV{HAS_ROS2}" STREQUAL "1") + set(ROS2_ENV_REQUEST "on") + elseif("$ENV{HAS_ROS2}" STREQUAL "0") + set(ROS2_ENV_REQUEST "off") + else() + message(WARNING "HAS_ROS2 should be 0 or 1; got '$ENV{HAS_ROS2}'. Falling back to auto-detect.") + endif() +endif() + +if(ROS2_ENV_REQUEST STREQUAL "off") + set(rclcpp_FOUND FALSE) + set(std_msgs_FOUND FALSE) + message(STATUS "ROS2 disabled (HAS_ROS2 unset or 0)") +else() + # Try to locate ROS2 only when explicitly enabled + find_package(rclcpp QUIET) + find_package(std_msgs QUIET) +endif() + +# Find msgpack for message serialization (used by ROS2 and ZMQ handlers) +# msgpack is header-only and doesn't provide pkg-config, so we check for the header directly +find_path(MSGPACK_INCLUDE_DIR msgpack.hpp + PATHS /usr/include /usr/local/include + DOC "msgpack C++ header location" +) + +if(MSGPACK_INCLUDE_DIR) + message(STATUS "✅ msgpack found at: ${MSGPACK_INCLUDE_DIR}") + set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR}) +else() + message(FATAL_ERROR "msgpack not found. Install libmsgpack-dev (Ubuntu/Debian) or msgpack-cxx (Arch) or msgpack-devel (RHEL/CentOS)") +endif() + +file(GLOB_RECURSE PROJECT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) +list(REMOVE_ITEM PROJECT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/g1_deploy_onnx_ref.cpp) + + +# Optional AddressSanitizer support +option(ENABLE_ASAN "Enable AddressSanitizer" OFF) +if(ENABLE_ASAN) + message(STATUS "🔬 Building ${EXECUTABLE_NAME} with AddressSanitizer") + target_compile_options(${EXECUTABLE_NAME} PRIVATE -fsanitize=address -fno-omit-frame-pointer) + target_link_options(${EXECUTABLE_NAME} PRIVATE -fsanitize=address) +endif() + +# Detect architecture and conditionally set CUDA library paths +if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64") + # Check for Thor (no DLA support) + set(IS_THOR FALSE) + if(DEFINED ENV{IS_THOR} AND "$ENV{IS_THOR}" STREQUAL "true") + set(IS_THOR TRUE) + elseif(EXISTS "/proc/device-tree/model") + file(READ "/proc/device-tree/model" DEVICE_MODEL) + string(FIND "${DEVICE_MODEL}" "Thor" THOR_POS) + if(NOT THOR_POS EQUAL -1) + set(IS_THOR TRUE) + endif() + endif() + + # ARM/Jetson platform - conditionally add DLA support + # Dynamically find CUDA installation for ARM + if(DEFINED ENV{CUDAToolkit_ROOT}) + set(CUDA_ARM_LIB_PATH "$ENV{CUDAToolkit_ROOT}/targets/aarch64-linux/lib") + elseif(EXISTS "/usr/local/cuda/targets/aarch64-linux/lib") + set(CUDA_ARM_LIB_PATH "/usr/local/cuda/targets/aarch64-linux/lib") + else() + # Find any available CUDA version for ARM + file(GLOB CUDA_ARM_DIRS "/usr/local/cuda-*/targets/aarch64-linux/lib") + if(CUDA_ARM_DIRS) + list(GET CUDA_ARM_DIRS 0 CUDA_ARM_LIB_PATH) + else() + message(WARNING "No CUDA ARM libraries found, using fallback path") + set(CUDA_ARM_LIB_PATH "/usr/local/cuda/lib64") + endif() + endif() + + set(CUDA_LINK_DIRS ${CUDA_ARM_LIB_PATH}) + + # DLA support: only for non-Thor Jetson devices + if(IS_THOR) + set(CUDLA_LIBRARY "") + message(STATUS "🚀 ARM64 (Thor) detected - building without DLA support") + message(STATUS " Using CUDA library path: ${CUDA_ARM_LIB_PATH}") + message(STATUS " Thor doesn't have DLA engines") + else() + # Match bare-metal Jetson builds: link cudla from the CUDA toolkit (targets/aarch64-linux/lib) + set(CUDLA_LIBRARY "cudla") + message(STATUS "✅ ARM64 detected - enabling DLA (cudla) support") + message(STATUS " Using CUDA library path: ${CUDA_ARM_LIB_PATH}") + message(STATUS " Using CUDLA library: -l${CUDLA_LIBRARY}") + endif() + +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") + # x86_64 platform - no DLA support needed + # Dynamically find CUDA installation for x86_64 + if(DEFINED ENV{CUDAToolkit_ROOT}) + set(CUDA_X64_LIB_PATH "$ENV{CUDAToolkit_ROOT}/lib64") + elseif(EXISTS "/usr/local/cuda/lib64") + set(CUDA_X64_LIB_PATH "/usr/local/cuda/lib64") + else() + # Find any available CUDA version for x86_64 + file(GLOB CUDA_X64_DIRS "/usr/local/cuda-*/lib64") + if(CUDA_X64_DIRS) + list(GET CUDA_X64_DIRS 0 CUDA_X64_LIB_PATH) + else() + message(WARNING "No CUDA x86_64 libraries found, using fallback path") + set(CUDA_X64_LIB_PATH "/usr/local/cuda/lib64") + endif() + endif() + + set(CUDA_LINK_DIRS ${CUDA_X64_LIB_PATH}) + set(CUDLA_LIBRARY "") + message(STATUS "✅ x86_64 detected - building without DLA support") + message(STATUS " Using CUDA library path: ${CUDA_X64_LIB_PATH}") +endif() + +# ZMQ support (required for main executable and tests) +find_package(PkgConfig QUIET) +if(PkgConfig) + pkg_check_modules(ZMQ QUIET libzmq) +endif() + +find_path(ZMQ_INCLUDE_DIR zmq.h + PATHS /usr/include /usr/local/include) +find_library(ZMQ_LIBRARY zmq + PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/aarch64-linux-gnu) + +if(NOT ZMQ_INCLUDE_DIR OR NOT ZMQ_LIBRARY) + message(FATAL_ERROR "❌ libzmq is required but not found. Please install libzmq-dev (apt) or zeromq (brew)") +endif() + +# Add ZMQ to main executable +message(STATUS "✅ ZMQ support enabled for main executable") + +# Build ZMQ tests +if(ZMQ_INCLUDE_DIR AND ZMQ_LIBRARY) + add_executable(zmq_pose_subscriber_test + ${CMAKE_CURRENT_SOURCE_DIR}/tests/zmq_pose_subscriber_test.cpp) + target_include_directories(zmq_pose_subscriber_test PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${ZMQ_INCLUDE_DIR}) + target_link_libraries(zmq_pose_subscriber_test PRIVATE ${ZMQ_LIBRARY}) + set_target_properties(zmq_pose_subscriber_test PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) + message(STATUS "✅ Added zmq_pose_subscriber_test (ZMQ found)") + + # Test for connecting to Python pose estimation server + add_executable(zmq_python_sender_test + ${CMAKE_CURRENT_SOURCE_DIR}/tests/zmq_python_sender_test.cpp) + target_include_directories(zmq_python_sender_test PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${ZMQ_INCLUDE_DIR}) + target_link_libraries(zmq_python_sender_test PRIVATE ${ZMQ_LIBRARY}) + set_target_properties(zmq_python_sender_test PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) + message(STATUS "✅ Added zmq_python_sender_test (ZMQ found)") +else() + message(WARNING "⚠️ libzmq not found - skipping zmq_pose_subscriber_test") +endif() + +find_package(Eigen3 REQUIRED) + +set(EXE_INCLUDES + ${CMAKE_CURRENT_SOURCE_DIR}/include/ + ${ZMQ_INCLUDE_DIR} + ${EIGEN3_INCLUDE_DIR} +) + + +# Build a static library, used by both the main executable and the tests: +add_library(g1_deploy_shared STATIC ${PROJECT_SRCS}) +target_include_directories(g1_deploy_shared PUBLIC ${EXE_INCLUDES}) + +# List of libs to link for both the main executable and the tests +set(EXE_LIBS + g1_deploy_shared + audio_thread + unitree_sdk2 ZLIB::ZLIB + onnxruntime::onnxruntime TRTInference + CUDA::cudart + ${TensorRT_nvinfer_LIBRARY} ${TensorRT_nvonnxparser_LIBRARY} + ${CUDLA_LIBRARY} + ${ZMQ_LIBRARY} +) + + +# build the main executable: +add_executable(${EXECUTABLE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src/g1_deploy_onnx_ref.cpp) +target_include_directories(${EXECUTABLE_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/ ${PROJECT_SOURCE_DIR}/src) + +target_link_directories(${EXECUTABLE_NAME} PRIVATE ${CUDA_LINK_DIRS}) +target_link_libraries( + ${EXECUTABLE_NAME} PRIVATE ${PROJECT_NAME} + ${EXE_LIBS} +) + +# Setting our output directory and C++ standard +set_target_properties( + ${EXECUTABLE_NAME} + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + OUTPUT_NAME ${EXECUTABLE_NAME} + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) + +# Optional ROS2 support for main executable and tests +if(rclcpp_FOUND AND std_msgs_FOUND) + # Load ROS2 configuration (handles both main executable and tests) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ROS2.cmake) + + # Add ROS2 support to main executable (requires msgpack) + target_include_directories(${EXECUTABLE_NAME} PRIVATE ${ROS2_INCLUDE_DIRS} ${MSGPACK_INCLUDE_DIRS}) + target_link_libraries(${EXECUTABLE_NAME} PRIVATE ${ROS2_LIBS} pthread) + target_compile_definitions(${EXECUTABLE_NAME} PRIVATE HAS_ROS2=1) + + message(STATUS "✅ ROS2InputHandler support enabled with msgpack") +else() + target_compile_definitions(${EXECUTABLE_NAME} PRIVATE HAS_ROS2=0) + message(STATUS "ROS2 not found - building without ROS2InputHandler support") +endif() + +# test executable: +include(FetchContent) + +# Download and make GoogleTest available +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip +) +FetchContent_MakeAvailable(googletest) + +find_package(GTest REQUIRED) + +file(GLOB_RECURSE TEST_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests/*.cpp) + +add_executable(run_tests ${TEST_SRCS}) +target_link_directories(run_tests PRIVATE ${CUDA_LINK_DIRS}) +target_link_libraries(run_tests GTest::GTest GTest::Main ${EXE_LIBS}) +target_include_directories(run_tests PUBLIC ${EXE_INCLUDES}) + +# Setting our output directory and C++ standard +set_target_properties( + run_tests + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + OUTPUT_NAME run_tests + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/cmake/ROS2.cmake b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/cmake/ROS2.cmake new file mode 100644 index 0000000000000000000000000000000000000000..e5c4478fb355e576370ade67895a19f41a78e8c5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/cmake/ROS2.cmake @@ -0,0 +1,126 @@ +# ============================================================================= +# ROS2 Configuration +# ============================================================================= +# This file contains ROS2 library discovery and test configuration +# Used by both main executable and test executable + +if(NOT rclcpp_FOUND OR NOT std_msgs_FOUND) + message(WARNING "ROS2.cmake included but ROS2 not found") + return() +endif() + +message(STATUS "Configuring ROS2 support...") + +# ============================================================================= +# ROS2 Library Discovery +# ============================================================================= + +# Auto-discover ROS2 include directories dynamically +set(ROS2_INCLUDE_DIRS "") + +# Common ROS2 distributions in order of preference (newest first) +set(ROS2_DISTROS "jazzy" "iron" "humble" "galactic" "foxy" "eloquent" "dashing" "crystal") +set(ROS2_INSTALL_PATHS "/opt/ros" "/usr/local/ros") + +set(ROS2_DISTRO_FOUND "") +foreach(install_path ${ROS2_INSTALL_PATHS}) + if(ROS2_DISTRO_FOUND) + break() + endif() + + foreach(distro ${ROS2_DISTROS}) + set(ros2_include_path "${install_path}/${distro}/include") + if(EXISTS "${ros2_include_path}") + set(ROS2_INCLUDE_DIRS "${ros2_include_path}") + file(GLOB ROS2_INCLUDE_SUBDIRS "${ros2_include_path}/*") + foreach(subdir ${ROS2_INCLUDE_SUBDIRS}) + if(IS_DIRECTORY ${subdir}) + list(APPEND ROS2_INCLUDE_DIRS ${subdir}) + endif() + endforeach() + set(ROS2_DISTRO_FOUND "${distro}") + set(ROS2_INSTALL_BASE "${install_path}/${distro}") + message(STATUS "📦 Found ROS2 ${distro} at ${install_path}/${distro}") + break() + endif() + endforeach() +endforeach() + +if(NOT ROS2_DISTRO_FOUND) + message(WARNING "❌ No ROS2 installation found in common locations") + return() +endif() + +list(REMOVE_DUPLICATES ROS2_INCLUDE_DIRS) + +# Essential ROS2 libraries for basic pub/sub functionality +set(ESSENTIAL_LIB_PATTERNS + "librclcpp.so*" "librcl.so*" "librcl_yaml_param_parser.so*" + "librcpputils.so*" "librcutils.so*" "librmw.so*" + "librmw_implementation.so*" "librmw_fastrtps_cpp.so*" + "libstd_msgs__rosidl_typesupport_cpp.so*" "libstd_msgs__rosidl_generator_cpp.so*" + "librosidl_typesupport_cpp.so*" "librosidl_runtime_cpp.so*" "librosidl_runtime_c.so*" + "libbuiltin_interfaces__rosidl_typesupport_cpp.so*" "libbuiltin_interfaces__rosidl_generator_cpp.so*" + "libstatistics_msgs__rosidl_typesupport_cpp.so*" "libstatistics_msgs__rosidl_generator_cpp.so*" + "libtracetools.so*" "liblibstatistics_collector.so*" + "libfastrtps.so*" "libfastcdr.so*" "libtinyxml2.so*" "libspdlog.so*" "libfmt.so*" +) + +# Use CMAKE_SYSTEM_PROCESSOR for consistency with other CMakeLists +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(SYSTEM_LIB_DIR "/usr/lib/x86_64-linux-gnu") +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(SYSTEM_LIB_DIR "/usr/lib/aarch64-linux-gnu") +else() + set(SYSTEM_LIB_DIR "/usr/lib") +endif() + +# Auto-discover ROS2 libraries using dynamic distro path +set(ROS2_LIBS "") +foreach(pattern ${ESSENTIAL_LIB_PATTERNS}) + # Use dynamically detected ROS2 installation + file(GLOB ros2_libs "${ROS2_INSTALL_BASE}/lib/${pattern}") + list(APPEND ROS2_LIBS ${ros2_libs}) + # Also check system library paths + file(GLOB system_libs "/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/${pattern}") + list(APPEND ROS2_LIBS ${system_libs}) + file(GLOB usr_system_libs "${SYSTEM_LIB_DIR}/${pattern}") + list(APPEND ROS2_LIBS ${usr_system_libs}) +endforeach() + +list(REMOVE_DUPLICATES ROS2_LIBS) +list(LENGTH ROS2_LIBS ROS2_LIB_COUNT) + +message(STATUS "✅ ROS2 configuration: ${ROS2_LIB_COUNT} libraries discovered") + +# ============================================================================= +# ROS2 Test Executable +# ============================================================================= + +set(TEST_EXECUTABLE_NAME test_ros2) +add_executable(${TEST_EXECUTABLE_NAME} tests/test_ros2.cpp) + +target_include_directories(${TEST_EXECUTABLE_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/) +target_include_directories(${TEST_EXECUTABLE_NAME} PRIVATE ${ROS2_INCLUDE_DIRS}) +target_link_libraries(${TEST_EXECUTABLE_NAME} PRIVATE ${ROS2_LIBS} pthread) +target_compile_definitions(${TEST_EXECUTABLE_NAME} PRIVATE HAS_ROS2=1) + +set_target_properties(${TEST_EXECUTABLE_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/" + OUTPUT_NAME ${TEST_EXECUTABLE_NAME} +) + +message(STATUS "✅ ROS2 test executable configured") + +# ============================================================================= +# Test Configuration Files +# ============================================================================= + +file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/target/release/config") +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/config/fastrtps_profile.xml" + "${PROJECT_SOURCE_DIR}/target/release/config/fastrtps_profile.xml" + COPYONLY +) + +message(STATUS "✅ FastRTPS profile copied for test deployment") diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/config/fastrtps_profile.xml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/config/fastrtps_profile.xml new file mode 100644 index 0000000000000000000000000000000000000000..b1370d2592b9116048a52fd9111283fd5e948aa7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/config/fastrtps_profile.xml @@ -0,0 +1,10 @@ + + + + + + G1RobotParticipant + + + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/cnpy.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/cnpy.h new file mode 100644 index 0000000000000000000000000000000000000000..0d3bb4c3c2e9926b03d75db36f875acf1b5fc86b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/cnpy.h @@ -0,0 +1,269 @@ +//Copyright (C) 2011 Carl Rogers +//Released under MIT License +//license available in LICENSE file, or at http://www.opensource.org/licenses/mit-license.php + +#ifndef LIBCNPY_H_ +#define LIBCNPY_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace cnpy { + + struct NpyArray { + NpyArray(const std::vector& _shape, size_t _word_size, bool _fortran_order) : + shape(_shape), word_size(_word_size), fortran_order(_fortran_order) + { + num_vals = 1; + for(size_t i = 0;i < shape.size();i++) num_vals *= shape[i]; + data_holder = std::shared_ptr>( + new std::vector(num_vals * word_size)); + } + + NpyArray() : shape(0), word_size(0), fortran_order(0), num_vals(0) { } + + template + T* data() { + return reinterpret_cast(&(*data_holder)[0]); + } + + template + const T* data() const { + return reinterpret_cast(&(*data_holder)[0]); + } + + template + std::vector as_vec() const { + const T* p = data(); + return std::vector(p, p+num_vals); + } + + size_t num_bytes() const { + return data_holder->size(); + } + + std::shared_ptr> data_holder; + std::vector shape; + size_t word_size; + bool fortran_order; + size_t num_vals; + }; + + using npz_t = std::map; + + char BigEndianTest(); + char map_type(const std::type_info& t); + template std::vector create_npy_header(const std::vector& shape); + void parse_npy_header(FILE* fp,size_t& word_size, std::vector& shape, bool& fortran_order); + void parse_npy_header(unsigned char* buffer,size_t& word_size, std::vector& shape, bool& fortran_order); + void parse_zip_footer(FILE* fp, uint16_t& nrecs, size_t& global_header_size, size_t& global_header_offset); + npz_t npz_load(std::string fname); + NpyArray npz_load(std::string fname, std::string varname); + NpyArray npy_load(std::string fname); + + template std::vector& operator+=(std::vector& lhs, const T rhs) { + //write in little endian + for(size_t byte = 0; byte < sizeof(T); byte++) { + char val = *((char*)&rhs+byte); + lhs.push_back(val); + } + return lhs; + } + + template<> std::vector& operator+=(std::vector& lhs, const std::string rhs); + template<> std::vector& operator+=(std::vector& lhs, const char* rhs); + + + template void npy_save(std::string fname, const T* data, const std::vector shape, std::string mode = "w") { + FILE* fp = NULL; + std::vector true_data_shape; //if appending, the shape of existing + new data + + if(mode == "a") fp = fopen(fname.c_str(),"r+b"); + + if(fp) { + //file exists. we need to append to it. read the header, modify the array size + size_t word_size; + bool fortran_order; + parse_npy_header(fp,word_size,true_data_shape,fortran_order); + assert(!fortran_order); + + if(word_size != sizeof(T)) { + std::cout<<"libnpy error: "< header = create_npy_header(true_data_shape); + size_t nels = std::accumulate(shape.begin(),shape.end(),1,std::multiplies()); + + fseek(fp,0,SEEK_SET); + fwrite(&header[0],sizeof(char),header.size(),fp); + fseek(fp,0,SEEK_END); + fwrite(data,sizeof(T),nels,fp); + fclose(fp); + } + + template void npz_save(std::string zipname, std::string fname, const T* data, const std::vector& shape, std::string mode = "w") + { + //first, append a .npy to the fname + fname += ".npy"; + + //now, on with the show + FILE* fp = NULL; + uint16_t nrecs = 0; + size_t global_header_offset = 0; + std::vector global_header; + + if(mode == "a") fp = fopen(zipname.c_str(),"r+b"); + + if(fp) { + //zip file exists. we need to add a new npy file to it. + //first read the footer. this gives us the offset and size of the global header + //then read and store the global header. + //below, we will write the the new data at the start of the global header then append the global header and footer below it + size_t global_header_size; + parse_zip_footer(fp,nrecs,global_header_size,global_header_offset); + fseek(fp,global_header_offset,SEEK_SET); + global_header.resize(global_header_size); + size_t res = fread(&global_header[0],sizeof(char),global_header_size,fp); + if(res != global_header_size){ + throw std::runtime_error("npz_save: header read error while adding to existing zip"); + } + fseek(fp,global_header_offset,SEEK_SET); + } + else { + fp = fopen(zipname.c_str(),"wb"); + } + + std::vector npy_header = create_npy_header(shape); + + size_t nels = std::accumulate(shape.begin(),shape.end(),1,std::multiplies()); + size_t nbytes = nels*sizeof(T) + npy_header.size(); + + //get the CRC of the data to be added + uint32_t crc = crc32(0L,(uint8_t*)&npy_header[0],npy_header.size()); + crc = crc32(crc,(uint8_t*)data,nels*sizeof(T)); + + //build the local header + std::vector local_header; + local_header += "PK"; //first part of sig + local_header += (uint16_t) 0x0403; //second part of sig + local_header += (uint16_t) 20; //min version to extract + local_header += (uint16_t) 0; //general purpose bit flag + local_header += (uint16_t) 0; //compression method + local_header += (uint16_t) 0; //file last mod time + local_header += (uint16_t) 0; //file last mod date + local_header += (uint32_t) crc; //crc + local_header += (uint32_t) nbytes; //compressed size + local_header += (uint32_t) nbytes; //uncompressed size + local_header += (uint16_t) fname.size(); //fname length + local_header += (uint16_t) 0; //extra field length + local_header += fname; + + //build global header + global_header += "PK"; //first part of sig + global_header += (uint16_t) 0x0201; //second part of sig + global_header += (uint16_t) 20; //version made by + global_header.insert(global_header.end(),local_header.begin()+4,local_header.begin()+30); + global_header += (uint16_t) 0; //file comment length + global_header += (uint16_t) 0; //disk number where file starts + global_header += (uint16_t) 0; //internal file attributes + global_header += (uint32_t) 0; //external file attributes + global_header += (uint32_t) global_header_offset; //relative offset of local file header, since it begins where the global header used to begin + global_header += fname; + + //build footer + std::vector footer; + footer += "PK"; //first part of sig + footer += (uint16_t) 0x0605; //second part of sig + footer += (uint16_t) 0; //number of this disk + footer += (uint16_t) 0; //disk where footer starts + footer += (uint16_t) (nrecs+1); //number of records on this disk + footer += (uint16_t) (nrecs+1); //total number of records + footer += (uint32_t) global_header.size(); //nbytes of global headers + footer += (uint32_t) (global_header_offset + nbytes + local_header.size()); //offset of start of global headers, since global header now starts after newly written array + footer += (uint16_t) 0; //zip file comment length + + //write everything + fwrite(&local_header[0],sizeof(char),local_header.size(),fp); + fwrite(&npy_header[0],sizeof(char),npy_header.size(),fp); + fwrite(data,sizeof(T),nels,fp); + fwrite(&global_header[0],sizeof(char),global_header.size(),fp); + fwrite(&footer[0],sizeof(char),footer.size(),fp); + fclose(fp); + } + + template void npy_save(std::string fname, const std::vector data, std::string mode = "w") { + std::vector shape; + shape.push_back(data.size()); + npy_save(fname, &data[0], shape, mode); + } + + template void npz_save(std::string zipname, std::string fname, const std::vector data, std::string mode = "w") { + std::vector shape; + shape.push_back(data.size()); + npz_save(zipname, fname, &data[0], shape, mode); + } + + template std::vector create_npy_header(const std::vector& shape) { + + std::vector dict; + dict += "{'descr': '"; + dict += BigEndianTest(); + dict += map_type(typeid(T)); + dict += std::to_string(sizeof(T)); + dict += "', 'fortran_order': False, 'shape': ("; + dict += std::to_string(shape[0]); + for(size_t i = 1;i < shape.size();i++) { + dict += ", "; + dict += std::to_string(shape[i]); + } + if(shape.size() == 1) dict += ","; + dict += "), }"; + //pad with spaces so that preamble+dict is modulo 16 bytes. preamble is 10 bytes. dict needs to end with \n + int remainder = 16 - (10 + dict.size()) % 16; + dict.insert(dict.end(),remainder,' '); + dict.back() = '\n'; + + std::vector header; + header += (char) 0x93; + header += "NUMPY"; + header += (char) 0x01; //major version of numpy format + header += (char) 0x00; //minor version of numpy format + header += (uint16_t) dict.size(); + header.insert(header.end(),dict.begin(),dict.end()); + + return header; + } + + +} + +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/control_policy.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/control_policy.hpp new file mode 100644 index 0000000000000000000000000000000000000000..040dcf5fc552c7e5978ffd7b592f65afe2b2311b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/control_policy.hpp @@ -0,0 +1,443 @@ +/** + * @file control_policy.hpp + * @brief TensorRT-accelerated control-policy engine (observations → actions). + * + * PolicyEngine loads an ONNX policy model, converts it to TensorRT at first + * run (cached on disk), and provides GPU-accelerated inference with optional + * CUDA graph capture for deterministic, sub-millisecond latency. + * + * ## I/O Contract + * + * - **Input**: single tensor `obs_dict` (float32, dimension = policy obs size). + * - **Output**: single tensor `action` (float32, dimension = G1_NUM_MOTOR = 29). + * + * ## Typical Usage + * + * 1. `Initialize(model_path)` – convert + load the TRT engine. + * 2. Fill `GetInputBuffer()` with observation data. + * 3. `Infer()` – runs GPU inference and populates `GetActionBuffer()`. + * 4. (Optional) `CaptureGraph()` after the first successful `Infer()` to + * lock the CUDA graph for all subsequent calls. + */ + +#ifndef POLICY_ENGINE_HPP +#define POLICY_ENGINE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "robot_parameters.hpp" + +/** + * @class PolicyEngine + * @brief Runs the main RL control policy on GPU via TensorRT. + * + * Owns CUDA resources (stream, graph, graph-exec) and pinned-memory I/O + * buffers. Non-copyable; destroyed via `Destroy()` or the destructor. + */ +class PolicyEngine { +public: + PolicyEngine() = default; + ~PolicyEngine() { Destroy(); } + + /** + * @brief Initialize the control policy from a model path + * @param model_path Path to ONNX model file (will be converted to TensorRT) + * @param use_fp16 Whether to use FP16 precision + * @return true if initialization successful, false otherwise + */ + bool Initialize(const std::string& model_path, bool use_fp16 = false) { + if (model_path.empty()) { + std::cerr << "✗ PolicyEngine::Initialize - Empty model path" << std::endl; + return false; + } + + config_.model_path = model_path; + config_.use_fp16 = use_fp16; + + try { + std::cout << "Loading policy model..." << std::endl; + + inference_engine_ = std::make_unique(); + + // Setup options for ONNX to TensorRT conversion + Options options; + options.deviceID = config_.device_id; + std::string prefix("policy_"); + if (use_fp16) { + options.precision = Precision::FP16; + prefix += "fp16_"; + } + + std::string cached_trt_file; + if (!ConvertONNXToTRT(options, model_path, cached_trt_file, prefix, false)) { + std::cerr << "✗ Failed to convert policy ONNX to TRT: " << model_path << std::endl; + inference_engine_.reset(); + return false; + } + + if (!inference_engine_->Initialize(cached_trt_file, options.deviceID, options.dynamic_axes_names)) { + std::cerr << "✗ Failed to initialize policy TensorRT model: " << cached_trt_file << std::endl; + inference_engine_.reset(); + return false; + } + + if (!inference_engine_->InitInputs({})) { + std::cerr << "✗ Failed to initialize policy TensorRT model inputs" << std::endl; + inference_engine_.reset(); + return false; + } + + std::cout << "✓ Successfully converted ONNX to TRT: " << cached_trt_file << std::endl; + + // Validate required inputs + auto input_names = inference_engine_->GetInputTensorNames(); + if (input_names.size() != 1) { + std::cerr << "✗ Policy must have exactly 1 input, found " << input_names.size() << ": "; + for (const auto& n : input_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + if (std::find(input_names.begin(), input_names.end(), std::string("obs_dict")) == input_names.end()) { + std::cerr << "✗ Policy input tensor 'obs_dict' not found. Available inputs: "; + for (const auto& n : input_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + input_tensor_name_ = "obs_dict"; + if (inference_engine_->GetTensorDataType(input_tensor_name_) != DataType::FLOAT) { + std::cerr << "✗ Policy input 'obs_dict' must be float32" << std::endl; + inference_engine_.reset(); + return false; + } + + // Initialize input buffer + std::vector input_dims; + inference_engine_->GetTensorShape(input_tensor_name_, input_dims); + + config_.input_dimension = std::accumulate( + input_dims.begin(), input_dims.end(), static_cast(1), std::multiplies() + ); + policy_input_buffer_.resize(config_.input_dimension, 0.0f); + + // Set initial input data (zeros) + inference_engine_->SetInputData(input_tensor_name_, policy_input_buffer_); + + // Validate required outputs + auto output_names = inference_engine_->GetOutputTensorNames(); + if (output_names.empty()) { + std::cerr << "✗ Policy model has no outputs" << std::endl; + inference_engine_.reset(); + return false; + } + if (output_names.size() != 1) { + std::cerr << "✗ Policy must have exactly 1 output, found " << output_names.size() << ": "; + for (const auto& n : output_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + if (std::find(output_names.begin(), output_names.end(), std::string("action")) == output_names.end()) { + std::cerr << "✗ Policy output tensor 'action' not found. Available outputs: "; + for (const auto& n : output_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + output_tensor_name_ = "action"; + + // Get output dimensions + std::vector output_dims; + if (inference_engine_->GetTensorShape(output_tensor_name_, output_dims)) { + config_.action_dimension = std::accumulate( + output_dims.begin(), output_dims.end(), 1, std::multiplies() + ); + } + + // Validate action dimension matches robot configuration + if (config_.action_dimension != G1_NUM_MOTOR) { + std::cerr << "✗ Policy action dimension (" << config_.action_dimension + << ") doesn't match G1 robot motors (" << G1_NUM_MOTOR << ")" << std::endl; + inference_engine_.reset(); + return false; + } + + action_buffer_.resize(config_.action_dimension, 0.0f); + + // Create CUDA stream + cudaError_t cuda_status = cudaStreamCreate(&cuda_stream_); + if (cuda_status != cudaSuccess) { + std::cerr << "✗ Failed to create CUDA stream: " << cudaGetErrorString(cuda_status) << std::endl; + inference_engine_.reset(); + return false; + } + + initialized_ = true; + std::cout << "✓ Policy engine initialized successfully!" << std::endl; + std::cout << " Model: " << model_path << std::endl; + std::cout << " Input dimension: " << config_.input_dimension << std::endl; + std::cout << " Action dimension: " << config_.action_dimension << std::endl; + std::cout << " Input tensor: " << input_tensor_name_ << std::endl; + std::cout << " Output tensor: " << output_tensor_name_ << std::endl; + std::cout << " Precision: " << (use_fp16 ? "FP16" : "FP32") << std::endl; + return true; + + } catch (const std::exception& e) { + std::cerr << "✗ PolicyEngine::Initialize - Exception: " << e.what() << std::endl; + inference_engine_.reset(); + return false; + } + } + + /** + * @brief Set input data for the control policy + * @param data Input data buffer + * @param element_count Number of elements + */ + template + void SetInputData(const T* data, size_t element_count) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputData(input_tensor_name_, data, element_count); + } + + /** + * @brief Set input data asynchronously + * @param data Input data buffer + * @param element_count Number of elements + * @param stream CUDA stream for async operation + */ + template + void SetInputDataAsync(const T* data, size_t element_count, cudaStream_t stream) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputDataAsync(input_tensor_name_, data, element_count, stream); + } + + /** + * @brief Set input data using TPinnedVector + * @param data Input data in TPinnedVector + */ + template + void SetInputData(const TPinnedVector& data) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputData(input_tensor_name_, data); + } + + /** + * @brief Run control policy inference and populate internal action buffer + * @param stream CUDA stream for inference (uses internal stream if nullptr) + * @return true if inference successful, false otherwise + */ + bool Infer(cudaStream_t stream = nullptr) { + if (!initialized_) { + std::cerr << "✗ PolicyEngine::Infer - Not initialized" << std::endl; + return false; + } + if (!inference_engine_) { + std::cerr << "✗ PolicyEngine::Infer - TensorRT engine not initialized" << std::endl; + return false; + } + + cudaStream_t infer_stream = (stream != nullptr) ? stream : cuda_stream_; + + // Transfer input data from CPU to GPU + inference_engine_->SetInputData(input_tensor_name_, policy_input_buffer_); + + if (graph_captured_ && cuda_graph_exec_ != nullptr) { + cudaError_t status = cudaGraphLaunch(cuda_graph_exec_, infer_stream); + if (status != cudaSuccess) { + std::cerr << "✗ PolicyEngine::Infer - Failed to launch CUDA graph: " << cudaGetErrorString(status) << std::endl; + return false; + } + } else { + if (!inference_engine_->Enqueue(infer_stream)) { + std::cerr << "✗ PolicyEngine::Infer - Failed to enqueue inference" << std::endl; + return false; + } + } + + // Automatically populate internal action buffer after inference (GPU to CPU) + inference_engine_->GetOutputDataAsync(output_tensor_name_, action_buffer_, infer_stream); + cudaStreamSynchronize(infer_stream); + + return true; + } + + /** + * @brief Capture CUDA graph for optimized execution + * @return true if capture successful, false otherwise + */ + bool CaptureGraph() { + if (!initialized_ || !inference_engine_) { + std::cerr << "✗ PolicyEngine::CaptureGraph - Cannot capture (engine not initialized)" << std::endl; + return false; + } + if (graph_captured_) { + std::cout << "Control policy CUDA graph already captured" << std::endl; + return true; + } + + std::cout << "Capturing control policy CUDA graph..." << std::endl; + cudaStreamBeginCapture(cuda_stream_, cudaStreamCaptureModeRelaxed); + if (!inference_engine_->Enqueue(cuda_stream_)) { + std::cerr << "✗ Failed to enqueue control policy inference for CUDA graph capture" << std::endl; + cudaStreamEndCapture(cuda_stream_, &cuda_graph_); + return false; + } + cudaStreamEndCapture(cuda_stream_, &cuda_graph_); + cudaStreamSynchronize(cuda_stream_); + + cudaGraphInstantiate(&cuda_graph_exec_, cuda_graph_, NULL, NULL, 0); + + graph_captured_ = true; + std::cout << "✓ Control policy CUDA graph captured successfully!" << std::endl; + return true; + } + + /** + * @brief Get CUDA stream used by control policy + * @return CUDA stream handle + */ + cudaStream_t GetCudaStream() const { return cuda_stream_; } + + /** + * @brief Get CUDA graph (if captured) + * @return CUDA graph handle + */ + cudaGraph_t GetCudaGraph() const { return cuda_graph_; } + + /** + * @brief Get CUDA graph execution instance + * @return CUDA graph execution handle + */ + cudaGraphExec_t GetCudaGraphExec() const { return cuda_graph_exec_; } + + /** + * @brief Get input dimension + * @return Input dimension size + */ + size_t GetInputDimension() const { return config_.input_dimension; } + + /** + * @brief Get action dimension + * @return Action dimension size + */ + size_t GetActionDimension() const { return config_.action_dimension; } + + /** + * @brief Check if control policy is initialized + * @return true if initialized, false otherwise + */ + bool IsInitialized() const { return initialized_; } + + /** + * @brief Get input tensor names + * @return Vector of input tensor names + */ + std::vector GetInputTensorNames() const { + if (!initialized_ || !inference_engine_) { return {}; } + return inference_engine_->GetInputTensorNames(); + } + + /** + * @brief Get output tensor names + * @return Vector of output tensor names + */ + std::vector GetOutputTensorNames() const { + if (!initialized_ || !inference_engine_) { return {}; } + return inference_engine_->GetOutputTensorNames(); + } + + /** + * @brief Get reference to internal input buffer + * @return Reference to input buffer + */ + TPinnedVector& GetInputBuffer() { return policy_input_buffer_; } + + /** + * @brief Get reference to internal action buffer + * @return Reference to action buffer + */ + TPinnedVector& GetActionBuffer() { return action_buffer_; } + + /** + * @brief Get input tensor name + * @return Input tensor name + */ + const std::string& GetInputTensorName() const { return input_tensor_name_; } + + /** + * @brief Get output tensor name + * @return Output tensor name + */ + const std::string& GetOutputTensorName() const { return output_tensor_name_; } + + /** + * @brief Destroy and clean up control policy resources + */ + void Destroy() { + if (!initialized_) { return; } + if (cuda_graph_exec_ != nullptr) { + cudaGraphExecDestroy(cuda_graph_exec_); + cuda_graph_exec_ = nullptr; + } + if (cuda_graph_ != nullptr) { + cudaGraphDestroy(cuda_graph_); + cuda_graph_ = nullptr; + } + if (cuda_stream_ != nullptr) { + cudaStreamDestroy(cuda_stream_); + cuda_stream_ = nullptr; + } + if (inference_engine_) { + inference_engine_->Destroy(); + inference_engine_.reset(); + } + graph_captured_ = false; + initialized_ = false; + } + +private: + // Internal configuration state + struct Config { + std::string model_path; + int device_id = 0; + size_t input_dimension = 0; + size_t action_dimension = 0; + bool use_fp16 = false; + }; + Config config_; + + // TensorRT inference engine + std::unique_ptr inference_engine_; + + // Tensor names + std::string input_tensor_name_; + std::string output_tensor_name_; + + // CUDA resources + cudaStream_t cuda_stream_ = nullptr; + cudaGraph_t cuda_graph_ = nullptr; + cudaGraphExec_t cuda_graph_exec_ = nullptr; + + // Input buffer + TPinnedVector policy_input_buffer_; + + // Action output buffer + TPinnedVector action_buffer_; + + // State + bool initialized_ = false; + bool graph_captured_ = false; +}; + +#endif // POLICY_ENGINE_HPP + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/dex3_hands.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/dex3_hands.hpp new file mode 100644 index 0000000000000000000000000000000000000000..76441541fac1dfd9be45ce2b26332abaf48e9f37 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/dex3_hands.hpp @@ -0,0 +1,466 @@ +/** + * @file dex3_hands.hpp + * @brief Driver for the Unitree Dex3 robotic hands (left + right). + * + * Dex3Hands manages two 7-DOF Dex3 hands via the Unitree DDS channel API. + * It provides: + * - Thread-safe command and state buffers (via DataBuffer). + * - `writeOnce()` – called at the user's cadence to publish smoothed + * commands with delta-q clamping and close-ratio limiting. + * - Convenience helpers: `open()`, `close()`, `hold()`, `stop()`. + * - Per-joint or all-joint command setters. + * + * ## Close-Ratio Limiting + * + * A runtime-adjustable `max_close_ratio_` (range [0.2, 1.0]) limits how + * far the fingers can close. 1.0 allows full closure; 0.2 keeps them + * mostly open. Controlled via `--max-close-ratio` CLI arg and X/C keys. + * + * ## Smoothing + * + * Each `writeOnce()` call clamps the per-joint position delta to + * `MAX_DELTA_Q = 0.25` rad relative to the last known state, preventing + * sudden jumps. + * + * ## DDS Topics + * + * Direction | Left hand | Right hand + * ----------|-----------------------|------------------------ + * Command | rt/dex3/left/cmd | rt/dex3/right/cmd + * State | rt/dex3/left/state | rt/dex3/right/state + */ + +#ifndef DEX3_HANDS_HPP +#define DEX3_HANDS_HPP + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "utils.hpp" + +static constexpr int DEX3_MOTOR_MAX = 7; ///< Number of motors per Dex3 hand. +static constexpr int DEX3_SENSOR_MAX = 9; ///< Number of sensors per Dex3 hand. + +/** + * @class Dex3Hands + * @brief Manages two Unitree Dex3 hands (left + right) over DDS channels. + * + * Does not run its own thread – the owning class calls `writeOnce()` at the + * desired cadence from the command-writer thread. + */ +class Dex3Hands +{ +public: + Dex3Hands() = default; + + // Initializes channels for both hands. If networkInterface is empty, skips ChannelFactory init. + void initialize(const std::string &networkInterface) + { + if (!networkInterface.empty()) + { + unitree::robot::ChannelFactory::Instance()->Init(0, networkInterface.c_str()); + } + + // Left hand namespaces + const std::string leftPubNs = "rt/dex3/left"; + const std::string leftSubNs = "rt/dex3/left/state"; + // Right hand namespaces + const std::string rightPubNs = "rt/dex3/right"; + const std::string rightSubNs = "rt/dex3/right/state"; + + + // initialize left hand cmd with default value + unitree_hg::msg::dds_::HandCmd_ left_cmd; + sizeCommand(left_cmd); + left_.cmd_buffer.SetData(left_cmd); + + // initialize right hand cmd with default value + unitree_hg::msg::dds_::HandCmd_ right_cmd; + sizeCommand(right_cmd); + right_.cmd_buffer.SetData(right_cmd); + + // Left hand + left_.publisher.reset(new unitree::robot::ChannelPublisher(leftPubNs + "/cmd")); + left_.subscriber.reset(new unitree::robot::ChannelSubscriber(leftSubNs)); + left_.publisher->InitChannel(); + left_.subscriber->InitChannel( + [this](const void *message) { this->onState(true, message); }, 1); + + // Right hand + right_.publisher.reset(new unitree::robot::ChannelPublisher(rightPubNs + "/cmd")); + right_.subscriber.reset(new unitree::robot::ChannelSubscriber(rightSubNs)); + right_.publisher->InitChannel(); + right_.subscriber->InitChannel( + [this](const void *message) { this->onState(false, message); }, 1); + } + + // Set max close ratio at runtime (bounded to [0.2, 1.0]) + void SetMaxCloseRatio(double ratio) { + max_close_ratio_ = std::max(0.2, std::min(1.0, ratio)); + } + + // Get current max close ratio + double GetMaxCloseRatio() const { return max_close_ratio_; } + + // Perform one publish tick; call this at your own cadence from the main class/thread. + void writeOnce() + { + constexpr double MAX_DELTA_Q = 0.25; + // Use runtime adjustable max_close_ratio_ instead of constexpr + + // Left hand publish with smoothing + { + const auto cmdPtr = left_.cmd_buffer.GetDataWithTime().data; + const auto statePtr = left_.state_buffer.GetDataWithTime().data; + + if (left_.publisher && cmdPtr) + { + // Create a copy to apply clipping and smoothing + unitree_hg::msg::dds_::HandCmd_ smoothedCmd = *cmdPtr; + + // Clip desired positions to prevent closing beyond max_close_ratio_ + // This applies to ALL joints including thumb (0-2) + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + double desired_q = cmdPtr->motor_cmd()[i].q(); + desired_q = clipToMaxOpen(desired_q, MAX_LIMITS_LEFT[i], MIN_LIMITS_LEFT[i], max_close_ratio_); + smoothedCmd.motor_cmd()[i].q(desired_q); + } + + // If we have state feedback, clamp the delta + if (statePtr && static_cast(statePtr->motor_state().size()) == DEX3_MOTOR_MAX) + { + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + const double current_q = statePtr->motor_state()[i].q(); + const double desired_q = smoothedCmd.motor_cmd()[i].q(); + const double delta = desired_q - current_q; + + // Clamp delta to [-MAX_DELTA_Q, +MAX_DELTA_Q] + const double clamped_delta = std::max(-MAX_DELTA_Q, std::min(MAX_DELTA_Q, delta)); + smoothedCmd.motor_cmd()[i].q(current_q + clamped_delta); + } + } + + left_.publisher->Write(smoothedCmd); + } + } + + // Right hand publish with smoothing + { + const auto cmdPtr = right_.cmd_buffer.GetDataWithTime().data; + const auto statePtr = right_.state_buffer.GetDataWithTime().data; + + if (right_.publisher && cmdPtr) + { + // Create a copy to apply clipping and smoothing + unitree_hg::msg::dds_::HandCmd_ smoothedCmd = *cmdPtr; + + // Clip desired positions to prevent closing beyond max_close_ratio_ + // This applies to ALL joints including thumb (0-2) + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + double desired_q = cmdPtr->motor_cmd()[i].q(); + desired_q = clipToMaxOpen(desired_q, MAX_LIMITS_RIGHT[i], MIN_LIMITS_RIGHT[i], max_close_ratio_); + smoothedCmd.motor_cmd()[i].q(desired_q); + } + + // If we have state feedback, clamp the delta + if (statePtr && static_cast(statePtr->motor_state().size()) == DEX3_MOTOR_MAX) + { + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + const double current_q = statePtr->motor_state()[i].q(); + const double desired_q = smoothedCmd.motor_cmd()[i].q(); + const double delta = desired_q - current_q; + + // Clamp delta to [-MAX_DELTA_Q, +MAX_DELTA_Q] + const double clamped_delta = std::max(-MAX_DELTA_Q, std::min(MAX_DELTA_Q, delta)); + smoothedCmd.motor_cmd()[i].q(current_q + clamped_delta); + } + } + + right_.publisher->Write(smoothedCmd); + } + } + } + + // Returns a snapshot of the latest state for the requested hand. + std::shared_ptr getState(bool is_left) const + { + const HandCtx &ctx = is_left ? left_ : right_; + return ctx.state_buffer.GetDataWithTime().data; + } + + // Returns a snapshot of the current command buffer for the requested hand. + std::shared_ptr getCommand(bool is_left) const + { + const HandCtx &ctx = is_left ? left_ : right_; + return ctx.cmd_buffer.GetDataWithTime().data; + } + + // Optional: access DataBuffer results directly to detect missing data + TimestampedData getStateWithTime(bool is_left) const + { + const HandCtx &ctx = is_left ? left_ : right_; + return ctx.state_buffer.GetDataWithTime(); + } + + TimestampedData getCommandWithTime(bool is_left) const + { + const HandCtx &ctx = is_left ? left_ : right_; + return ctx.cmd_buffer.GetDataWithTime(); + } + + bool hasState(bool is_left) const { return getStateWithTime(is_left).HasData(); } + bool hasCommand(bool is_left) const { return getCommandWithTime(is_left).HasData(); } + + // Sets the command buffer for the requested hand. The writer will publish it in writeOnce(). + void setCommand(bool is_left, const unitree_hg::msg::dds_::HandCmd_ &cmd) + { + HandCtx &ctx = is_left ? left_ : right_; + if (static_cast(cmd.motor_cmd().size()) != DEX3_MOTOR_MAX) + { + std::cerr << "[Dex3Hands] setCommand: invalid motor_cmd size " + << cmd.motor_cmd().size() << ", expected " << DEX3_MOTOR_MAX << std::endl; + return; + } + ctx.cmd_buffer.SetData(cmd); + } + + // Convenience: set a single joint's command using simple fields. + // Required: q. Optional: dq, kp, kd, tau. Mode is set internally following Unitree example (status=0x01, timeout=0). + void setJointCommand(bool is_left, int joint_index, + double q, + std::optional dq = std::nullopt, + std::optional kp = std::nullopt, + std::optional kd = std::nullopt, + std::optional tau = std::nullopt) + { + if (joint_index < 0 || joint_index >= DEX3_MOTOR_MAX) { return; } + HandCtx &ctx = is_left ? left_ : right_; + const auto currentPtr = ctx.cmd_buffer.GetDataWithTime().data; + unitree_hg::msg::dds_::HandCmd_ cmd = currentPtr ? *currentPtr : unitree_hg::msg::dds_::HandCmd_(); + if (!currentPtr) { sizeCommand(cmd); } + auto &m = cmd.motor_cmd()[joint_index]; + m.mode(makeMode(static_cast(joint_index), /*status*/ 0x01, /*timeout*/ 0)); + m.q(q); + if (dq) { m.dq(*dq); } + if (kp) { m.kp(*kp); } + if (kd) { m.kd(*kd); } + if (tau) { m.tau(*tau); } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + + // Convenience: set all joints' q, and optionally per-joint dq/kp/kd/tau arrays. + void setAllJointsCommand(bool is_left, + const std::array &q, + std::optional> dq = std::nullopt, + std::optional> kp = std::nullopt, + std::optional> kd = std::nullopt, + std::optional> tau = std::nullopt) + { + HandCtx &ctx = is_left ? left_ : right_; + const auto currentPtr = ctx.cmd_buffer.GetDataWithTime().data; + unitree_hg::msg::dds_::HandCmd_ cmd = currentPtr ? *currentPtr : unitree_hg::msg::dds_::HandCmd_(); + if (!currentPtr) { sizeCommand(cmd); } + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + auto &m = cmd.motor_cmd()[i]; + m.mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0)); + m.q(q[i]); + if (dq) { m.dq((*dq)[i]); } + if (kp) { m.kp((*kp)[i]); } + if (kd) { m.kd((*kd)[i]); } + if (tau) { m.tau((*tau)[i]); } + } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + + // Quick helper: STOP - relax all joints (timeout=1, zero gains/vel/torque/pos like example) + void stop(bool is_left) + { + HandCtx &ctx = is_left ? left_ : right_; + unitree_hg::msg::dds_::HandCmd_ cmd; sizeCommand(cmd); + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + auto &m = cmd.motor_cmd()[i]; + m.mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0x01)); + m.tau(0); + m.dq(0); + m.kp(0); + m.kd(0); + m.q(0); + } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + + // Quick helper: HOLD - hold current pose with gains (default kp=1.5, kd=0.1, dq=0, tau=0) + void hold(bool is_left, double kp = 1.5, double kd = 0.1) + { + // Copy current joint positions from state under lock + std::array q_current {}; + { + const HandCtx &ctx_ro = is_left ? left_ : right_; + const auto data = ctx_ro.state_buffer.GetDataWithTime().data; + if (!data) { return; } + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + q_current[i] = data->motor_state()[i].q(); + } + } + // Write hold command into command buffer + HandCtx &ctx = is_left ? left_ : right_; + unitree_hg::msg::dds_::HandCmd_ cmd; sizeCommand(cmd); + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + auto &m = cmd.motor_cmd()[i]; + m.mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0)); + m.q(q_current[i]); + m.dq(0); + m.kp(kp); + m.kd(kd); + m.tau(0); + } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + + // Quick helper: CLOSE - move to mid-range pose (per Unitree example) with gains + void close(bool is_left, double kp = 1.5, double kd = 0.1) + { + const auto &maxLims = is_left ? MAX_LIMITS_LEFT : MAX_LIMITS_RIGHT; + const auto &minLims = is_left ? MIN_LIMITS_LEFT : MIN_LIMITS_RIGHT; + HandCtx &ctx = is_left ? left_ : right_; + unitree_hg::msg::dds_::HandCmd_ cmd; sizeCommand(cmd); + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + const double mid = (maxLims[i] + minLims[i]) / 2.0; + auto &m = cmd.motor_cmd()[i]; + m.mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0)); + m.q(mid); + m.dq(0); + m.kp(kp); + m.kd(kd); + m.tau(0); + } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + + // Quick helper: OPEN - move to open pose using per-joint 0 with gains + void open(bool is_left, double kp = 1.5, double kd = 0.1) + { + HandCtx &ctx = is_left ? left_ : right_; + unitree_hg::msg::dds_::HandCmd_ cmd; sizeCommand(cmd); + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + auto &m = cmd.motor_cmd()[i]; + m.mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0)); + m.q(0); + m.dq(0); + m.kp(kp); + m.kd(kd); + m.tau(0); + } + ctx.cmd_buffer.SetData(std::move(cmd)); + } + +private: + struct HandCtx + { + unitree::robot::ChannelPublisherPtr publisher; + unitree::robot::ChannelSubscriberPtr subscriber; + + DataBuffer state_buffer; + DataBuffer cmd_buffer; + }; + + static void sizeCommand(unitree_hg::msg::dds_::HandCmd_ &cmd) + { + cmd.motor_cmd().resize(DEX3_MOTOR_MAX); + // give default value to the command + for (int i = 0; i < DEX3_MOTOR_MAX; ++i) + { + cmd.motor_cmd()[i].mode(makeMode(static_cast(i), /*status*/ 0x01, /*timeout*/ 0)); + cmd.motor_cmd()[i].q(0); + cmd.motor_cmd()[i].dq(0); + cmd.motor_cmd()[i].kp(1.5); + cmd.motor_cmd()[i].kd(0.1); + cmd.motor_cmd()[i].tau(0); + } + } + + void onState(bool is_left, const void *message) + { + HandCtx &ctx = is_left ? left_ : right_; + const auto *incoming = static_cast(message); + ctx.state_buffer.SetData(*incoming); + } + + static uint8_t makeMode(uint8_t motor_id, uint8_t status, uint8_t timeout) + { + uint8_t mode = 0; + mode |= (motor_id & 0x0F); + mode |= (status & 0x07) << 4; + mode |= (timeout & 0x01) << 7; + return mode; + } + + // Clip desired_q to prevent closing beyond MAX_CLOSE_RATIO (e.g., 0.05 = 95% open, 5% closed) + // q=0 is fully open, so we clip to prevent q from being more closed than MAX_CLOSE_RATIO * limit + // Allow range: fully open (q=0) to 95% open (MAX_CLOSE_RATIO * limit) + static double clipToMaxOpen(double desired_q, double max_limit, double min_limit, double MAX_CLOSE_RATIO) + { + // Calculate the maximum allowed closed position (95% open = 5% closed) + double q_max_open_pos = MAX_CLOSE_RATIO * max_limit; // For positive direction + double q_max_open_neg = MAX_CLOSE_RATIO * min_limit; // For negative direction + + // Clip based on direction - allow q=0 (fully open) but prevent closing beyond 95% open + if (desired_q > 0.0 && max_limit > 0.0) + { + // Positive direction: prevent closing beyond 95% open + if (desired_q > q_max_open_pos) + { + return q_max_open_pos; + } + } + else if (desired_q < 0.0 && min_limit < 0.0) + { + // Negative direction: prevent closing beyond 95% open + if (desired_q < q_max_open_neg) + { + return q_max_open_neg; + } + } + // If q=0 or both limits are zero, allow it (fully open is allowed) + + return desired_q; + } + + // no internal thread; main class owns timing + + HandCtx left_; + HandCtx right_; + + // Runtime adjustable max close ratio (default 1.0 = fully closed allowed) + // Bounded to [0.2, 1.0] - higher values allow more closing + // Use --max-close-ratio arg to set initial limit, X/C keys to adjust at runtime + double max_close_ratio_ = 1.0; + + // Limits taken from Unitree example for test "close" pose + static constexpr std::array MAX_LIMITS_LEFT = { 1.05, 1.05, 1.75, 0.0, 0.0, 0.0, 0.0 }; + static constexpr std::array MIN_LIMITS_LEFT = {-1.05, -0.724, 0.0, -1.57, -1.75, -1.57, -1.75 }; + static constexpr std::array MAX_LIMITS_RIGHT = { 1.05, 0.742, 0.0, 1.57, 1.75, 1.57, 1.75 }; + static constexpr std::array MIN_LIMITS_RIGHT = {-1.05, -1.05, -1.75, 0.0, 0.0, 0.0, 0.0 }; +}; + +#endif // DEX3_HANDS_HPP \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/encoder.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/encoder.hpp new file mode 100644 index 0000000000000000000000000000000000000000..7d912b5f0b9c3618b644c175e3fcf8a81a9664e5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/encoder.hpp @@ -0,0 +1,413 @@ +/** + * @file encoder.hpp + * @brief TensorRT-accelerated encoder engine (observations → token state). + * + * EncoderEngine loads an ONNX encoder model, converts it to TensorRT, and + * provides GPU-accelerated inference with optional CUDA graph capture. + * + * The encoder compresses high-dimensional robot observations into a compact + * latent / token representation that is then consumed by the control policy + * as the `token_state` observation. + * + * ## I/O Contract + * + * - **Input**: single tensor `obs_dict` (float32, encoder observation dim). + * - **Output**: single tensor `encoded_tokens` (float32, token dimension). + * + * ## Configuration + * + * Driven by the `encoder:` section of `observation_config.yaml` (parsed by + * ObservationConfigParser). The encoder is created only when `token_state` + * is enabled in the observation config. The model path is provided via the + * `--encoder-model` command-line argument. + * + * ## Typical Usage + * + * 1. `Initialize(model_path)` – convert + load TRT engine. + * 2. Fill `GetInputBuffer()` with encoder observations. + * 3. `Encode()` – runs GPU inference and populates `GetTokenBuffer()`. + * 4. (Optional) `CaptureGraph()` for deterministic latency. + */ + +#ifndef ENCODER_HPP +#define ENCODER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * @class EncoderEngine + * @brief Runs the observation encoder on GPU via TensorRT. + * + * Mirrors the PolicyEngine architecture: owns CUDA resources, pinned-memory + * buffers, and supports CUDA graph capture. Non-copyable. + */ +class EncoderEngine { +public: + EncoderEngine() = default; + ~EncoderEngine() { Destroy(); } + + /** + * @brief Initialize the encoder engine from a model path + * @param model_path Path to ONNX model file (will be converted to TensorRT) + * @param use_fp16 Whether to use FP16 precision + * @return true if initialization successful, false otherwise + */ + bool Initialize(const std::string& model_path, bool use_fp16 = false) { + if (model_path.empty()) { + std::cerr << "✗ EncoderEngine::Initialize - Empty model path" << std::endl; + return false; + } + + config_.model_path = model_path; + config_.use_fp16 = use_fp16; + + try { + std::cout << "Loading encoder model..." << std::endl; + + inference_engine_ = std::make_unique(); + + Options options; + options.deviceID = config_.device_id; + std::string prefix("encoder_"); + if (use_fp16) { options.precision = Precision::FP16; prefix += "fp16_"; } + + std::string cached_trt_file; + if (!ConvertONNXToTRT(options, model_path, cached_trt_file, prefix, false)) { + std::cerr << "✗ Failed to convert encoder ONNX to TRT: " << model_path << std::endl; + inference_engine_.reset(); + return false; + } + + if (!inference_engine_->Initialize(cached_trt_file, options.deviceID, options.dynamic_axes_names)) { + std::cerr << "✗ Failed to initialize encoder TensorRT model: " << cached_trt_file << std::endl; + inference_engine_.reset(); + return false; + } + + if (!inference_engine_->InitInputs({})) { + std::cerr << "✗ Failed to initialize encoder TensorRT model inputs" << std::endl; + inference_engine_.reset(); + return false; + } + + auto output_names = inference_engine_->GetOutputTensorNames(); + if (output_names.empty()) { + std::cerr << "✗ Encoder model has no outputs" << std::endl; + inference_engine_.reset(); + return false; + } + if (output_names.size() != 1) { + std::cerr << "✗ Encoder must have exactly 1 output, found " << output_names.size() << ": "; + for (const auto& n : output_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + if (std::find(output_names.begin(), output_names.end(), std::string("encoded_tokens")) == output_names.end()) { + std::cerr << "✗ Encoder output tensor 'encoded_tokens' not found. Available outputs: "; + for (const auto& n : output_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + output_tensor_name_ = "encoded_tokens"; + + std::vector output_dims; + if (inference_engine_->GetTensorShape(output_tensor_name_, output_dims)) { + config_.token_dimension = std::accumulate(output_dims.begin(), output_dims.end(), static_cast(1), std::multiplies()); + } + + token_buffer_.resize(config_.token_dimension, 0.0f); + + auto input_names = inference_engine_->GetInputTensorNames(); + if (input_names.empty()) { + std::cerr << "✗ Encoder model has no inputs" << std::endl; + inference_engine_.reset(); + return false; + } + if (input_names.size() != 1) { + std::cerr << "✗ Encoder must have exactly 1 input, found " << input_names.size() << ": "; + for (const auto& n : input_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + if (std::find(input_names.begin(), input_names.end(), std::string("obs_dict")) == input_names.end()) { + std::cerr << "✗ Encoder input tensor 'obs_dict' not found. Available inputs: "; + for (const auto& n : input_names) std::cerr << n << ' '; + std::cerr << std::endl; + inference_engine_.reset(); + return false; + } + input_tensor_name_ = "obs_dict"; + if (inference_engine_->GetTensorDataType(input_tensor_name_) != DataType::FLOAT) { + std::cerr << "✗ Encoder input 'obs_dict' must be float32" << std::endl; + inference_engine_.reset(); + return false; + } + + // Initialize input buffer + std::vector input_dims; + if (!inference_engine_->GetTensorShape(input_tensor_name_, input_dims)) { + std::cerr << "✗ Failed to get encoder input shape" << std::endl; + inference_engine_.reset(); + return false; + } + + config_.input_dimension = std::accumulate( + input_dims.begin(), input_dims.end(), static_cast(1), std::multiplies() + ); + encoder_input_buffer_.resize(config_.input_dimension, 0.0f); + + // Set initial input data (zeros) + inference_engine_->SetInputData(input_tensor_name_, encoder_input_buffer_); + + cudaError_t cuda_status = cudaStreamCreate(&cuda_stream_); + if (cuda_status != cudaSuccess) { + std::cerr << "✗ Failed to create CUDA stream: " << cudaGetErrorString(cuda_status) << std::endl; + inference_engine_.reset(); + return false; + } + + initialized_ = true; + std::cout << "✓ Encoder initialized successfully!" << std::endl; + std::cout << " Model: " << model_path << std::endl; + std::cout << " Input dimension: " << config_.input_dimension << std::endl; + std::cout << " Token dimension: " << config_.token_dimension << std::endl; + std::cout << " Input tensor: " << input_tensor_name_ << std::endl; + std::cout << " Output tensor: " << output_tensor_name_ << std::endl; + return true; + + } catch (const std::exception& e) { + std::cerr << "✗ EncoderEngine::Initialize - Exception: " << e.what() << std::endl; + inference_engine_.reset(); + return false; + } + } + + + /** + * @brief Set input data for the encoder + * @param data Input data buffer + * @param element_count Number of elements + */ + template + void SetInputData(const T* data, size_t element_count) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputData(input_tensor_name_, data, element_count); + } + + /** + * @brief Set input data asynchronously + * @param data Input data buffer + * @param element_count Number of elements + * @param stream CUDA stream for async operation + */ + template + void SetInputDataAsync(const T* data, size_t element_count, cudaStream_t stream) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputDataAsync(input_tensor_name_, data, element_count, stream); + } + + /** + * @brief Set input data using TPinnedVector + * @param data Input data in TPinnedVector + */ + template + void SetInputData(const TPinnedVector& data) { + if (!initialized_ || !inference_engine_) { return; } + inference_engine_->SetInputData(input_tensor_name_, data); + } + + /** + * @brief Run encoder inference and populate internal token buffer + * @param stream CUDA stream for inference (uses internal stream if nullptr) + * @return true if inference successful, false otherwise + */ + bool Encode(cudaStream_t stream = nullptr) { + if (!initialized_) { std::cerr << "✗ EncoderEngine::Encode - Not initialized" << std::endl; return false; } + if (!inference_engine_) { std::cerr << "✗ EncoderEngine::Encode - TensorRT engine not initialized" << std::endl; return false; } + + cudaStream_t encode_stream = (stream != nullptr) ? stream : cuda_stream_; + + // Transfer input data from CPU to GPU + inference_engine_->SetInputData(input_tensor_name_, encoder_input_buffer_); + + if (graph_captured_ && cuda_graph_exec_ != nullptr) { + cudaError_t status = cudaGraphLaunch(cuda_graph_exec_, encode_stream); + if (status != cudaSuccess) { + std::cerr << "✗ EncoderEngine::Encode - Failed to launch CUDA graph: " << cudaGetErrorString(status) << std::endl; + return false; + } + } else { + if (!inference_engine_->Enqueue(encode_stream)) { + std::cerr << "✗ EncoderEngine::Encode - Failed to enqueue inference" << std::endl; + return false; + } + } + + // Automatically populate internal token buffer after inference (GPU to CPU) + inference_engine_->GetOutputDataAsync(output_tensor_name_, token_buffer_, encode_stream); + cudaStreamSynchronize(encode_stream); + + return true; + } + + /** + * @brief Capture CUDA graph for optimized execution + * @return true if capture successful, false otherwise + */ + bool CaptureGraph() { + if (!initialized_ || !inference_engine_) { + std::cerr << "✗ EncoderEngine::CaptureGraph - Cannot capture (engine not initialized)" << std::endl; + return false; + } + if (graph_captured_) { + std::cout << "Encoder CUDA graph already captured" << std::endl; + return true; + } + + std::cout << "Capturing encoder CUDA graph..." << std::endl; + cudaStreamBeginCapture(cuda_stream_, cudaStreamCaptureModeRelaxed); + if (!inference_engine_->Enqueue(cuda_stream_)) { + std::cerr << "✗ Failed to enqueue encoder inference for CUDA graph capture" << std::endl; + cudaStreamEndCapture(cuda_stream_, &cuda_graph_); + return false; + } + cudaStreamEndCapture(cuda_stream_, &cuda_graph_); + cudaStreamSynchronize(cuda_stream_); + + cudaGraphInstantiate(&cuda_graph_exec_, cuda_graph_, NULL, NULL, 0); + + graph_captured_ = true; + std::cout << "✓ Encoder CUDA graph captured successfully!" << std::endl; + return true; + } + + /** + * @brief Get CUDA stream used by encoder + * @return CUDA stream handle + */ + cudaStream_t GetCudaStream() const { return cuda_stream_; } + + /** + * @brief Get CUDA graph (if captured) + * @return CUDA graph handle + */ + cudaGraph_t GetCudaGraph() const { return cuda_graph_; } + + /** + * @brief Get CUDA graph execution instance + * @return CUDA graph execution handle + */ + cudaGraphExec_t GetCudaGraphExec() const { return cuda_graph_exec_; } + + /** + * @brief Get input dimension + * @return Input dimension size + */ + size_t GetInputDimension() const { return config_.input_dimension; } + + /** + * @brief Get token dimension + * @return Token dimension size + */ + size_t GetTokenDimension() const { return config_.token_dimension; } + + /** + * @brief Get current token source type + * @return Token source type + */ + // EncoderTokenSource GetTokenSource() const { return config_.source; } // Removed + + /** + * @brief Set token source type + * @param source Token source type + */ + // void SetTokenSource(EncoderTokenSource source) { config_.source = source; } // Removed + + /** + * @brief Check if encoder is initialized + * @return true if initialized, false otherwise + */ + bool IsInitialized() const { return initialized_; } + + /** + * @brief Get input tensor name + * @return Input tensor name + */ + const std::string& GetInputTensorName() const { return input_tensor_name_; } + + /** + * @brief Get output tensor name + * @return Output tensor name + */ + const std::string& GetOutputTensorName() const { return output_tensor_name_; } + + /** + * @brief Get reference to internal input buffer + * @return Reference to input buffer + */ + TPinnedVector& GetInputBuffer() { return encoder_input_buffer_; } + + /** + * @brief Get reference to internal token buffer + * @return Reference to token buffer + */ + TPinnedVector& GetTokenBuffer() { return token_buffer_; } + + /** + * @brief Destroy and clean up encoder resources + */ + void Destroy() { + if (!initialized_) { return; } + if (cuda_graph_exec_ != nullptr) { cudaGraphExecDestroy(cuda_graph_exec_); cuda_graph_exec_ = nullptr; } + if (cuda_graph_ != nullptr) { cudaGraphDestroy(cuda_graph_); cuda_graph_ = nullptr; } + if (cuda_stream_ != nullptr) { cudaStreamDestroy(cuda_stream_); cuda_stream_ = nullptr; } + if (inference_engine_) { inference_engine_->Destroy(); inference_engine_.reset(); } + graph_captured_ = false; initialized_ = false; + } + +private: + // Internal configuration state + struct Config { + std::string model_path; + int device_id = 0; + size_t input_dimension = 0; + size_t token_dimension = 0; + bool use_fp16 = false; + }; + Config config_; + + // TensorRT inference engine + std::unique_ptr inference_engine_; + + // Tensor names + std::string input_tensor_name_; + std::string output_tensor_name_; + + // CUDA resources + cudaStream_t cuda_stream_ = nullptr; + cudaGraph_t cuda_graph_ = nullptr; + cudaGraphExec_t cuda_graph_exec_ = nullptr; + + // Input buffer + TPinnedVector encoder_input_buffer_; + + // Token storage + TPinnedVector token_buffer_; + + // State + bool initialized_ = false; + bool graph_captured_ = false; +}; + +#endif // ENCODER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/error_monitor.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/error_monitor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..86bf7ecb6585959b2500bb224287e64ebf205e1b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/error_monitor.hpp @@ -0,0 +1,141 @@ +/** + * @file error_monitor.hpp + * @brief Monitors motor error states from LowState and prints warnings on + * state transitions, with periodic reminders for persistent faults. + * + * The G1 robot reports per-motor fault codes via the `motorstate()` field in + * each MotorState_ message (part of LowState_ on topic `rt/lowstate`). A + * non-zero value indicates a motor fault. + * + * ErrorMonitor tracks the previous motorstate value for each motor and: + * 1. Prints immediately on state transitions (fault appears / clears / changes). + * 2. Prints a periodic summary while any faults persist, so the message + * is not lost in other log output. + * + * Called at 500 Hz from LowStateHandler. The reminder interval defaults to + * every 2500 calls (~5 seconds). + */ + +#pragma once + +#include +#include +#include + +#include "robot_parameters.hpp" + +/** + * @class ErrorMonitor + * @brief Detects motor fault transitions and periodically reminds about + * persistent faults. + * + * Usage: call `update()` with the current motor error codes from each + * LowState callback. + */ +class ErrorMonitor { + public: + /** + * @param reminder_interval Number of update() calls between periodic + * reminders while faults persist. At 500 Hz, 2500 = every ~5 s. + */ + explicit ErrorMonitor(int reminder_interval = 500) + : reminder_interval_(reminder_interval) { + prev_motorstate_.fill(0); + } + + /** + * @brief Check motor error states, print on transitions and periodic reminders. + * @param motorstates Array of motorstate error codes, one per motor. + */ + void update(const std::array& motorstates) { + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + uint32_t state = motorstates[i]; + if (state != prev_motorstate_[i]) { + if (state != 0 && prev_motorstate_[i] == 0) { + // New fault + std::cout << "[ErrorMonitor] Motor " << i << " (" << jointName(i) + << ") FAULT: code 0x" << std::hex << state << std::dec + << std::endl; + error_count_++; + } else if (state == 0 && prev_motorstate_[i] != 0) { + // Fault cleared + std::cout << "[ErrorMonitor] Motor " << i << " (" << jointName(i) + << ") fault CLEARED" << std::endl; + if (error_count_ > 0) error_count_--; + } else { + // Fault code changed + std::cout << "[ErrorMonitor] Motor " << i << " (" << jointName(i) + << ") fault CHANGED: 0x" << std::hex << prev_motorstate_[i] + << " -> 0x" << state << std::dec << std::endl; + } + prev_motorstate_[i] = state; + reminder_counter_ = 0; // reset reminder timer on any transition + } + } + + // Periodic reminder while faults persist + if (error_count_ > 0) { + reminder_counter_++; + if (reminder_counter_ >= reminder_interval_) { + reminder_counter_ = 0; + std::cout << "[ErrorMonitor] " << error_count_ + << " motor(s) still faulted:"; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + if (prev_motorstate_[i] != 0) { + std::cout << " " << jointName(i) << "(0x" << std::hex + << prev_motorstate_[i] << std::dec << ")"; + } + } + std::cout << std::endl; + } + } + } + + /// Number of motors currently in a faulted state. + int getErrorCount() const { return error_count_; } + + /// True if any motor is currently faulted. + bool hasErrors() const { return error_count_ > 0; } + + private: + std::array prev_motorstate_; + int error_count_ = 0; + int reminder_interval_ = 2500; + int reminder_counter_ = 0; + + static const char* jointName(int index) { + static const char* names[] = { + "LeftHipPitch", // 0 + "LeftHipRoll", // 1 + "LeftHipYaw", // 2 + "LeftKnee", // 3 + "LeftAnklePitch", // 4 + "LeftAnkleRoll", // 5 + "RightHipPitch", // 6 + "RightHipRoll", // 7 + "RightHipYaw", // 8 + "RightKnee", // 9 + "RightAnklePitch", // 10 + "RightAnkleRoll", // 11 + "WaistYaw", // 12 + "WaistRoll", // 13 + "WaistPitch", // 14 + "LeftShoulderPitch", // 15 + "LeftShoulderRoll", // 16 + "LeftShoulderYaw", // 17 + "LeftElbow", // 18 + "LeftWristRoll", // 19 + "LeftWristPitch", // 20 + "LeftWristYaw", // 21 + "RightShoulderPitch", // 22 + "RightShoulderRoll", // 23 + "RightShoulderYaw", // 24 + "RightElbow", // 25 + "RightWristRoll", // 26 + "RightWristPitch", // 27 + "RightWristYaw", // 28 + }; + if (index >= 0 && index < G1_NUM_MOTOR) return names[index]; + return "Unknown"; + } +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/file_sink.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/file_sink.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9618549ceb06f96ca89171a359767471d4ea709f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/file_sink.hpp @@ -0,0 +1,51 @@ +/** + * @file file_sink.hpp + * @brief Simple CSV file writer used by StateLogger for split-file persistence. + * + * Each FileSink manages one output CSV file (e.g. `base_quat.csv`, `q.csv`). + * It lazily opens the file and writes a header on the first call to + * `writeLine()`, then appends one timestamped row per call. + * + * Header format varies by HeaderType: + * - XYZ: x, y, z columns + * - QUATERNION: w, x, y, z columns + * - VECTOR: v0, v1, …, vN columns (sized from the first data span) + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +/** + * @class FileSink + * @brief Writes timestamped rows to a single CSV file for one signal type. + */ +class FileSink { +public: + enum class HeaderType { + XYZ, + QUATERNION, + VECTOR, + }; + + FileSink(bool enable_csv, std::string csv_dir, const std::string& file_prefix, const std::string& header_prefix, HeaderType type); + void writeLine(std::uint64_t index, double t_ms, double t_realtime_ms, double t_monotonic_ms, double ros_timestamp, const std::span& arr); + +private: + std::string path_; + std::string header_prefix_; + std::ofstream file_; + HeaderType type_; + bool header_written = false; + + static bool fileIsEmpty(const std::string& path); + void open(); + void writeHeaderCommon(); + void writeHeaderIfNecessary(std::size_t vector_size); +}; + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/fk.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/fk.hpp new file mode 100644 index 0000000000000000000000000000000000000000..eb38a117d2eae7ac72c1c51675ac1301874120af --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/fk.hpp @@ -0,0 +1,58 @@ +/** + * @file fk.hpp + * @brief Forward kinematics (FK) for the G1 robot, parsed from a MuJoCo XML model. + * + * RobotFK loads a MuJoCo MJCF XML file (e.g. `g1/g1_29dof.xml`), extracts the + * kinematic tree (joint axes, translations, rest rotations), and provides a + * `DoFK()` method that computes world-frame positions and orientations for + * every body given a root pose and joint angles. + * + * The FK result is used by MotionSequence::ComputeFK() to populate body-part + * positions and quaternions from joint-angle data. + */ + +#pragma once + +#include +#include +#include + +struct XMLNode; + +/** + * @class RobotFK + * @brief Forward kinematics solver for the G1 robot, initialised from a MuJoCo XML. + */ +class RobotFK +{ + public: + + RobotFK(const std::string &xmlfile); + + void DoFK( + std::array *positions_world, + std::array *rotations_world, + const std::array &root_translation, + const std::array &root_rotation, + const double *joint_angles + ) const; + + int NumJoints() const { return node_children_.size(); } + + private: + + void FKChildren( + std::array *positions_world, + std::array *rotations_world, + int parent_idx, + const double *joint_angles + ) const; + + void AddNode(XMLNode *node); + + std::vector< std::array > axes_; + std::vector< std::array > translations_; + std::vector< std::array > rest_rotations_; + std::vector< std::vector > node_children_; + std::vector< std::string > node_names_; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0e83fe9c2ae09ed28cf1c30b48938136c14af165 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad.hpp @@ -0,0 +1,777 @@ +/** + * @file gamepad.hpp + * @brief Unitree wireless gamepad driver and InputInterface implementation. + * + * This file contains: + * 1. Low-level data structures that map directly onto the raw 40-byte + * wireless-remote packet received from the Unitree SDK + * (xKeySwitchUnion, xRockerBtnDataStruct, REMOTE_DATA_RX). + * 2. A simple edge-detecting Button helper class. + * 3. The Gamepad class – a full InputInterface that translates raw button + * and analog-stick data into motion / planner commands. + * + * The Gamepad supports two operational modes: + * - **Non-planner mode** – uses the face buttons and bumpers to cycle through + * pre-loaded reference motions and play/pause/restart them. + * - **Planner mode** (toggled with F1) – the left stick controls movement + * direction, the right stick controls facing direction, and the bumpers + * switch between locomotion modes (idle / slow walk / walk / run / squat / + * kneel). L2/R2 adjust speed or height depending on the current mode. + * + * See the button-mapping comment block inside the class for the complete mapping. + */ + +#ifndef GAMEPAD_HPP +#define GAMEPAD_HPP + +#include +#include +#include +#include +#include +#include +#include "input_interface.hpp" + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +namespace unitree::common { + +// ========================================================================= +// Raw wireless-remote data structures (match the Unitree SDK wire format) +// ========================================================================= + +/** + * @brief Bit-field union for the 16-bit button state word. + * + * Each member is a single-bit flag corresponding to one physical button. + * The `value` member gives access to all 16 bits as a single uint16_t. + */ +typedef union { + struct { + uint8_t R1 : 1; ///< Right bumper + uint8_t L1 : 1; ///< Left bumper + uint8_t start : 1; ///< Start button + uint8_t select : 1; ///< Select / back button + uint8_t R2 : 1; ///< Right trigger (digital) + uint8_t L2 : 1; ///< Left trigger (digital) + uint8_t F1 : 1; ///< Function 1 button + uint8_t F2 : 1; ///< Function 2 button + uint8_t A : 1; ///< A face button + uint8_t B : 1; ///< B face button + uint8_t X : 1; ///< X face button + uint8_t Y : 1; ///< Y face button + uint8_t up : 1; ///< D-pad up + uint8_t right : 1; ///< D-pad right + uint8_t down : 1; ///< D-pad down + uint8_t left : 1; ///< D-pad left + } components; + + uint16_t value; ///< Raw 16-bit button word. +} xKeySwitchUnion; + +/** + * @brief 40-byte raw joystick packet (24 bytes used, 16 idle/reserved). + * + * Layout matches the Unitree wireless remote receiver format. + */ +typedef struct { + uint8_t head[2]; ///< 2-byte packet header + xKeySwitchUnion btn; ///< 16-bit button state + float lx; ///< Left stick horizontal (−1..+1) + float rx; ///< Right stick horizontal (−1..+1) + float ry; ///< Right stick vertical (−1..+1) + float L2; ///< Left trigger analog (0..+1) + float ly; ///< Left stick vertical (−1..+1) + + uint8_t idle[16]; ///< Reserved / unused bytes +} xRockerBtnDataStruct; + +/** + * @brief Union overlay giving byte-array access to the full 40-byte packet. + * + * `RF_RX` provides structured access; `buff` gives raw byte-level access + * (useful for memcpy from the SDK callback). + */ +typedef union { + xRockerBtnDataStruct RF_RX; + uint8_t buff[40] = {0}; +} REMOTE_DATA_RX; + +/** + * @brief Simple edge-detecting button helper. + * + * Call update() once per frame with the current digital state. + * After the call: + * - `pressed` – true while the button is held down. + * - `on_press` – true only on the frame the button transitions from released → pressed. + * - `on_release` – true only on the frame the button transitions from pressed → released. + */ +class Button { + public: + Button() {} + + /// Update the button state for this frame. + void update(bool state) { + on_press = state ? state != pressed : false; + on_release = state ? false : state != pressed; + pressed = state; + } + + bool pressed = false; ///< Currently held down. + bool on_press = false; ///< Rising edge this frame. + bool on_release = false; ///< Falling edge this frame. +}; + +/** + * @class Gamepad + * @brief InputInterface implementation for the Unitree wireless gamepad. + * + * Reads raw joystick packets via `gamepad_data` (populated externally by + * InterfaceManager::UpdateGamepadRemoteData) and translates button presses / + * stick deflections into per-frame action flags. + * + * Supports two modes: + * - Reference-motion mode (default): L1/R1 cycle motions, A plays, B restarts. + * - Planner mode (toggled by F1): sticks control direction / facing, + * L1/R1 change locomotion mode, L2/R2 adjust speed/height. + */ +class Gamepad : public InputInterface { + public: + /// Compile-time toggle for debug log output. Set to false and rebuild to suppress. + static constexpr bool DEBUG_LOGGING = false; + + // ------------------------------------------------------------------ + // Per-frame action flags (reset at the start of every update() call) + // ------------------------------------------------------------------ + bool motion_prev = false; ///< Switch to previous pre-loaded motion. + bool motion_next = false; ///< Switch to next pre-loaded motion. + bool play_motion = false; ///< Start / resume motion playback. + bool motion_restart = false; ///< Reset current motion to frame 0 (paused). + + bool start_control = false; ///< Request control-system start. + bool stop_control = false; ///< Request emergency stop. + + bool delta_left = false; ///< Nudge heading left (+0.1 rad). + bool delta_right = false; ///< Nudge heading right (−0.1 rad). + + bool reinitialize = false; ///< Recapture the IMU base quaternion. + + bool use_planner = false; ///< True when planner mode is active (toggle via F1). + + // ------------------------------------------------------------------ + // Planner-mode state (persists across frames) + // ------------------------------------------------------------------ + int planner_use_movement_mode = 1; ///< Locomotion mode index (1=slow walk, 2=walk, 3=run, …). + double planner_use_movement_speed = -1; ///< Desired speed (−1 = mode default). + double planner_use_height = -1; ///< Desired body height (−1 = mode default). + bool planner_emergency_stop = false; ///< Immediate halt flag (B button in planner mode). + double planner_facing_angle = 0.0; ///< Accumulated facing angle from right stick (radians). + double planner_moving_direction = 0.0; ///< Current movement direction from left stick (radians). + + /// Raw wireless-remote data buffer. Written externally (e.g. by InterfaceManager). + REMOTE_DATA_RX gamepad_data; + + explicit Gamepad() : InputInterface() { + type_ = InputType::GAMEPAD; + } + + /* + * Gamepad Button Mappings: + * + * Common (both modes): + * - A Button - Play motion + * - X/Y Buttons - Reinitialize base quaternion and delta heading + * - Start Button - Start control + * - Select Button - Emergency Stop (kills all motion) + * - F1 Button - Toggle planner on/off + * - D-pad L/R - Delta heading left/right (+/-0.1 rad) + * + * Non-Planner Mode: + * - B Button - Restart current motion and pause (emergency stop) + * - L1/R1 Buttons - Previous/Next motion + * + * Planner Mode: + * - B Button - Emergency stop + * - L1/R1 Buttons - Change movement mode (0-4: idle, slow walk, walk, run, boxing) + * - L2/R2 Buttons - Decrease/Increase movement speed + * - Left Stick - Movement direction (lx, ly) + * - Right Stick - Facing direction (rx, ry) + */ + + // Flag to trigger safety reset in handle_input + bool trigger_safety_reset = false; + + // Override the update function from InputInterface + void update() override { + // Check for safety reset trigger from manager + if (CheckAndClearSafetyReset()) { + use_planner = false; + trigger_safety_reset = true; + std::cout << "[Gamepad] Safety reset triggered: will disable planner and return to reference motion" << std::endl; + } + + // Reset input flags each frame + start_control = false; + stop_control = false; + motion_prev = false; + motion_next = false; + play_motion = false; + motion_restart = false; + delta_left = false; + delta_right = false; + reinitialize = false; + planner_emergency_stop = false; + + // Process gamepad input and set flags based on current button states + update_gamepad_data(gamepad_data.RF_RX); + + // Debug: Log analog stick values if they're above dead zone + if constexpr (DEBUG_LOGGING) { + if (std::abs(lx) > dead_zone || std::abs(ly) > dead_zone) { + std::cout << "[GAMEPAD DEBUG] Left stick: lx=" << lx << ", ly=" << ly << std::endl; + } + if (std::abs(rx) > dead_zone || std::abs(ry) > dead_zone) { + std::cout << "[GAMEPAD DEBUG] Right stick: rx=" << rx << ", ry=" << ry << std::endl; + } + } + + // Button mappings: + + if (!use_planner) { + // Y - Reinitialize + if (Y.on_press || X.on_press) { + reinitialize = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] X/Y pressed - Reinitialize" << std::endl; + } + } + // B - Reset motion + if (B.on_press) { + motion_restart = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] B pressed - Motion restart" << std::endl; + } + } + // A - Play/Pause motion + if (A.on_press) { + play_motion = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] A pressed - Play/Pause motion" << std::endl; + } + } + // L1/R1 -Motion prev/next + if (L1.on_press) { + motion_prev = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] L1 pressed - Previous motion" << std::endl; + } + } + if (R1.on_press) { + motion_next = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] R1 pressed - Next motion" << std::endl; + } + } + } + else { + // Y - Reinitialize + if (Y.on_press || X.on_press) { + reinitialize = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] X/Y pressed - Reinitialize" << std::endl; + } + } + // A - Play/Pause motion + if (A.on_press) { + play_motion = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] A pressed - Play/Pause motion" << std::endl; + } + } + // B - Reset motion + if (B.on_press) { + planner_emergency_stop = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] B pressed - Planner emergency stop" << std::endl; + } + } + // L1/R1 - change movement mode + if (L1.on_press) { + planner_use_movement_mode -= 1; + if (planner_use_movement_mode < 0) { planner_use_movement_mode = 6; } + // If movement mode is 6, i.e. switch from idle to kneel, set height to 0.8 + if (planner_use_movement_mode == 6) { planner_use_height = 0.8;} + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] L1 pressed - Movement mode changed to: " << planner_use_movement_mode << std::endl; + } + } + if (R1.on_press) { + planner_use_movement_mode += 1; + if (planner_use_movement_mode > 6) { planner_use_movement_mode = 0; } + // If movement mode is 4, i.e. switch from run to squat, set height to 0.8 + if (planner_use_movement_mode == 4) { planner_use_height = 0.8;} + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] R1 pressed - Movement mode changed to: " << planner_use_movement_mode << std::endl; + } + } + // L2/R2 - change movement speed + if (R2.pressed) { + if (planner_use_movement_mode < 4) { + planner_use_movement_speed += 0.02; + if constexpr (DEBUG_LOGGING) { + if (R2.pressed) std::cout << "[GAMEPAD DEBUG] R2 pressed - Speed increasing" << "Current speed: " << planner_use_movement_speed << std::endl; + } + } else { + planner_use_height += 0.02; + if constexpr (DEBUG_LOGGING) { + if (R2.pressed) std::cout << "[GAMEPAD DEBUG] R2 pressed - Height increasing" << "Current height: " << planner_use_height << std::endl; + } + } + + } + if (L2.pressed) { + if (planner_use_movement_mode < 4) { + planner_use_movement_speed -= 0.02; + if constexpr (DEBUG_LOGGING) { + if (L2.pressed) std::cout << "[GAMEPAD DEBUG] L2 pressed - Speed decreasing" << "Current speed: " << planner_use_movement_speed << std::endl; + } + } else { + planner_use_height -= 0.02; + if constexpr (DEBUG_LOGGING) { + if (L2.pressed) std::cout << "[GAMEPAD DEBUG] L2 pressed - Height decreasing" << "Current height: " << planner_use_height << std::endl; + } + } + + } + // Limit movement speed and height to the range of the movement mode + switch (planner_use_movement_mode) { + case 0: + planner_use_movement_speed = -1.0; + planner_use_height = -1.0; + break; + case 1: // slow walk: 0.1 - 0.8 + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.2); + planner_use_movement_speed = std::min(planner_use_movement_speed, 0.8); + planner_use_height = -1.0; + break; + case 2: // walk: 0.8 - 2.5 + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.8); + planner_use_movement_speed = std::min(planner_use_movement_speed, 1.5); + planner_use_height = -1.0; + break; + case 3: // run: 2.5 - 7.5 + planner_use_movement_speed = std::max(planner_use_movement_speed, 1.5); + planner_use_movement_speed = std::min(planner_use_movement_speed, 3.0); + planner_use_height = -1.0; + break; + case 4: // squat: + planner_use_movement_speed = -1.0; + planner_use_height = std::max(planner_use_height, 0.1); + planner_use_height = std::min(planner_use_height, 0.8); + break; + case 5: // kneel two legs: + planner_use_movement_speed = -1.0; + planner_use_height = std::max(planner_use_height, 0.1); + planner_use_height = std::min(planner_use_height, 0.8); + break; + case 6: // kneel: + planner_use_movement_speed = -1.0; + planner_use_height = std::max(planner_use_height, 0.1); + planner_use_height = std::min(planner_use_height, 0.8); + break; + } + // Analog sticks - change movement and facing direction (with dead zone) + + if (std::abs(rx) > dead_zone || std::abs(ry) > dead_zone) { + planner_facing_angle = planner_facing_angle - 0.02 * rx; + if constexpr (DEBUG_LOGGING) { + { + std::cout << "[GAMEPAD DEBUG] Right stick - Facing angle: " << planner_facing_angle << " rad (" + << (planner_facing_angle * 180.0 / M_PI) << " deg)" << std::endl; + } + } + } + + if (std::abs(lx) > dead_zone || std::abs(ly) > dead_zone) { + planner_moving_direction = atan2(ly, lx) - M_PI/2 + planner_facing_angle; + if constexpr (DEBUG_LOGGING) { + { + std::cout << "[GAMEPAD DEBUG] Left stick - Moving direction: " << planner_moving_direction << " rad (" + << (planner_moving_direction * 180.0 / M_PI) << " deg)" << std::endl; + } + } + } + + // Log speed changes after limit processing + if constexpr (DEBUG_LOGGING) { + static double prev_speed = planner_use_movement_speed; + if (std::abs(planner_use_movement_speed - prev_speed) > 0.01) { + std::cout << "[GAMEPAD DEBUG] Movement speed: " << planner_use_movement_speed << std::endl; + prev_speed = planner_use_movement_speed; + } + } + } + + + // F1 - Toggle planner + if (F1.on_press) { + use_planner = !use_planner; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] F1 pressed - Planner toggled to: " << (use_planner ? "ON" : "OFF") << std::endl; + } + } + + // start - Start control + if (start.on_press) { + start_control = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] Start pressed - Start control" << std::endl; + } + } + // select - Emergency stop + if (select.on_press) { + stop_control = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] Select pressed - Emergency Stop" << std::endl; + } + } + // left/right - Delta heading left/right + if (left.on_press) { + delta_left = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] D-pad Left pressed - Delta heading left" << std::endl; + } + } + if (right.on_press) { + delta_right = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GAMEPAD DEBUG] D-pad Right pressed - Delta heading right" << std::endl; + } + } + } + + /** + * @brief Decode raw joystick packet into smoothed analog values and Button states. + * + * Analog values are smoothed with an exponential moving average (controlled + * by `smooth`) and dead-zone filtered. Each Button is updated with edge + * detection so callers can distinguish press / release / held. + */ + void update_gamepad_data(xRockerBtnDataStruct& key_data) { + lx = lx * (1 - smooth) + (std::fabs(key_data.lx) < dead_zone ? 0.0 : key_data.lx) * smooth; + rx = rx * (1 - smooth) + (std::fabs(key_data.rx) < dead_zone ? 0.0 : key_data.rx) * smooth; + ry = ry * (1 - smooth) + (std::fabs(key_data.ry) < dead_zone ? 0.0 : key_data.ry) * smooth; + l2 = l2 * (1 - smooth) + (std::fabs(key_data.L2) < dead_zone ? 0.0 : key_data.L2) * smooth; + ly = ly * (1 - smooth) + (std::fabs(key_data.ly) < dead_zone ? 0.0 : key_data.ly) * smooth; + + R1.update(key_data.btn.components.R1); + L1.update(key_data.btn.components.L1); + start.update(key_data.btn.components.start); + select.update(key_data.btn.components.select); + R2.update(key_data.btn.components.R2); + L2.update(key_data.btn.components.L2); + F1.update(key_data.btn.components.F1); + F2.update(key_data.btn.components.F2); + A.update(key_data.btn.components.A); + B.update(key_data.btn.components.B); + X.update(key_data.btn.components.X); + Y.update(key_data.btn.components.Y); + up.update(key_data.btn.components.up); + right.update(key_data.btn.components.right); + down.update(key_data.btn.components.down); + left.update(key_data.btn.components.left); + } + + // Override the handle_input function from InputInterface + // This processes the gamepad input flags and performs actions using the provided parameters + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + + + // Handle safety reset from interface manager + if (trigger_safety_reset) { + trigger_safety_reset = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + auto temp_motion = std::make_shared(*current_motion); + temp_motion->name = "temporary_motion"; + current_motion = temp_motion; + if (has_planner && planner_state.enabled) { + planner_state.enabled = false; + planner_state.initialized = false; + std::cout << "Safety reset: Planner disabled" << std::endl; + } + } + std::cout << "Safety reset: Returned to reference motion at frame 0" << std::endl; + } + + // Handle motion control commands + if (this->motion_prev && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = + (motion_reader.current_motion_index_ - 1 + motion_reader.motions.size()) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + std::cout << "Switched to motion " << motion_reader.current_motion_index_ << ": " << motion_name + << " (paused at frame 0)" << std::endl; + } + + if (this->motion_next && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = (motion_reader.current_motion_index_ + 1) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + std::cout << "Switched to motion " << motion_reader.current_motion_index_ << ": " << motion_name + << " (paused at frame 0)" << std::endl; + } + + if (this->play_motion) { + if (!operator_state.play) { + int frame_copy; + size_t timesteps_copy; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + frame_copy = current_frame; + timesteps_copy = current_motion ? current_motion->timesteps : 0; + } + std::cout << "Playing motion " << motion_reader.current_motion_index_ << " from frame " << frame_copy << " to end (" + << timesteps_copy << " total frames)" << std::endl; + } + } + + if (this->motion_restart) { + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_frame = 0; + reinitialize_heading = true; + } + std::cout << "Reset motion " << motion_reader.current_motion_index_ << " to frame 0 (paused)" << std::endl; + } + + if (this->stop_control) { operator_state.stop = true; } + + if (this->start_control) { operator_state.start = true; } + + // Handle delta heading controls + if (this->delta_left) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading + 0.1; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading left: " << new_delta << " rad" << std::endl; + } + + if (this->delta_right) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading - 0.1; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading right: " << new_delta << " rad" << std::endl; + } + + // Handle reinitialize command + if (this->reinitialize) { + std::lock_guard lock(current_motion_mutex); + reinitialize_heading = true; + } + + // Handle planner control - copy the toggle state from gamepad + if (this->use_planner && !has_planner) { + std::cout << "Planner not loaded - cannot enable" << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } else if (has_planner && planner_state.enabled != this->use_planner) { + planner_state.enabled = this->use_planner; + if (planner_state.enabled) { + std::cout << "Planner enabled" << std::endl; + planner_facing_angle = 0.0; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + } + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[Gamepad] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[Gamepad] Planner initialization timeout after 5 seconds" << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + break; + } + std::cout << "[Gamepad] Waiting for planner to be initialized" << std::endl; + } + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cout << "[Gamepad] Planner failed to initialize." << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } else { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } else { + std::cout << "Planner disabled" << std::endl; + planner_state.initialized = false; // Reset planner initialization when disabled + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } + } + + if (has_planner && planner_state.enabled && planner_state.initialized) { + + // Set final movement values based on momentum + int final_mode = this->planner_use_movement_mode; + std::array final_movement = {double(cos(planner_moving_direction)), double(sin(planner_moving_direction)), 0.0}; + std::array final_facing_direction = {double(cos(planner_facing_angle)), double(sin(planner_facing_angle)), 0.0}; + double final_speed = this->planner_use_movement_speed; + double final_height = this->planner_use_height; + + // If left sticks are in the dead zone, idle mode + if (std::abs(lx) < dead_zone && std::abs(ly) < dead_zone) { + if constexpr (DEBUG_LOGGING) { + std::cout << "Both left sticks in the dead zone - Idle mode" << std::endl; + std::cout << "[GAMEPAD DEBUG] Left stick: lx=" << lx << ", ly=" << ly << std::endl; + } + if (is_standing_motion_mode(LocomotionMode(final_mode))) { + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + } else { + final_mode = final_mode; + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = 0; + final_height = final_height; + } + } + + // Handle emergency stop (immediate momentum reset) + if (this->planner_emergency_stop) { + planner_use_movement_mode = static_cast(LocomotionMode::IDLE); + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + if constexpr (DEBUG_LOGGING) { + std::cout << "Emergency Stop! Movement momentum reset." << std::endl; + } + } + + // Debug: Log final computed values being sent to planner + if constexpr (DEBUG_LOGGING) { + static int debug_counter = 0; + debug_counter++; + if (debug_counter % 50 == 0) { // Log every 50 calls to avoid spam + std::cout << "[GAMEPAD DEBUG] Final planner values:" << std::endl; + std::cout << " Mode: " << final_mode << " (0=idle, 1=slow, 2=walk, 3=run, 4=box)" << std::endl; + std::cout << " Speed: " << final_speed << std::endl; + std::cout << " Height: " << final_height << std::endl; + std::cout << " Movement direction: [" << final_movement[0] << ", " << final_movement[1] << ", " << final_movement[2] << "]" << std::endl; + std::cout << " Facing direction: [" << final_facing_direction[0] << ", " << final_facing_direction[1] << ", " << final_facing_direction[2] << "]" << std::endl; + } + } + + // Update thread-safe buffer (single source of truth for planner thread) + MovementState mode_state(final_mode, final_movement, final_facing_direction, final_speed, final_height); + movement_state_buffer.SetData(mode_state); + } + + } + + // ------------------------------------------------------------------ + // Smoothed analog-stick values (exponential moving average) + // ------------------------------------------------------------------ + float lx = 0.f; ///< Left stick horizontal (smoothed, dead-zone filtered) + float rx = 0.f; ///< Right stick horizontal (smoothed) + float ry = 0.f; ///< Right stick vertical (smoothed) + float l2 = 0.f; ///< Left trigger analog (smoothed) + float ly = 0.f; ///< Left stick vertical (smoothed) + + float smooth = 0.3f; ///< EMA smoothing factor (0 = no update, 1 = no smoothing). + float dead_zone = 0.05f; ///< Analog values below this are zeroed. + + // ------------------------------------------------------------------ + // Edge-detecting button states + // ------------------------------------------------------------------ + Button R1; ///< Right bumper + Button L1; ///< Left bumper + Button start; ///< Start button + Button select; ///< Select / back button + Button R2; ///< Right trigger (digital) + Button L2; ///< Left trigger (digital) + Button F1; ///< Function 1 (planner toggle) + Button F2; ///< Function 2 + Button A; ///< A face button (play motion / play in planner) + Button B; ///< B face button (restart / emergency stop in planner) + Button X; ///< X face button (reinitialize) + Button Y; ///< Y face button (reinitialize) + Button up; ///< D-pad up + Button right; ///< D-pad right (delta heading) + Button down; ///< D-pad down + Button left; ///< D-pad left (delta heading) +}; +} // namespace unitree::common + +#endif \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c846240a7e52c7d6538f43f27a765c2738f781b8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp @@ -0,0 +1,1078 @@ +/** + * @file gamepad_manager.hpp + * @brief Planner-centric gamepad manager with ZMQ delegate and D-pad motion-set selection. + * + * GamepadManager is a specialised InputInterface that: + * - Reads the Unitree wireless gamepad **directly** (no nested Gamepad class). + * - Operates **exclusively in planner mode** – the planner must always be loaded. + * - Can delegate to ZMQEndpointInterface via F1 button toggle. + * - D-pad selects one of 4 motion sets; face buttons cycle within the set. + * - Boxing set uses direct key selection instead of cycling. + * + * ## Gamepad Button Mapping (Planner Mode) + * + * Button | Action + * --------|------- + * Start | Start control (enable planner, wait for init, auto-play) + * Select | Emergency stop + * A | Emergency stop (immediate halt) + * D-Up | Select Standing motion set (SLOW_WALK default) + * D-Down | Select Squat/Crawl motion set (IDEL_SQUAT default) + * D-Left | Select Boxing motion set (IDEL_BOXING default) + * D-Right | Select Styled Walking motion set (LEDGE_WALKING default) + * F1 | Toggle ZMQ streaming + * + * --- Standing / Squat / Styled sets (loop cycling) --- + * X | Next mode in current set (wraps) + * Y | Previous mode in current set (wraps) + * B | Reset to set's default mode + * L1/R1 | Facing angle ±π/4 + * L2/R2 | Height ±0.1 (Squat set only; disabled otherwise) + * + * --- Boxing set (direct selection) --- + * X | WALK_BOXING + * Y | RANDOM_PUNCH + * B | IDEL_BOXING (reset) + * L1 | LEFT_PUNCH + * R1 | RIGHT_PUNCH + * L2 | LEFT_HOOK + * R2 | RIGHT_HOOK + * + * L stick | Movement direction (binned to nearest 30° increment) + * R stick | Facing direction (continuous) + */ + +#ifndef GAMEPAD_MANAGER_HPP +#define GAMEPAD_MANAGER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "input_interface.hpp" +#include "zmq_endpoint_interface.hpp" +#include "gamepad.hpp" +#include "../localmotion_kplanner.hpp" // For LocomotionMode enum + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +/** + * @class GamepadManager + * @brief Planner-only gamepad controller with ZMQ delegate and D-pad motion-set selection. + * + * When in GAMEPAD mode, button presses and stick positions are translated + * directly into MovementState commands for the locomotion planner. + * D-pad selects one of 4 motion sets; face buttons cycle within the set + * (except Boxing which uses direct key selection). + * When in ZMQ mode (toggled via F1), all calls are forwarded to ZMQ. + */ +class GamepadManager : public InputInterface { + public: + // ======================================== + // DEBUG CONTROL FLAG + // ======================================== + static constexpr bool DEBUG_LOGGING = true; + + enum class ManagedType { + GAMEPAD = 0, + ZMQ = 1 + }; + + GamepadManager( + const std::string& zmq_host, + int zmq_port, + const std::string& zmq_topic, + bool zmq_conflate, + bool zmq_verbose + ) : InputInterface(), zmq_host_(zmq_host), zmq_port_(zmq_port), zmq_topic_(zmq_topic), + zmq_conflate_(zmq_conflate), zmq_verbose_(zmq_verbose) { + type_ = InputType::GAMEPAD; // Default to gamepad mode + buildInterfaces(); + active_ = ManagedType::GAMEPAD; + current_ = nullptr; // Gamepad mode doesn't use delegate + + // Initialize with Standing motion set, SLOW_WALK as default + motion_set_index_ = 0; + current_motion_set_ = get_motion_set(motion_set_index_); + mode_index_in_set_ = 0; + applyModeFromSet(); + } + + void update() override { + // Reset per-frame flags + emergency_stop_ = false; + report_temperature_flag_ = false; + start_control_ = false; + stop_control_ = false; + reinitialize_ = false; + planner_emergency_stop_ = false; + + // Handle stdin shortcuts for switching and emergency stop + char ch; + while (ReadStdinChar(ch)) { + bool is_manager_key = false; + switch (ch) { + case '@': + SetActiveInterface(ManagedType::GAMEPAD); + is_manager_key = true; + break; + case '#': + SetActiveInterface(ManagedType::ZMQ); + is_manager_key = true; + break; + case 'o': + case 'O': + emergency_stop_ = true; + is_manager_key = true; + std::cout << "[GamepadManager] EMERGENCY STOP triggered (O/o key pressed)" << std::endl; + break; + case 'f': + case 'F': + report_temperature_flag_ = true; + is_manager_key = true; + break; + } + + if (!is_manager_key && current_) { + current_->PushStdinChar(ch); + } + } + + // Update gamepad data and buttons + update_gamepad_data(gamepad_data_.RF_RX); + + // F1 - Toggle ZMQ streaming + bool trigger_ZMQ_toggle = false; + if (F1_.on_press) { + if (active_ != ManagedType::ZMQ) { + SetActiveInterface(ManagedType::ZMQ); + } + trigger_ZMQ_toggle = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] F1 pressed - ZMQ toggle" << std::endl; + } + } + + // D-pad - Motion set selection (switches back to GAMEPAD if in ZMQ) + if (up_.on_press) { + if (active_ != ManagedType::GAMEPAD) { SetActiveInterface(ManagedType::GAMEPAD); } + selectMotionSet(0); // Standing + } + if (down_.on_press) { + if (active_ != ManagedType::GAMEPAD) { SetActiveInterface(ManagedType::GAMEPAD); } + selectMotionSet(1); // Squat/Crawl + } + if (left_.on_press) { + if (active_ != ManagedType::GAMEPAD) { SetActiveInterface(ManagedType::GAMEPAD); } + selectMotionSet(2); // Boxing + } + if (right_.on_press) { + if (active_ != ManagedType::GAMEPAD) { SetActiveInterface(ManagedType::GAMEPAD); } + selectMotionSet(3); // Styled Walking + } + + // Select - Emergency Stop + if (select_.on_press) { + stop_control_ = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Select pressed - Emergency Stop" << std::endl; + } + } + + // If not in gamepad mode, update the active interface + if (active_ != ManagedType::GAMEPAD && current_) { + current_->update(); + if (trigger_ZMQ_toggle && zmq_) { + zmq_->TriggerZMQToggle(); + } + } else { + processGamepadPlannerControls(); + } + } + + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + // Check if planner is loaded (required for GamepadManager) + if (!has_planner) { + std::cerr << "[GamepadManager ERROR] Planner not loaded - GamepadManager requires planner. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + // NOTE: Encoder mode safety check removed - encoder mode is now a property of the motion + // If a motion has an incompatible encoder mode for gamepad mode, the user should + // switch to a different motion with a compatible encoder mode + + // Global emergency stop + if (emergency_stop_) { + operator_state.stop = true; + } + + // Global temperature report (F key) + if (report_temperature_flag_) { + report_temperature = true; + report_temperature_flag_ = false; + } + + // Handle stop control + if (stop_control_) { operator_state.stop = true; } + + // If in gamepad mode, handle planner-only controls + if (active_ == ManagedType::GAMEPAD) { + handleGamepadPlannerInput(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, heading_state_buffer, + planner_state, movement_state_buffer, current_motion_mutex); + } else { + // Delegate to ZMQ + if (current_) { + current_->handle_input(motion_reader, current_motion, current_frame, operator_state, + reinitialize_heading, heading_state_buffer, has_planner, + planner_state, movement_state_buffer, current_motion_mutex, report_temperature); + } + } + } + + bool HasVR3PointControl() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->HasVR3PointControl(); + } + return has_vr_3point_control_; + } + + bool HasHandJoints() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->HasHandJoints(); + } + return has_hand_joints_; + } + + bool HasExternalTokenState() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->HasExternalTokenState(); + } + return has_external_token_state_; + } + + std::pair> GetVR3PointPosition() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->GetVR3PointPosition(); + } + return InputInterface::GetVR3PointPosition(); + } + + std::pair> GetVR3PointOrientation() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->GetVR3PointOrientation(); + } + return InputInterface::GetVR3PointOrientation(); + } + + std::array GetVR3PointCompliance() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->GetVR3PointCompliance(); + } + return InputInterface::GetVR3PointCompliance(); + } + + std::pair> GetHandPose(bool is_left) const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->GetHandPose(is_left); + } + return InputInterface::GetHandPose(is_left); + } + + std::pair> GetExternalTokenState() const override { + if (active_ != ManagedType::GAMEPAD && current_) { + return current_->GetExternalTokenState(); + } + return InputInterface::GetExternalTokenState(); + } + + // Receive raw wireless remote data for gamepad + void UpdateGamepadRemoteData(const uint8_t* buff, size_t size) { + if (buff == nullptr || size == 0) { return; } + size_t copy_size = std::min(size, sizeof(gamepad_data_.buff)); + std::memcpy(gamepad_data_.buff, buff, copy_size); + } + + void SetActiveInterface(ManagedType t) { + for (size_t i = 0; i < order_.size(); ++i) { + if (order_[i] == t) { + setActiveIndex(static_cast(i)); + return; + } + } + } + + ManagedType GetActiveInterface() const { return active_; } + + private: + void buildInterfaces() { + order_.push_back(ManagedType::GAMEPAD); + + zmq_ = std::make_unique( + zmq_host_, zmq_port_, zmq_topic_, zmq_conflate_, zmq_verbose_ + ); + order_.push_back(ManagedType::ZMQ); + } + + void setActiveIndex(int idx) { + if (order_.empty()) { return; } + if (idx < 0) { idx = static_cast(order_.size()) - 1; } + if (idx >= static_cast(order_.size())) { idx = 0; } + + // Trigger safety reset on all managed interfaces when switching + TriggerSafetyReset(); // Self (for gamepad mode) + if (zmq_) zmq_->TriggerSafetyReset(); + + active_index_ = idx; + active_ = order_[static_cast(active_index_)]; + + switch (active_) { + case ManagedType::GAMEPAD: + current_ = nullptr; // Gamepad mode is handled directly + type_ = InputType::GAMEPAD; + std::cout << "[GamepadManager] Switched to: GAMEPAD (safety reset triggered)" << std::endl; + break; + case ManagedType::ZMQ: + current_ = zmq_.get(); + type_ = InputType::NETWORK; + std::cout << "[GamepadManager] Switched to: ZMQ (safety reset triggered)" << std::endl; + break; + } + } + + // Update gamepad analog and button data + void update_gamepad_data(unitree::common::xRockerBtnDataStruct& key_data) { + lx_ = lx_ * (1 - smooth_) + (std::fabs(key_data.lx) < dead_zone_ ? 0.0f : key_data.lx) * smooth_; + rx_ = rx_ * (1 - smooth_) + (std::fabs(key_data.rx) < dead_zone_ ? 0.0f : key_data.rx) * smooth_; + ry_ = ry_ * (1 - smooth_) + (std::fabs(key_data.ry) < dead_zone_ ? 0.0f : key_data.ry) * smooth_; + l2_ = l2_ * (1 - smooth_) + (std::fabs(key_data.L2) < dead_zone_ ? 0.0f : key_data.L2) * smooth_; + ly_ = ly_ * (1 - smooth_) + (std::fabs(key_data.ly) < dead_zone_ ? 0.0f : key_data.ly) * smooth_; + + R1_.update(key_data.btn.components.R1); + L1_.update(key_data.btn.components.L1); + start_.update(key_data.btn.components.start); + select_.update(key_data.btn.components.select); + R2_.update(key_data.btn.components.R2); + L2_.update(key_data.btn.components.L2); + F1_.update(key_data.btn.components.F1); + F2_.update(key_data.btn.components.F2); + A_.update(key_data.btn.components.A); + B_.update(key_data.btn.components.B); + X_.update(key_data.btn.components.X); + Y_.update(key_data.btn.components.Y); + up_.update(key_data.btn.components.up); + right_.update(key_data.btn.components.right); + down_.update(key_data.btn.components.down); + left_.update(key_data.btn.components.left); + } + + // Select a motion set by index and reset to its default mode + void selectMotionSet(int set_index) { + bool was_crawling = isInCrawlingMode(); + + motion_set_index_ = set_index; + current_motion_set_ = get_motion_set(motion_set_index_); + mode_index_in_set_ = 0; + boxing_revert_time_ = {}; // Clear boxing timer on set switch + + if (was_crawling) { + // Soft exit: crawl → kneel → target (staged) + LocomotionMode target = current_motion_set_[0]; + beginExitCrawlingTransition(target); + } else { + // Clear any pending transition and apply directly + transition_target_mode_ = LocomotionMode::IDLE; + transition_final_mode_ = LocomotionMode::IDLE; + transition_start_time_ = {}; + applyModeFromSet(); + } + + // Boxing set enters with IDEL_BOXING → auto-revert to WALK_BOXING after 1s + if (motion_set_index_ == 2) { + boxing_revert_time_ = std::chrono::steady_clock::now(); + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] D-pad - Motion set " << motion_set_index_ + << ", mode: " << planner_use_movement_mode_ << std::endl; + } + } + + // Apply mode/speed/height from the current mode_index_in_set_ + void applyModeFromSet() { + if (current_motion_set_.empty()) return; + LocomotionMode mode = current_motion_set_[mode_index_in_set_]; + planner_use_movement_mode_ = static_cast(mode); + applySpeedAndHeight(mode); + } + + // Set fixed speed and height for a given mode + void applySpeedAndHeight(LocomotionMode mode) { + switch (mode) { + case LocomotionMode::SLOW_WALK: + planner_use_movement_speed_ = 0.4; + planner_use_height_ = -1.0; + break; + case LocomotionMode::RUN: + planner_use_movement_speed_ = 1.5; + planner_use_height_ = -1.0; + break; + case LocomotionMode::CRAWLING: + planner_use_movement_speed_ = 0.7; + planner_use_height_ = 0.4; + break; + case LocomotionMode::ELBOW_CRAWLING: + planner_use_movement_speed_ = 0.7; + planner_use_height_ = 0.3; + break; + case LocomotionMode::IDEL_SQUAT: + case LocomotionMode::IDEL_KNEEL_TWO_LEGS: + case LocomotionMode::IDEL_KNEEL: + planner_use_movement_speed_ = -1.0; + planner_use_height_ = 0.4; + break; + case LocomotionMode::IDEL_BOXING: + case LocomotionMode::WALK_BOXING: + case LocomotionMode::LEFT_PUNCH: + case LocomotionMode::RIGHT_PUNCH: + case LocomotionMode::RANDOM_PUNCH: + case LocomotionMode::LEFT_HOOK: + case LocomotionMode::RIGHT_HOOK: + planner_use_movement_speed_ = 0.7; + planner_use_height_ = -1.0; + break; + default: + // WALK, styled walking, and other modes use defaults + planner_use_movement_speed_ = -1.0; + planner_use_height_ = -1.0; + break; + } + } + + // Begin a staged crawling transition to target_mode, skipping completed stages + void beginCrawlingTransition(LocomotionMode target_mode) { + LocomotionMode current = static_cast(planner_use_movement_mode_); + + if (target_mode == LocomotionMode::CRAWLING) { + if (current == LocomotionMode::CRAWLING) return; // Already there + if (current == LocomotionMode::IDEL_KNEEL_TWO_LEGS || + current == LocomotionMode::IDEL_KNEEL) { + // Already kneeling, transition directly to crawling after delay + transition_target_mode_ = LocomotionMode::CRAWLING; + transition_start_time_ = std::chrono::steady_clock::now(); + } else { + // Need to kneel first + planner_use_movement_mode_ = static_cast(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + applySpeedAndHeight(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + transition_target_mode_ = LocomotionMode::CRAWLING; + transition_start_time_ = std::chrono::steady_clock::now(); + } + } else if (target_mode == LocomotionMode::ELBOW_CRAWLING) { + if (current == LocomotionMode::ELBOW_CRAWLING) return; // Already there + if (current == LocomotionMode::CRAWLING) { + // Already crawling, transition to elbow crawling after delay + transition_target_mode_ = LocomotionMode::ELBOW_CRAWLING; + transition_start_time_ = std::chrono::steady_clock::now(); + } else if (current == LocomotionMode::IDEL_KNEEL_TWO_LEGS || + current == LocomotionMode::IDEL_KNEEL) { + // Already kneeling, go to crawling first then elbow + transition_target_mode_ = LocomotionMode::CRAWLING; + transition_final_mode_ = LocomotionMode::ELBOW_CRAWLING; + transition_start_time_ = std::chrono::steady_clock::now(); + } else { + // Need to kneel first, then crawl, then elbow + planner_use_movement_mode_ = static_cast(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + applySpeedAndHeight(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + transition_target_mode_ = LocomotionMode::CRAWLING; + transition_final_mode_ = LocomotionMode::ELBOW_CRAWLING; + transition_start_time_ = std::chrono::steady_clock::now(); + } + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Crawling transition started -> target: " + << static_cast(target_mode) << std::endl; + } + } + + // Begin a staged exit from crawling/elbow crawling to target_mode (reverse of enter) + // ELBOW_CRAWLING → (immediate CRAWLING) → (2s) KNEEL → (2s) target + // CRAWLING → (immediate KNEEL) → (2s) target + void beginExitCrawlingTransition(LocomotionMode target_mode) { + LocomotionMode current = static_cast(planner_use_movement_mode_); + + if (current == LocomotionMode::ELBOW_CRAWLING) { + // Step down to CRAWLING immediately, then KNEEL after 2s, then target after 2s + planner_use_movement_mode_ = static_cast(LocomotionMode::CRAWLING); + applySpeedAndHeight(LocomotionMode::CRAWLING); + transition_target_mode_ = LocomotionMode::IDEL_KNEEL_TWO_LEGS; + transition_final_mode_ = target_mode; + transition_start_time_ = std::chrono::steady_clock::now(); + } else if (current == LocomotionMode::CRAWLING) { + // Step down to KNEEL immediately, then target after 2s + planner_use_movement_mode_ = static_cast(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + applySpeedAndHeight(LocomotionMode::IDEL_KNEEL_TWO_LEGS); + transition_target_mode_ = target_mode; + transition_start_time_ = std::chrono::steady_clock::now(); + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Exit crawling transition -> target: " + << static_cast(target_mode) << std::endl; + } + } + + // Check if current mode is crawling or elbow crawling + bool isInCrawlingMode() const { + return planner_use_movement_mode_ == static_cast(LocomotionMode::CRAWLING) || + planner_use_movement_mode_ == static_cast(LocomotionMode::ELBOW_CRAWLING); + } + + // Process timed crawling transitions + void processCrawlingTransitions() { + if (transition_start_time_.time_since_epoch().count() == 0) return; + + auto elapsed = std::chrono::steady_clock::now() - transition_start_time_; + if (elapsed < std::chrono::seconds(2)) return; + + // Time to advance to the next stage + LocomotionMode next = transition_target_mode_; + planner_use_movement_mode_ = static_cast(next); + applySpeedAndHeight(next); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Transition -> " << static_cast(next) << std::endl; + } + + // Check if there's a further stage (elbow crawling after crawling) + if (transition_final_mode_ != LocomotionMode::IDLE && next != transition_final_mode_) { + transition_target_mode_ = transition_final_mode_; + transition_final_mode_ = LocomotionMode::IDLE; + transition_start_time_ = std::chrono::steady_clock::now(); + } else { + // Done + transition_target_mode_ = LocomotionMode::IDLE; + transition_final_mode_ = LocomotionMode::IDLE; + transition_start_time_ = {}; + } + } + + // Process gamepad inputs for planner controls (called from update()) + void processGamepadPlannerControls() { + // Start button + if (start_.on_press) { + start_control_ = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Start pressed" << std::endl; + } + } + + // A - Emergency Stop (always available) + if (A_.on_press) { + planner_emergency_stop_ = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] A pressed - Emergency Stop" << std::endl; + } + } + + // ---- Boxing set: direct key selection (no cycling) ---- + if (motion_set_index_ == 2) { + if (X_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::WALK_BOXING); + applySpeedAndHeight(LocomotionMode::WALK_BOXING); + boxing_revert_time_ = {}; // WALK_BOXING is the default, no revert needed + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] X - WALK_BOXING" << std::endl; } + } + if (Y_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::RANDOM_PUNCH); + applySpeedAndHeight(LocomotionMode::RANDOM_PUNCH); + boxing_revert_time_ = {}; // RANDOM_PUNCH stays until user changes + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] Y - RANDOM_PUNCH" << std::endl; } + } + // B - IDEL_BOXING (auto-reverts to WALK_BOXING after 1s) + if (B_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::IDEL_BOXING); + applySpeedAndHeight(LocomotionMode::IDEL_BOXING); + boxing_revert_time_ = std::chrono::steady_clock::now(); + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] B - IDEL_BOXING (auto-revert 1s)" << std::endl; } + } + // L1/R1/L2/R2 - Punches/hooks (auto-revert to WALK_BOXING after 1s) + if (L1_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::LEFT_PUNCH); + applySpeedAndHeight(LocomotionMode::LEFT_PUNCH); + boxing_revert_time_ = std::chrono::steady_clock::now(); + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] L1 - LEFT_PUNCH (auto-revert 1s)" << std::endl; } + } + if (R1_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::RIGHT_PUNCH); + applySpeedAndHeight(LocomotionMode::RIGHT_PUNCH); + boxing_revert_time_ = std::chrono::steady_clock::now(); + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] R1 - RIGHT_PUNCH (auto-revert 1s)" << std::endl; } + } + if (L2_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::LEFT_HOOK); + applySpeedAndHeight(LocomotionMode::LEFT_HOOK); + boxing_revert_time_ = std::chrono::steady_clock::now(); + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] L2 - LEFT_HOOK (auto-revert 1s)" << std::endl; } + } + if (R2_.on_press) { + planner_use_movement_mode_ = static_cast(LocomotionMode::RIGHT_HOOK); + applySpeedAndHeight(LocomotionMode::RIGHT_HOOK); + boxing_revert_time_ = std::chrono::steady_clock::now(); + if constexpr (DEBUG_LOGGING) { std::cout << "[GamepadManager DEBUG] R2 - RIGHT_HOOK (auto-revert 1s)" << std::endl; } + } + + // Auto-revert to WALK_BOXING after 1s if no new mode key pressed + if (boxing_revert_time_.time_since_epoch().count() != 0) { + auto elapsed = std::chrono::steady_clock::now() - boxing_revert_time_; + if (elapsed > std::chrono::milliseconds(500)) { + planner_use_movement_mode_ = static_cast(LocomotionMode::WALK_BOXING); + applySpeedAndHeight(LocomotionMode::WALK_BOXING); + boxing_revert_time_ = {}; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Boxing auto-revert -> WALK_BOXING" << std::endl; + } + } + } + } else { + // ---- Standing / Squat / Styled sets: loop cycling ---- + if (X_.on_press) { + // Next mode (wraps) + bool was_crawling = isInCrawlingMode(); + mode_index_in_set_ = (mode_index_in_set_ + 1) % static_cast(current_motion_set_.size()); + LocomotionMode target = current_motion_set_[mode_index_in_set_]; + if (target == LocomotionMode::CRAWLING || target == LocomotionMode::ELBOW_CRAWLING) { + beginCrawlingTransition(target); + } else if (was_crawling) { + beginExitCrawlingTransition(target); + } else { + transition_start_time_ = {}; // Cancel any pending transition + transition_target_mode_ = LocomotionMode::IDLE; + transition_final_mode_ = LocomotionMode::IDLE; + applyModeFromSet(); + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] X - Next mode [" << mode_index_in_set_ + << "]: " << planner_use_movement_mode_ << std::endl; + } + } + if (Y_.on_press) { + // Previous mode (wraps) + bool was_crawling = isInCrawlingMode(); + mode_index_in_set_ = (mode_index_in_set_ - 1 + static_cast(current_motion_set_.size())) + % static_cast(current_motion_set_.size()); + LocomotionMode target = current_motion_set_[mode_index_in_set_]; + if (target == LocomotionMode::CRAWLING || target == LocomotionMode::ELBOW_CRAWLING) { + beginCrawlingTransition(target); + } else if (was_crawling) { + beginExitCrawlingTransition(target); + } else { + transition_start_time_ = {}; + transition_target_mode_ = LocomotionMode::IDLE; + transition_final_mode_ = LocomotionMode::IDLE; + applyModeFromSet(); + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Y - Prev mode [" << mode_index_in_set_ + << "]: " << planner_use_movement_mode_ << std::endl; + } + } + if (B_.on_press) { + // Reset to set's default (index 0) + bool was_crawling = isInCrawlingMode(); + mode_index_in_set_ = 0; + LocomotionMode target = current_motion_set_[0]; + if (was_crawling && target != LocomotionMode::CRAWLING && target != LocomotionMode::ELBOW_CRAWLING) { + beginExitCrawlingTransition(target); + } else { + transition_start_time_ = {}; + transition_target_mode_ = LocomotionMode::IDLE; + transition_final_mode_ = LocomotionMode::IDLE; + applyModeFromSet(); + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] B - Reset to default mode: " + << planner_use_movement_mode_ << std::endl; + } + } + + // L1/R1 - Facing angle (not in boxing set) + if (L1_.on_press) { + planner_facing_angle_ += M_PI / 4; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] L1 - Facing angle: " << planner_facing_angle_ << " rad" << std::endl; + } + } + if (R1_.on_press) { + planner_facing_angle_ -= M_PI / 4; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] R1 - Facing angle: " << planner_facing_angle_ << " rad" << std::endl; + } + } + + // L2/R2 - Height control (squat set only) + if (motion_set_index_ == 1) { + if (L2_.on_press) { + planner_use_height_ -= 0.1; + planner_use_height_ = std::max(planner_use_height_, 0.2); + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] L2 - Height: " << planner_use_height_ << std::endl; + } + } + if (R2_.on_press) { + planner_use_height_ += 0.1; + planner_use_height_ = std::min(planner_use_height_, 0.8); + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] R2 - Height: " << planner_use_height_ << std::endl; + } + } + } + } + + // Process timed crawling transitions (kneel → crawl → elbow) + processCrawlingTransitions(); + + // Analog sticks - facing and movement direction + if (std::abs(rx_) > dead_zone_ || std::abs(ry_) > dead_zone_) { + planner_facing_angle_ = planner_facing_angle_ - 0.02 * rx_; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Right stick - Facing angle: " << planner_facing_angle_ << " rad" << std::endl; + } + } + + if (std::abs(lx_) > dead_zone_ || std::abs(ly_) > dead_zone_) { + double raw_angle = atan2(ly_, lx_); + double bin_size = M_PI / 4.0; // 8 directions (45° bins) + double binned_angle = std::round(raw_angle / bin_size) * bin_size; + planner_moving_direction_ = binned_angle - M_PI / 2 + planner_facing_angle_; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Left stick - Raw: " << raw_angle + << ", Binned: " << binned_angle + << ", Moving: " << planner_moving_direction_ << " rad" << std::endl; + } + } + } + + // Handle gamepad planner input (called from handle_input()) + void handleGamepadPlannerInput(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex) { + // Handle safety reset from interface manager + if (CheckAndClearSafetyReset()) { + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + } + if (operator_state.start) { + if (planner_state.enabled && planner_state.initialized) { + // Planner is already on, keep it as is (don't touch initialized flag) + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(0); + } + operator_state.play = true; + } + auto current_facing = movement_state_buffer.GetDataWithTime().data->facing_direction; + planner_facing_angle_ = std::atan2(current_facing[1], current_facing[0]); + std::cout << "[GamepadManager] Safety reset: Planner kept enabled with current state" << std::endl; + } else { + // Planner was disabled, set initial movement state + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), + {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + + // Now enable planner + planner_state.enabled = true; + planner_facing_angle_ = 0.0; + std::cout << "[GamepadManager] Planner enabled" << std::endl; + + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[GamepadManager] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[GamepadManager ERROR] Planner initialization timeout after 5 seconds" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[GamepadManager] Waiting for planner to be initialized" << std::endl; + } + + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[GamepadManager ERROR] Planner failed to initialize. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + // Play motion + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } + } + return; + } + + // Handle control start (Start button) + if (start_control_) { + // Start control + operator_state.start = true; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + // Reinitialize base quaternion and reset delta heading + reinitialize_heading = true; + } + + // Ensure planner is enabled (always required in GamepadManager mode) + if (!planner_state.enabled) { + planner_state.enabled = true; + planner_facing_angle_ = 0.0; + std::cout << "[GamepadManager] Planner enabled" << std::endl; + } + + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[GamepadManager] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[GamepadManager ERROR] Planner initialization timeout after 5 seconds" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[GamepadManager] Waiting for planner to be initialized" << std::endl; + } + + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[GamepadManager ERROR] Planner failed to initialize. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + // Play motion + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } + + // Handle reinitialize command + if (reinitialize_) { + std::lock_guard lock(current_motion_mutex); + reinitialize_heading = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Reinitialized base quaternion and facing angle" << std::endl; + } + } + + // If planner is enabled and initialized, send movement commands + if (planner_state.enabled && planner_state.initialized) { + int final_mode = planner_use_movement_mode_; + std::array final_movement = {double(cos(planner_moving_direction_)), + double(sin(planner_moving_direction_)), 0.0}; + std::array final_facing_direction = {double(cos(planner_facing_angle_)), + double(sin(planner_facing_angle_)), 0.0}; + double final_speed = planner_use_movement_speed_; + double final_height = planner_use_height_; + + // If left sticks in dead zone — idle logic depends on motion set + if (std::abs(lx_) < dead_zone_ && std::abs(ly_) < dead_zone_) { + if (motion_set_index_ == 0) { + // Standing set → go to IDLE + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + } else if (motion_set_index_ == 1) { + // Squat set → stay in mode, zero movement + final_movement = {0.0f, 0.0f, 0.0f}; + LocomotionMode cur = static_cast(planner_use_movement_mode_); + if (cur == LocomotionMode::CRAWLING || cur == LocomotionMode::ELBOW_CRAWLING) { + final_speed = 0.0f; + } else { + final_speed = -1.0f; + } + final_height = planner_use_height_; + } else if (motion_set_index_ == 2) { + // Boxing set → stay in mode, zero movement + final_movement = {0.0f, 0.0f, 0.0f}; + LocomotionMode cur = static_cast(planner_use_movement_mode_); + if (cur == LocomotionMode::LEFT_PUNCH || cur == LocomotionMode::RIGHT_PUNCH || + cur == LocomotionMode::LEFT_HOOK || cur == LocomotionMode::RIGHT_HOOK) { + // Punches use facing direction as movement + final_movement = final_facing_direction; + } + final_speed = 0.0f; + final_height = -1.0f; + } else if (motion_set_index_ == 3) { + // Styled walking → stay in mode, zero movement + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = 0.0f; + final_height = -1.0f; + } + } + + // Emergency stop + if (planner_emergency_stop_) { + if (motion_set_index_ == 0) { + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + } else { + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = 0.0f; + final_height = (motion_set_index_ == 1) ? planner_use_height_ : -1.0f; + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[GamepadManager DEBUG] Emergency stop - movement reset" << std::endl; + } + } + + // Static kneel modes always zero movement + if (planner_use_movement_mode_ == static_cast(LocomotionMode::IDEL_KNEEL_TWO_LEGS) || + planner_use_movement_mode_ == static_cast(LocomotionMode::IDEL_KNEEL) || + planner_use_movement_mode_ == static_cast(LocomotionMode::IDEL_SQUAT)) { + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = 0.0f; + final_height = planner_use_height_; + } + + MovementState mode_state(final_mode, final_movement, final_facing_direction, final_speed, final_height); + movement_state_buffer.SetData(mode_state); + } + } + + private: + // ------------------------------------------------------------------ + // Owned delegate interfaces (gamepad mode is handled inline, not delegated) + // ------------------------------------------------------------------ + std::unique_ptr zmq_; ///< ZMQ streaming handler. + + InputInterface* current_ = nullptr; ///< Non-owning pointer to active delegate (nullptr in gamepad mode). + + // ------------------------------------------------------------------ + // Active-selection bookkeeping + // ------------------------------------------------------------------ + std::vector order_; ///< Insertion-order of available modes. + int active_index_ = 0; ///< Index into order_. + ManagedType active_ = ManagedType::GAMEPAD; ///< Currently-active mode tag. + + // ZMQ configuration (stored for deferred construction) + std::string zmq_host_; + int zmq_port_; + std::string zmq_topic_; + bool zmq_conflate_ = false; + bool zmq_verbose_ = false; + + /// Global emergency-stop flag, set by 'O'/'o' keyboard shortcut. + bool emergency_stop_ = false; + /// Global temperature report flag, set by 'F'/'f' keyboard shortcut. + bool report_temperature_flag_ = false; + + // ------------------------------------------------------------------ + // Per-frame gamepad action flags (reset at the start of update()) + // ------------------------------------------------------------------ + bool start_control_ = false; ///< Start-button pressed this frame. + bool stop_control_ = false; ///< Select-button pressed this frame. + bool reinitialize_ = false; ///< X/Y-button reinitialize heading. + bool planner_emergency_stop_ = false; ///< A-button emergency stop. + + // ------------------------------------------------------------------ + // Gamepad hardware state + // ------------------------------------------------------------------ + unitree::common::REMOTE_DATA_RX gamepad_data_ = unitree::common::REMOTE_DATA_RX(); ///< Raw 40-byte packet. + + // Smoothed analog stick values + float lx_ = 0.0f; ///< Left stick horizontal (smoothed). + float rx_ = 0.0f; ///< Right stick horizontal (smoothed). + float ry_ = 0.0f; ///< Right stick vertical (smoothed). + float l2_ = 0.0f; ///< Left trigger analog (smoothed). + float ly_ = 0.0f; ///< Left stick vertical (smoothed). + float smooth_ = 0.3f; ///< EMA smoothing factor. + float dead_zone_ = 0.05f; ///< Analog dead-zone threshold. + + // Edge-detecting buttons + unitree::common::Button R1_, L1_, start_, select_, R2_, L2_; + unitree::common::Button F1_, F2_, A_, B_, X_, Y_; + unitree::common::Button up_, right_, down_, left_; + + // ------------------------------------------------------------------ + // Motion set state + // ------------------------------------------------------------------ + int motion_set_index_ = 0; ///< Active motion set (0=Standing, 1=Squat, 2=Boxing, 3=Styled). + std::vector current_motion_set_; ///< Modes in the active set. + int mode_index_in_set_ = 0; ///< Current mode index within the set. + + // ------------------------------------------------------------------ + // Planner control state (persists across frames) + // ------------------------------------------------------------------ + int planner_use_movement_mode_ = static_cast(LocomotionMode::SLOW_WALK); ///< Current locomotion mode. + double planner_use_movement_speed_ = 0.4; ///< Desired speed (fixed per mode). + double planner_use_height_ = -1.0; ///< Desired body height (−1 = mode default). + double planner_facing_angle_ = 0.0; ///< Accumulated facing direction (radians). + double planner_moving_direction_ = 0.0; ///< Current movement direction (radians). + + // ------------------------------------------------------------------ + // Staged crawling transition state + // ------------------------------------------------------------------ + /// Target mode for the current transition stage (e.g., CRAWLING after kneeling). + LocomotionMode transition_target_mode_ = LocomotionMode::IDLE; + /// Final mode for multi-stage transitions (e.g., ELBOW_CRAWLING via kneel→crawl→elbow). + LocomotionMode transition_final_mode_ = LocomotionMode::IDLE; + /// Timestamp when the current transition stage began. + std::chrono::time_point transition_start_time_{}; + + // ------------------------------------------------------------------ + // Boxing auto-revert state + // ------------------------------------------------------------------ + /// Timestamp when a punch/hook/idle was triggered; reverts to WALK_BOXING after 1s. + std::chrono::time_point boxing_revert_time_{}; +}; + +#endif // GAMEPAD_MANAGER_HPP + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_command.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_command.hpp new file mode 100644 index 0000000000000000000000000000000000000000..153d77671a83a1bd2449fbdad2be2445a20498d4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_command.hpp @@ -0,0 +1,108 @@ +/** + * @file input_command.hpp + * @brief Lightweight message structs used for inter-component communication + * between ZMQ subscribers and the input managers. + * + * Two message types are defined: + * - CommandMessage – carries high-level control signals (start / stop / + * planner-mode toggle) received on the ZMQ "command" topic. + * - PlannerMessage – carries per-frame locomotion commands (mode, movement + * direction, facing direction, speed, height, and optional + * upper-body / hand data) received on the ZMQ "planner" topic. + * + * Both structs are plain-old-data (POD-like) value types designed to be written + * under a mutex by a background ZMQ thread and read by the main control loop. + */ + +#pragma once + +#include +#include +#include + +#include "../localmotion_kplanner.hpp" // For LocomotionMode enum + +// --------------------------------------------------------------------------- +// CommandMessage +// --------------------------------------------------------------------------- +/** + * @brief Wire format for the ZMQ "command" topic. + * + * Packed binary layout sent by the remote controller: + * { start: bool, stop: bool, planner: bool, delta_heading?: f32/f64 } + * + * Multiple messages between two update() calls are accumulated using OR logic + * for start/stop (so a transient pulse is never lost), while the planner flag + * is overwritten with the latest value. + */ +struct CommandMessage { + bool start = false; ///< When true, request the control system to start. + bool stop = false; ///< When true, request an emergency / graceful stop. + bool planner = false; ///< true → planner mode (use planner topic for locomotion) + ///< false → streamed-motion mode (use pose topic) + /// Optional absolute heading override (radians). When set, the value is + /// written directly into HeadingState.delta_heading. + std::optional delta_heading; + bool valid = false; ///< Set to true once a message has been decoded successfully. +}; + +// --------------------------------------------------------------------------- +// PlannerMessage +// --------------------------------------------------------------------------- +/** + * @brief Wire format for the ZMQ "planner" topic. + * + * Required fields (must be present in every message): + * - mode : int32 – LocomotionMode enum cast (IDLE, WALK, RUN, …) + * - movement : float[3] – desired movement direction unit vector (x, y, z) + * - facing : float[3] – desired facing direction unit vector (x, y, z) + * + * Optional fields (may or may not be present): + * - speed : float – desired locomotion speed (-1.0 = use default) + * - height : float – desired body height (-1.0 = use default) + * - upper_body_position: float[17] – target upper-body joint positions (radians) + * - upper_body_velocity: float[17] – target upper-body joint velocities (rad/s) + * - left_hand_joints : float[7] – Dex3 left-hand joint positions + * - right_hand_joints : float[7] – Dex3 right-hand joint positions + * + * The `timestamp` field is set locally on receipt and used for timeout + * detection (planner messages older than ~1 s are considered stale). + */ +struct PlannerMessage { + bool valid = false; ///< True once this struct contains a successfully decoded message. + + /// Locomotion mode (cast of LocomotionMode enum). Defaults to IDLE. + int mode = static_cast(LocomotionMode::IDLE); + + /// Desired movement direction as a 3D unit vector [x, y, z]. + /// Zeroed when the robot should stand still. + std::array movement = {0.0, 0.0, 0.0}; + + /// Desired facing direction as a 3D unit vector [x, y, z]. + /// Defaults to facing forward along the +X axis. + std::array facing = {1.0, 0.0, 0.0}; + + /// Optional upper-body joint target positions (17 DOF, radians). + /// Present when the remote controller provides whole-body commands. + std::optional> upper_body_position; + + /// Optional upper-body joint target velocities (17 DOF, rad/s). + std::optional> upper_body_velocity; + + /// Optional left-hand Dex3 joint positions (7 DOF). + std::optional> left_hand_joints; + + /// Optional right-hand Dex3 joint positions (7 DOF). + std::optional> right_hand_joints; + + /// Desired locomotion speed. -1.0 means "use the default for the current mode". + double speed = -1.0; + + /// Desired body height. -1.0 means "use the default for the current mode". + double height = -1.0; + + /// Local steady-clock timestamp recorded when the message was received. + /// Used to detect planner timeouts (stale data → fallback to IDLE). + std::chrono::steady_clock::time_point timestamp{}; +}; + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_interface.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_interface.hpp new file mode 100644 index 0000000000000000000000000000000000000000..877a139e7ab23a90407db633acad6f4bbbd0208e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/input_interface.hpp @@ -0,0 +1,505 @@ +/** + * @file input_interface.hpp + * @brief Abstract base class for all input sources that can drive the G1 robot. + * + * InputInterface defines the polymorphic contract that every concrete input + * handler (keyboard, gamepad, ZMQ, ROS2, …) must implement. Two pure-virtual + * methods form the core of the interface: + * + * 1. update() – Poll the hardware / network for new data and latch it + * into internal flags (called once per control-loop tick). + * 2. handle_input() – Translate the latched flags into system-state changes + * (motion switching, planner commands, heading adjustments, + * operator start / stop, etc.). + * + * The base class also provides: + * - Thread-safe DataBuffer members for VR 3-point tracking, upper-body + * joint targets, hand joint targets, and external token state. + * - Shared stdin buffering so the InterfaceManager can pre-read keys and + * dispatch them to the correct active interface. + * - A safety-reset mechanism used by managers when switching active + * interfaces to prevent stale commands from carrying over. + * - Keyboard-controlled compliance and hand-close-ratio helpers that are + * shared across all input modes (g/h/b/v and x/c keys). + * + * @note The class is non-copyable and non-movable by design. Instances are + * always managed via std::unique_ptr by the owning manager. + */ + +#ifndef INPUT_INTERFACE_HPP +#define INPUT_INTERFACE_HPP + +#include +#include +#include +#include +#include +#include "../utils.hpp" // For DataBuffer +#include "../robot_parameters.hpp" // For HeadingState, OperatorState +#include "../motion_data_reader.hpp" // For MotionDataReader, MotionSequence +#include "../math_utils.hpp" // For float_to_double +#include "../localmotion_kplanner.hpp" // For PlannerState, MovementState + +/** + * @class InputInterface + * @brief Abstract base class for all input sources (keyboard, gamepad, ZMQ, ROS2). + * + * Concrete sub-classes must implement update() and handle_input(). + * The base class owns shared state (VR buffers, compliance values, stdin queue) + * that all implementations can use. + */ +class InputInterface { +public: + + /// Identifies the physical / logical source of this input interface. + enum class InputType { + KEYBOARD, ///< Terminal stdin keyboard + GAMEPAD, ///< Unitree wireless gamepad (raw joystick data) + ROS2, ///< ROS 2 topics (msgpack-serialised ControlGoalMsg) + NETWORK, ///< ZMQ packed-message protocol (pose / planner topics) + UNKNOWN ///< Default / uninitialised + }; + + /// Virtual destructor ensures correct cleanup of derived classes. + virtual ~InputInterface() = default; + + // ------------------------------------------------------------------ + // Pure-virtual interface + // ------------------------------------------------------------------ + + /** + * @brief Poll the input source for new data and latch it internally. + * + * Called once per control-loop tick **before** handle_input(). + * Implementations should: + * - Read all available bytes / messages from their source. + * - Update per-frame boolean flags (e.g. start_control, delta_left). + * - NOT modify shared system state – that is done in handle_input(). + */ + virtual void update() = 0; + + /** + * @brief Apply latched input flags to the system state. + * + * Called once per control-loop tick **after** update(). + * + * @param motion_reader Reference to the pre-loaded motion library. + * @param current_motion Currently-active MotionSequence (may be swapped). + * @param current_frame Playback cursor within current_motion. + * @param operator_state High-level operator signals (start/stop/play). + * @param reinitialize_heading Set to true to recapture the IMU heading. + * @param heading_state_buffer Thread-safe heading buffer (delta heading, init quat). + * @param has_planner Whether a locomotion planner is loaded. + * @param planner_state Planner enable / initialise state. + * @param movement_state_buffer Thread-safe buffer for locomotion commands. + * @param current_motion_mutex Guards concurrent access to current_motion/frame. + */ + virtual void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) = 0; + + // ------------------------------------------------------------------ + // Capability queries – overridden by sub-classes as needed + // ------------------------------------------------------------------ + + /// @return The InputType tag for this concrete implementation. + virtual InputType GetType() { + return type_; + } + + /// @return True if this interface provides upper-body joint targets (17 DOF). + virtual bool HasUpperBodyControl() const { + return has_upper_body_control_; + } + + /// @return True if this interface provides VR 3-point tracking data + /// (left wrist, right wrist, head – 9 position + 12 orientation values). + virtual bool HasVR3PointControl() const { + return has_vr_3point_control_; + } + + /// @return True if this interface provides VR 5-point tracking data + /// (3-point + 2 extra trackers – 15 position + 20 orientation values). + virtual bool HasVR5PointControl() const { + return has_vr_5point_control_; + } + + /// @return True if this interface provides Dex3 hand joint targets (7 DOF per hand). + virtual bool HasHandJoints() const { + return has_hand_joints_; + } + + /// @return True if an external token-state vector is available (e.g. from ROS2/ZMQ). + virtual bool HasExternalTokenState() const { + return has_external_token_state_; + } + + /** + * @brief Retrieve the latest external token-state vector (if any). + * @return A pair: {true, vector} if data is available; {false, {}} otherwise. + */ + virtual std::pair> GetExternalTokenState() const { + if (!has_external_token_state_) { + return {false, {}}; + } + auto buffered_data = external_token_state_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {}}; + } + + // ------------------------------------------------------------------ + // VR 3-point tracking data accessors + // Layout: [left_wrist(xyz), right_wrist(xyz), head(xyz)] + // [left_quat(wxyz), right_quat(wxyz), head_quat(wxyz)] + // ------------------------------------------------------------------ + + /// Write new VR 3-point position data into the thread-safe buffer. + virtual void SetVR3PointPosition(const std::array& position) { + vr_3point_position_.SetData(position); + } + + /// Write new VR 3-point orientation data into the thread-safe buffer. + virtual void SetVR3PointOrientation(const std::array& orientation) { + vr_3point_orientation_.SetData(orientation); + } + + /** + * @brief Get the latest VR 3-point position data. + * @return {true, positions} if VR tracking is active and data is available; + * {false, default_positions} otherwise. + * + * Default positions (metres, in body frame): + * left wrist = ( 0.0903, 0.1615, -0.2411) + * right wrist = ( 0.1280, -0.1522, -0.2461) + * head = ( 0.0241, -0.0081, 0.4028) + */ + virtual std::pair> GetVR3PointPosition() const { + if(!has_vr_3point_control_) { + return {false, {0.0903, 0.1615, -0.2411, + 0.1280, -0.1522, -0.2461, + 0.0241, -0.0081, 0.4028}}; + } + auto buffered_data = vr_3point_position_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.0903, 0.1615, -0.2411, + 0.1280, -0.1522, -0.2461, + 0.0241, -0.0081, 0.4028}}; + } + + /** + * @brief Get the latest VR 3-point orientation data (quaternions w,x,y,z). + * @return {true, orientations} if VR tracking is active and data is available; + * {false, default_orientations} otherwise. + */ + virtual std::pair> GetVR3PointOrientation() const { + if(!has_vr_3point_control_) { + return {false, {0.7295, 0.3145, 0.5533, -0.2506, + 0.7320, -0.2639, 0.5395, 0.3217, + 0.9991, 0.011, 0.0402, -0.0002}}; + } + auto buffered_data = vr_3point_orientation_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.7295, 0.3145, 0.5533, -0.2506, + 0.7320, -0.2639, 0.5395, 0.3217, + 0.9991, 0.011, 0.0402, -0.0002}}; + } + + /** + * @brief Get VR 3-point compliance values (keyboard-controlled). + * + * Compliance is always controlled via keyboard (g/h keys for left, b/v for right) + * and is intentionally **not** overwritten by external sources (ROS2 / ZMQ). + * @return [left_arm_compliance, right_arm_compliance, head_compliance] in [0, 0.5]. + */ + virtual std::array GetVR3PointCompliance() const { + auto buffered_data = vr_3point_compliance_.GetDataWithTime(); + if (buffered_data.data) { + return *buffered_data.data; + } + return {0.5, 0.5, 0.0}; + } + + /// Set initial VR 3-point compliance values (called at startup from command-line args). + virtual void SetVR3PointCompliance(const std::array& compliance) { + vr_3point_compliance_.SetData(compliance); + } + + /// Adjust left-arm (index 0) compliance by @p delta, clamped to [0.0, 0.5]. + /// Only takes effect if the active policy observes 'vr_3point_compliance'. + virtual void AdjustLeftHandCompliance(double delta) { + auto compliance = GetVR3PointCompliance(); + compliance[0] = std::clamp(compliance[0] + delta, 0.0, 0.5); + SetVR3PointCompliance(compliance); + std::cout << "[Compliance] Left hand: " << GetVR3PointCompliance()[0] << std::endl; + } + + /// Adjust right-arm (index 1) compliance by @p delta, clamped to [0.0, 0.5]. + /// Only takes effect if the active policy observes 'vr_3point_compliance'. + virtual void AdjustRightHandCompliance(double delta) { + auto compliance = GetVR3PointCompliance(); + compliance[1] = std::clamp(compliance[1] + delta, 0.0, 0.5); + SetVR3PointCompliance(compliance); + std::cout << "[Compliance] Right hand: " << GetVR3PointCompliance()[1] << std::endl; + } + + // ========================================================================= + // Hand max close ratio control (keyboard-controlled via X/C keys) + // Controls how much the Dex3 hands can close (0.2 = 80% open, 1.0 = fully closed) + // ========================================================================= + + // Get the current max close ratio (keyboard-controlled) + virtual double GetMaxCloseRatio() const { + return max_close_ratio_; + } + + // Set initial max close ratio (from command line or initialization) + virtual void SetMaxCloseRatio(double ratio) { + max_close_ratio_.store(std::clamp(ratio, 0.2, 1.0), std::memory_order_relaxed); + } + + // Adjust max close ratio by delta (X = +0.1, C = -0.1), clipped to [0.2, 1.0] + virtual void AdjustMaxCloseRatio(double delta) { + double new_val = std::clamp(max_close_ratio_.load(std::memory_order_relaxed) + delta, 0.2, 1.0); + max_close_ratio_.store(new_val, std::memory_order_relaxed); + std::cout << "[InputInterface] Max close ratio adjusted to: " << new_val + << " (range: 0.2-1.0, higher = more closed)" << std::endl; + } + + // ------------------------------------------------------------------ + // VR 5-point tracking (3-point + 2 extra body trackers) + // Layout: [left_wrist, right_wrist, head, tracker1, tracker2] × xyz + // ------------------------------------------------------------------ + + /** + * @brief Get VR 5-point position data (15 doubles). + * @return {true, positions} if 5-point tracking is active; {false, defaults} otherwise. + */ + virtual std::pair> GetVR5PointPosition() const { + if(!has_vr_5point_control_) { + return {false, {0.0903, 0.1615, -0.2411, + 0.1280, -0.1522, -0.2461, + 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0}}; + } + auto buffered_data = vr_5point_position_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.0903, 0.1615, -0.2411, + 0.1280, -0.1522, -0.2461, + 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0}}; + } + + /// @brief Get VR 5-point orientation data (20 doubles = 5 quaternions × wxyz). + virtual std::pair> GetVR5PointOrientation() const { + if(!has_vr_5point_control_) { + return {false, {0.7295, 0.3145, 0.5533, -0.2506, + 0.7320, -0.2639, 0.5395, 0.3217, + 0.9991, 0.011, 0.0402, -0.0002, + 1.0, 0.0, 0.0, 0.0, + 1.0, 0.0, 0.0, 0.0}}; + } + auto buffered_data = vr_5point_orientation_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.7295, 0.3145, 0.5533, -0.2506, + 0.7320, -0.2639, 0.5395, 0.3217, + 0.9991, 0.011, 0.0402, -0.0002, + 1.0, 0.0, 0.0, 0.0, + 1.0, 0.0, 0.0, 0.0}}; + } + + // ------------------------------------------------------------------ + // Hand / upper-body joint accessors + // ------------------------------------------------------------------ + + /** + * @brief Get 7-DOF Dex3 hand joint positions. + * @param is_left true → left hand, false → right hand. + * @return {true, joints} if hand joint data is available; {false, defaults} otherwise. + * Default left = {0, 0, 1.75, -1.57, -1.75, -1.57, -1.75} + * Default right = {0, 0, -1.75, 1.57, 1.75, 1.57, 1.75} + */ + virtual std::pair> GetHandPose(bool is_left) const { + if(!has_hand_joints_) { + if(is_left) { + return {false, {0, 0, 1.75, -1.57, -1.75, -1.57, -1.75 }}; + } else { + return {false, {0, 0, -1.75, 1.57, 1.75, 1.57, 1.75 }}; + } + } + if(is_left) { + auto buffered_data = left_hand_joint_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + else { + return {false, {0, 0, 1.75, -1.57, -1.75, -1.57, -1.75 }}; + } + } else { + auto buffered_data = right_hand_joint_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } else { + return {false, {0, 0, -1.75, 1.57, 1.75, 1.57, 1.75 }}; + } + } + } + + /// @brief Get upper-body joint target positions (17 DOF, radians). + /// @return {true, positions} if upper-body data is available; {false, zeros} otherwise. + virtual std::pair> GetUpperBodyJointPositions() const { + if(!has_upper_body_control_) { + return {false, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; + } + auto buffered_data = upper_body_joint_positions_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; + } + + /// @brief Get upper-body joint target velocities (17 DOF, rad/s). + /// @return {true, velocities} if upper-body data is available; {false, zeros} otherwise. + virtual std::pair> GetUpperBodyJointVelocities() const { + if(!has_upper_body_control_) { + return {false, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; + } + auto buffered_data = upper_body_joint_velocities_.GetDataWithTime(); + if (buffered_data.data) { + return {true, *buffered_data.data}; + } + return {false, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; + } + + /// @brief Get the last update time of the input interface. + virtual std::optional GetLastUpdateTime() const { + // Return empty optional as a default, implementers should override this if they have a timestamp + return {}; + } + + // ------------------------------------------------------------------ + // Shared stdin buffering + // ------------------------------------------------------------------ + /** + * @brief Read one character, trying the manager-pushed buffer first, then raw stdin. + * + * When an InterfaceManager is active, it pre-reads stdin and dispatches + * keys: manager-level shortcuts are consumed, everything else is queued + * via PushStdinChar() for the active interface to read later. + * + * @param[out] ch The character that was read. + * @return True if a character was available, false otherwise. + */ + bool ReadStdinChar(char& ch) { + // First check if we have buffered keys from manager + if (!stdin_buffer_.empty()) { + ch = stdin_buffer_.front(); + stdin_buffer_.pop(); + return true; + } + // Otherwise read directly from stdin (non-blocking) + return read(STDIN_FILENO, &ch, 1) > 0; + } + + /// Queue a key into this interface's stdin buffer (used by managers). + void PushStdinChar(char ch) { + stdin_buffer_.push(ch); + } + + // ------------------------------------------------------------------ + // Safety-reset mechanism (used when switching active interfaces) + // ------------------------------------------------------------------ + + /// Flag that tells the interface to abandon its current mode and return + /// to a safe default (disable planner, stop streaming, etc.). + std::atomic reset_to_safe_state_{false}; + + /// Called by the manager to request a safety reset on this interface. + void TriggerSafetyReset() { + reset_to_safe_state_.store(true, std::memory_order_release); + } + + /// Atomically check and clear the safety-reset flag. + /// @return True if a reset was requested since the last call. + bool CheckAndClearSafetyReset() { + return reset_to_safe_state_.exchange(false, std::memory_order_acq_rel); + } + +protected: + /// Protected default constructor – only concrete sub-classes may instantiate. + InputInterface() = default; + + // Non-copyable, non-movable (instances are managed via unique_ptr). + InputInterface(const InputInterface&) = delete; + InputInterface& operator=(const InputInterface&) = delete; + InputInterface(InputInterface&&) = delete; + InputInterface& operator=(InputInterface&&) = delete; + + // ------------------------------------------------------------------ + // Capability flags – set by sub-class constructors / update methods + // ------------------------------------------------------------------ + InputType type_ = InputType::UNKNOWN; ///< Concrete input source tag. + std::atomic has_vr_3point_control_{false}; ///< VR 3-point tracking available. + std::atomic has_vr_5point_control_{false}; ///< VR 5-point tracking available. + std::atomic has_hand_joints_{false}; ///< Dex3 hand joint data available. + std::atomic has_external_token_state_{false}; ///< External token-state vector available. + std::atomic has_upper_body_control_{false}; ///< Upper-body 17-DOF targets available. + + // ------------------------------------------------------------------ + // Thread-safe data buffers (written by input threads, read by control loop) + // ------------------------------------------------------------------ + + /// VR 3-point positions [left_wrist xyz, right_wrist xyz, head xyz]. + DataBuffer> vr_3point_position_; + /// VR 3-point orientations [left quat wxyz, right quat wxyz, head quat wxyz]. + DataBuffer> vr_3point_orientation_; + /// VR 3-point compliance [left_arm, right_arm, head] – keyboard-controlled. + DataBuffer> vr_3point_compliance_; + /// VR 5-point positions (3-point + 2 extra trackers × xyz = 15 values). + DataBuffer> vr_5point_position_; + /// VR 5-point orientations (5 quaternions × wxyz = 20 values). + DataBuffer> vr_5point_orientation_; + + /// Upper-body target joint positions (17 DOF, radians). + DataBuffer> upper_body_joint_positions_; + /// Upper-body target joint velocities (17 DOF, rad/s). + DataBuffer> upper_body_joint_velocities_; + + /// Left-hand Dex3 joint positions (7 DOF). + DataBuffer> left_hand_joint_; + /// Right-hand Dex3 joint positions (7 DOF). + DataBuffer> right_hand_joint_; + + /// Arbitrary external token-state vector (e.g. latent codes from a remote model). + DataBuffer> external_token_state_; + + /// Keyboard-controlled max close ratio for Dex3 hands. + /// Adjusted via keyboard (X = +0.1, C = −0.1), clamped to [0.2, 1.0]. + /// 1.0 = fully closed allowed (default); use --max-close-ratio CLI arg to limit. + std::atomic max_close_ratio_{1.0}; + + /// Shared stdin buffer – the InterfaceManager pushes non-manager keys here + /// for the currently-active interface to consume via ReadStdinChar(). + std::queue stdin_buffer_; +}; + +#endif // INPUT_INTERFACE_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/interface_manager.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/interface_manager.hpp new file mode 100644 index 0000000000000000000000000000000000000000..446282f199ef7f9859078111555fb6af2b57e117 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/interface_manager.hpp @@ -0,0 +1,396 @@ +/** + * @file interface_manager.hpp + * @brief Multiplexer that owns several concrete InputInterface instances and + * delegates all calls to the currently-active one. + * + * InterfaceManager is itself an InputInterface so it can be used transparently + * by the main control loop. It creates and owns: + * - SimpleKeyboard (index 0, default) + * - Gamepad (index 1) + * - ZMQEndpointInterface (index 2) + * - ROS2InputHandler (index 3, only when compiled with HAS_ROS2) + * + * Switching is done via **keyboard shortcuts** typed into the terminal: + * '!' → Keyboard | '@' → Gamepad | '#' → ZMQ | '$' → ROS2 + * + * The manager also handles several **global** controls that work regardless of + * which interface is active: + * - 'O'/'o' → emergency stop + * - g/G, h/H → left-hand compliance ±0.1 + * - b/B, v/V → right-hand compliance ±0.1 + * - x/X, c/C → hand max-close ratio ±0.1 + * + * When switching interfaces, a **safety reset** is triggered on *all* managed + * interfaces to prevent stale planner / streaming state from carrying over. + */ + +#ifndef INTERFACE_MANAGER_HPP +#define INTERFACE_MANAGER_HPP + +#include +#include +#include +#include +#include + +#include "input_interface.hpp" +#include "keyboard_handler.hpp" +#include "gamepad.hpp" +#include "zmq_endpoint_interface.hpp" + +#if HAS_ROS2 +#include "ros2_input_handler.hpp" +#endif + +/** + * @class InterfaceManager + * @brief Composite InputInterface that delegates to one of several concrete + * implementations, switchable at run-time via keyboard shortcuts. + * + * All getter methods (HasVR3PointControl, GetHandPose, etc.) are forwarded to + * the currently-active delegate so the control loop always sees live values. + */ +class InterfaceManager : public InputInterface { + public: + /// Identifies which concrete interface is currently active. + enum class ManagedType { + KEYBOARD = 0, ///< SimpleKeyboard (stdin) + GAMEPAD = 1, ///< Unitree wireless gamepad + ZMQ = 2, ///< ZMQ packed-message streaming + ROS2 = 3 ///< ROS 2 teleop (requires HAS_ROS2) + }; + + /** + * @brief Construct the manager, creating all sub-interfaces. + * @param zmq_host ZMQ server hostname (passed to ZMQEndpointInterface). + * @param zmq_port ZMQ server port. + * @param zmq_topic ZMQ subscription topic. + * @param zmq_conflate Whether to enable ZMQ conflate (latest-only) mode. + * @param zmq_verbose Enable verbose ZMQ logging. + */ + InterfaceManager( + const std::string& zmq_host, + int zmq_port, + const std::string& zmq_topic, + bool zmq_conflate, + bool zmq_verbose + ) : InputInterface(), zmq_host_(zmq_host), zmq_port_(zmq_port), zmq_topic_(zmq_topic), + zmq_conflate_(zmq_conflate), zmq_verbose_(zmq_verbose) { + type_ = InputType::UNKNOWN; + buildInterfaces(); + setActiveIndex(0); // default to keyboard (index 0) + } + + void update() override { + // Reset per-frame flags + emergency_stop_ = false; + report_temperature_flag_ = false; + + // Read stdin using shared buffering mechanism, check for manager keys + char ch; + while (ReadStdinChar(ch)) { + bool is_manager_key = false; + switch (ch) { + case '!': + SetActiveInterface(ManagedType::KEYBOARD); + is_manager_key = true; + break; + case '@': + SetActiveInterface(ManagedType::GAMEPAD); + is_manager_key = true; + break; + case '#': + SetActiveInterface(ManagedType::ZMQ); + is_manager_key = true; + break; + case '$': + SetActiveInterface(ManagedType::ROS2); + is_manager_key = true; + break; + case 'o': + case 'O': + // Global emergency stop - works for all interfaces (especially gamepad) + emergency_stop_ = true; + is_manager_key = true; + std::cout << "[InterfaceManager] EMERGENCY STOP triggered (O/o key pressed)" << std::endl; + break; + // Global compliance controls - work across ALL interfaces (keyboard, planner, ROS2, ZMQ) + case 'g': + case 'G': + // Increase left hand compliance by 0.1 + AdjustLeftHandCompliance(0.1); + is_manager_key = true; + break; + case 'h': + case 'H': + // Decrease left hand compliance by 0.1 + AdjustLeftHandCompliance(-0.1); + is_manager_key = true; + break; + case 'b': + case 'B': + // Increase right hand compliance by 0.1 + AdjustRightHandCompliance(0.1); + is_manager_key = true; + break; + case 'v': + case 'V': + // Decrease right hand compliance by 0.1 + AdjustRightHandCompliance(-0.1); + is_manager_key = true; + break; + // Global hand max close ratio controls - work across ALL interfaces (x/c keys) + case 'x': + case 'X': + // Increase max close ratio by 0.1 (allow hands to close more) + AdjustMaxCloseRatio(0.1); + is_manager_key = true; + break; + case 'c': + case 'C': + // Decrease max close ratio by 0.1 (keep hands more open) + AdjustMaxCloseRatio(-0.1); + is_manager_key = true; + break; + case 'f': + case 'F': + // Global temperature report + report_temperature_flag_ = true; + is_manager_key = true; + break; + } + + // Buffer non-manager keys for the active interface to read + // Note: 'O'/'o' is NOT passed through since it's handled globally + if (!is_manager_key) { + current_->PushStdinChar(ch); + } + } + + // Run the actual active interface update (it will read buffered keys) + current_->update(); + + // Note: We don't cache data here anymore - just forward calls to active interface + // This ensures we always get the most current values + } + + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + + // Handle global emergency stop (works for all interfaces, especially gamepad) + if (emergency_stop_) { + operator_state.stop = true; + } + + // Handle global temperature report (F key) + if (report_temperature_flag_) { + report_temperature = true; + report_temperature_flag_ = false; + } + + // Check if ROS2 is active but planner is not available - switch to keyboard + if (active_ == ManagedType::ROS2 && !has_planner) { + std::cout << "[InterfaceManager] ROS2 requires planner but planner not loaded. Switching to KEYBOARD" << std::endl; + SetActiveInterface(ManagedType::KEYBOARD); + } + + // Delegate to the active interface + current_->handle_input(motion_reader, current_motion, current_frame, operator_state, + reinitialize_heading, heading_state_buffer, has_planner, planner_state, + movement_state_buffer, current_motion_mutex, report_temperature); + } + + // Override all getters to forward directly to the active interface + // This makes the manager a transparent proxy that always returns live values + + + bool HasVR3PointControl() const override { + if (current_) { + return current_->HasVR3PointControl(); + } + return has_vr_3point_control_; + } + + bool HasHandJoints() const override { + if (current_) { + return current_->HasHandJoints(); + } + return has_hand_joints_; + } + + bool HasExternalTokenState() const override { + if (current_) { + return current_->HasExternalTokenState(); + } + return has_external_token_state_; + } + + std::pair> GetVR3PointPosition() const override { + if (current_) { + return current_->GetVR3PointPosition(); + } + return InputInterface::GetVR3PointPosition(); // Fallback to base class + } + + std::pair> GetVR3PointOrientation() const override { + if (current_) { + return current_->GetVR3PointOrientation(); + } + return InputInterface::GetVR3PointOrientation(); // Fallback to base class + } + + std::pair> GetHandPose(bool is_left) const override { + if (current_) { + return current_->GetHandPose(is_left); + } + return InputInterface::GetHandPose(is_left); // Fallback to base class + } + + std::pair> GetExternalTokenState() const override { + if (current_) { + return current_->GetExternalTokenState(); + } + return InputInterface::GetExternalTokenState(); // Fallback to base class + } + + /// Forward raw wireless-remote byte buffer to the internal Gamepad instance. + /// Called by the Unitree SDK callback whenever new joystick data arrives. + void UpdateGamepadRemoteData(const uint8_t* buff, size_t size) { + if (!gamepad_ || buff == nullptr || size == 0) { return; } + size_t copy_size = std::min(size, sizeof(gamepad_->gamepad_data.buff)); + std::memcpy(gamepad_->gamepad_data.buff, buff, copy_size); + } + + /// Programmatically switch to a specific interface type. + /// Triggers safety reset on all interfaces and prints a log message. + void SetActiveInterface(ManagedType t) { + for (size_t i = 0; i < order_.size(); ++i) { + if (order_[i] == t) { + setActiveIndex(static_cast(i)); + return; + } + } + } + + ManagedType GetActiveInterface() const { return active_; } + + private: + /// Instantiate all concrete interfaces and register them in order_. + void buildInterfaces() { + keyboard_ = std::make_unique(); + order_.push_back(ManagedType::KEYBOARD); + + gamepad_ = std::make_unique(); + order_.push_back(ManagedType::GAMEPAD); + + zmq_ = std::make_unique( + zmq_host_, zmq_port_, zmq_topic_, zmq_conflate_, zmq_verbose_ + ); + order_.push_back(ManagedType::ZMQ); + +#if HAS_ROS2 + ros2_ = std::make_unique(true, "g1_deploy_ros2_handler"); + order_.push_back(ManagedType::ROS2); +#endif + } + + /// Set the active interface by numeric index (wraps around). + /// Triggers safety reset on ALL interfaces to prevent stale state. + void setActiveIndex(int idx) { + if (order_.empty()) { return; } + if (idx < 0) { idx = static_cast(order_.size()) - 1; } + if (idx >= static_cast(order_.size())) { idx = 0; } + + // Trigger safety reset on ALL interfaces when switching + keyboard_->TriggerSafetyReset(); + gamepad_->TriggerSafetyReset(); + zmq_->TriggerSafetyReset(); +#if HAS_ROS2 + if (ros2_) ros2_->TriggerSafetyReset(); +#endif + + active_index_ = idx; + active_ = order_[static_cast(active_index_)]; + + switch (active_) { + case ManagedType::KEYBOARD: + current_ = keyboard_.get(); + type_ = InputType::KEYBOARD; + std::cout << "[InterfaceManager] Switched to: KEYBOARD (safety reset triggered)" << std::endl; + break; + case ManagedType::GAMEPAD: + current_ = gamepad_.get(); + type_ = InputType::GAMEPAD; + std::cout << "[InterfaceManager] Switched to: GAMEPAD (safety reset triggered)" << std::endl; + break; + case ManagedType::ZMQ: + current_ = zmq_.get(); + type_ = InputType::NETWORK; + std::cout << "[InterfaceManager] Switched to: ZMQ (safety reset triggered)" << std::endl; + break; + case ManagedType::ROS2: +#if HAS_ROS2 + current_ = ros2_.get(); + type_ = InputType::ROS2; + std::cout << "[InterfaceManager] Switched to: ROS2 (safety reset triggered)" << std::endl; + break; +#else + // Should never happen when ROS2 disabled; fall back to keyboard + current_ = keyboard_.get(); + type_ = InputType::KEYBOARD; + active_ = ManagedType::KEYBOARD; + std::cout << "[InterfaceManager] ROS2 not available. Falling back to KEYBOARD (safety reset triggered)" << std::endl; + break; +#endif + } + } + + void nextInterface() { setActiveIndex(active_index_ + 1); } ///< Cycle forward. + void prevInterface() { setActiveIndex(active_index_ - 1); } ///< Cycle backward. + + private: + // ------------------------------------------------------------------ + // Owned concrete delegates (kept alive to preserve state across switches) + // ------------------------------------------------------------------ + std::unique_ptr keyboard_; ///< Keyboard handler. + std::unique_ptr gamepad_; ///< Gamepad handler. + std::unique_ptr zmq_; ///< ZMQ streaming handler. +#if HAS_ROS2 + std::unique_ptr ros2_; ///< ROS 2 teleop handler. +#endif + + InputInterface* current_ = nullptr; ///< Non-owning pointer to the active delegate. + + // ------------------------------------------------------------------ + // Active-selection bookkeeping + // ------------------------------------------------------------------ + std::vector order_; ///< Insertion-order of managed types. + int active_index_ = 0; ///< Index into order_. + ManagedType active_ = ManagedType::KEYBOARD; ///< Currently-active type tag. + + // ZMQ configuration (stored for deferred construction) + std::string zmq_host_; + int zmq_port_; + std::string zmq_topic_; + bool zmq_conflate_ = false; + bool zmq_verbose_ = false; + + /// Global emergency-stop flag, set by 'O'/'o' key. + /// Applies to ALL interfaces (especially useful when gamepad is active + /// and has no physical stop button readily accessible). + bool emergency_stop_ = false; + bool report_temperature_flag_ = false; +}; + +#endif // INTERFACE_MANAGER_HPP + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/keyboard_handler.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/keyboard_handler.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d1ee8bd3497cbff787a7d8866990fb761573e1a4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/keyboard_handler.hpp @@ -0,0 +1,701 @@ +/** + * @file keyboard_handler.hpp + * @brief Terminal-based keyboard input handler for the G1 robot. + * + * SimpleKeyboard reads single characters from stdin (set to non-blocking, + * non-canonical mode) and translates them into per-frame action flags. + * + * ## Two Operational Modes + * + * ### Reference-motion mode (default) + * Key | Action + * ----|------- + * P/p | Previous motion + * N/n | Next motion + * T/t | Play / resume playback + * R/r | Restart motion (frame 0, paused) + * ] | Start control system + * O/o | Emergency stop + * Q/q | Delta heading left (−π/12) + * E/e | Delta heading right (+π/12) + * I/i | Reinitialise heading (recapture IMU) + * Enter | Toggle planner mode + * Z/z | Toggle encoder mode + * + * ### Planner mode (Enter to toggle) + * Key | Action + * ----|------- + * W/S | Move forward / backward + * A/D | Adjust-left / adjust-right (slight turn + forward) + * ,/. | Strafe left / right + * Q/E | Heading left / right (±π/6) + * 1-8 | Select locomotion mode from current motion set + * N/P | Next / previous motion set + * 9/0 | Decrease / increase speed + * -/= | Decrease / increase height + * R/` | Emergency stop (reset momentum) + * T/t | Play motion + * Z/z | Toggle encoder mode + * + * Movement uses a momentum system: pressing a direction key sets momentum to + * 1.0; each frame without input decays it by `momentum_decay_rate`. Below + * `momentum_threshold` the robot transitions to IDLE (or stays in the current + * static pose for squat / boxing sets). + */ + +#ifndef KEYBOARD_HANDLER_HPP +#define KEYBOARD_HANDLER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "input_interface.hpp" + +/** + * @class SimpleKeyboard + * @brief stdin-based InputInterface for interactive control from a terminal. + */ +class SimpleKeyboard : public InputInterface { + public: + // ------------------------------------------------------------------ + // Per-frame action flags (reset at the start of every update() call) + // ------------------------------------------------------------------ + bool motion_prev = false; ///< Switch to previous pre-loaded motion. + bool motion_next = false; ///< Switch to next pre-loaded motion. + bool play_motion = false; ///< Start / resume motion playback. + bool motion_restart = false; ///< Reset current motion to frame 0 (paused). + + bool start_control = false; ///< Request control-system start. + bool stop_control = false; ///< Request emergency stop. + + bool delta_left = false; ///< Nudge heading left (−π/12 rad per press). + bool delta_right = false; ///< Nudge heading right (+π/12 rad per press). + + bool reinitialize = false; ///< Recapture the IMU base quaternion. + + // ------------------------------------------------------------------ + // Planner-mode state + // ------------------------------------------------------------------ + bool use_planner = false; ///< True while planner mode is active. + + /// Index into the predefined motion-set table + /// (0 = standing, 1 = squat, 2 = boxing, 3 = styled walk). + int motion_set_index = 0; + /// Locomotion modes available in the current motion set. + std::vector current_motion_set = get_motion_set(motion_set_index); + + // Directional movement flags (per-frame, planner mode only) + bool planner_move_forward = false; ///< W key pressed this frame. + bool planner_move_backward = false; ///< S key pressed this frame. + bool planner_move_adj_left = false; ///< A key – slight left turn + forward. + bool planner_move_adj_right = false; ///< D key – slight right turn + forward. + bool planner_move_left = false; ///< ',' key – strafe left. + bool planner_move_right = false; ///< '.' key – strafe right. + bool planner_heading_left = false; ///< E key – heading left (−π/6). + bool planner_heading_right = false; ///< Q key – heading right (+π/6). + + LocomotionMode planner_use_movement_mode = LocomotionMode::IDLE; ///< Current locomotion mode. + double planner_use_movement_speed = -1; ///< Desired speed (−1 = mode default). + double planner_use_height = -1; ///< Desired body height (−1 = mode default). + bool planner_emergency_stop = false; ///< Immediate halt flag (R / ` key). + + bool encoder_mode_toggle = false; ///< Toggle encoder-mode (Z key) this frame. + bool report_temperature = false; ///< Print motor temperatures (F key) this frame. + + // Persistent planner state + double planner_facing_angle = 0.0; ///< Accumulated facing direction (radians). + + /// Movement momentum (0 = stopped, 1 = full speed). + /// Decays each frame by `momentum_decay_rate` when no movement key is held. + double movement_momentum = 0.0; + const double momentum_decay_rate = 0.999; ///< Per-frame multiplicative decay. + const double momentum_threshold = 0.1; ///< Below this, transition to IDLE. + + /** + * @brief Construct the keyboard handler. + * + * Puts stdin into non-canonical, non-echo, non-blocking mode so that + * individual key-presses can be read without waiting for Enter. + * The original terminal settings are restored in the destructor. + */ + explicit SimpleKeyboard() : InputInterface() { + tcgetattr(STDIN_FILENO, &old_termios_); + struct termios new_termios = old_termios_; + new_termios.c_lflag &= ~(ICANON | ECHO); // Disable line buffering and echo + tcsetattr(STDIN_FILENO, TCSANOW, &new_termios); + fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK); // Non-blocking reads + type_ = InputType::KEYBOARD; + } + + /// Restore original terminal settings on destruction. + ~SimpleKeyboard() { + tcsetattr(STDIN_FILENO, TCSANOW, &old_termios_); + } + + // Flag to trigger safety reset in handle_input + bool trigger_safety_reset = false; + + // Override the update function from InputInterface + void update() override { + // Check for safety reset trigger from manager + if (CheckAndClearSafetyReset()) { + use_planner = false; + trigger_safety_reset = true; + std::cout << "[SimpleKeyboard] Safety reset triggered: will disable planner and return to reference motion" << std::endl; + } + + // Reset input flags each frame + start_control = false; + stop_control = false; + motion_prev = false; + motion_next = false; + play_motion = false; + motion_restart = false; + delta_left = false; + delta_right = false; + reinitialize = false; + planner_move_forward = false; + planner_move_backward = false; + planner_move_adj_left = false; + planner_move_adj_right = false; + planner_move_left = false; + planner_move_right = false; + planner_heading_left = false; + planner_heading_right = false; + planner_emergency_stop = false; + encoder_mode_toggle = false; + report_temperature = false; + + // Read keyboard input (using shared buffered reading) + char ch; + while (ReadStdinChar(ch)) { + if (use_planner) { + switch (ch) { + case 'r': + case 'R': + case '`': + case '~': planner_emergency_stop = true; break; // Emergency stop - immediate halt + case '1': + case '!': if (current_motion_set.size() > 0) planner_use_movement_mode = current_motion_set[0]; break; // Use standing motion set + case '2': + case '@': if (current_motion_set.size() > 1) planner_use_movement_mode = current_motion_set[1]; break; // Use squat motion set + case '3': + case '#': if (current_motion_set.size() > 2) planner_use_movement_mode = current_motion_set[2]; break; // Use boxing motion set + case '4': + case '$': if (current_motion_set.size() > 3) planner_use_movement_mode = current_motion_set[3]; break; // Use boxing or idele squat mode + case '5': + case '%': if (current_motion_set.size() > 4) planner_use_movement_mode = current_motion_set[4]; break; // Use kneel two legs mode + case '6': + case '^': if (current_motion_set.size() > 5) planner_use_movement_mode = current_motion_set[5]; break; // Use kneel mode + case '7': + case '&': if (current_motion_set.size() > 6) planner_use_movement_mode = current_motion_set[6]; break; // Use lying face down mode + case '8': + case '*': if (current_motion_set.size() > 7) planner_use_movement_mode = current_motion_set[7]; break; // Use crawling mode + case '-': + case '_': if(planner_use_height != -1) { planner_use_height = planner_use_height - 0.1; } break; // Delta height down + case '=': + case '+': if(planner_use_height != -1) { planner_use_height = planner_use_height + 0.1; } break; // Delta height up + case '9': + case '(': if(planner_use_movement_speed != -1) { planner_use_movement_speed = planner_use_movement_speed - 0.1; } break; // Delta speed up + case '0': + case ')': if(planner_use_movement_speed != -1) { planner_use_movement_speed = planner_use_movement_speed + 0.1; } break; // Delta speed down + case 'n': + case 'N': motion_set_index = (motion_set_index + 1) % 4; + current_motion_set = get_motion_set(motion_set_index); + planner_use_movement_mode = current_motion_set[0]; + std::cout << "Motion set: " << motion_set_index << std::endl; + if (motion_set_index == 1) { + planner_use_height = 0.8; + } + break; // Next motion set + case 'p': + case 'P': motion_set_index = (motion_set_index - 1 + 4) % 4; + current_motion_set = get_motion_set(motion_set_index); + planner_use_movement_mode = current_motion_set[0]; + std::cout << "Motion set: " << motion_set_index << std::endl; + if (motion_set_index == 1) { + planner_use_height = 0.8; + } + break; // Previous motion set + case 'j': + case 'J': delta_left = true; break; // Delta heading left + case 'l': + case 'L': delta_right = true; break; // Delta heading right + case 'w': + case 'W': planner_move_forward = true; break; // Move forward + case 's': + case 'S': planner_move_backward = true; break; // Move backward + case ',': + case '<': planner_move_left = true; break; // Move left + case '.': + case '>': planner_move_right = true; break; // Move right + case 'a': + case 'A': planner_move_adj_left = true; break; // Move adj left + case 'd': + case 'D': planner_move_adj_right = true; break; // Move adj right + case 'e': + case 'E': planner_heading_left = true; break; // Delta heading left (-0.1) + case 'q': + case 'Q': planner_heading_right = true; break; // Delta heading right (+0.1) + case ']': start_control = true; break; // Start control system + case 'o': + case 'O': stop_control = true; break; // Stop/Exit + case '\n': use_planner = !use_planner; break; // Use planner + case 'i': + case 'I': reinitialize = true; break; // Reinitialize base quaternion and delta heading + case 't': + case 'T': play_motion = true; break; // Play motion to end + case 'z': + case 'Z': encoder_mode_toggle = true; break; // Toggle encoder mode + case 'f': + case 'F': report_temperature = true; break; // Report motor temperatures + } + + // Limit movement speed and height to the range of the movement mode + if (is_standing_motion_mode(planner_use_movement_mode)) { + planner_use_height = -1.0; + } else { + planner_use_height = std::max(planner_use_height, 0.2); + planner_use_height = std::min(planner_use_height, 0.8); + } + + if (is_static_motion_mode(planner_use_movement_mode)) { + planner_use_movement_speed = -1.0; + } else { + if (planner_use_movement_mode == LocomotionMode::SLOW_WALK) { + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.2); + planner_use_movement_speed = std::min(planner_use_movement_speed, 0.8); + } else if (planner_use_movement_mode == LocomotionMode::RUN) { + planner_use_movement_speed = std::max(planner_use_movement_speed, 1.5); + planner_use_movement_speed = std::min(planner_use_movement_speed, 3.0); + } else if (planner_use_movement_mode == LocomotionMode::CRAWLING) { + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.4); + planner_use_movement_speed = std::min(planner_use_movement_speed, 1.0); + } else if (planner_use_movement_mode == LocomotionMode::ELBOW_CRAWLING) { + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.7); + planner_use_movement_speed = std::min(planner_use_movement_speed, 1.0); + } else if (planner_use_movement_mode == LocomotionMode::WALK_BOXING || + planner_use_movement_mode == LocomotionMode::LEFT_PUNCH || + planner_use_movement_mode == LocomotionMode::RIGHT_PUNCH || + planner_use_movement_mode == LocomotionMode::RANDOM_PUNCH || + planner_use_movement_mode == LocomotionMode::LEFT_HOOK || + planner_use_movement_mode == LocomotionMode::RIGHT_HOOK) { + planner_use_movement_speed = std::max(planner_use_movement_speed, 0.7); + planner_use_movement_speed = std::min(planner_use_movement_speed, 1.5); + } + else { + planner_use_movement_speed = -1; + } + } + } else { + switch (ch) { + case 'p': + case 'P': motion_prev = true; break; // Previous motion + case 'n': + case 'N': motion_next = true; break; // Next motion + case 't': + case 'T': play_motion = true; break; // Play motion to end + case 'r': + case 'R': motion_restart = true; break; // Restart motion + case ']': start_control = true; break; // Start control system + case 'o': + case 'O': stop_control = true; break; // Stop/Exit + case 'q': + case 'Q': delta_left = true; break; // Delta heading left (-0.1) + case 'e': + case 'E': delta_right = true; break; // Delta heading right (+0.1) + case 'i': + case 'I': reinitialize = true; break; // Reinitialize base quaternion and delta heading + case '\n': use_planner = !use_planner; break; // Use planner + case 'z': + case 'Z': encoder_mode_toggle = true; break; // Toggle encoder mode + case 'h': + case 'H': report_temperature = true; break; // Report motor temperatures + } + } + + } + } + + // Override the handle_input function from InputInterface + // This processes the keyboard input flags and performs actions using the provided parameters + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + + + + // Handle safety reset from interface manager + if (trigger_safety_reset) { + trigger_safety_reset = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + auto temp_motion = std::make_shared(*current_motion); + temp_motion->name = "temporary_motion"; + current_motion = temp_motion; + if (has_planner && planner_state.enabled) { + planner_state.enabled = false; + planner_state.initialized = false; + std::cout << "Safety reset: Planner disabled" << std::endl; + } + } + + std::cout << "Safety reset: Returned to reference motion at frame 0" << std::endl; + } + + // Handle encoder mode toggle + if (encoder_mode_toggle) { + int current_encoder_mode = current_motion->GetEncodeMode(); + if (current_encoder_mode == -2) { + std::cout << "⚠ No encoder configured - cannot toggle encoder mode" << std::endl; + } else if (current_encoder_mode == -1) { + std::cout << "⚠ No encoder loaded - cannot toggle encoder mode" << std::endl; + } else { + int new_encoder_mode = (current_encoder_mode == 0) ? 1 : 0; // Toggle between mode 0 and 1 + std::cout << "Encoder mode: " << (new_encoder_mode == 0 ? "mode 0" : "mode 1") << std::endl; + { + std::lock_guard lock(current_motion_mutex); + current_motion->SetEncodeMode(new_encoder_mode); + } + } + } + + // Handle motion control commands + if (this->motion_prev && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = + (motion_reader.current_motion_index_ - 1 + motion_reader.motions.size()) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + } + + if (this->motion_next && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = (motion_reader.current_motion_index_ + 1) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + } + + if (this->play_motion) { + if (!operator_state.play) { + int frame_copy; + size_t timesteps_copy; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + frame_copy = current_frame; + timesteps_copy = current_motion ? current_motion->timesteps : 0; + } + std::cout << "Playing motion " << motion_reader.current_motion_index_ << " from frame " << frame_copy << " to end (" + << timesteps_copy << " total frames)" << std::endl; + } + } + + if (this->motion_restart) { + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_frame = 0; + reinitialize_heading = true; + } + std::cout << "Reset motion " << motion_reader.current_motion_index_ << " to frame 0 (paused)" << std::endl; + } + + if (this->stop_control) { operator_state.stop = true; } + + if (this->report_temperature) { report_temperature = true; } + + if (this->start_control) { operator_state.start = true; } + + // Handle delta heading controls + if (this->delta_left) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading + M_PI / 12; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading left: " << new_delta << " rad" << std::endl; + } + + if (this->delta_right) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading - M_PI / 12; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading right: " << new_delta << " rad" << std::endl; + } + + // Handle reinitialize command + if (this->reinitialize) { + std::lock_guard lock(current_motion_mutex); + reinitialize_heading = true; + } + + // Handle planner control - copy the toggle state from keyboard + if (this->use_planner && !has_planner) { + std::cout << "Planner not loaded - cannot enable" << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } else if (has_planner && planner_state.enabled != this->use_planner) { + planner_state.enabled = this->use_planner; + if (planner_state.enabled) { + std::cout << "Planner enabled" << std::endl; + planner_facing_angle = 0.0; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + } + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[Keyboard] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[Keyboard] Planner initialization timeout after 5 seconds" << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + break; + } + std::cout << "[Keyboard] Waiting for planner to be initialized" << std::endl; + } + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cout << "[Keyboard] Planner failed to initialize." << std::endl; + this->use_planner = false; + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } else { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } else { + std::cout << "Planner disabled" << std::endl; + planner_state.initialized = false; // Reset planner initialization when disabled + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + movement_momentum = 0.0; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // Update current motion directly + current_frame = 0; + } + } + } + + if (has_planner && planner_state.enabled && planner_state.initialized) { + // Handle emergency stop (immediate momentum reset) + if (this->planner_emergency_stop) { + movement_momentum = 0.0; + std::cout << "Emergency Stop! Movement momentum reset." << std::endl; + } + + // Get current state from buffer (single source of truth) + auto current_mode_data = movement_state_buffer.GetDataWithTime(); + int current_mode = current_mode_data.data ? current_mode_data.data->locomotion_mode : static_cast(LocomotionMode::IDLE); + std::array current_movement = current_mode_data.data ? current_mode_data.data->movement_direction : std::array{0.0, 0.0, 0.0}; + std::array current_facing = current_mode_data.data ? current_mode_data.data->facing_direction : std::array{1.0, 0.0, 0.0}; + + // Use local variables for all processing - avoid updating globals until the end + std::array local_target_movement = current_movement; + std::array local_facing_direction = current_facing; + + // Handle heading controls (independent of movement momentum) + if (this->planner_heading_left) { + planner_facing_angle -= M_PI / 6; + local_facing_direction[0] = cos(planner_facing_angle); + local_facing_direction[1] = sin(planner_facing_angle); + } + if (this->planner_heading_right) { + planner_facing_angle += M_PI / 6; + local_facing_direction[0] = cos(planner_facing_angle); + local_facing_direction[1] = sin(planner_facing_angle); + } + bool movement_key_pressed = false; + + if (this->planner_move_forward && !is_static_motion_mode(planner_use_movement_mode)) { + // Just indicate we want to move - actual mode will be determined later based on momentum + local_target_movement[0] = local_facing_direction[0]; + local_target_movement[1] = local_facing_direction[1]; + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + if (this->planner_move_backward && !is_static_motion_mode(planner_use_movement_mode)) { + local_target_movement[0] = -local_facing_direction[0]; + local_target_movement[1] = -local_facing_direction[1]; + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + if (this->planner_move_adj_left && !is_static_motion_mode(planner_use_movement_mode)) { + planner_facing_angle += 0.1; + local_facing_direction[0] = cos(planner_facing_angle); + local_facing_direction[1] = sin(planner_facing_angle); + local_facing_direction[2] = 0.0f; + local_target_movement[0] = local_facing_direction[0]; + local_target_movement[1] = local_facing_direction[1]; + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + if (this->planner_move_adj_right && !is_static_motion_mode(planner_use_movement_mode)) { + planner_facing_angle -= 0.1; + local_facing_direction[0] = cos(planner_facing_angle); + local_facing_direction[1] = sin(planner_facing_angle); + local_facing_direction[2] = 0.0f; + local_target_movement[0] = local_facing_direction[0]; + local_target_movement[1] = local_facing_direction[1]; + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + if (this->planner_move_left && !is_static_motion_mode(planner_use_movement_mode)) { + local_target_movement[0] = -sin(planner_facing_angle); + local_target_movement[1] = cos(planner_facing_angle); + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + if (this->planner_move_right && !is_static_motion_mode(planner_use_movement_mode)) { + local_target_movement[0] = sin(planner_facing_angle); + local_target_movement[1] = -cos(planner_facing_angle); + local_target_movement[2] = 0.0f; + movement_momentum = 1.0; // Full momentum + movement_key_pressed = true; + } + + // Handle mode changes - just update the mode, keep momentum + // No need to reset momentum when switching between walk/run modes + + // Apply momentum decay if no movement key is pressed + if (!movement_key_pressed) { + movement_momentum *= momentum_decay_rate; + } + + // Set final movement values based on momentum + int final_mode; + std::array final_movement; + double final_speed; + double final_height; + if (movement_momentum > momentum_threshold) { + // Determine final mode based on keyboard setting only when we have momentum + final_mode = static_cast(this->planner_use_movement_mode); + final_movement = local_target_movement; + final_speed = this->planner_use_movement_speed; + final_height = this->planner_use_height; + } else { + if (motion_set_index == 1) { + // Below threshold - maintain current squat mode + final_mode = static_cast(this->planner_use_movement_mode); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = this->planner_use_height; + if (this->planner_use_movement_mode == LocomotionMode::CRAWLING) { + final_speed = 0; + } else if (this->planner_use_movement_mode == LocomotionMode::ELBOW_CRAWLING) { + final_speed = 0; + } + } else if (motion_set_index == 2) { + // Below threshold - maintain current boxing mode + final_mode = static_cast(this->planner_use_movement_mode); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + if (this->planner_use_movement_mode == LocomotionMode::WALK_BOXING) { + final_speed = 0; + } else if (this->planner_use_movement_mode == LocomotionMode::LEFT_PUNCH) { + final_speed = 0; + final_movement = local_facing_direction; + } else if (this->planner_use_movement_mode == LocomotionMode::RIGHT_PUNCH) { + final_speed = 0; + final_movement = local_facing_direction; + } else if (this->planner_use_movement_mode == LocomotionMode::RANDOM_PUNCH) { + final_speed = 0; + } else if (this->planner_use_movement_mode == LocomotionMode::LEFT_HOOK) { + final_speed = 0; + final_movement = local_facing_direction; + } else if (this->planner_use_movement_mode == LocomotionMode::RIGHT_HOOK) { + final_speed = 0; + final_movement = local_facing_direction; + } + } else if (motion_set_index == 3) { + // Below threshold - maintain current styled walking mode + final_mode = static_cast(this->planner_use_movement_mode); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = 0.0f; + final_height = -1.0f; + } else { + // Below threshold - switch to IDLE + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + final_height = -1.0f; + } + } + + // Update thread-safe buffer (single source of truth for planner thread) + MovementState mode_state(final_mode, final_movement, local_facing_direction, final_speed, final_height); + movement_state_buffer.SetData(mode_state); + } + } + + + private: + struct termios old_termios_; +}; + +#endif // KEYBOARD_HANDLER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/ros2_input_handler.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/ros2_input_handler.hpp new file mode 100644 index 0000000000000000000000000000000000000000..90224cf59da21b28531334069cbbf4f48e5464e6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/ros2_input_handler.hpp @@ -0,0 +1,1278 @@ +/** + * @file ros2_input_handler.hpp + * @brief ROS 2 input handler for receiving teleop commands over DDS. + * + * ROS2InputHandler creates a lightweight ROS 2 node and subscribes to a single + * topic (`ControlPolicy/upper_body_pose`) that carries msgpack-serialised + * ControlGoalMsg payloads inside a `std_msgs/ByteMultiArray`. + * + * ## Data Flow + * + * Python teleop script ──(msgpack/ROS2)──► ROS2InputHandler + * ControlGoalMsg ↓ + * update() (spin + buffer → local state) + * handle_input() (local state → system state) + * + * ## Operational Requirements + * + * - A locomotion **planner must be loaded** – ROS2 mode always operates through + * the planner (no reference-motion playback). + * - VR 3-point tracking is always enabled; the handler populates position and + * orientation buffers from the received wrist / head data. + * - Supports two IK modes controlled at construction time: + * - `use_ik_mode = true` – uses IK-processed transformation matrices + * (left_wrist_after_ik, right_wrist_after_ik, head_after_ik) with + * configurable wrist offsets. + * - `use_ik_mode = false` – uses raw wrist matrices (left_wrist, right_wrist). + * + * ## Locomotion Modes + * + * base_height_command | Mode + * --------------------|------ + * 0.72 – 0.88 | WALK (or SLOW_WALK depending on locomotion_mode flag) + * 0.50 – 0.72 | SQUAT (static) + * 0.10 – 0.50 | KNEEL (static) + * + * ## Edge-Triggered Commands + * + * `toggle_policy_action` is accumulated with OR logic in the callback so that + * a transient toggle pulse is never lost between update() cycles. + * + * ## Thread Safety + * + * The subscriber callback runs on the ROS 2 executor thread. Data is copied + * into `control_goal_buffer_` under `control_goal_mutex_` and consumed by + * update() on the main thread. + */ + +#ifndef ROS2_INPUT_HANDLER_HPP +#define ROS2_INPUT_HANDLER_HPP + +#if HAS_ROS2 +#include +#include +#include // For msgpack-serialized messages +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "input_interface.hpp" +#include "../math_utils.hpp" +#include "../policy_parameters.hpp" // For isaaclab_to_mujoco and default_angles + +/** + * @brief Deserialized control-goal message received from the Python teleop script. + * + * Fields are populated by parse_msgpack_control_goal() and stored in the + * receiving buffer for consumption by update(). + */ +struct ControlGoalMsg { + /// Navigation velocity command [lin_vel_x, lin_vel_y, ang_vel_z] (m/s, m/s, rad/s). + std::array navigate_cmd = {0.0f, 0.0f, 0.0f}; + /// Wrist pose in [x,y,z, qw,qx,qy,qz] × 2 (left then right). + std::array wrist_pose = {0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}; + + // IK-processed wrist poses (4×4 transformation matrices, row-major flattened) + std::array left_wrist_after_ik = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; ///< Left wrist after IK. + std::array right_wrist_after_ik = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; ///< Right wrist after IK. + std::array head_after_ik = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; ///< Head after IK. + bool has_ik_data = false; ///< True if the IK-processed matrices are present. + + // Non-IK raw wrist matrices (4×4 transformation matrices, row-major flattened) + std::array left_wrist = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; ///< Raw left wrist transform. + std::array right_wrist = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1}; ///< Raw right wrist transform. + bool has_wrist_matrices = false; ///< True if the raw wrist matrices are present. + + double base_height_command = 0.78; ///< Desired base height (metres, valid range 0.1–0.88). + bool toggle_policy_action = false; ///< Edge-triggered toggle: maps to start/stop control. + int locomotion_mode = 0; ///< 0 = slow walk (custom speed), 1 = fast walk (default speed). + + /// Dex3 hand joint positions (7 DOF per hand). + std::array left_hand_joint = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + std::array right_hand_joint = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + bool has_hand_joints = false; ///< True if hand joint data is present. + + double ros_timestamp = 0.0; ///< ROS time in seconds (for synchronisation with other components). + bool valid = false; ///< True once the message has been successfully parsed. +}; + +/** + * @class ROS2InputHandler + * @brief InputInterface driven by ROS 2 DDS messages (msgpack-serialised ControlGoalMsg). + * + * Architecture: + * 1. **ROS 2 callback** (`control_goal_callback`) receives ByteMultiArray messages, + * deserialises them via msgpack, and stores the result in `control_goal_buffer_` + * under `control_goal_mutex_`. + * 2. **update()** spins the ROS 2 node, reads the buffer, and converts the data + * into local state (VR buffers, navigate_cmd, control flags). + * 3. **handle_input()** translates local state into system-state changes + * (planner commands, operator start/stop, movement buffer updates). + * + * A 1-second timeout (`CONTROL_GOAL_TIMEOUT`) resets the handler if messages + * stop arriving, and any ROS 2 errors trigger an immediate emergency stop. + */ +class ROS2InputHandler : public InputInterface { +public: + // ======================================== + // DEBUG CONTROL FLAG + // ======================================== + static constexpr bool DEBUG_LOGGING = true; // Set to false to disable debug logs + + // Constructor - initializes ROS2 node and subscribers + explicit ROS2InputHandler(bool use_ik_mode = true, const std::string& node_name = "g1_input_handler") + : InputInterface() { + // Set terminal to non-blocking mode for keyboard input (emergency stop) + tcgetattr(STDIN_FILENO, &old_termios_); + struct termios new_termios = old_termios_; + new_termios.c_lflag &= ~(ICANON | ECHO); + tcsetattr(STDIN_FILENO, TCSANOW, &new_termios); + fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK); + + // Initialize ROS2 - this is the only ROS2 component in the system + if (!rclcpp::ok()) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Initializing ROS2" << std::endl; + } + rclcpp::init(0, nullptr); // Initialize with no command line arguments + } + + try { + // Initialize ROS2 node + node_ = rclcpp::Node::make_shared(node_name); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] ROS2InputHandler node '" << node_name << "' initialized" << std::endl; + } + + // Setup subscriber for control goal topic + setup_subscribers(); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Subscribed to topic: ControlPolicy/upper_body_pose" << std::endl; + } + } catch (const std::exception& e) { + std::cerr << "[ROS2 ERROR] Failed to initialize ROS2InputHandler: " << e.what() << std::endl; + throw; + } + type_ = InputType::ROS2; + has_vr_3point_control_ = true; + use_ik_mode_ = use_ik_mode; + } + + // Destructor + ~ROS2InputHandler() { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] ROS2InputHandler destructor called" << std::endl; + } + + // Restore terminal before ROS2 cleanup + tcsetattr(STDIN_FILENO, TCSANOW, &old_termios_); + + // CRITICAL: Proper shutdown order to avoid EntityDelegate assertion + try { + // Step 1: Stop spinning to prevent new callbacks + if (node_) { + // Ensure no more spin operations happen + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + } + + // Step 2: Reset subscribers BEFORE resetting node (proper DDS entity order) + if (control_goal_sub_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Resetting control goal subscriber" << std::endl; + } + control_goal_sub_.reset(); + } + + // Step 3: Allow DDS cleanup time (critical for preventing assertion) + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + + // Step 4: Reset node AFTER subscribers are cleaned up + if (node_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Resetting ROS2 node" << std::endl; + } + node_.reset(); + } + + // Step 5: Only shutdown if we're the last ROS2 component + // Note: Be careful about calling shutdown() if other ROS2 components exist + if (rclcpp::ok()) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Shutting down ROS2 context" << std::endl; + } + rclcpp::shutdown(); + } + + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 ERROR] Exception during cleanup: " << e.what() << std::endl; + } + // Don't rethrow in destructor + } catch (...) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 ERROR] Unknown exception during cleanup" << std::endl; + } + } + } + + // Flag to trigger safety reset in handle_input + bool trigger_safety_reset = false; + + // Flag to trigger emergency stop (set internally on ROS2 errors/timeout) + bool emergency_stop_ = false; + + // Override the update function from InputInterface + // Reads from control goal buffer (updated by callback) and updates local state + // + // EDGE-TRIGGERED BEHAVIOR: + // Toggle commands like toggle_policy_action are accumulated in the callback using OR logic. + // Once a command arrives as 'true', it stays 'true' in the buffer until processed here. + // After reading, these commands are cleared from the buffer to prevent re-execution. + void update() override { + // Reset emergency stop flag each frame + emergency_stop_ = false; + + // Check for safety reset trigger from manager + if (CheckAndClearSafetyReset()) { + trigger_safety_reset = true; + std::cout << "[ROS2InputHandler] Safety reset triggered: will disable planner and return to reference motion" << std::endl; + } + + // Check if ROS2 is still healthy + if (!rclcpp::ok()) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 ERROR] ROS2 context is not OK - triggering emergency stop" << std::endl; + } + emergency_stop_ = true; + return; // Skip further processing + } + + // First, spin ROS2 node to process any pending messages and trigger callbacks + if (node_) { + try { + rclcpp::spin_some(node_); + } catch (const rclcpp::exceptions::RCLError& e) { + std::cerr << "[ROS2 ERROR] RCL error during spin: " << e.what() << " - triggering emergency stop" << std::endl; + emergency_stop_ = true; + return; // Skip further processing + } catch (const std::exception& e) { + std::cerr << "[ROS2 ERROR] Failed to spin node: " << e.what() << " - triggering emergency stop" << std::endl; + emergency_stop_ = true; + return; // Skip further processing + } + } + + // Reset input flags each frame + start_control_ = false; + stop_control_ = false; + report_temperature_flag_ = false; + + // Read keyboard input for emergency stop ('O'/'o' key) + // This works in standalone mode; when managed by InterfaceManager, it's also handled there + char ch; + while (ReadStdinChar(ch)) { + switch (ch) { + case 'o': + case 'O': + stop_control_ = true; + std::cout << "[ROS2] Emergency stop triggered (O/o key pressed)" << std::endl; + break; + case 'f': + case 'F': + report_temperature_flag_ = true; + break; + } + } + + // Check for control goal timeout (using steady_clock for monotonic timing) + if (received_control_goal_.load()) { + int64_t current_time_ns = std::chrono::steady_clock::now().time_since_epoch().count(); + int64_t last_msg_time_ns = last_control_goal_time_ns_.load(); + double time_since_last_msg = (current_time_ns - last_msg_time_ns) / 1e9; // Convert ns to seconds + if (time_since_last_msg > CONTROL_GOAL_TIMEOUT) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 WARNING] Control goal timeout (" << time_since_last_msg + << "s since last message). Resetting flags." << std::endl; + } + reset_data_flags(); // Reset both flag and timestamp consistently + use_teleop_navigate_cmd_ = false; + planner_facing_angle_ = 0.0; // Reset facing angle + } + } + + // Read from control goal buffer (teleop commands from Python) - thread-safe + if (received_control_goal_.load()) { + std::lock_guard lock(control_goal_mutex_); + // Update navigate_cmd and base_height_command from control goal + navigate_cmd_from_teleop_ = control_goal_buffer_.navigate_cmd; + base_height_command_ = control_goal_buffer_.base_height_command; + use_teleop_navigate_cmd_ = true; + + // Handle toggle_policy_action (edge-triggered toggle between start/stop) + if (control_goal_buffer_.toggle_policy_action) { + // Toggle the control state + control_is_active_ = !control_is_active_; + + if (control_is_active_) { + start_control_ = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] toggle_policy_action: START control" << std::endl; + } + } else { + stop_control_ = true; + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] toggle_policy_action: STOP control" << std::endl; + } + } + + // Clear the trigger after reading (edge-triggered behavior) + control_goal_buffer_.toggle_policy_action = false; + } + + // Handle locomotion_mode (direct state: 0 = slow walk, 1 = fast walk) + locomotion_mode_is_fast_ = (control_goal_buffer_.locomotion_mode == 1); + + if constexpr (DEBUG_LOGGING) { + static int prev_locomotion_mode = -1; + if (prev_locomotion_mode != control_goal_buffer_.locomotion_mode) { + if (locomotion_mode_is_fast_) { + std::cout << "[ROS2 DEBUG] locomotion_mode: FAST WALK (default speed, mode 2)" << std::endl; + } else { + std::cout << "[ROS2 DEBUG] locomotion_mode: SLOW WALK (custom speed, mode 1)" << std::endl; + } + prev_locomotion_mode = control_goal_buffer_.locomotion_mode; + } + } + + // Update hand poses from teleop + if (control_goal_buffer_.has_hand_joints) { + left_hand_joint_.SetData(control_goal_buffer_.left_hand_joint); + right_hand_joint_.SetData(control_goal_buffer_.right_hand_joint); + has_hand_joints_ = true; + } + + // Update VR 3-point control data based on use_ik_mode_ flag + // Build arrays first, then call SetData() on buffers + std::array vr_position; + std::array vr_orientation; + + if (use_ik_mode_ && control_goal_buffer_.has_ik_data) { + // IK mode: Use IK-processed transformation matrices + // Offsets from local_vr_tracking_bm.py (lines 39-41) + // NOTE the left and right hand offsets are opposite in sign for the y-axis + constexpr std::array LEFT_HAND_OFFSET = {0.18, -0.025, 0.0}; + constexpr std::array RIGHT_HAND_OFFSET = {0.18, +0.025, 0.0}; + constexpr std::array HEAD_OFFSET = {0.0, 0.0, 0.35}; + + // Extract left wrist + auto left_rot = extract_rotation_from_transform(control_goal_buffer_.left_wrist_after_ik); + auto left_pos = extract_position_from_transform(control_goal_buffer_.left_wrist_after_ik); + auto left_offset_rotated = apply_rotation_to_offset(left_rot, LEFT_HAND_OFFSET); + vr_position[0] = left_pos[0] + left_offset_rotated[0]; + vr_position[1] = left_pos[1] + left_offset_rotated[1]; + vr_position[2] = left_pos[2] + left_offset_rotated[2]; + + // Extract right wrist + auto right_rot = extract_rotation_from_transform(control_goal_buffer_.right_wrist_after_ik); + auto right_pos = extract_position_from_transform(control_goal_buffer_.right_wrist_after_ik); + auto right_offset_rotated = apply_rotation_to_offset(right_rot, RIGHT_HAND_OFFSET); + vr_position[3] = right_pos[0] + right_offset_rotated[0]; + vr_position[4] = right_pos[1] + right_offset_rotated[1]; + vr_position[5] = right_pos[2] + right_offset_rotated[2]; + + // Extract head + auto head_rot = extract_rotation_from_transform(control_goal_buffer_.head_after_ik); + auto head_pos = extract_position_from_transform(control_goal_buffer_.head_after_ik); + auto head_offset_rotated = apply_rotation_to_offset(head_rot, HEAD_OFFSET); + vr_position[6] = head_pos[0] + head_offset_rotated[0]; + vr_position[7] = head_pos[1] + head_offset_rotated[1]; + vr_position[8] = head_pos[2] + head_offset_rotated[2]; + + // Convert rotation matrices to quaternions using math_utils.hpp + auto left_quat = rotation_matrix_to_quat_d(left_rot); + auto right_quat = rotation_matrix_to_quat_d(right_rot); + auto head_quat = rotation_matrix_to_quat_d(head_rot); + + // Store quaternions (w, x, y, z format) + vr_orientation[0] = left_quat[0]; // left qw + vr_orientation[1] = left_quat[1]; // left qx + vr_orientation[2] = left_quat[2]; // left qy + vr_orientation[3] = left_quat[3]; // left qz + vr_orientation[4] = right_quat[0]; // right qw + vr_orientation[5] = right_quat[1]; // right qx + vr_orientation[6] = right_quat[2]; // right qy + vr_orientation[7] = right_quat[3]; // right qz + vr_orientation[8] = head_quat[0]; // head qw + vr_orientation[9] = head_quat[1]; // head qx + vr_orientation[10] = head_quat[2]; // head qy + vr_orientation[11] = head_quat[3]; // head qz + + // Update buffers + vr_3point_position_.SetData(vr_position); + vr_3point_orientation_.SetData(vr_orientation); + } else if (!use_ik_mode_ && control_goal_buffer_.has_wrist_matrices) { + // Non-IK mode with wrist matrices: Use left_wrist and right_wrist matrices + // Extract left wrist (matches Python: left_wrist_matrix[:3, 3:] for position) + auto left_rot = extract_rotation_from_transform(control_goal_buffer_.left_wrist); + auto left_pos = extract_position_from_transform(control_goal_buffer_.left_wrist); + vr_position[0] = left_pos[0]; + vr_position[1] = left_pos[1]; + vr_position[2] = left_pos[2]; + + // Extract right wrist + auto right_rot = extract_rotation_from_transform(control_goal_buffer_.right_wrist); + auto right_pos = extract_position_from_transform(control_goal_buffer_.right_wrist); + vr_position[3] = right_pos[0]; + vr_position[4] = right_pos[1]; + vr_position[5] = right_pos[2]; + // Head position uses defaults + vr_position[6] = 0.0241; + vr_position[7] = -0.0081; + vr_position[8] = 0.4028; + + // Convert rotation matrices to quaternions using math_utils.hpp + auto left_quat = rotation_matrix_to_quat_d(left_rot); + auto right_quat = rotation_matrix_to_quat_d(right_rot); + + // Store quaternions (w, x, y, z format) + vr_orientation[0] = left_quat[0]; // left qw + vr_orientation[1] = left_quat[1]; // left qx + vr_orientation[2] = left_quat[2]; // left qy + vr_orientation[3] = left_quat[3]; // left qz + vr_orientation[4] = right_quat[0]; // right qw + vr_orientation[5] = right_quat[1]; // right qx + vr_orientation[6] = right_quat[2]; // right qy + vr_orientation[7] = right_quat[3]; // right qz + // Head orientation uses defaults + vr_orientation[8] = 0.9991; + vr_orientation[9] = 0.011; + vr_orientation[10] = 0.0402; + vr_orientation[11] = -0.0002; + + // Update buffers + vr_3point_position_.SetData(vr_position); + vr_3point_orientation_.SetData(vr_orientation); + } else { + // Fallback: Use standard wrist_pose format (14 doubles) + vr_position[0] = control_goal_buffer_.wrist_pose[0]; // left wrist x + vr_position[1] = control_goal_buffer_.wrist_pose[1]; // left wrist y + vr_position[2] = control_goal_buffer_.wrist_pose[2]; // left wrist z + vr_position[3] = control_goal_buffer_.wrist_pose[7]; // right wrist x + vr_position[4] = control_goal_buffer_.wrist_pose[8]; // right wrist y + vr_position[5] = control_goal_buffer_.wrist_pose[9]; // right wrist z + // Head position uses defaults + vr_position[6] = 0.0241; + vr_position[7] = -0.0081; + vr_position[8] = 0.4028; + + // Update VR 3-point orientation data (wrist quaternions) + vr_orientation[0] = control_goal_buffer_.wrist_pose[3]; // left wrist qw + vr_orientation[1] = control_goal_buffer_.wrist_pose[4]; // left wrist qx + vr_orientation[2] = control_goal_buffer_.wrist_pose[5]; // left wrist qy + vr_orientation[3] = control_goal_buffer_.wrist_pose[6]; // left wrist qz + vr_orientation[4] = control_goal_buffer_.wrist_pose[10]; // right wrist qw + vr_orientation[5] = control_goal_buffer_.wrist_pose[11]; // right wrist qx + vr_orientation[6] = control_goal_buffer_.wrist_pose[12]; // right wrist qy + vr_orientation[7] = control_goal_buffer_.wrist_pose[13]; // right wrist qz + // Head orientation uses defaults + vr_orientation[8] = 0.9991; + vr_orientation[9] = 0.011; + vr_orientation[10] = 0.0402; + vr_orientation[11] = -0.0002; + + // Update buffers + vr_3point_position_.SetData(vr_position); + vr_3point_orientation_.SetData(vr_orientation); + } + + if constexpr (DEBUG_LOGGING) { + static int goal_debug_counter = 0; + goal_debug_counter++; + if (goal_debug_counter % 50 == 0) { // Log every 50 calls to avoid spam + std::cout << "[ROS2 DEBUG] Control goal update:" << std::endl; + std::cout << " Navigate cmd: [" << navigate_cmd_from_teleop_[0] << ", " + << navigate_cmd_from_teleop_[1] << ", " << navigate_cmd_from_teleop_[2] << "]" << std::endl; + std::cout << " Base height: " << control_goal_buffer_.base_height_command << std::endl; + std::cout << " Toggle policy action: " << (control_goal_buffer_.toggle_policy_action ? "true" : "false") << std::endl; + + // Data availability flags + std::cout << " Data flags: has_ik_data=" << (control_goal_buffer_.has_ik_data ? "true" : "false") + << ", has_wrist_matrices=" << (control_goal_buffer_.has_wrist_matrices ? "true" : "false") + << ", has_hand_joints=" << (has_hand_joints_ ? "true" : "false") + << ", use_ik_mode=" << (use_ik_mode_ ? "true" : "false") << std::endl; + + // VR 3-point positions (left wrist, right wrist, head) + std::cout << " VR 3-point positions:" << std::endl; + std::cout << " Left wrist: [" << vr_position[0] << ", " << vr_position[1] << ", " << vr_position[2] << "]" << std::endl; + std::cout << " Right wrist: [" << vr_position[3] << ", " << vr_position[4] << ", " << vr_position[5] << "]" << std::endl; + std::cout << " Head: [" << vr_position[6] << ", " << vr_position[7] << ", " << vr_position[8] << "]" << std::endl; + + // VR 3-point orientations (quaternions: w, x, y, z) + std::cout << " VR 3-point orientations:" << std::endl; + std::cout << " Left wrist: [" << vr_orientation[0] << ", " << vr_orientation[1] << ", " + << vr_orientation[2] << ", " << vr_orientation[3] << "]" << std::endl; + std::cout << " Right wrist: [" << vr_orientation[4] << ", " << vr_orientation[5] << ", " + << vr_orientation[6] << ", " << vr_orientation[7] << "]" << std::endl; + std::cout << " Head: [" << vr_orientation[8] << ", " << vr_orientation[9] << ", " + << vr_orientation[10] << ", " << vr_orientation[11] << "]" << std::endl; + + if (has_hand_joints_) { + auto [has_left, left_hand] = GetHandPose(true); + auto [has_right, right_hand] = GetHandPose(false); + std::cout << " Left hand pose: ["; + for (size_t i = 0; i < 7; ++i) { + std::cout << left_hand[i]; + if (i < 6) std::cout << ", "; + } + std::cout << "]" << std::endl; + std::cout << " Right hand pose: ["; + for (size_t i = 0; i < 7; ++i) { + std::cout << right_hand[i]; + if (i < 6) std::cout << ", "; + } + std::cout << "]" << std::endl; + } + } + } + } else { + // No control goal data available + use_teleop_navigate_cmd_ = false; + } + } + + // Override the handle_input function from InputInterface + // Uses local boolean flags (set by update()) to perform actions on system state + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + + // Handle emergency stop (triggered by ROS2 errors/timeout) + if (emergency_stop_) { + std::cout << "[ROS2 EMERGENCY STOP] Triggering emergency stop due to ROS2 failure" << std::endl; + operator_state.stop = true; + return; // Skip all other processing + } + + // Handle safety reset from interface manager + // ROS2 requires planner to be enabled + if (trigger_safety_reset) { + trigger_safety_reset = false; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + } + if (has_planner && operator_state.start) { + control_is_active_ = true; + if (planner_state.enabled && planner_state.initialized) { + // Planner is already on, keep it as is (don't touch initialized flag) + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(1); + } + operator_state.play = true; + } + auto current_facing = movement_state_buffer.GetDataWithTime().data->facing_direction; + planner_facing_angle_ = std::atan2(current_facing[1], current_facing[0]); + std::cout << "Safety reset: Planner kept enabled with current state" << std::endl; + } else { + // Planner was disabled, go to first motion and set initial heading and movement state + // Set initial heading and movement state + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + // Set current motion and frame to reference motion (lock mutex) + { + std::lock_guard lock(current_motion_mutex); + auto temp_motion = std::make_shared(*current_motion); + temp_motion->name = "temporary_motion"; + current_motion = temp_motion; + } + + // Now it is safe to enable planner + // Ensure planner is enabled (always required in ROS2 mode) + planner_state.enabled = true; + planner_facing_angle_ = 0.0; + std::cout << "[ROS2] Planner enabled" << std::endl; + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[ROS2] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[ROS2 ERROR] Planner initialization timeout after 5 seconds" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[ROS2] Waiting for planner to be initialized" << std::endl; + } + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[ROS2 ERROR] Planner failed to initialize - ROS2 mode requires planner. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + // Play motion + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() == 0) { + current_motion->SetEncodeMode(1); + } + operator_state.play = true; + } + } + } + } + + // Check if planner is loaded (required for ROS2 mode) + if (!has_planner) { + std::cerr << "[ROS2 ERROR] Planner not loaded - ROS2 mode requires planner. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + // Handle control start/stop + if (this->stop_control_) { operator_state.stop = true; } + if (this->report_temperature_flag_) { report_temperature = true; } + + // Handle control start + if (this->start_control_) { + // Start control + operator_state.start = true; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + } + // Ensure planner is enabled (always required in ROS2 mode) + if (!planner_state.enabled) { + planner_state.enabled = true; + planner_facing_angle_ = 0.0; + std::cout << "[ROS2] Planner enabled" << std::endl; + } + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[ROS2] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[ROS2 ERROR] Planner initialization timeout after 5 seconds" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[ROS2] Waiting for planner to be initialized" << std::endl; + } + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[ROS2 ERROR] Planner failed to initialize - ROS2 mode requires planner. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + // Play motion + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } + + if (planner_state.enabled && planner_state.initialized) { + + // Set final movement values from navigate_cmd + int final_mode = static_cast(LocomotionMode::IDLE); + std::array final_movement = {0.0, 0.0, 0.0}; + std::array final_facing_direction = {1.0, 0.0, 0.0}; + double final_speed = 0.0; + double final_height = -1.0; + + // Get and process base_height_command (thread-safe copy) + double base_height = base_height_command_; + // Clip to valid range [0.1, 0.88] + base_height = std::clamp(base_height, 0.1, 0.88); + + // Convert navigate_cmd to movement direction and mode + if (use_teleop_navigate_cmd_) { + // navigate_cmd format: [lin_vel_x, lin_vel_y, ang_vel_z] + // Convert to movement_direction and mode + double lin_vel_x = navigate_cmd_from_teleop_[0]; + double lin_vel_y = navigate_cmd_from_teleop_[1]; + double ang_vel_z = navigate_cmd_from_teleop_[2]; + + // Update facing angle based on angular velocity (similar to gamepad) + if (std::abs(ang_vel_z) > 0.01f) { + // Negative sign matches gamepad behavior (positive ang_vel_z = turn left/CCW) + planner_facing_angle_ += ang_vel_z * 0.02; + } + + // Always compute facing direction from maintained angle (not from navigation topic) + final_facing_direction[0] = std::cos(planner_facing_angle_); + final_facing_direction[1] = std::sin(planner_facing_angle_); + final_facing_direction[2] = 0.0f; + + // Calculate movement magnitude + double movement_mag = std::sqrt(lin_vel_x * lin_vel_x + lin_vel_y * lin_vel_y); + + double planner_moving_direction = planner_facing_angle_; + + // Determine locomotion mode based on base_height_command first + if (base_height >= 0.72f) { + // Height 0.72-0.88: Normal walking modes + if (movement_mag > 0.01f) { + // Moving: use walk modes + // Compute moving direction (same as gamepad logic) + planner_moving_direction = std::atan2(lin_vel_y, lin_vel_x) + planner_moving_direction; + + // Bin the moving direction to 8 evenly spaced directions and get corresponding speed + auto [binned_angle, direction_speed] = bin_angle_to_8_directions(planner_moving_direction); + planner_moving_direction = binned_angle; + + // Compute normalized movement direction from binned angle + final_movement[0] = std::cos(planner_moving_direction); + final_movement[1] = std::sin(planner_moving_direction); + final_movement[2] = 0.0f; + + if (locomotion_mode_is_fast_) { + // Normal walk mode: default speed (-1) + final_mode = static_cast(LocomotionMode::WALK); + final_speed = -1.0f; + } else { + // Slow walk mode: speed varies by direction (faster forward/lateral, slower backward) + final_mode = static_cast(LocomotionMode::SLOW_WALK); + final_speed = direction_speed; + } + } else { + // No movement: idle + final_mode = static_cast(LocomotionMode::IDLE); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; + } + final_height = -1.0f; // Use default height for walking + + } else if (base_height >= 0.5f) { + // Height 0.5-0.72: Squat mode (static pose, no movement) + final_mode = static_cast(LocomotionMode::IDEL_SQUAT); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; // Use default speed (no walking while squatting) + final_height = base_height; // Pass actual height command + + } else { + // Height 0.1-0.5: Kneel mode (static pose, no movement) + final_mode = static_cast(LocomotionMode::IDEL_KNEEL); + final_movement = {0.0f, 0.0f, 0.0f}; + final_speed = -1.0f; // Use default speed (no walking while kneeling) + final_height = base_height; // Pass actual height command + } + } + + // Debug: Log final computed values being sent to planner + if constexpr (DEBUG_LOGGING) { + static int debug_counter = 0; + debug_counter++; + if (debug_counter % 50 == 0) { // Log every 50 calls to avoid spam + std::cout << "[ROS2 DEBUG] Planner control values:" << std::endl; + if (use_teleop_navigate_cmd_) { + std::cout << " Input navigate_cmd: [" << navigate_cmd_from_teleop_[0] << ", " + << navigate_cmd_from_teleop_[1] << ", " << navigate_cmd_from_teleop_[2] << "]" << std::endl; + std::cout << " Facing angle: " << planner_facing_angle_ << " rad (" + << (planner_facing_angle_ * 180.0 / M_PI) << " deg)" << std::endl; + } + std::cout << " Base height command: " << base_height_command_ + << " (clamped: " << std::clamp(base_height_command_, 0.1, 0.88) << ")" << std::endl; + std::cout << " Final mode: " << final_mode << " (0=idle, 1=slow, 2=walk, 3=run, 4=squat, 6=kneel)" << std::endl; + std::cout << " Final speed: " << final_speed << std::endl; + std::cout << " Final height: " << final_height << std::endl; + std::cout << " Movement direction: [" << final_movement[0] << ", " << final_movement[1] << ", " << final_movement[2] << "]" << std::endl; + std::cout << " Facing direction: [" << final_facing_direction[0] << ", " << final_facing_direction[1] << ", " << final_facing_direction[2] << "]" << std::endl; + } + } + + // Update thread-safe buffer (single source of truth for planner thread) + MovementState mode_state(final_mode, final_movement, final_facing_direction, final_speed, final_height); + movement_state_buffer.SetData(mode_state); + } + } + + // Get ROS2 node for external use (e.g., spinning) + std::shared_ptr get_node() const { return node_; } + + // Check if ROS2 node is healthy and receiving data + bool is_receiving_control_goal_data() const { return received_control_goal_.load(); } + bool is_ros2_ok() const { return rclcpp::ok() && node_ != nullptr; } + + // Reset data received flags (useful for debugging) + void reset_data_flags() { + received_control_goal_.store(false); + last_control_goal_time_ns_.store(0); + } + + // Get ROS timestamp in seconds (for state logging) + // This is ROS2-specific and not part of the InputInterface base class + double GetROSTimestamp() const { + if (node_) { + return node_->get_clock()->now().nanoseconds() / 1e9; + } + return 0.0; + } + +private: + // ------------------------------------------------------------------ + // ROS 2 infrastructure + // ------------------------------------------------------------------ + std::shared_ptr node_; ///< Lightweight ROS 2 node for this handler. + + /// Subscription to `ControlPolicy/upper_body_pose` (ByteMultiArray, msgpack). + rclcpp::Subscription::SharedPtr control_goal_sub_; + + // ------------------------------------------------------------------ + // Thread-safe receiving buffer (written by callback, read by update()) + // ------------------------------------------------------------------ + ControlGoalMsg control_goal_buffer_; ///< Latest deserialized message. + std::mutex control_goal_mutex_; ///< Guards control_goal_buffer_. + std::atomic received_control_goal_{false}; ///< True once at least one message arrived. + std::atomic last_control_goal_time_ns_{0}; ///< Monotonic timestamp of last message (ns). + static constexpr double CONTROL_GOAL_TIMEOUT = 1.0; ///< Seconds before a timeout reset. + + /// When true, use IK-processed transformation matrices for VR position; + /// when false, use raw left_wrist / right_wrist matrices. + bool use_ik_mode_ = false; + + // ------------------------------------------------------------------ + // Control-toggle state + // ------------------------------------------------------------------ + bool control_is_active_ = false; ///< Tracks the toggle state for toggle_policy_action. + bool locomotion_mode_is_fast_ = false; ///< false = SLOW_WALK (custom speed), true = WALK (default speed). + + // ------------------------------------------------------------------ + // Per-frame control flags (reset in update()) + // ------------------------------------------------------------------ + bool start_control_ = false; ///< Start control this frame. + bool stop_control_ = false; ///< Stop control this frame. + bool report_temperature_flag_ = false; ///< Report temperature this frame (F key). + + // ------------------------------------------------------------------ + // Teleop state (updated from control_goal_buffer_ in update()) + // ------------------------------------------------------------------ + std::array navigate_cmd_from_teleop_ = {0.0, 0.0, 0.0}; ///< [lin_x, lin_y, ang_z]. + bool use_teleop_navigate_cmd_ = false; ///< True while navigate_cmd is valid. + double base_height_command_ = 0.78; ///< Thread-safe copy of base_height_command. + + /// Accumulated facing angle (radians), integrated from ang_vel_z each frame. + double planner_facing_angle_ = 0.0; + + struct termios old_termios_; ///< Saved terminal state for restoration on destruction. + + /** + * @brief Deserialize a msgpack-encoded control-goal payload. + * @param data Raw bytes from the ByteMultiArray message. + * @return Parsed ControlGoalMsg (valid == true on success). + * + * Expected keys: navigate_cmd, wrist_pose, left_wrist_after_ik, + * right_wrist_after_ik, head_after_ik, left_wrist, right_wrist, + * base_height_command, toggle_policy_action, locomotion_mode, + * left_hand_joint, right_hand_joint, ros_timestamp. + */ + ControlGoalMsg parse_msgpack_control_goal(const std::vector& data) { + ControlGoalMsg msg; + msg.valid = false; + + try { + // Use msgpack-c library for clean, efficient parsing + msgpack::object_handle oh = msgpack::unpack(reinterpret_cast(data.data()), data.size()); + msgpack::object deserialized = oh.get(); + + // Convert to map + if (deserialized.type != msgpack::type::MAP) { + return msg; + } + + std::map map_data; + deserialized.convert(map_data); + + // Extract navigate_cmd (array of 3 doubles) + if (map_data.count("navigate_cmd") && map_data["navigate_cmd"].type == msgpack::type::ARRAY) { + auto nav_arr = map_data["navigate_cmd"].as>(); + if (nav_arr.size() >= 3) { + msg.navigate_cmd[0] = nav_arr[0]; + msg.navigate_cmd[1] = nav_arr[1]; + msg.navigate_cmd[2] = nav_arr[2]; + } + } + + // Extract wrist_pose (array of 14 doubles) + if (map_data.count("wrist_pose") && map_data["wrist_pose"].type == msgpack::type::ARRAY) { + auto wrist_arr = map_data["wrist_pose"].as>(); + if (wrist_arr.size() >= 14) { + std::copy_n(wrist_arr.begin(), 14, msg.wrist_pose.begin()); + } + } + + // Extract IK-processed matrices (16 doubles each) + if (map_data.count("left_wrist_after_ik") && map_data["left_wrist_after_ik"].type == msgpack::type::ARRAY) { + try { + auto nested_arr = map_data["left_wrist_after_ik"].as>>(); + if (nested_arr.size() == 4 && nested_arr[0].size() == 4) { + // Flatten 4x4 matrix to 1D array (row-major) + size_t idx = 0; + for (const auto& row : nested_arr) { + for (double val : row) { + msg.left_wrist_after_ik[idx++] = val; + } + } + msg.has_ik_data = true; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 ERROR] Failed to parse left_wrist_after_ik: " << e.what() << std::endl; + } + } + } + + if (map_data.count("right_wrist_after_ik") && map_data["right_wrist_after_ik"].type == msgpack::type::ARRAY) { + try { + auto nested_arr = map_data["right_wrist_after_ik"].as>>(); + if (nested_arr.size() == 4 && nested_arr[0].size() == 4) { + // Flatten 4x4 matrix to 1D array (row-major) + size_t idx = 0; + for (const auto& row : nested_arr) { + for (double val : row) { + msg.right_wrist_after_ik[idx++] = val; + } + } + msg.has_ik_data = true; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 ERROR] Failed to parse right_wrist_after_ik: " << e.what() << std::endl; + } + } + } + + if (map_data.count("head_after_ik") && map_data["head_after_ik"].type == msgpack::type::ARRAY) { + try { + auto nested_arr = map_data["head_after_ik"].as>>(); + if (nested_arr.size() == 4 && nested_arr[0].size() == 4) { + // Flatten 4x4 matrix to 1D array (row-major) + size_t idx = 0; + for (const auto& row : nested_arr) { + for (double val : row) { + msg.head_after_ik[idx++] = val; + } + } + msg.has_ik_data = true; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 ERROR] Failed to parse head_after_ik: " << e.what() << std::endl; + } + } + } + + // Extract non-IK wrist matrices (16 doubles each) + if (map_data.count("left_wrist") && map_data["left_wrist"].type == msgpack::type::ARRAY) { + try { + auto nested_arr = map_data["left_wrist"].as>>(); + if (nested_arr.size() == 4 && nested_arr[0].size() == 4) { + // Flatten 4x4 matrix to 1D array (row-major) + size_t idx = 0; + for (const auto& row : nested_arr) { + for (double val : row) { + msg.left_wrist[idx++] = val; + } + } + msg.has_wrist_matrices = true; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 ERROR] Failed to parse left_wrist: " << e.what() << std::endl; + } + } + } + + if (map_data.count("right_wrist") && map_data["right_wrist"].type == msgpack::type::ARRAY) { + try { + auto nested_arr = map_data["right_wrist"].as>>(); + if (nested_arr.size() == 4 && nested_arr[0].size() == 4) { + // Flatten 4x4 matrix to 1D array (row-major) + size_t idx = 0; + for (const auto& row : nested_arr) { + for (double val : row) { + msg.right_wrist[idx++] = val; + } + } + msg.has_wrist_matrices = true; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 ERROR] Failed to parse right_wrist: " << e.what() << std::endl; + } + } + } + + // Extract base_height_command (double) + if (map_data.count("base_height_command")) { + msg.base_height_command = map_data["base_height_command"].as(); + } + + // Extract toggle_policy_action (bool) + if (map_data.count("toggle_policy_action")) { + msg.toggle_policy_action = map_data["toggle_policy_action"].as(); + } + + // Extract locomotion_mode (int: 0 = slow walk, 1 = fast walk) + if (map_data.count("locomotion_mode")) { + msg.locomotion_mode = map_data["locomotion_mode"].as(); + } + + // Extract left_hand_joint (7 doubles - joint positions) + if (map_data.count("left_hand_joint") && map_data["left_hand_joint"].type == msgpack::type::ARRAY) { + auto left_hand_arr = map_data["left_hand_joint"].as>(); + if (left_hand_arr.size() >= 7) { + std::copy_n(left_hand_arr.begin(), 7, msg.left_hand_joint.begin()); + msg.has_hand_joints = true; + } + } + + // Extract right_hand_joint (7 doubles - joint positions) + if (map_data.count("right_hand_joint") && map_data["right_hand_joint"].type == msgpack::type::ARRAY) { + auto right_hand_arr = map_data["right_hand_joint"].as>(); + if (right_hand_arr.size() >= 7) { + std::copy_n(right_hand_arr.begin(), 7, msg.right_hand_joint.begin()); + msg.has_hand_joints = true; + } + } + + // Extract ros_timestamp (double - ROS time in seconds) + if (map_data.count("ros_timestamp")) { + msg.ros_timestamp = map_data["ros_timestamp"].as(); + } + + msg.valid = true; + + } catch (const std::exception& e) { + std::cerr << "[ROS2 ERROR] msgpack parsing failed: " << e.what() << std::endl; + msg.valid = false; + } + + return msg; + } + + /** + * @brief Extract the 3×3 rotation matrix from a flattened row-major 4×4 transform. + * @return 3×3 rotation matrix compatible with math_utils::rotation_matrix_to_quat_d(). + */ + std::array, 3> extract_rotation_from_transform(const std::array& transform) { + // 4x4 matrix in row-major: [R00,R01,R02,tx, R10,R11,R12,ty, R20,R21,R22,tz, 0,0,0,1] + return {{ + {transform[0], transform[1], transform[2]}, // Row 0 + {transform[4], transform[5], transform[6]}, // Row 1 + {transform[8], transform[9], transform[10]} // Row 2 + }}; + } + + /// Extract the translation vector [x, y, z] from a flattened row-major 4×4 transform. + std::array extract_position_from_transform(const std::array& transform) { + // 4x4 matrix in row-major: position is at [3, 7, 11] + return {transform[3], transform[7], transform[11]}; + } + + /// Multiply a 3×3 rotation matrix by a 3D offset vector (R × v). + std::array apply_rotation_to_offset( + const std::array, 3>& rot_mat, + const std::array& offset) { + return { + rot_mat[0][0] * offset[0] + rot_mat[0][1] * offset[1] + rot_mat[0][2] * offset[2], // Row 0 * offset + rot_mat[1][0] * offset[0] + rot_mat[1][1] * offset[1] + rot_mat[1][2] * offset[2], // Row 1 * offset + rot_mat[2][0] * offset[0] + rot_mat[2][1] * offset[1] + rot_mat[2][2] * offset[2] // Row 2 * offset + }; + } + + /** + * @brief Quantise an angle to the nearest 45° bin and return a direction-dependent speed. + * + * The 8 bins: 0° (forward), ±45° (forward-diagonal), ±90° (lateral), + * ±135° (backward-diagonal), 180° (backward). + * + * @param angle Input angle in radians (will be normalised to [−π, π]). + * @return {binned_angle, slow_walk_speed} – angle snapped to nearest bin, + * and the corresponding speed for SLOW_WALK mode (faster forward, + * slower backward). + */ + std::pair bin_angle_to_8_directions(double angle) { + constexpr double BIN_SIZE = M_PI / 4.0; // 45 degrees in radians + constexpr int NUM_BINS = 8; + + // Normalize angle to [-π, π] + while (angle > M_PI) angle -= 2.0 * M_PI; + while (angle < -M_PI) angle += 2.0 * M_PI; + + // Find nearest bin + int bin_index = static_cast(std::round(angle / BIN_SIZE)); + + // Handle wrap-around (bin_index can be -4 to 4) + if (bin_index > 4) bin_index -= NUM_BINS; + if (bin_index < -4) bin_index += NUM_BINS; + + // Convert back to angle + double binned_angle = bin_index * BIN_SIZE; + + // Determine speed based on direction bin for slow walk mode + // Faster forward/lateral, slower backward + double slow_walk_speed; + switch (bin_index) { + case 0: // Forward (0°) + case 1: // Forward-right (45°) + case -1: // Forward-left (-45°) + slow_walk_speed = 0.3f; + break; + case 2: // Right (90°) + case -2: // Left (-90°) + slow_walk_speed = 0.35f; + break; + case 3: // Back-right (135°) + case -3: // Back-left (-135°) + slow_walk_speed = 0.25f; + break; + case 4: // Backward (180°) + case -4: // Backward (-180°) + slow_walk_speed = 0.2f; + break; + default: + slow_walk_speed = 0.2f; // Fallback + break; + } + + return {binned_angle, slow_walk_speed}; + } + + /** + * @brief ROS 2 subscriber callback (runs on the executor thread). + * + * Deserialises the ByteMultiArray payload via msgpack, stores the result + * in `control_goal_buffer_` under `control_goal_mutex_`, and sets the + * `received_control_goal_` flag. Edge-triggered commands (toggle_policy_action) + * are accumulated with OR logic to prevent lost pulses. + */ + void control_goal_callback(std::shared_ptr msg) { + try { + // Convert ByteMultiArray to vector + // msg->data is already std::vector, so just copy it + std::vector data(msg->data.begin(), msg->data.end()); + + // Parse msgpack data + ControlGoalMsg goal_msg = parse_msgpack_control_goal(data); + + if (goal_msg.valid) { + // Store in receiving buffer (thread-safe) + { + std::lock_guard lock(control_goal_mutex_); + // Edge-triggered commands: accumulate with OR (like mode_control) + // This prevents losing a toggle if it arrives between update() cycles + bool prev_toggle_policy = control_goal_buffer_.toggle_policy_action; + control_goal_buffer_ = goal_msg; + control_goal_buffer_.toggle_policy_action = prev_toggle_policy || goal_msg.toggle_policy_action; + // locomotion_mode is a direct state value (0 or 1), not accumulated + } + received_control_goal_.store(true); + // Update timestamp for timeout tracking (using steady_clock for monotonic timing) + last_control_goal_time_ns_.store(std::chrono::steady_clock::now().time_since_epoch().count()); + + if constexpr (DEBUG_LOGGING) { + static int goal_counter = 0; + goal_counter++; + if (goal_counter % 50 == 0) { // Log every 50 messages to avoid spam + std::cout << "[ROS2 DEBUG] Control goal message received:" << std::endl; + std::cout << " navigate_cmd: [" << goal_msg.navigate_cmd[0] << ", " + << goal_msg.navigate_cmd[1] << ", " << goal_msg.navigate_cmd[2] << "]" << std::endl; + std::cout << " base_height: " << goal_msg.base_height_command << std::endl; + } + } + } else { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Invalid control goal message received" << std::endl; + } + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 ERROR] Failed to process control goal message: " << e.what() << std::endl; + } + } + } + + // Helper method to initialize ROS2 subscriber + void setup_subscribers() { + // Create subscriber for control goal topic (teleop commands from Python) + control_goal_sub_ = node_->create_subscription( + "ControlPolicy/upper_body_pose", + 1, // QoS depth = 1 for some buffering + [this](std::shared_ptr msg) { + this->control_goal_callback(msg); + } + ); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 DEBUG] Control goal subscriber created for topic: ControlPolicy/upper_body_pose" << std::endl; + } + } + + /* + * ROS2 Topic Structure: + * + * ControlPolicy/upper_body_pose (std_msgs/ByteMultiArray) - msgpack-serialized ControlGoalMsg: + * - navigate_cmd: double[3] (navigation velocities [lin_vel_x, lin_vel_y, ang_vel_z]) + * - wrist_pose: double[14] (left + right wrist poses: [x,y,z,qw,qx,qy,qz] * 2) + * - left_wrist_after_ik: double[16] (4x4 transformation matrix, flattened row-major) + * - right_wrist_after_ik: double[16] (4x4 transformation matrix, flattened row-major) + * - head_after_ik: double[16] (4x4 transformation matrix, flattened row-major) + * - left_wrist: double[16] (4x4 transformation matrix, flattened row-major, non-IK) + * - right_wrist: double[16] (4x4 transformation matrix, flattened row-major, non-IK) + * - left_hand_joint: double[7] (7 DOF joint positions for left hand) + * - right_hand_joint: double[7] (7 DOF joint positions for right hand) + * - base_height_command: double (desired base height) + * - toggle_policy_action: bool (toggle between start/stop control) + * - locomotion_mode: int (0 = slow walk with custom speed, 1 = fast walk with default speed) + * - ros_timestamp: double (ROS time in seconds for synchronization) + * - valid: bool (message validity flag) + */ +}; + +#endif // HAS_ROS2 + +#endif // ROS2_INPUT_HANDLER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/streamed_motion_merger.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/streamed_motion_merger.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e128f43682c93cfc64185777bfe41e74fdfdb41f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/streamed_motion_merger.hpp @@ -0,0 +1,517 @@ +/** + * @file streamed_motion_merger.hpp + * @brief Reusable sliding-window merger for streamed motion data. + * + * StreamedMotionMerger receives chunks of motion frames (joint positions / + * velocities, body quaternions, SMPL data) from any streaming source (ZMQ, + * ROS2, etc.) and merges them into a single growing MotionSequence using a + * sliding-window approach. + * + * ## Key Concepts + * + * - **Frame indices**: Each incoming chunk carries a vector of monotonically + * increasing integer indices that identify frames in a global timeline. + * The merger uses these to align new data with the existing window. + * + * - **Frame step**: The stride between consecutive frame indices (e.g. 2 if + * the sender runs at 60 Hz and the consumer at 30 Hz). Detected + * automatically from the first two indices of each chunk. + * + * - **Sliding window**: The merger maintains a window of frames centred + * around the current playback position. It keeps `HISTORY_FRAMES` past + * frames for smooth interpolation and appends new frames from the + * incoming chunk. Old frames that fall behind the window are discarded. + * + * - **Catch-up reset**: If the gap between the playback position and the + * incoming data exceeds `MAX_GAP_FRAMES`, the merger resets the window + * to the start of the incoming chunk and signals the caller to reset + * the playback cursor to frame 0. This prevents unbounded buffering + * when the network falls behind. + * + * - **Protocol versions**: The merger itself is version-agnostic – it + * merges whatever data fields are present in IncomingData. Protocol- + * version validation (rejecting changes mid-session, etc.) is left to + * the caller (e.g. ZMQEndpointInterface). + * + * ## Thread Safety + * + * The merger is **not** thread-safe. All calls must be serialised by the + * caller (typically by holding the data_mutex_ in ZMQEndpointInterface). + */ + +#ifndef STREAMED_MOTION_MERGER_HPP +#define STREAMED_MOTION_MERGER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + +// Forward declaration – MotionSequence is defined in motion_data_reader.hpp. +struct MotionSequence; + +/** + * @class StreamedMotionMerger + * @brief Merges incoming motion-frame chunks into a sliding-window + * MotionSequence for real-time playback. + */ +class StreamedMotionMerger { +public: + /// Compile-time toggle for debug log output. + static constexpr bool DEBUG_LOGGING = true; + /// Number of already-consumed frames to retain before the playback cursor + /// (provides look-back for interpolation / blending). + static constexpr int HISTORY_FRAMES = 5; + /// Maximum tolerated gap (in current-rate frames) before a catch-up reset. + static constexpr int MAX_GAP_FRAMES = 200; + + /// Returned by MergeIncomingData() to communicate what happened. + struct MergeResult { + std::shared_ptr motion; ///< Merged motion (nullptr on failure). + int window_start = 0; ///< Global frame index of motion[0]. + int frame_offset_adjustment = 0; ///< Subtract from current_frame to compensate for window shift. + bool did_catchup_reset = false; ///< True → caller should reset playback to frame 0. + int frame_step = 1; ///< Detected stride between consecutive frame indices. + int protocol_version = 0; ///< Protocol version of the incoming data (1, 2, or 3). + }; + + /// All the data needed for one merge operation, decoded by the caller. + struct IncomingData { + // -- Joint data (required in v1 & v3, optional in v2) -- + std::vector> joint_pos; ///< [frame][joint] positions (radians). + std::vector> joint_vel; ///< [frame][joint] velocities (rad/s). + + // -- Body quaternions (required for all versions) -- + std::vector>> body_quat; ///< [frame][body][w,x,y,z]. + + // -- SMPL data (required in v2 & v3, optional in v1) -- + std::vector>> smpl_joints; ///< [frame][joint][x,y,z]. + std::vector>> smpl_pose; ///< [frame][pose][axis-angle x,y,z]. + + std::vector frame_indices; ///< Monotonic global frame indices (required). + + int protocol_version = 1; ///< Protocol version (1, 2, or 3). + bool catch_up_enabled = true; ///< true → use MAX_GAP_FRAMES; false → allow infinite delay. + + // Derived dimensions (must match the vector sizes above) + int num_frames = 0; ///< Number of frames in this chunk. + int num_joints = 0; ///< Joints per frame (joint_pos / joint_vel width). + int num_quat_bodies = 0; ///< Number of rigid bodies per frame (body_quat width). + int num_smpl_joints = 0; ///< SMPL joints per frame. + int num_smpl_poses = 0; ///< SMPL pose parameters per frame. + }; + + StreamedMotionMerger() { + Reset(); + } + + // Reset the merger state (clear all buffered data) + void Reset() { + streamed_motion_ = std::make_shared(); + streamed_motion_->name = "streamed"; + streamed_motion_->ReserveCapacity(15000, 29, 1, 1, 0, 0); + stream_window_start_ = 0; + } + + // Main merging method: merge incoming data with existing buffered data + // Returns MergeResult containing the merged motion and playback adjustments + // + // Note: Protocol version validation should be done by the caller before calling this method. + // The merger doesn't care about protocol versions - it just merges the data. + MergeResult MergeIncomingData(const IncomingData& data, int current_playback_frame) { + MergeResult result; + + // Validate incoming data + if (!ValidateIncomingData(data)) { + std::cerr << "[StreamedMotionMerger] Invalid incoming data" << std::endl; + return result; + } + + // Extract frame step and validate + int frame_step = CalculateFrameStep(data.frame_indices); + int incoming_frame_start = static_cast(data.frame_indices[0]); + int incoming_frame_end = static_cast(data.frame_indices[data.num_frames - 1]); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] Processing " << data.num_frames << " frames, " + << "incoming_frame_start=" << incoming_frame_start + << ", frame_step=" << frame_step << std::endl; + } + + // Calculate sliding window parameters + int global_playback_frame = stream_window_start_ + frame_step * std::max(0, current_playback_frame - HISTORY_FRAMES); + int new_window_start = stream_window_start_; + int merge_dst_frame = 0; + bool did_catchup = false; + + CalculateSlidingWindow( + incoming_frame_start, + incoming_frame_end, + frame_step, + current_playback_frame, + global_playback_frame, + data.catch_up_enabled, + new_window_start, + merge_dst_frame, + did_catchup + ); + + // Create new motion sequence + auto new_motion = CreateNewMotion(data); + + // Copy old data to fill gap before incoming data + if (merge_dst_frame > 0) { + CopyOldDataToNewMotion( + streamed_motion_, + stream_window_start_, + new_motion, + new_window_start, + incoming_frame_start, + frame_step, + data + ); + } + + // Copy incoming data to new motion + CopyIncomingDataToMotion(data, new_motion, merge_dst_frame); + + // Update total timesteps + new_motion->timesteps = merge_dst_frame + data.num_frames; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] Merged motion: " << new_motion->timesteps + << " frames (copied: " << merge_dst_frame << " + incoming: " << data.num_frames << ")" << std::endl; + } + + // Calculate frame offset adjustment BEFORE updating state + int old_window_start = stream_window_start_; + int window_shift_ticks = new_window_start - old_window_start; + int window_shift = (frame_step > 0) ? (window_shift_ticks / frame_step) : 0; + + // Update state + streamed_motion_ = new_motion; + stream_window_start_ = new_window_start; + + // Build result + result.motion = new_motion; + result.window_start = new_window_start; + result.frame_offset_adjustment = did_catchup ? 0 : window_shift; + result.did_catchup_reset = did_catchup; + result.frame_step = frame_step; + result.protocol_version = data.protocol_version; + + return result; + } + +private: + std::shared_ptr streamed_motion_; + int stream_window_start_ = 0; + + // Validate incoming data structure + bool ValidateIncomingData(const IncomingData& data) const { + // Check required fields + if (data.body_quat.empty() || data.frame_indices.empty()) { + std::cerr << "[StreamedMotionMerger] Missing required fields (body_quat or frame_indices)" << std::endl; + return false; + } + + // Validate protocol-specific requirements + if (data.protocol_version == 3) { + // Version 3: requires both SMPL data AND joint data + if (data.smpl_joints.empty() || data.smpl_pose.empty()) { + std::cerr << "[StreamedMotionMerger] Protocol v3 missing smpl_joints or smpl_pose" << std::endl; + return false; + } + if (data.joint_pos.empty() || data.joint_vel.empty()) { + std::cerr << "[StreamedMotionMerger] Protocol v3 missing joint_pos or joint_vel" << std::endl; + return false; + } + } else if (data.protocol_version == 2) { + // Version 2: requires SMPL data (joint data optional) + if (data.smpl_joints.empty() || data.smpl_pose.empty()) { + std::cerr << "[StreamedMotionMerger] Protocol v2 missing smpl_joints or smpl_pose" << std::endl; + return false; + } + } else if (data.protocol_version == 1) { + // Version 1: requires joint data (SMPL data optional) + if (data.joint_pos.empty() || data.joint_vel.empty()) { + std::cerr << "[StreamedMotionMerger] Protocol v1 missing joint_pos or joint_vel" << std::endl; + return false; + } + } else { + std::cerr << "[StreamedMotionMerger] Unsupported protocol version: " << data.protocol_version << std::endl; + return false; + } + + return true; + } + + // Calculate frame step from frame indices + int CalculateFrameStep(const std::vector& frame_indices) const { + if (frame_indices.size() < 2) { + return 1; + } + int64_t step = std::abs(frame_indices[1] - frame_indices[0]); + return step > 0 ? static_cast(step) : 1; + } + + // Calculate sliding window parameters + void CalculateSlidingWindow( + int incoming_frame_start, + int incoming_frame_end, + int frame_step, + int current_playback_frame, + int global_playback_frame, + bool catch_up_enabled, + int& new_window_start, + int& merge_dst_frame, + bool& did_catchup + ) { + // Special case: first packet + if (!streamed_motion_ || streamed_motion_->timesteps <= 0) { + new_window_start = incoming_frame_start; + merge_dst_frame = 0; + did_catchup = true; + return; + } + + // Calculate max gap based on catch_up flag + int max_gap_frames = catch_up_enabled + ? (MAX_GAP_FRAMES + HISTORY_FRAMES) + : std::numeric_limits::max(); + + + int stream_window_end = stream_window_start_ + frame_step * (streamed_motion_->timesteps - 1); + + if (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] incoming_frame_start: " << incoming_frame_start + << ", incoming_frame_end: " << incoming_frame_end + << ", stream_window_start_: " << stream_window_start_ + << ", stream_window_end: " << stream_window_end + << ", frame_step: " << frame_step + << ", global_playback_frame: " << global_playback_frame + << ", streamed_motion_->timesteps: " << streamed_motion_->timesteps + << std::endl; + } + + // Check for incoming data older than current window + if (incoming_frame_start <= stream_window_start_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] WARNING: incoming_frame_start (" << incoming_frame_start + << ") < stream_window_start_ (" << stream_window_start_ << ") - forcing catch-up" << std::endl; + } + new_window_start = incoming_frame_start; + merge_dst_frame = 0; + did_catchup = true; + return; + } else if (incoming_frame_end <= stream_window_end) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] WARNING: incoming_frame_end (" << incoming_frame_end + << ") <= stream_window_end (" << stream_window_end << ") - forcing catch-up" << std::endl; + } + new_window_start = incoming_frame_start; + merge_dst_frame = 0; + did_catchup = true; + return; + } + + // Tentative window aligned to playback + int desired_window_start = global_playback_frame; + int tentative_window_start = std::min(desired_window_start, incoming_frame_start); + int delta_to_incoming = incoming_frame_start - tentative_window_start; + int tentative_merge_dst = (frame_step > 0) ? (delta_to_incoming / frame_step) : 0; + + // Check for large gap + bool large_gap_from_old = incoming_frame_start > stream_window_end + frame_step; + + if (tentative_merge_dst > max_gap_frames || large_gap_from_old) { + // Catch-up: reset window to incoming frame + new_window_start = incoming_frame_start; + merge_dst_frame = 0; + did_catchup = true; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] CATCH-UP: gap too large or old data expired" << std::endl; + } + } else { + // Normal merge + new_window_start = tentative_window_start; + merge_dst_frame = tentative_merge_dst; + } + } + + // Create new motion sequence with appropriate capacity + std::shared_ptr CreateNewMotion(const IncomingData& data) const { + auto new_motion = std::make_shared(); + new_motion->name = "streamed"; + + int joints_to_reserve = data.num_joints; + int bodies_to_reserve = 1; + int body_quaternions_to_reserve = data.num_quat_bodies; + int smpl_joints_to_reserve = data.num_smpl_joints; + int smpl_poses_to_reserve = data.num_smpl_poses; + + new_motion->ReserveCapacity( + 15000, + joints_to_reserve, + bodies_to_reserve, + body_quaternions_to_reserve, + smpl_joints_to_reserve, + smpl_poses_to_reserve + ); + + // Initialize body_part_indexes (typically just root for streaming) + new_motion->SetBodyPartIndexes({0}); + + return new_motion; + } + + // Copy old data to new motion to fill gap before incoming data + void CopyOldDataToNewMotion( + std::shared_ptr old_motion, + int old_window_start, + std::shared_ptr new_motion, + int new_window_start, + int incoming_frame_start, + int frame_step, + const IncomingData& data + ) { + if (!old_motion || old_motion->timesteps <= 0) { + return; + } + + int old_window_end = old_window_start + frame_step * old_motion->timesteps; + + // Find overlap between old data and needed range + int need_start_global = new_window_start; + int need_end_global = incoming_frame_start; + int overlap_start_global = std::max(need_start_global, old_window_start); + int overlap_end_global = std::min(need_end_global, old_window_end); + + if (overlap_start_global >= overlap_end_global) { + return; // No overlap + } + + // Calculate copy parameters + int start_offset_old = overlap_start_global - old_window_start; + int start_offset_new = overlap_start_global - new_window_start; + int overlap_span = overlap_end_global - overlap_start_global; + int copy_src_idx = (frame_step > 0) ? (start_offset_old / frame_step) : 0; + int copy_dst_idx = (frame_step > 0) ? (start_offset_new / frame_step) : 0; + int copy_count = (frame_step > 0) ? (overlap_span / frame_step) : 0; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[StreamedMotionMerger] Copying old data: " + << "global [" << overlap_start_global << ".." << (overlap_end_global-1) << "] → " + << "new_motion[" << copy_dst_idx << ".." << (copy_dst_idx + copy_count - 1) << "]" << std::endl; + } + + // Copy joint data if present + if (data.num_joints > 0 && old_motion->GetNumJoints() > 0) { + int joints_to_copy = std::min(data.num_joints, old_motion->GetNumJoints()); + for (int i = 0; i < copy_count; ++i) { + for (int joint = 0; joint < joints_to_copy; ++joint) { + new_motion->JointPositions(copy_dst_idx + i)[joint] = + old_motion->JointPositions(copy_src_idx + i)[joint]; + new_motion->JointVelocities(copy_dst_idx + i)[joint] = + old_motion->JointVelocities(copy_src_idx + i)[joint]; + } + } + } + + // Copy body quaternions + int old_quat_bodies = old_motion->GetNumBodyQuaternions(); + int quat_bodies_to_copy = std::min(data.num_quat_bodies, old_quat_bodies); + for (int i = 0; i < copy_count; ++i) { + for (int b = 0; b < quat_bodies_to_copy; ++b) { + for (int q = 0; q < 4; ++q) { + new_motion->BodyQuaternions(copy_dst_idx + i)[b][q] = + old_motion->BodyQuaternions(copy_src_idx + i)[b][q]; + } + } + } + + // Copy SMPL data if present + if (data.num_smpl_joints > 0 && old_motion->GetNumSmplJoints() > 0) { + int smpl_joints_to_copy = std::min(data.num_smpl_joints, old_motion->GetNumSmplJoints()); + for (int i = 0; i < copy_count; ++i) { + for (int joint = 0; joint < smpl_joints_to_copy; ++joint) { + for (int xyz = 0; xyz < 3; ++xyz) { + new_motion->SmplJoints(copy_dst_idx + i)[joint][xyz] = + old_motion->SmplJoints(copy_src_idx + i)[joint][xyz]; + } + } + } + } + + if (data.num_smpl_poses > 0 && old_motion->GetNumSmplPoses() > 0) { + int smpl_poses_to_copy = std::min(data.num_smpl_poses, old_motion->GetNumSmplPoses()); + for (int i = 0; i < copy_count; ++i) { + for (int p = 0; p < smpl_poses_to_copy; ++p) { + for (int xyz = 0; xyz < 3; ++xyz) { + new_motion->SmplPoses(copy_dst_idx + i)[p][xyz] = + old_motion->SmplPoses(copy_src_idx + i)[p][xyz]; + } + } + } + } + } + + // Copy incoming data to motion sequence + void CopyIncomingDataToMotion( + const IncomingData& data, + std::shared_ptr motion, + int dst_frame_offset + ) { + // Copy joint data if present + if (!data.joint_pos.empty() && !data.joint_vel.empty()) { + for (int frame = 0; frame < data.num_frames; ++frame) { + for (int joint = 0; joint < data.num_joints; ++joint) { + motion->JointPositions(dst_frame_offset + frame)[joint] = data.joint_pos[frame][joint]; + motion->JointVelocities(dst_frame_offset + frame)[joint] = data.joint_vel[frame][joint]; + } + } + } + + // Copy body quaternions (always present) + for (int frame = 0; frame < data.num_frames; ++frame) { + for (int body = 0; body < data.num_quat_bodies; ++body) { + for (int q = 0; q < 4; ++q) { + motion->BodyQuaternions(dst_frame_offset + frame)[body][q] = + data.body_quat[frame][body][q]; + } + } + } + + // Copy SMPL joints if present + if (!data.smpl_joints.empty()) { + for (int frame = 0; frame < data.num_frames; ++frame) { + for (int joint = 0; joint < data.num_smpl_joints; ++joint) { + for (int xyz = 0; xyz < 3; ++xyz) { + motion->SmplJoints(dst_frame_offset + frame)[joint][xyz] = + data.smpl_joints[frame][joint][xyz]; + } + } + } + } + + // Copy SMPL poses if present + if (!data.smpl_pose.empty()) { + for (int frame = 0; frame < data.num_frames; ++frame) { + for (int pose = 0; pose < data.num_smpl_poses; ++pose) { + for (int xyz = 0; xyz < 3; ++xyz) { + motion->SmplPoses(dst_frame_offset + frame)[pose][xyz] = + data.smpl_pose[frame][pose][xyz]; + } + } + } + } + } +}; + +#endif // STREAMED_MOTION_MERGER_HPP + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_endpoint_interface.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_endpoint_interface.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4f567651044f7c175c85d96546296e694bd01e21 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_endpoint_interface.hpp @@ -0,0 +1,1865 @@ +/** + * @file zmq_endpoint_interface.hpp + * @brief ZMQ-based input interface for receiving streamed pose / motion data. + * + * ZMQEndpointInterface combines SimpleKeyboard-style local controls with + * network-streamed motion data received via the ZMQ packed-message protocol. + * Pressing **Enter** toggles between pre-loaded reference motions and live + * ZMQ streaming. + * + * ## Keyboard Controls (when this interface is active) + * + * Key | Action + * -------|------- + * Enter | Toggle ZMQ streaming on/off + * P/p | Previous motion (non-streaming mode) + * N/n | Next motion + * T/t | Play / resume + * R/r | Restart (frame 0, paused) + * ] | Start control + * O/o | Emergency stop + * Q/q | Delta heading left + * E/e | Delta heading right + * I/i | Reinitialise heading + * + * ## Protocol Versions + * + * All versions carry `body_quat` and `frame_index` as required fields. + * Additionally: + * + * Version | Required | Optional + * --------|----------------------------------|--------------------------- + * 1 | joint_pos, joint_vel | smpl_joints, smpl_pose + * 2 | smpl_joints, smpl_pose | joint_pos, joint_vel + * 3 | joint_pos, joint_vel, smpl_joints, smpl_pose | — + * + * ## Optional Fields (all versions) + * + * - `left_hand_joints`, `right_hand_joints` – 7-DOF Dex3 joint values. + * - `vr_position` (9 doubles) – enables VR 3-point tracking mode. + * - `vr_orientation` (12 doubles) – defaults used if absent. + * - `vr_compliance` (3 doubles) – **IGNORED** (compliance is keyboard-controlled). + * - `catch_up` (bool, default true) – controls gap tolerance for motion sync. + * - `heading_increment` (scalar) – incremental heading adjustment per message. + * + * ## Streaming Architecture + * + * 1. A background ZMQPackedMessageSubscriber thread receives messages and + * copies them into `buffered_header_` / `buffered_buffers_` under `data_mutex_`. + * 2. update() reads keyboard input and resets per-frame flags. + * 3. handle_input() checks `has_new_data_`, decodes the buffered message via + * DecodeIntoMotionSequence() (which delegates to StreamedMotionMerger for + * sliding-window logic), and swaps the current_motion pointer. + */ + +#ifndef ZMQ_ENDPOINT_INTERFACE_HPP +#define ZMQ_ENDPOINT_INTERFACE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "input_interface.hpp" +#include "zmq_packed_message_subscriber.hpp" +#include "streamed_motion_merger.hpp" + +/** + * @class ZMQEndpointInterface + * @brief InputInterface that streams pose / motion data over ZMQ and merges + * it into a MotionSequence for real-time playback. + * + * Can operate standalone (keyboard + network) or as a delegate inside + * InterfaceManager / GamepadManager / ZMQManager. + * + * Protocol Version 4 additionally supports token-only streaming: + * REQUIRED: token_state (motion token array) + * OPTIONAL: frame_index, left_hand_joints, right_hand_joints, body_quat_w + * STORES: token_state → external_token_state_ (for policy input) + * hand joints → left_hand_joint_/right_hand_joint_ (for robot control) + */ +class ZMQEndpointInterface : public InputInterface { +public: + /// Compile-time toggle for debug log output. + static constexpr bool DEBUG_LOGGING = true; + + // ------------------------------------------------------------------ + // Per-frame action flags (reset at the start of every update() call) + // ------------------------------------------------------------------ + bool motion_prev = false; ///< Previous pre-loaded motion. + bool motion_next = false; ///< Next pre-loaded motion. + bool play_motion = false; ///< Play / resume. + bool motion_restart = false; ///< Restart (frame 0, paused). + bool start_control = false; ///< Start control system. + bool stop_control = false; ///< Emergency stop. + bool delta_left = false; ///< Heading nudge left. + bool delta_right = false; ///< Heading nudge right. + bool reinitialize = false; ///< Recapture IMU heading. + bool toggle_zmq_mode = false; ///< Toggle ZMQ streaming on/off (Enter key). + bool report_temperature = false; ///< Report motor temperatures (F key). + + /// When true, handle_input() reads from the ZMQ stream instead of + /// pre-loaded reference motions. + bool use_zmq_stream = false; + + /// Reusable sliding-window merger that handles frame alignment, gap + /// detection, and catch-up logic for streamed motion data. + StreamedMotionMerger motion_merger_; + + /// Protocol version established by the first received ZMQ message. + /// −1 = not yet established. Changing mid-session is an error. + int active_protocol_version_ = -1; + + /// Shared pointer to the latest merged motion sequence from ZMQ data. + std::shared_ptr streamed_motion_; + /// Global frame index corresponding to streamed_motion_[0]. + int stream_window_start_ = 0; + + static constexpr std::string_view LOCALHOST = "localhost"; + + ZMQEndpointInterface( + const std::string& host = std::string(LOCALHOST), + int port = 5556, + const std::string& topic = "pose", + bool use_conflate = false, + bool verbose = false + ) : InputInterface(), host_(host), port_(port), topic_(topic), verbose_(verbose), is_localhost_(host == LOCALHOST) { + type_ = InputType::NETWORK; + + // Set terminal to non-blocking mode (same as SimpleKeyboard) + tcgetattr(STDIN_FILENO, &old_termios_); + struct termios new_termios = old_termios_; + new_termios.c_lflag &= ~(ICANON | ECHO); + tcsetattr(STDIN_FILENO, TCSANOW, &new_termios); + fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK); + + // Create ZMQ subscriber + subscriber_ = std::make_unique( + host, port, topic, + /*timeout_ms=*/100, + verbose, + use_conflate, + /*rcv_hwm=*/ use_conflate ? 1 : 3 + ); + + // Setup callback to receive and buffer pose data + subscriber_->SetOnDecodedMessage( + [this](const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + this->OnPoseDataReceived(topic, hdr, bufs); + } + ); + + // Start background receiving thread + subscriber_->Start(); + + // Initialize streamed motion buffer (reserve large capacity for streaming) + ResetStreamedMotion(); + + std::cout << "[ZMQEndpointInterface] Connected to " << host << ":" << port + << " topic='" << topic << "'" << std::endl; + std::cout << "[ZMQEndpointInterface] Press ENTER to toggle between loaded motions and ZMQ stream" << std::endl; + } + + ~ZMQEndpointInterface() { + if (subscriber_) { + subscriber_->Stop(); + } + // Restore terminal + tcsetattr(STDIN_FILENO, TCSANOW, &old_termios_); + } + + // Flag to trigger safety reset in handle_input + bool trigger_safety_reset = false; + + // Update is called each frame - read keyboard and check for network data + void update() override { + // Check for safety reset trigger from manager + if (CheckAndClearSafetyReset()) { + use_zmq_stream = false; + trigger_safety_reset = true; + std::cout << "[ZMQEndpointInterface] Safety reset triggered: will disable ZMQ streaming and return to reference motion" << std::endl; + } + + // Reset input flags each frame + start_control = false; + stop_control = false; + motion_prev = false; + motion_next = false; + play_motion = false; + motion_restart = false; + delta_left = false; + delta_right = false; + reinitialize = false; + toggle_zmq_mode = false; + report_temperature = false; + + // Read keyboard input (same as SimpleKeyboard, but without planner keys) + // Using shared buffered reading + char ch; + while (ReadStdinChar(ch)) { + switch (ch) { + case 'p': + case 'P': motion_prev = true; break; + case 'n': + case 'N': motion_next = true; break; + case 't': + case 'T': play_motion = true; break; + case 'r': + case 'R': motion_restart = true; break; + case ']': start_control = true; break; + case 'o': + case 'O': stop_control = true; break; + case 'f': + case 'F': report_temperature = true; break; + case 'q': + case 'Q': delta_left = true; break; + case 'e': + case 'E': delta_right = true; break; + case 'i': + case 'I': reinitialize = true; break; + case '\n': toggle_zmq_mode = true; break; // Toggle ZMQ streaming + } + } + + } + + /// Disable ZMQ streaming, reset to reference motion, and clear external token state. + /// Called when an unrecoverable protocol error is detected during ZMQ processing. + void DisableZmqAndReset( + MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + std::mutex& current_motion_mutex, + const std::string& reason) + { + std::cerr << "✗✗✗ ERROR: " << reason << std::endl; + std::cerr << "✗✗✗ This is not allowed. Exiting ZMQ streaming mode for safety." << std::endl; + + use_zmq_stream = false; + + { + std::lock_guard lock(current_motion_mutex); + has_external_token_state_ = false; + external_token_state_.SetData({}); + operator_state.play = false; + reinitialize_heading = true; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); + current_frame = 0; + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(0); + } + } + + std::cout << "=====================================" << std::endl; + std::cout << "ZMQ STREAMING MODE: FORCE DISABLED" << std::endl; + std::cout << "=====================================" << std::endl; + std::cout << "Returned to reference motion. Re-enable ZMQ mode to continue." << std::endl; + } + + // Handle input and update motion data + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + + // Handle safety reset from interface manager + if (trigger_safety_reset) { + trigger_safety_reset = false; + + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + { + std::lock_guard lock(current_motion_mutex); + // Encoder mode will be read from the motion's encode_mode + has_external_token_state_ = false; + external_token_state_.SetData({}); + operator_state.play = false; + reinitialize_heading = true; + auto temp_motion = std::make_shared(*current_motion); + temp_motion->name = "temporary_motion"; + current_motion = temp_motion; + if (has_planner && planner_state.enabled) { + planner_state.enabled = false; + planner_state.initialized = false; + std::cout << "Safety reset: Planner disabled" << std::endl; + } + } + + // Disable ZMQ streaming and return to reference motion + use_zmq_stream = false; + ResetStreamedMotion(); // Reset motion merger and protocol version + + std::cout << "Safety reset: ZMQ streaming disabled, returned to reference motion at frame 0" << std::endl; + } + + // Handle ZMQ mode toggle + if (toggle_zmq_mode) { + use_zmq_stream = !use_zmq_stream; + if (use_zmq_stream) { + std::cout << "=====================================" << std::endl; + std::cout << "ZMQ STREAMING MODE: ENABLED" << std::endl; + std::cout << "=====================================" << std::endl; + std::cout << "Using pose data from " << host_ << ":" << port_ << std::endl; + std::cout << "Press ENTER again to return to loaded motions" << std::endl; + // reset the heading state + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; // reset the heading state + } + // reset streaming buffers when enabling to avoid mixing with stale data + ResetStreamedMotion(); // This also resets protocol version in the merger + has_new_data_ = false; + } else { + std::cout << "=====================================" << std::endl; + std::cout << "ZMQ STREAMING MODE: DISABLED" << std::endl; + std::cout << "=====================================" << std::endl; + std::cout << "Using pre-loaded motion data" << std::endl; + + // Encoder mode will be read from the motion's encode_mode + + // reset the current motion and frame + { + std::lock_guard lock(current_motion_mutex); + has_external_token_state_ = false; + external_token_state_.SetData({}); + operator_state.play = false; + reinitialize_heading = true; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); // current motion is the pre-loaded motion + current_frame = 0; // current frame is 0 + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(0); + } + } + // reset the streamed motion (also resets protocol version) + ResetStreamedMotion(); + has_new_data_ = false; + } + } + if (stop_control) { operator_state.stop = true; } + if (this->report_temperature) { report_temperature = true; } + if (start_control) { operator_state.start = true; } + + // Handle delta heading controls + if (delta_left) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading + 0.1; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading left: " << new_delta << " rad" << std::endl; + } + + if (delta_right) { + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = current_heading_state ? *current_heading_state : HeadingState(); + double new_delta = current_state.delta_heading - 0.1; + heading_state_buffer.SetData(HeadingState(current_state.init_base_quat, new_delta)); + std::cout << "Delta heading right: " << new_delta << " rad" << std::endl; + } + + // If ZMQ mode is active, use streamed motion data + if (use_zmq_stream) { + // Check and decode new network data if available + std::shared_ptr new_motion; + int frame_offset_adjustment = 0; + bool did_catchup = false; + int protocol_version_for_mode_update = -1; + { + std::lock_guard lock(data_mutex_); + if (has_new_data_) { + has_new_data_ = false; // consumed + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] *** Starting ZMQ processing ***" << std::endl; + } + // Decode into a new MotionSequence with current playback position + auto result = DecodeIntoMotionSequence(current_frame, streamed_motion_, stream_window_start_, heading_state_buffer); + + // Handle Protocol v4 (token-only) - no motion, just tokens + if (result.protocol_version == 4) { + if (result.motion) { + DisableZmqAndReset(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, current_motion_mutex, + "Protocol version 4 with motion data is impossible!"); + return; + } + + if (result.token_data.empty()) { + DisableZmqAndReset(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, current_motion_mutex, + "Protocol version 4 with empty token data!"); + return; + } + + // Keep robot active + { + std::lock_guard lock(current_motion_mutex); + external_token_state_.SetData(result.token_data); + has_external_token_state_ = true; + operator_state.play = true; // this should be redundant because the robot never read reference motion + } + + // Skip motion handling and keyboard controls + return; + } + + // Check if protocol version change was detected (error case) + if (!result.motion && result.protocol_version != 0) { + DisableZmqAndReset(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, current_motion_mutex, + "Protocol version changed from " + std::to_string(active_protocol_version_) + + " to " + std::to_string(result.protocol_version) + + " during active ZMQ session!"); + return; + } + + if (result.motion) { + // Determine encode_mode based on protocol version (only once when first established) + // Version 1: Use encoder mode 0 (joint-based) + // Version 2/3: Use encoder mode 2 (SMPL-based) + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] active_protocol_version_=" << active_protocol_version_ << std::endl; + std::cout << "[ZMQEndpointInterface] result.motion->GetEncodeMode()=" << result.motion->GetEncodeMode() << std::endl; + } + + + new_motion = result.motion; + std::cout << "[ZMQEndpointInterface] motion name: " << new_motion->name << std::endl; + stream_window_start_ = result.window_start; + frame_offset_adjustment = result.frame_offset_adjustment; + did_catchup = result.did_catchup_reset; + + if constexpr (DEBUG_LOGGING) { + int window_end_msg_idx = stream_window_start_ + result.frame_step * (new_motion->timesteps - 1); + std::cout << "[ZMQEndpointInterface] Merged streamed data: " + << new_motion->timesteps << " current-rate frames, " + << "window [" << stream_window_start_ << ".." << window_end_msg_idx << "] (message-index)" + << ", frame_step=" << result.frame_step + << ", frame_offset_adjustment=" << frame_offset_adjustment + << ", did_catchup=" << did_catchup << std::endl; + } + } + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] *** End of ZMQ decoding processing ***" << std::endl; + } + } + } + + // update streamed_motion_ and current_frame if we have new data + if (new_motion) { + streamed_motion_ = new_motion; + + // Handle catch-up reset: when window was reset due to large gap, start from beginning + if (did_catchup) { + std::lock_guard lock(current_motion_mutex); + current_frame = 0; + current_motion = streamed_motion_; // Assign shared_ptr directly for thread safety + operator_state.play = true; // Auto-play when entering ZMQ mode + reinitialize_heading = true; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Catch-up: Reset to frame 0 at global frame " + << stream_window_start_ << std::endl; + } + } else { + // Normal case: Adjust current_frame to maintain global playback position after window shift + // current_frame represents "the next frame to be read" (not yet consumed) + int adjusted_frame = current_frame - frame_offset_adjustment; + + // Validate the adjustment doesn't cause discontinuities due to clamping + if (adjusted_frame < 0) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] WARNING: Window shifted past playback position. " + << "Skipping from global frame " << (stream_window_start_ - frame_offset_adjustment + current_frame) + << " to " << stream_window_start_ << std::endl; + } + adjusted_frame = 0; // Start from beginning of new window + } else if (adjusted_frame >= streamed_motion_->timesteps) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] WARNING: Playback position beyond new window. " + << "Clamping to last frame." << std::endl; + } + // Safety: ensure we don't set negative frame index if timesteps is 0 + adjusted_frame = (streamed_motion_->timesteps > 0) ? (streamed_motion_->timesteps - 1) : 0; + } + + std::lock_guard lock(current_motion_mutex); + current_frame = adjusted_frame; + current_motion = streamed_motion_; // Assign shared_ptr directly for thread safety + operator_state.play = true; // Auto-play when entering ZMQ mode + } + + } + return; // Skip keyboard motion controls when in ZMQ mode + } + + // Standard keyboard controls (same as SimpleKeyboard, without planner) + if (motion_prev && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = + (motion_reader.current_motion_index_ - 1 + motion_reader.motions.size()) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + } + + if (motion_next && !motion_reader.motions.empty()) { + motion_reader.current_motion_index_ = (motion_reader.current_motion_index_ + 1) % motion_reader.motions.size(); + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_motion = motion_reader.GetMotionShared(motion_reader.current_motion_index_); + current_frame = 0; + motion_name = current_motion->name; + reinitialize_heading = true; + } + } + + if (play_motion) { + if (!operator_state.play) { + int frame_copy; + size_t timesteps_copy; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + frame_copy = current_frame; + timesteps_copy = current_motion ? current_motion->timesteps : 0; + } + std::cout << "Playing motion " << motion_reader.current_motion_index_ << " from frame " << frame_copy << " to end (" + << timesteps_copy << " total frames)" << std::endl; + } + } + + if (motion_restart) { + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + current_frame = 0; + reinitialize_heading = true; + } + std::cout << "Reset motion " << motion_reader.current_motion_index_ << " to frame 0 (paused)" << std::endl; + } + + // Handle reinitialize command + if (reinitialize) { + std::lock_guard lock(current_motion_mutex); + reinitialize_heading = true; + std::cout << "Reinitialized base quaternion and reset delta heading to 0" << std::endl; + } + } + + // Public method to trigger ZMQ mode toggle (for programmatic control from GamepadManager) + void TriggerZMQToggle() { + toggle_zmq_mode = true; + } + + std::optional GetLastUpdateTime() const override { + if (is_localhost_) { + return data_timestamp_; + } + return last_receive_time_; + } + +private: + /// Reset the streamed motion buffer, merger state, and protocol version. + /// Called on construction, when toggling ZMQ mode, and on safety reset. + void ResetStreamedMotion() { + motion_merger_.Reset(); + active_protocol_version_ = -1; // Reset protocol version tracking + // Update legacy fields for backward compatibility + streamed_motion_ = std::make_shared(); + streamed_motion_->name = "streamed"; + streamed_motion_->ReserveCapacity(15000, 29, 1, 1, 0, 0); // max 15k frames, 29 joints, 1 body, 1 quat + stream_window_start_ = 0; + data_timestamp_.reset(); + last_receive_time_.reset(); + } + + /// Outcome of DecodeIntoMotionSequence(). + struct DecodeResult { + std::shared_ptr motion; ///< Merged motion (nullptr on failure / version change). + int window_start = 0; ///< Global frame index of motion[0]. + int frame_offset_adjustment = 0; ///< Subtract from current_frame for window shift. + bool did_catchup_reset = false; ///< True → caller should reset playback to frame 0. + int frame_step = 1; ///< Detected stride between frame indices. + int protocol_version = 0; ///< Protocol version from the message (1, 2, or 3). + std::vector token_data; ///< Token data from the message. + }; + + /** + * @brief Decode buffered network data into a new MotionSequence. + * + * Called from handle_input() (with data_mutex_ held) whenever `has_new_data_` + * is true. This method: + * 1. Parses the buffered JSON header to determine field indices and dtypes. + * 2. Validates required fields for the detected protocol version. + * 3. Decodes binary buffers into typed C++ containers (joint_pos, body_quat, …). + * 4. Delegates to StreamedMotionMerger::MergeIncomingData() for sliding-window logic. + * 5. Sets encoder mode on the resulting motion based on protocol version. + * 6. Updates VR / hand-joint buffers if the corresponding optional fields are present. + * + * @param current_playback_frame Current playback cursor in the old motion. + * @param old_motion Previous streamed motion (for window overlap). + * @param old_window_start Global frame index of old_motion[0]. + * @param heading_state_buffer Heading buffer (for heading_increment field). + * @return DecodeResult describing the merged motion and playback adjustments. + */ + DecodeResult DecodeIntoMotionSequence(int current_playback_frame, + std::shared_ptr old_motion, + int old_window_start, + DataBuffer& heading_state_buffer) { + DecodeResult result; + if (buffered_buffers_.empty()) { + std::cerr << "[ZMQEndpointInterface] No buffered buffers" << std::endl; + return result; + } + + // Track timing between decode calls + uint64_t decode_start_time = std::chrono::steady_clock::now().time_since_epoch().count() / 1000000; // milliseconds + + // Check protocol version + int protocol_version = buffered_header_.version; + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Protocol version: " << protocol_version << std::endl; + } + + // Find expected fields by name (including frame_index for alignment) + int joint_pos_idx = -1, joint_vel_idx = -1, body_quat_idx = -1, frame_index_idx = -1, smpl_joints_idx = -1, smpl_pose_idx = -1; + int left_hand_joints_idx = -1, right_hand_joints_idx = -1, catch_up_idx = -1; + int token_state_idx = -1; // Protocol v4: token-only streaming + int heading_increment_idx = -1; + int timestamp_monotonic_idx = -1; + // VR 3-point tracking fields (optional) + int vr_position_idx = -1, vr_orientation_idx = -1, vr_compliance_idx = -1; + + for (size_t i = 0; i < buffered_header_.fields.size(); ++i) { + const auto& f = buffered_header_.fields[i]; + if (f.name == "joint_pos") joint_pos_idx = static_cast(i); + else if (f.name == "joint_vel") joint_vel_idx = static_cast(i); + else if (f.name == "body_quat_w" || f.name == "body_quat") body_quat_idx = static_cast(i); + else if (f.name == "frame_index" || f.name == "last_smpl_global_frames") frame_index_idx = static_cast(i); + else if (f.name == "smpl_joints") smpl_joints_idx = static_cast(i); + else if (f.name == "smpl_pose") smpl_pose_idx = static_cast(i); + else if (f.name == "left_hand_joints") left_hand_joints_idx = static_cast(i); + else if (f.name == "right_hand_joints") right_hand_joints_idx = static_cast(i); + else if (f.name == "catch_up") catch_up_idx = static_cast(i); + else if (f.name == "token_state") token_state_idx = static_cast(i); + else if (f.name == "heading_increment") heading_increment_idx = static_cast(i); + else if (f.name == "timestamp_monotonic") timestamp_monotonic_idx = static_cast(i); + // VR 3-point tracking fields + else if (f.name == "vr_position") vr_position_idx = static_cast(i); + else if (f.name == "vr_orientation") vr_orientation_idx = static_cast(i); + else if (f.name == "vr_compliance") vr_compliance_idx = static_cast(i); + } + + // ===== PROTOCOL VERSION 4: Token-Only Streaming (check first, has different requirements) ===== + if (protocol_version == 4) { + // Token-only mode - no motion data, just tokens for the policy + if (token_state_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Version 4 missing required field 'token_state'" << std::endl; + return result; + } + + // Check protocol version before decoding token_state + if (active_protocol_version_ == -1) { + // First message - establish protocol version + active_protocol_version_ = protocol_version; + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Protocol version " << active_protocol_version_ << " established" << std::endl; + } + } else if (active_protocol_version_ != protocol_version) { + // Protocol version changed - this is an error + std::cerr << "[ZMQEndpointInterface] ERROR: Protocol version changed from " + << active_protocol_version_ << " to " << protocol_version << std::endl; + result.protocol_version = protocol_version; // Signal the change to caller + return result; + } + + // Decode token_state field + const auto& token_field = buffered_header_.fields[static_cast(token_state_idx)]; + const auto& token_buf = buffered_buffers_[static_cast(token_state_idx)]; + + // Calculate token dimension from shape + size_t token_dim = 1; + for (size_t d : token_field.shape) { + token_dim *= d; + } + + std::vector token_data(token_dim); + bool needs_swap = buffered_header_.NeedsByteSwap(); + + if (token_field.dtype == "f32") { + for (size_t i = 0; i < token_dim; ++i) { + float val; + std::memcpy(&val, token_buf.data() + i * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + token_data[i] = static_cast(val); + } + } else if (token_field.dtype == "f64") { + for (size_t i = 0; i < token_dim; ++i) { + double val; + std::memcpy(&val, token_buf.data() + i * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + token_data[i] = val; + } + } else { + std::cerr << "[ZMQEndpointInterface] Version 4: unsupported dtype '" << token_field.dtype << "' for token_state" << std::endl; + return result; + } + + // Log for debugging (show first token value and frame info if available) + std::string frame_info = ""; + if (frame_index_idx >= 0) { + const auto& frame_idx_field = buffered_header_.fields[static_cast(frame_index_idx)]; + const auto& frame_idx_buf = buffered_buffers_[static_cast(frame_index_idx)]; + if (frame_idx_field.dtype == "i64" && frame_idx_buf.size() >= sizeof(int64_t)) { + int64_t frame_val; + std::memcpy(&frame_val, frame_idx_buf.data(), sizeof(int64_t)); + if (needs_swap) frame_val = byte_swap(frame_val); + frame_info = ", frame_index: " + std::to_string(frame_val); + } else if (frame_idx_field.dtype == "i64" && frame_idx_buf.size() > sizeof(int64_t)) { + // Chunk mode: show range + int num_frames = frame_idx_buf.size() / sizeof(int64_t); + int64_t first_frame, last_frame; + std::memcpy(&first_frame, frame_idx_buf.data(), sizeof(int64_t)); + std::memcpy(&last_frame, frame_idx_buf.data() + (num_frames - 1) * sizeof(int64_t), sizeof(int64_t)); + if (needs_swap) { + first_frame = byte_swap(first_frame); + last_frame = byte_swap(last_frame); + } + frame_info = ", frames: " + std::to_string(first_frame) + " to " + std::to_string(last_frame) + + " (chunk_size: " + std::to_string(num_frames) + ")"; + } + } + std::cout << "[ZMQEndpointInterface] Protocol v4: Received " << token_dim + << "D token (latent action), tokens[0]=" << token_data[0] << frame_info << std::endl; + + // Store tokens in the external token state buffer (inherited from InputInterface) + result.token_data = std::move(token_data); + + // Decode hand joint positions if present (7 DOF joint values) - same as protocol v2/v3 + bool has_left_hand_joints = (left_hand_joints_idx >= 0); + bool has_right_hand_joints = (right_hand_joints_idx >= 0); + auto [has_left_hand_v4, left_hand_joint_values] = GetHandPose(true); + auto [has_right_hand_v4, right_hand_joint_values] = GetHandPose(false); + + if (has_left_hand_joints) { + const auto& left_hand_field = buffered_header_.fields[left_hand_joints_idx]; + const auto& left_hand_buf = buffered_buffers_[left_hand_joints_idx]; + + // Validate shape: expect [7] or [N, 7] (for chunks, use first frame) + int num_hand_joints = 0; + if (left_hand_field.shape.size() == 1 && left_hand_field.shape[0] == 7) { + num_hand_joints = 7; + } else if (left_hand_field.shape.size() == 2 && left_hand_field.shape[1] == 7) { + num_hand_joints = 7; + } + + if (num_hand_joints == 7) { + // Decode 7 joint values (from first frame if chunked [N, 7]) + if (left_hand_field.dtype == "f32") { + for (int j = 0; j < 7; ++j) { + float val; + std::memcpy(&val, left_hand_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + left_hand_joint_values[j] = static_cast(val); + } + } else if (left_hand_field.dtype == "f64") { + for (int j = 0; j < 7; ++j) { + double val; + std::memcpy(&val, left_hand_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + left_hand_joint_values[j] = val; + } + } + } else { + std::cerr << "[ZMQEndpointInterface] Protocol v4: Invalid left_hand_joints shape" << std::endl; + has_left_hand_joints = false; + } + } + + if (has_right_hand_joints) { + const auto& right_hand_field = buffered_header_.fields[right_hand_joints_idx]; + const auto& right_hand_buf = buffered_buffers_[right_hand_joints_idx]; + + // Validate shape: expect [7] or [N, 7] (for chunks, use first frame) + int num_hand_joints = 0; + if (right_hand_field.shape.size() == 1 && right_hand_field.shape[0] == 7) { + num_hand_joints = 7; + } else if (right_hand_field.shape.size() == 2 && right_hand_field.shape[1] == 7) { + num_hand_joints = 7; + } + + if (num_hand_joints == 7) { + // Decode 7 joint values (from first frame if chunked [N, 7]) + if (right_hand_field.dtype == "f32") { + for (int j = 0; j < 7; ++j) { + float val; + std::memcpy(&val, right_hand_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + right_hand_joint_values[j] = static_cast(val); + } + } else if (right_hand_field.dtype == "f64") { + for (int j = 0; j < 7; ++j) { + double val; + std::memcpy(&val, right_hand_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + right_hand_joint_values[j] = val; + } + } + } else { + std::cerr << "[ZMQEndpointInterface] Protocol v4: Invalid right_hand_joints shape" << std::endl; + has_right_hand_joints = false; + } + } + + // Set hand joints if present + if (has_left_hand_joints || has_right_hand_joints) { + has_hand_joints_ = true; + + if (has_left_hand_joints) { + left_hand_joint_.SetData(left_hand_joint_values); + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Protocol v4: Left hand joints set: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << left_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } + + if (has_right_hand_joints) { + right_hand_joint_.SetData(right_hand_joint_values); + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Protocol v4: Right hand joints set: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << right_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } + } + + // Return success with protocol version but no motion (token-only) + result.protocol_version = 4; + return result; + } + + // Validate required fields based on protocol version (for motion protocols v1/v2/v3) + // body_quat and frame_index are required for motion protocols + if (body_quat_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Missing required field 'body_quat' (or 'body_quat_w')" << std::endl; + return result; + } + + if (frame_index_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Missing required field 'frame_index' (or 'last_smpl_global_frames')" << std::endl; + return result; + } + + if (protocol_version == 2 || protocol_version == 3) { + // Version 2/3: require smpl_joints, smpl_pose (joint_pos/joint_vel optional for v2, required for v3) + if (smpl_joints_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Version " << protocol_version + << " missing required field 'smpl_joints' " << std::endl; + return result; + } + if (smpl_pose_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Version " << protocol_version + << " missing required field 'smpl_pose'" << std::endl; + return result; + } + if (protocol_version == 3) { + // Version 3 additionally requires joint_pos and joint_vel + if (joint_pos_idx < 0 ) { + std::cerr << "[ZMQEndpointInterface] Version 3 missing required field 'joint_pos'" << std::endl; + return result; + } + if (joint_vel_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Version 3 missing required field 'joint_vel'" << std::endl; + return result; + } + } + } else if (protocol_version == 1) { + // Version 1: requires joint_pos and joint_vel (smpl_joints optional) + if (joint_pos_idx < 0 || joint_vel_idx < 0) { + std::cerr << "[ZMQEndpointInterface] Version 1 missing required fields (joint_pos, joint_vel)" << std::endl; + return result; + } + } else { + // Protocol v4 is handled above, before body_quat/frame_index validation + std::cerr << "[ZMQEndpointInterface] Unsupported protocol version: " << protocol_version << std::endl; + return result; + } + + // Determine num_frames and num_joints from available fields + int num_frames = 0; + int num_joints = 0; + + // Get num_frames from the primary required field for each version + if (protocol_version == 2 || protocol_version == 3) { + // Version 2/3: Get num_frames from smpl_joints (required) + const auto& smpl_field = buffered_header_.fields[smpl_joints_idx]; + if (smpl_field.shape.size() < 2) { + std::cerr << "[ZMQEndpointInterface] Invalid smpl_joints shape" << std::endl; + return result; + } + int num_frames_smpl = static_cast(smpl_field.shape[0]); + if (num_frames_smpl <= 0) { + std::cerr << "[ZMQEndpointInterface] Invalid number of frames from smpl_joints: " << num_frames_smpl << std::endl; + return result; + } + + // For version 3, also validate that joint_pos has consistent frame count + if (protocol_version == 3) { + const auto& joint_pos_field = buffered_header_.fields[joint_pos_idx]; + if (joint_pos_field.shape.size() != 2) { + std::cerr << "[ZMQEndpointInterface] Version 3 has invalid joint_pos shape (expected [N, num_joints])" << std::endl; + return result; + } + const auto& joint_vel_field = buffered_header_.fields[joint_vel_idx]; + if (joint_vel_field.shape.size() != 2) { + std::cerr << "[ZMQEndpointInterface] Version 3 has invalid joint_vel shape (expected [N, num_joints])" << std::endl; + return result; + } + int num_frames_joint = static_cast(joint_pos_field.shape[0]); + if (num_frames_joint != num_frames_smpl) { + std::cerr << "[ZMQEndpointInterface] Version 3 frame count mismatch between smpl_joints (" + << num_frames_smpl << ") and joint_pos (" << num_frames_joint << ")" << std::endl; + return result; + } + int num_frames_joint_vel = static_cast(joint_vel_field.shape[0]); + if (num_frames_joint_vel != num_frames_smpl) { + std::cerr << "[ZMQEndpointInterface] Version 3 frame count mismatch between smpl_joints (" + << num_frames_smpl << ") and joint_vel (" << num_frames_joint_vel << ")" << std::endl; + return result; + } + } + num_frames = num_frames_smpl; + } else if (protocol_version == 1) { + // Version 1: Get num_frames from joint_pos (required) + const auto& joint_pos_field = buffered_header_.fields[joint_pos_idx]; + if (joint_pos_field.shape.size() != 2) { + std::cerr << "[ZMQEndpointInterface] Invalid joint_pos shape" << std::endl; + return result; + } + const auto& joint_vel_field = buffered_header_.fields[joint_vel_idx]; + if (joint_vel_field.shape.size() != 2) { + std::cerr << "[ZMQEndpointInterface] Invalid joint_vel shape" << std::endl; + return result; + } + num_frames = static_cast(joint_pos_field.shape[0]); + if (num_frames != static_cast(joint_vel_field.shape[0])) { + std::cerr << "[ZMQEndpointInterface] Frame count mismatch between joint_pos and joint_vel" << std::endl; + return result; + } + } + + if (num_frames <= 0) { + std::cerr << "[ZMQEndpointInterface] Invalid number of frames: " << num_frames << std::endl; + return result; + } + + // Get num_joints if joint data is present + if (joint_pos_idx >= 0 && joint_vel_idx >= 0) { + const auto& joint_pos_field = buffered_header_.fields[joint_pos_idx]; + const auto& joint_vel_field = buffered_header_.fields[joint_vel_idx]; + + // Validate shapes: expect [N, num_joints] + if (joint_pos_field.shape.size() == 2 && joint_vel_field.shape.size() == 2) { + num_joints = static_cast(joint_pos_field.shape[1]); + if (num_joints <= 0) { + std::cerr << "[ZMQEndpointInterface] Invalid number of joints: " << num_joints << std::endl; + return result; + } + } + } + + bool needs_swap = buffered_header_.NeedsByteSwap(); + + // ===== STEP 1: Decode all incoming data into temporary buffers ===== + + // Decode joint positions and velocities if present + std::vector> decoded_joint_pos; + std::vector> decoded_joint_vel; + bool has_joint_data = (joint_pos_idx >= 0 && joint_vel_idx >= 0 && num_joints > 0); + + if (has_joint_data) { + // Decode joint positions + decoded_joint_pos.resize(num_frames, std::vector(num_joints)); + const auto& joint_pos_field = buffered_header_.fields[joint_pos_idx]; + const auto& pos_buf = buffered_buffers_[joint_pos_idx]; + if (joint_pos_field.dtype == "f32") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int joint = 0; joint < num_joints; ++joint) { + float val; + std::memcpy(&val, pos_buf.data() + (frame * num_joints + joint) * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + decoded_joint_pos[frame][joint] = static_cast(val); + } + } + } else if (joint_pos_field.dtype == "f64") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int joint = 0; joint < num_joints; ++joint) { + double val; + std::memcpy(&val, pos_buf.data() + (frame * num_joints + joint) * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + decoded_joint_pos[frame][joint] = val; + } + } + } + + // Decode joint velocities + decoded_joint_vel.resize(num_frames, std::vector(num_joints)); + const auto& joint_vel_field = buffered_header_.fields[joint_vel_idx]; + const auto& vel_buf = buffered_buffers_[joint_vel_idx]; + if (joint_vel_field.dtype == "f32") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int joint = 0; joint < num_joints; ++joint) { + float val; + std::memcpy(&val, vel_buf.data() + (frame * num_joints + joint) * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + decoded_joint_vel[frame][joint] = static_cast(val); + } + } + } else if (joint_vel_field.dtype == "f64") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int joint = 0; joint < num_joints; ++joint) { + double val; + std::memcpy(&val, vel_buf.data() + (frame * num_joints + joint) * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + decoded_joint_vel[frame][joint] = val; + } + } + } + } + + // Decode body quaternions (required for both versions) + // Support shapes: [N, num_quat_bodies, 4] or [N, 4] for single body + const auto& quat_field = buffered_header_.fields[body_quat_idx]; + const auto& quat_buf = buffered_buffers_[body_quat_idx]; + + // Determine number of quaternion bodies from shape + int num_quat_bodies = 1; + if (quat_field.shape.size() == 3) { + num_quat_bodies = static_cast(quat_field.shape[1]); + } else if (quat_field.shape.size() == 2) { + num_quat_bodies = 1; + } + + // Decode quaternions: [frame][body][xyzw] + std::vector>> decoded_body_quat(num_frames); + for (int frame = 0; frame < num_frames; ++frame) { + decoded_body_quat[frame].resize(num_quat_bodies, {1.0, 0.0, 0.0, 0.0}); + } + + int quat_stride = num_quat_bodies * 4; + + if (quat_field.dtype == "f32") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int body = 0; body < num_quat_bodies; ++body) { + for (int q = 0; q < 4; ++q) { + float val; + std::memcpy(&val, quat_buf.data() + (frame * quat_stride + body * 4 + q) * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + decoded_body_quat[frame][body][q] = static_cast(val); + } + } + } + } else if (quat_field.dtype == "f64") { + for (int frame = 0; frame < num_frames; ++frame) { + for (int body = 0; body < num_quat_bodies; ++body) { + for (int q = 0; q < 4; ++q) { + double val; + std::memcpy(&val, quat_buf.data() + (frame * quat_stride + body * 4 + q) * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + decoded_body_quat[frame][body][q] = val; + } + } + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded body quaternions: " << num_quat_bodies << " bodies per frame" << std::endl; + } + + // Decode SMPL joints if present + // Expected shape: [N, num_smpl_joints, 3] or [N, 3] for single joint + std::vector>> decoded_smpl_joints; // [frame][joint][xyz] + int num_smpl_joints = 0; + bool has_smpl_joints = (smpl_joints_idx >= 0); + + if (has_smpl_joints) { + const auto& smpl_field = buffered_header_.fields[smpl_joints_idx]; + const auto& smpl_buf = buffered_buffers_[smpl_joints_idx]; + + // Determine shape: [N, num_smpl_joints, 3] or [N, 3] + if (smpl_field.shape.size() == 3) { + num_smpl_joints = static_cast(smpl_field.shape[1]); + } else if (smpl_field.shape.size() == 2) { + num_smpl_joints = 1; + } else { + std::cerr << "[ZMQEndpointInterface] Invalid smpl_joints shape dimensions: " + << smpl_field.shape.size() << std::endl; + has_smpl_joints = false; // Invalid shape, skip decoding + } + + if (has_smpl_joints && num_smpl_joints > 0) { + decoded_smpl_joints.resize(num_frames); + + int stride = num_smpl_joints * 3; + + if (smpl_field.dtype == "f32") { + for (int frame = 0; frame < num_frames; ++frame) { + decoded_smpl_joints[frame].resize(num_smpl_joints); + for (int joint = 0; joint < num_smpl_joints; ++joint) { + for (int xyz = 0; xyz < 3; ++xyz) { + float val; + std::memcpy(&val, smpl_buf.data() + (frame * stride + joint * 3 + xyz) * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + decoded_smpl_joints[frame][joint][xyz] = static_cast(val); + } + } + } + } else if (smpl_field.dtype == "f64") { + for (int frame = 0; frame < num_frames; ++frame) { + decoded_smpl_joints[frame].resize(num_smpl_joints); + for (int joint = 0; joint < num_smpl_joints; ++joint) { + for (int xyz = 0; xyz < 3; ++xyz) { + double val; + std::memcpy(&val, smpl_buf.data() + (frame * stride + joint * 3 + xyz) * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + decoded_smpl_joints[frame][joint][xyz] = val; + } + } + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded smpl_joints: " << num_frames + << " frames, " << num_smpl_joints << " joints" << std::endl; + } + } + } + + // Decode SMPL poses if present + // Expected shape: [N, num_poses, 3] or [N, 3] for single pose + std::vector>> decoded_smpl_pose; // [frame][pose][xyz] + int num_smpl_poses = 0; + bool has_smpl_pose = (smpl_pose_idx >= 0); + + if (has_smpl_pose) { + const auto& smpl_pose_field = buffered_header_.fields[smpl_pose_idx]; + const auto& smpl_pose_buf = buffered_buffers_[smpl_pose_idx]; + + // Determine shape: [N, num_poses, 3] or [N, 3] + if (smpl_pose_field.shape.size() == 3) { + num_smpl_poses = static_cast(smpl_pose_field.shape[1]); + } else if (smpl_pose_field.shape.size() == 2) { + num_smpl_poses = 1; + } else { + std::cerr << "[ZMQEndpointInterface] Invalid smpl_pose shape dimensions: " + << smpl_pose_field.shape.size() << std::endl; + has_smpl_pose = false; // Invalid shape, skip decoding + } + + if (has_smpl_pose && num_smpl_poses > 0) { + decoded_smpl_pose.resize(num_frames); + + int stride = num_smpl_poses * 3; + + if (smpl_pose_field.dtype == "f32") { + for (int frame = 0; frame < num_frames; ++frame) { + decoded_smpl_pose[frame].resize(num_smpl_poses); + for (int pose = 0; pose < num_smpl_poses; ++pose) { + for (int xyz = 0; xyz < 3; ++xyz) { + float val; + std::memcpy(&val, smpl_pose_buf.data() + (frame * stride + pose * 3 + xyz) * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + decoded_smpl_pose[frame][pose][xyz] = static_cast(val); + } + } + } + } else if (smpl_pose_field.dtype == "f64") { + for (int frame = 0; frame < num_frames; ++frame) { + decoded_smpl_pose[frame].resize(num_smpl_poses); + for (int pose = 0; pose < num_smpl_poses; ++pose) { + for (int xyz = 0; xyz < 3; ++xyz) { + double val; + std::memcpy(&val, smpl_pose_buf.data() + (frame * stride + pose * 3 + xyz) * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + decoded_smpl_pose[frame][pose][xyz] = val; + } + } + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded smpl_pose: " << num_frames + << " frames, " << num_smpl_poses << " poses" << std::endl; + } + } + } + + // Decode hand joint positions if present (7 DOF joint values) + bool has_left_hand_joints = (left_hand_joints_idx >= 0); + bool has_right_hand_joints = (right_hand_joints_idx >= 0); + auto [has_left_hand, left_hand_joint_values] = GetHandPose(true); + auto [has_right_hand, right_hand_joint_values] = GetHandPose(false); + + if (has_left_hand_joints) { + const auto& left_hand_field = buffered_header_.fields[left_hand_joints_idx]; + const auto& left_hand_buf = buffered_buffers_[left_hand_joints_idx]; + + // Validate shape: expect [7] or [1, 7] + int num_hand_joints = 0; + if (left_hand_field.shape.size() == 1 && left_hand_field.shape[0] == 7) { + num_hand_joints = 7; + } else if (left_hand_field.shape.size() == 2 && left_hand_field.shape[1] == 7) { + num_hand_joints = 7; + } + + if (num_hand_joints == 7) { + // Decode 7 joint values + if (left_hand_field.dtype == "f32") { + for (int j = 0; j < 7; ++j) { + float val; + std::memcpy(&val, left_hand_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + left_hand_joint_values[j] = static_cast(val); + } + } else if (left_hand_field.dtype == "f64") { + for (int j = 0; j < 7; ++j) { + double val; + std::memcpy(&val, left_hand_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + left_hand_joint_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded left_hand_joints: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << left_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQEndpointInterface] Invalid left_hand_joints shape" << std::endl; + has_left_hand_joints = false; + } + } + + if (has_right_hand_joints) { + const auto& right_hand_field = buffered_header_.fields[right_hand_joints_idx]; + const auto& right_hand_buf = buffered_buffers_[right_hand_joints_idx]; + + // Validate shape: expect [7] or [1, 7] + int num_hand_joints = 0; + if (right_hand_field.shape.size() == 1 && right_hand_field.shape[0] == 7) { + num_hand_joints = 7; + } else if (right_hand_field.shape.size() == 2 && right_hand_field.shape[1] == 7) { + num_hand_joints = 7; + } + + if (num_hand_joints == 7) { + // Decode 7 joint values + if (right_hand_field.dtype == "f32") { + for (int j = 0; j < 7; ++j) { + float val; + std::memcpy(&val, right_hand_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + right_hand_joint_values[j] = static_cast(val); + } + } else if (right_hand_field.dtype == "f64") { + for (int j = 0; j < 7; ++j) { + double val; + std::memcpy(&val, right_hand_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + right_hand_joint_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded right_hand_joints: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << right_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQEndpointInterface] Invalid right_hand_joints shape" << std::endl; + has_right_hand_joints = false; + } + } + + // ===== Decode VR 3-point tracking data if present ===== + // VR 3-point format: + // vr_position: 9 doubles (left wrist xyz, right wrist xyz, head xyz) - REQUIRED for VR mode + // vr_orientation: 12 doubles (left quat wxyz, right quat wxyz, head quat wxyz) - optional + // vr_compliance: 3 doubles (left_arm, right_arm, head compliance) - optional + bool has_vr_position = (vr_position_idx >= 0); + bool has_vr_orientation = (vr_orientation_idx >= 0); + bool has_vr_compliance = (vr_compliance_idx >= 0); + + // Default values for VR 3-point (from InputInterface defaults) + std::array vr_position_values = { + 0.0903, 0.1615, -0.2411, // left wrist xyz + 0.1280, -0.1522, -0.2461, // right wrist xyz + 0.0241, -0.0081, 0.4028 // head xyz + }; + std::array vr_orientation_values = { + 0.7295, 0.3145, 0.5533, -0.2506, // left quat (w,x,y,z) + 0.7320, -0.2639, 0.5395, 0.3217, // right quat (w,x,y,z) + 0.9991, 0.011, 0.0402, -0.0002 // head quat (w,x,y,z) + }; + std::array vr_compliance_values = GetVR3PointCompliance(); // Use keyboard-controlled compliance + + if (has_vr_position) { + const auto& vr_pos_field = buffered_header_.fields[vr_position_idx]; + const auto& vr_pos_buf = buffered_buffers_[vr_position_idx]; + + // Validate shape: expect [9] or [1, 9] or [3, 3] + size_t total_elements = 1; + for (auto dim : vr_pos_field.shape) total_elements *= dim; + + if (total_elements == 9) { + if (vr_pos_field.dtype == "f32") { + for (int j = 0; j < 9; ++j) { + float val; + std::memcpy(&val, vr_pos_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + vr_position_values[j] = static_cast(val); + } + } else if (vr_pos_field.dtype == "f64") { + for (int j = 0; j < 9; ++j) { + double val; + std::memcpy(&val, vr_pos_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + vr_position_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded vr_position: ["; + for (int j = 0; j < 9; ++j) { + if (j > 0) std::cout << ", "; + if (j == 3 || j == 6) std::cout << " | "; + std::cout << std::fixed << std::setprecision(4) << vr_position_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQEndpointInterface] Invalid vr_position shape (expected 9 elements, got " + << total_elements << ")" << std::endl; + has_vr_position = false; + } + } + + if (has_vr_orientation) { + const auto& vr_orient_field = buffered_header_.fields[vr_orientation_idx]; + const auto& vr_orient_buf = buffered_buffers_[vr_orientation_idx]; + + // Validate shape: expect [12] or [1, 12] or [3, 4] + size_t total_elements = 1; + for (auto dim : vr_orient_field.shape) total_elements *= dim; + + if (total_elements == 12) { + if (vr_orient_field.dtype == "f32") { + for (int j = 0; j < 12; ++j) { + float val; + std::memcpy(&val, vr_orient_buf.data() + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + vr_orientation_values[j] = static_cast(val); + } + } else if (vr_orient_field.dtype == "f64") { + for (int j = 0; j < 12; ++j) { + double val; + std::memcpy(&val, vr_orient_buf.data() + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + vr_orientation_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Decoded vr_orientation: ["; + for (int j = 0; j < 12; ++j) { + if (j > 0) std::cout << ", "; + if (j == 4 || j == 8) std::cout << " | "; + std::cout << std::fixed << std::setprecision(4) << vr_orientation_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQEndpointInterface] Invalid vr_orientation shape (expected 12 elements, got " + << total_elements << ")" << std::endl; + has_vr_orientation = false; + } + } + + // Note: vr_compliance from ZMQ is intentionally IGNORED + // We always use the keyboard-controlled compliance values (g/h/b/v keys) + // This keeps compliance control consistent across all input modes + if (has_vr_compliance) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] vr_compliance field present but IGNORED (using keyboard-controlled values instead)" << std::endl; + } + } + + // ===== STEP 2: Decode frame indices ===== + // Note: The merger will calculate frame_step and incoming_frame_start internally + std::vector frame_indices; + + if (frame_index_idx >= 0) { + const auto& frame_idx_field = buffered_header_.fields[frame_index_idx]; + const auto& frame_idx_buf = buffered_buffers_[frame_index_idx]; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Raw message field '" << frame_idx_field.name + << "' (dtype=" << frame_idx_field.dtype << ", size=" << frame_idx_buf.size() << " bytes)" << std::endl; + } + + if (frame_idx_field.dtype == "i32") { + int num_indices = frame_idx_buf.size() / sizeof(int32_t); + frame_indices.resize(num_indices); + + for (int i = 0; i < num_indices; ++i) { + int32_t val; + std::memcpy(&val, frame_idx_buf.data() + i * sizeof(int32_t), sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + frame_indices[i] = val; + } + } else if (frame_idx_field.dtype == "i64") { + int num_indices = frame_idx_buf.size() / sizeof(int64_t); + frame_indices.resize(num_indices); + + for (int i = 0; i < num_indices; ++i) { + int64_t val; + std::memcpy(&val, frame_idx_buf.data() + i * sizeof(int64_t), sizeof(int64_t)); + if (needs_swap) val = byte_swap(val); + frame_indices[i] = val; + } + } + + // Print frame indices for protocol v3 (SMPL actions) + if (protocol_version == 3 && !frame_indices.empty()) { + if (frame_indices.size() == 1) { + std::cout << "[ZMQEndpointInterface] Protocol v3: Received SMPL action (single) - frame_index: " + << frame_indices[0] << std::endl; + } else { + std::cout << "[ZMQEndpointInterface] Protocol v3: Received SMPL action (chunk) - frames: " + << frame_indices[0] << " to " << frame_indices.back() + << ", chunk_size: " << frame_indices.size() << std::endl; + } + } + } + + // Optional: decode heading_increment (single scalar, f32 or f64) + if (heading_increment_idx >= 0) { + double heading_increment = 0.0; + const auto& dh_buf = buffered_buffers_[heading_increment_idx]; + const auto& dh_field = buffered_header_.fields[heading_increment_idx]; + if (dh_field.dtype == "f32") { + float val = 0.0f; + if (dh_buf.size() >= sizeof(float)) { + std::memcpy(&val, dh_buf.data(), sizeof(float)); + if (needs_swap) val = byte_swap(val); + heading_increment = static_cast(val); + } + } else { // f64 or default + double val = 0.0; + if (dh_buf.size() >= sizeof(double)) { + std::memcpy(&val, dh_buf.data(), sizeof(double)); + if (needs_swap) val = byte_swap(val); + heading_increment = val; + } + } + + auto current_heading_state = heading_state_buffer.GetDataWithTime().data; + HeadingState current_state = + current_heading_state ? *current_heading_state : HeadingState(); + + // Add increment to current heading + heading_state_buffer.SetData( + HeadingState( + current_state.init_base_quat, + current_state.delta_heading + heading_increment)); + } + + // Optional: decode monotonic timestamp (single scalar, f64) + if (timestamp_monotonic_idx >= 0) { + double timestamp_monotonic = 0.0; + const auto& ts_buf = buffered_buffers_[timestamp_monotonic_idx]; + const auto& ts_field = buffered_header_.fields[timestamp_monotonic_idx]; + if (ts_field.dtype == "f64") { + double val = 0.0; + if (ts_buf.size() >= sizeof(double)) { + std::memcpy(&val, ts_buf.data(), sizeof(double)); + if (needs_swap) val = byte_swap(val); + timestamp_monotonic = val; + } + } + if (is_localhost_) + { + auto duration_monotonic = std::chrono::duration(timestamp_monotonic); + auto time_point_monotonic = std::chrono::steady_clock::time_point( + std::chrono::duration_cast(duration_monotonic)); + data_timestamp_ = time_point_monotonic; + } + } + + // ===== Decode catch_up field if present ===== + // Default: catch_up = true (use MAX_GAP_FRAMES) + // If catch_up = false: allow infinite delays (set max_gap_frames to very large value) + bool catch_up_enabled = true; // Default to true if field not present + if (catch_up_idx >= 0) { + const auto& catch_up_field = buffered_header_.fields[catch_up_idx]; + const auto& catch_up_buf = buffered_buffers_[catch_up_idx]; + + // Decode boolean value (support bool, i32, i64, u8) + if (catch_up_field.dtype == "bool" || catch_up_field.dtype == "u8") { + uint8_t val = 0; + if (catch_up_buf.size() >= sizeof(uint8_t)) { + std::memcpy(&val, catch_up_buf.data(), sizeof(uint8_t)); + catch_up_enabled = (val != 0); + } + } else if (catch_up_field.dtype == "i32") { + int32_t val = 0; + if (catch_up_buf.size() >= sizeof(int32_t)) { + std::memcpy(&val, catch_up_buf.data(), sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + catch_up_enabled = (val != 0); + } + } else if (catch_up_field.dtype == "i64") { + int64_t val = 0; + if (catch_up_buf.size() >= sizeof(int64_t)) { + std::memcpy(&val, catch_up_buf.data(), sizeof(int64_t)); + if (needs_swap) val = byte_swap(val); + catch_up_enabled = (val != 0); + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] catch_up field: " << (catch_up_enabled ? "true" : "false") << std::endl; + } + } else { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] catch_up field not present, using default: true" << std::endl; + } + } + + // ===== DEBUG: Print merged frame indices and decoded data ===== + if constexpr (DEBUG_LOGGING) { + // Print first 20 frames (or all frames if fewer than 20) + int print_frames = std::min(20, num_frames); + + std::cout << "[ZMQEndpointInterface] Decoded data (Version " << protocol_version << ", first " << print_frames << " frames"; + if (has_joint_data) std::cout << ", " << num_joints << " joints"; + if (has_smpl_joints) std::cout << ", " << num_smpl_joints << " smpl_joints"; + if (has_smpl_pose) std::cout << ", " << num_smpl_poses << " smpl_pose"; + std::cout << "):" << std::endl; + + for (int frame = 0; frame < print_frames; ++frame) { + // Print frame index if available + std::cout << " Frame[" << frame << "]"; + if (frame < static_cast(frame_indices.size())) { + std::cout << " (idx=" << frame_indices[frame] << ")"; + } + + // Print joint_pos and joint_vel if present + if (has_joint_data && !decoded_joint_pos.empty() && !decoded_joint_vel.empty()) { + int print_joints = std::min(2, num_joints); + std::cout << " joint_pos: ["; + for (int j = 0; j < print_joints; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(6) << decoded_joint_pos[frame][j]; + } + std::cout << "], joint_vel: ["; + for (int j = 0; j < print_joints; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(6) << decoded_joint_vel[frame][j]; + } + std::cout << "]"; + } + + // Print body_quat (always present) + std::cout << ", body_quat: ["; + int print_quat_bodies = std::min(2, static_cast(decoded_body_quat[frame].size())); + for (int b = 0; b < print_quat_bodies; ++b) { + if (b > 0) std::cout << "; "; + std::cout << "("; + for (int q = 0; q < 4; ++q) { + if (q > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(6) << decoded_body_quat[frame][b][q]; + } + std::cout << ")"; + } + std::cout << "]"; + + // Print smpl_joints if present + if (has_smpl_joints && frame < static_cast(decoded_smpl_joints.size())) { + std::cout << ", smpl_joints: ["; + int print_bodies = std::min(1, static_cast(decoded_smpl_joints[frame].size())); + for (int b = 0; b < print_bodies; ++b) { + if (b > 0) std::cout << "; "; + std::cout << "("; + for (int xyz = 0; xyz < 3; ++xyz) { + if (xyz > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(6) << decoded_smpl_joints[frame][b][xyz]; + } + std::cout << ")"; + } + std::cout << "]"; + } + + // Print smpl_pose if present + if (has_smpl_pose && frame < static_cast(decoded_smpl_pose.size())) { + std::cout << ", smpl_pose: ["; + int print_poses = std::min(1, static_cast(decoded_smpl_pose[frame].size())); + for (int p = 0; p < print_poses; ++p) { + if (p > 0) std::cout << "; "; + std::cout << "("; + for (int xyz = 0; xyz < 3; ++xyz) { + if (xyz > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(6) << decoded_smpl_pose[frame][p][xyz]; + } + std::cout << ")"; + } + std::cout << "]"; + } + + std::cout << std::endl; + } + } + + // ===== STEP 3: Validate protocol version (application-specific) ===== + + // Check protocol version before merging + if (active_protocol_version_ == -1) { + // First message - establish protocol version + active_protocol_version_ = protocol_version; + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Protocol version " << active_protocol_version_ << " established" << std::endl; + } + } else if (active_protocol_version_ != protocol_version) { + // Protocol version changed - this is an error + std::cerr << "[ZMQEndpointInterface] ERROR: Protocol version changed from " + << active_protocol_version_ << " to " << protocol_version << std::endl; + result.protocol_version = protocol_version; // Signal the change to caller + return result; + } + + // ===== STEP 4: Package decoded data and call StreamedMotionMerger ===== + + // Prepare IncomingData structure for the merger + StreamedMotionMerger::IncomingData incoming_data; + incoming_data.joint_pos = std::move(decoded_joint_pos); + incoming_data.joint_vel = std::move(decoded_joint_vel); + incoming_data.body_quat = std::move(decoded_body_quat); + incoming_data.smpl_joints = std::move(decoded_smpl_joints); + incoming_data.smpl_pose = std::move(decoded_smpl_pose); + incoming_data.frame_indices = std::move(frame_indices); + incoming_data.protocol_version = protocol_version; + incoming_data.catch_up_enabled = catch_up_enabled; + incoming_data.num_frames = num_frames; + incoming_data.num_joints = num_joints; + incoming_data.num_quat_bodies = num_quat_bodies; + incoming_data.num_smpl_joints = num_smpl_joints; + incoming_data.num_smpl_poses = num_smpl_poses; + + // Call the reusable merger to handle sliding window logic + auto merge_result = motion_merger_.MergeIncomingData(incoming_data, current_playback_frame); + + // Check for merge failure + if (!merge_result.motion) { + std::cerr << "[ZMQEndpointInterface] Failed to merge incoming data" << std::endl; + return result; + } + + // Convert MergeResult to DecodeResult + if (active_protocol_version_ == 1) { + merge_result.motion->SetEncodeMode(0); // Protocol 1: joint-based + } else if (active_protocol_version_ == 2 || active_protocol_version_ == 3) { + // Protocol versions 2 and 3 both use encoder mode 2 (SMPL-based) + merge_result.motion->SetEncodeMode(2); + } + result.motion = merge_result.motion; + result.window_start = merge_result.window_start; + result.frame_offset_adjustment = merge_result.frame_offset_adjustment; + result.did_catchup_reset = merge_result.did_catchup_reset; + result.frame_step = merge_result.frame_step; + result.protocol_version = merge_result.protocol_version; + + // Handle hand joints: set hand joint values directly from decoded data + if (has_left_hand_joints || has_right_hand_joints) { + has_hand_joints_ = true; + + if (has_left_hand_joints) { + left_hand_joint_.SetData(left_hand_joint_values); + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Left hand joints set: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << left_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } + + if (has_right_hand_joints) { + right_hand_joint_.SetData(right_hand_joint_values); + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] Right hand joints set: ["; + for (int j = 0; j < 7; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << right_hand_joint_values[j]; + } + std::cout << "]" << std::endl; + } + } + } + + // Handle VR 3-point tracking: set buffers when vr_position is present + // vr_position is required to enable VR mode; orientation uses default if not provided + // compliance is ALWAYS from keyboard-controlled values (ignoring ZMQ data) + if (has_vr_position) { + vr_3point_position_.SetData(vr_position_values); + vr_3point_orientation_.SetData(vr_orientation_values); + if (has_vr_compliance) SetVR3PointCompliance(vr_compliance_values); + has_vr_3point_control_ = true; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQEndpointInterface] VR 3-point tracking ENABLED:" << std::endl; + std::cout << " Position [L|R|H]: ["; + for (int j = 0; j < 9; ++j) { + if (j > 0) std::cout << ", "; + if (j == 3 || j == 6) std::cout << "| "; + std::cout << std::fixed << std::setprecision(4) << vr_position_values[j]; + } + std::cout << "]" << std::endl; + std::cout << " Orientation [L|R|H]: ["; + for (int j = 0; j < 12; ++j) { + if (j > 0) std::cout << ", "; + if (j == 4 || j == 8) std::cout << "| "; + std::cout << std::fixed << std::setprecision(4) << vr_orientation_values[j]; + } + std::cout << "]" << (has_vr_orientation ? "" : " (default)") << std::endl; + if (has_vr_compliance) { + std::cout << " Compliance [L,R,H]: ["; + for (int j = 0; j < 3; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(2) << vr_compliance_values[j]; + } + std::cout << "] (keyboard-controlled)" << std::endl; + } + } + } + + // log the decode interval and decode time + uint64_t decode_end_time = std::chrono::steady_clock::now().time_since_epoch().count() / 1000000; // milliseconds + if constexpr (DEBUG_LOGGING) { + if (last_decode_time_ > 0) { + uint64_t decode_time = decode_end_time - decode_start_time; + uint64_t time_delta = decode_end_time - last_decode_time_; + std::cout << "[ZMQEndpointInterface] Decode interval: " << time_delta << " ms, decode time: " << decode_time << " ms" << std::endl; + } + } + last_decode_time_ = decode_end_time; + + return result; + } + + /** + * @brief ZMQ subscriber callback – invoked on the **background thread**. + * + * Copies the received header and buffer data into `buffered_header_` / + * `buffered_buffers_` under `data_mutex_` and sets `has_new_data_` = true. + * The actual decoding happens later on the main thread in handle_input(). + */ + void OnPoseDataReceived( + const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + + std::lock_guard lock(data_mutex_); + + // Print message received info + std::cout << "[ZMQEndpointInterface] Received ZMQ message - topic: '" << topic + << "', protocol_version: " << hdr.version + << ", num_fields: " << hdr.fields.size() + << ", total_size: " << bufs.size() << " buffers" << std::endl; + + // Buffer the received data for processing in handle_input (main thread) + buffered_header_ = hdr; + buffered_buffers_.clear(); + for (const auto& buf : bufs) { + // Copy buffer data (BufferView is only valid during callback) + std::vector copied(static_cast(buf.data), + static_cast(buf.data) + buf.size); + buffered_buffers_.push_back(std::move(copied)); + } + + has_new_data_ = true; + last_receive_time_ = std::chrono::steady_clock::now(); + receive_count_++; + } + + // ------------------------------------------------------------------ + // Configuration + // ------------------------------------------------------------------ + std::string host_; ///< ZMQ server hostname. + int port_; ///< ZMQ server port. + std::string topic_; ///< ZMQ subscription topic. + bool verbose_; ///< Verbose logging flag. + + /// Background subscriber for the pose / motion topic. + std::unique_ptr subscriber_; + + struct termios old_termios_; ///< Saved terminal state for restoration on destruction. + + // ------------------------------------------------------------------ + // Thread-safe data buffering (written by ZMQ subscriber thread, read by input thread) + // ------------------------------------------------------------------ + mutable std::mutex data_mutex_; ///< Guards the fields below. + bool has_new_data_ = false; ///< True when a new message is waiting to be decoded. + ZMQPackedMessageSubscriber::DecodedHeader buffered_header_; ///< Latest JSON header. + std::vector> buffered_buffers_; ///< Copied binary field data. + + // ------------------------------------------------------------------ + // Timing / diagnostics + // ------------------------------------------------------------------ + bool is_localhost_ = true; ///< True if host_ is localhost (for directly comparing timestamps) + std::optional data_timestamp_{}; ///< Timestamp of last received message from XR source + std::optional last_receive_time_{}; ///< Timestamp of last OnPoseDataReceived (ms, monotonic). + uint64_t receive_count_ = 0; ///< Total number of messages received. + uint64_t last_decode_time_ = 0; ///< Timestamp of last DecodeIntoMotionSequence call (ms). + +}; + +#endif // ZMQ_ENDPOINT_INTERFACE_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_manager.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_manager.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6917e5908df2031dc910acdddbcbbc8e02feba8d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_manager.hpp @@ -0,0 +1,1257 @@ +/** + * @file zmq_manager.hpp + * @brief Network-only input manager that switches between planner mode and + * streamed-motion mode, both driven by ZMQ topics. + * + * ZMQManager subscribes to **three** ZMQ topics on the same host:port: + * + * Topic | Purpose + * -----------|-------- + * command | High-level control (start / stop / mode switch). + * | Wire format: `{ start: bool, stop: bool, planner: bool, delta_heading?: f32 }` + * planner | Per-frame locomotion commands (mode, movement, facing, speed, height, + * | optional upper-body / hand / VR data). Active in PLANNER mode. + * pose | Streamed motion frames (joint_pos, joint_vel, body_quat, …). + * | Active in STREAMED_MOTION mode, handled by an internal ZMQEndpointInterface. + * + * ## Mode Switching + * + * The `planner` field in the command message selects the mode: + * - `planner = true` → PLANNER mode (movement commands from the planner topic). + * - `planner = false` → STREAMED_MOTION mode (pose data from the pose topic). + * + * On each mode switch, safety resets are triggered and the planner buffer is + * cleared to prevent stale commands from leaking across modes. + * + * ## Planner Timeout + * + * If no planner message arrives within 1 second (PLANNER_TIMEOUT), the manager + * automatically resets the locomotion to IDLE and clears upper-body / hand-joint + * control flags. + * + * ## Keyboard Shortcuts (via stdin) + * + * Key | Action + * -----|------- + * O/o | Emergency stop + * g/G, h/H | Left-hand compliance ±0.1 + * b/B, v/V | Right-hand compliance ±0.1 + * x/X, c/C | Hand max-close ratio ±0.1 + */ + +#ifndef ZMQ_MANAGER_HPP +#define ZMQ_MANAGER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "input_interface.hpp" +#include "input_command.hpp" +#include "zmq_endpoint_interface.hpp" +#include "zmq_packed_message_subscriber.hpp" +#include "../localmotion_kplanner.hpp" // For LocomotionMode enum +#include "../math_utils.hpp" // For normalize_vector + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +/** + * @class ZMQManager + * @brief InputInterface that manages two ZMQ-driven modes: + * PLANNER (locomotion commands) and STREAMED_MOTION (pose data). + * + * Internally owns a ZMQEndpointInterface for streamed-motion mode and two + * ZMQPackedMessageSubscriber instances for the command and planner topics. + */ +class ZMQManager : public InputInterface { + public: + static constexpr bool DEBUG_LOGGING = false; + + enum class ManagedMode { + PLANNER = 0, // Planner-only mode (self-managed planner topic) + STREAMED_MOTION = 1 // ZMQ streamed motion mode (pose topic via ZMQEndpointInterface) + }; + + ZMQManager( + const std::string& zmq_host, + int zmq_port, + const std::string& pose_topic = "pose", + const std::string& command_topic = "command", + const std::string& planner_topic = "planner", + bool zmq_conflate = false, + bool zmq_verbose = false + ) : InputInterface(), + zmq_host_(zmq_host), + zmq_port_(zmq_port), + pose_topic_(pose_topic), + command_topic_(command_topic), + planner_topic_(planner_topic), + zmq_conflate_(zmq_conflate), + zmq_verbose_(zmq_verbose) { + + type_ = InputType::NETWORK; + active_mode_ = ManagedMode::PLANNER; // Default to planner mode + + // Create pose interface (for streamed motion mode) + pose_interface_ = std::make_unique( + zmq_host_, zmq_port_, pose_topic_, zmq_conflate_, zmq_verbose_ + ); + + // Create command subscriber + command_subscriber_ = std::make_unique( + zmq_host_, zmq_port_, command_topic_, + /*timeout_ms=*/100, + zmq_verbose_, + /*use_conflate=*/false, + /*rcv_hwm=*/3 + ); + + command_subscriber_->SetOnDecodedMessage( + [this](const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + this->OnCommandReceived(topic, hdr, bufs); + } + ); + + command_subscriber_->Start(); + + // Create planner subscriber + planner_subscriber_ = std::make_unique( + zmq_host_, zmq_port_, planner_topic_, + /*timeout_ms=*/100, + zmq_verbose_, + /*use_conflate=*/false, + /*rcv_hwm=*/3 + ); + + planner_subscriber_->SetOnDecodedMessage( + [this](const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + this->OnPlannerReceived(topic, hdr, bufs); + } + ); + + planner_subscriber_->Start(); + + std::cout << "[ZMQManager] Initialized (default: PLANNER mode)" << std::endl; + std::cout << " - Host: " << zmq_host_ << ":" << zmq_port_ << std::endl; + std::cout << " - Command topic: '" << command_topic_ << "' (start/stop/mode)" << std::endl; + std::cout << " Format: { start: bool, stop: bool, planner: bool }" << std::endl; + std::cout << " - Planner topic: '" << planner_topic_ << "' (movement)" << std::endl; + std::cout << " - Pose topic: '" << pose_topic_ << "' (streamed motion)" << std::endl; + } + + ~ZMQManager() { + if (command_subscriber_) command_subscriber_->Stop(); + if (planner_subscriber_) planner_subscriber_->Stop(); + } + + void update() override { + // Reset per-frame flags + emergency_stop_ = false; + report_temperature_flag_ = false; + start_control_ = false; + stop_control_ = false; + + // Handle stdin shortcuts + char ch; + while (ReadStdinChar(ch)) { + bool is_manager_key = false; + switch (ch) { + case 'o': + case 'O': + emergency_stop_ = true; + is_manager_key = true; + std::cout << "[ZMQManager] EMERGENCY STOP (O/o)" << std::endl; + break; + case 'f': + case 'F': + report_temperature_flag_ = true; + is_manager_key = true; + break; + // Global compliance controls - work across ALL modes + case 'g': + case 'G': + // Increase left hand compliance by 0.1 + AdjustLeftHandCompliance(0.1); + is_manager_key = true; + break; + case 'h': + case 'H': + // Decrease left hand compliance by 0.1 + AdjustLeftHandCompliance(-0.1); + is_manager_key = true; + break; + case 'b': + case 'B': + // Increase right hand compliance by 0.1 + AdjustRightHandCompliance(0.1); + is_manager_key = true; + break; + case 'v': + case 'V': + // Decrease right hand compliance by 0.1 + AdjustRightHandCompliance(-0.1); + is_manager_key = true; + break; + // Global hand max close ratio controls (x/c keys) + case 'x': + case 'X': + // Increase max close ratio by 0.1 (allow hands to close more) + AdjustMaxCloseRatio(0.1); + is_manager_key = true; + break; + case 'c': + case 'C': + // Decrease max close ratio by 0.1 (keep hands more open) + AdjustMaxCloseRatio(-0.1); + is_manager_key = true; + break; + } + + // Pass other keys to pose interface (only in streamed motion mode) + if (!is_manager_key && active_mode_ == ManagedMode::STREAMED_MOTION && pose_interface_) { + pose_interface_->PushStdinChar(ch); + } + } + + // Translate received command to control flags and handle mode switching + bool trigger_zmq_toggle = false; + { + std::lock_guard lock(command_mutex_); + if (latest_command_.valid) { + // Set control flags (already accumulated in callback) + if (latest_command_.start) { + start_control_ = true; + } + if (latest_command_.stop) { + stop_control_ = true; + } + + // Handle mode switching + ManagedMode new_mode = latest_command_.planner ? ManagedMode::PLANNER : ManagedMode::STREAMED_MOTION; + + if (new_mode != active_mode_) { + // Trigger safety reset on mode switch + TriggerSafetyReset(); + if (pose_interface_) { + pose_interface_->TriggerSafetyReset(); + } + + if (new_mode == ManagedMode::PLANNER) { + std::cout << "[ZMQManager] Switched to: PLANNER mode (safety reset)" << std::endl; + if (latest_planner_message_.valid) { + constexpr auto PLANNER_MESSAGE_TIMEOUT = std::chrono::milliseconds(100); + auto time_since_last_planner = std::chrono::steady_clock::now() - latest_planner_message_.timestamp; + if (time_since_last_planner < PLANNER_MESSAGE_TIMEOUT) { + // Valid planner message within timeout - use it + // Update upper body control state based on this message + has_upper_body_control_ = latest_planner_message_.upper_body_position.has_value(); + + // Update hand joints control state based on this message + has_hand_joints_ = latest_planner_message_.left_hand_joints.has_value() || + latest_planner_message_.right_hand_joints.has_value(); + } + } + } else if (new_mode == ManagedMode::STREAMED_MOTION) { + std::cout << "[ZMQManager] Switched to: STREAMED MOTION mode (safety reset)" << std::endl; + trigger_zmq_toggle = true; + + // Clear planner buffer when switching away from planner mode + { + std::lock_guard lock(planner_mutex_); + latest_planner_message_.valid = false; + latest_planner_message_.timestamp = {}; + is_planner_ready_ = false; + switch_from_teleop_to_planner_ = true; + } + std::cout << "[ZMQManager] Cleared planner buffer" << std::endl; + } + } + + // Clear valid flag - next callback will start fresh accumulation + active_mode_ = new_mode; + latest_command_.valid = false; + } + } + + // Update active interface based on mode + if (active_mode_ == ManagedMode::STREAMED_MOTION && pose_interface_) { + // In streamed motion mode: update pose interface + pose_interface_->update(); + if (trigger_zmq_toggle) { + pose_interface_->TriggerZMQToggle(); + std::cout << "[ZMQManager] ZMQ streaming enabled" << std::endl; + } + } + } + + void handle_input(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex, + bool& report_temperature) override { + if (!has_planner) { + std::cerr << "[ZMQCommandManager ERROR] Planner not available in planner mode" << std::endl; + operator_state.stop = true; + return; + } + // Emergency stop + if (report_temperature_flag_) { + report_temperature = true; + report_temperature_flag_ = false; + } + if (emergency_stop_) { + operator_state.stop = true; + if (planner_state.enabled) { + planner_state.enabled = false; + planner_state.initialized = false; + } + + // Clear planner buffer on emergency stop + { + std::lock_guard lock(planner_mutex_); + latest_planner_message_.valid = false; + latest_planner_message_.timestamp = {}; + } + // Clear upper body control state + has_upper_body_control_ = false; + + // Clear hand joints control state + has_hand_joints_ = false; + + return; + } + + // Handle stop control + if (stop_control_) { + operator_state.stop = true; + if (planner_state.enabled) { + planner_state.enabled = false; + planner_state.initialized = false; + } + + // Clear planner buffer on stop + { + std::lock_guard lock(planner_mutex_); + latest_planner_message_.valid = false; + latest_planner_message_.timestamp = {}; + } + // Clear upper body control state + has_upper_body_control_ = false; + + // Clear hand joints control state + has_hand_joints_ = false; + } + + // Delegate based on current mode + if (active_mode_ == ManagedMode::PLANNER) { + // Planner mode: handle planner input ourselves + handlePlannerInput(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, + heading_state_buffer, + has_planner, planner_state, movement_state_buffer, + current_motion_mutex); + } else { + // Streamed motion mode: delegate to pose interface + if (pose_interface_) { + pose_interface_->handle_input(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, + heading_state_buffer, + has_planner, planner_state, movement_state_buffer, + current_motion_mutex, report_temperature); + } + } + } + + // Forward getters to pose interface when in streamed motion mode + bool HasVR3PointControl() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->HasVR3PointControl(); + } + return has_vr_3point_control_; + } + + bool HasHandJoints() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->HasHandJoints(); + } + return has_hand_joints_; + } + + bool HasExternalTokenState() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->HasExternalTokenState(); + } + return has_external_token_state_; + } + + std::pair> GetVR3PointPosition() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->GetVR3PointPosition(); + } + return InputInterface::GetVR3PointPosition(); + } + + std::pair> GetVR3PointOrientation() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->GetVR3PointOrientation(); + } + return InputInterface::GetVR3PointOrientation(); + } + + std::array GetVR3PointCompliance() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->GetVR3PointCompliance(); + } + return InputInterface::GetVR3PointCompliance(); + } + + std::pair> GetHandPose(bool is_left) const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->GetHandPose(is_left); + } + return InputInterface::GetHandPose(is_left); + } + + std::pair> GetExternalTokenState() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION || (!is_planner_ready_ && switch_from_teleop_to_planner_)) && pose_interface_) { + return pose_interface_->GetExternalTokenState(); + } + return InputInterface::GetExternalTokenState(); + } + + std::optional GetLastUpdateTime() const override { + if ((active_mode_ == ManagedMode::STREAMED_MOTION) && pose_interface_) { + return pose_interface_->GetLastUpdateTime(); + } + return InputInterface::GetLastUpdateTime(); + } + + private: + // Handle planner mode input (similar to GamepadManager::handleGamepadPlannerInput) + void handlePlannerInput(MotionDataReader& motion_reader, + std::shared_ptr& current_motion, + int& current_frame, + OperatorState& operator_state, + bool& reinitialize_heading, + DataBuffer& heading_state_buffer, + bool has_planner, + PlannerState& planner_state, + DataBuffer& movement_state_buffer, + std::mutex& current_motion_mutex) { + + // Handle safety reset from interface manager (same as GamepadManager) + if (CheckAndClearSafetyReset()) { + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + } + if (operator_state.start) { + if (planner_state.enabled && planner_state.initialized) { + // Planner is already on, keep it as is (don't touch initialized flag) + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() == 1) { + current_motion->SetEncodeMode(0); + } + operator_state.play = true; + } + auto current_facing = movement_state_buffer.GetDataWithTime().data->facing_direction; + std::cout << "[ZMQManager] Safety reset: Planner kept enabled with current state" << std::endl; + } else { + // Planner was disabled, set initial movement state + movement_state_buffer.SetData(MovementState(static_cast(LocomotionMode::IDLE), + {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f)); + + // Now enable planner + planner_state.enabled = true; + std::cout << "[ZMQManager] Planner enabled" << std::endl; + + // Wait for planner to be initialized with timeout (5 seconds) + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[ZMQCommandManager ERROR] Planner initialization timeout after 5 seconds" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[ZMQManager] Waiting for planner to be initialized" << std::endl; + } + + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[ZMQCommandManager ERROR] Planner failed to initialize. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + is_planner_ready_ = true; + + // Play motion + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } + } + return; + } + + // Handle start control + if (start_control_ && !operator_state.start) { + operator_state.start = true; + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = false; + reinitialize_heading = true; + } + + // Ensure planner is enabled + if (!planner_state.enabled) { + planner_state.enabled = true; + std::cout << "[ZMQManager] Planner enabled" << std::endl; + } + + // Wait for initialization + auto wait_start = std::chrono::steady_clock::now(); + constexpr auto PLANNER_INIT_TIMEOUT = std::chrono::seconds(5); + while (planner_state.enabled) { + { + std::lock_guard lock(current_motion_mutex); + if (current_motion->name == "planner_motion") { + std::cout << "[ZMQManager] motion name is planner_motion" << std::endl; + break; + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + auto elapsed = std::chrono::steady_clock::now() - wait_start; + if (elapsed > PLANNER_INIT_TIMEOUT) { + std::cerr << "[ZMQCommandManager ERROR] Planner initialization timeout" << std::endl; + operator_state.stop = true; + return; + } + std::cout << "[ZMQManager] Waiting for planner to be initialized" << std::endl; + } + + // Check if planner is enabled and initialized + if (!planner_state.enabled || !planner_state.initialized) { + std::cerr << "[ZMQCommandManager ERROR] Planner failed to initialize. Stopping control." << std::endl; + operator_state.stop = true; + return; + } + + is_planner_ready_ = true; + + { + std::lock_guard lock(current_motion_mutex); + operator_state.play = true; + } + } + + // Apply planner commands if planner is ready + if (planner_state.enabled && planner_state.initialized) { + std::lock_guard lock(planner_mutex_); + + // Check for planner timeout (1 second) + constexpr auto PLANNER_TIMEOUT = std::chrono::milliseconds(1000); + auto time_since_last_planner = std::chrono::steady_clock::now() - latest_planner_message_.timestamp; + + if (latest_planner_message_.valid) { + // Valid planner message within timeout - use it + // Update upper body control state based on this message + has_upper_body_control_ = latest_planner_message_.upper_body_position.has_value(); + + // Update hand joints control state based on this message + has_hand_joints_ = latest_planner_message_.left_hand_joints.has_value() || + latest_planner_message_.right_hand_joints.has_value(); + + MovementState mode_state( + latest_planner_message_.mode, + latest_planner_message_.movement, + latest_planner_message_.facing, + latest_planner_message_.speed, + latest_planner_message_.height + ); + + if (is_squat_motion_mode(static_cast(mode_state.locomotion_mode))) { + if (mode_state.height < 0.2) mode_state.height = 0.2; + } + if (is_static_motion_mode(static_cast(mode_state.locomotion_mode))) { + mode_state.movement_speed = -1.0f; + } + + // normalize facing direction and movement direction + mode_state.facing_direction = normalize_vector_d(mode_state.facing_direction); + mode_state.movement_direction = normalize_vector_d(mode_state.movement_direction); + + movement_state_buffer.SetData(mode_state); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] Planner command: mode=" << latest_planner_message_.mode + << ", speed=" << latest_planner_message_.speed << std::endl; + } + + // Clear planner buffer to avoid using stale data + latest_planner_message_.valid = false; + + } else if (!latest_planner_message_.valid && time_since_last_planner >= PLANNER_TIMEOUT) { + // Planner timeout - reset to IDLE and clear buffer + has_upper_body_control_ = false; + + has_hand_joints_ = false; + + auto current_facing = movement_state_buffer.GetDataWithTime().data->facing_direction; + MovementState idle_state( + static_cast(LocomotionMode::IDLE), + {0.0f, 0.0f, 0.0f}, + current_facing, + -1.0f, + -1.0f + ); + movement_state_buffer.SetData(idle_state); + + if (latest_planner_message_.timestamp != std::chrono::steady_clock::time_point{}) { + std::cout << "[ZMQManager] Planner timeout (" + << std::chrono::duration_cast(time_since_last_planner).count() + << "ms) - reset to IDLE and cleared buffer" << std::endl; + + // Clear planner buffer to avoid using stale data + latest_planner_message_.valid = false; + latest_planner_message_.timestamp = {}; + } + + } + } + + if (has_vr_3point_control_ && !last_has_vr_3point_control_) { + std::cout << "[ZMQManager] VR 3-point control enabled" << std::endl; + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(1); + } + } + else if (!has_vr_3point_control_ && last_has_vr_3point_control_) { + std::cout << "[ZMQManager] VR 3-point control disabled" << std::endl; + std::lock_guard lock(current_motion_mutex); + if (current_motion->GetEncodeMode() >= 0) { + current_motion->SetEncodeMode(0); + } + } + last_has_vr_3point_control_ = has_vr_3point_control_; + } + + // Callback handlers - just update buffer, no queue + void OnCommandReceived( + const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + + if (hdr.fields.empty() || bufs.empty()) return; + + int start_idx = -1, stop_idx = -1, planner_idx = -1; + for (size_t i = 0; i < hdr.fields.size(); ++i) { + if (hdr.fields[i].name == "start") start_idx = static_cast(i); + else if (hdr.fields[i].name == "stop") stop_idx = static_cast(i); + else if (hdr.fields[i].name == "planner") planner_idx = static_cast(i); + } + + if (start_idx < 0 || stop_idx < 0 || planner_idx < 0) { + std::cerr << "[ZMQManager] Command missing fields (need: start, stop, planner)" << std::endl; + return; + } + + CommandMessage cmd; + cmd.valid = true; + + bool needs_swap = hdr.NeedsByteSwap(); + + // Decode start + const auto& start_buf = bufs[start_idx]; + const auto& start_field = hdr.fields[start_idx]; + if (start_field.dtype == "bool" || start_field.dtype == "u8") { + uint8_t val = 0; + if (start_buf.size >= sizeof(uint8_t)) { + std::memcpy(&val, start_buf.data, sizeof(uint8_t)); + cmd.start = (val != 0); + } + } else if (start_field.dtype == "i32") { + int32_t val = 0; + if (start_buf.size >= sizeof(int32_t)) { + std::memcpy(&val, start_buf.data, sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + cmd.start = (val != 0); + } + } + + // Decode stop + const auto& stop_buf = bufs[stop_idx]; + const auto& stop_field = hdr.fields[stop_idx]; + if (stop_field.dtype == "bool" || stop_field.dtype == "u8") { + uint8_t val = 0; + if (stop_buf.size >= sizeof(uint8_t)) { + std::memcpy(&val, stop_buf.data, sizeof(uint8_t)); + cmd.stop = (val != 0); + } + } else if (stop_field.dtype == "i32") { + int32_t val = 0; + if (stop_buf.size >= sizeof(int32_t)) { + std::memcpy(&val, stop_buf.data, sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + cmd.stop = (val != 0); + } + } + + // Decode planner + const auto& planner_buf = bufs[planner_idx]; + const auto& planner_field = hdr.fields[planner_idx]; + if (planner_field.dtype == "bool" || planner_field.dtype == "u8") { + uint8_t val = 0; + if (planner_buf.size >= sizeof(uint8_t)) { + std::memcpy(&val, planner_buf.data, sizeof(uint8_t)); + cmd.planner = (val != 0); + } + } else if (planner_field.dtype == "i32") { + int32_t val = 0; + if (planner_buf.size >= sizeof(int32_t)) { + std::memcpy(&val, planner_buf.data, sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + cmd.planner = (val != 0); + } + } + + // Update buffer with OR logic to accumulate start/stop signals + std::lock_guard lock(command_mutex_); + + // If starting new accumulation cycle, reset start/stop + if (!latest_command_.valid) { + latest_command_.start = false; + latest_command_.stop = false; + } + + // Accumulate start/stop with OR logic + latest_command_.start = latest_command_.start || cmd.start; + latest_command_.stop = latest_command_.stop || cmd.stop; + latest_command_.planner = cmd.planner; // Overwrite (mode should be latest) + latest_command_.valid = true; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] Command received: start=" << cmd.start + << ", stop=" << cmd.stop << ", planner=" << cmd.planner << std::endl; + } + } + + void OnPlannerReceived( + const std::string& topic, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + + int mode_idx = -1, movement_idx = -1, facing_idx = -1; + int speed_idx = -1, height_idx = -1; + int upper_body_position_idx = -1, upper_body_velocity_idx = -1; + int left_hand_joints_idx = -1, right_hand_joints_idx = -1; + int vr_position_idx = -1, vr_orientation_idx = -1, vr_compliance_idx = -1; + + for (size_t i = 0; i < hdr.fields.size(); ++i) { + const auto& f = hdr.fields[i]; + if (f.name == "mode") mode_idx = static_cast(i); + else if (f.name == "movement") movement_idx = static_cast(i); + else if (f.name == "facing") facing_idx = static_cast(i); + else if (f.name == "speed") speed_idx = static_cast(i); + else if (f.name == "height") height_idx = static_cast(i); + else if (f.name == "upper_body_position") upper_body_position_idx = static_cast(i); + else if (f.name == "upper_body_velocity") upper_body_velocity_idx = static_cast(i); + else if (f.name == "left_hand_joints") left_hand_joints_idx = static_cast(i); + else if (f.name == "right_hand_joints") right_hand_joints_idx = static_cast(i); + else if (f.name == "vr_position") vr_position_idx = static_cast(i); + else if (f.name == "vr_orientation") vr_orientation_idx = static_cast(i); + else if (f.name == "vr_compliance") vr_compliance_idx = static_cast(i); + } + + if (mode_idx < 0 || movement_idx < 0 || facing_idx < 0) { + std::cerr << "[ZMQManager] Planner missing required fields" << std::endl; + return; + } + + PlannerMessage msg; + msg.valid = true; + + bool needs_swap = hdr.NeedsByteSwap(); + + // Decode mode + const auto& mode_buf = bufs[mode_idx]; + int32_t mode_val; + std::memcpy(&mode_val, mode_buf.data, sizeof(int32_t)); + if (needs_swap) mode_val = byte_swap(mode_val); + msg.mode = static_cast(mode_val); + + // Decode movement based on dtype + const auto& movement_buf = bufs[movement_idx]; + const auto& movement_field = hdr.fields[movement_idx]; + if (movement_field.dtype == "f32") { + for (int i = 0; i < 3; ++i) { + float val; + std::memcpy(&val, static_cast(movement_buf.data) + i * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + msg.movement[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 3; ++i) { + double val; + std::memcpy(&val, static_cast(movement_buf.data) + i * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + msg.movement[i] = val; + } + } + + // Decode facing based on dtype + const auto& facing_buf = bufs[facing_idx]; + const auto& facing_field = hdr.fields[facing_idx]; + if (facing_field.dtype == "f32") { + for (int i = 0; i < 3; ++i) { + float val; + std::memcpy(&val, static_cast(facing_buf.data) + i * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + msg.facing[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 3; ++i) { + double val; + std::memcpy(&val, static_cast(facing_buf.data) + i * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + msg.facing[i] = val; + } + } + + // Optional: speed (decode based on dtype) + if (speed_idx >= 0) { + const auto& speed_buf = bufs[speed_idx]; + const auto& speed_field = hdr.fields[speed_idx]; + if (speed_field.dtype == "f32") { + float val; + std::memcpy(&val, speed_buf.data, sizeof(float)); + if (needs_swap) val = byte_swap(val); + msg.speed = static_cast(val); + } else { // f64 or default + double val; + std::memcpy(&val, speed_buf.data, sizeof(double)); + if (needs_swap) val = byte_swap(val); + msg.speed = val; + } + } + + // Optional: height (decode based on dtype) + if (height_idx >= 0) { + const auto& height_buf = bufs[height_idx]; + const auto& height_field = hdr.fields[height_idx]; + if (height_field.dtype == "f32") { + float val; + std::memcpy(&val, height_buf.data, sizeof(float)); + if (needs_swap) val = byte_swap(val); + msg.height = static_cast(val); + } else { // f64 or default + double val; + std::memcpy(&val, height_buf.data, sizeof(double)); + if (needs_swap) val = byte_swap(val); + msg.height = val; + } + } + + // Optional: upper_body_position (17 DOF, decode based on dtype) + if (upper_body_position_idx >= 0) { + const auto& ub_pos_buf = bufs[upper_body_position_idx]; + const auto& ub_pos_field = hdr.fields[upper_body_position_idx]; + + std::array upper_body_position_data{}; + if (ub_pos_field.dtype == "f32") { + for (int i = 0; i < 17; ++i) { + float val; + std::memcpy(&val, + static_cast(ub_pos_buf.data) + i * sizeof(float), + sizeof(float)); + if (needs_swap) val = byte_swap(val); + upper_body_position_data[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 17; ++i) { + double val; + std::memcpy(&val, + static_cast(ub_pos_buf.data) + i * sizeof(double), + sizeof(double)); + if (needs_swap) val = byte_swap(val); + upper_body_position_data[i] = val; + } + } + msg.upper_body_position = upper_body_position_data; + + // Push into upper-body position buffer + upper_body_joint_positions_.SetData(upper_body_position_data); + } + + // Optional: upper_body_velocity (17 DOF, decode based on dtype) + if (upper_body_velocity_idx >= 0) { + const auto& ub_vel_buf = bufs[upper_body_velocity_idx]; + const auto& ub_vel_field = hdr.fields[upper_body_velocity_idx]; + + std::array upper_body_velocity_data{}; + if (ub_vel_field.dtype == "f32") { + for (int i = 0; i < 17; ++i) { + float val; + std::memcpy(&val, + static_cast(ub_vel_buf.data) + i * sizeof(float), + sizeof(float)); + if (needs_swap) val = byte_swap(val); + upper_body_velocity_data[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 17; ++i) { + double val; + std::memcpy(&val, + static_cast(ub_vel_buf.data) + i * sizeof(double), + sizeof(double)); + if (needs_swap) val = byte_swap(val); + upper_body_velocity_data[i] = val; + } + } + msg.upper_body_velocity = upper_body_velocity_data; + + // Push into upper-body velocity buffer + upper_body_joint_velocities_.SetData(upper_body_velocity_data); + } + + // Optional: left_hand_joints (7 DOF, decode based on dtype) + if (left_hand_joints_idx >= 0) { + const auto& lh_buf = bufs[left_hand_joints_idx]; + const auto& lh_field = hdr.fields[left_hand_joints_idx]; + + std::array left_hand_joints_data{}; + if (lh_field.dtype == "f32") { + for (int i = 0; i < 7; ++i) { + float val; + std::memcpy(&val, + static_cast(lh_buf.data) + i * sizeof(float), + sizeof(float)); + if (needs_swap) val = byte_swap(val); + left_hand_joints_data[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 7; ++i) { + double val; + std::memcpy(&val, + static_cast(lh_buf.data) + i * sizeof(double), + sizeof(double)); + if (needs_swap) val = byte_swap(val); + left_hand_joints_data[i] = val; + } + } + msg.left_hand_joints = left_hand_joints_data; + + // Push into left hand joint buffer + left_hand_joint_.SetData(left_hand_joints_data); + } + + // Optional: right_hand_joints (7 DOF, decode based on dtype) + if (right_hand_joints_idx >= 0) { + const auto& rh_buf = bufs[right_hand_joints_idx]; + const auto& rh_field = hdr.fields[right_hand_joints_idx]; + + std::array right_hand_joints_data{}; + if (rh_field.dtype == "f32") { + for (int i = 0; i < 7; ++i) { + float val; + std::memcpy(&val, + static_cast(rh_buf.data) + i * sizeof(float), + sizeof(float)); + if (needs_swap) val = byte_swap(val); + right_hand_joints_data[i] = static_cast(val); + } + } else { // f64 or default + for (int i = 0; i < 7; ++i) { + double val; + std::memcpy(&val, + static_cast(rh_buf.data) + i * sizeof(double), + sizeof(double)); + if (needs_swap) val = byte_swap(val); + right_hand_joints_data[i] = val; + } + } + msg.right_hand_joints = right_hand_joints_data; + + // Push into right hand joint buffer + right_hand_joint_.SetData(right_hand_joints_data); + } + + // Decode VR 3-point tracking data if present (9 doubles for position, 12 doubles for orientation, 3 doubles for compliance) + // Use default values from InputInterface as fallback + bool has_vr_position = (vr_position_idx >= 0); + bool has_vr_orientation = (vr_orientation_idx >= 0); + bool has_vr_compliance = (vr_compliance_idx >= 0); + // Default values from input_interface.hpp + std::array vr_position_values = GetVR3PointPosition().second; + std::array vr_orientation_values = GetVR3PointOrientation().second; + std::array vr_compliance_values = GetVR3PointCompliance(); + + if (has_vr_position) { + const auto& vr_pos_field = hdr.fields[vr_position_idx]; + const auto& vr_pos_buf = bufs[vr_position_idx]; + + // Validate shape: expect [9] or [1, 9] + int num_vr_pos_values = 0; + if (vr_pos_field.shape.size() == 1 && vr_pos_field.shape[0] == 9) { + num_vr_pos_values = 9; + } else if (vr_pos_field.shape.size() == 2 && vr_pos_field.shape[1] == 9) { + num_vr_pos_values = 9; + } + + if (num_vr_pos_values == 9) { + // Decode 9 position values + if (vr_pos_field.dtype == "f32") { + for (int j = 0; j < 9; ++j) { + float val; + std::memcpy(&val, static_cast(vr_pos_buf.data) + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + vr_position_values[j] = static_cast(val); + } + } else { // f64 or default + for (int j = 0; j < 9; ++j) { + double val; + std::memcpy(&val, static_cast(vr_pos_buf.data) + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + vr_position_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] Decoded vr_position: ["; + for (int j = 0; j < 9; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_position_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQManager] Invalid vr_position shape" << std::endl; + has_vr_position = false; + } + } + + if (has_vr_orientation) { + const auto& vr_orient_field = hdr.fields[vr_orientation_idx]; + const auto& vr_orient_buf = bufs[vr_orientation_idx]; + + // Validate shape: expect [12] or [1, 12] + int num_vr_orient_values = 0; + if (vr_orient_field.shape.size() == 1 && vr_orient_field.shape[0] == 12) { + num_vr_orient_values = 12; + } else if (vr_orient_field.shape.size() == 2 && vr_orient_field.shape[1] == 12) { + num_vr_orient_values = 12; + } + + if (num_vr_orient_values == 12) { + // Decode 12 orientation values (quaternions) + if (vr_orient_field.dtype == "f32") { + for (int j = 0; j < 12; ++j) { + float val; + std::memcpy(&val, static_cast(vr_orient_buf.data) + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + vr_orientation_values[j] = static_cast(val); + } + } else { // f64 or default + for (int j = 0; j < 12; ++j) { + double val; + std::memcpy(&val, static_cast(vr_orient_buf.data) + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + vr_orientation_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] Decoded vr_orientation: ["; + for (int j = 0; j < 12; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_orientation_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQManager] Invalid vr_orientation shape" << std::endl; + has_vr_orientation = false; + } + } + + if (has_vr_compliance) { + const auto& vr_compl_field = hdr.fields[vr_compliance_idx]; + const auto& vr_compl_buf = bufs[vr_compliance_idx]; + + // Validate shape: expect [3] or [1, 3] + int num_vr_compl_values = 0; + if (vr_compl_field.shape.size() == 1 && vr_compl_field.shape[0] == 3) { + num_vr_compl_values = 3; + } else if (vr_compl_field.shape.size() == 2 && vr_compl_field.shape[1] == 3) { + num_vr_compl_values = 3; + } + + if (num_vr_compl_values == 3) { + // Decode 3 compliance values + if (vr_compl_field.dtype == "f32") { + for (int j = 0; j < 3; ++j) { + float val; + std::memcpy(&val, static_cast(vr_compl_buf.data) + j * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + vr_compliance_values[j] = static_cast(val); + } + } else { // f64 or default + for (int j = 0; j < 3; ++j) { + double val; + std::memcpy(&val, static_cast(vr_compl_buf.data) + j * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + vr_compliance_values[j] = val; + } + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] Decoded vr_compliance: ["; + for (int j = 0; j < 3; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_compliance_values[j]; + } + std::cout << "]" << std::endl; + } + } else { + std::cerr << "[ZMQManager] Invalid vr_compliance shape" << std::endl; + has_vr_compliance = false; + } + } + + // Handle VR 3-point tracking: vr_position is required, orientation and compliance are optional + // If vr_position is present, set has_vr_3point_control_ = true and update all buffers + if (has_vr_position) { + // Always update all three buffers when VR position is present + // (orientation and compliance will use defaults if not provided) + vr_3point_position_.SetData(vr_position_values); + vr_3point_orientation_.SetData(vr_orientation_values); + if (has_vr_compliance) { + SetVR3PointCompliance(vr_compliance_values); + } + has_vr_3point_control_ = true; + + pose_interface_->SetVR3PointPosition(vr_position_values); + pose_interface_->SetVR3PointOrientation(vr_orientation_values); + pose_interface_->SetVR3PointCompliance(vr_compliance_values); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQManager] VR 3-point data updated:" << std::endl; + std::cout << " Position (left, right, head): ["; + for (int j = 0; j < 9; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_position_values[j]; + } + std::cout << "]" << (has_vr_position ? " (from message)" : " (default)") << std::endl; + + std::cout << " Orientation (left quat, right quat, head quat): ["; + for (int j = 0; j < 12; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_orientation_values[j]; + } + std::cout << "]" << (has_vr_orientation ? " (from message)" : " (default)") << std::endl; + if (has_vr_compliance) { + std::cout << " Compliance (left, right, head): ["; + for (int j = 0; j < 3; ++j) { + if (j > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << vr_compliance_values[j]; + } + std::cout << "]" << (has_vr_compliance ? " (from message)" : " (default)") << std::endl; + } + } + } + else { + // No VR position provided - disable VR 3-point control + has_vr_3point_control_ = false; + } + + // Update buffer directly (no queue) and set timestamp + std::lock_guard lock(planner_mutex_); + latest_planner_message_ = msg; + latest_planner_message_.timestamp = std::chrono::steady_clock::now(); + } + + + private: + // ------------------------------------------------------------------ + // Configuration (set once in constructor) + // ------------------------------------------------------------------ + std::string zmq_host_; ///< ZMQ server hostname. + int zmq_port_; ///< ZMQ server port. + std::string pose_topic_; ///< Topic for streamed motion data. + std::string command_topic_; ///< Topic for start / stop / mode commands. + std::string planner_topic_; ///< Topic for planner movement commands. + bool zmq_conflate_; ///< ZMQ conflate option for pose topic. + bool zmq_verbose_; ///< Verbose logging flag. + + // ------------------------------------------------------------------ + // Owned sub-components + // ------------------------------------------------------------------ + /// Pose-streaming interface (handles STREAMED_MOTION mode internally). + std::unique_ptr pose_interface_; + + /// Background subscriber for the command topic. + std::unique_ptr command_subscriber_; + /// Background subscriber for the planner topic. + std::unique_ptr planner_subscriber_; + + // ------------------------------------------------------------------ + // Mode / message state + // ------------------------------------------------------------------ + ManagedMode active_mode_; ///< Current operational mode (PLANNER or STREAMED_MOTION). + + std::mutex command_mutex_; ///< Guards access to latest_command_. + CommandMessage latest_command_; ///< Most recent (or accumulated) command message. + + std::mutex planner_mutex_; ///< Guards access to latest_planner_message_. + PlannerMessage latest_planner_message_; ///< Most recent planner movement message. + + // ------------------------------------------------------------------ + // Per-frame control flags (reset at start of update()) + // ------------------------------------------------------------------ + bool emergency_stop_ = false; ///< Set by 'O'/'o' keyboard shortcut. + bool report_temperature_flag_ = false; ///< Set by 'F'/'f' keyboard shortcut. + bool start_control_ = false; ///< Start request from command message. + bool stop_control_ = false; ///< Stop request from command message. + + /// True once the planner has been initialised and is generating motions. + bool is_planner_ready_ = false; + /// True when transitioning from streamed-motion (teleop) back to planner mode; + /// used to keep forwarding VR/hand data from the pose interface until planner is ready. + bool switch_from_teleop_to_planner_ = false; + + /// Tracks the previous frame's VR-3-point state to detect enable/disable transitions + /// and automatically toggle encoder mode accordingly. + bool last_has_vr_3point_control_ = false; +}; + +#endif // ZMQ_MANAGER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_packed_message_subscriber.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_packed_message_subscriber.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8bab9b135e9b2be708101e1bfd03ef6a95a9b6ff --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/zmq_packed_message_subscriber.hpp @@ -0,0 +1,439 @@ +/** + * @file zmq_packed_message_subscriber.hpp + * @brief ZeroMQ SUB client for receiving "packed" binary messages. + * + * ## Wire Format + * + * Each ZMQ message is a **single-part message** with the following layout: + * + * [topic_prefix (optional)] [1280-byte JSON header] [concatenated binary fields] + * + * - **Topic prefix**: If a non-empty topic is configured, the subscriber + * filters on this prefix and strips it before processing. + * - **JSON header** (exactly `HEADER_SIZE` = 1280 bytes, null-padded): + * Describes the binary payload – version, endianness, field names, dtypes, + * and shapes. Example: + * ```json + * { "v": 1, "endian": "le", "count": 100, + * "fields": [ + * { "name": "joint_pos", "dtype": "f32", "shape": [100, 29] }, + * { "name": "body_quat", "dtype": "f64", "shape": [100, 1, 4] } + * ] + * } + * ``` + * - **Binary payload**: Fields concatenated in the order listed in the header. + * + * Because each message is a single ZMQ part, ZMQ's `conflate` option can safely + * be used to drop older messages and always process the latest one. + * + * ## Threading Model + * + * Start() spawns a background thread that calls PollOnce() in a tight loop. + * Decoded messages are dispatched to the user-supplied callback, which runs + * **on the background thread** – the callback must therefore be thread-safe + * or buffer data for later processing on the main thread. + * + * ## Endianness + * + * The header's `endian` field ("le" or "be") is compared against the native + * endianness at runtime. Helper functions `is_little_endian()` and + * `byte_swap()` are provided for callers that need to swap multi-byte values. + */ + +#ifndef ZMQ_PACKED_MESSAGE_SUBSCRIBER_HPP +#define ZMQ_PACKED_MESSAGE_SUBSCRIBER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/// @brief Detect whether the host CPU is little-endian. +inline bool is_little_endian() { + uint32_t test = 1; + return *reinterpret_cast(&test) == 1; +} + +/** + * @brief Reverse the byte order of a value (up to 64 bits). + * @tparam T An arithmetic type of at most 8 bytes. + */ +template +inline T byte_swap(T value) { + static_assert(sizeof(T) <= 8, "byte_swap only supports up to 64-bit types"); + union { + T val; + uint8_t bytes[sizeof(T)]; + } src, dst; + src.val = value; + for (size_t i = 0; i < sizeof(T); ++i) { + dst.bytes[i] = src.bytes[sizeof(T) - 1 - i]; + } + return dst.val; +} + +/** + * @class ZMQPackedMessageSubscriber + * @brief ZeroMQ SUB client that receives, parses, and dispatches packed + * binary messages described by a JSON header. + * + * Usage: + * 1. Construct with host / port / topic. + * 2. Call SetOnDecodedMessage() to register a callback. + * 3. Call Start() to begin background receiving. + * 4. Call Stop() (or let the destructor do it) to shut down. + */ +class ZMQPackedMessageSubscriber { + public: + /// Fixed size (in bytes) of the JSON header block at the start of each packed message. + static constexpr size_t HEADER_SIZE = 1280; + + /** + * @brief Construct a subscriber (does NOT connect or start yet). + * @param host ZMQ server hostname or IP. + * @param port ZMQ server port. + * @param topic Subscription topic prefix (empty = receive all). + * @param timeout_ms Receive timeout in milliseconds. + * @param verbose Enable verbose logging. + * @param conflate Enable ZMQ conflate (keep only latest message). + * @param rcv_hwm Receive high-water mark (−1 = ZMQ default). + */ + ZMQPackedMessageSubscriber( + const std::string &host = "localhost", + int port = 5556, + const std::string &topic = "pose", + int timeout_ms = 1000, + bool verbose = true, + bool conflate = false, + int rcv_hwm = -1 + ) + : host_(host), port_(port), topic_(topic), timeout_ms_(timeout_ms), verbose_(verbose), + conflate_(conflate), rcv_hwm_(rcv_hwm), + context_(1), running_(false) {} + + // Non-copyable, non-movable + ZMQPackedMessageSubscriber(const ZMQPackedMessageSubscriber&) = delete; + ZMQPackedMessageSubscriber& operator=(const ZMQPackedMessageSubscriber&) = delete; + + ~ZMQPackedMessageSubscriber() { Stop(); } + + /// Zero-copy view into the received message buffer. + /// **Only valid during the callback invocation** – do not store. + struct BufferView { + const void* data; ///< Pointer to the raw field bytes inside the ZMQ message. + std::size_t size; ///< Number of bytes. + }; + + /// Describes one binary field as declared in the JSON header. + struct FieldInfo { + std::string name; ///< Human-readable field name (e.g. "joint_pos"). + std::string dtype; ///< Data-type string: "f32", "f64", "i32", "i64", "bool", etc. + std::vector shape; ///< N-D shape (e.g. [100, 29] for 100 frames × 29 joints). + bool optional = false; ///< Whether the field may be absent from the payload. + + /// @brief Return the byte size of a single element for this dtype. + size_t GetElementSize() const { + if (dtype == "f64" || dtype == "i64") return 8; + if (dtype == "f32" || dtype == "i32") return 4; + if (dtype == "i16" || dtype == "f16") return 2; + if (dtype == "i8" || dtype == "u8" || dtype == "bool") return 1; + return 4; // default + } + + // Compute total byte size for this field + size_t ComputeByteSize() const { + if (shape.empty()) return 0; + size_t total_elements = 1; + for (auto dim : shape) total_elements *= dim; + return total_elements * GetElementSize(); + } + }; + + /// Parsed representation of the 1280-byte JSON header. + struct DecodedHeader { + int version = 0; ///< Protocol version (e.g. 1, 2, 3). + std::string endian; ///< "le" or "be" (empty defaults to "le"). + int count = -1; ///< Optional frame/element count hint. + std::vector fields; ///< Ordered list of binary field descriptors. + + /// @return True if the payload byte order differs from the native CPU order. + bool NeedsByteSwap() const { + bool native_le = is_little_endian(); + bool data_le = (endian == "le" || endian.empty()); // default to le + return native_le != data_le; + } + }; + + /// Register a callback to be invoked (on the background thread) for each + /// successfully decoded packed message. Must be called before Start(). + void SetOnDecodedMessage( + std::function&)> cb) { + on_decoded_ = std::move(cb); + } + + /// Create the ZMQ SUB socket, set options, and connect to the endpoint. + /// @return True on success, false on error (logged to stderr). + bool Connect() { + if (socket_) return true; + + try { + socket_ = std::make_unique(context_, zmq::socket_type::sub); + + socket_->set(zmq::sockopt::rcvtimeo, timeout_ms_); + socket_->set(zmq::sockopt::linger, 0); + if (rcv_hwm_ > 0) { + socket_->set(zmq::sockopt::rcvhwm, rcv_hwm_); + } + if (conflate_) { + socket_->set(zmq::sockopt::conflate, 1); + } + + const std::string endpoint = "tcp://" + host_ + ":" + std::to_string(port_); + socket_->connect(endpoint); + + // Subscribe: if topic is empty, receive all; otherwise filter by topic prefix + socket_->set(zmq::sockopt::subscribe, topic_); + + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] Subscribed to '" << topic_ << "' at " + << endpoint << std::endl; + } + return true; + } catch (const zmq::error_t &e) { + std::cerr << "[ZMQPackedMessageSubscriber] Connect error: " << e.what() << std::endl; + socket_.reset(); + return false; + } + } + + /// Spawn the background receive thread. Requires a callback and a connection. + void Start() { + if (running_) { + std::cerr << "[ZMQPackedMessageSubscriber] Already running" << std::endl; + return; + } + if (!on_decoded_) { + std::cerr << "[ZMQPackedMessageSubscriber] Error: callback not set" << std::endl; + return; + } + if (!Connect()) { + std::cerr << "[ZMQPackedMessageSubscriber] Error: Connect() failed" << std::endl; + return; + } + running_ = true; + recv_thread_ = std::thread([this]() { this->RunLoop(); }); + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] Background thread started" << std::endl; + } + } + + /// Stop the background thread and close the socket. + void Stop() { + if (!running_) return; + running_ = false; + if (recv_thread_.joinable()) { + recv_thread_.join(); + } + if (socket_) { + try { socket_->close(); } catch (...) {} + socket_.reset(); + } + } + + /** + * @brief Receive and decode one packed message (blocking up to timeout_ms). + * @return True if a message was successfully received and decoded. + * + * Can be called manually for single-threaded use, or is called in a loop + * by the background thread spawned by Start(). + */ + bool PollOnce() { + if (!socket_ && !Connect()) return false; + + try { + // Receive single packed message + zmq::message_t packed_frame; + zmq::recv_result_t r1 = socket_->recv(packed_frame, zmq::recv_flags::none); + if (!r1) return false; + + size_t packed_size = packed_frame.size(); + const unsigned char* packed_data = static_cast(packed_frame.data()); + + // Strip topic prefix if configured + if (!topic_.empty()) { + if (packed_size < topic_.size()) return false; // too small + if (std::memcmp(packed_data, topic_.data(), topic_.size()) != 0) { + return false; // topic mismatch + } + packed_data += topic_.size(); + packed_size -= topic_.size(); + } + + if (packed_size < HEADER_SIZE) { + if (verbose_) { + std::cerr << "[ZMQPackedMessageSubscriber] Packed frame too small: " << packed_size + << " < " << HEADER_SIZE << std::endl; + } + return false; + } + + // Extract JSON header (first HEADER_SIZE bytes, null-terminated) + std::string header_json; + size_t json_len = strnlen(reinterpret_cast(packed_data), HEADER_SIZE); + header_json.assign(reinterpret_cast(packed_data), json_len); + + // Decode header + DecodedHeader decoded; + if (!DecodeHeaderJSON(header_json, decoded)) { + if (verbose_) { + std::cerr << "[ZMQPackedMessageSubscriber] JSON parse failed" << std::endl; + std::cerr << " Header content: " << header_json << std::endl; + } + return false; + } + + bool needs_swap = decoded.NeedsByteSwap(); + + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] Parsed header: v=" << decoded.version + << " endian=" << decoded.endian << " count=" << decoded.count + << " fields=" << decoded.fields.size() + << " needs_byteswap=" << (needs_swap ? "yes" : "no") << std::endl; + for (size_t i = 0; i < decoded.fields.size(); ++i) { + const auto& f = decoded.fields[i]; + std::cout << " Field[" << i << "]: name=" << f.name << " dtype=" << f.dtype + << " shape=["; + for (size_t j = 0; j < f.shape.size(); ++j) { + std::cout << f.shape[j]; + if (j < f.shape.size() - 1) std::cout << ","; + } + std::cout << "] bytes=" << f.ComputeByteSize() << std::endl; + } + } + + // Note: BufferView provides raw pointers. If needs_swap=true, user must byte-swap + // when reading multi-byte values. We don't modify the received data in-place. + + // Build BufferViews for each field from the data section + const unsigned char* data_start = packed_data + HEADER_SIZE; + const size_t data_size = packed_size - HEADER_SIZE; + + std::vector buffers; + buffers.reserve(decoded.fields.size()); + + size_t offset = 0; + for (const auto& field : decoded.fields) { + size_t field_bytes = field.ComputeByteSize(); + if (offset + field_bytes > data_size) { + if (verbose_) { + std::cerr << "[ZMQPackedMessageSubscriber] Field " << field.name + << " exceeds data bounds" << std::endl; + } + return false; + } + buffers.push_back(BufferView{data_start + offset, field_bytes}); + offset += field_bytes; + } + + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] Received packed message: header_bytes=" << json_len + << " data_bytes=" << offset << " fields=" << buffers.size() << std::endl; + } + + if (on_decoded_) { + on_decoded_(topic_, decoded, buffers); // Use configured topic, not extracted + } + + return true; + } catch (const zmq::error_t &e) { + if (verbose_) { + std::cerr << "[ZMQPackedMessageSubscriber] Receive error: " << e.what() << std::endl; + } + Reconnect(); + return false; + } + } + + private: + void RunLoop() { + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] RunLoop started" << std::endl; + } + int poll_count = 0; + while (running_) { + PollOnce(); + poll_count++; + } + if (verbose_) { + std::cout << "[ZMQPackedMessageSubscriber] RunLoop finished after " << poll_count << " polls" << std::endl; + } + } + + void Reconnect() { + try { + if (socket_) { + try { socket_->close(); } catch (...) {} + socket_.reset(); + } + } catch (...) {} + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + Connect(); + } + + bool DecodeHeaderJSON(const std::string& header_json, DecodedHeader& out) const { + try { + auto j = nlohmann::json::parse(header_json); + if (j.contains("v")) out.version = j["v"].get(); + if (j.contains("endian")) out.endian = j["endian"].get(); + if (j.contains("count")) out.count = j["count"].get(); + out.fields.clear(); + if (j.contains("fields") && j["fields"].is_array()) { + for (const auto& f : j["fields"]) { + FieldInfo fi; + if (f.contains("name")) fi.name = f["name"].get(); + if (f.contains("dtype")) fi.dtype = f["dtype"].get(); + if (f.contains("optional")) fi.optional = f["optional"].get(); + fi.shape.clear(); + if (f.contains("shape") && f["shape"].is_array()) { + for (const auto& dim : f["shape"]) { + fi.shape.push_back(dim.get()); + } + } + out.fields.push_back(std::move(fi)); + } + } + return true; + } catch (...) { + return false; + } + } + + std::string host_; + int port_; + std::string topic_; + int timeout_ms_; + bool verbose_; + bool conflate_; + int rcv_hwm_; + + zmq::context_t context_; + std::unique_ptr socket_; + + std::atomic running_; + std::thread recv_thread_; + + std::function&)> on_decoded_; +}; + +#endif // ZMQ_PACKED_MESSAGE_SUBSCRIBER_HPP + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8dc573754e652070d32ca7a0ca5508d1b1938d44 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner.hpp @@ -0,0 +1,709 @@ +/** + * @file localmotion_kplanner.hpp + * @brief Locomotion planner base class, locomotion modes, and movement state. + * + * This header defines: + * - **LocomotionMode** enum – all supported locomotion styles (idle, walk, + * run, squat, kneel, crawl, boxing, styled walks, etc.) and helper + * predicates (is_static, is_standing, is_squat) and motion-set selectors. + * - **PlannerState** – enable / initialised flags. + * - **MovementState** – per-tick locomotion command (mode, direction, facing, + * speed, height) passed via DataBuffer from input interfaces to the + * planner thread. + * - **PlannerConfig** – model path, version, look-ahead, default height, seed. + * - **PlannerTiming** – timing breakdown for profiling planner phases. + * - **LocalMotionPlannerBase** – abstract base class providing: + * - `Initialize()` – set up context and run initial inference. + * - `UpdatePlanning()` – per-tick replanning with new movement commands. + * - `ResampleGeneratedSequence50Hz()` – convert 30 Hz planner output to + * 50 Hz control-rate MotionSequence. + * - Pure-virtual hooks for backend-specific work: `InitializeSpecific()`, + * `RunInference()`, `UpdateInputTensors()`, and buffer accessors. + * + * Concrete backends: `LocalMotionPlannerONNX` (ONNX Runtime) and + * `LocalMotionPlannerTensorRT` (TensorRT). + */ + +#ifndef LOCALMOTION_KPLANNER_HPP +#define LOCALMOTION_KPLANNER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Motion data structures +#include "motion_data_reader.hpp" +#include "robot_parameters.hpp" +#include "policy_parameters.hpp" +#include "math_utils.hpp" +#include "utils.hpp" +#include "cnpy.h" + +/// Planner lifecycle flags (set by input interfaces, read by planner thread). +struct PlannerState { + bool enabled = false; ///< True when the planner should be running. + bool initialized = false; ///< True after the first successful inference. +}; + +/** + * @brief Per-tick locomotion command passed from input interfaces to the planner. + * + * Written into a DataBuffer by the input thread and read + * by the planner thread each planning cycle. + */ +struct MovementState { + int locomotion_mode; ///< LocomotionMode cast to int. + std::array movement_direction; ///< Unit vector: desired movement direction [x,y,z]. + std::array facing_direction; ///< Unit vector: desired facing direction [x,y,z]. + double movement_speed; ///< Desired speed (−1 = mode default, 0 = stationary). + double height; ///< Desired body height (−1 = mode default). + + MovementState(int mode = 0, + const std::array& movement = {0.0, 0.0, 0.0}, + const std::array& facing = {1.0, 0.0, 0.0}, + double speed = 0.0, + double height = 0.0) + : locomotion_mode(mode), movement_direction(movement), facing_direction(facing), movement_speed(speed), height(height) {} + }; + +/** + * @brief Enumeration for different locomotion modes used by the planner + */ + enum class LocomotionMode { + IDLE = 0, + SLOW_WALK = 1, // 0.1m/s ~ 0.8m/s + WALK = 2, // 0.8m/s ~ 2.5m/s + RUN = 3, // 2.5m/s ~ 7.5m/s + IDEL_SQUAT = 4, + IDEL_KNEEL_TWO_LEGS = 5, + IDEL_KNEEL = 6, + IDEL_LYING_FACE_DOWN = 7, + CRAWLING = 8, + IDEL_BOXING = 9, + WALK_BOXING = 10, + LEFT_PUNCH = 11, + RIGHT_PUNCH = 12, + RANDOM_PUNCH = 13, + ELBOW_CRAWLING = 14, + LEFT_HOOK = 15, + RIGHT_HOOK = 16, + FORWARD_JUMP = 17, + STEALTH_WALK = 18, + INJURED_WALK = 19, + LEDGE_WALKING = 20, + OBJECT_CARRYING = 21, + STEALTH_WALK_2 = 22, + HAPPY_DANCE_WALK = 23, + ZOMBIE_WALK = 24, + GUN_WALK = 25, + SCARE_WALK = 26, +}; + +inline constexpr bool is_static_motion_mode(LocomotionMode mode) { + return mode == LocomotionMode::IDLE || + mode == LocomotionMode::IDEL_SQUAT || + mode == LocomotionMode::IDEL_KNEEL_TWO_LEGS || + mode == LocomotionMode::IDEL_KNEEL || + mode == LocomotionMode::IDEL_LYING_FACE_DOWN || + mode == LocomotionMode::IDEL_BOXING; +} + +inline constexpr bool is_standing_motion_mode(LocomotionMode mode) { + return mode == LocomotionMode::IDLE || + mode == LocomotionMode::SLOW_WALK || + mode == LocomotionMode::WALK || + mode == LocomotionMode::RUN || + mode == LocomotionMode::IDEL_BOXING || + mode == LocomotionMode::WALK_BOXING || + mode == LocomotionMode::LEFT_PUNCH || + mode == LocomotionMode::RIGHT_PUNCH || + mode == LocomotionMode::RANDOM_PUNCH || + mode == LocomotionMode::LEFT_HOOK || + mode == LocomotionMode::RIGHT_HOOK || + mode == LocomotionMode::FORWARD_JUMP || + mode == LocomotionMode::STEALTH_WALK || + mode == LocomotionMode::INJURED_WALK || + mode == LocomotionMode::LEDGE_WALKING || + mode == LocomotionMode::OBJECT_CARRYING || + mode == LocomotionMode::STEALTH_WALK_2 || + mode == LocomotionMode::HAPPY_DANCE_WALK || + mode == LocomotionMode::ZOMBIE_WALK || + mode == LocomotionMode::GUN_WALK || + mode == LocomotionMode::SCARE_WALK; +} + +inline constexpr bool is_squat_motion_mode(LocomotionMode mode) { + return mode == LocomotionMode::IDEL_SQUAT || + mode == LocomotionMode::IDEL_KNEEL_TWO_LEGS || + mode == LocomotionMode::IDEL_KNEEL || + mode == LocomotionMode::IDEL_LYING_FACE_DOWN || + mode == LocomotionMode::CRAWLING || + mode == LocomotionMode::ELBOW_CRAWLING; + +} + +inline std::vector get_standing_motion_modes() { + return {LocomotionMode::SLOW_WALK, + LocomotionMode::WALK, + LocomotionMode::RUN, + LocomotionMode::FORWARD_JUMP, + LocomotionMode::STEALTH_WALK, + LocomotionMode::INJURED_WALK, + }; +} + +inline std::vector get_styled_walking_motion_modes() { + return {LocomotionMode::LEDGE_WALKING, + LocomotionMode::OBJECT_CARRYING, + LocomotionMode::STEALTH_WALK_2, + LocomotionMode::HAPPY_DANCE_WALK, + LocomotionMode::ZOMBIE_WALK, + LocomotionMode::GUN_WALK, + LocomotionMode::SCARE_WALK, + }; +} + +inline std::vector get_squat_motion_modes() { + return {LocomotionMode::IDEL_SQUAT, + LocomotionMode::IDEL_KNEEL_TWO_LEGS, + LocomotionMode::IDEL_KNEEL, + // LocomotionMode::IDEL_LYING_FACE_DOWN, // TODO: uncomment this when we have a better lying face down motion + LocomotionMode::CRAWLING, + LocomotionMode::ELBOW_CRAWLING, + }; +} + +inline std::vector get_boxing_motion_modes() { + return {LocomotionMode::IDEL_BOXING, + LocomotionMode::WALK_BOXING, + LocomotionMode::LEFT_PUNCH, + LocomotionMode::RIGHT_PUNCH, + LocomotionMode::RANDOM_PUNCH, + LocomotionMode::LEFT_HOOK, + LocomotionMode::RIGHT_HOOK, + }; +} + +inline std::vector get_motion_set(int motion_set_index) { + switch(motion_set_index) { + case 0: + return get_standing_motion_modes(); + case 1: + return get_squat_motion_modes(); + case 2: + return get_boxing_motion_modes(); + case 3: + return get_styled_walking_motion_modes(); + default: + std::cout << "✗ Error: Invalid motion set index" << std::endl; + std::cout << "Using standing motion set" << std::endl; + return get_standing_motion_modes(); + } +} +/** + * @brief Configuration for planner initialization + */ +struct PlannerConfig { + std::string model_path = ""; + int version = 0; + int motion_look_ahead_steps = 2; // 50Hz: 0.02s * 2 = 0.04s + double default_height = 0.788740; // Default robot height + int initial_random_seed = 1234; // Initial random seed for planner +}; + +/** + * @brief Structure containing timing information for different planner phases + */ +struct PlannerTiming { + std::chrono::microseconds gather_input_duration{0}; + std::chrono::microseconds model_duration{0}; + std::chrono::microseconds extract_duration{0}; + std::chrono::microseconds total_duration{0}; +}; + +/** + * @brief Base class containing common functionality for motion planners + * + * This class provides shared data members, utility functions, and common logic + * that both ONNX and TensorRT planners can inherit from or use. + */ +class LocalMotionPlannerBase { +public: + /** + * @brief Constructor with common configuration + */ + LocalMotionPlannerBase(const PlannerConfig& config = PlannerConfig()) + : config_(config), + current_random_seed_(config.initial_random_seed) + { + planner_motion_50hz_.ReserveCapacity(1500, 29, 1, 1, 0, 0); + gen_frame_ = 0; + std::cout << "LocalMotionPlannerBase constructor" << std::endl; + std::cout << "config_.version: " << config_.version << std::endl; + std::cout << "config_.motion_look_ahead_steps: " << config_.motion_look_ahead_steps << std::endl; + std::cout << "config_.default_height: " << config_.default_height << std::endl; + std::cout << "config_.initial_random_seed: " << config_.initial_random_seed << std::endl; + std::cout << "Available modes number: " << GetValidModeValueRange() << std::endl; + } + + /** + * @brief Virtual destructor for proper cleanup + */ + virtual ~LocalMotionPlannerBase() = default; + + // Public state flags - can be accessed directly by derived classes + PlannerState planner_state_; + PlannerTiming last_timing_; + + // Thread safety for motion state buffer access (public for external access) + mutable std::mutex planner_motion_mutex_; + + // Generated motion sequence and the frame at which it was generated + MotionSequence planner_motion_50hz_; + int gen_frame_; + bool motion_available_ = false; + +protected: + // Common configuration + PlannerConfig config_; + +public: + + // Current input state + int current_random_seed_; + + + /** + * @brief Common validation for UpdatePlanning inputs + * @return true if inputs are valid for planning + */ + bool ValidatePlanningInputs() const { + return planner_state_.initialized && planner_state_.enabled; + } + + int GetValidModeValueRange() const { + if (config_.version == 2) + { + return 27; // IDLE, SLOW_WALK, WALK, RUN, IDEL_SQUAT, IDEL_KNEEL_TWO_LEGS, IDEL_KNEEL, IDEL_LYING, IDEL_CRAWLING, IDEL_BOXING, WALK_BOXING, LEFT_PUNCH, RIGHT_PUNCH, RANDOM_PUNCH, ELBOW_CRAWLING, LEFT_HOOK, RIGHT_HOOK, FORWARD_JUMP, STEALTH_WALK, INJURED_WALK, LEDGE_WALKING, OBJECT_CARRYING, STEALTH_WALK_2, HAPPY_DANCE_WALK, ZOMBIE_WALK, GUN_WALK, SCARE_WALK + } + else if (config_.version == 1) + { + return 20; // IDLE, SLOW_WALK, WALK, RUN, IDEL_SQUAT, IDEL_KNEEL_TWO_LEGS, IDEL_KNEEL, IDEL_LYING, IDEL_CRAWLING, IDEL_BOXING, WALK_BOXING, LEFT_PUNCH, RIGHT_PUNCH, RANDOM_PUNCH, ELBOW_CRAWLING, LEFT_HOOK, RIGHT_HOOK, FORWARD_JUMP, STEALTH_WALK, INJURED_WALK + } + else if (config_.version == 0) + { + return 4; // IDLE, SLOW_WALK, WALK, RUN + } + else + { + std::cout << "✗ Error: Unsupported model version" << std::endl; + throw std::runtime_error("Unsupported model version: " + std::to_string(config_.version)); + } + } + +public: + + /** + * @brief Initialize planner with robot state and populate initial trajectory + * + * COORDINATE FRAME NORMALIZATION STRATEGY: + * To ensure consistent neural network behavior regardless of robot's initial orientation, + * all data is normalized to a coordinate frame where the first context frame faces zero yaw: + * + * 1. Extract yaw from robot's current orientation + * 2. Compute rotation to make first frame face zero yaw + * 3. Apply same rotation to: input tensors, context frames, and trajectory data + * 4. Neural network processes normalized data + * 5. Results are rotated back to world coordinates using inverse rotation + * + * This maintains mathematical consistency while improving model generalization. + * + * @param base_quat Robot base quaternion [w,x,y,z] + * @param joint_positions Current joint positions + * @param planner_motion_state Motion state buffer to populate with initial trajectory + * @return true if initialization successful, false otherwise + */ + bool Initialize( + const std::array& base_quat, + const std::array& joint_positions) { + + // Reset initialization flag only; preserve enabled state set by external controller + planner_state_.initialized = false; + + if(!InitializeSpecific()) { + return false; + } + + // ==== BEGIN FRESH INITIALIZATION ==== + // Initialize input vectors with defaults aligned to robot's current orientation + // Extract yaw from robot's base quaternion to set proper facing direction + UpdateInputTensors(static_cast(LocomotionMode::IDLE), + -1.0, + -1.0, + {0.0f, 0.0f, 0.0f}, // No movement + {1.0f, 0.0f, 0.0f}, // Face in robot's current yaw direction + current_random_seed_ + ); + + // Initialize context directly + gen_frame_ = 0; + InitializeContext(base_quat, joint_positions); + + // Run initial inference with default parameters to populate motion data + try { + // Start timing model inference + auto model_start_time = std::chrono::high_resolution_clock::now(); + + RunInference(); + + auto model_end_time = std::chrono::high_resolution_clock::now(); + + // Start timing data extraction + auto extract_start_time = std::chrono::high_resolution_clock::now(); + + ResampleGeneratedSequence50Hz(); + + auto extract_end_time = std::chrono::high_resolution_clock::now(); + + // Log initialization timing + auto model_duration = std::chrono::duration_cast(model_end_time - model_start_time); + auto extract_duration = std::chrono::duration_cast(extract_end_time - extract_start_time); + + std::cout << "Planner Init timing - Model: " << model_duration.count() << "us" + << ", Extract: " << extract_duration.count() << "us" << std::endl; + + // Mark as fully initialized only after all setup is complete + planner_state_.initialized = true; + + std::cout << "Planner initialized" << std::endl; + + } catch (const std::exception& e) { + std::cout << "✗ Error during planner initialization: " << e.what() << std::endl; + planner_state_.initialized = false; + return false; + } + + return true; + } + + bool ResampleGeneratedSequence50Hz() + { + int32_t timesteps_30hz = GetNumPredFrames(); + auto mujoco_qpos_data = GetMujocoQposBuffer(); + + if(timesteps_30hz > 64) + { + std::cout << "✗ Error: Too many timesteps generated by planner" << std::endl; + + /* + for(int i = 0; i < (G1_NUM_MOTOR + 7) * timesteps_30hz; i++) + { + std::cout << mujoco_qpos_data[i] << " " << std::isnan(mujoco_qpos_data[i]) << ","; + } + std::cout << std::endl; + + cnpy::npy_save("mode.npy", std::vector{GetModeValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("target_vel.npy", std::vector{GetTargetVelValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("movement_direction.npy", GetMovementDirectionValues(), std::vector{3}, "w"); + cnpy::npy_save("facing_direction.npy", GetFacingDirectionValues(), std::vector{3}, "w"); + cnpy::npy_save("random_seed.npy", std::vector{GetRandomSeedValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("context_qpos.npy", GetContextBuffer(), std::vector{4, (G1_NUM_MOTOR + 7)}, "w"); + */ + + return false; + } + + if( + std::any_of( + mujoco_qpos_data, mujoco_qpos_data + (G1_NUM_MOTOR + 7) * timesteps_30hz, + [](float x) { return std::isnan(x); } + ) + ) + { + std::cout << "✗ Error: Mujoco qpos data contains nans" << std::endl; + + /* + for(int i = 0; i < (G1_NUM_MOTOR + 7) * timesteps_30hz; i++) + { + std::cout << mujoco_qpos_data[i] << " " << std::isnan(mujoco_qpos_data[i]) << ","; + } + std::cout << std::endl; + + cnpy::npy_save("mode.npy", std::vector{GetModeValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("target_vel.npy", std::vector{GetTargetVelValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("movement_direction.npy", GetMovementDirectionValues(), std::vector{3}, "w"); + cnpy::npy_save("facing_direction.npy", GetFacingDirectionValues(), std::vector{3}, "w"); + cnpy::npy_save("random_seed.npy", std::vector{GetRandomSeedValue()}.data(), std::vector{1}, "w"); + cnpy::npy_save("context_qpos.npy", GetContextBuffer(), std::vector{4, (G1_NUM_MOTOR + 7)}, "w"); + */ + + return false; + } + + // How long is the generated sequence in seconds? + double motion_seconds = double(timesteps_30hz) / 30.0; + + // How many 50Hz timesteps are there? + std::lock_guard lock(planner_motion_mutex_); + planner_motion_50hz_.timesteps = static_cast(std::floor(motion_seconds * 50)); + + for(int32_t f_50hz = 0; f_50hz < planner_motion_50hz_.timesteps; ++f_50hz) + { + // what time are we sampling at? + double t = double(f_50hz) / 50.0; + + // what (non integer) 30fps frame is this? + double f_30hz = t * 30; + + int32_t f0 = static_cast(std::floor(f_30hz)); + int32_t f1 = std::min(f0 + 1, timesteps_30hz - 1); + + double w0 = 1.0 - (f_30hz - f0); + double w1 = 1.0 - w0; + + // resample global body position: + planner_motion_50hz_.BodyPositions(f_50hz)[0] = std::array { + w0 * mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 0] + w1 * mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 0], + w0 * mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 1] + w1 * mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 1], + w0 * mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 2] + w1 * mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 2] + }; + + // resample global body quaternion: + std::array q0 = { + mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 3], + mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 4], + mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 5], + mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 6] + }; + std::array q1 = { + mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 3], + mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 4], + mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 5], + mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 6] + }; + planner_motion_50hz_.BodyQuaternions(f_50hz)[0] = quat_slerp_d(q0, q1, f_30hz - f0); + + // resample joint angles: + for(int joint = 0; joint < 29; ++joint) { + planner_motion_50hz_.JointPositions(f_50hz)[joint] = + w0 * mujoco_qpos_data[f0 * (G1_NUM_MOTOR + 7) + 7 + mujoco_to_isaaclab[joint]] + + w1 * mujoco_qpos_data[f1 * (G1_NUM_MOTOR + 7) + 7 + mujoco_to_isaaclab[joint]]; + } + } + + // Update joint velocities using optimized frame access (no redundant resize) + for(int32_t frame = 0; frame < planner_motion_50hz_.timesteps-1; ++frame) + { + for(int joint = 0; joint < 29; ++joint) + { + planner_motion_50hz_.JointVelocities(frame)[joint] = ( + planner_motion_50hz_.JointPositions(frame+1)[joint] - + planner_motion_50hz_.JointPositions(frame)[joint] + ) * 50.0; + } + } + + // Handle last frame velocity + for(int joint = 0; joint < 29; ++joint) + { + planner_motion_50hz_.JointVelocities(planner_motion_50hz_.timesteps-1)[joint] = planner_motion_50hz_.JointVelocities(planner_motion_50hz_.timesteps-2)[joint]; + } + motion_available_ = true; + return true; + } + + + + /** + * @brief Update planner with new planning request and update motion state directly + * @param existing_motion_50hz Existing motion sequence + * @param gen_frame Frame at which the new motion sequence was generated + * @param mode_value Locomotion mode (0=IDLE, 1=SLOW_WALK, 2=WALK, 3=RUN) + * @param movement_direction Movement direction vector [x, y, z] + * @param facing_direction Facing direction vector [x, y, z] + * @param random_seed Optional random seed (if -1, use default) + * @return true if replanning successful and buffer updated, false otherwise + */ + bool UpdatePlanning( + int gen_frame, + const std::shared_ptr& motion_sequence, + int mode_value, + float target_vel, + float target_height, + const std::array& movement_direction, + const std::array& facing_direction, + int random_seed = -1) + { + + auto total_start_time = std::chrono::steady_clock::now(); + + if (!ValidatePlanningInputs()) { + return false; + } + + // ===== GATHER INPUT PHASE ===== + auto gather_input_start_time = std::chrono::steady_clock::now(); + + // Update input tensors with new values + UpdateInputTensors(mode_value, target_vel, target_height, movement_direction, facing_direction, random_seed); + + // Update context and get frame information + gen_frame_ = gen_frame + config_.motion_look_ahead_steps; + UpdateContextFromMotion(motion_sequence); + + auto gather_input_end_time = std::chrono::steady_clock::now(); + + // ===== MODEL INFERENCE PHASE ===== + auto model_start_time = std::chrono::steady_clock::now(); + + // Run inference + RunInference(); + + auto model_end_time = std::chrono::steady_clock::now(); + + // ===== EXTRACT PHASE ===== + auto extract_start_time = std::chrono::steady_clock::now(); + + if(!ResampleGeneratedSequence50Hz()) + { + return false; + } + + auto extract_end_time = std::chrono::steady_clock::now(); + + // ===== RECORD TIMING ===== + auto total_end_time = std::chrono::steady_clock::now(); + + last_timing_.gather_input_duration = std::chrono::duration_cast(gather_input_end_time - gather_input_start_time); + last_timing_.model_duration = std::chrono::duration_cast(model_end_time - model_start_time); + last_timing_.extract_duration = std::chrono::duration_cast(extract_end_time - extract_start_time); + last_timing_.total_duration = std::chrono::duration_cast(total_end_time - total_start_time); + + return true; + } + + void InitializeContext( + const std::array& base_quat, + const std::array& joint_positions + ) + { + auto context_qpos_values = GetContextBuffer(); + + // ROTATION STRATEGY: Normalize coordinate frame so first context frame faces zero yaw + // This ensures consistent neural network input regardless of robot's initial orientation + + // Create zero facing direction quaternion + std::array quat = {1.0, 0.0, 0.0, 0.0}; + + for(int n = 0; n < 4; ++n) { + int index_base = n * (G1_NUM_MOTOR + 7); + + // Set global position (default standing position) + context_qpos_values[index_base + 0] = 0.0f; // x = 0 + context_qpos_values[index_base + 1] = 0.0f; // y = 0 + context_qpos_values[index_base + 2] = static_cast(config_.default_height); // z = standing height + + // Set quaternion - apply same rotation as input tensors for consistency + // This ensures all 4 context frames are rotated to the same zero-yaw coordinate frame + context_qpos_values[index_base + 3] = static_cast(quat[0]); // w + context_qpos_values[index_base + 4] = static_cast(quat[1]); // x + context_qpos_values[index_base + 5] = static_cast(quat[2]); // y + context_qpos_values[index_base + 6] = static_cast(quat[3]); // z + + // Set joint positions + for (int i = 0; i < G1_NUM_MOTOR; i++) { + context_qpos_values[index_base + 7 + i] = static_cast(joint_positions[i]); + } + } + } + + + // Base class virtual method implementations + void UpdateContextFromMotion(const std::shared_ptr& motion_sequence) { + + std::lock_guard lock(planner_motion_mutex_); + + // Guard against race condition - motion not yet populated by control thread + if (!motion_sequence || motion_sequence->timesteps == 0) { + throw std::runtime_error("UpdateContextFromMotion: motion not ready, cannot update context"); + } + + // what time are we sampling at? + double gen_time = double(gen_frame_) / 50.0; + + // now we need to sample 4 frames at 30hz, starting at gen_time: + auto context_qpos_values = GetContextBuffer(); + for(int n=0; n<4; ++n) + { + // what time shall we sample the current motion sequence at? + double t = gen_time + double(n) / 30.0; + + double f_50hz = t * 50.0; + int f0 = static_cast(std::floor(f_50hz)); + f0 = std::min(f0, motion_sequence->timesteps - 1); + int f1 = std::min(f0 + 1, motion_sequence->timesteps - 1); + + double w0 = 1.0 - (f_50hz - f0); + double w1 = 1.0 - w0; + + // resample global quaternion: + std::array q0 = {motion_sequence->BodyQuaternions(f0)[0][0], motion_sequence->BodyQuaternions(f0)[0][1], motion_sequence->BodyQuaternions(f0)[0][2], motion_sequence->BodyQuaternions(f0)[0][3]}; + std::array q1 = {motion_sequence->BodyQuaternions(f1)[0][0], motion_sequence->BodyQuaternions(f1)[0][1], motion_sequence->BodyQuaternions(f1)[0][2], motion_sequence->BodyQuaternions(f1)[0][3]}; + std::array quat = quat_slerp_d(q0, q1, f_50hz - f0); + + std::copy(quat.begin(), quat.end(), &context_qpos_values[n * (G1_NUM_MOTOR + 7) + 3]); + + // resample global position: + std::array p = { + w0 * motion_sequence->BodyPositions(f0)[0][0] + w1 * motion_sequence->BodyPositions(f1)[0][0], + w0 * motion_sequence->BodyPositions(f0)[0][1] + w1 * motion_sequence->BodyPositions(f1)[0][1], + w0 * motion_sequence->BodyPositions(f0)[0][2] + w1 * motion_sequence->BodyPositions(f1)[0][2] + }; + + context_qpos_values[n * (G1_NUM_MOTOR + 7) + 0] = p[0]; + context_qpos_values[n * (G1_NUM_MOTOR + 7) + 1] = p[1]; + context_qpos_values[n * (G1_NUM_MOTOR + 7) + 2] = p[2]; + + // resample joint positions + for(int i = 0; i < G1_NUM_MOTOR; i++) { + context_qpos_values[n * (G1_NUM_MOTOR + 7) + 7 + mujoco_to_isaaclab[i]] = w0 * motion_sequence->JointPositions(f0)[i] + w1 * motion_sequence->JointPositions(f1)[i]; + } + } + } + + /** + * @brief Common method signatures that derived classes should implement + */ + + virtual bool InitializeSpecific() = 0; + + virtual void RunInference() = 0; + + virtual void UpdateInputTensors(int mode_value, + float target_vel, + float target_height, + const std::array& movement_direction, + const std::array& facing_direction, + int random_seed) = 0; + + + virtual float *GetContextBuffer() = 0; + virtual int32_t GetNumPredFrames() = 0; + virtual const float *GetMujocoQposBuffer() = 0; + virtual float *GetMovementDirectionValues() = 0; + virtual float *GetFacingDirectionValues() = 0; + virtual float GetTargetVelValue() = 0; + virtual float GetHeightValue() = 0; + virtual int32_t GetRandomSeedValue() = 0; + virtual int32_t GetModeValue() = 0; + + +}; + +#endif // LOCALMOTION_KPLANNER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_onnx.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_onnx.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4164529f2e95b82447014be17ec3595399cc3880 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_onnx.hpp @@ -0,0 +1,348 @@ +/** + * @file localmotion_kplanner_onnx.hpp + * @deprecated This file is NOT used in the current build. The active planner + * backend is LocalMotionPlannerTensorRT (localmotion_kplanner_tensorrt.hpp). + * This file is kept for reference only. + * + * @brief ONNX Runtime backend for the locomotion planner. + * + * LocalMotionPlannerONNX is a concrete implementation of LocalMotionPlannerBase + * that runs planner inference on the CPU via ONNX Runtime. It is the simpler + * of the two backends (the other being TensorRT) and is useful for development + * / debugging or when a GPU is not available. + * + * ## Model Versions + * + * Version | Inputs | Notes + * --------|--------|------ + * 0 | 6 | Basic: context, mode, target_vel, movement/facing direction, random_seed. + * 1 | 11 | Adds: height, has_specific_target, specific_target_positions/headings, allowed_pred_num_tokens. + * + * ## Data Flow + * + * 1. Constructor loads the ONNX model and validates input tensor names. + * 2. `InitializeSpecific()` allocates input buffers and creates ONNX tensors + * that alias the buffer memory (zero-copy). + * 3. `UpdateInputTensors()` writes new locomotion commands into the buffers. + * 4. `RunInference()` executes `session.Run()` synchronously on the CPU. + * 5. Output pointers (`mujoco_qpos_data_`, `num_pred_frames_data_`) are + * captured from the output tensors for the base class to resample at 50 Hz. + */ + +#ifndef LOCALMOTION_KPLANNER_ONNX_HPP +#define LOCALMOTION_KPLANNER_ONNX_HPP + +#include +#include + +#include "localmotion_kplanner.hpp" +#include "ort_session.hpp" + +/** + * @class LocalMotionPlannerONNX + * @brief ONNX Runtime backend for the locomotion planner. + * + * Runs inference synchronously on the CPU. Input tensors alias the member + * buffers so `UpdateInputTensors()` is effectively zero-copy. + */ +class LocalMotionPlannerONNX : public LocalMotionPlannerBase { +public: + /** + * @brief Constructor for LocalMotionPlannerONNX + * @param env ONNX runtime environment + * @param allocator ONNX allocator for memory management + * @param config Planner configuration parameters + */ + LocalMotionPlannerONNX(Ort::Env& env, + Ort::AllocatorWithDefaultOptions& allocator, + const PlannerConfig& config = PlannerConfig()) + : LocalMotionPlannerBase(config), env_(env), allocator_(allocator) { + + if (!config_.model_path.empty()) { + planner_session_ = std::make_shared(config_.model_path, env_, allocator_); + } + + if (planner_session_) { + const auto &input_names = planner_session_->get_input_node_names_str(); + if (config_.version == 1) { + if (input_names.size() != 11) { + std::cout << "Model version: 1" << std::endl; + std::cout << "Model has " << input_names.size() << " inputs, expected 11" << std::endl; + std::cout << "✗ Failed to initialize ONNX engine" << std::endl; + throw std::runtime_error("Failed to initialize ONNX engine"); + } + } else if (config_.version == 0) { + if (input_names.size() != 6) { + std::cout << "Model version: 0" << std::endl; + std::cout << "Model has " << input_names.size() << " inputs, expected 6" << std::endl; + std::cout << "✗ Failed to initialize ONNX engine" << std::endl; + throw std::runtime_error("Failed to initialize ONNX engine"); + } + } else { + std::cout << "Model version: " << config_.version << std::endl; + std::cout << "unsupported model version" << std::endl; + std::cout << "✗ Failed to initialize ONNX engine" << std::endl; + throw std::runtime_error("Failed to initialize ONNX engine"); + } + + // Require presence of expected input names + std::vector requiredNames = { + std::string("context_mujoco_qpos"), + std::string("target_vel"), + std::string("mode"), + std::string("movement_direction"), + std::string("facing_direction"), + std::string("random_seed") + }; + if (config_.version == 1) { + requiredNames.push_back("height"); + requiredNames.push_back("has_specific_target"); + requiredNames.push_back("specific_target_positions"); + requiredNames.push_back("specific_target_headings"); + requiredNames.push_back("allowed_pred_num_tokens"); + } + for (const auto &req : requiredNames) { + if (std::find(input_names.begin(), input_names.end(), req) == input_names.end()) { + std::cout << "✗ Missing required input tensor: " << req << std::endl; + throw std::runtime_error("Missing required ONNX input tensor: " + req); + } + } + } + } + + /** + * @brief Destructor + */ + ~LocalMotionPlannerONNX() = default; + + bool InitializeSpecific() override { + if (!planner_session_) { + return false; + } + + // ==== CLEANUP EXISTING STATE BEFORE INITIALIZATION ==== + std::cout << "Cleaning up existing ONNX planner state..." << std::endl; + + // Clear all input value vectors + mode_values_.clear(); + target_vel_values_.clear(); + movement_direction_values_.clear(); + facing_direction_values_.clear(); + random_seed_values_.clear(); + context_qpos_values_.clear(); + + mode_values_.resize(1); + target_vel_values_.resize(1); + movement_direction_values_.resize(3, 0.0f); + facing_direction_values_.resize(3, 0.0f); + random_seed_values_.resize(1); + context_qpos_values_.resize(4 * (G1_NUM_MOTOR + 7)); + + { + // version 1 extra inputs + target_height_values_.clear(); + has_specific_target_.clear(); + specific_target_positions_.clear(); + specific_target_headings_.clear(); + allowed_pred_num_tokens_.clear(); + + target_height_values_.resize(1, -1.0f); + has_specific_target_.resize(1, 0); + specific_target_positions_.resize(12, 0.0f); + specific_target_headings_.resize(4, 0.0f); + allowed_pred_num_tokens_.resize(11, 0); + + // default allowed tokens: [1,1,1,1,1,1,0,0,0,0,0] + if (allowed_pred_num_tokens_.size() >= 6) { + allowed_pred_num_tokens_[0] = 1; + allowed_pred_num_tokens_[1] = 1; + allowed_pred_num_tokens_[2] = 1; + allowed_pred_num_tokens_[3] = 1; + allowed_pred_num_tokens_[4] = 1; + allowed_pred_num_tokens_[5] = 1; + } + } + + const auto &input_names = planner_session_->get_input_node_names_str(); + const auto &input_dims = planner_session_->get_input_node_dims(); + for (size_t i = 0; i < input_names.size(); ++i) { + const std::string &name = input_names[i]; + if (name == "context_mujoco_qpos") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), context_qpos_values_.data(), context_qpos_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "target_vel") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), target_vel_values_.data(), target_vel_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "mode") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), mode_values_.data(), mode_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "movement_direction") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), movement_direction_values_.data(), movement_direction_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "facing_direction") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), facing_direction_values_.data(), facing_direction_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "random_seed") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), random_seed_values_.data(), random_seed_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "height") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), target_height_values_.data(), target_height_values_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "has_specific_target") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), has_specific_target_.data(), has_specific_target_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "specific_target_positions") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), specific_target_positions_.data(), specific_target_positions_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "specific_target_headings") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), specific_target_headings_.data(), specific_target_headings_.size(), input_dims[i].data(), input_dims[i].size())); + } else if (name == "allowed_pred_num_tokens") { + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), allowed_pred_num_tokens_.data(), allowed_pred_num_tokens_.size(), input_dims[i].data(), input_dims[i].size())); + } else { + // Unknown input; create a zero tensor of expected type/shape to satisfy model binding + // Default to float tensor + std::vector zero; + size_t count = 1; + for (auto d : input_dims[i]) { if (d > 0) count *= static_cast(d); } + zero.resize(count, 0.0f); + planner_input_tensors_.push_back(Ort::Value::CreateTensor(allocator_.GetInfo(), zero.data(), zero.size(), input_dims[i].data(), input_dims[i].size())); + } + } + + planner_output_tensors_.clear(); + + // Reset data pointers + mujoco_qpos_data_ = nullptr; + num_pred_frames_data_ = nullptr; + + return true; + } + + void RunInference() override { + // Run ONNX inference with default IDLE parameters + planner_output_tensors_ = planner_session_->Run(planner_input_tensors_); + + // Store pointers to tensor data for consistent ExtractPlannerData interface + mujoco_qpos_data_ = planner_output_tensors_[0].GetTensorData(); + num_pred_frames_data_ = planner_output_tensors_[1].GetTensorData(); + } + + +private: + // ------------------------------------------------------------------ + // ONNX Runtime components + // ------------------------------------------------------------------ + std::shared_ptr planner_session_; ///< Loaded ONNX model session. + Ort::Env& env_; ///< Shared ONNX Runtime environment. + Ort::AllocatorWithDefaultOptions& allocator_; ///< Shared memory allocator. + + // ------------------------------------------------------------------ + // Input data buffers (aliased by the Ort::Value tensors — zero-copy) + // ------------------------------------------------------------------ + std::vector context_qpos_values_; ///< [4 × 36] Context: 4 frames × (7 root + 29 joints). + std::vector mode_values_; ///< [1] Locomotion mode (LocomotionMode cast). + std::vector target_vel_values_; ///< [1] Target speed (−1 = default). + std::vector movement_direction_values_; ///< [3] Movement direction unit vector. + std::vector facing_direction_values_; ///< [3] Facing direction unit vector. + std::vector random_seed_values_; ///< [1] Random seed for stochastic generation. + + // Version 1+ additional inputs + std::vector target_height_values_; ///< [1] Target body height (−1 = default). + std::vector has_specific_target_; ///< [1] Whether a specific waypoint target is set. + std::vector specific_target_positions_; ///< [12] 4 waypoint positions × xyz. + std::vector specific_target_headings_; ///< [4] 4 waypoint heading angles. + std::vector allowed_pred_num_tokens_; ///< [11] Allowed prediction token mask. + std::vector planner_input_tensors_; ///< ONNX input tensor handles (alias above buffers). + + // ------------------------------------------------------------------ + // Output tensors + // ------------------------------------------------------------------ + std::vector planner_output_tensors_; ///< Returned by session.Run(). + const float* mujoco_qpos_data_; ///< Pointer into output[0]: predicted qpos [frames × 36]. + const int32_t* num_pred_frames_data_; ///< Pointer into output[1]: number of predicted frames. + + /// Write new locomotion commands into the input buffers (called by base UpdatePlanning). + void UpdateInputTensors(int mode_value, + float target_vel, + float target_height, + const std::array& movement_direction, + const std::array& facing_direction, + int random_seed) override{ + // Update mode + mode_values_[0] = mode_value; + + // Update target velocity + target_vel_values_[0] = target_vel; + if (config_.version == 1) { + target_height_values_[0] = target_height; + } + + // Update movement direction + movement_direction_values_[0] = movement_direction[0]; + movement_direction_values_[1] = movement_direction[1]; + movement_direction_values_[2] = movement_direction[2]; + + // Update facing direction + facing_direction_values_[0] = facing_direction[0]; + facing_direction_values_[1] = facing_direction[1]; + facing_direction_values_[2] = facing_direction[2]; + + // Update random seed if provided + if (random_seed != -1) { + current_random_seed_ = random_seed; + random_seed_values_[0] = random_seed; + } + + // Log replanning values + std::cout << "Replanning with mode: "; + switch(mode_values_[0]) + { + case 0: + std::cout << "IDLE"; + break; + case 1: + std::cout << "SLOW_WALK"; + break; + case 2: + std::cout << "WALK"; + break; + case 3: + std::cout << "RUN"; + break; + case 4: + std::cout << "BOXING"; + break; + default: + std::cout << "UNKNOWN"; + break; + } + if (config_.version == 1) { + std::cout << ", target_height: " << target_height_values_[0]; + } + std::cout << ", target_vel: " << target_vel_values_[0] + << ", movement: [" << movement_direction_values_[0] << ", " << movement_direction_values_[1] << ", " << movement_direction_values_[2] << "]" + << ", facing: [" << facing_direction_values_[0] << ", " << facing_direction_values_[1] << ", " << facing_direction_values_[2] << "]" << std::endl; + } + + virtual float *GetContextBuffer() override { + return context_qpos_values_.data(); + } + virtual int32_t GetNumPredFrames() override { + return num_pred_frames_data_[0]; + } + virtual const float *GetMujocoQposBuffer() override { + return mujoco_qpos_data_; + } + virtual float *GetMovementDirectionValues() override { + return movement_direction_values_.data(); + } + virtual float *GetFacingDirectionValues() override { + return facing_direction_values_.data(); + } + virtual float GetTargetVelValue() override { + return target_vel_values_[0]; + } + virtual float GetHeightValue() override { + return target_height_values_[0]; + } + virtual int32_t GetRandomSeedValue() override { + return random_seed_values_[0]; + } + virtual int32_t GetModeValue() override { + return mode_values_[0]; + } + +}; + +#endif // LOCALMOTION_KPLANNER_ONNX_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_tensorrt.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_tensorrt.hpp new file mode 100644 index 0000000000000000000000000000000000000000..48b7986d9c80c3db74224bdfbe3404b4bf8c941e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/localmotion_kplanner_tensorrt.hpp @@ -0,0 +1,703 @@ +/** + * @file localmotion_kplanner_tensorrt.hpp + * @brief TensorRT (GPU) backend for the locomotion planner. + * + * LocalMotionPlannerTensorRT is a concrete implementation of + * LocalMotionPlannerBase that runs planner inference on the GPU via NVIDIA + * TensorRT. It is the production backend, offering significantly lower + * latency than the ONNX Runtime backend. + * + * ## GPU Pipeline + * + * 1. Constructor converts the ONNX model to a TensorRT engine (cached on + * disk), creates a CUDA stream, and captures a CUDA graph for the + * inference pass. + * 2. `UpdateInputTensors()` writes new locomotion commands into pinned- + * memory (`TPinnedVector`) buffers on the host. + * 3. `RunInference()` asynchronously copies inputs to the GPU, launches + * the captured CUDA graph, copies outputs back, and synchronises. + * 4. Output buffers (`mujoco_qpos_values_`, `num_pred_frames_values_`) + * are read by the base class to resample the trajectory at 50 Hz. + * + * ## Model Versions + * + * Version | Inputs | Notes + * --------|--------|------ + * 0 | 6 | Basic: context, mode, target_vel, movement/facing direction, random_seed. + * 1–2 | 11 | Adds: height, has_specific_target, specific_target_positions/headings, allowed_pred_num_tokens. + * + * ## CUDA Graph + * + * A CUDA graph is captured during `InitializeEngine()` and replayed on every + * `RunInference()` call. This eliminates kernel launch overhead and ensures + * deterministic timing (~1–2 ms per planning cycle on Jetson Orin). + */ + +#ifndef LOCALMOTION_KPLANNER_TENSORRT_HPP +#define LOCALMOTION_KPLANNER_TENSORRT_HPP + +#include +#include +#include "localmotion_kplanner.hpp" +#include + +/** + * @class LocalMotionPlannerTensorRT + * @brief TensorRT (GPU) backend for the locomotion planner. + * + * Uses CUDA graphs and pinned memory for low-latency, deterministic inference. + */ +class LocalMotionPlannerTensorRT : public LocalMotionPlannerBase { +public: + /** + * @brief Constructor for LocalMotionPlannerTensorRT + * @param use_fp16 Whether to use FP16 precision + * @param device_id CUDA device ID to use for inference + * @param config Planner configuration parameters + */ + LocalMotionPlannerTensorRT(bool use_fp16, + int device_id = 0, + const PlannerConfig& config = PlannerConfig()) + : LocalMotionPlannerBase(config), use_fp16_(use_fp16), + device_id_(device_id), cuda_stream_(nullptr), graph_(nullptr), graphExec_(nullptr) { + + // Initialize TensorRT engine + inference_engine_ = std::make_unique(); + + // Clear all input value vectors and ensure correct sizes: + mode_values_.clear(); + target_vel_values_.clear(); + movement_direction_values_.clear(); + facing_direction_values_.clear(); + random_seed_values_.clear(); + context_qpos_values_.clear(); + + mode_values_.resize(1); + target_vel_values_.resize(1); + movement_direction_values_.resize(3, 0.0f); + facing_direction_values_.resize(3, 0.0f); + random_seed_values_.resize(1); + context_qpos_values_.resize(4 * (G1_NUM_MOTOR + 7)); + + { + // version 1 + target_height_values_.clear(); + has_specific_target_.clear(); + specific_target_positions_.clear(); + specific_target_headings_.clear(); + allowed_pred_num_tokens_.clear(); + + target_height_values_.resize(1,-1.0f); + has_specific_target_.resize(1,0); + specific_target_positions_.resize(12,0.0f); + specific_target_headings_.resize(4,0.0f); + allowed_pred_num_tokens_.resize(11,0); + + // set allowed_pred_num_tokens_ to [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0] + allowed_pred_num_tokens_[0] = 0; // 6 tokens + allowed_pred_num_tokens_[1] = 0; // 7 + allowed_pred_num_tokens_[2] = 0; // 8 + allowed_pred_num_tokens_[3] = 1; // 9 + allowed_pred_num_tokens_[4] = 1; // 10 + allowed_pred_num_tokens_[5] = 1; + } + + + // Clear output buffers + mujoco_qpos_values_.clear(); + num_pred_frames_values_.clear(); + + // Initialize output vectors with defaults + mujoco_qpos_values_.resize(64 * 36); + num_pred_frames_values_.resize(1); + + bool success = InitializeEngine(); + if (!success) { + std::cout << "✗ Failed to initialize TensorRT engine" << std::endl; + throw std::runtime_error("Failed to initialize TensorRT engine"); + } + + // CUDA stream will be created in the .cpp implementation + // to avoid including full CUDA headers in the header file + } + + /** + * @brief Destructor + */ + ~LocalMotionPlannerTensorRT() { + if (graphExec_) { + cudaGraphExecDestroy(graphExec_); + } + if (graph_) { + cudaGraphDestroy(graph_); + } + if (cuda_stream_) { + cudaStreamDestroy(cuda_stream_); + } + } + + bool InitializeSpecific() override { + if (!inference_engine_) { + return false; + } + + + return true; + } + + + // TensorRT always uses CUDA streams for async inference (like existing code) + + /** + * @brief Get current CUDA stream (for async operations) + * @return Current CUDA stream + */ + cudaStream_t GetCudaStream() const { return cuda_stream_; } + +private: + // ------------------------------------------------------------------ + // TensorRT engine components + // ------------------------------------------------------------------ + std::unique_ptr inference_engine_; ///< TensorRT inference engine. + bool use_fp16_; ///< FP16 precision flag. + int device_id_; ///< CUDA device ID. + cudaStream_t cuda_stream_; ///< CUDA stream for async operations. + cudaGraph_t graph_; ///< Captured CUDA graph (inference pass). + cudaGraphExec_t graphExec_; ///< Instantiated CUDA graph for replay. + + // ------------------------------------------------------------------ + // Input data buffers (pinned memory for efficient CPU ↔ GPU transfers) + // ------------------------------------------------------------------ + TPinnedVector context_qpos_values_; ///< [4 × 36] Context frames (7 root + 29 joints each). + TPinnedVector mode_values_; ///< [1] Locomotion mode. + TPinnedVector target_vel_values_; ///< [1] Target speed (−1 = default). + TPinnedVector movement_direction_values_; ///< [3] Movement direction unit vector. + TPinnedVector facing_direction_values_; ///< [3] Facing direction unit vector. + TPinnedVector random_seed_values_; ///< [1] Random seed. + + // Version 1–2 additional inputs + TPinnedVector target_height_values_; ///< [1] Target body height (−1 = default). + TPinnedVector has_specific_target_; ///< [1] Whether specific waypoint target is set. + TPinnedVector specific_target_positions_; ///< [12] 4 waypoint positions × xyz. + TPinnedVector specific_target_headings_; ///< [4] 4 waypoint heading angles. + TPinnedVector allowed_pred_num_tokens_; ///< [11] Allowed prediction token mask. + + // ------------------------------------------------------------------ + // Output data buffers (pinned memory) + // ------------------------------------------------------------------ + TPinnedVector mujoco_qpos_values_; ///< [frames × 36] Predicted qpos (7 root + 29 joints). + TPinnedVector num_pred_frames_values_; ///< [1] Number of predicted 30 Hz frames. + + /// Named tensor identifiers used for TensorRT SetInput/GetOutput calls. + struct TensorNames { + std::string context_qpos = "context_mujoco_qpos"; + std::string mode = "mode"; + std::string target_vel = "target_vel"; + std::string target_height = "height"; // version 1 + std::string has_specific_target = "has_specific_target"; // version 1 + std::string specific_target_positions = "specific_target_positions"; // version 1 + std::string specific_target_headings = "specific_target_headings"; // version 1 + std::string allowed_pred_num_tokens = "allowed_pred_num_tokens"; // version 1 + + std::string movement_direction = "movement_direction"; + std::string facing_direction = "facing_direction"; + std::string random_seed = "random_seed"; + + std::string mujoco_qpos_output = "mujoco_qpos"; + std::string num_pred_frames_output = "num_pred_frames"; + } tensor_names_; + + /** + * @brief Convert the ONNX model to TensorRT, initialise the engine, and capture a CUDA graph. + * @return True on success; false if conversion, initialisation, or validation fails. + */ + bool InitializeEngine() { + std::cout << "Initialize Engine..." << std::endl; + + // Create CUDA stream for async operations + cudaError_t status = cudaStreamCreate(&cuda_stream_); + if (status != cudaSuccess) { + std::cout << "✗ CUDA error: " << cudaGetErrorString(status) << std::endl; + return false; + } + + // Setup options for ONNX to TensorRT conversion + Options options; + options.deviceID = device_id_; + std::string prefix("planner_"); + if(use_fp16_) + { + options.precision = Precision::FP16; + prefix += "fp16_"; + } + + std::string cachedTRTFile; + std::string onnxModelPath = config_.model_path; + + // Convert ONNX to TensorRT if needed + if (!ConvertONNXToTRT(options, onnxModelPath, cachedTRTFile, prefix, false)) { + std::cout << "✗ Failed to convert ONNX at " << onnxModelPath << std::endl; + return false; + } + + // Initialize the TensorRT inference engine + if (!inference_engine_->Initialize(cachedTRTFile, options.deviceID, options.dynamic_axes_names)) { + std::cout << "✗ Failed to initialize TensorRT model: " << cachedTRTFile << std::endl; + return false; + } + + // Initialize engine inputs + if (!inference_engine_->InitInputs({})) { + std::cout << "✗ Failed to initialize TensorRT model inputs: " << cachedTRTFile << std::endl; + return false; + } + + std::cout << "✓ Successfully converted ONNX to TRT: " << cachedTRTFile << std::endl; + + // Capture a CUDA graph + cudaStreamBeginCapture(cuda_stream_, cudaStreamCaptureModeRelaxed); + if(!inference_engine_->Enqueue(cuda_stream_)) + { + std::cout << "✗ Failed to enqueue inference for capturing cuda graph" << std::endl; + return false; + } + cudaStreamEndCapture(cuda_stream_, &graph_); + cudaStreamSynchronize(cuda_stream_); + + cudaGraphInstantiate(&graphExec_, graph_, NULL, NULL, 0); + + // Log tensor information for debugging + std::vector inputNames = inference_engine_->GetInputTensorNames(); + std::vector outputNames = inference_engine_->GetOutputTensorNames(); + + // Version-based input validation (ensure expected count and required names) + size_t expectedInputs = (config_.version == 1 || config_.version == 2) ? 11 : 6; + if (inputNames.size() != expectedInputs) { + std::cout << "Model version: " << config_.version << std::endl; + std::cout << "Model has " << inputNames.size() << " inputs, expected " << expectedInputs << std::endl; + std::cout << "✗ Failed to initialize TensorRT engine (input count mismatch)" << std::endl; + return false; + } + + { + std::vector requiredNames = { + tensor_names_.context_qpos, + tensor_names_.target_vel, + tensor_names_.mode, + tensor_names_.movement_direction, + tensor_names_.facing_direction, + tensor_names_.random_seed + }; + if (config_.version == 1 || config_.version == 2) { + requiredNames.push_back(tensor_names_.target_height); + requiredNames.push_back(tensor_names_.has_specific_target); + requiredNames.push_back(tensor_names_.specific_target_positions); + requiredNames.push_back(tensor_names_.specific_target_headings); + requiredNames.push_back(tensor_names_.allowed_pred_num_tokens); + } + for (const auto &req : requiredNames) { + if (std::find(inputNames.begin(), inputNames.end(), req) == inputNames.end()) { + std::cout << "✗ Missing required input tensor: " << req << std::endl; + return false; + } + } + } + + std::cout << "Input tensors:" << std::endl; + for (const auto& name : inputNames) { + std::vector shape; + inference_engine_->GetTensorShape(name, shape); + std::cout << " " << name << " "; + for (auto& dim : shape) { + std::cout << dim << " "; + } + + auto dataType = inference_engine_->GetTensorDataType(name); + if (dataType == DataType::FLOAT) { + std::cout << "float"; + } else if (dataType == DataType::INT64) { + std::cout << "int64"; + } else if (dataType == DataType::INT32) { + std::cout << "int32"; + } else { + std::cout << "unknown"; + } + std::cout << std::endl; + } + + std::cout << "Output tensors:" << std::endl; + for (const auto& name : outputNames) { + std::vector shape; + inference_engine_->GetTensorShape(name, shape); + std::cout << " " << name << " "; + for (auto& dim : shape) { + std::cout << dim << " "; + } + + auto dataType = inference_engine_->GetTensorDataType(name); + if (dataType == DataType::FLOAT) { + std::cout << "float"; + } else if (dataType == DataType::INT32) { + std::cout << "int32"; + } else { + std::cout << "unknown"; + } + std::cout << std::endl; + } + + std::cout << "✓ TensorRT planner model loaded successfully!" << std::endl; + return true; + } + + /// Async GPU inference: copy inputs → launch CUDA graph → copy outputs → synchronise. + void RunInference() override { + inference_engine_->SetInputDataAsync(tensor_names_.context_qpos, context_qpos_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.facing_direction, facing_direction_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.mode, mode_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.target_vel, target_vel_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.movement_direction, movement_direction_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.random_seed, random_seed_values_, cuda_stream_); + + if (config_.version == 1 || config_.version == 2) + { + inference_engine_->SetInputDataAsync(tensor_names_.target_height, target_height_values_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.has_specific_target, has_specific_target_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.specific_target_positions, specific_target_positions_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.specific_target_headings, specific_target_headings_, cuda_stream_); + inference_engine_->SetInputDataAsync(tensor_names_.allowed_pred_num_tokens, allowed_pred_num_tokens_, cuda_stream_); + } + + cudaGraphLaunch(graphExec_, cuda_stream_); + inference_engine_->GetOutputDataAsync(tensor_names_.mujoco_qpos_output, mujoco_qpos_values_, cuda_stream_); + inference_engine_->GetOutputDataAsync(tensor_names_.num_pred_frames_output, num_pred_frames_values_, cuda_stream_); + cudaStreamSynchronize(cuda_stream_); + } + + /// Write new locomotion commands into pinned-memory input buffers. + void UpdateInputTensors(int mode_value, + float target_vel, + float target_height, + const std::array& movement_direction, + const std::array& facing_direction, + int random_seed) override { + // Update mode + if (mode_value < 0 || mode_value >= GetValidModeValueRange()) { + std::cout << "✗ Invalid mode value: " << mode_value << ". Please verify the planner model version and the mode value range" << std::endl; + } + mode_values_[0] = mode_value < GetValidModeValueRange() ? mode_value : 0; + + // Update target velocity + target_vel_values_[0] = target_vel; + + if (config_.version == 1 || config_.version == 2) + { + // Update target height (version 1) + target_height_values_[0] = target_height; + } + + // Update movement direction + movement_direction_values_[0] = movement_direction[0]; + movement_direction_values_[1] = movement_direction[1]; + movement_direction_values_[2] = movement_direction[2]; + + // Update facing direction + facing_direction_values_[0] = facing_direction[0]; + facing_direction_values_[1] = facing_direction[1]; + facing_direction_values_[2] = facing_direction[2]; + + // Update random seed if provided + if (random_seed != -1) { + current_random_seed_ = random_seed; + random_seed_values_[0] = random_seed; + } + + // Log replanning values + std::cout << "Replanning with mode: "; + switch(mode_values_[0]) + { + case 0: + std::cout << "IDLE"; + break; + case 1: + std::cout << "SLOW_WALK"; + break; + case 2: + std::cout << "WALK"; + break; + case 3: + std::cout << "RUN"; + break; + case 4: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_SQUAT"; + } + else + { + std::cout << "BOXING"; + } + break; + case 5: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_KNEEL_TWO_LEGS"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 6: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_KNEEL"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 7: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_LYING_FACE_DOWN"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 8: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_CRAWLING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 9: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "IDLE_BOXING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 10: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "WALK_BOXING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 11: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "LEFT_PUNCH"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 12: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "RIGHT_PUNCH"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 13: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "RANDOM_PUNCH"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 14: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "ELBOW_CRAWLING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 15: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "LEFT_HOOK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 16: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "RIGHT_HOOK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 17: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "FORWARD_JUMP"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 18: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "STEALTH_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 19: + if (config_.version == 1 || config_.version == 2) + { + std::cout << "INJURED_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 20: + if (config_.version == 2) + { + std::cout << "LEDGE_WALKING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 21: + if (config_.version == 2) + { + std::cout << "OBJECT_CARRYING"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 22: + if (config_.version == 2) + { + std::cout << "STEALTH_WALK_2"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 23: + if (config_.version == 2) + { + std::cout << "HAPPY_DANCE_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 24: + if (config_.version == 2) + { + std::cout << "ZOMBIE_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 25: + if (config_.version == 2) + { + std::cout << "GUN_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + case 26: + if (config_.version == 2) + { + std::cout << "SCARE_WALK"; + } + else + { + std::cout << "UNKNOWN"; + } + break; + default: + std::cout << "UNKNOWN"; + break; + } + if (config_.version == 1 || config_.version == 2) + { + std::cout << ", target_height: " << target_height_values_[0]; + } + std::cout << ", target_vel: " << target_vel_values_[0] + << ", movement: [" << movement_direction_values_[0] << ", " << movement_direction_values_[1] << ", " << movement_direction_values_[2] << "]" + << ", facing: [" << facing_direction_values_[0] << ", " << facing_direction_values_[1] << ", " << facing_direction_values_[2] << "]" << std::endl; + } + + virtual float *GetContextBuffer() override { + return context_qpos_values_.data(); + } + virtual int32_t GetNumPredFrames() override { + return num_pred_frames_values_[0]; + } + virtual const float *GetMujocoQposBuffer() override { + return mujoco_qpos_values_.data(); + } + virtual float *GetMovementDirectionValues() override { + return movement_direction_values_.data(); + } + virtual float *GetFacingDirectionValues() override { + return facing_direction_values_.data(); + } + virtual float GetTargetVelValue() override { + return target_vel_values_[0]; + } + virtual float GetHeightValue() override { + return target_height_values_[0]; + } + virtual int32_t GetRandomSeedValue() override { + return random_seed_values_[0]; + } + virtual int32_t GetModeValue() override { + return mode_values_[0]; + } + +}; + +#endif // LOCALMOTION_KPLANNER_TENSORRT_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/math_utils.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/math_utils.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b3b2983a80ab1ac8825323a99159be09b3fe0ffe --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/math_utils.hpp @@ -0,0 +1,506 @@ +/** + * @file math_utils.hpp + * @brief Quaternion, rotation, and vector math utilities used throughout the + * G1 deployment stack. + * + * All quaternion functions use the **wxyz** (scalar-first) convention: + * q = [w, x, y, z] + * + * Most functions come in both float and double versions. The double versions + * are suffixed with `_d` (e.g. `quat_mul_d`, `quat_rotate_d`). Float + * versions are kept for compatibility with the robot SDK interface which + * uses 32-bit floats. + * + * Key function groups: + * - **Conversion**: float_to_double / double_to_float, wxyz ↔ xyzw. + * - **Gravity**: GetGravityOrientation – project gravity into body frame. + * - **Rotation**: quat_rotate – rotate a 3D vector by a quaternion. + * - **Quaternion algebra**: quat_mul, quat_conjugate, quat_unit, quat_slerp. + * - **Heading**: calc_heading, calc_heading_quat, calc_heading_quat_inv, + * euler_z_to_quat – extract / construct yaw-only quaternions. + * - **Axis-angle**: quat_from_angle_axis, quat_to_angle_axis. + * - **Matrix ↔ quat**: quat_to_rotation_matrix, rotation_matrix_to_quat. + * - **Vector**: normalize_vector. + */ + +#ifndef MATH_UTILS_HPP +#define MATH_UTILS_HPP + +#include +#include +#include + +// ============================================================================ +// CONVERSION UTILITIES BETWEEN FLOAT AND DOUBLE +// ============================================================================ + +// Convert float array to double array +template inline std::array float_to_double(const std::array& f_arr) { + std::array d_arr; + for (size_t i = 0; i < N; i++) { d_arr[i] = static_cast(f_arr[i]); } + return d_arr; +} + +// Convert double array to float array +template inline std::array double_to_float(const std::array& d_arr) { + std::array f_arr; + for (size_t i = 0; i < N; i++) { f_arr[i] = static_cast(d_arr[i]); } + return f_arr; +} + +// ============================================================================ +// LEGACY FLOAT FUNCTIONS (for compatibility with robot interface) +// ============================================================================ + +// Quaternion format conversion utilities (float versions) +inline std::array wxyz_to_xyzw(const std::array& quaternion) { + return {quaternion[1], quaternion[2], quaternion[3], quaternion[0]}; // qx, qy, qz, qw +} + +inline std::array xyzw_to_wxyz(const std::array& quaternion) { + return {quaternion[3], quaternion[0], quaternion[1], quaternion[2]}; // qw, qx, qy, qz +} + +// ============================================================================ +// HIGH PRECISION DOUBLE FUNCTIONS (for internal computations) +// ============================================================================ + +// Quaternion format conversion utilities (double versions) +inline std::array wxyz_to_xyzw_d(const std::array& quaternion) { + return {quaternion[1], quaternion[2], quaternion[3], quaternion[0]}; // qx, qy, qz, qw +} + +inline std::array xyzw_to_wxyz_d(const std::array& quaternion) { + return {quaternion[3], quaternion[0], quaternion[1], quaternion[2]}; // qw, qx, qy, qz +} + +// Calculate gravity orientation from quaternion (float version) +inline std::array GetGravityOrientation(const std::array& quaternion) { + float qw = quaternion[0]; + float qx = quaternion[1]; + float qy = quaternion[2]; + float qz = quaternion[3]; + + std::array gravity_orientation = {0.0f, 0.0f, 0.0f}; + + gravity_orientation[0] = 2.0f * (-qz * qx + qw * qy); + gravity_orientation[1] = -2.0f * (qz * qy + qw * qx); + gravity_orientation[2] = 1.0f - 2.0f * (qw * qw + qz * qz); + + return gravity_orientation; +} + +// Calculate gravity orientation from quaternion (double version) +inline std::array GetGravityOrientation_d(const std::array& quaternion) { + double qw = quaternion[0]; + double qx = quaternion[1]; + double qy = quaternion[2]; + double qz = quaternion[3]; + + std::array gravity_orientation = {0.0, 0.0, 0.0}; + + gravity_orientation[0] = 2.0 * (-qz * qx + qw * qy); + gravity_orientation[1] = -2.0 * (qz * qy + qw * qx); + gravity_orientation[2] = 1.0 - 2.0 * (qw * qw + qz * qz); + + return gravity_orientation; +} + +// Rotate a 3D vector by a quaternion (quaternion in wxyz format) - float version +template +inline std::array quat_rotate(const std::array& q, const std::array& v) { + T q_w = q[0]; + std::array q_vec = {q[1], q[2], q[3]}; + + // a = v * (2.0 * q_w^2 - 1.0) + T scale_a = 2 * q_w * q_w - 1; + std::array a = {v[0] * scale_a, v[1] * scale_a, v[2] * scale_a}; + + // b = cross(q_vec, v) * q_w * 2.0 + std::array cross_qv = {q_vec[1] * v[2] - q_vec[2] * v[1], q_vec[2] * v[0] - q_vec[0] * v[2], + q_vec[0] * v[1] - q_vec[1] * v[0]}; + std::array b = {cross_qv[0] * q_w * 2, cross_qv[1] * q_w * 2, cross_qv[2] * q_w * 2}; + + // c = q_vec * dot(q_vec, v) * 2.0 + T dot_qv = q_vec[0] * v[0] + q_vec[1] * v[1] + q_vec[2] * v[2]; + std::array c = {q_vec[0] * dot_qv * 2, q_vec[1] * dot_qv * 2, q_vec[2] * dot_qv * 2}; + + return {a[0] + b[0] + c[0], a[1] + b[1] + c[1], a[2] + b[2] + c[2]}; +} + +// Rotate a 3D vector by a quaternion (quaternion in wxyz format) - double version +inline std::array quat_rotate_d(const std::array& q, const std::array& v) { + double q_w = q[0]; + std::array q_vec = {q[1], q[2], q[3]}; + + // a = v * (2.0 * q_w^2 - 1.0) + double scale_a = 2.0 * q_w * q_w - 1.0; + std::array a = {v[0] * scale_a, v[1] * scale_a, v[2] * scale_a}; + + // b = cross(q_vec, v) * q_w * 2.0 + std::array cross_qv = {q_vec[1] * v[2] - q_vec[2] * v[1], q_vec[2] * v[0] - q_vec[0] * v[2], + q_vec[0] * v[1] - q_vec[1] * v[0]}; + std::array b = {cross_qv[0] * q_w * 2.0, cross_qv[1] * q_w * 2.0, cross_qv[2] * q_w * 2.0}; + + // c = q_vec * dot(q_vec, v) * 2.0 + double dot_qv = q_vec[0] * v[0] + q_vec[1] * v[1] + q_vec[2] * v[2]; + std::array c = {q_vec[0] * dot_qv * 2.0, q_vec[1] * dot_qv * 2.0, q_vec[2] * dot_qv * 2.0}; + + return {a[0] + b[0] + c[0], a[1] + b[1] + c[1], a[2] + b[2] + c[2]}; +} + +// Quaternion multiplication (wxyz format: w, x, y, z) - float version +template +inline std::array quat_mul(const std::array& a, const std::array& b) { + T w1 = a[0], x1 = a[1], y1 = a[2], z1 = a[3]; + T w2 = b[0], x2 = b[1], y2 = b[2], z2 = b[3]; + + // Python optimized implementation + T ww = (z1 + x1) * (x2 + y2); + T yy = (w1 - y1) * (w2 + z2); + T zz = (w1 + y1) * (w2 - z2); + T xx = ww + yy + zz; + T qq = (xx + (z1 - x1) * (x2 - y2)) / 2; + + T w = qq - ww + (z1 - y1) * (y2 - z2); + T x = qq - xx + (x1 + w1) * (x2 + w2); + T y = qq - yy + (w1 - x1) * (y2 + z2); + T z = qq - zz + (z1 + y1) * (w2 - x2); + + return {w, x, y, z}; +} + +// Quaternion multiplication (wxyz format: w, x, y, z) - double version +inline std::array quat_mul_d(const std::array& a, const std::array& b) { + double w1 = a[0], x1 = a[1], y1 = a[2], z1 = a[3]; + double w2 = b[0], x2 = b[1], y2 = b[2], z2 = b[3]; + + // Python optimized implementation + double ww = (z1 + x1) * (x2 + y2); + double yy = (w1 - y1) * (w2 + z2); + double zz = (w1 + y1) * (w2 - z2); + double xx = ww + yy + zz; + double qq = 0.5 * (xx + (z1 - x1) * (x2 - y2)); + + double w = qq - ww + (z1 - y1) * (y2 - z2); + double x = qq - xx + (x1 + w1) * (x2 + w2); + double y = qq - yy + (w1 - x1) * (y2 + z2); + double z = qq - zz + (z1 + y1) * (w2 - x2); + + return {w, x, y, z}; +} + +// Extract heading angle from quaternion (returns angle in radians) - float version +inline float calc_heading(const std::array& q) { + // Create reference direction [1, 0, 0] + std::array ref_dir = {1.0f, 0.0f, 0.0f}; + + // Rotate reference direction by quaternion + std::array rot_dir = quat_rotate(q, ref_dir); + + // Compute heading as atan2(y, x) of rotated direction + return std::atan2(rot_dir[1], rot_dir[0]); +} + +// Extract heading angle from quaternion (returns angle in radians) - double version +inline double calc_heading_d(const std::array& q) { + // Create reference direction [1, 0, 0] + std::array ref_dir = {1.0, 0.0, 0.0}; + + // Rotate reference direction by quaternion + std::array rot_dir = quat_rotate_d(q, ref_dir); + + // Compute heading as atan2(y, x) of rotated direction + return std::atan2(rot_dir[1], rot_dir[0]); +} + + +// Normalize a vector (matches Python normalize function) - float version +template +inline std::array normalize_vector(const std::array& v, T eps = 1e-9f) { + T norm = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); + norm = std::max(norm, eps); + return {v[0] / norm, v[1] / norm, v[2] / norm}; +} + +// Normalize a vector (matches Python normalize function) - double version +inline std::array normalize_vector_d(const std::array& v, double eps = 1e-12) { + double norm = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); + norm = std::max(norm, eps); + return {v[0] / norm, v[1] / norm, v[2] / norm}; +} + +template +inline std::tuple > quat_to_angle_axis(const std::array &q) +{ + + std::array axis = {q[1], q[2], q[3]}; + auto shalf = std::sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]); + T angle = 2 * std::asin(shalf); + + axis = normalize_vector(axis); + + return {angle, axis}; +} + +// Normalize a quaternion (matches Python quat_unit function) - float version +template +inline std::array quat_unit(const std::array& q, T eps = 1e-9f) { + T norm = std::sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); + norm = std::max(norm, eps); + return {q[0] / norm, q[1] / norm, q[2] / norm, q[3] / norm}; +} + +// Normalize a quaternion (matches Python quat_unit function) - double version +inline std::array quat_unit_d(const std::array& q, double eps = 1e-12) { + double norm = std::sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]); + norm = std::max(norm, eps); + return {q[0] / norm, q[1] / norm, q[2] / norm, q[3] / norm}; +} + +// Create quaternion from angle and axis (matches Python quat_from_angle_axis) - float version +template +std::array quat_from_angle_axis(T angle, const std::array& axis) { + T theta = angle / 2.; + T sin_theta = std::sin(theta); + T cos_theta = std::cos(theta); + + // Normalize axis + auto normalized_axis = normalize_vector(axis); + + // Create quaternion and normalize it (matches Python quat_unit call) + std::array quat = {cos_theta, normalized_axis[0] * sin_theta, normalized_axis[1] * sin_theta, + normalized_axis[2] * sin_theta}; + return quat_unit(quat); // w, x, y, z +} + +// Create quaternion from angle and axis (matches Python quat_from_angle_axis) - double version +inline std::array quat_from_angle_axis_d(double angle, const std::array& axis) { + double theta = angle / 2.0; + double sin_theta = std::sin(theta); + double cos_theta = std::cos(theta); + + // Normalize axis + auto normalized_axis = normalize_vector_d(axis); + + // Create quaternion and normalize it (matches Python quat_unit call) + std::array quat = {cos_theta, normalized_axis[0] * sin_theta, normalized_axis[1] * sin_theta, + normalized_axis[2] * sin_theta}; + return quat_unit_d(quat); // w, x, y, z +} + +// Calculate heading quaternion from full quaternion (wxyz format) - float version +inline std::array calc_heading_quat(const std::array& q) { + float heading = calc_heading(q); + std::array axis = {0.0f, 0.0f, 1.0f}; // z-axis + return quat_from_angle_axis(heading, axis); +} + +// Calculate heading quaternion from full quaternion (wxyz format) - double version +inline std::array calc_heading_quat_d(const std::array& q) { + double heading = calc_heading_d(q); + std::array axis = {0.0, 0.0, 1.0}; // z-axis + return quat_from_angle_axis_d(heading, axis); +} + +// Calculate inverse heading quaternion (matches Python implementation) - float version +inline std::array calc_heading_quat_inv(const std::array& q) { + float heading = calc_heading(q); + std::array axis = {0.0f, 0.0f, 1.0f}; // z-axis + return quat_from_angle_axis(-heading, axis); // Note: negative heading +} + +// Calculate inverse heading quaternion (matches Python implementation) - double version +inline std::array calc_heading_quat_inv_d(const std::array& q) { + double heading = calc_heading_d(q); + std::array axis = {0.0, 0.0, 1.0}; // z-axis + return quat_from_angle_axis_d(-heading, axis); // Note: negative heading +} + +// Create quaternion from Euler Z rotation (returns wxyz format) - float version +inline std::array euler_z_to_quat(float angle_rad) { + std::array z_axis = {0.0f, 0.0f, 1.0f}; + return quat_from_angle_axis(angle_rad, z_axis); +} + +// Create quaternion from Euler Z rotation (returns wxyz format) - double version +inline std::array euler_z_to_quat_d(double angle_rad) { + std::array z_axis = {0.0, 0.0, 1.0}; + return quat_from_angle_axis_d(angle_rad, z_axis); +} + +// Quaternion conjugate (negate x, y, z components) - float version +inline std::array quat_conjugate(const std::array& quat) { + return {quat[0], -quat[1], -quat[2], -quat[3]}; // w, -x, -y, -z +} + +// Quaternion conjugate (negate x, y, z components) - double version +inline std::array quat_conjugate_d(const std::array& quat) { + return {quat[0], -quat[1], -quat[2], -quat[3]}; // w, -x, -y, -z +} + +// Spherical Linear Interpolation (SLERP) for quaternions - double version +inline std::array quat_slerp_d(const std::array& q0, const std::array& q1, double t) { + // Compute dot product (cos of half angle between quaternions) + double dot = q0[0] * q1[0] + q0[1] * q1[1] + q0[2] * q1[2] + q0[3] * q1[3]; + + // If dot is negative, slerp along the shorter path by using -q1 + std::array q1_adjusted = q1; + if (dot < 0.0) { + q1_adjusted = {-q1[0], -q1[1], -q1[2], -q1[3]}; + dot = -dot; + } + + // Use linear interpolation for very close quaternions to avoid division by near-zero + if (dot > 0.9995) { + // Linear interpolation + std::array result = { + q0[0] + t * (q1_adjusted[0] - q0[0]), + q0[1] + t * (q1_adjusted[1] - q0[1]), + q0[2] + t * (q1_adjusted[2] - q0[2]), + q0[3] + t * (q1_adjusted[3] - q0[3]) + }; + return quat_unit_d(result); + } else { + // Spherical linear interpolation + double theta = std::acos(std::abs(dot)); + double sin_theta = std::sin(theta); + double factor0 = std::sin((1.0 - t) * theta) / sin_theta; + double factor1 = std::sin(t * theta) / sin_theta; + + return { + factor0 * q0[0] + factor1 * q1_adjusted[0], + factor0 * q0[1] + factor1 * q1_adjusted[1], + factor0 * q0[2] + factor1 * q1_adjusted[2], + factor0 * q0[3] + factor1 * q1_adjusted[3] + }; + } +} + +// Convert quaternion to rotation matrix (wxyz format input) - float version +inline std::array, 3> quat_to_rotation_matrix(const std::array& quat) { + float w = quat[0], x = quat[1], y = quat[2], z = quat[3]; + + // Normalize quaternion + float norm = std::sqrt(w * w + x * x + y * y + z * z); + w /= norm; + x /= norm; + y /= norm; + z /= norm; + + // Compute rotation matrix elements + std::array, 3> R; + + R[0][0] = 1 - 2 * (y * y + z * z); + R[0][1] = 2 * (x * y - w * z); + R[0][2] = 2 * (x * z + w * y); + + R[1][0] = 2 * (x * y + w * z); + R[1][1] = 1 - 2 * (x * x + z * z); + R[1][2] = 2 * (y * z - w * x); + + R[2][0] = 2 * (x * z - w * y); + R[2][1] = 2 * (y * z + w * x); + R[2][2] = 1 - 2 * (x * x + y * y); + + return R; +} + +// Convert quaternion to rotation matrix (wxyz format input) - double version +inline std::array, 3> quat_to_rotation_matrix_d(const std::array& quat) { + double w = quat[0], x = quat[1], y = quat[2], z = quat[3]; + + // Normalize quaternion + double norm = std::sqrt(w * w + x * x + y * y + z * z); + w /= norm; + x /= norm; + y /= norm; + z /= norm; + + // Compute rotation matrix elements + std::array, 3> R; + + R[0][0] = 1 - 2 * (y * y + z * z); + R[0][1] = 2 * (x * y - w * z); + R[0][2] = 2 * (x * z + w * y); + + R[1][0] = 2 * (x * y + w * z); + R[1][1] = 1 - 2 * (x * x + z * z); + R[1][2] = 2 * (y * z - w * x); + + R[2][0] = 2 * (x * z - w * y); + R[2][1] = 2 * (y * z + w * x); + R[2][2] = 1 - 2 * (x * x + y * y); + + return R; +} + +// Convert 3x3 rotation matrix to quaternion (wxyz format output) - float version +inline std::array rotation_matrix_to_quat(const std::array, 3>& R) { + float trace = R[0][0] + R[1][1] + R[2][2]; + float w, x, y, z; + + if (trace > 0.0f) { + float s = 0.5f / std::sqrt(trace + 1.0f); + w = 0.25f / s; + x = (R[2][1] - R[1][2]) * s; + y = (R[0][2] - R[2][0]) * s; + z = (R[1][0] - R[0][1]) * s; + } else if (R[0][0] > R[1][1] && R[0][0] > R[2][2]) { + float s = 2.0f * std::sqrt(1.0f + R[0][0] - R[1][1] - R[2][2]); + w = (R[2][1] - R[1][2]) / s; + x = 0.25f * s; + y = (R[0][1] + R[1][0]) / s; + z = (R[0][2] + R[2][0]) / s; + } else if (R[1][1] > R[2][2]) { + float s = 2.0f * std::sqrt(1.0f + R[1][1] - R[0][0] - R[2][2]); + w = (R[0][2] - R[2][0]) / s; + x = (R[0][1] + R[1][0]) / s; + y = 0.25f * s; + z = (R[1][2] + R[2][1]) / s; + } else { + float s = 2.0f * std::sqrt(1.0f + R[2][2] - R[0][0] - R[1][1]); + w = (R[1][0] - R[0][1]) / s; + x = (R[0][2] + R[2][0]) / s; + y = (R[1][2] + R[2][1]) / s; + z = 0.25f * s; + } + + return {w, x, y, z}; +} + +// Convert 3x3 rotation matrix to quaternion (wxyz format output) - double version +inline std::array rotation_matrix_to_quat_d(const std::array, 3>& R) { + double trace = R[0][0] + R[1][1] + R[2][2]; + double w, x, y, z; + + if (trace > 0.0) { + double s = 0.5 / std::sqrt(trace + 1.0); + w = 0.25 / s; + x = (R[2][1] - R[1][2]) * s; + y = (R[0][2] - R[2][0]) * s; + z = (R[1][0] - R[0][1]) * s; + } else if (R[0][0] > R[1][1] && R[0][0] > R[2][2]) { + double s = 2.0 * std::sqrt(1.0 + R[0][0] - R[1][1] - R[2][2]); + w = (R[2][1] - R[1][2]) / s; + x = 0.25 * s; + y = (R[0][1] + R[1][0]) / s; + z = (R[0][2] + R[2][0]) / s; + } else if (R[1][1] > R[2][2]) { + double s = 2.0 * std::sqrt(1.0 + R[1][1] - R[0][0] - R[2][2]); + w = (R[0][2] - R[2][0]) / s; + x = (R[0][1] + R[1][0]) / s; + y = 0.25 * s; + z = (R[1][2] + R[2][1]) / s; + } else { + double s = 2.0 * std::sqrt(1.0 + R[2][2] - R[0][0] - R[1][1]); + w = (R[1][0] - R[0][1]) / s; + x = (R[0][2] + R[2][0]) / s; + y = (R[1][2] + R[2][1]) / s; + z = 0.25 * s; + } + + return {w, x, y, z}; +} + +#endif // MATH_UTILS_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/motion_data_reader.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/motion_data_reader.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3bc8e6981e567aae0620d711d1657a52b2638f25 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/motion_data_reader.hpp @@ -0,0 +1,1027 @@ +/** + * @file motion_data_reader.hpp + * @brief Motion data structures, CSV reader, and motion recorder. + * + * This file provides three main components: + * + * ## MotionSequence + * Flat-array storage for a single motion clip: joint positions/velocities, + * body positions/quaternions/velocities, and optional SMPL joint/pose data. + * Frame accessors (e.g. `JointPositions(frame)`) return pointers into the + * flat arrays at the correct stride. The struct also supports forward + * kinematics computation and Gaussian-filtered velocity estimation. + * + * ## MotionDataReader + * Reads a directory of motion folders, each containing CSV files + * (`joint_pos.csv`, `body_quat.csv`, etc.) and a `metadata.txt` file. + * Auto-discovers available motions, validates frame-count consistency, + * and returns a vector of shared_ptr. + * + * ## MotionRecorder + * RAII-based writer that records live motion frames into timestamped + * directories of CSV files (used for ZMQ stream recording). + * + * ## PlannerMotionState + * A simple struct bundling a MotionSequence with a frame cursor, used + * for thread-safe planner ↔ control-loop communication. + */ + +#ifndef MOTION_DATA_READER_HPP +#define MOTION_DATA_READER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../include/fk.hpp" +#include "../include/policy_parameters.hpp" +#include "../include/math_utils.hpp" + +/** + * @struct MotionSequence + * @brief Stores one motion clip as flat arrays of per-frame data. + * + * Data layout: each "row" in the flat arrays corresponds to one frame. + * Frame accessors multiply the frame index by the per-frame stride + * (e.g. `num_joints`) to yield a pointer to that frame's data. + * + * The `encode_mode` field is mutable so it can be toggled at runtime + * (e.g. by keyboard 'Z' key) without requiring non-const access to + * the MotionSequence. + */ +struct MotionSequence { + std::string name = ""; ///< Human-readable motion name (folder name or "streamed" / "planner_motion"). + int timesteps = 0; ///< Total number of frames in this motion. + + /// Encoding mode flag (mutable for runtime toggling from const contexts). + /// -2 = no token state configured + /// -1 = token state needed but encoder not loaded + /// 0+ = active encoder mode index + mutable int encode_mode = -2; + + using Point = std::array; + using Quaternion = std::array; + using Velocity = std::array; + + double *JointPositions(int frame) { return joint_positions_.data() + frame * num_joints; } + double *JointVelocities(int frame) { return joint_velocities_.data() + frame * num_joints; } + Point *BodyPositions(int frame) { return body_positions_.data() + frame * num_bodies; } + Quaternion *BodyQuaternions(int frame) { return body_quaternions_.data() + frame * num_body_quaternions; } + Velocity *BodyLinVelocities(int frame) { return body_lin_velocities_.data() + frame * num_bodies; } + Velocity *BodyAngVelocities(int frame) { return body_ang_velocities_.data() + frame * num_bodies; } + Point *SmplJoints(int frame) { return smpl_joints_.data() + frame * num_smpl_joints; } + Point *SmplPoses(int frame) { return smpl_poses_.data() + frame * num_smpl_poses; } + + const double *JointPositions(int frame) const { return joint_positions_.data() + frame * num_joints; } + const double *JointVelocities(int frame) const { return joint_velocities_.data() + frame * num_joints; } + const Point *BodyPositions(int frame) const { return body_positions_.data() + frame * num_bodies; } + const Quaternion *BodyQuaternions(int frame) const { return body_quaternions_.data() + frame * num_body_quaternions; } + const Velocity *BodyLinVelocities(int frame) const { return body_lin_velocities_.data() + frame * num_bodies; } + const Velocity *BodyAngVelocities(int frame) const { return body_ang_velocities_.data() + frame * num_bodies; } + const Point *SmplJoints(int frame) const { return smpl_joints_.data() + frame * num_smpl_joints; } + const Point *SmplPoses(int frame) const { return smpl_poses_.data() + frame * num_smpl_poses; } + + int GetNumJoints() const { return num_joints; } + int GetNumBodies() const { return num_bodies; } + int GetNumBodyQuaternions() const { return num_body_quaternions; } + int GetNumSmplJoints() const { return num_smpl_joints; } + int GetNumSmplPoses() const { return num_smpl_poses; } + const std::vector &BodyPartIndexes() const { return body_part_indexes; } + + // Encode mode accessors (const methods that modify mutable encode_mode) + int GetEncodeMode() const { return encode_mode; } + void SetEncodeMode(int mode) const { encode_mode = mode; } + + // Set body part indexes (used by ZMQ interface for streamed motions) + void SetBodyPartIndexes(const std::vector& indexes) { body_part_indexes = indexes; } + + // Pre-allocate capacity to avoid reallocations during extension + void ReserveCapacity(int max_frames, int joints = 29, int bodies = 1, + int body_quaternions = 1, int smpl_joints = 0, int smpl_poses = 0) { + num_joints = joints; + num_bodies = bodies; + num_body_quaternions = body_quaternions; + num_smpl_joints = smpl_joints; + num_smpl_poses = smpl_poses; + + joint_positions_.resize(max_frames * joints); + joint_velocities_.resize(max_frames * joints); + + body_positions_.resize(max_frames * bodies); + body_quaternions_.resize(max_frames * body_quaternions); + body_lin_velocities_.resize(max_frames * bodies); + body_ang_velocities_.resize(max_frames * bodies); + + smpl_joints_.resize(max_frames * smpl_joints); + smpl_poses_.resize(max_frames * smpl_poses); + + positions_world_tmp.resize(joints + 1); + rotations_world_tmp.resize(joints + 1); + pos_filter_tmp.resize(max_frames); + ang_filter_tmp.resize(max_frames); + } + + void ComputeFK(const RobotFK &fk) + { + if(positions_world_tmp.size() != positions_world_tmp.size()) + { + std::cout << "failed to compute fk - wrong number of joints" << std::endl; + std::cerr << positions_world_tmp.size() << " != " << positions_world_tmp.size() << std::endl; + return; + } + + int nframes = timesteps; + auto nj = GetNumJoints(); + for( int f=0; f < timesteps; ++f ) + { + fk.DoFK( + positions_world_tmp.data(), + rotations_world_tmp.data(), + BodyPositions(f)[0], + BodyQuaternions(f)[0], + JointPositions(f) + ); + + for(size_t body_idx = 0; body_idx < body_part_indexes.size(); ++body_idx) + { + auto i = body_part_indexes[body_idx]; + int mj_idx = 0; + if(i > 0) + { + mj_idx = mujoco_to_isaaclab[i-1] + 1; + } + auto &p = positions_world_tmp[mj_idx]; + auto &q = rotations_world_tmp[mj_idx]; + + BodyPositions(f)[body_idx] = p; + BodyQuaternions(f)[body_idx] = q; + } + } + } + + void ComputeGlobalVelocities(bool filter=true) + { + for( int f=0; f < timesteps; ++f ) + { + int f0 = std::max(f - 1, 0); + int f1 = std::min(timesteps-1, f+1); + + int dt = std::max(1, f1 - f0); + for(size_t body_idx = 0; body_idx < body_part_indexes.size(); ++body_idx) + { + const auto &p1 = BodyPositions(f1)[body_idx]; + const auto &p0 = BodyPositions(f0)[body_idx]; + + BodyLinVelocities(f)[body_idx] = { + (p1[0] - p0[0]) * 50 / dt, + (p1[1] - p0[1]) * 50 / dt, + (p1[2] - p0[2]) * 50 / dt + }; + + const auto &q1 = BodyQuaternions(f1)[body_idx]; + const auto &q0 = BodyQuaternions(std::max(0, f1-1))[body_idx]; + auto dq = quat_mul(q1, quat_conjugate_d(q0)); + auto [diff_angle, diff_axis] = quat_to_angle_axis(dq); + + BodyAngVelocities(f)[body_idx] = { + diff_axis[0] * diff_angle * 50, + diff_axis[1] * diff_angle * 50, + diff_axis[2] * diff_angle * 50 + }; + } + } + + if(filter) + { + // trying to replicate scipy.ndimage.filters.gaussian_filter1d(sigma=2, mode="nearest") + // like in the gr00t code: + const double sigma = 2.0; + const int lw = int(4.0 * sigma + 0.5); + const double sigma2 = sigma * sigma; + double kernel_sum = 0.0; + for(int dx = -lw; dx <= lw; ++dx) + { + kernel_sum += exp(-0.5 / sigma2 * dx * dx); + } + if(pos_filter_tmp.size() < timesteps || ang_filter_tmp.size() < timesteps) + { + std::cerr << "failed to filter velocities because buffer size is inadequate" << std::endl; + return; + } + for(size_t body_idx = 0; body_idx < body_part_indexes.size(); ++body_idx) + { + for( int f=0; f < timesteps; ++f ) + { + std::array pos_result = {0.0, 0.0, 0.0}; + std::array ang_result = {0.0, 0.0, 0.0}; + for(int dx = -lw; dx <= lw; ++dx) + { + auto fk = std::clamp(f + dx, 0, timesteps-1); + double weight = exp(-0.5 / sigma2 * dx * dx); + pos_result[0] += weight * BodyLinVelocities(fk)[body_idx][0]; + pos_result[1] += weight * BodyLinVelocities(fk)[body_idx][1]; + pos_result[2] += weight * BodyLinVelocities(fk)[body_idx][2]; + + ang_result[0] += weight * BodyAngVelocities(fk)[body_idx][0]; + ang_result[1] += weight * BodyAngVelocities(fk)[body_idx][1]; + ang_result[2] += weight * BodyAngVelocities(fk)[body_idx][2]; + } + pos_filter_tmp[f][0] = pos_result[0] / kernel_sum; + pos_filter_tmp[f][1] = pos_result[1] / kernel_sum; + pos_filter_tmp[f][2] = pos_result[2] / kernel_sum; + + ang_filter_tmp[f][0] = ang_result[0] / kernel_sum; + ang_filter_tmp[f][1] = ang_result[1] / kernel_sum; + ang_filter_tmp[f][2] = ang_result[2] / kernel_sum; + } + for( int f=0; f < timesteps; ++f ) + { + BodyLinVelocities(f)[body_idx] = pos_filter_tmp[f]; + BodyAngVelocities(f)[body_idx] = ang_filter_tmp[f]; + } + } + } + } + + private: + + friend class MotionDataReader; + + int num_joints = 0; + int num_bodies = 0; // Used by BodyPositions, BodyLinVelocities, BodyAngVelocities + int num_body_quaternions = 0; // Independent body count for BodyQuaternions + int num_smpl_joints = 0; + int num_smpl_poses = 0; + + // Body part mapping (crucial for alignment!) + std::vector body_part_indexes; // Maps 14 body parts to body indices + + // Joint data (timesteps x joints) - using double precision + std::vector joint_positions_; // [timestep][joint_id] + std::vector joint_velocities_; // [timestep][joint_id] + + // Body data (timesteps x body_parts x coordinates) - using double precision + + std::vector body_positions_; // [timestep][body_id][xyz] + std::vector body_quaternions_; // [timestep][body_id][wxyz] + std::vector body_lin_velocities_; // [timestep][body_id][xyz] + std::vector body_ang_velocities_; // [timestep][body_id][xyz] + + // SMPL data (separate from robot body positions/quaternions) + std::vector smpl_joints_; // [timestep][smpl_joint_id][xyz] - SMPL joint positions + std::vector smpl_poses_; // [timestep][smpl_pose_id][xyz] - SMPL body poses + + // temporary buffers for doing FK and filtering velocities, + // to avoid allocating memory at runtime: + std::vector positions_world_tmp; + std::vector rotations_world_tmp; + std::vector pos_filter_tmp; + std::vector ang_filter_tmp; + + // ==== PERFORMANCE OPTIMIZATIONS FOR SLIDING WINDOW OPERATIONS ==== + + // ==== ORIGINAL METHODS ==== + + void print_summary() const { + + std::cout << "Motion: " << name << std::endl; + std::cout << " Timesteps: " << timesteps << std::endl; + std::cout << " Encode mode: " << encode_mode << std::endl; + std::cout << " Body part indexes: " << body_part_indexes.size() << " parts mapped" << std::endl; + std::cout << " Joint positions: " << timesteps << " x " << num_joints << std::endl; + std::cout << " Joint velocities: " << timesteps << " x " << num_joints << std::endl; + std::cout << " Body positions: " << timesteps << " x " << num_bodies << " x 3" << std::endl; + std::cout << " Body quaternions: " << timesteps << " x " << num_body_quaternions << " x 4" << std::endl; + std::cout << " Body linear velocities: " << timesteps << " x " << num_bodies << " x 3" << std::endl; + std::cout << " Body angular velocities: " << timesteps << " x " << num_bodies << " x 3" << std::endl; + + // Show SMPL data if present + if (num_smpl_joints > 0) { + std::cout << " SMPL joints: " << timesteps << " x " << num_smpl_joints << " x 3" << std::endl; + } + if (num_smpl_poses > 0) { + std::cout << " SMPL poses: " << timesteps << " x " << num_smpl_poses << " x 3" << std::endl; + } + + // Show body part indexes for alignment + if (!body_part_indexes.empty()) { + std::cout << " Body part indexes: ["; + for (size_t i = 0; i < std::min(size_t(8), body_part_indexes.size()); i++) { + std::cout << body_part_indexes[i]; + if (i < std::min(size_t(8), body_part_indexes.size()) - 1) std::cout << ","; + } + if (body_part_indexes.size() > 8) std::cout << "..."; + std::cout << "]" << std::endl; + } + + // Show sample joint positions from first timestep + if (!joint_positions_.empty() && num_joints > 0) { + std::cout << " Sample joint positions (t=0): "; + for (size_t i = 0; i < std::min(size_t(5), size_t(num_joints)); i++) { + std::cout << std::fixed << std::setprecision(3) << JointPositions(0)[i] << " "; + } + if (num_joints > 5) std::cout << "..."; + std::cout << std::endl; + } + } +}; + +/** + * @brief Bundles a MotionSequence with its playback cursor for thread-safe + * transfer between the planner and control threads via DataBuffer. + */ +struct PlannerMotionState { + std::shared_ptr motion; + int current_frame; + + PlannerMotionState(std::shared_ptr m = std::make_shared(), int frame = 0) + : motion(m), current_frame(frame) {} + + // Constructor for backwards compatibility + PlannerMotionState(const MotionSequence& m, int frame = 0) + : motion(std::make_shared(m)), current_frame(frame) {} +}; + +/** + * @class MotionRecorder + * @brief RAII-based CSV writer for recording live motion frames to disk. + * + * Creates a timestamped directory under `base_dir` and writes one CSV file + * per signal type (joint_pos, body_quat, etc.). Call `StartSession()` to + * begin, `WriteFrame()` each tick, and `Finalize()` (or let the destructor + * do it) to close files and write metadata. + */ +class MotionRecorder { +public: + MotionRecorder(const std::string& base_dir = "reference/recorded_motion") + : base_dir_(base_dir), active_(false), frames_written_(0) {} + + ~MotionRecorder() { + if (active_) { + Finalize(); + } + } + + // Start recording - creates session directory and opens CSV files + // Directory structure: base_dir/YYYYMMDD/motion_name_HHMMSS/ + bool StartSession(const std::string& motion_name = "zmq_stream") { + if (active_) { + std::cerr << "[MotionRecorder] Warning: Session already active, stopping previous session" << std::endl; + Finalize(); + } + + try { + auto now = std::chrono::system_clock::now(); + std::time_t now_c = std::chrono::system_clock::to_time_t(now); + std::tm tm{}; +#ifdef _WIN32 + localtime_s(&tm, &now_c); +#else + localtime_r(&now_c, &tm); +#endif + + // Create date directory: YYYYMMDD + std::ostringstream date_oss; + date_oss << std::put_time(&tm, "%Y%m%d"); + std::string date_dir = base_dir_ + "/" + date_oss.str(); + std::filesystem::create_directories(date_dir); + + // Create motion directory with timestamp: motion_name_HHMMSS + std::ostringstream time_oss; + time_oss << std::put_time(&tm, "%H%M%S"); + motion_dir_ = date_dir + "/" + motion_name + "_" + time_oss.str(); + std::filesystem::create_directories(motion_dir_); + + motion_name_ = motion_name; + frames_written_ = 0; + active_ = true; + + std::cout << "[MotionRecorder] Recording started: " << motion_dir_ << std::endl; + return true; + } catch (const std::exception& e) { + std::cerr << "[MotionRecorder] Failed to start session: " << e.what() << std::endl; + return false; + } + } + + // Write a single frame of motion data + bool WriteFrame(std::shared_ptr motion, int frame_idx) { + if (!active_ || !motion || frame_idx >= motion->timesteps) { + return false; + } + + // Lazily open files on first write when we know dimensions + if (!files_open_) { + if (!OpenFiles(motion->GetNumJoints(), motion->GetNumBodies(), motion->GetNumBodyQuaternions(), + motion->GetNumSmplJoints(), motion->GetNumSmplPoses())) { + return false; + } + } + + try { + // Write joint positions + const double* joint_pos = motion->JointPositions(frame_idx); + for (int j = 0; j < motion->GetNumJoints(); ++j) { + joint_pos_file_ << std::fixed << std::setprecision(9) << joint_pos[j]; + if (j + 1 < motion->GetNumJoints()) joint_pos_file_ << ","; + } + joint_pos_file_ << "\n"; + + // Write joint velocities + const double* joint_vel = motion->JointVelocities(frame_idx); + for (int j = 0; j < motion->GetNumJoints(); ++j) { + joint_vel_file_ << std::fixed << std::setprecision(9) << joint_vel[j]; + if (j + 1 < motion->GetNumJoints()) joint_vel_file_ << ","; + } + joint_vel_file_ << "\n"; + + // Write body positions (for each body: x, y, z) + const auto* body_pos = motion->BodyPositions(frame_idx); + for (int b = 0; b < motion->GetNumBodies(); ++b) { + for (int axis = 0; axis < 3; ++axis) { + body_pos_file_ << std::fixed << std::setprecision(9) << body_pos[b][axis]; + if (b + 1 < motion->GetNumBodies() || axis + 1 < 3) body_pos_file_ << ","; + } + } + body_pos_file_ << "\n"; + + // Write body quaternions (for each body: w, x, y, z) + const auto* body_quat = motion->BodyQuaternions(frame_idx); + for (int b = 0; b < motion->GetNumBodyQuaternions(); ++b) { + for (int q = 0; q < 4; ++q) { + body_quat_file_ << std::fixed << std::setprecision(9) << body_quat[b][q]; + if (b + 1 < motion->GetNumBodyQuaternions() || q + 1 < 4) body_quat_file_ << ","; + } + } + body_quat_file_ << "\n"; + + // Write body linear velocities + const auto* body_lin_vel = motion->BodyLinVelocities(frame_idx); + for (int b = 0; b < motion->GetNumBodies(); ++b) { + for (int axis = 0; axis < 3; ++axis) { + body_lin_vel_file_ << std::fixed << std::setprecision(9) << body_lin_vel[b][axis]; + if (b + 1 < motion->GetNumBodies() || axis + 1 < 3) body_lin_vel_file_ << ","; + } + } + body_lin_vel_file_ << "\n"; + + // Write body angular velocities + const auto* body_ang_vel = motion->BodyAngVelocities(frame_idx); + for (int b = 0; b < motion->GetNumBodies(); ++b) { + for (int axis = 0; axis < 3; ++axis) { + body_ang_vel_file_ << std::fixed << std::setprecision(9) << body_ang_vel[b][axis]; + if (b + 1 < motion->GetNumBodies() || axis + 1 < 3) body_ang_vel_file_ << ","; + } + } + body_ang_vel_file_ << "\n"; + + // Write SMPL joints if present + if (motion->GetNumSmplJoints() > 0 && smpl_joints_file_.is_open()) { + const auto* smpl_joints = motion->SmplJoints(frame_idx); + for (int b = 0; b < motion->GetNumSmplJoints(); ++b) { + for (int axis = 0; axis < 3; ++axis) { + smpl_joints_file_ << std::fixed << std::setprecision(9) << smpl_joints[b][axis]; + if (b + 1 < motion->GetNumSmplJoints() || axis + 1 < 3) smpl_joints_file_ << ","; + } + } + smpl_joints_file_ << "\n"; + } + + // Write SMPL poses if present + if (motion->GetNumSmplPoses() > 0 && smpl_poses_file_.is_open()) { + const auto* smpl_poses = motion->SmplPoses(frame_idx); + for (int p = 0; p < motion->GetNumSmplPoses(); ++p) { + for (int axis = 0; axis < 3; ++axis) { + smpl_poses_file_ << std::fixed << std::setprecision(9) << smpl_poses[p][axis]; + if (p + 1 < motion->GetNumSmplPoses() || axis + 1 < 3) smpl_poses_file_ << ","; + } + } + smpl_poses_file_ << "\n"; + } + + frames_written_++; + return true; + } catch (const std::exception& e) { + std::cerr << "[MotionRecorder] Failed to write frame: " << e.what() << std::endl; + return false; + } + } + + // Finalize recording - closes files and writes metadata + void Finalize() { + if (!active_) return; + + try { + // Close all open files + if (joint_pos_file_.is_open()) joint_pos_file_.close(); + if (joint_vel_file_.is_open()) joint_vel_file_.close(); + if (body_pos_file_.is_open()) body_pos_file_.close(); + if (body_quat_file_.is_open()) body_quat_file_.close(); + if (body_lin_vel_file_.is_open()) body_lin_vel_file_.close(); + if (body_ang_vel_file_.is_open()) body_ang_vel_file_.close(); + if (smpl_joints_file_.is_open()) smpl_joints_file_.close(); + if (smpl_poses_file_.is_open()) smpl_poses_file_.close(); + + // Write metadata file + std::ofstream meta(motion_dir_ + "/metadata.txt"); + if (meta.is_open()) { + meta << "Metadata for: " << motion_name_ << "\n"; + meta << std::string(30, '=') << "\n\n"; + meta << "Body part indexes:\n"; + meta << "[0]\n\n"; // Single body for ZMQ stream + meta << "Total timesteps: " << frames_written_ << "\n"; + meta.close(); + } + + std::cout << "[MotionRecorder] Recording saved: " << frames_written_ + << " frames at '" << motion_dir_ << "'" << std::endl; + } catch (const std::exception& e) { + std::cerr << "[MotionRecorder] Failed to finalize: " << e.what() << std::endl; + } + + active_ = false; + files_open_ = false; + frames_written_ = 0; + } + + bool IsActive() const { return active_; } + int GetFramesWritten() const { return frames_written_; } + +private: + bool OpenFiles(int num_joints, int num_bodies, int num_body_quaternions, + int num_smpl_joints, int num_smpl_poses) { + try { + // Open joint position file with header + joint_pos_file_.open(motion_dir_ + "/joint_pos.csv"); + if (!joint_pos_file_.is_open()) return false; + for (int j = 0; j < num_joints; ++j) { + joint_pos_file_ << "joint_" << j; + if (j + 1 < num_joints) joint_pos_file_ << ","; + } + joint_pos_file_ << "\n"; + + // Open joint velocity file with header + joint_vel_file_.open(motion_dir_ + "/joint_vel.csv"); + if (!joint_vel_file_.is_open()) return false; + for (int j = 0; j < num_joints; ++j) { + joint_vel_file_ << "joint_vel_" << j; + if (j + 1 < num_joints) joint_vel_file_ << ","; + } + joint_vel_file_ << "\n"; + + // Open body position file with header + body_pos_file_.open(motion_dir_ + "/body_pos.csv"); + if (!body_pos_file_.is_open()) return false; + for (int b = 0; b < num_bodies; ++b) { + body_pos_file_ << "body_" << b << "_x,body_" << b << "_y,body_" << b << "_z"; + if (b + 1 < num_bodies) body_pos_file_ << ","; + } + body_pos_file_ << "\n"; + + // Open body quaternion file with header + body_quat_file_.open(motion_dir_ + "/body_quat.csv"); + if (!body_quat_file_.is_open()) return false; + for (int b = 0; b < num_body_quaternions; ++b) { + body_quat_file_ << "body_" << b << "_w,body_" << b << "_x,body_" << b << "_y,body_" << b << "_z"; + if (b + 1 < num_body_quaternions) body_quat_file_ << ","; + } + body_quat_file_ << "\n"; + + // Open body linear velocity file with header + body_lin_vel_file_.open(motion_dir_ + "/body_lin_vel.csv"); + if (!body_lin_vel_file_.is_open()) return false; + for (int b = 0; b < num_bodies; ++b) { + body_lin_vel_file_ << "body_" << b << "_vel_x,body_" << b << "_vel_y,body_" << b << "_vel_z"; + if (b + 1 < num_bodies) body_lin_vel_file_ << ","; + } + body_lin_vel_file_ << "\n"; + + // Open body angular velocity file with header + body_ang_vel_file_.open(motion_dir_ + "/body_ang_vel.csv"); + if (!body_ang_vel_file_.is_open()) return false; + for (int b = 0; b < num_bodies; ++b) { + body_ang_vel_file_ << "body_" << b << "_angvel_x,body_" << b << "_angvel_y,body_" << b << "_angvel_z"; + if (b + 1 < num_bodies) body_ang_vel_file_ << ","; + } + body_ang_vel_file_ << "\n"; + + // Open SMPL joints file if present + if (num_smpl_joints > 0) { + smpl_joints_file_.open(motion_dir_ + "/smpl_joint.csv"); + if (smpl_joints_file_.is_open()) { + for (int b = 0; b < num_smpl_joints; ++b) { + smpl_joints_file_ << "smpl_joint_" << b << "_x,smpl_joint_" << b << "_y,smpl_joint_" << b << "_z"; + if (b + 1 < num_smpl_joints) smpl_joints_file_ << ","; + } + smpl_joints_file_ << "\n"; + } + } + + // Open SMPL poses file if present + if (num_smpl_poses > 0) { + smpl_poses_file_.open(motion_dir_ + "/smpl_pose.csv"); + if (smpl_poses_file_.is_open()) { + for (int p = 0; p < num_smpl_poses; ++p) { + smpl_poses_file_ << "smpl_pose_" << p << "_x,smpl_pose_" << p << "_y,smpl_pose_" << p << "_z"; + if (p + 1 < num_smpl_poses) smpl_poses_file_ << ","; + } + smpl_poses_file_ << "\n"; + } + } + + files_open_ = true; + return true; + } catch (const std::exception& e) { + std::cerr << "[MotionRecorder] Failed to open files: " << e.what() << std::endl; + return false; + } + } + + std::string base_dir_; + std::string motion_dir_; + std::string motion_name_; + bool active_; + bool files_open_ = false; + int frames_written_; + + std::ofstream joint_pos_file_; + std::ofstream joint_vel_file_; + std::ofstream body_pos_file_; + std::ofstream body_quat_file_; + std::ofstream body_lin_vel_file_; + std::ofstream body_ang_vel_file_; + std::ofstream smpl_joints_file_; + std::ofstream smpl_poses_file_; +}; + +/** + * @class MotionDataReader + * @brief Discovers and loads motion clips from a directory of CSV files. + * + * Each sub-directory under the base directory represents one motion and may + * contain: `joint_pos.csv`, `joint_vel.csv`, `body_pos.csv`, `body_quat.csv`, + * `body_lin_vel.csv`, `body_ang_vel.csv`, `smpl_joint.csv`, `smpl_pose.csv`, + * and `metadata.txt`. + */ +class MotionDataReader { + public: + std::vector> motions; ///< All loaded motion clips. + int current_motion_index_ = 0; ///< Index of the currently-selected motion. + + /// Load all motion sub-directories from @p base_directory. + /// @return True if at least one motion was loaded successfully. + bool ReadFromCSV(const std::string& base_directory) { + std::cout << "Reading motion data from CSV files in: " << base_directory << std::endl; + + // Auto-discover motion folders + std::vector motion_names; + try { + for (const auto& entry : std::filesystem::directory_iterator(base_directory)) { + if (entry.is_directory()) { + std::string folder_name = entry.path().filename().string(); + // Skip if it looks like a summary file or hidden folder + if (folder_name[0] != '.' && folder_name != "motion_summary.txt") { motion_names.push_back(folder_name); } + } + } + } catch (const std::exception& e) { + std::cerr << "Error reading directory: " << e.what() << std::endl; + return false; + } + + std::cout << "Found " << motion_names.size() << " motion folders" << std::endl; + + for (const auto& motion_name : motion_names) { + // Create motion as shared_ptr for proper ownership + auto motion = std::make_shared(); + + std::string motion_dir = base_directory + "/" + motion_name; + + // Read metadata first (contains body part indexes!) + if (!ReadMetadata(motion_dir + "/metadata.txt", *motion)) { + std::cout << "⚠ Warning: Could not read metadata for " << motion_name << std::endl; + } + + // Collect missing file warnings to decide later which ones to show + std::vector missing_warnings; + + // Read joint data (optional) + int num_frames = 0; + int num_joints_pos = 0; + int num_joints_vel = 0; + + // Read joint positions (optional) + if (std::filesystem::exists(motion_dir + "/joint_pos.csv")) { + int pos_frames = ReadCSV(motion_dir + "/joint_pos.csv", motion->joint_positions_); + if (pos_frames > 0) { + if (num_frames == 0) { + num_frames = pos_frames; + } else if (num_frames != pos_frames) { + std::cout << "✗ Error: Frame count mismatch in joint_pos.csv for " << motion_name << " (expected " << num_frames << ", got " << pos_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + num_joints_pos = motion->joint_positions_.size() / pos_frames; + } + } else { + missing_warnings.push_back("joint_pos.csv"); + } + + // Read joint velocities (optional) + if (std::filesystem::exists(motion_dir + "/joint_vel.csv")) { + int vel_frames = ReadCSV(motion_dir + "/joint_vel.csv", motion->joint_velocities_); + if (vel_frames > 0) { + if (num_frames == 0) { + num_frames = vel_frames; + } else if (num_frames != vel_frames) { + std::cout << "✗ Error: Frame count mismatch in joint_vel.csv for " << motion_name << " (expected " << num_frames << ", got " << vel_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + num_joints_vel = motion->joint_velocities_.size() / vel_frames; + } + } else { + missing_warnings.push_back("joint_vel.csv"); + } + + // Validate joint counts match if both are present + if (num_joints_pos > 0 && num_joints_vel > 0 && num_joints_pos != num_joints_vel) { + std::cout << "✗ Error: Number of joints inconsistent between joint_pos.csv (" << num_joints_pos << ") and joint_vel.csv (" << num_joints_vel << ") for " << motion_name << " - SKIPPING MOTION" << std::endl; + continue; + } + + // Use whichever joint count is available + int num_joints = (num_joints_pos > 0) ? num_joints_pos : num_joints_vel; + + // Read body data (optional) + int num_bodies = 0; + int num_body_quaternions = 0; + + if (num_frames == 0 && std::filesystem::exists(motion_dir + "/body_pos.csv")) { + num_frames = ReadCSV3D<3>(motion_dir + "/body_pos.csv", motion->body_positions_); + } else if (std::filesystem::exists(motion_dir + "/body_pos.csv")) { + int body_frames = ReadCSV3D<3>(motion_dir + "/body_pos.csv", motion->body_positions_); + if (num_frames != body_frames) { + std::cout << "✗ Error: Frame count mismatch in body_pos.csv for " << motion_name << " (expected " << num_frames << ", got " << body_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + } else { + missing_warnings.push_back("body_pos.csv"); + } + + if (num_frames > 0 && !motion->body_positions_.empty()) { + num_bodies = motion->body_positions_.size() / num_frames; + } + + if (std::filesystem::exists(motion_dir + "/body_quat.csv")) { + int quat_frames = ReadCSV3D<4>(motion_dir + "/body_quat.csv", motion->body_quaternions_); + if (num_frames == 0) { + num_frames = quat_frames; + } else if (num_frames != quat_frames) { + std::cout << "✗ Error: Frame count mismatch in body_quat.csv for " << motion_name << " (expected " << num_frames << ", got " << quat_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + if (num_frames > 0) { + num_body_quaternions = motion->body_quaternions_.size() / num_frames; + } + } else { + missing_warnings.push_back("body_quat.csv"); + } + + // Read body velocities (optional, must match body_pos count) + if (std::filesystem::exists(motion_dir + "/body_lin_vel.csv")) { + int vel_frames = ReadCSV3D<3>(motion_dir + "/body_lin_vel.csv", motion->body_lin_velocities_); + if (num_frames != vel_frames) { + std::cout << "✗ Error: Frame count mismatch in body_lin_vel.csv for " << motion_name << " (expected " << num_frames << ", got " << vel_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + if (motion->body_lin_velocities_.size() != num_frames * num_bodies) { + std::cout << "✗ Error: Body count mismatch between body_pos.csv and body_lin_vel.csv for " << motion_name << " - SKIPPING MOTION" << std::endl; + continue; + } + } else { + missing_warnings.push_back("body_lin_vel.csv"); + } + + if (std::filesystem::exists(motion_dir + "/body_ang_vel.csv")) { + int ang_vel_frames = ReadCSV3D<3>(motion_dir + "/body_ang_vel.csv", motion->body_ang_velocities_); + if (num_frames != ang_vel_frames) { + std::cout << "✗ Error: Frame count mismatch in body_ang_vel.csv for " << motion_name << " (expected " << num_frames << ", got " << ang_vel_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } + if (motion->body_ang_velocities_.size() != num_frames * num_bodies) { + std::cout << "✗ Error: Body count mismatch between body_pos.csv and body_ang_vel.csv for " << motion_name << " - SKIPPING MOTION" << std::endl; + continue; + } + } else { + missing_warnings.push_back("body_ang_vel.csv"); + } + + // Read SMPL data (optional) + int num_smpl_joints = 0; + int num_smpl_poses = 0; + + if (std::filesystem::exists(motion_dir + "/smpl_joint.csv")) { + int smpl_frames = ReadCSV3D<3>(motion_dir + "/smpl_joint.csv", motion->smpl_joints_); + if (num_frames > 0 && num_frames != smpl_frames) { + std::cout << "✗ Error: Frame count mismatch in smpl_joint.csv for " << motion_name << " (expected " << num_frames << ", got " << smpl_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } else if (num_frames == 0) { + num_frames = smpl_frames; + } + if (smpl_frames > 0) { + num_smpl_joints = motion->smpl_joints_.size() / smpl_frames; + } + } else { + missing_warnings.push_back("smpl_joint.csv"); + } + + if (std::filesystem::exists(motion_dir + "/smpl_pose.csv")) { + int smpl_pose_frames = ReadCSV3D<3>(motion_dir + "/smpl_pose.csv", motion->smpl_poses_); + if (num_frames > 0 && num_frames != smpl_pose_frames) { + std::cout << "✗ Error: Frame count mismatch in smpl_pose.csv for " << motion_name << " (expected " << num_frames << ", got " << smpl_pose_frames << ") - SKIPPING MOTION" << std::endl; + continue; + } else if (num_frames == 0) { + num_frames = smpl_pose_frames; + } + if (smpl_pose_frames > 0) { + num_smpl_poses = motion->smpl_poses_.size() / smpl_pose_frames; + } + } else { + missing_warnings.push_back("smpl_pose.csv"); + } + + // Must have at least some data to be valid + if (num_frames == 0) { + std::cout << "✗ Error: No valid data found for " << motion_name << " - SKIPPING MOTION" << std::endl; + continue; + } + + // Decide which missing file warnings to show based on what data we have + bool has_robot_data = (num_joints > 0 || num_bodies > 0 || num_body_quaternions > 0); + bool has_smpl_data = (num_smpl_joints > 0 || num_smpl_poses > 0); + + // Show relevant warnings only for the type of data we have + for (const auto& missing_file : missing_warnings) { + bool is_smpl_file = (missing_file == "smpl_joint.csv" || missing_file == "smpl_pose.csv"); + bool is_robot_file = !is_smpl_file; + + // Show warning if it's relevant to the data type we have: + // - Robot file warning only if we have robot data + // - SMPL file warning only if we have SMPL data + bool should_warn = (is_robot_file && has_robot_data) || (is_smpl_file && has_smpl_data); + + if (should_warn) { + std::cout << "⚠ Warning: Missing " << missing_file << " for " << motion_name << std::endl; + } + } + + motion->name = motion_name; + motion->timesteps = num_frames; + motion->num_joints = num_joints; + motion->num_bodies = num_bodies; + motion->num_body_quaternions = num_body_quaternions; + motion->num_smpl_joints = num_smpl_joints; + motion->num_smpl_poses = num_smpl_poses; + + motion->positions_world_tmp.resize(num_joints + 1); + motion->rotations_world_tmp.resize(num_joints + 1); + motion->pos_filter_tmp.resize(num_frames); + motion->ang_filter_tmp.resize(num_frames); + + std::cout << "✓ Loaded " << motion_name << " (" << motion->timesteps << " timesteps)" << std::endl; + motions.push_back(motion); + } + + return !motions.empty(); + } + + void PrintSummary() const { + std::cout << "\n=== MOTION DATA SUMMARY ===" << std::endl; + std::cout << "Total motions loaded: " << motions.size() << std::endl; + + std::cout << "\nMotion list:" << std::endl; + for (const auto& motion : motions) { + motion->print_summary(); + std::cout << std::endl; + } + } + + // Get a specific motion by name (returns shared_ptr for thread-safe shared ownership) + std::shared_ptr GetMotion(const std::string& name) const { + for (const auto& motion : motions) { + if (motion->name == name) { return motion; } + } + return nullptr; + } + + // Get motion by index (returns shared_ptr for thread-safe shared ownership) + std::shared_ptr GetMotion(size_t index) const { + if (index < motions.size()) { return motions[index]; } + return nullptr; + } + + // Alias for GetMotion - kept for backward compatibility + std::shared_ptr GetMotionShared(size_t index) const { + return GetMotion(index); + } + private: + // Read metadata.txt to get body part indexes and other info + bool ReadMetadata(const std::string& filename, MotionSequence& motion) { + std::ifstream file(filename); + if (!file.is_open()) { return false; } + + std::string line; + while (std::getline(file, line)) { + if (line.find("Body part indexes:") != std::string::npos) { + // Next line should contain the indexes + if (std::getline(file, line)) { + // Parse array like: [ 0 4 10 18 5 11 19 9 16 22 28 17 23 29] + std::regex number_regex("\\d+"); + std::sregex_iterator iter(line.begin(), line.end(), number_regex); + std::sregex_iterator end; + + motion.body_part_indexes.clear(); + for (; iter != end; ++iter) { motion.body_part_indexes.push_back(std::stoi(iter->str())); } + } + } else if (line.find("Total timesteps:") != std::string::npos) { + std::stringstream ss(line); + std::string temp; + ss >> temp >> temp >> motion.timesteps; + } + } + + return !motion.body_part_indexes.empty(); + } + + // Read 2D CSV data (joint positions, velocities) - using double precision + int ReadCSV(const std::string& filename, std::vector& data) { + std::ifstream file(filename); + if (!file.is_open()) { return false; } + + std::string line; + int line_number = 0; + + while (std::getline(file, line)) { + if (line_number == 0) { + line_number++; + continue; // Skip header + } + + std::stringstream ss(line); + std::string cell; + + while (std::getline(ss, cell, ',')) { + try { + double value = std::stod(cell); // Use stod for double precision + data.push_back(value); + } catch (...) { + // Skip invalid values + } + } + + line_number++; + } + + return line_number - 1; + } + + // Read 3D CSV data (body positions, quaternions, velocities) - using double precision + // CSV is flattened, need to reshape to [timestep][body_id][coordinates] + template + int ReadCSV3D(const std::string& filename, std::vector>& data) { + std::vector flat_data; + int num_lines = ReadCSV(filename, flat_data); + if (num_lines == 0) { return 0; } + + int line_size = flat_data.size() / num_lines; + if(line_size * num_lines != flat_data.size()) { + std::cout << "⚠ Warning: Inconsistent line sizes in " << filename << std::endl; + return 0; + } + + int elements_per_line = line_size / coords_per_body; + if(elements_per_line * coords_per_body != line_size) { + std::cout << "⚠ Warning: Unexpected element count per line in " << filename << std::endl; + return 0; + } + + data.clear(); + std::array body_coords; + for(int line=0; line < num_lines; line++) { + for(int element=0; element < elements_per_line; element++) { + for (int coord = 0; coord < coords_per_body; coord++) { + body_coords[coord] = flat_data[line * line_size + element * coords_per_body + coord]; + } + data.push_back(body_coords); + } + } + + return num_lines; + } +}; + +#endif // MOTION_DATA_READER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/observation_config.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/observation_config.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4b355ee1d9a5954ef5b3937a460d8f1ee04aeb8b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/observation_config.hpp @@ -0,0 +1,522 @@ +/** + * @file observation_config.hpp + * @brief YAML-driven observation and encoder configuration for the G1 policy. + * + * This header provides data structures and a simple parser for the + * `observation_config.yaml` file that controls which sensor / state + * observations are fed to the RL policy and (optionally) the encoder. + * + * ## Config File Format (simplified YAML) + * + * ```yaml + * observations: + * - name: "motion_joint_positions" + * enabled: true + * - name: "token_state" + * enabled: true + * + * encoder: + * dimension: 64 + * use_fp16: false + * encoder_observations: + * - name: "body_joint_positions" + * enabled: true + * encoder_modes: + * - name: "g1" + * mode_id: 0 + * required_observations: + * - body_joint_positions + * - body_joint_velocities + * ``` + * + * ## Key Types + * + * - ObservationConfig – name + enabled flag for one observation. + * - EncoderModeConfig – per-mode observation requirements. + * - EncoderConfig – dimension, FP16 flag, observation list, mode list. + * - FullObservationConfig – bundles observations + encoder config. + * - ObservationConfigParser – static parser with default fallback. + */ + +#ifndef OBSERVATION_CONFIG_HPP +#define OBSERVATION_CONFIG_HPP + +#include +#include +#include +#include +#include + +/** + * @brief Configuration for a single observation type (name + enabled flag). + */ +struct ObservationConfig { + std::string name; ///< Name identifier for the observation type + bool enabled; ///< Whether this observation is active in the pipeline + + /** + * @brief Constructs an observation configuration + * @param n Name of the observation type + * @param e Whether this observation should be enabled + */ + ObservationConfig(const std::string& n, bool e) : name(n), enabled(e) {} +}; + +/** + * @brief Configuration for a specific encoder mode + * + * Each mode defines which observations it actually needs. + * Observations not in this list will be zero-filled for this mode. + */ +struct EncoderModeConfig { + std::string name; ///< Name of the mode (e.g., "g1", "teleop") + int mode_id; ///< Numeric mode ID (matches encoder_mode value) + std::vector required_observations; ///< Observations needed for this mode + + EncoderModeConfig() : mode_id(-1) {} + EncoderModeConfig(const std::string& n, int id) : name(n), mode_id(id) {} +}; + +/** + * @brief Configuration structure for the encoder (tokenizer) + * + * This structure defines encoder settings from observation config. + * The encoder model path is passed as a command-line argument. + */ +struct EncoderConfig { + int dimension = 0; ///< Token dimension (0 = no encoder) + bool use_fp16 = false; ///< Use FP16 precision for TensorRT + std::vector encoder_observations; ///< All possible observations (superset) + std::vector encoder_modes; ///< Mode-specific observation requirements +}; + +/** + * @brief Combined configuration containing observations and optional encoder + */ +struct FullObservationConfig { + std::vector observations; + EncoderConfig encoder; +}; + +/** + * @brief Simple YAML parser specifically designed for observation configuration files + * + * This class provides static methods to parse YAML configuration files that define + * which robot observations should be enabled or disabled. It supports a simple YAML + * format with fallback to default configurations when files are missing or invalid. + * + * Expected YAML format: + * observations: + * - name: "observation_type" + * enabled: true/false + */ +class ObservationConfigParser { +public: + /** + * @brief Parses full configuration including observations and encoder from a YAML file + * + * @param config_path Path to the YAML configuration file + * @return FullObservationConfig containing observations and encoder configuration + * + * This method parses both the observations section and optional encoder section. + */ + static FullObservationConfig ParseFullConfig(const std::string& config_path) { + FullObservationConfig full_config; + std::ifstream file(config_path); + + if (!file.is_open()) { + std::cout << "Warning: Could not open observation config file: " << config_path << std::endl; + std::cout << "Using default observation configuration." << std::endl; + full_config.observations = GetDefaultConfig(); + return full_config; + } + + std::cout << "Parsing observation config file: " << config_path << std::endl; + std::string line; + bool in_observations_section = false; + bool in_encoder_section = false; + bool in_encoder_observations_section = false; + bool in_encoder_modes_section = false; + bool in_mode_observations_section = false; + int line_number = 0; + EncoderModeConfig current_mode; + + while (std::getline(file, line)) { + line_number++; + + // Trim leading whitespace + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space == std::string::npos) { + line = ""; + } else { + line = line.substr(first_non_space); + } + + // Skip empty lines and comments + if (line.empty() || line[0] == '#') continue; + + // Check for main sections (must check before parsing items) + if (line.find("encoder:") == 0 || line == "encoder:") { + in_observations_section = false; + in_encoder_section = true; + in_encoder_observations_section = false; + std::cout << "Found encoder section at line " << line_number << std::endl; + continue; + } + + if (line.find("observations:") == 0 || line == "observations:") { + in_observations_section = true; + in_encoder_section = false; + in_encoder_observations_section = false; + std::cout << "Found observations section at line " << line_number << std::endl; + continue; + } + + // Parse observations section (stop if we see any top-level section marker) + if (in_observations_section && line.find("- name:") != std::string::npos) { + std::string name = ExtractValue(line, "name:"); + if (std::getline(file, line)) { + line_number++; + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space != std::string::npos) { + line = line.substr(first_non_space); + } + bool enabled = ExtractBoolValue(line, "enabled:"); + if (!name.empty()) { + full_config.observations.emplace_back(name, enabled); + std::cout << " Parsed observation: " << name << " -> " << (enabled ? "enabled" : "disabled") << std::endl; + } + } + } + + // Parse encoder section parameters (key-value format, no dashes) + if (in_encoder_section && !in_encoder_observations_section && !in_encoder_modes_section) { + if (line.find("dimension:") != std::string::npos) { + std::string dim_str = ExtractValue(line, "dimension:"); + try { + full_config.encoder.dimension = std::stoi(dim_str); + std::cout << " Encoder dimension: " << full_config.encoder.dimension << std::endl; + } catch (...) {} + } + else if (line.find("use_fp16:") != std::string::npos) { + full_config.encoder.use_fp16 = ExtractBoolValue(line, "use_fp16:"); + std::cout << " Encoder use_fp16: " << (full_config.encoder.use_fp16 ? "true" : "false") << std::endl; + } + else if (line.find("encoder_observations:") != std::string::npos) { + in_encoder_observations_section = true; + in_encoder_modes_section = false; + std::cout << " Found encoder_observations subsection" << std::endl; + } + else if (line.find("encoder_modes:") != std::string::npos) { + in_encoder_modes_section = true; + in_encoder_observations_section = false; + std::cout << " Found encoder_modes subsection" << std::endl; + } + } + + // Also check for encoder_modes at the same indentation level (after encoder_observations) + if (in_encoder_section && in_encoder_observations_section && line.find("encoder_modes:") != std::string::npos) { + in_encoder_modes_section = true; + in_encoder_observations_section = false; + std::cout << " Found encoder_modes subsection (after encoder_observations)" << std::endl; + } + + // Parse encoder_observations subsection + if (in_encoder_observations_section && line.find("- name:") != std::string::npos) { + std::string name = ExtractValue(line, "name:"); + if (std::getline(file, line)) { + line_number++; + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space != std::string::npos) { + line = line.substr(first_non_space); + } + bool enabled = ExtractBoolValue(line, "enabled:"); + if (!name.empty()) { + full_config.encoder.encoder_observations.emplace_back(name, enabled); + std::cout << " Encoder obs: " << name << " -> " << (enabled ? "enabled" : "disabled") << std::endl; + } + } + } + + // Parse encoder_modes subsection + if (in_encoder_modes_section) { + // Start of a new mode + if (line.find("- name:") != std::string::npos) { + // Save previous mode if it exists + if (!current_mode.name.empty()) { + full_config.encoder.encoder_modes.push_back(current_mode); + std::cout << " Saved mode '" << current_mode.name << "' with " << current_mode.required_observations.size() << " observations" << std::endl; + } + // Start new mode + current_mode = EncoderModeConfig(); + current_mode.name = ExtractValue(line, "name:"); + in_mode_observations_section = false; + std::cout << " Found mode: " << current_mode.name << std::endl; + } + else if (line.find("mode_id:") != std::string::npos) { + std::string id_str = ExtractValue(line, "mode_id:"); + try { + current_mode.mode_id = std::stoi(id_str); + std::cout << " Mode ID: " << current_mode.mode_id << std::endl; + } catch (...) { + std::cerr << " Warning: Invalid mode_id value: " << id_str << std::endl; + } + } + else if (line.find("required_observations:") != std::string::npos) { + in_mode_observations_section = true; + std::cout << " Found required_observations for mode " << current_mode.name << std::endl; + } + else if (in_mode_observations_section && line.find("- ") == 0) { + // Parse observation list item + std::string obs_name = line.substr(2); // Skip "- " + // Remove quotes and commas + obs_name.erase(std::remove(obs_name.begin(), obs_name.end(), '"'), obs_name.end()); + obs_name.erase(std::remove(obs_name.begin(), obs_name.end(), ','), obs_name.end()); + // Trim whitespace + size_t first = obs_name.find_first_not_of(" \t"); + size_t last = obs_name.find_last_not_of(" \t"); + if (first != std::string::npos && last != std::string::npos) { + obs_name = obs_name.substr(first, last - first + 1); + } + if (!obs_name.empty()) { + current_mode.required_observations.push_back(obs_name); + std::cout << " - " << obs_name << std::endl; + } + } + } + } + + // Save last mode if parsing encoder_modes + if (in_encoder_modes_section && !current_mode.name.empty()) { + full_config.encoder.encoder_modes.push_back(current_mode); + std::cout << " Saved mode '" << current_mode.name << "' with " << current_mode.required_observations.size() << " observations" << std::endl; + } + + if (full_config.observations.empty()) { + std::cout << "Warning: No valid observation configuration found. Using defaults." << std::endl; + full_config.observations = GetDefaultConfig(); + } + + // ======================================================================== + // Validation: Check encoder section when token_state observation is used + // ======================================================================== + // Logic: + // 1. If token_state is enabled -> encoder section should exist (dimension > 0) + // 2. If token_state is disabled -> encoder section is ignored + // Note: model_path is now a command-line argument, not in config + // ======================================================================== + bool has_token_state = false; + for (const auto& obs : full_config.observations) { + if (obs.name == "token_state" && obs.enabled) { + has_token_state = true; + break; + } + } + + if (has_token_state) { + // token_state enabled: encoder section should exist with dimension + if (full_config.encoder.dimension <= 0) { + std::cerr << "✗ Error: 'token_state' observation is enabled but encoder section is missing or has invalid dimension!" << std::endl; + std::cerr << " Please add an 'encoder:' section in the config with 'dimension'" << std::endl; + std::cerr << " Or disable 'token_state' observation if you don't need it." << std::endl; + // Return empty config to signal error + full_config.observations.clear(); + return full_config; + } + std::cout << "✓ Token state observation validated with encoder configuration" << std::endl; + } else { + // token_state disabled: encoder section is IGNORED + if (full_config.encoder.dimension > 0) { + std::cout << "Note: Encoder section found but 'token_state' observation is not enabled - encoder will be ignored" << std::endl; + full_config.encoder = EncoderConfig(); // Reset to empty + } + } + + std::cout << "Successfully parsed " << full_config.observations.size() << " observations" << std::endl; + if (full_config.encoder.dimension > 0) { + std::cout << "Encoder config found with " << full_config.encoder.encoder_observations.size() << " input observations" << std::endl; + } + + return full_config; + } + + /** + * @brief Parses observation configuration from a YAML file (backward compatibility) + * + * @param config_path Path to the YAML configuration file + * @return Vector of ObservationConfig objects representing the parsed configuration + * + * This method attempts to parse the specified YAML file and extract observation + * configurations. If the file cannot be opened or contains no valid configurations, + * it falls back to a set of default configurations. + */ + static std::vector ParseConfig(const std::string& config_path) { + std::vector configs; + std::ifstream file(config_path); + + // Handle file opening errors gracefully by falling back to defaults + if (!file.is_open()) { + std::cout << "Warning: Could not open observation config file: " << config_path << std::endl; + std::cout << "Using default observation configuration." << std::endl; + return GetDefaultConfig(); + } + + std::cout << "Parsing observation config file: " << config_path << std::endl; + std::string line; + bool in_observations_section = false; // Track whether we're inside the observations: section + int line_number = 0; + + // Parse the file line by line using a simple state machine + while (std::getline(file, line)) { + line_number++; + + // Trim leading whitespace from the line + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space == std::string::npos) { + line = ""; // Line contains only whitespace + } else { + line = line.substr(first_non_space); + } + + // Skip empty lines and comments + if (line.empty() || line[0] == '#') continue; + + // Look for the main "observations:" section header + if (line.find("observations:") != std::string::npos) { + in_observations_section = true; + std::cout << "Found observations section at line " << line_number << std::endl; + continue; + } + + // Parse individual observation entries within the observations section + if (in_observations_section && line.find("- name:") != std::string::npos) { + // Extract the observation name from current line + std::string name = ExtractValue(line, "name:"); + + // Read the next line which should contain the enabled status + if (std::getline(file, line)) { + line_number++; + // Trim whitespace from the enabled line + size_t first_non_space = line.find_first_not_of(" \t"); + if (first_non_space == std::string::npos) { + line = ""; // Line contains only whitespace + } else { + line = line.substr(first_non_space); + } + bool enabled = ExtractBoolValue(line, "enabled:"); + + // Store the parsed configuration if we got a valid name + if (!name.empty()) { + configs.emplace_back(name, enabled); + std::cout << " Parsed: " << name << " -> " << (enabled ? "enabled" : "disabled") << std::endl; + } + } + } + } + + // Fall back to defaults if no configurations were successfully parsed + if (configs.empty()) { + std::cout << "Warning: No valid observation configuration found in file. Using defaults." << std::endl; + return GetDefaultConfig(); + } + + std::cout << "Successfully parsed " << configs.size() << " observation configurations" << std::endl; + return configs; + } + + /** + * @brief Returns the default observation configuration + * + * @return Vector of default ObservationConfig objects + * + * This overloaded method provides a convenient way to get default configurations + * without needing to specify a file path. Useful for testing or when no custom + * configuration is needed. + */ + static std::vector ParseConfig() { + return GetDefaultConfig(); + } + +private: + /** + * @brief Extracts a string value from a YAML line after a specified key + * + * @param line The YAML line to parse + * @param key The key to search for (e.g., "name:") + * @return The extracted value with quotes and whitespace removed + * + * This helper method finds the specified key in a line and extracts the value + * that follows it. It automatically removes surrounding quotes and whitespace + * to return a clean string value. + */ + static std::string ExtractValue(const std::string& line, const std::string& key) { + size_t pos = line.find(key); + if (pos == std::string::npos) return ""; // Key not found + + // Move position to after the key + pos += key.length(); + std::string value = line.substr(pos); + + // Remove quotes and trim whitespace from both ends + size_t first_non_space = value.find_first_not_of(" \t\""); + if (first_non_space == std::string::npos) { + return ""; // Value contains only whitespace/quotes + } + value = value.substr(first_non_space); + + size_t last_non_space = value.find_last_not_of(" \t\""); + if (last_non_space != std::string::npos) { + value = value.substr(0, last_non_space + 1); + } + + return value; + } + + /** + * @brief Extracts a boolean value from a YAML line after a specified key + * + * @param line The YAML line to parse + * @param key The key to search for (e.g., "enabled:") + * @return True if the value is "true", false otherwise + * + * This helper method extracts a boolean value by first getting the string value + * and then comparing it to "true". Any other value (including "false", empty strings, + * or missing values) will return false. + */ + static bool ExtractBoolValue(const std::string& line, const std::string& key) { + std::string value = ExtractValue(line, key); + return value == "true"; // Only "true" string evaluates to true + } + + /** + * @brief Provides a hardcoded set of default observation configurations + * + * @return Vector of default ObservationConfig objects for typical robot operations + * + * This method returns a predefined set of observation configurations that are + * commonly used for robot control and monitoring. It includes joint positions, + * velocities, orientations, and action history - all enabled by default. + * Used as a fallback when configuration files are missing or invalid. + */ + static std::vector GetDefaultConfig() { + std::cout << "Loading default observation configuration (single frame):" << std::endl; + std::vector default_configs = { + {"motion_joint_positions", true}, ///< Joint position data for motion planning + {"motion_joint_velocities", true}, ///< Joint velocity data for motion control + {"motion_anchor_orientation", true}, ///< Base orientation for spatial awareness + {"base_angular_velocity", true}, ///< Angular velocity of the robot base + {"body_joint_positions", true}, ///< Body joint positions for posture control + {"body_joint_velocities", true}, ///< Body joint velocities for dynamic control + {"last_actions", true} ///< History of recent actions for temporal context + }; + + // Log the default configuration being loaded + for (const auto& config : default_configs) { + std::cout << " Default: " << config.name << " -> " << (config.enabled ? "enabled" : "disabled") << std::endl; + } + + return default_configs; + } +}; + +#endif // OBSERVATION_CONFIG_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/ort_session.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/ort_session.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c54320e1134a8dd1fb9b8f4de9481c09fe4a2d36 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/ort_session.hpp @@ -0,0 +1,204 @@ +/** + * @file ort_session.hpp + * @deprecated This file is NOT used in the current build. It is only included + * by localmotion_kplanner_onnx.hpp, which is itself unused. + * Both files are kept for reference only. + * + * @brief Lightweight wrapper around an ONNX Runtime inference session. + * + * OrtSession loads an ONNX model file, auto-discovers all input / output + * tensor names and shapes at construction time, and exposes a simple `Run()` + * method for synchronous CPU inference. + */ + +#ifndef ORT_SESSION_HPP +#define ORT_SESSION_HPP + +#include +#include +#include +#include + +/** + * @class OrtSession + * @brief Thin RAII wrapper around `Ort::Session` with auto-discovered metadata. + * + * On construction, iterates over every model input and output to record + * names, shapes, and element types. Provides two `Run()` overloads: + * - One that returns `std::vector` (allocating new outputs). + * - One that writes into pre-allocated output tensors (in-place). + */ +class OrtSession { +public: + /** + * @brief Constructs an OrtSession and initializes the ONNX Runtime session + * + * @param model_path Path to the ONNX model file + * @param env Reference to the ONNX Runtime environment + * @param allocator Reference to the ONNX Runtime allocator for memory management + * + * This constructor: + * 1. Creates an ONNX Runtime session with optimized settings + * 2. Queries and stores input/output metadata from the model + * 3. Prepares internal data structures for efficient inference + */ + OrtSession(std::string model_path, Ort::Env &env, Ort::AllocatorWithDefaultOptions &allocator) : + m_session(env, model_path.c_str(), Ort::SessionOptions {nullptr}), + m_model_path(model_path) + { + // Configure session options for optimal performance + Ort::SessionOptions session_options; + session_options.SetIntraOpNumThreads(1); // Use single thread for intra-op parallelism + session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED); // Enable extended optimizations + + // Discover and catalog all input nodes from the ONNX model + size_t num_input_nodes = m_session.GetInputCount(); + std::cout << "Model has " << num_input_nodes << " inputs:" << std::endl; + for (size_t i = 0; i < num_input_nodes; i++) + { + // Retrieve the input node name + auto input_name = m_session.GetInputNameAllocated(i, allocator); + std::string name_str(input_name.get()); + + // Extract tensor type and shape information + auto input_type_info = m_session.GetInputTypeInfo(i); + auto tensor_info = input_type_info.GetTensorTypeAndShapeInfo(); + auto shape = tensor_info.GetShape(); + + // Store input dimensions for runtime tensor creation + m_input_node_dims.push_back(shape); + + std::cout << " Input " << i << ": " << name_str << " - Shape: ["; + for (size_t j = 0; j < shape.size(); j++) + { + if (shape[j] == -1) + { + std::cout << "dynamic"; + } + else + { + std::cout << shape[j]; + } + if (j < shape.size() - 1) std::cout << ", "; + } + std::cout << "] - Type: " << tensor_info.GetElementType() << std::endl; + + // Store input node name for later reference + m_input_node_names_str.push_back(name_str); + } + + // Discover and catalog all output nodes from the ONNX model + size_t num_output_nodes = m_session.GetOutputCount(); + std::cout << "Model has " << num_output_nodes << " outputs:" << std::endl; + for (size_t i = 0; i < num_output_nodes; i++) + { + // Retrieve the output node name + auto output_name = m_session.GetOutputNameAllocated(i, allocator); + std::string name_str(output_name.get()); + + // Extract tensor type and shape information + auto output_type_info = m_session.GetOutputTypeInfo(i); + auto tensor_info = output_type_info.GetTensorTypeAndShapeInfo(); + auto shape = tensor_info.GetShape(); + m_output_node_dims.push_back(shape); + + std::cout << " Output " << i << ": " << name_str << " - Shape: ["; + for (size_t j = 0; j < shape.size(); j++) + { + if (shape[j] == -1) + { + std::cout << "dynamic"; + } + else + { + std::cout << shape[j]; + } + if (j < shape.size() - 1) std::cout << ", "; + } + std::cout << "] - Type: " << tensor_info.GetElementType() << std::endl; + + // Store output node name for later reference + m_output_node_names_str.push_back(name_str); + } + + // Convert string vectors to const char* vectors required by ONNX Runtime API + // This is necessary because ONNX Runtime expects null-terminated C-style strings + for (const auto& name : m_input_node_names_str) { m_input_node_names.push_back(name.c_str()); } + for (const auto& name : m_output_node_names_str) { m_output_node_names.push_back(name.c_str()); } + + } + + /** + * @brief Executes inference on the loaded ONNX model + * + * @param input_tensors Vector of input tensors containing the data to process + * @return Vector of output tensors containing the inference results + * + * This method performs a single inference pass through the model using the provided + * input tensors. The input tensors must match the model's expected input specification + * in terms of count, names, shapes, and data types. + */ + std::vector Run(const std::vector &input_tensors) + { + return m_session.Run(Ort::RunOptions {nullptr}, m_input_node_names.data(), input_tensors.data(), + input_tensors.size(), m_output_node_names.data(), m_output_node_names.size()); + } + + + void Run(const std::vector &input_tensors, std::vector &output_tensors) + { + m_session.Run( + Ort::RunOptions {nullptr}, + m_input_node_names.data(), + input_tensors.data(), + input_tensors.size(), + m_output_node_names.data(), + output_tensors.data(), + output_tensors.size() + ); + } + + /** + * @brief Gets the input node dimensions discovered from the model + * + * @return Const reference to vector containing shape information for each input node + * + * Each element in the returned vector corresponds to one input node and contains + * the shape dimensions as int64_t values. Dynamic dimensions are represented as -1. + */ + const std::vector> &get_input_node_dims() const { + return m_input_node_dims; + } + + const std::vector> &get_output_node_dims() const { + return m_output_node_dims; + } + + const std::vector &get_input_node_names_str() const { + return m_input_node_names_str; + } + +private: + // Core ONNX Runtime session object that manages the loaded model + Ort::Session m_session; + + // Storage for input and output node names as std::string objects + std::vector m_input_node_names_str; ///< Input node names stored as strings + std::vector m_output_node_names_str; ///< Output node names stored as strings + + // C-style string pointers required by ONNX Runtime API (point into above string vectors) + std::vector m_input_node_names; ///< Input node names as C-style strings for runtime + std::vector m_output_node_names; ///< Output node names as C-style strings for runtime + + // Shape information for input tensors, indexed by input node + std::vector> m_input_node_dims; ///< Dimensions for each input node (-1 for dynamic dims) + std::vector> m_output_node_dims; ///< Dimensions for each output node (-1 for dynamic dims) + + // Buffer for observation data (currently unused in this implementation) + std::vector m_obs_buffer; ///< Reserved buffer for observation processing + + // Path to the loaded model file for reference + std::string m_model_path; ///< File path of the loaded ONNX model +}; + +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/output_interface.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/output_interface.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8be85bfd80ec87a1238d2cefd5a9c67d68d0f901 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/output_interface.hpp @@ -0,0 +1,296 @@ +/** + * @file output_interface.hpp + * @brief Abstract base class for all output / publishing handlers. + * + * OutputInterface defines the polymorphic contract for publishing robot state + * and target data to external consumers (visualisation tools, logging systems, + * Python training scripts, etc.). + * + * Concrete implementations: + * - ZMQOutputHandler – publishes a msgpack-serialised state map over ZMQ PUB. + * - ROS2OutputHandler – publishes state and configuration over ROS 2 topics. + * + * ## Data Flow + * + * The control loop calls `publish()` once per tick on each registered output + * interface. The base class provides a shared helper `create_output_data_map()` + * that: + * 1. Reads the latest entry from the StateLogger. + * 2. Computes **target** joint positions and body pose (base_trans_target, + * base_quat_target, body_q_target) from the current motion frame, applying + * heading corrections. + * 3. Copies **measured** joint positions and body orientation from the robot + * state. + * 4. Rotates VR 3-point positions into the target body frame. + * 5. Packs everything into a `std::map>` and + * serialises it with msgpack into `output_data_sbuf_`. + * + * Sub-classes then transmit `output_data_sbuf_` over their respective + * transport (ZMQ, ROS 2, file, etc.). + * + * ## Thread Safety + * + * `publish()` is called from the control thread. Implementations should not + * block for extended periods to avoid jitter in the control loop. + */ + +#ifndef OUTPUT_INTERFACE_HPP +#define OUTPUT_INTERFACE_HPP + +#include +#include +#include +#include + +#include "../state_logger.hpp" +#include "../motion_data_reader.hpp" + +/** + * @class OutputInterface + * @brief Abstract base class for publishing robot state / target data. + * + * Owns a reference to the StateLogger and provides `create_output_data_map()` + * for sub-classes to build the canonical output payload. + */ +class OutputInterface { +public: + /// Identifies the concrete output transport. + enum class OutputType { + ROS2, ///< ROS 2 DDS topics. + NETWORK, ///< Generic network (reserved). + FILE, ///< File-based logging (reserved). + ZMQ, ///< ZeroMQ PUB socket. + UNKNOWN ///< Default / uninitialised. + }; + + /// Virtual destructor for correct polymorphic cleanup. + virtual ~OutputInterface() = default; + + /** + * @brief Publish the current robot state and target data. + * + * Called once per control-loop tick for each registered output interface. + * + * @param vr_3point_position VR 3-point positions [left_wrist, right_wrist, head] × xyz. + * @param vr_3point_orientation VR 3-point orientations [left, right, head] × quaternion wxyz. + * @param vr_3point_compliance VR compliance values [left_arm, right_arm, head]. + * @param left_hand_joint Left-hand Dex3 joint positions (7 DOF). + * @param right_hand_joint Right-hand Dex3 joint positions (7 DOF). + * @param init_ref_data_root_rot_array Initial reference-data root rotation (quaternion wxyz). + * @param heading_state_buffer Thread-safe heading buffer (init quat + delta heading). + * @param current_motion Currently-active MotionSequence. + * @param current_frame Playback cursor within current_motion. + */ + virtual void publish( + const std::array& vr_3point_position, + const std::array& vr_3point_orientation, + const std::array& vr_3point_compliance, + const std::array& left_hand_joint, + const std::array& right_hand_joint, + const std::array& init_ref_data_root_rot_array, + DataBuffer& heading_state_buffer, + std::shared_ptr current_motion, + int current_frame + ) = 0; + + /// @return The OutputType tag for this concrete implementation. + virtual OutputType GetType() const { + return type_; + } + + /** + * @brief Publish (or re-publish) the robot configuration. + * + * Called during init and periodically so that late-joining subscribers + * always receive the config (ZMQ PUB has no persistence; ROS 2 uses + * transient_local QoS). The default implementation is a no-op. + */ + virtual void publish_config() {} + +protected: + + /** + * @brief Build the canonical output payload from state + motion data. + * + * Populates `output_data_map_` with the following keys and serialises the + * result into `output_data_sbuf_` via msgpack: + * + * Key | Size | Description + * -----------------------|------|------------ + * base_trans_target | 3 | Target base translation (heading-corrected). + * base_quat_target | 4 | Target base quaternion (heading-corrected). + * body_q_target | 29 | Target joint positions (MuJoCo order). + * base_trans_measured | 3 | Measured base translation (fixed default). + * base_quat_measured | 4 | Measured base quaternion from IMU. + * body_q_measured | 29 | Measured joint positions (MuJoCo order + default offsets). + * left_hand_q_measured | 7 | Left-hand Dex3 joint positions. + * right_hand_q_measured | 7 | Right-hand Dex3 joint positions. + * vr_3point_position | 9 | VR positions rotated into target body frame. + * vr_3point_orientation | 12 | VR orientations (passed through). + * vr_3point_compliance | 3 | VR compliance values (passed through). + * + * Joint ordering uses `isaaclab_to_mujoco` remapping and `default_angles` + * offsets from policy_parameters.hpp. + */ + void create_output_data_map( + const std::array& vr_3point_position, + const std::array& vr_3point_orientation, + const std::array& vr_3point_compliance, + const std::array& left_hand_joint, + const std::array& right_hand_joint, + const std::array& init_ref_data_root_rot_array, + DataBuffer& heading_state_buffer, + std::shared_ptr current_motion, + int current_frame + ) + { + // Static key strings (avoid repeated allocations) + static const std::string kBaseTransTarget = "base_trans_target"; + static const std::string kBaseQuatTarget = "base_quat_target"; + static const std::string kBodyQTarget = "body_q_target"; + static const std::string kBaseTransMeasured = "base_trans_measured"; + static const std::string kBaseQuatMeasured = "base_quat_measured"; + static const std::string kBodyQMeasured = "body_q_measured"; + static const std::string kLeftHandQMeasured = "left_hand_q_measured"; + static const std::string kRightHandQMeasured = "right_hand_q_measured"; + static const std::string kVr3pointPosition = "vr_3point_position"; + static const std::string kVr3pointOrientation = "vr_3point_orientation"; + static const std::string kVr3pointCompliance = "vr_3point_compliance"; + + std::vector entries = state_logger_.GetLatest(1); + const StateLogger::Entry& state = entries[0]; + + // ---- Validate current motion frame ---- + bool motion_frame_valid = current_motion && + current_motion->timesteps > 0 && + current_frame >= 0 && + current_frame < static_cast(current_motion->timesteps); + + // Independent capability checks for the current motion + bool has_joint_data = motion_frame_valid && current_motion->GetNumJoints() >= 29; + bool has_body_positions = motion_frame_valid && current_motion->GetNumBodies() >= 1; + bool has_body_quaternions = motion_frame_valid && current_motion->GetNumBodyQuaternions() >= 1; + + // ---- Initialise target arrays with safe defaults ---- + std::array body_q_target; + body_q_target.fill(0.0); + std::array base_trans_target = {0.0, 0.0, 0.0}; + std::array base_quat_target = {1.0, 0.0, 0.0, 0.0}; // Identity quaternion + + // ---- Populate measured values from robot state (always available) ---- + // Remap from IsaacLab joint ordering to MuJoCo ordering and add default offsets. + std::array body_q_measured; + for (int i = 0; i < 29; i++) { + body_q_measured[i] = state.body_q[isaaclab_to_mujoco[i]] + default_angles[i]; + } + std::array base_trans_measured = {0.0, -1.0, 0.793}; // Fixed default position + std::array base_quat_measured = state.base_quat; // From IMU + + // Populate joint targets if available + if (has_joint_data) { + for (int i = 0; i < 29; i++) { + body_q_target[i] = current_motion->JointPositions(current_frame)[isaaclab_to_mujoco[i]]; + } + } + + // Populate body pose targets if available + if (has_body_positions && has_body_quaternions) { + base_trans_target = current_motion->BodyPositions(current_frame)[0]; + + // Get heading state atomically (both quaternion and delta heading together) + auto heading_state_data = heading_state_buffer.GetDataWithTime().data; + HeadingState heading_state = heading_state_data ? *heading_state_data : HeadingState(); + + // Calculate initial heading from robot root pose (using double precision functions) + auto init_heading = calc_heading_quat_d(heading_state.init_base_quat); + + // Calculate inverse heading from reference data + auto data_heading_inv = calc_heading_quat_inv_d(init_ref_data_root_rot_array); + + // Apply delta heading calculation + auto apply_delta_heading = quat_mul_d(init_heading, data_heading_inv); + + // Apply additional delta heading if specified + auto delta_quat = euler_z_to_quat_d(heading_state.delta_heading); + apply_delta_heading = quat_mul_d(delta_quat, apply_delta_heading); + + // Get reference data root rotation at this target frame (first body part, index 0) + const auto motion_body_quat = current_motion->BodyQuaternions(current_frame); + std::array ref_data_root_rot_array = motion_body_quat[0]; + + // Calculate new reference root rotation with heading applied + base_quat_target = quat_mul_d(apply_delta_heading, ref_data_root_rot_array); + + // rotate the translation by the same quat: + base_trans_target = quat_rotate_d(apply_delta_heading, base_trans_target); + } else if (has_body_quaternions) { + // Only have quaternions, use them without position + auto heading_state_data = heading_state_buffer.GetDataWithTime().data; + HeadingState heading_state = heading_state_data ? *heading_state_data : HeadingState(); + + auto init_heading = calc_heading_quat_d(heading_state.init_base_quat); + auto data_heading_inv = calc_heading_quat_inv_d(init_ref_data_root_rot_array); + auto apply_delta_heading = quat_mul_d(init_heading, data_heading_inv); + auto delta_quat = euler_z_to_quat_d(heading_state.delta_heading); + apply_delta_heading = quat_mul_d(delta_quat, apply_delta_heading); + + const auto motion_body_quat = current_motion->BodyQuaternions(current_frame); + std::array ref_data_root_rot_array = motion_body_quat[0]; + base_quat_target = quat_mul_d(apply_delta_heading, ref_data_root_rot_array); + } + // else: keep default values (zeros for position, identity for quaternion) + + // Rotate the vr_3point_position by the reference data root quat (or identity if motion invalid): + auto vr_3point_position_sent = vr_3point_position; + for (int i = 0; i < 3; i++) { + std::array point_pos = { + vr_3point_position_sent[i * 3 + 0], + vr_3point_position_sent[i * 3 + 1], + vr_3point_position_sent[i * 3 + 2] + }; + auto rotated_point = quat_rotate_d(base_quat_target, point_pos); + vr_3point_position_sent[i * 3 + 0] = rotated_point[0]; + vr_3point_position_sent[i * 3 + 1] = rotated_point[1]; + vr_3point_position_sent[i * 3 + 2] = rotated_point[2]; + } + + // Write target pose: + output_data_map_[kBaseTransTarget].assign(base_trans_target.begin(), base_trans_target.end()); + output_data_map_[kBaseQuatTarget].assign(base_quat_target.begin(), base_quat_target.end()); + output_data_map_[kBodyQTarget].assign(body_q_target.begin(), body_q_target.end()); + + output_data_map_[kBaseTransMeasured].assign(base_trans_measured.begin(), base_trans_measured.end()); + output_data_map_[kBaseQuatMeasured].assign(base_quat_measured.begin(), base_quat_measured.end()); + output_data_map_[kBodyQMeasured].assign(body_q_measured.begin(), body_q_measured.end()); + output_data_map_[kLeftHandQMeasured].assign(left_hand_joint.begin(), left_hand_joint.end()); + output_data_map_[kRightHandQMeasured].assign(right_hand_joint.begin(), right_hand_joint.end()); + + // write vr controller data: + output_data_map_[kVr3pointPosition].assign(vr_3point_position_sent.begin(), vr_3point_position_sent.end()); + output_data_map_[kVr3pointOrientation].assign(vr_3point_orientation.begin(), vr_3point_orientation.end()); + output_data_map_[kVr3pointCompliance].assign(vr_3point_compliance.begin(), vr_3point_compliance.end()); + } + + /// Protected constructor – sub-classes must provide a StateLogger reference. + explicit OutputInterface(StateLogger& logger) : state_logger_(logger) {} + + // Non-copyable, non-movable (instances are managed via unique_ptr). + OutputInterface(const OutputInterface&) = delete; + OutputInterface& operator=(const OutputInterface&) = delete; + OutputInterface(OutputInterface&&) = delete; + OutputInterface& operator=(OutputInterface&&) = delete; + + OutputType type_ = OutputType::UNKNOWN; ///< Concrete output transport tag. + + /// Reference to the shared StateLogger (provides measured robot state). + StateLogger& state_logger_; + + /// Reusable map populated by create_output_data_map() each tick. + std::map> output_data_map_; + /// Reusable msgpack serialisation buffer (cleared and repacked each tick). + msgpack::sbuffer output_data_sbuf_; + +}; + +#endif // OUTPUT_INTERFACE_HPP + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/ros2_output_handler.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/ros2_output_handler.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6ea15368aef9a81a17bbb31677f817db3c5e0e03 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/ros2_output_handler.hpp @@ -0,0 +1,561 @@ +/** + * @file ros2_output_handler.hpp + * @brief ROS 2 output handler for publishing robot state and configuration. + * + * ROS2OutputHandler creates a lightweight ROS 2 node and publishes two topics: + * + * Topic | QoS | Description + * -----------------------------|------------------|---------------------------- + * G1Env/env_state_act | depth=10 | Per-tick robot state + action data (msgpack). + * WBCPolicy/robot_config | transient_local | One-shot robot configuration (msgpack). + * + * ## State Topic (`G1Env/env_state_act`) + * + * Published every control-loop tick. The msgpack map contains: + * + * Key | Type | Description + * ---------------------|--------------|------------ + * control_loop_type | string | Always "cpp". + * index | int | Monotonic state-logger entry index. + * ros_timestamp | double | ROS 2 time in seconds. + * base_quat | double[4] | IMU base quaternion (w,x,y,z). + * base_ang_vel | double[3] | Base angular velocity. + * body_torso_quat | double[4] | Torso IMU quaternion. + * body_torso_ang_vel | double[3] | Torso angular velocity. + * body_q | double[29] | Joint positions (MuJoCo order + default offsets). + * body_dq | double[29] | Joint velocities (MuJoCo order). + * last_action | double[29] | Last policy action (MuJoCo order, scaled + offset). + * left_hand_q | double[7] | Left-hand joint positions. + * left_hand_dq | double[7] | Left-hand joint velocities. + * right_hand_q | double[7] | Right-hand joint positions. + * right_hand_dq | double[7] | Right-hand joint velocities. + * last_left_hand_action| double[7] | Last left-hand action. + * last_right_hand_action| double[7] | Last right-hand action. + * token_state | double[N] | Encoder token state (empty if not available). + * init_base_quat | double[4] | Initial base quaternion (if heading state available). + * delta_heading | double | Delta heading (if heading state available). + * + * ## Config Topic (`WBCPolicy/robot_config`) + * + * Published once at startup via `publish_config()`. Uses `transient_local` + * QoS so that late-joining subscribers still receive it. Contains the + * StateLogger configuration map (policy parameters, joint mappings, etc.). + * + * ## Thread Safety + * + * `publish()` is called from the control thread. The ROS 2 node does not + * run its own executor – `spin_some()` is not called here (unlike the input + * handler). + */ + +#ifndef ROS2_OUTPUT_HANDLER_HPP +#define ROS2_OUTPUT_HANDLER_HPP + +#if HAS_ROS2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "output_interface.hpp" +#include "../policy_parameters.hpp" // For isaaclab_to_mujoco, default_angles, g1_action_scale +#include "../robot_parameters.hpp" // For HeadingState +#include "../utils.hpp" // For DataBuffer + +/** + * @class ROS2OutputHandler + * @brief OutputInterface that publishes robot state and configuration over ROS 2 topics. + * + * Owns a ROS 2 node with two publishers (state + config). The config topic + * uses `transient_local` QoS so late joiners receive it automatically. + */ +class ROS2OutputHandler : public OutputInterface { +public: + /// Compile-time toggle for debug log output. + static constexpr bool DEBUG_LOGGING = true; + + /** + * @brief Construct the handler: create a ROS 2 node and advertise publishers. + * @param logger Reference to the shared StateLogger. + * @param node_name ROS 2 node name (default: "g1_output_handler"). + * @throws std::exception if ROS 2 initialisation or node creation fails. + */ + explicit ROS2OutputHandler(StateLogger& logger, const std::string& node_name = "g1_output_handler") + : OutputInterface(logger) { + // Initialize ROS2 if not already initialized + if (!rclcpp::ok()) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Initializing ROS2" << std::endl; + } + rclcpp::init(0, nullptr); + } + + try { + // Initialize ROS2 node + node_ = rclcpp::Node::make_shared(node_name); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] ROS2OutputHandler node '" << node_name << "' initialized" << std::endl; + } + + // Setup publishers + setup_publishers(); + + } catch (const std::exception& e) { + std::cerr << "[ROS2 Output ERROR] Failed to initialize ROS2OutputHandler: " << e.what() << std::endl; + throw; + } + + type_ = OutputType::ROS2; + } + + /// Destructor – tears down publishers before the node to avoid DDS assertion errors. + ~ROS2OutputHandler() { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] ROS2OutputHandler destructor called" << std::endl; + } + + // CRITICAL: Proper shutdown order to avoid EntityDelegate assertion + try { + // Step 1: Reset publishers BEFORE resetting node + if (state_logger_pub_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Resetting state logger publisher" << std::endl; + } + state_logger_pub_.reset(); + } + + if (robot_config_pub_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Resetting robot config publisher" << std::endl; + } + robot_config_pub_.reset(); + } + + // Step 2: Allow DDS cleanup time + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + + // Step 3: Reset node AFTER publishers are cleaned up + if (node_) { + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Resetting ROS2 node" << std::endl; + } + node_.reset(); + } + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] ROS2OutputHandler cleanup complete" << std::endl; + } + } catch (const std::exception& e) { + std::cerr << "[ROS2 Output ERROR] Exception during ROS2OutputHandler cleanup: " << e.what() << std::endl; + } + } + + /// Publish the latest robot state to `G1Env/env_state_act` (called each control tick). + void publish( + const std::array& vr_3point_position, + const std::array& vr_3point_orientation, + const std::array& vr_3point_compliance, + const std::array& left_hand_joint, + const std::array& right_hand_joint, + const std::array& init_ref_data_root_rot_array, + DataBuffer& heading_state_buffer, + std::shared_ptr current_motion, + int current_frame + ) override { + if (!node_ || !rclcpp::ok()) { + return; + } + + // Config should already be published via publish_config() during initialization + // If it wasn't, that's an error condition (should have failed at init) + if (!robot_config_published_) { + std::cerr << "[ROS2 Output ERROR] Robot config was not published during initialization!" << std::endl; + // Don't try to publish here - fail fast was supposed to happen at init + return; + } + + // Publish state logger data (includes token_state from LogPostState) + if (state_logger_pub_) { + try { + publish_state_logger_state(heading_state_buffer); + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 Output ERROR] Failed to publish state: " << e.what() << std::endl; + } + } + } + } + + /// @return The ROS 2 node (e.g. for external spinning). + std::shared_ptr get_node() const { return node_; } + + /// @return True if the ROS 2 context and node are both healthy. + bool is_ros2_ok() const { return rclcpp::ok() && node_ != nullptr; } + + /// @return Current ROS 2 clock time in seconds (for state-logger timestamps). + double GetROSTimestamp() const { + if (node_) { + return node_->get_clock()->now().nanoseconds() / 1e9; + } + return 0.0; + } + + /** + * @brief Publish the robot configuration to `WBCPolicy/robot_config`. + * + * Typically called once after initialisation (before the control loop starts). + * Uses `transient_local` QoS so that late-joining subscribers still receive it. + * + * @throws std::runtime_error if the node is not ready or the config is empty. + * + * @note All config fields are set before StateLogger construction and are + * immutable, so they're guaranteed to be available when this is called. + */ + void publish_config() override { + if (!node_ || !rclcpp::ok()) { + throw std::runtime_error("[ROS2 Output ERROR] Cannot publish config: ROS2 node not ready"); + } + if (robot_config_published_) { + return; // Already published + } + + // Give ROS2 a moment to advertise the publisher (needed for DDS discovery) + // This ensures subscribers can discover the publisher before we publish + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + + auto config_opt = state_logger_.GetConfig(); + if (!config_opt.has_value() || config_opt->empty()) { + throw std::runtime_error("[ROS2 Output ERROR] Cannot publish config: StateLogger config is empty or unavailable"); + } + + PublishRobotConfig(*config_opt); + robot_config_published_ = true; + std::cout << "[ROS2 Output] Published robot config to WBCPolicy/robot_config (immediate)" << std::endl; + } + +private: + // ------------------------------------------------------------------ + // ROS 2 infrastructure + // ------------------------------------------------------------------ + std::shared_ptr node_; ///< Lightweight ROS 2 node for publishing. + + /// Publisher for per-tick robot state (G1Env/env_state_act). + rclcpp::Publisher::SharedPtr state_logger_pub_; + /// Publisher for one-shot robot config (WBCPolicy/robot_config, transient_local). + rclcpp::Publisher::SharedPtr robot_config_pub_; + + bool robot_config_published_ = false; ///< True once publish_config() has succeeded. + + /// Create the two ROS 2 publishers with appropriate QoS settings. + void setup_publishers() { + // Create publisher for state logger data (robot state + actions) + state_logger_pub_ = node_->create_publisher( + "G1Env/env_state_act", + 10 // QoS depth = 10 for buffering + ); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Created publisher for G1Env/env_state_act" << std::endl; + } + + // Create publisher for robot configuration (with transient_local QoS for late joiners) + // This ensures that subscribers that connect after the message is published will still receive it + rclcpp::QoS config_qos(1); // depth = 1 since we only publish once + config_qos.transient_local(); // Keep last message for late joiners + config_qos.reliable(); // Ensure delivery + + robot_config_pub_ = node_->create_publisher( + "WBCPolicy/robot_config", + config_qos + ); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Created publisher for WBCPolicy/robot_config (transient_local)" << std::endl; + } + } + + /// Serialise the robot configuration map to msgpack and publish on robot_config_pub_. + void PublishRobotConfig(const std::map>& config) { + if (!robot_config_pub_) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 Output ERROR] Robot config publisher not initialized" << std::endl; + } + return; + } + + try { + // Pack config into msgpack using sbuffer + msgpack::sbuffer sbuf; + msgpack::packer pk(&sbuf); + + // Pack as map + pk.pack_map(config.size()); + for (const auto& [key, value] : config) { + pk.pack(key); + // Pack value based on type + std::visit([&pk](auto&& arg) { + pk.pack(arg); + }, value); + } + + // Convert sbuffer to vector for ROS2 message + std_msgs::msg::ByteMultiArray msg; + msg.data.assign(sbuf.data(), sbuf.data() + sbuf.size()); + + robot_config_pub_->publish(msg); + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ROS2 Output DEBUG] Published robot config with " << config.size() << " fields" << std::endl; + } + } catch (const std::exception& e) { + if constexpr (DEBUG_LOGGING) { + std::cerr << "[ROS2 Output ERROR] Failed to publish robot config: " << e.what() << std::endl; + } + } + } + + /// Publish the latest state-logger entry to `G1Env/env_state_act`. + void publish_state_logger_state(const DataBuffer& heading_state_buffer) { + std::vector msgpack_data = parse_state_logger_state_to_msgpack(heading_state_buffer); + + // Skip publishing if no data available + if (msgpack_data.empty()) { + return; + } + + // Convert to ROS2 ByteMultiArray message + std_msgs::msg::ByteMultiArray msg; + msg.data = msgpack_data; + + state_logger_pub_->publish(msg); + } + + /** + * @brief Serialise the latest state-logger entry to a msgpack byte vector. + * + * Applies IsaacLab → MuJoCo joint reordering, adds default-angle offsets + * for positions, and scales + offsets actions. Optionally appends heading + * state (init_base_quat, delta_heading) if available. + * + * @return Serialised msgpack bytes, or empty vector if no data is available. + */ + std::vector parse_state_logger_state_to_msgpack(const DataBuffer& heading_state_buffer) { + // Check if logger has actual data (not just zero-padded entries) + if (state_logger_.size() == 0) { + return std::vector(); // Return empty if no actual data + } + + // Get the latest state from logger + std::vector entries = state_logger_.GetLatest(1); + const StateLogger::Entry& state = entries[0]; + + // Pack all fields into msgpack map using sbuffer + msgpack::sbuffer sbuf; + msgpack::packer pk(&sbuf); + + // Get heading state if available + HeadingState heading_state; + bool has_heading_state = false; + auto heading_state_data = heading_state_buffer.GetDataWithTime().data; + if (heading_state_data) { + heading_state = *heading_state_data; + has_heading_state = true; + } + + // Create a map with all entry fields (17 base fields + 2 optional heading fields) + int num_fields = 17; + if (has_heading_state) { + num_fields += 2; // Add init_base_quat and delta_heading + } + pk.pack_map(num_fields); + + // Pack control loop type identifier + pk.pack("control_loop_type"); + pk.pack("cpp"); + + // Pack index + pk.pack("index"); + pk.pack(state.index); + + // Pack ros_timestamp (as seconds, using ROS2 time stored in entry to align with Python) + pk.pack("ros_timestamp"); + pk.pack(state.ros_timestamp); + + // Pack base_quat (4 doubles: qw, qx, qy, qz) + pk.pack("base_quat"); + pk.pack_array(4); + for (const auto& val : state.base_quat) { + pk.pack(val); + } + + // Pack base_ang_vel (3 doubles: wx, wy, wz) + pk.pack("base_ang_vel"); + pk.pack_array(3); + for (const auto& val : state.base_ang_vel) { + pk.pack(val); + } + + // Pack body_torso_quat (4 doubles: qw, qx, qy, qz) + pk.pack("body_torso_quat"); + pk.pack_array(4); + for (const auto& val : state.body_torso_quat) { + pk.pack(val); + } + + // Pack body_torso_ang_vel (3 doubles: wx, wy, wz) + pk.pack("body_torso_ang_vel"); + pk.pack_array(3); + for (const auto& val : state.body_torso_ang_vel) { + pk.pack(val); + } + + // Pack body_q (dynamic size) - recover original values (add offset, convert to MuJoCo order) + pk.pack("body_q"); + pk.pack_array(state.body_q.size()); + if (state.body_q.size() == 29) { + // Create temporary array for MuJoCo-ordered values + std::array body_q_mujoco; + for (size_t i = 0; i < 29; ++i) { + // Add back the offset (body_q is in IsaacLab order, default_angles is in MuJoCo order) + body_q_mujoco[i] = state.body_q[isaaclab_to_mujoco[i]] + default_angles[i]; + } + // Pack in MuJoCo order + for (const auto& val : body_q_mujoco) { + pk.pack(val); + } + } else { + // Fallback: pack as-is if size doesn't match expected + for (const auto& val : state.body_q) { + pk.pack(val); + } + } + + // Pack body_dq (dynamic size) - convert to MuJoCo order (no offset for velocities) + pk.pack("body_dq"); + pk.pack_array(state.body_dq.size()); + if (state.body_dq.size() == 29) { + // Create temporary array for MuJoCo-ordered values + std::array body_dq_mujoco; + for (size_t i = 0; i < 29; ++i) { + // Convert to MuJoCo order (velocities don't have offset) + body_dq_mujoco[i] = state.body_dq[isaaclab_to_mujoco[i]]; + } + // Pack in MuJoCo order + for (const auto& val : body_dq_mujoco) { + pk.pack(val); + } + } else { + // Fallback: pack as-is if size doesn't match expected + for (const auto& val : state.body_dq) { + pk.pack(val); + } + } + + // Pack last_action (dynamic size) - convert to MuJoCo order + pk.pack("last_action"); + pk.pack_array(state.last_action.size()); + if (state.last_action.size() == 29) { + // Create temporary array for MuJoCo-ordered values + std::array last_action_mujoco; + for (size_t i = 0; i < 29; ++i) { + // Convert to MuJoCo order (actions are in IsaacLab order in logger) + last_action_mujoco[i] = state.last_action[isaaclab_to_mujoco[i]] * g1_action_scale[i] + default_angles[i]; + } + // Pack in MuJoCo order + for (const auto& val : last_action_mujoco) { + pk.pack(val); + } + } else { + // Fallback: pack as-is if size doesn't match expected + for (const auto& val : state.last_action) { + pk.pack(val); + } + } + + // Pack left_hand_q (7 doubles) + pk.pack("left_hand_q"); + pk.pack_array(state.left_hand_q.size()); + for (const auto& val : state.left_hand_q) { + pk.pack(val); + } + + // Pack left_hand_dq (7 doubles) + pk.pack("left_hand_dq"); + pk.pack_array(state.left_hand_dq.size()); + for (const auto& val : state.left_hand_dq) { + pk.pack(val); + } + + // Pack right_hand_q (7 doubles) + pk.pack("right_hand_q"); + pk.pack_array(state.right_hand_q.size()); + for (const auto& val : state.right_hand_q) { + pk.pack(val); + } + + // Pack right_hand_dq (7 doubles) + pk.pack("right_hand_dq"); + pk.pack_array(state.right_hand_dq.size()); + for (const auto& val : state.right_hand_dq) { + pk.pack(val); + } + + // Pack last_left_hand_action (7 doubles) + pk.pack("last_left_hand_action"); + pk.pack_array(state.last_left_hand_action.size()); + for (const auto& val : state.last_left_hand_action) { + pk.pack(val); + } + + // Pack last_right_hand_action (7 doubles) + pk.pack("last_right_hand_action"); + pk.pack_array(state.last_right_hand_action.size()); + for (const auto& val : state.last_right_hand_action) { + pk.pack(val); + } + + // Pack token_state (dynamic size, post-state data from encoder) + pk.pack("token_state"); + if (state.has_post_state_data && !state.token_state.empty()) { + pk.pack_array(state.token_state.size()); + for (const auto& val : state.token_state) { + pk.pack(val); + } + } else { + // Pack empty array if no token state available + pk.pack_array(0); + } + + // Pack init_base_quat and delta_heading from heading state (if available) + if (has_heading_state) { + // Pack init_base_quat (4 doubles: qw, qx, qy, qz) + pk.pack("init_base_quat"); + pk.pack_array(4); + for (const auto& val : heading_state.init_base_quat) { + pk.pack(val); + } + + // Pack delta_heading (single double) + pk.pack("delta_heading"); + pk.pack(heading_state.delta_heading); + } + + // Convert sbuffer to vector + std::vector buffer(sbuf.data(), sbuf.data() + sbuf.size()); + return buffer; + } +}; + +#endif // HAS_ROS2 + +#endif // ROS2_OUTPUT_HANDLER_HPP + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/zmq_output_handler.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/zmq_output_handler.hpp new file mode 100644 index 0000000000000000000000000000000000000000..126b9f6581119c5f546aad9483d6048bb1a8a366 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/output_interface/zmq_output_handler.hpp @@ -0,0 +1,423 @@ +/** + * @file zmq_output_handler.hpp + * @brief ZMQ PUB output handler for publishing robot state and configuration. + * + * Publishes two topic-prefixed streams over a single ZMQ PUB socket: + * + * Topic Prefix | Frequency | Description + * ----------------|-----------------|------------------------------------------- + * {user_topic} | Every tick | Combined state + visualisation (msgpack). + * robot_config | Every ~2 s | Robot configuration (msgpack, always re-published). + * + * Wire format (single-part ZMQ message): + * + * [topic_prefix][msgpack payload] + * + * The topic prefix is a plain string (e.g. "g1_debug") prepended to the + * message so that subscribers using `zmq::sockopt::subscribe` can filter by + * topic. + * + * --------------------------------------------------------------------------- + * ## `{user_topic}` (e.g. `g1_debug`) — published every tick + * --------------------------------------------------------------------------- + * + * A single msgpack map with up to 30 keys (28 always-present + 2 conditional). + * All joints are in **MuJoCo order** (remapped from IsaacLab via + * `isaaclab_to_mujoco`). + * + * # | Key | Type | Description + * ---|------------------------|--------------|--------------------------------------------- + * | **Metadata** | | + * 1 | control_loop_type | string | Always "cpp". + * 2 | index | int | Monotonic state-logger entry index. + * 3 | ros_timestamp | double | ROS 2 wall-clock (s); 0.0 if no ROS 2. + * | | | + * | **Base IMU** | | + * 4 | base_quat | double[4] | Base IMU quaternion (w,x,y,z). + * 5 | base_ang_vel | double[3] | Base angular velocity. + * 6 | body_torso_quat | double[4] | Torso IMU quaternion. + * 7 | body_torso_ang_vel | double[3] | Torso angular velocity. + * | | | + * | **Body joints** | | + * 8 | body_q | double[29] | Joint positions (+ default offsets). + * 9 | body_dq | double[29] | Joint velocities. + * | | | + * | **Hand joints** | | + * 10 | left_hand_q | double[7] | Left-hand joint positions (from state logger). + * 11 | left_hand_dq | double[7] | Left-hand joint velocities. + * 12 | right_hand_q | double[7] | Right-hand joint positions (from state logger). + * 13 | right_hand_dq | double[7] | Right-hand joint velocities. + * | | | + * | **Policy actions** | | + * 14 | last_action | double[29] | Last body action (scaled + default offsets). + * 15 | last_left_hand_action | double[7] | Last left-hand action. + * 16 | last_right_hand_action | double[7] | Last right-hand action. + * | | | + * | **Encoder** | | + * 17 | token_state | double[N] | Encoder token state (empty array if N/A). + * | | | + * | **Heading** *(conditional — only when heading state is available)* | + * 18 | init_base_quat | double[4] | Initial base quaternion at heading init. + * 19 | delta_heading | double | Accumulated heading delta (rad). + * | | | + * | **Viz: targets** *(from current motion frame + heading correction)* | + * 20 | base_trans_target | double[3] | Target base translation. + * 21 | base_quat_target | double[4] | Target base quaternion. + * 22 | body_q_target | double[29] | Target joint positions. + * | | | + * | **Viz: measured** | | + * 23 | base_trans_measured | double[3] | Measured base translation (fixed default). + * 24 | base_quat_measured | double[4] | Measured base quaternion (= base_quat). + * 25 | body_q_measured | double[29] | Measured joint positions (= body_q). + * 26 | left_hand_q_measured | double[7] | Measured left-hand Dex3 positions. + * 27 | right_hand_q_measured | double[7] | Measured right-hand Dex3 positions. + * | | | + * | **Viz: VR 3-point** | | + * 28 | vr_3point_position | double[9] | VR positions (3×xyz, target body frame). + * 29 | vr_3point_orientation | double[12] | VR orientations (3×quat wxyz). + * 30 | vr_3point_compliance | double[3] | VR compliance (left arm, right arm, head). + * + * --------------------------------------------------------------------------- + * ## `robot_config` — re-published every ~2 s + * --------------------------------------------------------------------------- + * + * StateLogger configuration map (policy parameters, joint mappings, etc.) + * as a msgpack map of string → string | int | double | bool. + * Re-published on every `publish()` tick (throttled to ~2 s intervals) so + * that late-joining subscribers always receive it (ZMQ PUB has no persistence). + * + * --------------------------------------------------------------------------- + * ## Socket Options + * --------------------------------------------------------------------------- + * + * - Send HWM = 10 (old messages dropped rather than queued). + * - Send buffer = 32 KB. + * - Linger = 0 (immediate close, no pending-send wait). + * - Non-blocking send (dontwait) to avoid stalling the control loop. + */ + +#ifndef ZMQ_OUTPUT_HANDLER_HPP +#define ZMQ_OUTPUT_HANDLER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "output_interface.hpp" +#include "../policy_parameters.hpp" // For isaaclab_to_mujoco, default_angles, g1_action_scale +#include "../robot_parameters.hpp" // For HeadingState +#include "../utils.hpp" // For DataBuffer + +/** + * @class ZMQOutputHandler + * @brief OutputInterface that publishes state data over a ZMQ PUB socket. + */ +class ZMQOutputHandler : public OutputInterface { +public: + static constexpr bool DEBUG_LOGGING = true; + + /** + * @brief Construct the handler: create a ZMQ PUB socket and bind to the given port. + * @param logger Reference to the shared StateLogger. + * @param port TCP port to bind the PUB socket to (e.g. 5557). + * @param topic Topic prefix prepended to each published message. + */ + explicit ZMQOutputHandler(StateLogger& logger, int port, const std::string& topic) + : OutputInterface(logger), realtime_debug_context_(1), topic_(topic), + robot_config_topic_("robot_config") { + + std::cout << "Initializing realtime debug socket" << std::endl; + std::cout << "Binding to port: " << port << " and topic: " << topic_ << std::endl; + realtime_debug_socket_ = std::make_unique(realtime_debug_context_, ZMQ_PUB); + + realtime_debug_socket_->set(zmq::sockopt::sndhwm, 10); // Drop old messages quickly + realtime_debug_socket_->set(zmq::sockopt::sndbuf, 32768); // 32 KB send buffer + realtime_debug_socket_->set(zmq::sockopt::linger, 0); // No lingering on close + realtime_debug_socket_->bind("tcp://*:" + std::to_string(port)); + + std::cout << "[INFO] Realtime debug socket bound to port: " << port << std::endl; + + if constexpr (DEBUG_LOGGING) { + std::cout << "[ZMQ Output DEBUG] ZMQOutputHandler initialized with topics: " + << "'" << topic_ << "' (combined state+viz), " + << "'" << robot_config_topic_ << "' (config)" << std::endl; + } + + type_ = OutputType::ZMQ; + } + + /** + * @brief Send combined visualisation + state-logger data in a single ZMQ message (non-blocking, called each tick). + * + * Calls `create_output_data_map()` to compute visualisation targets, then + * `pack_combined_state()` to merge state-logger + viz fields into one msgpack + * buffer, and sends it on the user topic with `zmq::send_flags::dontwait`. + */ + void publish( + const std::array& vr_3point_position, + const std::array& vr_3point_orientation, + const std::array& vr_3point_compliance, + const std::array& left_hand_joint, + const std::array& right_hand_joint, + const std::array& init_ref_data_root_rot_array, + DataBuffer& heading_state_buffer, + std::shared_ptr current_motion, + int current_frame + ) override + { + // 1. Compute visualisation data (populates output_data_map_) + create_output_data_map( + vr_3point_position, + vr_3point_orientation, + vr_3point_compliance, + left_hand_joint, + right_hand_joint, + init_ref_data_root_rot_array, + heading_state_buffer, + current_motion, + current_frame + ); + + // 2. Build a single combined message with state-logger + visualisation fields + pack_combined_state(heading_state_buffer); + + // 3. Send once on user topic (e.g. "g1_debug") + if (state_data_sbuf_.size() > 0) { + send_zmq_message(topic_, state_data_sbuf_); + } + + // 4. Re-publish robot_config periodically (ZMQ has no persistence) + publish_config(); + } + + /** + * @brief Publish robot_config if enough time has elapsed since the last send. + * + * On the first call the config is serialised from StateLogger and cached. + * Subsequent calls simply re-send the cached buffer every + * `CONFIG_REPUBLISH_INTERVAL_SEC` seconds. This gives ZMQ PUB the same + * "late-subscriber" semantics as ROS 2's `transient_local` QoS. + * + * Called once during init (from g1_deploy_onnx_ref.cpp) and then on every + * control-loop tick from `publish()`. + */ + void publish_config() override { + // Lazy-init: serialise once, reuse forever. + if (config_sbuf_cache_.size() == 0) { + auto config_opt = state_logger_.GetConfig(); + if (!config_opt.has_value() || config_opt->empty()) { + throw std::runtime_error("[ZMQ Output ERROR] Cannot publish config: StateLogger config is empty"); + } + pack_robot_config(config_sbuf_cache_, *config_opt); + std::cout << "[ZMQ Output] Robot config cached (" + << config_opt->size() << " fields, " + << config_sbuf_cache_.size() << " bytes)" << std::endl; + } + + auto now = std::chrono::steady_clock::now(); + double elapsed = std::chrono::duration(now - config_last_publish_time_).count(); + if (elapsed >= CONFIG_REPUBLISH_INTERVAL_SEC) { + send_zmq_message(robot_config_topic_, config_sbuf_cache_); + config_last_publish_time_ = now; + } + } + +private: + zmq::context_t realtime_debug_context_; ///< ZMQ context (1 I/O thread). + std::unique_ptr realtime_debug_socket_; ///< ZMQ PUB socket. + + std::string topic_; ///< User-provided topic name (e.g. "g1_debug") for combined state+viz. + std::string robot_config_topic_; ///< Topic for robot config messages. + + msgpack::sbuffer state_data_sbuf_; ///< Reused each tick; cleared in pack_combined_state(). + + // -- Config re-publish (ZMQ equivalent of ROS 2 transient_local) -- + static constexpr double CONFIG_REPUBLISH_INTERVAL_SEC = 2.0; + msgpack::sbuffer config_sbuf_cache_; ///< Serialised config (populated on first publish_config()). + std::chrono::steady_clock::time_point config_last_publish_time_; + + /// Non-blocking send of [topic][msgpack payload] over the PUB socket. + void send_zmq_message(const std::string& topic, const msgpack::sbuffer& sbuf) { + zmq::message_t msg(topic.size() + sbuf.size()); + memcpy(msg.data(), topic.c_str(), topic.size()); + memcpy(static_cast(msg.data()) + topic.size(), sbuf.data(), sbuf.size()); + realtime_debug_socket_->send(msg, zmq::send_flags::dontwait); + } + + /** + * @brief Serialise both state-logger and visualisation data into state_data_sbuf_. + * + * Combines into a single msgpack map: + * - State-logger fields (body_q, body_dq, last_action, etc. in MuJoCo order) + * - Visualisation fields from output_data_map_ (targets, VR data, measured poses) + * + * This avoids sending two overlapping messages per tick. + */ + void pack_combined_state(const DataBuffer& heading_state_buffer) { + state_data_sbuf_.clear(); + + if (state_logger_.size() == 0) { + return; + } + + std::vector entries = state_logger_.GetLatest(1); + const StateLogger::Entry& state = entries[0]; + msgpack::packer pk(&state_data_sbuf_); + + HeadingState heading_state; + bool has_heading_state = false; + auto heading_state_data = heading_state_buffer.GetDataWithTime().data; + if (heading_state_data) { + heading_state = *heading_state_data; + has_heading_state = true; + } + + // State-logger fields: 18 base + 2 optional heading + // Visualisation fields: output_data_map_.size() (typically 11) + int num_state_fields = has_heading_state ? 20 : 18; + int num_viz_fields = static_cast(output_data_map_.size()); + pk.pack_map(num_state_fields + num_viz_fields); + + // ---- State-logger fields ---- + + pk.pack("control_loop_type"); + pk.pack("cpp"); + + pk.pack("index"); + pk.pack(state.index); + + pk.pack("ros_timestamp"); + pk.pack(state.ros_timestamp); + + pk.pack("base_quat"); + pk.pack_array(4); + for (const auto& val : state.base_quat) pk.pack(val); + + pk.pack("base_ang_vel"); + pk.pack_array(3); + for (const auto& val : state.base_ang_vel) pk.pack(val); + + pk.pack("body_torso_quat"); + pk.pack_array(4); + for (const auto& val : state.body_torso_quat) pk.pack(val); + + pk.pack("body_torso_ang_vel"); + pk.pack_array(3); + for (const auto& val : state.body_torso_ang_vel) pk.pack(val); + + // body_q: IsaacLab -> MuJoCo order, add default-angle offset + pk.pack("body_q"); + pk.pack_array(state.body_q.size()); + if (state.body_q.size() == 29) { + std::array body_q_mujoco; + for (size_t i = 0; i < 29; ++i) + body_q_mujoco[i] = state.body_q[isaaclab_to_mujoco[i]] + default_angles[i]; + for (const auto& val : body_q_mujoco) pk.pack(val); + } else { + for (const auto& val : state.body_q) pk.pack(val); + } + + // body_dq: IsaacLab -> MuJoCo order (no offset for velocities) + pk.pack("body_dq"); + pk.pack_array(state.body_dq.size()); + if (state.body_dq.size() == 29) { + std::array body_dq_mujoco; + for (size_t i = 0; i < 29; ++i) + body_dq_mujoco[i] = state.body_dq[isaaclab_to_mujoco[i]]; + for (const auto& val : body_dq_mujoco) pk.pack(val); + } else { + for (const auto& val : state.body_dq) pk.pack(val); + } + + // last_action: IsaacLab -> MuJoCo order, scale + default-angle offset + pk.pack("last_action"); + pk.pack_array(state.last_action.size()); + if (state.last_action.size() == 29) { + std::array last_action_mujoco; + for (size_t i = 0; i < 29; ++i) + last_action_mujoco[i] = state.last_action[isaaclab_to_mujoco[i]] * g1_action_scale[i] + default_angles[i]; + for (const auto& val : last_action_mujoco) pk.pack(val); + } else { + for (const auto& val : state.last_action) pk.pack(val); + } + + pk.pack("left_hand_q"); + pk.pack_array(state.left_hand_q.size()); + for (const auto& val : state.left_hand_q) pk.pack(val); + + pk.pack("left_hand_dq"); + pk.pack_array(state.left_hand_dq.size()); + for (const auto& val : state.left_hand_dq) pk.pack(val); + + pk.pack("right_hand_q"); + pk.pack_array(state.right_hand_q.size()); + for (const auto& val : state.right_hand_q) pk.pack(val); + + pk.pack("right_hand_dq"); + pk.pack_array(state.right_hand_dq.size()); + for (const auto& val : state.right_hand_dq) pk.pack(val); + + pk.pack("last_left_hand_action"); + pk.pack_array(state.last_left_hand_action.size()); + for (const auto& val : state.last_left_hand_action) pk.pack(val); + + pk.pack("last_right_hand_action"); + pk.pack_array(state.last_right_hand_action.size()); + for (const auto& val : state.last_right_hand_action) pk.pack(val); + + pk.pack("token_state"); + if (state.has_post_state_data && !state.token_state.empty()) { + pk.pack_array(state.token_state.size()); + for (const auto& val : state.token_state) pk.pack(val); + } else { + pk.pack_array(0); + } + + // Motor temperature: hardware order, 2 values per motor (winding, driver) + pk.pack("motor_temperature"); + pk.pack_array(state.motor_temperature.size()); + for (const auto& val : state.motor_temperature) pk.pack(val); + + if (has_heading_state) { + pk.pack("init_base_quat"); + pk.pack_array(4); + for (const auto& val : heading_state.init_base_quat) pk.pack(val); + + pk.pack("delta_heading"); + pk.pack(heading_state.delta_heading); + } + + // ---- Visualisation fields (from output_data_map_) ---- + // Adds: base_trans_target, base_quat_target, body_q_target, + // base_trans_measured, base_quat_measured, body_q_measured, + // left_hand_q_measured, right_hand_q_measured, + // vr_3point_position, vr_3point_orientation, vr_3point_compliance + for (const auto& [key, values] : output_data_map_) { + pk.pack(key); + pk.pack_array(values.size()); + for (const auto& val : values) pk.pack(val); + } + } + + /// Serialise a config map into the given sbuffer. + static void pack_robot_config(msgpack::sbuffer& sbuf, + const std::map>& config) { + sbuf.clear(); + msgpack::packer pk(&sbuf); + pk.pack_map(config.size()); + for (const auto& [key, value] : config) { + pk.pack(key); + std::visit([&pk](auto&& arg) { pk.pack(arg); }, value); + } + } + +}; + +#endif // ZMQ_OUTPUT_HANDLER_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/policy_parameters.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/policy_parameters.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d0d9f45dd472f8b63969d097a2f8248a6f906197 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/policy_parameters.hpp @@ -0,0 +1,242 @@ +/** + * @file policy_parameters.hpp + * @brief Motor constants, PID gains, joint mappings, action scales, and default + * standing angles for the G1 29-DOF policy. + * + * ## Joint Ordering + * + * Two ordering conventions coexist in the codebase: + * - **MuJoCo order** – used by the simulator, reference motions, and output + * interfaces. Joint indices follow the URDF kinematic tree. + * - **IsaacLab order** – used internally by the RL policy and the robot SDK. + * Interleaves left/right joints differently. + * + * The arrays `isaaclab_to_mujoco` and `mujoco_to_isaaclab` provide the + * remapping between the two orderings. + * + * ## PID Gain Computation + * + * Stiffness (Kp) and damping (Kd) values are computed from motor armature + * constants using a second-order critically-damped model: + * - stiffness = armature × ω² (ω = 10 Hz × 2π) + * - damping = 2 × ζ × armature × ω (ζ = 2.0) + * + * ## Action Scaling + * + * Policy actions are scaled by: + * action_scale = 0.25 × effort_limit / stiffness + * + * The final joint target is: target = action × action_scale + default_angle. + */ + +#ifndef POLICY_PARAMETERS_HPP +#define POLICY_PARAMETERS_HPP + +#include + +const double ONE_DEGREE = 0.0174533; ///< One degree in radians. + +// Motor armature constants (used for PID gain computation) +const double ARMATURE_5020 = 0.003609725; +const double ARMATURE_7520_14 = 0.010177520; +const double ARMATURE_7520_22 = 0.025101925; +const double ARMATURE_4010 = 0.00425; + +// Control parameters for PID gain computation +const double NATURAL_FREQ = 10 * 2.0 * 3.1415926535; // 10Hz +const double DAMPING_RATIO = 2; + +// Computed stiffness values: stiffness = armature * natural_freq^2 +const double STIFFNESS_5020 = ARMATURE_5020 * NATURAL_FREQ * NATURAL_FREQ; +const double STIFFNESS_7520_14 = ARMATURE_7520_14 * NATURAL_FREQ * NATURAL_FREQ; +const double STIFFNESS_7520_22 = ARMATURE_7520_22 * NATURAL_FREQ * NATURAL_FREQ; +const double STIFFNESS_4010 = ARMATURE_4010 * NATURAL_FREQ * NATURAL_FREQ; + +// Computed damping values: damping = 2.0 * damping_ratio * armature * natural_freq +const double DAMPING_5020 = 2.0 * DAMPING_RATIO * ARMATURE_5020 * NATURAL_FREQ; +const double DAMPING_7520_14 = 2.0 * DAMPING_RATIO * ARMATURE_7520_14 * NATURAL_FREQ; +const double DAMPING_7520_22 = 2.0 * DAMPING_RATIO * ARMATURE_7520_22 * NATURAL_FREQ; +const double DAMPING_4010 = 2.0 * DAMPING_RATIO * ARMATURE_4010 * NATURAL_FREQ; + +// Effort limits for different motor types (used for action scale computation) +const double EFFORT_LIMIT_5020 = 25.0; // 5020 motor type +const double EFFORT_LIMIT_7520_14 = 88.0; // 7520_14 motor type +const double EFFORT_LIMIT_7520_22 = 139.0; // 7520_22 motor type +const double EFFORT_LIMIT_4010 = 5.0; // 4010 motor type + + +// VR5Point index (isaaclab index) left wrist, right wrist, pelvs, left ankle, right ankle +const std::array vr_5point_index = {28, 29, 0, 18, 19}; + +// Joint mapping arrays +// VR3Point index (isaaclab index) left wrist, right wrist, torso, +const std::array vr_3point_index = {28, 29, 9}; + +// Upper body joint index (mujoco order) +const std::vector upper_body_joint_mujoco_order_in_isaaclab_index = { 2, 5, 8, 11, 15, 19, 21, 23, 25, 27, 12, 16, 20, 22, 24, 26, 28}; +const std::vector upper_body_joint_mujoco_order_in_mujoco_index = { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}; + +// upper body joint index (isaaclab order) +const std::vector upper_body_joint_isaaclab_order_in_isaaclab_index = { 2, 5, 8, 11, 12, 15, 16, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}; +const std::vector upper_body_joint_isaaclab_order_in_mujoco_index = { 12, 13, 14, 15, 22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28}; + +// wrist joint index (mujoco order) +const std::vector wrist_joint_mujoco_order_in_isaaclab_index = {23, 25, 27, 24, 26, 28}; +const std::vector wrist_joint_mujoco_order_in_mujoco_index = {19, 20, 21, 26, 27, 28}; + +// wrist joint index (isaaclab order) +const std::vector wrist_joint_isaaclab_order_in_isaaclab_index = {23, 24, 25, 26, 27, 28}; +const std::vector wrist_joint_isaaclab_order_in_mujoco_index = {19, 26, 20, 27, 21, 28}; + +// lower body joint index (mujoco order) +const std::vector lower_body_joint_mujoco_order_in_isaaclab_index = {0, 3, 6, 9, 13, 17, 1, 4, 7, 10, 14, 18}; +const std::vector lower_body_joint_mujoco_order_in_mujoco_index = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; + +// lower body joint index (isaaclab order) +const std::vector lower_body_joint_isaaclab_order_in_isaaclab_index = {0, 1, 3, 4, 6, 7, 9, 10, 13, 14, 17, 18}; +const std::vector lower_body_joint_isaaclab_order_in_mujoco_index = {0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11}; + +// Joint mapping arrays (mujoco order in isaaclab index) +const std::array isaaclab_to_mujoco = {0, 3, 6, 9, 13, 17, 1, 4, 7, 10, 14, 18, 2, 5, 8, + 11, 15, 19, 21, 23, 25, 27, 12, 16, 20, 22, 24, 26, 28}; +// Joint mapping arrays (isaaclab order in mujoco index) +const std::array mujoco_to_isaaclab = {0, 6, 12, 1, 7, 13, 2, 8, 14, 3, 9, 15, 22, 4, 10, + 16, 23, 5, 11, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28}; + +// Action scaling parameters +// Computed using: action_scale = 0.25 * effort_limit / stiffness +// Based on actuator configurations from IsaacLab G1_CYLINDER_CFG +const std::array g1_action_scale = { + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // left_hip_pitch_joint (old is 7520_14 new is 7520_22) + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // left_hip_roll_joint + 0.25 * EFFORT_LIMIT_7520_14 / STIFFNESS_7520_14, // left_hip_yaw_joint + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // left_knee_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_ankle_pitch_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_ankle_roll_joint + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // right_hip_pitch_joint (old is 7520_14 new is 7520_22) + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // right_hip_roll_joint + 0.25 * EFFORT_LIMIT_7520_14 / STIFFNESS_7520_14, // right_hip_yaw_joint + 0.25 * EFFORT_LIMIT_7520_22 / STIFFNESS_7520_22, // right_knee_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_ankle_pitch_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_ankle_roll_joint + 0.25 * EFFORT_LIMIT_7520_14 / STIFFNESS_7520_14, // waist_yaw_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // waist_roll_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // waist_pitch_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_shoulder_pitch_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_shoulder_roll_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_shoulder_yaw_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_elbow_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // left_wrist_roll_joint + 0.25 * EFFORT_LIMIT_4010 / STIFFNESS_4010, // left_wrist_pitch_joint + 0.25 * EFFORT_LIMIT_4010 / STIFFNESS_4010, // left_wrist_yaw_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_shoulder_pitch_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_shoulder_roll_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_shoulder_yaw_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_elbow_joint + 0.25 * EFFORT_LIMIT_5020 / STIFFNESS_5020, // right_wrist_roll_joint + 0.25 * EFFORT_LIMIT_4010 / STIFFNESS_4010, // right_wrist_pitch_joint + 0.25 * EFFORT_LIMIT_4010 / STIFFNESS_4010, // right_wrist_yaw_joint +}; + +// PID control gains - Position gains (Kp) +// These values are computed based on the stiffness constants above +const std::array kps = { + STIFFNESS_7520_22, // left_hip_pitch_joint (old is 7520_14 new is 7520_22) + STIFFNESS_7520_22, // left_hip_roll_joint + STIFFNESS_7520_14, // left_hip_yaw_joint + STIFFNESS_7520_22, // left_knee_joint + 2.0 * STIFFNESS_5020, // left_ankle_pitch_joint + 2.0 * STIFFNESS_5020, // left_ankle_roll_joint + STIFFNESS_7520_22, // right_hip_pitch_joint (old is 7520_14 new is 7520_22) + STIFFNESS_7520_22, // right_hip_roll_joint + STIFFNESS_7520_14, // right_hip_yaw_joint + STIFFNESS_7520_22, // right_knee_joint + 2.0 * STIFFNESS_5020, // right_ankle_pitch_joint + 2.0 * STIFFNESS_5020, // right_ankle_roll_joint + STIFFNESS_7520_14, // waist_yaw_joint + 2.0 * STIFFNESS_5020, // waist_roll_joint + 2.0 * STIFFNESS_5020, // waist_pitch_joint + STIFFNESS_5020, // left_shoulder_pitch_joint + STIFFNESS_5020, // left_shoulder_roll_joint + STIFFNESS_5020, // left_shoulder_yaw_joint + STIFFNESS_5020, // left_elbow_joint + STIFFNESS_5020, // left_wrist_roll_joint + STIFFNESS_4010, // left_wrist_pitch_joint + STIFFNESS_4010, // left_wrist_yaw_joint + STIFFNESS_5020, // right_shoulder_pitch_joint + STIFFNESS_5020, // right_shoulder_roll_joint + STIFFNESS_5020, // right_shoulder_yaw_joint + STIFFNESS_5020, // right_elbow_joint + STIFFNESS_5020, // right_wrist_roll_joint + STIFFNESS_4010, // right_wrist_pitch_joint + STIFFNESS_4010, // right_wrist_yaw_joint +}; + +// PID control gains - Derivative gains (Kd) +// These values are computed based on the damping constants above +const std::array kds = { + DAMPING_7520_22, // left_hip_pitch_joint (old is 7520_14 new is 7520_22) + DAMPING_7520_22, // left_hip_roll_joint + DAMPING_7520_14, // left_hip_yaw_joint + DAMPING_7520_22, // left_knee_joint + 2.0 * DAMPING_5020, // left_ankle_pitch_joint + 2.0 * DAMPING_5020, // left_ankle_roll_joint + DAMPING_7520_22, // right_hip_pitch_joint (old is 7520_14 new is 7520_22) + DAMPING_7520_22, // right_hip_roll_joint + DAMPING_7520_14, // right_hip_yaw_joint + DAMPING_7520_22, // right_knee_joint + 2.0 * DAMPING_5020, // right_ankle_pitch_joint + 2.0 * DAMPING_5020, // right_ankle_roll_joint + DAMPING_7520_14, // waist_yaw_joint + 2.0 * DAMPING_5020, // waist_roll_joint + 2.0 * DAMPING_5020, // waist_pitch_joint + DAMPING_5020, // left_shoulder_pitch_joint + DAMPING_5020, // left_shoulder_roll_joint + DAMPING_5020, // left_shoulder_yaw_joint + DAMPING_5020, // left_elbow_joint + DAMPING_5020, // left_wrist_roll_joint + DAMPING_4010, // left_wrist_pitch_joint + DAMPING_4010, // left_wrist_yaw_joint + DAMPING_5020, // right_shoulder_pitch_joint + DAMPING_5020, // right_shoulder_roll_joint + DAMPING_5020, // right_shoulder_yaw_joint + DAMPING_5020, // right_elbow_joint + DAMPING_5020, // right_wrist_roll_joint + DAMPING_4010, // right_wrist_pitch_joint + DAMPING_4010, // right_wrist_yaw_joint +}; + +// Default joint angles (standing pose) +const std::array default_angles = { + -0.312, // left_hip_pitch_joint + 0.0, // left_hip_roll_joint + 0.0, // left_hip_yaw_joint + 0.669, // left_knee_joint + -0.363, // left_ankle_pitch_joint + 0.0, // left_ankle_roll_joint + -0.312, // right_hip_pitch_joint + 0.0, // right_hip_roll_joint + 0.0, // right_hip_yaw_joint + 0.669, // right_knee_joint + -0.363, // right_ankle_pitch_joint + 0.0, // right_ankle_roll_joint + 0.0, // waist_yaw_joint + 0.0, // waist_roll_joint + 0.0, // waist_pitch_joint + 0.2, // left_shoulder_pitch_joint + 0.2, // left_shoulder_roll_joint + 0.0, // left_shoulder_yaw_joint + 0.6, // left_elbow_joint + 0.0, // left_wrist_roll_joint + 0.0, // left_wrist_pitch_joint + 0.0, // left_wrist_yaw_joint + 0.2, // right_shoulder_pitch_joint + -0.2, // right_shoulder_roll_joint + 0.0, // right_shoulder_yaw_joint + 0.6, // right_elbow_joint + 0.0, // right_wrist_roll_joint + 0.0, // right_wrist_pitch_joint + 0.0 // right_wrist_yaw_joint +}; + +#endif // POLICY_PARAMETERS_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/robot_parameters.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/robot_parameters.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4d6a6f4896ccbcad668944b6a9fec0d873fbd759 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/robot_parameters.hpp @@ -0,0 +1,128 @@ +/** + * @file robot_parameters.hpp + * @brief Hardware-level constants, data structures, and joint indices for the + * Unitree G1 humanoid robot. + * + * This header defines: + * - DDS topic names for the Unitree SDK (low-level command / state channels). + * - Motor count and per-joint MotorCommand structure. + * - HeadingState – a compact struct bundling the captured IMU quaternion + * with a user-controlled delta-heading offset. + * - OperatorState – high-level start / stop / play flags. + * - Control mode enum (series vs. parallel ankle actuation). + * - G1JointIndex enum mapping symbolic joint names to hardware motor indices. + * + * All indices in this file use the **hardware / URDF ordering** (not the + * IsaacLab training ordering – see `policy_parameters.hpp` for the mapping). + */ + +#ifndef ROBOT_PARAMETERS_HPP +#define ROBOT_PARAMETERS_HPP + +#include + +// --------------------------------------------------------------------------- +// Unitree SDK DDS topic names +// --------------------------------------------------------------------------- +static const std::string HG_CMD_TOPIC = "rt/lowcmd"; ///< Low-level motor command topic. +static const std::string HG_IMU_TORSO = "rt/secondary_imu";///< Secondary (torso) IMU topic. +static const std::string HG_STATE_TOPIC = "rt/lowstate"; ///< Low-level motor / sensor state topic. + +/// Total number of actuated joints on the G1 (29-DOF configuration). +const int G1_NUM_MOTOR = 29; + +/** + * @brief Per-joint motor command sent to the low-level controller. + * + * Each field is an array of size G1_NUM_MOTOR (29), indexed by hardware joint + * index (see G1JointIndex). + */ +struct MotorCommand { + std::array q_target = {}; ///< Target position (rad). + std::array dq_target = {}; ///< Target velocity (rad/s). + std::array kp = {}; ///< Position gain (Nm/rad). + std::array kd = {}; ///< Velocity gain (Nm·s/rad). + std::array tau_ff = {}; ///< Feed-forward torque (Nm). +}; + +/** + * @brief Bundled heading state for thread-safe access via DataBuffer. + * + * Captures both the initial IMU base quaternion (set when heading is + * reinitialised) and a user-adjustable delta heading offset (adjusted via + * keyboard Q/E or D-pad). + */ +struct HeadingState { + std::array init_base_quat; ///< Captured IMU base quaternion (w,x,y,z) at init. + double delta_heading; ///< Cumulative heading offset (radians). + + HeadingState(const std::array& quat = {1.0, 0.0, 0.0, 0.0}, double delta = 0.0) + : init_base_quat(quat), delta_heading(delta) {} +}; + +/** + * @brief High-level operator signals (set by input interfaces, read by control loop). + */ +struct OperatorState { + bool stop = false; ///< Emergency stop requested. + bool start = false; ///< Control-system start requested. + bool play = false; ///< Motion playback active. +}; + +/** + * @brief Ankle actuation mode. + * + * The G1's ankle uses a coupled 2-DOF mechanism that can be controlled + * in series (pitch/roll) or parallel (A/B motor) modes. + */ +enum class Mode { + PR = 0, ///< Series control for Pitch / Roll joints. + AB = 1 ///< Parallel control for A / B motors. +}; + +/** + * @brief Symbolic names for G1 hardware joint indices (0–28). + * + * Ankle joints have dual names because they can be addressed in either + * series (Pitch/Roll) or parallel (A/B) mode. Joints marked "INVALID" + * are not present on the 23-DOF or waist-locked 29-DOF variants. + */ +enum G1JointIndex { + LeftHipPitch = 0, + LeftHipRoll = 1, + LeftHipYaw = 2, + LeftKnee = 3, + LeftAnklePitch = 4, + LeftAnkleB = 4, + LeftAnkleRoll = 5, + LeftAnkleA = 5, + RightHipPitch = 6, + RightHipRoll = 7, + RightHipYaw = 8, + RightKnee = 9, + RightAnklePitch = 10, + RightAnkleB = 10, + RightAnkleRoll = 11, + RightAnkleA = 11, + WaistYaw = 12, + WaistRoll = 13, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistA = 13, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistPitch = 14, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistB = 14, // NOTE INVALID for g1 23dof/29dof with waist locked + LeftShoulderPitch = 15, + LeftShoulderRoll = 16, + LeftShoulderYaw = 17, + LeftElbow = 18, + LeftWristRoll = 19, + LeftWristPitch = 20, // NOTE INVALID for g1 23dof + LeftWristYaw = 21, // NOTE INVALID for g1 23dof + RightShoulderPitch = 22, + RightShoulderRoll = 23, + RightShoulderYaw = 24, + RightElbow = 25, + RightWristRoll = 26, + RightWristPitch = 27, // NOTE INVALID for g1 23dof + RightWristYaw = 28 // NOTE INVALID for g1 23dof +}; + +#endif // ROBOT_PARAMETERS_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/state_logger.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/state_logger.hpp new file mode 100644 index 0000000000000000000000000000000000000000..87bcc17782cecce5e9c01fa2ef7c3aedd5cefa7a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/state_logger.hpp @@ -0,0 +1,273 @@ +/** + * @file state_logger.hpp + * @brief Thread-safe state logger with an in-memory ring buffer and split CSV + * file persistence. + * + * StateLogger serves two purposes: + * 1. **In-memory ring buffer** – Keeps the latest N entries accessible for + * real-time consumers (output interfaces, observation gathering). + * 2. **Split CSV files** – Writes one CSV file per signal for offline analysis. + * + * ## Ring Buffer + * + * - Fixed-capacity, configured at construction. + * - Each record gets a monotonically increasing index (never reused). + * - Oldest entries are silently dropped when full. + * - Thread-safe: all access is guarded by `ring_mutex_`. + * + * ## CSV Files + * + * Created in the provided directory (one file per signal): + * + * File | Content + * --------------------|-------- + * base_quat.csv | IMU base orientation (qw,qx,qy,qz) + * base_ang_vel.csv | Base angular velocity (wx,wy,wz) + * torso_quat.csv | Torso IMU orientation + * torso_ang_vel.csv | Torso angular velocity + * q.csv | Joint positions (hardware order, with default offsets) + * dq.csv | Joint velocities (hardware order) + * action.csv | Policy actions (hardware order, scaled + offset) + * motor_temperature.csv | Motor temperatures (2 per motor: winding, driver) + * left_hand_q/dq.csv | Left Dex3 hand positions / velocities + * right_hand_q/dq.csv | Right Dex3 hand positions / velocities + * left/right_hand_action.csv | Hand actions + * token_state.csv | Encoder token output + * encoder_mode.csv | Encoder mode per tick + * motion_name.csv | Active motion name per tick + * motion_playing.csv | Play/pause state per tick + * metadata.json | Robot config + logging parameters + * + * Times are normalised so the first record is 0.0 ms. + * + * ## Two-Phase Logging + * + * Each control tick calls: + * 1. `LogFullState(...)` – records IMU, joints, velocities, last action. + * 2. `LogPostState(...)` – appends encoder token state and motion metadata + * to the **same** entry (must be called after LogFullState). + * + * @note q.csv and dq.csv are transformed to raw hardware measurements + * (MuJoCo → hardware joint order, default_angles added back to q). + */ + +#pragma once + +#include "file_sink.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * @class StateLogger + * @brief Thread-safe ring-buffer logger with optional CSV persistence. + */ +class StateLogger { + public: + struct Entry { + uint64_t index = 0; + std::chrono::system_clock::time_point timestamp; // wall-clock time (for CSV logging) + std::chrono::steady_clock::time_point timestamp_monotonic; // monotonic time (for CSV logging) + double ros_timestamp = 0.0; // ROS time in seconds (for ROS message publishing) + + std::array base_quat {0, 0, 0, 0}; // qw, qx, qy, qz + std::array base_ang_vel {0, 0, 0}; // wx, wy, wz + std::array base_accel {0, 0, 0}; // ax, ay, az + std::array body_torso_quat {0, 0, 0, 0}; // qw, qx, qy, qz + std::array body_torso_ang_vel {0, 0, 0}; // wx, wy, wz + std::array body_torso_accel {0, 0, 0}; // ax, ay, az + + // Optional dynamic fields (may be empty) + std::vector body_q; // size = num_joints + std::vector body_dq; // size = num_joints + std::vector last_action; // size = num_actions + + // Motor temperature (2 values per motor: winding temp, driver temp) + std::vector motor_temperature; // size = num_joints * 2 + + // Motor error codes (one per motor, 0 = no fault) + std::vector motor_error; // size = num_joints + + // Motor estimated torque (one per motor, Nm) + std::vector motor_torque; // size = num_joints + + // Dex3 hands (7 motors each) + std::vector left_hand_q; // size = 7 (q positions) + std::vector left_hand_dq; // size = 7 (dq velocities) + std::vector right_hand_q; // size = 7 (q positions) + std::vector right_hand_dq; // size = 7 (dq velocities) + std::vector last_left_hand_action; // size = 7 + std::vector last_right_hand_action; // size = 7 + + // Post-state data (set after initial state logging via LogPostState) + bool has_post_state_data = false; + std::vector token_state; // Token/latent state from encoder + int encoder_mode = -2; // Encoder mode when token state was generated; -2: no token state, -1: need token but no encoder, 0,1,2,...: encoder mode. + std::string motion_name = ""; // Name of the motion sequence being executed + bool play = false; // Operator play state (controls motion playback) + }; + + // Logging period (seconds). Informational only; logger does not enforce cadence. + // Useful for consumers to understand intended logging frequency. + double dt = 0.0; + + /** + * Get robot configuration if it was provided during construction. + * Returns std::nullopt if no configuration was provided. + */ + std::optional>> GetConfig() const; + + /** + * Construct a logger. + * @param csv_dir Directory path for split CSV files (one file per signal) + * @param ring_capacity Max number of entries to keep in memory + * @param num_joints If >=0, include q/dq columns with this size + * @param num_actions If >=0, include action columns with this size + * @param dt_seconds Intended logging period in seconds (informational; default 0.0) + * @param enable_csv If false, disable CSV output entirely (ring buffer only; default: true) + * @param robot_config Optional robot configuration map (model paths, frequencies, etc.) - immutable after construction + */ + StateLogger(std::string csv_dir, size_t ring_capacity, int num_joints = -1, int num_actions = -1, double dt_seconds = 0.0, bool enable_csv = true, + std::map> robot_config = {}); + + // Non-copyable, movable + StateLogger(const StateLogger&) = delete; + StateLogger& operator=(const StateLogger&) = delete; + StateLogger(StateLogger&&) = default; + StateLogger& operator=(StateLogger&&) = default; + + /** + * Log the full state including joints, last action, and hand states/actions. + * Returns the assigned monotonic index. + */ + uint64_t LogFullState(const std::array& base_quat, + const std::array& base_ang_vel, + const std::array& base_accel, + const std::array& body_torso_quat, + const std::array& body_torso_ang_vel, + const std::array& body_torso_accel, + const std::span& body_q, + const std::span& body_dq, + const std::span& last_action, + const std::span& motor_temperature, + const std::span& motor_error, + const std::span& motor_torque, + const std::span& left_hand_q, + const std::span& left_hand_dq, + const std::span& right_hand_q, + const std::span& right_hand_dq, + const std::span& last_left_hand_action, + const std::span& last_right_hand_action, + double ros_timestamp = 0.0); + + /** + * Log post-state data (e.g., token state from encoder) to the most recent entry. + * This modifies the newest entry in the ring buffer without creating a new entry. + * Must be called AFTER LogFullState. Returns false if no entry exists, entry already has post-state data, + * or if the update fails. + * @param token_state Token/latent state vector from encoder + * @param encoder_mode Encoder mode value (-2: no token state, -1: need token but no encoder, 0+: encoder mode) + * @param motion_name Name of the current motion sequence being executed + * @param play Operator play state (controls motion playback) + */ + bool LogPostState(const std::span& token_state, int encoder_mode = -2, const std::string& motion_name = "", bool play = false); + + size_t capacity() const; + size_t size() const; + + // Returns copies of the latest n entries (up to available size) + // If newest_first is true (default), returns [newest, ..., oldest]; otherwise [oldest, ..., newest] + std::vector GetLatest(size_t n, bool newest_first = true) const; + + // Returns up to n entries sampled approximately every sample_dt_seconds going backward + // from the most recent entry. If sample_dt_seconds <= 0, behaves like GetLatest(n, newest_first). + // Optimized path: if dt > 0 and sample_dt_seconds is an integer multiple of dt, we select by fixed stride. + // If newest_first is true (default), returns [newest, ..., oldest]; otherwise [oldest, ..., newest] + std::vector GetLatest(size_t n, double sample_dt_seconds, bool newest_first = true) const; + + private: + // Time normalization helper + double toMillisNormalized_(const std::chrono::system_clock::time_point& t); + + // ---------- Split-file support ---------- + void appendCsvLinesSplit_(const Entry& e); + + // Append token state to CSV (called by LogPostState) + void appendTokenStateToCSV_(const Entry& e); + + // Ring buffer operations + void pushToRing_(const Entry& e); + + private: + // Configuration + std::string csv_path_; + size_t capacity_ = 1; + int configured_num_joints_ = -1; + int configured_num_actions_ = -1; + bool enable_csv_ = true; + + // Ring buffer state + mutable std::mutex ring_mutex_; + std::vector ring_; + size_t start_ = 0; // index of the oldest element + size_t size_ = 0; // number of valid elements + + // Index counter + std::atomic next_index_ {0}; + + // Split CSV file sinks + FileSink sink_base_quat_; + FileSink sink_base_ang_vel_; + FileSink sink_base_accel_; + FileSink sink_torso_quat_; + FileSink sink_torso_ang_vel_; + FileSink sink_torso_accel_; + FileSink sink_q_; + FileSink sink_dq_; + FileSink sink_action_; + FileSink sink_motor_temperature_; + FileSink sink_motor_error_; + FileSink sink_motor_torque_; + FileSink sink_left_hand_q_; + FileSink sink_left_hand_dq_; + FileSink sink_right_hand_q_; + FileSink sink_right_hand_dq_; + FileSink sink_left_hand_action_; + FileSink sink_right_hand_action_; + FileSink sink_token_state_; // Post-state data (token from encoder) + FileSink sink_encoder_mode_; // Post-state data (encoder mode) + FileSink sink_motion_playing_; // Post-state data (motion playing state) + + // Custom sink for motion_name (string data) + std::ofstream motion_name_file_; + bool motion_name_header_written_ = false; + void writeMotionNameLine_(uint64_t index, double t_ms, double t_realtime_ms, double t_monotonic_ms, double ros_timestamp, const std::string& motion_name); + + // Time normalization state (first record as zero) + std::once_flag start_once_; + std::chrono::system_clock::time_point start_time_ {}; + + // Robot configuration storage (set during construction, immutable) + std::map> robot_config_; + + // Build default logs directory logs/dd-mm-yy/hh-mm-ss and ensure it exists + static std::string getLogsDir(bool enable_csv, std::string csv_path); + static std::string buildDefaultLogsDir_(); + + // Write robot configuration metadata to JSON file + void writeConfigMetadata_(); + + Entry makeZeroEntry_() const; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/utils.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/utils.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4c24683e8888b8f114831d92a34fdfbbe84c2940 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/utils.hpp @@ -0,0 +1,297 @@ +/** + * @file utils.hpp + * @brief Core utility types: thread-safe DataBuffer and CRC32 checksum. + * + * DataBuffer is the primary mechanism for passing data between threads in + * the G1 deployment stack. It uses a shared_mutex (multiple-reader / + * single-writer) and stores data via shared_ptr for lock-free read-side + * copies. + * + * TimestampedData pairs a shared_ptr with a steady-clock + * timestamp so consumers can check data freshness. + */ + +#ifndef UTILS_HPP +#define UTILS_HPP + +#include +#include +#include +#include +#include +#include + +/** + * @brief Immutable data snapshot with a monotonic timestamp. + * @tparam T Type of the stored payload. + * + * Returned by DataBuffer::GetDataWithTime(). The `data` shared_ptr is + * safe to hold beyond the buffer's lock scope. + */ +template +struct TimestampedData { + std::shared_ptr data; + std::chrono::steady_clock::time_point timestamp; + + TimestampedData() + : data(nullptr), + timestamp {} {} + + TimestampedData(std::shared_ptr d, std::chrono::steady_clock::time_point t) + : data(d), + timestamp(t) {} + + bool HasData() const { return data != nullptr; } + + double GetAgeMs() const { + if (!HasData()) return -1.0; + auto now = std::chrono::steady_clock::now(); + auto age = std::chrono::duration_cast(now - timestamp); + return age.count() / 1000.0; + } +}; + +/** + * @brief Thread-safe data buffer with timestamp tracking + * @tparam T Type of data to store + */ +template +class DataBuffer { + public: + void SetData(const T& newData) { + std::unique_lock lock(mutex); + data = std::make_shared(newData); + last_update_time = std::chrono::steady_clock::now(); + } + + void SetData(T&& newData) { + std::unique_lock lock(mutex); + data = std::make_shared(std::move(newData)); + last_update_time = std::chrono::steady_clock::now(); + } + + // Return data with timestamp + TimestampedData GetDataWithTime() { + std::shared_lock lock(mutex); + if (data) { return TimestampedData(data, last_update_time); } + return TimestampedData(); // Empty + } + + // Const overload for read-only access + TimestampedData GetDataWithTime() const { + std::shared_lock lock(mutex); + if (data) { return TimestampedData(data, last_update_time); } + return TimestampedData(); // Empty + } + + void Clear() { + std::unique_lock lock(mutex); + data = nullptr; + last_update_time = std::chrono::steady_clock::time_point {}; // Reset timestamp + } + + private: + std::shared_ptr data; + std::chrono::steady_clock::time_point last_update_time; + mutable std::shared_mutex mutex; +}; + +/** + * @brief Calculate CRC32 checksum for data validation + * @param ptr Pointer to data array + * @param len Length of data array + * @return CRC32 checksum + */ +inline uint32_t Crc32Core(uint32_t* ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else CRC32 <<= 1; + if (data & xbit) CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +} + +class CounterDebouncer { + public: + CounterDebouncer( + int threshold = 20, + int max_counter = 100, + int increment = 10, + int decrement = 1) + : threshold_(threshold), + max_counter_(max_counter), + increment_(increment), + decrement_(decrement), + counter_(0) + {} + + bool update(bool value) { + if (value) { + counter_ += increment_; + if (counter_ > max_counter_) { + counter_ = max_counter_; + } + } else { + counter_ -= decrement_; + if (counter_ < 0) { + counter_ = 0; + } + } + + return state(); + } + + bool state() const { + return counter_ >= threshold_; + } + private: + int threshold_{}; + int increment_{}; + int decrement_{}; + int max_counter_{}; + int counter_{}; +}; + +/** + * @brief Rolling statistics buffer using Welford's algorithm for numerically stable + * online computation of mean and variance. + * + * Maintains a circular buffer of up to BUFFER_CAPACITY doubles. Uses Welford's + * algorithm which is more numerically stable than naive sum/sum-of-squares methods, + * especially for large datasets or values with large magnitudes. + * + * When the buffer is full, new values overwrite the oldest values using the + * sliding window variant of Welford's algorithm. + * + * @tparam BUFFER_CAPACITY Maximum number of values to store (default 1000). + */ +template +class RollingStats { + public: + RollingStats() + : buffer_{}, + size_(0), + head_(0), + mean_(0.0), + m2_(0.0) + {} + + /** + * @brief Push a new value into the rolling buffer using Welford's algorithm. + * + * If the buffer is not full, uses standard Welford's online algorithm. + * If the buffer is full, uses the sliding window variant that removes + * the oldest value's contribution before adding the new value. + * + * @param value The new value to add. + */ + void push(double value) { + if (size_ < BUFFER_CAPACITY) { + // Buffer not full: standard Welford's algorithm + buffer_[head_] = value; + size_++; + + // Welford's online update: + // delta = x - mean + // mean += delta / n + // delta2 = x - mean (after mean update) + // M2 += delta * delta2 + double delta = value - mean_; + mean_ += delta / static_cast(size_); + double delta2 = value - mean_; + m2_ += delta * delta2; + + head_ = (head_ + 1) % BUFFER_CAPACITY; + } else { + // Buffer full: sliding window Welford's update + double old_value = buffer_[head_]; + buffer_[head_] = value; + head_ = (head_ + 1) % BUFFER_CAPACITY; + + // Sliding window update: + // 1. Compute deltas relative to old mean + // 2. Update mean: new_mean = old_mean + (x_new - x_old) / n + // 3. Update M2: M2 += (x_new - old_mean)(x_new - new_mean) + // - (x_old - old_mean)(x_old - new_mean) + double delta_old = old_value - mean_; + double delta_new = value - mean_; + mean_ += (value - old_value) / static_cast(size_); + double delta_old_new = old_value - mean_; + double delta_new_new = value - mean_; + m2_ += (delta_new * delta_new_new) - (delta_old * delta_old_new); + } + } + + /** + * @brief Get the mean of all values in the buffer. + * @return The mean, or 0.0 if the buffer is empty. + */ + double mean() const { + return mean_; + } + + /** + * @brief Get the population variance of all values in the buffer. + * + * Computed as M2 / n using Welford's algorithm. + * + * @return The variance, or 0.0 if the buffer is empty. + */ + double variance() const { + if (size_ == 0) return 0.0; + double var = m2_ / static_cast(size_); + // Guard against small negative values due to floating-point error + return var < 0.0 ? 0.0 : var; + } + + /** + * @brief Get the population standard deviation of all values in the buffer. + * @return The standard deviation, or 0.0 if the buffer is empty. + */ + double stddev() const { + return std::sqrt(variance()); + } + + /** + * @brief Get the current number of values in the buffer. + * @return Size (0 to BUFFER_CAPACITY). + */ + size_t size() const { return size_; } + + /** + * @brief Check if the buffer is full. + * @return true if size == BUFFER_CAPACITY. + */ + bool full() const { return size_ == BUFFER_CAPACITY; } + + /** + * @brief Clear all values and reset statistics. + */ + void clear() { + size_ = 0; + head_ = 0; + mean_ = 0.0; + m2_ = 0.0; + } + + private: + std::array buffer_; + size_t size_; ///< Number of values currently in the buffer (0 to BUFFER_CAPACITY) + size_t head_; ///< Next write position in the circular buffer + double mean_; ///< Running mean (Welford's algorithm) + double m2_; ///< Sum of squared differences from the mean (Welford's algorithm) +}; + +#endif // UTILS_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/xml.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/xml.h new file mode 100644 index 0000000000000000000000000000000000000000..cb70f92f5f883a54dbf36767cc766c4f67bd5831 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/xml.h @@ -0,0 +1,503 @@ +/* + +MIT License + +Copyright (c) 2024-2025 Vlad Krupinskii + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +------------------------------------------------------------------------------ + +xml.h - Header-only C/C++ library to parse XML. + +------------------------------------------------------------------------------ + +Features: + +- One tiny header file (~400 lines of code) +- Parses regular (`Tag Text`) and self-closing tags (``) +- Parses tags attributes (``) +- Ignores comments and processing instructions + +------------------------------------------------------------------------------ + +Usage: + +Define XML_H_IMPLEMENTATION in ONE file before including "xml.h" to pull functions implementations. +In other files just include "xml.h". + +#define XML_H_IMPLEMENTATION +#include "xml.h" + +------------------------------------------------------------------------------ + +*/ + +#ifndef XML_H +#define XML_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +typedef struct XMLNode XMLNode; +typedef struct XMLList XMLList; + +// The main object to interact with parsed XML nodes. Represents single XML tag. +struct XMLNode { + char *tag; // Tag string. + char *text; // Inner text of the tag. NULL if tag has no inner text. + XMLList *attrs; // List of tag attributes. Check "node->attrs->len" if it has items. + XMLNode *parent; // Node's parent node. NULL for the root node. + XMLList *children; // List of tag's sub-tags. Check "node->children->len" if it has items. +}; + +// Tags attribute containing key and value. +// Like: +typedef struct XMLAttr { + char *key; + char *value; +} XMLAttr; + +// Simple dynamic list that only can grow in size. +// Used in XMLNode for list of children and list of tag attributes. +struct XMLList { + size_t len; // Length of the list. + size_t size; // Capacity of the list in bytes. + void **data; // List of pointers to list items. +}; + +// Parse XML string and return root XMLNode. +// Returns NULL for error. +XMLNode *xml_parse_string(const char *xml); +// Parse XML file for given path and return root XMLNode. +// Returns NULL for error. +XMLNode *xml_parse_file(const char *path); +// Get child of the node at index. +// Returns NULL if not found. +XMLNode *xml_node_child_at(XMLNode *node, size_t idx); +// Find xml tag by path like "div/p/href" +XMLNode *xml_node_find_by_path(XMLNode *root, const char *path, bool exact); +// Get first matching tag in the tree. +// If exact is "false" - will return first tag which name contains "tag" +XMLNode *xml_node_find_tag(XMLNode *node, const char *tag, bool exact); +// Get value of the tag attribute. +// Returns NULL if not found. +const char *xml_node_attr(XMLNode *node, const char *attr_key); +// Cleanup node and all it's children. +void xml_node_free(XMLNode *node); + +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // XML_H + +#ifdef XML_H_IMPLEMENTATION + +#include +#include +#include +#include +#include +#include + +// ------ UTILS ------ // + +// Print debug message. +// Only if XML_H_DEBUG is defined. +void log_debug(const char *format, ...) { + (void)format; // Avoid unused parameter warning +#ifdef XML_H_DEBUG + va_list args; + printf("[XML.H DEBUG] "); + va_start(args, format); + vprintf(format, args); + va_end(args); + printf("\n"); +#endif +} + +void log_error(const char *format, ...) { + va_list args; + printf("[XML.H ERROR] "); + va_start(args, format); + vprintf(format, args); + va_end(args); + printf("\n"); +} + +// ------ LIST ------ // + +// Create new dynamic array +XMLList *xml_list_new() { + XMLList *list = (XMLList *)malloc(sizeof(XMLList)); + list->len = 0; + list->size = 1; + list->data = (void **)malloc(sizeof(void *) * list->size); + return list; +} + +// Add element to the end of the array. Grow if needed. +void xml_list_add(XMLList *list, void *data) { + if (list->len >= list->size) { + list->size *= 2; // Exponential growth + list->data = (void **)realloc(list->data, list->size * sizeof(void *)); + } + list->data[list->len++] = data; +} + +// ------ NODE ------ // + +// Create new XMLNode. Free with xml_node_free(). +static XMLNode *xml_node_new(XMLNode *parent) { + XMLNode *node = (XMLNode *)malloc(sizeof(XMLNode)); + node->parent = parent; + node->tag = NULL; + node->text = NULL; + node->children = xml_list_new(); + node->attrs = xml_list_new(); + if (parent) xml_list_add(parent->children, node); + return node; +} + +// Add XMLAttr to the node's list of attributes +static void xml_node_add_attr(XMLNode *node, char *key, char *value) { + XMLAttr *attr = (XMLAttr *)malloc(sizeof(XMLAttr)); + attr->key = key; + attr->value = value; + xml_list_add(node->attrs, attr); +} + +XMLNode *xml_node_child_at(XMLNode *node, size_t index) { + if (index > node->children->len - 1) return NULL; + return (XMLNode *)node->children->data[index]; +} + +XMLNode *xml_node_find_tag(XMLNode *node, const char *tag, bool exact) { + if (!node || !tag) return NULL; // Invalid input + // Check if the current node matches the tag + if (node->tag && ((exact && strcmp(node->tag, tag) == 0) || (!exact && strstr(node->tag, tag) != NULL))) return node; + // Recursively search through the children of the node + for (size_t i = 0; i < node->children->len; i++) { + XMLNode *result = xml_node_find_tag((XMLNode *)node->children->data[i], tag, exact); + if (result) return result; // Return the first match found + } + // No match found in this subtree + return NULL; +} + +XMLNode *xml_node_find_by_path(XMLNode *root, const char *path, bool exact) { + if (!root || !path) return NULL; + char *tokenized_path = strdup(path); + if (!tokenized_path) return NULL; + char *segment = strtok(tokenized_path, "/"); + XMLNode *current = root; + while (segment && current) { + bool found = false; + for (size_t i = 0; i < current->children->len; i++) { + XMLNode *child = (XMLNode *)current->children->data[i]; + if ((exact && strcmp(child->tag, segment) == 0) || (!exact && strstr(child->tag, segment) != NULL)) { + current = child; + found = true; + break; + } + } + if (!found) { + free(tokenized_path); + return NULL; + } + segment = strtok(NULL, "/"); + } + free(tokenized_path); + return current; +} + +const char *xml_node_attr(XMLNode *node, const char *attr_key) { + if (!node || !attr_key) return NULL; + for (size_t i = 0; i < node->attrs->len; i++) { + XMLAttr *attr = (XMLAttr *)node->attrs->data[i]; + if (!strcmp(attr->key, attr_key)) return attr->value; + } + return NULL; +} + +void xml_node_free(XMLNode *node) { + if (node == NULL) return; + // Free text + if (node->text) free(node->text); + // Free the attributes + for (size_t i = 0; i < node->attrs->len; i++) { + XMLAttr *attr = (XMLAttr *)node->attrs->data[i]; + free(attr->key); + free(attr->value); + free(attr); + } + free(node->attrs->data); + free(node->attrs); + // Recursively free the children + for (size_t i = 0; i < node->children->len; i++) xml_node_free((XMLNode *)node->children->data[i]); + free(node->children->data); + free(node->children); + // Free the tag + if (node->tag) free(node->tag); + // Free the node itself + free(node); +} + +// ------ PARSING FUNCTIONS ------ // + +// Trim leading and trailing whitespace from a string (in place). +static void trim_text(char *text) { + char *start = text; + while (*start && isspace((unsigned char)*start)) start++; + char *dest = text; + while (*start) *dest++ = *start++; + *dest = '\0'; + dest = text + strlen(text) - 1; + while (dest >= text && isspace((unsigned char)*dest)) { + *dest = '\0'; + dest--; + } +} + +static void skip_whitespace(const char *xml, size_t *idx) { + while (isspace(xml[*idx])) (*idx)++; +} + +// Skip processing instructions and comments +// Returns true if skipped. +static bool skip_tags(const char *xml, size_t *idx) { + size_t start = *idx; + // Processing instruction + if (xml[*idx] == '?') { + while (!(xml[*idx] == '>' && xml[*idx - 1] == '?')) (*idx)++; + (*idx)++; + log_debug("Parsed processing instruction: <%.*s", (int)(*idx - start), xml + start); + return true; + } + // Comment + else if (xml[*idx] == '!' && xml[*idx + 1] == '-' && xml[*idx + 2] == '-') { + while (!(xml[*idx] == '>' && xml[*idx - 1] == '-' && xml[*idx - 2] == '-')) (*idx)++; + (*idx)++; + log_debug("Parsed comment: <%.*s", (int)(*idx - start), xml + start); + return true; + } + return false; +} + +// Parse end tag . +static void parse_end_tag(const char *xml, size_t *idx, XMLNode **curr_node) { + (*idx)++; // Skip '/' + skip_whitespace(xml, idx); + while (xml[*idx] != '>') (*idx)++; + (*idx)++; // Skip '>' + log_debug("Parsed end tag: ", (*curr_node)->tag); + *curr_node = (*curr_node)->parent; +} + +// Parse tag name +static void parse_tag_name(const char *xml, size_t *idx, XMLNode **curr_node) { + size_t tag_start = *idx; + while (!(isspace(xml[*idx]) || xml[*idx] == '>' || xml[*idx] == '/')) (*idx)++; + (*curr_node)->tag = strndup(xml + tag_start, *idx - tag_start); +} + +// Parse tag attributes +static void parse_tag_attributes(const char *xml, size_t *idx, XMLNode **curr_node) { + skip_whitespace(xml, idx); + while (!(xml[*idx] == '>' || xml[*idx] == '/')) { + // Get attribute key + size_t attr_start = *idx; + while (!(xml[*idx] == '=' || isspace(xml[*idx]))) (*idx)++; + char *attr_key = strndup(xml + attr_start, *idx - attr_start); + // Skip =" + if (isspace(xml[*idx])) skip_whitespace(xml, idx); + else if (xml[*idx] == '=') { + (*idx)++; + skip_whitespace(xml, idx); + } + char quote = xml[*idx]; + (*idx)++; // Skip opening quote + size_t value_start = *idx; + while (!(xml[*idx] == quote && xml[*idx - 1] != '\\')) (*idx)++; + char *attr_value = strndup(xml + value_start, *idx - value_start); + (*idx)++; // Skip closing quote + xml_node_add_attr(*curr_node, attr_key, attr_value); + skip_whitespace(xml, idx); + log_debug("Parsed tag attribute: <%s %s=\"%s\">", (*curr_node)->tag, attr_key, attr_value); + } +} + +static void parse_tag_inner_text(const char *xml, size_t *idx, XMLNode **curr_node) { + size_t text_start = *idx; + while (xml[*idx] != '<') (*idx)++; + if (*idx > text_start) { + (*curr_node)->text = strndup(xml + text_start, *idx - text_start); + trim_text((*curr_node)->text); + log_debug("Parsed inner text for <%s>: %s", (*curr_node)->tag, (*curr_node)->text); + } +} + +// Parse start tag. +// Returns false if the tag is self-closing like: +// Call continue if returns false. +static bool parse_tag(const char *xml, size_t *idx, XMLNode **curr_node) { + skip_whitespace(xml, idx); + // End tag + if (xml[*idx] == '/') { + parse_end_tag(xml, idx, curr_node); + return false; + } + // Create new node with current curr_node as parent + *curr_node = xml_node_new(*curr_node); + // Start tag + parse_tag_name(xml, idx, curr_node); + // Parse attributes + if (isspace(xml[*idx])) parse_tag_attributes(xml, idx, curr_node); + // Self-closing tag + if (xml[*idx] == '/') { + (*idx)++; // Skip '/' + while (xml[*idx] != '>') (*idx)++; + (*idx)++; // Consume '>' + log_debug("Parsed self-closing tag: <%s/>", (*curr_node)->tag); + *curr_node = (*curr_node)->parent; + return false; + } + // Start tag + else if (xml[*idx] == '>') { + (*idx)++; // Consume '>' + log_debug("Parsed start tag: <%s>", (*curr_node)->tag); + skip_whitespace(xml, idx); + parse_tag_inner_text(xml, idx, curr_node); + // If the next character is '<', parse the next tag + if (xml[*idx] == '<') { + (*idx)++; // Consume '<' + return parse_tag(xml, idx, curr_node); + } + return true; + } + skip_whitespace(xml, idx); + return true; +} + +XMLNode *xml_parse_string(const char *xml) { + log_debug("Parse string: %s", xml); + XMLNode *root = xml_node_new(NULL); + XMLNode *curr_node = root; + size_t idx = 0; + while (xml[idx] != '\0') { + skip_whitespace(xml, &idx); + // Parse tag + if (xml[idx] == '<') { + idx++; + skip_whitespace(xml, &idx); + if (skip_tags(xml, &idx)) continue; + if (!parse_tag(xml, &idx, &curr_node)) continue; + } + idx++; + } + log_debug("Done parsing string"); + return root; +} + +XMLNode *xml_parse_file(const char *path) { + FILE *file = fopen(path, "rb"); + if (!file) return NULL; + fseek(file, 0, SEEK_END); + long file_size = ftell(file); + fseek(file, 0, SEEK_SET); + char *buffer = (char *)malloc(file_size + 1); + if (!buffer) { + fclose(file); + return NULL; + } + size_t bytes_read = fread(buffer, 1, file_size, file); + if (bytes_read != (size_t)file_size) { + free(buffer); + fclose(file); + return NULL; + } + buffer[file_size] = '\0'; + fclose(file); + XMLNode *node = xml_parse_string(buffer); + free(buffer); + return node; +} + +#endif // XML_H_IMPLEMENTATION + +#ifdef XML_H_TEST + +// To run tests compile with: +// $ cp xml.h xml.c && cc -DXML_H_IMPLEMENTATION -DXML_H_TEST -DXML_H_DEBUG -o test xml.c && rm xml.c +// $ ./test + +const char test_xml[] = "" + "" + "" + " " + " The Great Gatsby" + " F. Scott Fitzgerald" + " " + " " + " " + " 1984" + " George Orwell" + " " + " " + " " + ""; + +int main() { + printf("Test XML:\n%s\n", test_xml); + // Parse XML string and get root node + XMLNode *root = xml_parse_string(test_xml); + // Get first child of the root node + XMLNode *library = xml_node_child_at(root, 0); + // Print ratings of all books + for (size_t i = 0; i < library->children->len; i++) { + // Get book + XMLNode *book = xml_node_child_at(library, i); + for (size_t j = 0; j < book->children->len; j++) { + // Get book child tag + XMLNode *sub_tag = xml_node_child_at(book, j); + // If tag name is "rating" - print its value + if (!strcmp(sub_tag->tag, "rating")) { + // Get rating value + const char *rating = xml_node_attr(sub_tag, "value"); + printf("Rating is %s\n", rating); + } + } + } + // Find 1st matching tag + XMLNode *title_tag = xml_node_find_tag(root, "title", true); + printf("Matching tag for 'title' = '%s'\n", title_tag->tag); + // Find 1st matching tag by path + XMLNode *author_tag = xml_node_find_by_path(root, "library/book/author", true); + printf("Matching tag for 'author' = '%s'\n", author_tag->tag); + // Cleanup and exit + xml_node_free(root); + return 0; +} + +#endif // XML_H_TEST diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/cnpy.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/cnpy.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d28578643b1097361f72bc5b2ac3be3899a8758 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/cnpy.cpp @@ -0,0 +1,340 @@ +//Copyright (C) 2011 Carl Rogers +//Released under MIT License +//license available in LICENSE file, or at http://www.opensource.org/licenses/mit-license.php + +#include"cnpy.h" +#include +#include +#include +#include +#include +#include +#include +#include + +char cnpy::BigEndianTest() { + int x = 1; + return (((char *)&x)[0]) ? '<' : '>'; +} + +char cnpy::map_type(const std::type_info& t) +{ + if(t == typeid(float) ) return 'f'; + if(t == typeid(double) ) return 'f'; + if(t == typeid(long double) ) return 'f'; + + if(t == typeid(int) ) return 'i'; + if(t == typeid(char) ) return 'i'; + if(t == typeid(short) ) return 'i'; + if(t == typeid(long) ) return 'i'; + if(t == typeid(long long) ) return 'i'; + + if(t == typeid(unsigned char) ) return 'u'; + if(t == typeid(unsigned short) ) return 'u'; + if(t == typeid(unsigned long) ) return 'u'; + if(t == typeid(unsigned long long) ) return 'u'; + if(t == typeid(unsigned int) ) return 'u'; + + if(t == typeid(bool) ) return 'b'; + + if(t == typeid(std::complex) ) return 'c'; + if(t == typeid(std::complex) ) return 'c'; + if(t == typeid(std::complex) ) return 'c'; + + else return '?'; +} + +template<> std::vector& cnpy::operator+=(std::vector& lhs, const std::string rhs) { + lhs.insert(lhs.end(),rhs.begin(),rhs.end()); + return lhs; +} + +template<> std::vector& cnpy::operator+=(std::vector& lhs, const char* rhs) { + //write in little endian + size_t len = strlen(rhs); + lhs.reserve(len); + for(size_t byte = 0; byte < len; byte++) { + lhs.push_back(rhs[byte]); + } + return lhs; +} + +void cnpy::parse_npy_header(unsigned char* buffer,size_t& word_size, std::vector& shape, bool& fortran_order) { + //std::string magic_string(buffer,6); + uint8_t major_version = *reinterpret_cast(buffer+6); + uint8_t minor_version = *reinterpret_cast(buffer+7); + uint16_t header_len = *reinterpret_cast(buffer+8); + std::string header(reinterpret_cast(buffer+9),header_len); + + size_t loc1, loc2; + + //fortran order + loc1 = header.find("fortran_order")+16; + fortran_order = (header.substr(loc1,4) == "True" ? true : false); + + //shape + loc1 = header.find("("); + loc2 = header.find(")"); + + std::regex num_regex("[0-9][0-9]*"); + std::smatch sm; + shape.clear(); + + std::string str_shape = header.substr(loc1+1,loc2-loc1-1); + while(std::regex_search(str_shape, sm, num_regex)) { + shape.push_back(std::stoi(sm[0].str())); + str_shape = sm.suffix().str(); + } + + //endian, word size, data type + //byte order code | stands for not applicable. + //not sure when this applies except for byte array + loc1 = header.find("descr")+9; + bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false); + assert(littleEndian); + + //char type = header[loc1+1]; + //assert(type == map_type(T)); + + std::string str_ws = header.substr(loc1+2); + loc2 = str_ws.find("'"); + word_size = atoi(str_ws.substr(0,loc2).c_str()); +} + +void cnpy::parse_npy_header(FILE* fp, size_t& word_size, std::vector& shape, bool& fortran_order) { + char buffer[256]; + size_t res = fread(buffer,sizeof(char),11,fp); + if(res != 11) + throw std::runtime_error("parse_npy_header: failed fread"); + std::string header = fgets(buffer,256,fp); + assert(header[header.size()-1] == '\n'); + + size_t loc1, loc2; + + //fortran order + loc1 = header.find("fortran_order"); + if (loc1 == std::string::npos) + throw std::runtime_error("parse_npy_header: failed to find header keyword: 'fortran_order'"); + loc1 += 16; + fortran_order = (header.substr(loc1,4) == "True" ? true : false); + + //shape + loc1 = header.find("("); + loc2 = header.find(")"); + if (loc1 == std::string::npos || loc2 == std::string::npos) + throw std::runtime_error("parse_npy_header: failed to find header keyword: '(' or ')'"); + + std::regex num_regex("[0-9][0-9]*"); + std::smatch sm; + shape.clear(); + + std::string str_shape = header.substr(loc1+1,loc2-loc1-1); + while(std::regex_search(str_shape, sm, num_regex)) { + shape.push_back(std::stoi(sm[0].str())); + str_shape = sm.suffix().str(); + } + + //endian, word size, data type + //byte order code | stands for not applicable. + //not sure when this applies except for byte array + loc1 = header.find("descr"); + if (loc1 == std::string::npos) + throw std::runtime_error("parse_npy_header: failed to find header keyword: 'descr'"); + loc1 += 9; + bool littleEndian = (header[loc1] == '<' || header[loc1] == '|' ? true : false); + assert(littleEndian); + + //char type = header[loc1+1]; + //assert(type == map_type(T)); + + std::string str_ws = header.substr(loc1+2); + loc2 = str_ws.find("'"); + word_size = atoi(str_ws.substr(0,loc2).c_str()); +} + +void cnpy::parse_zip_footer(FILE* fp, uint16_t& nrecs, size_t& global_header_size, size_t& global_header_offset) +{ + std::vector footer(22); + fseek(fp,-22,SEEK_END); + size_t res = fread(&footer[0],sizeof(char),22,fp); + if(res != 22) + throw std::runtime_error("parse_zip_footer: failed fread"); + + uint16_t disk_no, disk_start, nrecs_on_disk, comment_len; + disk_no = *(uint16_t*) &footer[4]; + disk_start = *(uint16_t*) &footer[6]; + nrecs_on_disk = *(uint16_t*) &footer[8]; + nrecs = *(uint16_t*) &footer[10]; + global_header_size = *(uint32_t*) &footer[12]; + global_header_offset = *(uint32_t*) &footer[16]; + comment_len = *(uint16_t*) &footer[20]; + + assert(disk_no == 0); + assert(disk_start == 0); + assert(nrecs_on_disk == nrecs); + assert(comment_len == 0); +} + +cnpy::NpyArray load_the_npy_file(FILE* fp) { + std::vector shape; + size_t word_size; + bool fortran_order; + cnpy::parse_npy_header(fp,word_size,shape,fortran_order); + + cnpy::NpyArray arr(shape, word_size, fortran_order); + size_t nread = fread(arr.data(),1,arr.num_bytes(),fp); + if(nread != arr.num_bytes()) + throw std::runtime_error("load_the_npy_file: failed fread"); + return arr; +} + +cnpy::NpyArray load_the_npz_array(FILE* fp, uint32_t compr_bytes, uint32_t uncompr_bytes) { + + std::vector buffer_compr(compr_bytes); + std::vector buffer_uncompr(uncompr_bytes); + size_t nread = fread(&buffer_compr[0],1,compr_bytes,fp); + if(nread != compr_bytes) + throw std::runtime_error("load_the_npy_file: failed fread"); + + int err; + z_stream d_stream; + + d_stream.zalloc = Z_NULL; + d_stream.zfree = Z_NULL; + d_stream.opaque = Z_NULL; + d_stream.avail_in = 0; + d_stream.next_in = Z_NULL; + err = inflateInit2(&d_stream, -MAX_WBITS); + + d_stream.avail_in = compr_bytes; + d_stream.next_in = &buffer_compr[0]; + d_stream.avail_out = uncompr_bytes; + d_stream.next_out = &buffer_uncompr[0]; + + err = inflate(&d_stream, Z_FINISH); + err = inflateEnd(&d_stream); + + std::vector shape; + size_t word_size; + bool fortran_order; + cnpy::parse_npy_header(&buffer_uncompr[0],word_size,shape,fortran_order); + + cnpy::NpyArray array(shape, word_size, fortran_order); + + size_t offset = uncompr_bytes - array.num_bytes(); + memcpy(array.data(),&buffer_uncompr[0]+offset,array.num_bytes()); + + return array; +} + +cnpy::npz_t cnpy::npz_load(std::string fname) { + FILE* fp = fopen(fname.c_str(),"rb"); + + if(!fp) { + throw std::runtime_error("npz_load: Error! Unable to open file "+fname+"!"); + } + + cnpy::npz_t arrays; + + while(1) { + std::vector local_header(30); + size_t headerres = fread(&local_header[0],sizeof(char),30,fp); + if(headerres != 30) + throw std::runtime_error("npz_load: failed fread"); + + //if we've reached the global header, stop reading + if(local_header[2] != 0x03 || local_header[3] != 0x04) break; + + //read in the variable name + uint16_t name_len = *(uint16_t*) &local_header[26]; + std::string varname(name_len,' '); + size_t vname_res = fread(&varname[0],sizeof(char),name_len,fp); + if(vname_res != name_len) + throw std::runtime_error("npz_load: failed fread"); + + //erase the lagging .npy + varname.erase(varname.end()-4,varname.end()); + + //read in the extra field + uint16_t extra_field_len = *(uint16_t*) &local_header[28]; + if(extra_field_len > 0) { + std::vector buff(extra_field_len); + size_t efield_res = fread(&buff[0],sizeof(char),extra_field_len,fp); + if(efield_res != extra_field_len) + throw std::runtime_error("npz_load: failed fread"); + } + + uint16_t compr_method = *reinterpret_cast(&local_header[0]+8); + uint32_t compr_bytes = *reinterpret_cast(&local_header[0]+18); + uint32_t uncompr_bytes = *reinterpret_cast(&local_header[0]+22); + + if(compr_method == 0) {arrays[varname] = load_the_npy_file(fp);} + else {arrays[varname] = load_the_npz_array(fp,compr_bytes,uncompr_bytes);} + } + + fclose(fp); + return arrays; +} + +cnpy::NpyArray cnpy::npz_load(std::string fname, std::string varname) { + FILE* fp = fopen(fname.c_str(),"rb"); + + if(!fp) throw std::runtime_error("npz_load: Unable to open file "+fname); + + while(1) { + std::vector local_header(30); + size_t header_res = fread(&local_header[0],sizeof(char),30,fp); + if(header_res != 30) + throw std::runtime_error("npz_load: failed fread"); + + //if we've reached the global header, stop reading + if(local_header[2] != 0x03 || local_header[3] != 0x04) break; + + //read in the variable name + uint16_t name_len = *(uint16_t*) &local_header[26]; + std::string vname(name_len,' '); + size_t vname_res = fread(&vname[0],sizeof(char),name_len,fp); + if(vname_res != name_len) + throw std::runtime_error("npz_load: failed fread"); + vname.erase(vname.end()-4,vname.end()); //erase the lagging .npy + + //read in the extra field + uint16_t extra_field_len = *(uint16_t*) &local_header[28]; + fseek(fp,extra_field_len,SEEK_CUR); //skip past the extra field + + uint16_t compr_method = *reinterpret_cast(&local_header[0]+8); + uint32_t compr_bytes = *reinterpret_cast(&local_header[0]+18); + uint32_t uncompr_bytes = *reinterpret_cast(&local_header[0]+22); + + if(vname == varname) { + NpyArray array = (compr_method == 0) ? load_the_npy_file(fp) : load_the_npz_array(fp,compr_bytes,uncompr_bytes); + fclose(fp); + return array; + } + else { + //skip past the data + uint32_t size = *(uint32_t*) &local_header[22]; + fseek(fp,size,SEEK_CUR); + } + } + + fclose(fp); + + //if we get here, we haven't found the variable in the file + throw std::runtime_error("npz_load: Variable name "+varname+" not found in "+fname); +} + +cnpy::NpyArray cnpy::npy_load(std::string fname) { + + FILE* fp = fopen(fname.c_str(), "rb"); + + if(!fp) throw std::runtime_error("npy_load: Unable to open file "+fname); + + NpyArray arr = load_the_npy_file(fp); + + fclose(fp); + return arr; +} + + + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/file_sink.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/file_sink.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff59840507e47bcc3992b0560609af2fa4b6d3c7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/file_sink.cpp @@ -0,0 +1,90 @@ +/** + * @file file_sink.cpp + * @brief Implementation of FileSink – single-signal CSV file writer. + * + * Each FileSink instance manages one CSV file. The file is opened in append + * mode (to support resumption after crash) and a header is written lazily on + * the first `writeLine()` call, once the vector size is known. + * + * Common CSV columns: index, time_ms, time_realtime_ms, time_monotonic_ms, ros_timestamp. + * Signal-specific columns are generated from the `header_prefix` + HeaderType. + */ + +#include "file_sink.hpp" + +/// Construct a FileSink; opens the file immediately if CSV is enabled. +FileSink::FileSink(bool enable_csv, std::string csv_dir, const std::string& file_prefix, const std::string& header_prefix, HeaderType type): + path_(csv_dir + "/" + file_prefix + ".csv"), + header_prefix_(header_prefix), + type_(type) +{ + if (enable_csv) { + open(); + } +} + +void FileSink::writeLine(std::uint64_t index, double t_ms, double t_realtime_ms, double t_monotonic_ms, double ros_timestamp, const std::span& arr) +{ + if (!arr.empty() && file_.good()) { + writeHeaderIfNecessary(arr.size()); + file_.setf(std::ios::fixed, std::ios::floatfield); + file_ << std::setprecision(3); + file_ << index << ',' << t_ms << ','; + file_ << t_realtime_ms << ',' << t_monotonic_ms << ','; + file_ << std::setprecision(9); + file_ << ros_timestamp; + for (double v : arr) + { + file_ << ',' << v; + } + file_ << std::endl; + } +} + +bool FileSink::fileIsEmpty(const std::string& path) { + std::ifstream fin(path, std::ios::in | std::ios::binary); + if (!fin.good()) return true; + fin.seekg(0, std::ios::end); + return fin.tellg() == 0; +} + +void FileSink::open() { + file_.open(path_, std::ios::out | std::ios::app); + if (!file_.good()) return; + header_written = !fileIsEmpty(path_) ? true : false; +} + +void FileSink::writeHeaderCommon() { + file_ << "index,time_ms,time_realtime_ms,time_monotonic_ms,ros_timestamp"; +} + +void FileSink::writeHeaderIfNecessary(std::size_t vector_size) { + if (header_written || !file_.good()) return; + + writeHeaderCommon(); + + switch (type_) { + case HeaderType::XYZ: + { + static std::array labels = {"x", "y", "z"}; + for (const auto& label : labels) { + file_ << ',' << header_prefix_ << label; + } + break; + } + case HeaderType::QUATERNION: + static std::array labels = {"w", "x", "y", "z"}; + for (const auto& label : labels) { + file_ << ',' << header_prefix_ << label; + } + break; + case HeaderType::VECTOR: + for (size_t i = 0; i < vector_size; ++i) { + file_ << ',' << header_prefix_ << "_" << i; + } + break; + } + file_ << std::endl; + header_written = true; +} + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/fk.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/fk.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b43099585f32997e205ccc5865d9e740a1b80621 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/fk.cpp @@ -0,0 +1,182 @@ +/** + * @file fk.cpp + * @brief Implementation of RobotFK – forward kinematics from MuJoCo XML. + * + * Parses a MuJoCo MJCF XML file to extract the kinematic tree (joint axes, + * body translations, rest rotations) and recursively computes world-frame + * positions and orientations via `DoFK()`. + * + * The XML parsing uses the header-only `xml.h` library (MIT, Vlad Krupinskii). + * `XML_H_IMPLEMENTATION` is defined here (and only here) to pull in the + * implementation. + * + * Joint angle indexing uses `isaaclab_to_mujoco` from policy_parameters.hpp + * to map the IsaacLab-ordered input array to the MuJoCo kinematic tree order. + */ + +#include "fk.hpp" +#include "../include/math_utils.hpp" +#include "../include/policy_parameters.hpp" + +#include + +#define XML_H_IMPLEMENTATION 1 +#include "xml.h" + +/// RAII wrapper for the xml.h parse tree – ensures xml_node_free on scope exit. +struct XMLOwner +{ + XMLOwner(const std::string &xmlfile) + { + root_ = xml_parse_file(xmlfile.c_str()); + if(!root_) + { + throw std::runtime_error("Couldn't parse xml file " + xmlfile); + } + } + + ~XMLOwner() + { + if(root_) + { + xml_node_free(root_); + } + } + + XMLNode *root_ = nullptr; +}; + +RobotFK::RobotFK(const std::string &xmlfile) +{ + XMLOwner xml(xmlfile); + XMLNode *world_body = xml_node_find_by_path(xml.root_, "mujoco/worldbody", true); + if(!world_body) + { + throw std::runtime_error("couldn't find worldbody node in " + xmlfile); + } + + XMLNode *root_body = xml_node_find_tag(world_body, "body", true); + AddNode(root_body); +} + +void RobotFK::AddNode(XMLNode *node) +{ + auto nodename = xml_node_attr(node, "name"); + nodename = nodename ? nodename : ""; + node_names_.push_back(nodename); + + size_t node_idx = node_children_.size(); + node_children_.emplace_back(); + + XMLNode *joint = xml_node_find_tag(node, "joint", true); + if(!joint) + { + throw std::runtime_error("Couldn't find joint for node " + std::string(nodename)); + } + std::array axis = {0.0, 0.0, 0.0}; + const char *axis_attr = xml_node_attr(joint, "axis"); + if(axis_attr) + { + std::istringstream iss(axis_attr); + iss >> axis[0]; + iss >> axis[1]; + iss >> axis[2]; + if(iss.fail()) + { + throw std::runtime_error("couldn't parse axis for node '" + std::string(nodename) + "'"); + } + } + axes_.push_back(axis); + + std::array pos = {0.0, 0.0, 0.0}; + const char *pos_attr = xml_node_attr(node, "pos"); + if(pos_attr) + { + std::istringstream iss(pos_attr); + iss >> pos[0]; + iss >> pos[1]; + iss >> pos[2]; + if(iss.fail()) + { + throw std::runtime_error("couldn't parse pos for node '" + std::string(nodename) + "'"); + } + } + translations_.push_back(pos); + + std::array quat = {1.0, 0.0, 0.0, 0.0}; + const char *quat_attr = xml_node_attr(node, "quat"); + if(quat_attr) + { + std::istringstream iss(quat_attr); + iss >> quat[0]; + iss >> quat[1]; + iss >> quat[2]; + iss >> quat[3]; + if(iss.fail()) + { + throw std::runtime_error("couldn't parse pos for node '" + std::string(nodename) + "'"); + } + } + rest_rotations_.push_back(quat); + + for (size_t i = 0; i < node->children->len; i++) + { + XMLNode *child = (XMLNode *)node->children->data[i]; + if (strcmp(child->tag, "body") == 0) + { + size_t child_idx = node_children_.size(); + AddNode(child); + node_children_[node_idx].push_back(child_idx); + } + } +} + +void RobotFK::FKChildren( + std::array *positions_world, + std::array *rotations_world, + int parent_idx, + const double *joint_angles +) const +{ + for(auto child_idx : node_children_[parent_idx]) + { + positions_world[child_idx] = quat_rotate(rotations_world[parent_idx], translations_[child_idx]); + positions_world[child_idx][0] += positions_world[parent_idx][0]; + positions_world[child_idx][1] += positions_world[parent_idx][1]; + positions_world[child_idx][2] += positions_world[parent_idx][2]; + + std::array child_rot = quat_from_angle_axis( + joint_angles[isaaclab_to_mujoco[child_idx-1]], + quat_rotate(rest_rotations_[child_idx], axes_[child_idx]) + ); + + rotations_world[child_idx] = quat_mul( + rotations_world[parent_idx], + quat_mul( + child_rot, + rest_rotations_[child_idx] + ) + ); + + FKChildren( + positions_world, + rotations_world, + child_idx, + joint_angles + ); + } +} + +void RobotFK::DoFK( + std::array *positions_world, + std::array *rotations_world, + const std::array &root_translation, + const std::array &root_rotation, + const double *joint_angles +) const +{ + positions_world[0] = root_translation; + rotations_world[0] = root_rotation; + + FKChildren(positions_world, rotations_world, 0, joint_angles); +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a35f0b3952e9f83b4edf14a1ab605244d1ca26a9 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/g1_deploy_onnx_ref.cpp @@ -0,0 +1,4471 @@ +/** + * @file g1_deploy_onnx_ref.cpp + * @brief Main application: deploys an RL locomotion policy on the Unitree G1 robot. + * + * This single-file application contains: + * + * - **G1Deploy** class – the top-level controller that wires together all + * sub-systems (input, output, policy, encoder, planner, hands). + * - **main()** – CLI argument parser and run-loop. + * + * ## Threading Model + * + * Four real-time threads are created by the Unitree SDK's + * `CreateRecurrentThreadEx`: + * + * Thread | Rate | Method | Responsibility + * -----------------|----------|---------------------|------------------------------- + * Input | 100 Hz | G1Deploy::Input | Poll input interface, handle commands. + * Control | 50 Hz | G1Deploy::Control | Gather obs, run policy, compute motor targets. + * Planner | 10 Hz | G1Deploy::Planner | Re-plan locomotion trajectory. + * Command Writer | 500 Hz | G1Deploy::LowCommandWriter | Publish motor commands via DDS. + * + * ## Control-Loop State Machine (ProgramState) + * + * INIT → WAIT_FOR_CONTROL → CONTROL + * + * - **INIT**: Wait for a valid LowState message from the robot. + * - **WAIT_FOR_CONTROL**: Robot is ready; wait for operator "start" signal. + * - **CONTROL**: Active policy execution – gather observations, infer actions, + * write motor commands. Exits on operator "stop" or error. + * + * ## CLI Arguments (selected) + * + * Flag | Description + * ----------------------|------------ + * --network | DDS network interface (e.g. "eth0") + * --model | Path to the policy ONNX model + * --motion-data | Directory of pre-loaded reference motions + * --obs-config | Observation config YAML + * --encoder-model | Encoder ONNX model (for token_state) + * --planner-model | Locomotion planner ONNX model + * --input-type | keyboard / gamepad / zmq / ros2 / interface_manager / gamepad_manager / zmq_manager + * --output-type | zmq / ros2 / all + * --disable-crc-check | Skip CRC validation (for MuJoCo sim) + * --planner-fp16 | Use FP16 for planner TensorRT engine + * --policy-fp16 | Use FP16 for policy TensorRT engine + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// DDS +#include +#include + +// IDL +#include +#include +#include +#include + +// TRTInference +#include + +// ONNX +#include + +// Motion Data Reader +#include "../include/motion_data_reader.hpp" + +// Math utilities +#include "../include/math_utils.hpp" + +// Observation configuration +#include "../include/observation_config.hpp" + +// New Planner Classes +#include "../include/localmotion_kplanner.hpp" +#include "../include/localmotion_kplanner_tensorrt.hpp" + +// Utility classes +#include "../include/utils.hpp" + +// Robot parameters +#include "../include/robot_parameters.hpp" +#include "../include/policy_parameters.hpp" + +// Input interface and input handlers +#include "../include/input_interface/keyboard_handler.hpp" +#include "../include/input_interface/gamepad.hpp" +#include "../include/input_interface/zmq_endpoint_interface.hpp" +#include "../include/input_interface/interface_manager.hpp" +#include "../include/input_interface/gamepad_manager.hpp" +#include "../include/input_interface/zmq_manager.hpp" + +// Output interface and output handlers +#include "../include/output_interface/output_interface.hpp" + +// Optional ROS2 input handler +#if HAS_ROS2 +#include "../include/input_interface/ros2_input_handler.hpp" +#include "../include/output_interface/ros2_output_handler.hpp" +#endif + +#include "../include/output_interface/zmq_output_handler.hpp" + +#include +#include "../include/state_logger.hpp" + +// Encoder +#include "../include/encoder.hpp" + +// Control policy +#include "../include/control_policy.hpp" + +// Dex3 hands +#include "../include/dex3_hands.hpp" + +// Error monitor +#include "../include/error_monitor.hpp" + +#include "audio_thread/audio_thread.hpp" + +// DDS +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree_hg::msg::dds_; + + + +/** + * @class G1Deploy + * @brief Top-level controller that orchestrates the entire G1 deployment pipeline. + * + * Owns and wires together: + * - InputInterface (keyboard / gamepad / ZMQ / ROS2 / managers) + * - PolicyEngine (TensorRT control policy) + * - EncoderEngine (optional TensorRT observation encoder) + * - LocalMotionPlannerBase (optional TensorRT locomotion planner) + * - Dex3Hands (optional Dex3 hand controller) + * - StateLogger (ring buffer + CSV persistence) + * - OutputInterface(s) (ZMQ / ROS2 state publishers) + * - MotionDataReader (pre-loaded reference motions) + * + * Four real-time threads handle Input (100 Hz), Control (50 Hz), + * Planner (10 Hz), and Command Writing (500 Hz). + */ +class G1Deploy { + private: + /// State machine for the control loop lifecycle. + enum class ProgramState { INIT, WAIT_FOR_CONTROL, CONTROL }; + + // ========================================================================= + // Core timing, mode, and counters + // ========================================================================= + double time_; ///< Elapsed time since start (used during INIT ramp-up). + double publish_dt_; ///< Command writer period (500 Hz = 0.002 s). + double control_dt_; ///< Control loop period (50 Hz = 0.02 s). + double planner_dt_; ///< Planner loop period (10 Hz = 0.1 s). + double input_dt_; ///< Input poll period (100 Hz = 0.01 s). + double duration_; ///< Duration of the INIT ramp-up to default pose (3 s). + int counter_; ///< General-purpose tick counter. + Mode mode_pr_; ///< Ankle control mode (series PR vs. parallel AB). + uint8_t mode_machine_; ///< Robot variant code received from LowState. + + // ========================================================================= + // Input interface and buffered input data + // ========================================================================= + std::unique_ptr input_interface_; + + // Buffered input data (the real data to the policy engine) + // has_*_data_ flags indicate whether the getter returned valid buffered data (true) or defaults (false) + bool has_vr_3point_data_ = false; + std::array vr_3point_position_buffer_; + std::array vr_3point_orientation_buffer_; + std::array vr_3point_compliance_buffer_; + bool has_vr_5point_data_ = false; + std::array vr_5point_position_buffer_; + std::array vr_5point_orientation_buffer_; + bool has_left_hand_data_ = false; + bool has_right_hand_data_ = false; + std::array left_hand_joint_buffer_; + std::array right_hand_joint_buffer_; + bool has_upper_body_data_ = false; + std::array upper_body_joint_positions_buffer_; + std::array upper_body_joint_velocities_buffer_; + std::vector token_state_data_; // Token buffer (size from config) + + // ========================================================================= + // Motion data, current motion, and recording + // ========================================================================= + // Motion data reader and current motion + MotionDataReader motion_reader_; + + // Current motion and frame (using shared_ptr for thread safety) + std::shared_ptr current_motion_ = nullptr; + int current_frame_ = 0; + int saved_frame_for_observation_window_ = 0; // for observation window + std::mutex current_motion_mutex_; // for current motion and frame synchronization + + // ========================================================================= + // Local motion planner and movement state + // ========================================================================= + // New unified planner interface + std::string planner_path; + std::unique_ptr planner_; + std::shared_ptr planner_motion_; + + // Movement momentum system + MovementState last_movement_state_ = MovementState(static_cast(LocomotionMode::IDLE), {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, -1.0f, -1.0f); + float replan_interval_running_ = 0.1; + float replan_interval_crawling_ = 0.2; + float replan_interval_boxing_ = 1.0; + float replan_interval_ = 1.0; + float replan_interval_counter_ = 0.0f; + + // Idle-mode error-based readaptation with double-threshold state machine. + // States: IDLE (do nothing), ADAPTING (toward robot state), RECOVERING (toward planner target). + // Each state has a trigger threshold (enter) and stop threshold (exit). + enum class IdleReadaptState { IDLE, ADAPTING, RECOVERING }; + std::array idle_readapt_original_targets_{}; + bool idle_readapt_stored_ = false; + IdleReadaptState idle_readapt_state_ = IdleReadaptState::IDLE; + static constexpr double kAdaptTrigger = 0.10; // rad: start adapting + static constexpr double kAdaptStop = 0.05; // rad: stop adapting → IDLE + static constexpr double kRecoverTrigger = 0.045; // rad: start recovering + + + // ========================================================================= + // Low-level robot I/O buffers, channels, and threads + // ========================================================================= + // Flag to disable CRC checking for MuJoCo simulation + bool disable_crc_check_ = false; + + bool reinitialize_heading_ = true; + bool report_temperature_ = false; + std::string pending_tts_; // One-shot TTS message, consumed by GatherInputInterfaceData() + + // Per-motor high temperature hysteresis (enter at >= 90, exit at < 85) + std::array motor_high_temp_ = {}; + static constexpr int16_t HIGH_TEMP_ENTER = 90; + static constexpr int16_t HIGH_TEMP_EXIT = 85; + bool high_temp_warning_ = false; + std::string high_temp_message_; + + std::array init_ref_data_root_rot_array_; + + DataBuffer low_state_buffer_; + DataBuffer motor_command_buffer_; + DataBuffer imu_torso_buffer_; + DataBuffer heading_state_buffer_; + DataBuffer movement_state_buffer_; + + ChannelPublisherPtr lowcmd_publisher_; + ChannelSubscriberPtr lowstate_subscriber_; + ChannelSubscriberPtr imutorso_subscriber_; + ThreadPtr input_thread_ptr_, command_writer_ptr_, control_thread_ptr_, planner_thread_ptr_; + + // ========================================================================= + // External clients and peripheral managers + // ========================================================================= + std::unique_ptr msc_; + + // Dex3 hands manager + Dex3Hands dex3_hands_; + + // Motor error monitor (tracks fault state transitions) + ErrorMonitor error_monitor_; + + static constexpr std::chrono::milliseconds STREAMING_DATA_ABSENT_THRESHOLD{150}; + CounterDebouncer streaming_data_absent_debouncer_{100, 500, 50, 1}; + RollingStats<1000> streaming_data_delay_rolling_stats_; + std::unique_ptr audio_thread_; + + // ========================================================================= + // Program state and last commanded actions + // ========================================================================= + static constexpr std::chrono::milliseconds LOW_STATE_LATE_THRESHOLD{50}; + static constexpr std::chrono::milliseconds LOW_STATE_ABSENT_THRESHOLD{500}; + ProgramState program_state_; + std::array last_action; + std::array last_left_hand_action; + std::array last_right_hand_action; + + // ========================================================================= + // Logging / recording streams + // ========================================================================= + std::unique_ptr target_motion_file_; + std::unique_ptr planner_motion_file_; + std::unique_ptr policy_input_file_; + std::unique_ptr record_input_file_; + std::unique_ptr playback_input_file_; + + // Motion recorders for streamed and planner_motion + MotionRecorder zmq_motion_recorder_; + MotionRecorder planner_motion_recorder_; + bool enable_motion_recording_ = false; + + // ========================================================================= + // Initial compliance values for VR 3-point control (set from command line) + // These are keyboard-controlled and are the ONLY source of compliance values + // ========================================================================= + std::array initial_vr_3point_compliance_ = {0.5, 0.5, 0.0}; + + // Initial max close ratio for Dex3 hands (set from command line) + // Default 1.0 allows full closure, use --max-close-ratio to limit + // Keyboard controls (J/K) always available for runtime adjustment + double initial_max_close_ratio_ = 1.0; + + // Track if vr_3point_compliance is observed by the policy + // If false, adjusting compliance via keyboard has no effect on the policy + bool has_vr_3point_compliance_obs_ = false; + + // Independent logging counter (not affected by planner buffer cleaning) + int logging_counter_ = 0; + TimestampedData used_low_state_data_; + TimestampedData used_imu_torso_data_; + + // State logger + std::unique_ptr state_logger_; + + // Output interfaces (supports multiple simultaneous outputs) + std::vector> output_interfaces_; + + // ========================================================================= + // Core ML components (encoder + policy) and interfaces + // ========================================================================= + // Encoder engine + std::string model_path; + std::unique_ptr encoder_engine_; + EncoderConfig encoder_config_; // Encoder configuration from observation config + bool is_using_encoder_ = false; + int initial_encoder_mode_ = -2; // -2: no token state. -1: need token state but no encoder. 0,1,2,...: encoder mode. + int last_logged_encoder_mode_ = -999; // Track last logged mode to avoid spam + + // Token input safety tracking + bool first_token_received_ = false; // True once we've received at least one token + std::optional last_token_time_; // Timestamp of last token received + static constexpr std::chrono::milliseconds TOKEN_TIMEOUT_MS{200}; // Max time between tokens before warning (200ms = 5Hz min) + + // Control policy + std::unique_ptr policy_engine_; + + // ========================================================================= + // Observation system configuration and runtime state + // ========================================================================= + // Function pointer type for observation functions (returns bool for success/failure) + // Functions read from internal state (state_logger_, current_motion_, etc.) + // and write to the provided target buffer at the given offset + using ObservationFunction = std::function&, size_t)>; + + // Observation registry - single place to define all observations + struct ObservationRegistry { + std::string name; + size_t dimension; + ObservationFunction function; + + ObservationRegistry(const std::string& n, size_t d, ObservationFunction f) + : name(n), dimension(d), function(f) {} + }; + + // Structure for active observation function with metadata + struct ActiveObservation { + std::string name; + ObservationFunction function; + size_t offset; + size_t dimension; + + ActiveObservation(const std::string& n, ObservationFunction f, size_t off, size_t dim) + : name(n), function(f), offset(off), dimension(dim) {} + }; + + // Pre-allocated observation buffers to avoid allocation in control loop + std::vector obs_buffer_; // Policy observation buffer + std::vector encoder_obs_buffer_; // Encoder observation buffer + + // Observation configuration + std::vector obs_config_; + + // Active observation functions (validated and ready for runtime) + std::vector active_obs_functions_; + + // Active encoder observation functions (for encoder input) + std::vector active_encoder_obs_functions_; + + // VR3Point index + std::array actual_vr_3point_index = {-1, -1, -1}; + + // VR5Point index + std::array actual_vr_5point_index = {-1, -1, -1, -1, -1}; + + // ========================================================================= + // Motion-based observation gatherers + // + // These functions read from the currently-active MotionSequence to build + // observation vectors for the policy neural network. They support + // multi-frame look-ahead (gathering future frames at a configurable + // step interval) for temporal context. + // + // Each gatherer writes its output into `target_buffer` at `offset` and + // updates `saved_frame_for_observation_window_` so that streamed motions + // know how many look-ahead frames are needed before the end. + // ========================================================================= + + /// Gather root Z position from N future frames (1 value per frame). + bool GatherMotionRootZPositionMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid body data + if (current_motion_->GetNumBodies() == 0) { + std::cerr << "✗ Error: Motion has no bodies - cannot gather root z position" << std::endl; + return false; + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + // Gather root z position from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + const auto motion_root_z_pos = current_motion_->BodyPositions(target_frame)[0][2]; + target_buffer[offset + frame_idx * 1] = motion_root_z_pos; + } + return true; + } + + /// Gather body positions from N future frames (3 values per body per frame). + /// If body_part_indexes is empty, gathers all bodies; otherwise only the specified subset. + bool GatherMotionBodyPositionsMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, std::vector body_part_indexes = {}) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid body data + if (current_motion_->GetNumBodies() == 0) { + std::cerr << "✗ Error: Motion has no bodies - cannot gather body positions" << std::endl; + return false; + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + // Gather positions from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + const auto motion_body_pos = current_motion_->BodyPositions(target_frame); + + // If body part indexes are empty, gather all bodies (all x, y, z coordinates) + if (body_part_indexes.empty()) { + size_t num_bodies = current_motion_->GetNumBodies(); + size_t frame_offset = offset + frame_idx * num_bodies * 3; // 3 coordinates per body + + std::vector all_body_pos(num_bodies * 3); + for (size_t i = 0; i < num_bodies; i++) { + all_body_pos[i * 3 + 0] = motion_body_pos[i][0]; // x + all_body_pos[i * 3 + 1] = motion_body_pos[i][1]; // y + all_body_pos[i * 3 + 2] = motion_body_pos[i][2]; // z + } + std::copy( + all_body_pos.begin(), + all_body_pos.end(), + target_buffer.begin() + frame_offset + ); + // If body part indexes are not empty, gather only the needed bodies + } else { + // Get motion's body part indexes to map desired body index to storage index + const auto& motion_body_indexes = current_motion_->BodyPartIndexes(); + + size_t frame_offset = offset + frame_idx * body_part_indexes.size() * 3; // 3 coordinates per body + std::vector needed_body_pos(body_part_indexes.size() * 3); + + for (size_t i = 0; i < body_part_indexes.size(); i++) { + int desired_body_index = body_part_indexes[i]; + + // Find which storage index corresponds to this body index + int storage_index = -1; + for (size_t j = 0; j < motion_body_indexes.size(); j++) { + if (motion_body_indexes[j] == desired_body_index) { + storage_index = static_cast(j); + break; + } + } + + // Extract all x, y, z coordinates + if (storage_index < 0) { + std::cerr << "✗ Error: Body index " << desired_body_index + << " not found in motion data. Available indices: ["; + for (size_t j = 0; j < motion_body_indexes.size(); j++) { + std::cerr << motion_body_indexes[j]; + if (j + 1 < motion_body_indexes.size()) std::cerr << ", "; + } + std::cerr << "]" << std::endl; + return false; + } + + needed_body_pos[i * 3 + 0] = motion_body_pos[storage_index][0]; // x + needed_body_pos[i * 3 + 1] = motion_body_pos[storage_index][1]; // y + needed_body_pos[i * 3 + 2] = motion_body_pos[storage_index][2]; // z + } + std::copy( + needed_body_pos.begin(), + needed_body_pos.end(), + target_buffer.begin() + frame_offset + ); + } + } + return true; + } + + /** + * @brief Gather the heading-corrected anchor orientation from N future frames. + * + * Computes the relative rotation from the robot's current base orientation + * to the heading-corrected reference orientation at each future frame. + * Outputs the first two columns of the 3×3 rotation matrix (6 values per frame). + * + * Also handles heading reinitialisation when `reinitialize_heading_` is set. + */ + /** + * @brief Update heading state — must be called once per control tick BEFORE gathering observations. + * + * Handles heading reinitialisation (when operator triggers reset) and + * ensures init_ref_data_root_rot_array_ is set when starting from frame 0. + * This shared state is consumed by all orientation observation functions. + */ + void UpdateHeadingState() { + if (!current_motion_ || current_motion_->timesteps == 0) { return; } + if (current_motion_->GetNumBodyQuaternions() == 0) { return; } + if (!state_logger_) { return; } + + if (reinitialize_heading_) { + double sample_dt = control_dt_; + auto hist = state_logger_->GetLatest(1, sample_dt); + const auto& base_quat = hist[0].base_quat; + + heading_state_buffer_.SetData(HeadingState(base_quat, 0.0)); + reinitialize_heading_ = false; + const auto motion_body_quat_init = current_motion_->BodyQuaternions(current_frame_); + init_ref_data_root_rot_array_ = motion_body_quat_init[0]; + std::cout << "Reset heading state to " << base_quat[0] << ", " << base_quat[1] << ", " << base_quat[2] << ", " << base_quat[3] << std::endl; + std::cout << "Reset delta heading to 0" << std::endl; + std::cout << "Reset init reference data root rotation to current frame: " << init_ref_data_root_rot_array_[0] << ", " << init_ref_data_root_rot_array_[1] << ", " << init_ref_data_root_rot_array_[2] << ", " << init_ref_data_root_rot_array_[3] << std::endl; + std::cout << "**********************************************************" << std::endl; + std::cout << "Reference motion name: " << current_motion_->name << std::endl; + std::cout << "**********************************************************" << std::endl; + } + + if (current_frame_ == 0) { + const auto motion_body_quat_init = current_motion_->BodyQuaternions(0); + init_ref_data_root_rot_array_ = motion_body_quat_init[0]; + } + } + + /** + * @brief Compute the apply_delta_heading quaternion from current heading state. + * + * This is a pure computation with no side effects — safe to call from any + * observation function. Reads heading_state_buffer_ and init_ref_data_root_rot_array_. + */ + std::array ComputeApplyDeltaHeading() { + auto heading_state_data = heading_state_buffer_.GetDataWithTime().data; + HeadingState heading_state = heading_state_data ? *heading_state_data : HeadingState(); + + auto init_heading = calc_heading_quat_d(heading_state.init_base_quat); + auto data_heading_inv = calc_heading_quat_inv_d(init_ref_data_root_rot_array_); + auto apply_delta_heading = quat_mul_d(init_heading, data_heading_inv); + + if (heading_state.delta_heading != 0.0) { + auto delta_quat = euler_z_to_quat_d(heading_state.delta_heading); + apply_delta_heading = quat_mul_d(delta_quat, apply_delta_heading); + } + return apply_delta_heading; + } + + /** + * @brief Gather anchor orientation from N future frames with configurable orientation mode. + * + * @param orientation_mode Controls which quaternion is used as the "left" side of the diff: + * - 0: full base quaternion (existing motion_anchor_ori_b) + * - 1: robot heading only (heading setting: motion_anchor_ori_heading) + * - 2: reference first-frame heading (refheading setting: motion_anchor_ori_refheading) + */ + bool GatherMotionAnchorOrientationMutiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, int orientation_mode = 0) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + if (current_motion_->GetNumBodyQuaternions() == 0) { + std::cout << "✗ Error: No motion_body_quat data available. Stopping control system." << std::endl; + return false; + } + if (!state_logger_) { return false; } + + double sample_dt = control_dt_; + auto hist = state_logger_->GetLatest(1, sample_dt); + const auto& base_quat = hist[0].base_quat; + + auto apply_delta_heading = ComputeApplyDeltaHeading(); + + // For refheading mode (2): pre-compute the first future frame's ref heading + // This is used as the "left" quaternion for ALL frames in the loop + std::array ref_first_heading = {1.0, 0.0, 0.0, 0.0}; + if (orientation_mode == 2) { + int first_target_frame = static_cast(current_frame_); + // first future frame is always frame_idx=0, so no step offset + if (first_target_frame >= static_cast(current_motion_->timesteps)) { + first_target_frame = static_cast(current_motion_->timesteps) - 1; + } + const auto first_body_quat = current_motion_->BodyQuaternions(first_target_frame); + auto first_ref_rot = quat_mul_d(apply_delta_heading, first_body_quat[0]); + ref_first_heading = calc_heading_quat_d(first_ref_rot); + } + + // Gather orientations from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + // Get reference data root rotation at this target frame (first body part, index 0) + const auto motion_body_quat = current_motion_->BodyQuaternions(target_frame); + std::array ref_data_root_rot_array = motion_body_quat[0]; + + // Calculate new reference root rotation with heading applied + auto new_ref_root_rot = quat_mul_d(apply_delta_heading, ref_data_root_rot_array); + + // Calculate relative rotation based on orientation_mode: + // 0: full base quaternion (motion_anchor_ori_b) + // 1: robot heading only (motion_anchor_ori_heading) + // 2: reference first-frame heading (motion_anchor_ori_refheading) + std::array left_quat; + if (orientation_mode == 1) { + left_quat = calc_heading_quat_d(base_quat); + } else if (orientation_mode == 2) { + left_quat = ref_first_heading; + } else { + left_quat = base_quat; + } + auto base_to_ref_quat = quat_mul_d(quat_conjugate_d(left_quat), new_ref_root_rot); + auto rotation_matrix = quat_to_rotation_matrix_d(base_to_ref_quat); + + // Extract first 2 columns of rotation matrix and flatten ROW-WISE to 1D array (6 elements) + // Python: .as_matrix()[..., :2].reshape(1, -1) flattens row by row + std::array motion_anchor_ori_b = { + rotation_matrix[0][0], rotation_matrix[0][1], // Row 0, cols 0-1 + rotation_matrix[1][0], rotation_matrix[1][1], // Row 1, cols 0-1 + rotation_matrix[2][0], rotation_matrix[2][1] // Row 2, cols 0-1 + }; + + // Copy to observation buffer at the appropriate offset for this frame + size_t frame_offset = offset + frame_idx * 6; // 6 values per frame + std::copy(motion_anchor_ori_b.begin(), motion_anchor_ori_b.end(), target_buffer.begin() + frame_offset); + } + + return true; + } + + /** + * @brief Gather heading_diff_robot_ref: yaw diff from robot to reference first frame. + * + * Used by g1_dyn decoder in the refheading setting. + * Output: 6D rotation = quat_to_6d(quat_inv(robot_heading) * ref_first_heading) + */ + bool GatherHeadingDiffRobotRef(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { return false; } + if (current_motion_->GetNumBodyQuaternions() == 0) { return false; } + if (!state_logger_) { return false; } + + double sample_dt = control_dt_; + auto hist = state_logger_->GetLatest(1, sample_dt); + const auto& base_quat = hist[0].base_quat; + + auto apply_delta_heading = ComputeApplyDeltaHeading(); + + // Get reference root quat at current frame (first future frame = frame_0) + int first_frame = static_cast(current_frame_); + if (first_frame >= static_cast(current_motion_->timesteps)) { + first_frame = static_cast(current_motion_->timesteps) - 1; + } + const auto first_body_quat = current_motion_->BodyQuaternions(first_frame); + auto ref_root_rot = quat_mul_d(apply_delta_heading, first_body_quat[0]); + + // Compute: quat_inv(robot_heading) * ref_first_heading + auto robot_heading = calc_heading_quat_d(base_quat); + auto ref_first_heading = calc_heading_quat_d(ref_root_rot); + auto diff_quat = quat_mul_d(quat_conjugate_d(robot_heading), ref_first_heading); + + auto rotation_matrix = quat_to_rotation_matrix_d(diff_quat); + std::array heading_diff = { + rotation_matrix[0][0], rotation_matrix[0][1], + rotation_matrix[1][0], rotation_matrix[1][1], + rotation_matrix[2][0], rotation_matrix[2][1] + }; + std::copy(heading_diff.begin(), heading_diff.end(), target_buffer.begin() + offset); + return true; + } + + /// Gather joint positions from N future frames. If joint_indexes is empty, gathers all 29. + /// When upper-body control is active (has_upper_body_data_), replaces upper-body joints with + /// the externally-provided targets. + bool GatherMotionJointPositionsMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, std::vector joint_indexes = {}) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid joint data + const auto num_joints = current_motion_->GetNumJoints(); + if (num_joints == 0) { + std::cerr << "✗ Error: Motion has no joints - cannot gather joint positions" << std::endl; + return false; + } + // Validate requested joint indexes + for (int idx : joint_indexes) { + if (idx < 0 || idx >= static_cast(num_joints)) { + std::cerr << "✗ Error: joint index " << idx + << " is out of range [0, " << (num_joints - 1) + << "] in GatherMotionJointPositionsMultiFrame" << std::endl; + return false; + } + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + // Gather positions from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + const auto motion_joint_pos = current_motion_->JointPositions(target_frame); + + // If body part indexes are empty, gather all joints + if (joint_indexes.empty()) { + size_t frame_offset = offset + frame_idx * 29; // 29 joints per frame + std::copy( + motion_joint_pos, + motion_joint_pos + num_joints, + target_buffer.begin() + frame_offset + ); + + // If upper body control is enabled, use upper body joint positions in buffer to replace the motion_joint_pos + if (has_upper_body_data_) { + std::array current_motion_joint_pos; + for (size_t i = 0; i < 29; i++) { + current_motion_joint_pos[i] = motion_joint_pos[i]; + } + for (size_t i = 0; i < 17; i++) { + current_motion_joint_pos[upper_body_joint_isaaclab_order_in_isaaclab_index[i]] = upper_body_joint_positions_buffer_[i]; + } + std::copy( + current_motion_joint_pos.begin(), + current_motion_joint_pos.end(), + target_buffer.begin() + frame_offset + ); + } + + // If body part indexes are not empty, gather only the needed joints + } else { + size_t frame_offset = offset + frame_idx * joint_indexes.size(); + std::vector needed_joints_pos(joint_indexes.size()); + for (size_t i = 0; i < joint_indexes.size(); i++) { + size_t body_part_index = joint_indexes[i]; + needed_joints_pos[i] = motion_joint_pos[body_part_index]; + } + std::copy( + needed_joints_pos.begin(), + needed_joints_pos.end(), + target_buffer.begin() + frame_offset + ); + } + } + + return true; + } + + /// Gather joint velocities from N future frames. Zeroes velocities when not playing. + bool GatherMotionJointVelocitiesMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, std::vector joint_indexes = {}) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid joint data + const auto num_joints = current_motion_->GetNumJoints(); + if (num_joints == 0) { + std::cerr << "✗ Error: Motion has no joints - cannot gather joint velocities" << std::endl; + return false; + } + // Validate requested joint indexes + for (int idx : joint_indexes) { + if (idx < 0 || idx >= static_cast(num_joints)) { + std::cerr << "✗ Error: joint index " << idx + << " is out of range [0, " << (num_joints - 1) + << "] in GatherMotionJointVelocitiesMultiFrame" << std::endl; + return false; + } + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + // Gather velocities from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate frame index (current frame + frame_idx * step_size for future frames) + int target_frame = static_cast(current_frame_) + frame_idx * step_size; + + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + + const auto motion_joint_vel = current_motion_->JointVelocities(target_frame); + + // If body part indexes are empty, gather all joints + if (joint_indexes.empty()) { + size_t frame_offset = offset + frame_idx * 29; // 29 joints per frame + if (operator_state.play) { + std::copy( + motion_joint_vel, + motion_joint_vel + num_joints, + target_buffer.begin() + frame_offset + ); + // If upper body control is enabled, use upper body joint velocities in buffer to replace the motion_joint_vel + if (has_upper_body_data_) { + std::array current_motion_joint_vel; + for (size_t i = 0; i < 29; i++) { + current_motion_joint_vel[i] = motion_joint_vel[i]; + } + for (size_t i = 0; i < 17; i++) { + current_motion_joint_vel[upper_body_joint_isaaclab_order_in_isaaclab_index[i]] = upper_body_joint_velocities_buffer_[i]; + } + std::copy( + current_motion_joint_vel.begin(), + current_motion_joint_vel.end(), + target_buffer.begin() + frame_offset + ); + } + } else { + std::fill_n( + target_buffer.begin() + frame_offset, + num_joints, + 0.0 + ); + } + // If body part indexes are not empty, gather only the needed joints + } else { + size_t frame_offset = offset + frame_idx * joint_indexes.size(); + if (operator_state.play) { + std::vector needed_joints_vel(joint_indexes.size()); + for (size_t i = 0; i < joint_indexes.size(); i++) { + size_t body_part_index = joint_indexes[i]; + needed_joints_vel[i] = motion_joint_vel[body_part_index]; + } + std::copy( + needed_joints_vel.begin(), + needed_joints_vel.end(), + target_buffer.begin() + frame_offset + ); + } else { + std::fill_n( + target_buffer.begin() + frame_offset, + joint_indexes.size(), + 0.0 + ); + } + } + } + + return true; + } + + /// Gather SMPL joint positions from N future frames (3 values × num_smpl_joints per frame). + bool GatherMotionSmplJointsMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, std::vector smpl_indexes = {}) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid SMPL joint data + const auto num_smpl_joints = current_motion_->GetNumSmplJoints(); + if (num_smpl_joints == 0) { + std::cerr << "✗ Error: Motion has no SMPL joints - cannot gather SMPL joint data" << std::endl; + return false; + } + // Validate requested SMPL joint indexes + for (int idx : smpl_indexes) { + if (idx < 0 || idx >= static_cast(num_smpl_joints)) { + std::cerr << "✗ Error: SMPL joint index " << idx + << " is out of range [0, " << (num_smpl_joints - 1) + << "] in GatherMotionSmplJointsMultiFrame" << std::endl; + return false; + } + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + + // Gather SMPL joints from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + const auto motion_smpl_joints = current_motion_->SmplJoints(target_frame); + + // If indexes are empty, gather all SMPL joints (all x, y, z coordinates) + if (smpl_indexes.empty()) { + size_t frame_offset = offset + frame_idx * num_smpl_joints * 3; // 3 coordinates per joint + + for (size_t j = 0; j < num_smpl_joints; ++j) { + target_buffer[frame_offset + j * 3 + 0] = motion_smpl_joints[j][0]; // x + target_buffer[frame_offset + j * 3 + 1] = motion_smpl_joints[j][1]; // y + target_buffer[frame_offset + j * 3 + 2] = motion_smpl_joints[j][2]; // z + } + // If indexes are not empty, gather only the needed SMPL joints + } else { + size_t frame_offset = offset + frame_idx * smpl_indexes.size() * 3; + for (size_t i = 0; i < smpl_indexes.size(); i++) { + size_t smpl_idx = smpl_indexes[i]; + target_buffer[frame_offset + i * 3 + 0] = motion_smpl_joints[smpl_idx][0]; // x + target_buffer[frame_offset + i * 3 + 1] = motion_smpl_joints[smpl_idx][1]; // y + target_buffer[frame_offset + i * 3 + 2] = motion_smpl_joints[smpl_idx][2]; // z + } + } + } + + return true; + } + + /// Gather SMPL pose (axis-angle) data from N future frames (3 values × num_smpl_poses per frame). + bool GatherMotionSmplPosesMultiFrame(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 5, std::vector pose_indexes = {}) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Check if motion has valid SMPL pose data + const auto num_smpl_poses = current_motion_->GetNumSmplPoses(); + if (num_smpl_poses == 0) { + std::cerr << "✗ Error: Motion has no SMPL poses - cannot gather SMPL pose data" << std::endl; + return false; + } + // Validate requested SMPL pose indexes + for (int idx : pose_indexes) { + if (idx < 0 || idx >= static_cast(num_smpl_poses)) { + std::cerr << "✗ Error: SMPL pose index " << idx + << " is out of range [0, " << (num_smpl_poses - 1) + << "] in GatherMotionSmplPosesMultiFrame" << std::endl; + return false; + } + } + saved_frame_for_observation_window_ = std::max(saved_frame_for_observation_window_, (num_frames - 1) * step_size + 1); + + // Gather SMPL poses from multiple future frames with step intervals + for (int frame_idx = 0; frame_idx < num_frames; frame_idx++) { + // Calculate target frame: if playing, advance through frames; if not playing, hold current frame + int target_frame = static_cast(current_frame_); + if (operator_state.play) { + target_frame += frame_idx * step_size; + // If beyond motion length, clamp to last frame (hold final pose) + if (target_frame >= static_cast(current_motion_->timesteps)) { + target_frame = static_cast(current_motion_->timesteps) - 1; + } + } + + const auto motion_smpl_poses = current_motion_->SmplPoses(target_frame); + + // If indexes are empty, gather all SMPL poses (all x, y, z coordinates) + if (pose_indexes.empty()) { + size_t frame_offset = offset + frame_idx * num_smpl_poses * 3; // 3 coordinates per pose + + for (size_t p = 0; p < num_smpl_poses; ++p) { + target_buffer[frame_offset + p * 3 + 0] = motion_smpl_poses[p][0]; // x + target_buffer[frame_offset + p * 3 + 1] = motion_smpl_poses[p][1]; // y + target_buffer[frame_offset + p * 3 + 2] = motion_smpl_poses[p][2]; // z + } + // If indexes are not empty, gather only the needed SMPL poses + } else { + size_t frame_offset = offset + frame_idx * pose_indexes.size() * 3; + for (size_t i = 0; i < pose_indexes.size(); i++) { + size_t pose_idx = pose_indexes[i]; + target_buffer[frame_offset + i * 3 + 0] = motion_smpl_poses[pose_idx][0]; // x + target_buffer[frame_offset + i * 3 + 1] = motion_smpl_poses[pose_idx][1]; // y + target_buffer[frame_offset + i * 3 + 2] = motion_smpl_poses[pose_idx][2]; // z + } + } + } + + return true; + } + + // ========================================================================= + // VR 3/5-point observation helpers and gatherers + // + // VR tracking data can come from two sources: + // 1. External input interface (ZMQ / ROS2) → use buffered values directly. + // 2. Computed from motion body positions with per-body offsets, then + // normalised to the root body frame. + // + // The UpdateVR*PointIndices() helpers map the canonical VR body indices + // (e.g. left wrist = body 28) to storage indices in the current + // motion's BodyPartIndexes array (which varies between motions). + // ========================================================================= + + /// Map canonical VR 3-point body indices to current motion's storage indices. + /// @return True if all 3 required indices were found. + bool UpdateVR3PointIndices() { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + auto body_part_indexes = current_motion_->BodyPartIndexes(); + + // Reset indices + actual_vr_3point_index = {-1, -1, -1}; + + // Find positions of required indices + for (size_t i = 0; i < body_part_indexes.size(); i++) { + for (size_t j = 0; j < vr_3point_index.size(); j++) { + if (body_part_indexes[i] == vr_3point_index[j] && actual_vr_3point_index[j] == -1) { + actual_vr_3point_index[j] = static_cast(i); + break; // Take first occurrence, move to next body part + } + } + } + + // Validate that all required indices were found + for (size_t j = 0; j < actual_vr_3point_index.size(); j++) { + if (actual_vr_3point_index[j] == -1) { + // VR3Point index not found - will fall back to interface values + return false; + } + } + + return true; + } + + // Helper function to update VR3Point indices for current motion + // Returns true if all indices found, false otherwise + bool UpdateVR5PointIndices() { + if (!current_motion_ || current_motion_->timesteps == 0) { return false; } + + auto body_part_indexes = current_motion_->BodyPartIndexes(); + + // Reset indices + actual_vr_5point_index = {-1, -1, -1, -1, -1}; + + // Find positions of required indices + for (size_t i = 0; i < body_part_indexes.size(); i++) { + for (size_t j = 0; j < vr_5point_index.size(); j++) { + if (body_part_indexes[i] == vr_5point_index[j] && actual_vr_5point_index[j] == -1) { + actual_vr_5point_index[j] = static_cast(i); + break; // Take first occurrence, move to next body part + } + } + } + + // Validate that all required indices were found + for (size_t j = 0; j < actual_vr_5point_index.size(); j++) { + if (actual_vr_5point_index[j] == -1) { + // VR5Point index not found - will fall back to interface values + return false; + } + } + + return true; + } + + bool GatherVR3PointPosition(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + + // 1. Input interface providing VR 3-point (ZMQ, ROS2) -> use buffer + // 2. Otherwise -> compute from motion body positions with offsets + bool use_buffered_vr3 = has_vr_3point_data_; + + if (use_buffered_vr3) { + // Use VR 3-point data from input interface directly + // The sender (ZMQ/ROS2/planner) has already applied offsets and root normalization + std::copy(vr_3point_position_buffer_.begin(), vr_3point_position_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // No external VR 3-point data - compute from motion's body positions + // Update VR3Point indices for current motion (different motions have different BodyPartIndexes) + // If indices not found, fall back to buffered interface values (fallback to default values) + if (!UpdateVR3PointIndices()) { + std::copy(vr_3point_position_buffer_.begin(), vr_3point_position_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // read from current motion + int frame = current_frame_ % current_motion_->timesteps; + const auto& motion_body_pos = current_motion_->BodyPositions(frame); + const auto& motion_body_quat = current_motion_->BodyQuaternions(frame); + + // VR 3-point offsets in body's local frame (matching ros2_input_handler.hpp and visualize_motion.py) + // Order: left_wrist (index 0), right_wrist (index 1), head/torso (index 2) + // NOTE: Y-axis is mirrored for right wrist (symmetric robot) + constexpr std::array, 3> VR_3POINT_OFFSETS = {{ + {0.18, -0.025, 0.0}, // left wrist offset + {0.18, +0.025, 0.0}, // right wrist offset (Y mirrored for symmetry) + {0.0, 0.0, 0.35} // head offset (applied to torso body) + }}; + + // Apply offsets to body positions to get VR 3-point positions + std::array vr_3point_position; + for (int i = 0; i < 3; ++i) { + // Get body position and orientation + const auto& body_pos = motion_body_pos[actual_vr_3point_index[i]]; + const auto& body_quat = motion_body_quat[actual_vr_3point_index[i]]; + + // Rotate offset by body orientation to get offset in world frame + auto offset_world = quat_rotate_d(body_quat, VR_3POINT_OFFSETS[i]); + + // Add rotated offset to body position to get VR point position + vr_3point_position[i * 3 + 0] = body_pos[0] + offset_world[0]; + vr_3point_position[i * 3 + 1] = body_pos[1] + offset_world[1]; + vr_3point_position[i * 3 + 2] = body_pos[2] + offset_world[2]; + } + + // normalize positions to the root by - root_pos rotate and normalize the root_quat + auto root_pos = current_motion_->BodyPositions(frame)[0]; + auto root_quat = current_motion_->BodyQuaternions(frame)[0]; + + // Normalize each VR 3-point position relative to root + // Apply inverse transformation: subtract root position, then rotate by inverse root quaternion + auto root_quat_inv = quat_conjugate_d(root_quat); // Get inverse quaternion + + for (int i = 0; i < 3; ++i) { + // Extract position for this VR point + std::array point_pos = { + vr_3point_position[i * 3 + 0], + vr_3point_position[i * 3 + 1], + vr_3point_position[i * 3 + 2] + }; + + // Make position relative to root (subtract root position) + std::array relative_pos = { + point_pos[0] - root_pos[0], + point_pos[1] - root_pos[1], + point_pos[2] - root_pos[2] + }; + + // Rotate relative position by inverse root quaternion + auto normalized_pos = quat_rotate_d(root_quat_inv, relative_pos); + + // Store normalized position back to the array + vr_3point_position[i * 3 + 0] = normalized_pos[0]; + vr_3point_position[i * 3 + 1] = normalized_pos[1]; + vr_3point_position[i * 3 + 2] = normalized_pos[2]; + } + + std::copy( + vr_3point_position.begin(), + vr_3point_position.end(), + target_buffer.begin() + offset + ); + + // Update buffer with the computed value from dataset + vr_3point_position_buffer_ = vr_3point_position; + + return true; + } + + bool GatherVR3PointOrientation(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + bool use_buffered_vr3 = has_vr_3point_data_; + + if (use_buffered_vr3) { + std::copy(vr_3point_orientation_buffer_.begin(), vr_3point_orientation_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // No external VR 3-point data - compute from motion's body positions + // Update VR3Point indices for current motion (different motions have different BodyPartIndexes) + // If indices not found, fall back to buffered interface values (fallback to default values) + if (!UpdateVR3PointIndices()) { + std::copy(vr_3point_orientation_buffer_.begin(), vr_3point_orientation_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // read from current motion + int frame = current_frame_ % current_motion_->timesteps; + const auto& motion_body_quat = current_motion_->BodyQuaternions(frame); + + // Copy quaternions to observation buffer (flatten 3x4D quaternions to 12 values) + std::array vr_3point_orientation = { + motion_body_quat[actual_vr_3point_index[0]][0], motion_body_quat[actual_vr_3point_index[0]][1], motion_body_quat[actual_vr_3point_index[0]][2], motion_body_quat[actual_vr_3point_index[0]][3], // Quat 0: w,x,y,z + motion_body_quat[actual_vr_3point_index[1]][0], motion_body_quat[actual_vr_3point_index[1]][1], motion_body_quat[actual_vr_3point_index[1]][2], motion_body_quat[actual_vr_3point_index[1]][3], // Quat 1: w,x,y,z + motion_body_quat[actual_vr_3point_index[2]][0], motion_body_quat[actual_vr_3point_index[2]][1], motion_body_quat[actual_vr_3point_index[2]][2], motion_body_quat[actual_vr_3point_index[2]][3] // Quat 2: w,x,y,z + }; + + // Normalize quaternions relative to root quaternion: quat_mul(quat_inv(root_quat), vr_quat) + auto root_quat = current_motion_->BodyQuaternions(frame)[0]; + auto root_quat_inv = quat_conjugate_d(root_quat); // Get inverse quaternion + + for (int i = 0; i < 3; ++i) { + // Extract quaternion for this VR point + std::array point_quat = { + vr_3point_orientation[i * 4 + 0], // w + vr_3point_orientation[i * 4 + 1], // x + vr_3point_orientation[i * 4 + 2], // y + vr_3point_orientation[i * 4 + 3] // z + }; + + // Apply quaternion normalization: quat_mul(quat_inv(root_quat), vr_quat) + auto normalized_quat = quat_mul_d(root_quat_inv, point_quat); + + // Store normalized quaternion back to the array + vr_3point_orientation[i * 4 + 0] = normalized_quat[0]; // w + vr_3point_orientation[i * 4 + 1] = normalized_quat[1]; // x + vr_3point_orientation[i * 4 + 2] = normalized_quat[2]; // y + vr_3point_orientation[i * 4 + 3] = normalized_quat[3]; // z + } + + std::copy( + vr_3point_orientation.begin(), + vr_3point_orientation.end(), + target_buffer.begin() + offset + ); + + // Update buffer with the computed value from dataset + vr_3point_orientation_buffer_ = vr_3point_orientation; + + return true; + } + + + bool GatherVR5PointPosition(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + if (current_motion_ && current_motion_ == planner_motion_){ + // if planner motion, read from buffered interface data + std::copy(vr_5point_position_buffer_.begin(), vr_5point_position_buffer_.end(), target_buffer.begin() + offset); + return true; + } else { + // Update VR3Point indices for current motion (different motions have different BodyPartIndexes) + // If indices not found, fall back to buffered interface values + if (!UpdateVR5PointIndices()) { + std::copy(vr_5point_position_buffer_.begin(), vr_5point_position_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // read from current motion + int frame = current_frame_ % current_motion_->timesteps; + const auto& motion_body_pos = current_motion_->BodyPositions(frame); + const auto& motion_body_quat = current_motion_->BodyQuaternions(frame); + + // VR 3-point offsets in body's local frame (matching ros2_input_handler.hpp and visualize_motion.py) + // Order: left_wrist (index 0), right_wrist (index 1), head/torso (index 2) + // NOTE: Y-axis is mirrored for right wrist (symmetric robot) + constexpr std::array, 5> VR_5POINT_OFFSETS = { + std::array{0.0, 0.0, 0.0}, // left wrist offset + std::array{0.0, 0.0, 0.0}, // right wrist offset (Y mirrored for symmetry) + std::array{0.0, 0.0, 0.0}, // head offset (applied to torso body) + std::array{0.0, 0.0, 0.0}, // left ankle offset + std::array{0.0, 0.0, 0.0} // right ankle offset + }; + + // Apply offsets to body positions to get VR 3-point positions + std::array vr_5point_position; + for (int i = 0; i < 5; ++i) { + // Get body position and orientation + const auto& body_pos = motion_body_pos[actual_vr_5point_index[i]]; + const auto& body_quat = motion_body_quat[actual_vr_5point_index[i]]; + + // Rotate offset by body orientation to get offset in world frame + auto offset_world = quat_rotate_d(body_quat, VR_5POINT_OFFSETS[i]); + + // Add rotated offset to body position to get VR point position + vr_5point_position[i * 3 + 0] = body_pos[0] + offset_world[0]; + vr_5point_position[i * 3 + 1] = body_pos[1] + offset_world[1]; + vr_5point_position[i * 3 + 2] = body_pos[2] + offset_world[2]; + } + + // normalize positions to the root by - root_pos rotate and normalize the root_quat + auto root_pos = current_motion_->BodyPositions(frame)[0]; + auto root_quat = current_motion_->BodyQuaternions(frame)[0]; + + // Normalize each VR 3-point position relative to root + // Apply inverse transformation: subtract root position, then rotate by inverse root quaternion + auto root_quat_inv = quat_conjugate_d(root_quat); // Get inverse quaternion + + for (int i = 0; i < 5; ++i) { + // Extract position for this VR point + std::array point_pos = { + vr_5point_position[i * 3 + 0], + vr_5point_position[i * 3 + 1], + vr_5point_position[i * 3 + 2] + }; + + // Make position relative to root (subtract root position) + std::array relative_pos = { + point_pos[0] - root_pos[0], + point_pos[1] - root_pos[1], + point_pos[2] - root_pos[2] + }; + + // Rotate relative position by inverse root quaternion + auto normalized_pos = quat_rotate_d(root_quat_inv, relative_pos); + + // Store normalized position back to the array + vr_5point_position[i * 3 + 0] = normalized_pos[0]; + vr_5point_position[i * 3 + 1] = normalized_pos[1]; + vr_5point_position[i * 3 + 2] = normalized_pos[2]; + } + + std::copy( + vr_5point_position.begin(), + vr_5point_position.end(), + target_buffer.begin() + offset + ); + + // Update buffer with the computed value from dataset + vr_5point_position_buffer_ = vr_5point_position; + + return true; + } + return false; + } + + bool GatherVR5PointOrientation(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + + if (current_motion_ && current_motion_ == planner_motion_){ + std::copy(vr_5point_orientation_buffer_.begin(), vr_5point_orientation_buffer_.end(), target_buffer.begin() + offset); + return true; + } else { + // Update VR3Point indices for current motion (different motions have different BodyPartIndexes) + // If indices not found, fall back to buffered interface values + if (!UpdateVR5PointIndices()) { + std::copy(vr_5point_orientation_buffer_.begin(), vr_5point_orientation_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // read from current motion + int frame = current_frame_ % current_motion_->timesteps; + const auto& motion_body_quat = current_motion_->BodyQuaternions(frame); + + // Copy quaternions to observation buffer (flatten 3x4D quaternions to 12 values) + std::array vr_5point_orientation = { + motion_body_quat[actual_vr_5point_index[0]][0], motion_body_quat[actual_vr_5point_index[0]][1], motion_body_quat[actual_vr_5point_index[0]][2], motion_body_quat[actual_vr_5point_index[0]][3], // Quat 0: w,x,y,z + motion_body_quat[actual_vr_5point_index[1]][0], motion_body_quat[actual_vr_5point_index[1]][1], motion_body_quat[actual_vr_5point_index[1]][2], motion_body_quat[actual_vr_5point_index[1]][3], // Quat 1: w,x,y,z + motion_body_quat[actual_vr_5point_index[2]][0], motion_body_quat[actual_vr_5point_index[2]][1], motion_body_quat[actual_vr_5point_index[2]][2], motion_body_quat[actual_vr_5point_index[2]][3], // Quat 2: w,x,y,z + motion_body_quat[actual_vr_5point_index[3]][0], motion_body_quat[actual_vr_5point_index[3]][1], motion_body_quat[actual_vr_5point_index[3]][2], motion_body_quat[actual_vr_5point_index[3]][3], // Quat 3: w,x,y,z + motion_body_quat[actual_vr_5point_index[4]][0], motion_body_quat[actual_vr_5point_index[4]][1], motion_body_quat[actual_vr_5point_index[4]][2], motion_body_quat[actual_vr_5point_index[4]][3] // Quat 4: w,x,y,z + }; + + // Normalize quaternions relative to root quaternion: quat_mul(quat_inv(root_quat), vr_quat) + auto root_quat = current_motion_->BodyQuaternions(frame)[0]; + auto root_quat_inv = quat_conjugate_d(root_quat); // Get inverse quaternion + + for (int i = 0; i < 5; ++i) { + // Extract quaternion for this VR point + std::array point_quat = { + vr_5point_orientation[i * 4 + 0], // w + vr_5point_orientation[i * 4 + 1], // x + vr_5point_orientation[i * 4 + 2], // y + vr_5point_orientation[i * 4 + 3] // z + }; + + // Apply quaternion normalization: quat_mul(quat_inv(root_quat), vr_quat) + auto normalized_quat = quat_mul_d(root_quat_inv, point_quat); + + // Store normalized quaternion back to the array + vr_5point_orientation[i * 4 + 0] = normalized_quat[0]; // w + vr_5point_orientation[i * 4 + 1] = normalized_quat[1]; // x + vr_5point_orientation[i * 4 + 2] = normalized_quat[2]; // y + vr_5point_orientation[i * 4 + 3] = normalized_quat[3]; // z + } + + std::copy( + vr_5point_orientation.begin(), + vr_5point_orientation.end(), + target_buffer.begin() + offset + ); + + // Update buffer with the computed value from dataset + vr_5point_orientation_buffer_ = vr_5point_orientation; + + return true; + } + return false; + } + + bool GatherVR3PointCompliance(std::vector& target_buffer, size_t offset) { + if (!current_motion_ || current_motion_->timesteps == 0) { + return false; + } + // Compliance always comes from interface (not from motion dataset) + std::copy(vr_3point_compliance_buffer_.begin(), vr_3point_compliance_buffer_.end(), target_buffer.begin() + offset); + return true; + } + + // ========================================================================= + // History-based observation gatherers (from StateLogger) + // + // These functions read past robot state from the StateLogger ring buffer + // to provide temporal context to the policy. They support multi-frame + // history with configurable step size (e.g., 4 frames at 1× dt = last + // 4 ticks; 10 frames at 2× dt = last 20 ticks sampled every other one). + // + // Each returns false if the required historical data is unavailable. + // ========================================================================= + + /// Gather historical body joint positions (num_frames × joints_per_frame). + bool GatherHisBodyJointPositions(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 1, std::vector body_part_indexes = {}, bool newest_first = false) { + if (!state_logger_) { return false; } + // step_size here means: sample every step_size * dt (e.g., step_size=2 means 0, 2*dt, 4*dt, ...) + double sample_dt = control_dt_ * step_size; + auto hist = state_logger_->GetLatest(static_cast(num_frames), sample_dt, newest_first); + + // Check if we have valid historical data + if (hist.empty() || hist[0].body_q.empty()) { + std::cerr << "✗ Error: No historical joint position data available" << std::endl; + return false; + } + const auto joints = static_cast(hist[0].body_q.size()); + // Validate requested joint indexes + for (int idx : body_part_indexes) { + if (idx < 0 || idx >= joints) { + std::cerr << "✗ Error: body joint index " << idx + << " is out of range [0, " << (joints - 1) + << "] in GatherHisBodyJointPositions" << std::endl; + return false; + } + } + + for (int f = 0; f < num_frames; ++f) { + const auto &entry = hist[static_cast(f)]; + if (body_part_indexes.empty()) { + // All joints + size_t frame_offset = offset + static_cast(f) * joints; + if (!entry.body_q.empty()) { + std::copy(entry.body_q.begin(), entry.body_q.begin() + joints, target_buffer.begin() + frame_offset); + } else { + std::fill_n(target_buffer.begin() + frame_offset, joints, 0.0); + } + } else { + // Specific joints + size_t frame_offset = offset + static_cast(f) * body_part_indexes.size(); + if (!entry.body_q.empty()) { + for (size_t i = 0; i < body_part_indexes.size(); ++i) { + int idx = body_part_indexes[i]; + target_buffer[frame_offset + i] = (idx >= 0 && static_cast(idx) < entry.body_q.size()) ? entry.body_q[static_cast(idx)] : 0.0; + } + } else { + std::fill_n(target_buffer.begin() + frame_offset, body_part_indexes.size(), 0.0); + } + } + } + return true; + } + + bool GatherHisBodyJointVelocities(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 1, std::vector body_part_indexes = {}, bool newest_first = false) { + if (!state_logger_) { return false; } + double sample_dt = control_dt_ * step_size; + auto hist = state_logger_->GetLatest(static_cast(num_frames), sample_dt, newest_first); + + // Check if we have valid historical data + if (hist.empty() || hist[0].body_dq.empty()) { + std::cerr << "✗ Error: No historical joint velocity data available" << std::endl; + return false; + } + const auto joints = static_cast(hist[0].body_dq.size()); + // Validate requested joint indexes + for (int idx : body_part_indexes) { + if (idx < 0 || idx >= joints) { + std::cerr << "✗ Error: body joint index " << idx + << " is out of range [0, " << (joints - 1) + << "] in GatherHisBodyJointVelocities" << std::endl; + return false; + } + } + + for (int f = 0; f < num_frames; ++f) { + const auto &entry = hist[static_cast(f)]; + if (body_part_indexes.empty()) { + size_t frame_offset = offset + static_cast(f) * joints; + if (!entry.body_dq.empty()) { + std::copy(entry.body_dq.begin(), entry.body_dq.begin() + joints, target_buffer.begin() + frame_offset); + } else { + std::fill_n(target_buffer.begin() + frame_offset, joints, 0.0); + } + } else { + size_t frame_offset = offset + static_cast(f) * body_part_indexes.size(); + if (!entry.body_dq.empty()) { + for (size_t i = 0; i < body_part_indexes.size(); ++i) { + int idx = body_part_indexes[i]; + target_buffer[frame_offset + i] = (idx >= 0 && static_cast(idx) < entry.body_dq.size()) ? entry.body_dq[static_cast(idx)] : 0.0; + } + } else { + std::fill_n(target_buffer.begin() + frame_offset, body_part_indexes.size(), 0.0); + } + } + } + return true; + } + + bool GatherHisLastActions(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 1, std::vector body_part_indexes = {}, bool newest_first = false) { + if (!state_logger_) { return false; } + double sample_dt = control_dt_ * step_size; + auto hist = state_logger_->GetLatest(static_cast(num_frames), sample_dt, newest_first); + + // Check if we have valid historical data + if (hist.empty() || hist[0].last_action.empty()) { + std::cerr << "✗ Error: No historical last action data available" << std::endl; + return false; + } + const auto joints = static_cast(hist[0].last_action.size()); + // Validate requested joint indexes + for (int idx : body_part_indexes) { + if (idx < 0 || idx >= joints) { + std::cerr << "✗ Error: body joint index " << idx + << " is out of range [0, " << (joints - 1) + << "] in GatherHisLastActions" << std::endl; + return false; + } + } + + for (int f = 0; f < num_frames; ++f) { + const auto &entry = hist[static_cast(f)]; + if (body_part_indexes.empty()) { + size_t frame_offset = offset + static_cast(f) * joints; + if (!entry.last_action.empty()) { + std::copy(entry.last_action.begin(), entry.last_action.begin() + joints, target_buffer.begin() + frame_offset); + } else { + std::fill_n(target_buffer.begin() + frame_offset, joints, 0.0); + } + } else { + size_t frame_offset = offset + static_cast(f) * body_part_indexes.size(); + if (!entry.last_action.empty()) { + for (size_t i = 0; i < body_part_indexes.size(); ++i) { + int idx = body_part_indexes[i]; + target_buffer[frame_offset + i] = (idx >= 0 && static_cast(idx) < entry.last_action.size()) ? entry.last_action[static_cast(idx)] : 0.0; + } + } else { + std::fill_n(target_buffer.begin() + frame_offset, body_part_indexes.size(), 0.0); + } + } + } + return true; + } + + bool GatherHisBaseAngularVelocity(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 1, bool newest_first = false) { + if (!state_logger_) { return false; } + double sample_dt = control_dt_ * step_size; + auto hist = state_logger_->GetLatest(static_cast(num_frames), sample_dt, newest_first); + + // Check if we have valid historical data + if (hist.empty()) { + std::cerr << "✗ Error: No historical base angular velocity data available" << std::endl; + return false; + } + + for (int f = 0; f < num_frames; ++f) { + const auto &entry = hist[static_cast(f)]; + size_t frame_offset = offset + static_cast(f) * 3; + target_buffer[frame_offset + 0] = entry.base_ang_vel[0]; + target_buffer[frame_offset + 1] = entry.base_ang_vel[1]; + target_buffer[frame_offset + 2] = entry.base_ang_vel[2]; + } + return true; + } + + bool GatherHisGravityDir(std::vector& target_buffer, size_t offset, int num_frames = 5, int step_size = 1, bool newest_first = false) { + if (!state_logger_) { return false; } + double sample_dt = control_dt_ * step_size; + auto hist = state_logger_->GetLatest(static_cast(num_frames), sample_dt, newest_first); + + // Check if we have valid historical data + if (hist.empty()) { + std::cerr << "✗ Error: No historical gravity direction data available" << std::endl; + return false; + } + + for (int f = 0; f < num_frames; ++f) { + const auto &entry = hist[static_cast(f)]; + auto gravity_dir_inv = quat_conjugate_d(entry.base_quat); + std::array gravity_dir = quat_rotate_d(gravity_dir_inv, {0.0, 0.0, -1.0}); + size_t frame_offset = offset + static_cast(f) * 3; + target_buffer[frame_offset + 0] = gravity_dir[0]; + target_buffer[frame_offset + 1] = gravity_dir[1]; + target_buffer[frame_offset + 2] = gravity_dir[2]; + } + return true; + } + + // ========================================================================= + // Token / encoder observation gatherers + // + // The token state can be produced in two ways: + // 1. Local encoder: GatherEncoderObservations() fills the encoder's + // input buffer, Encode() runs TensorRT inference, and the output + // tokens are copied into token_state_data_. + // 2. External source: token_state_data_ was already populated in + // GatherInputInterfaceData() from ZMQ / ROS2. + // ========================================================================= + + /// Populate the token_state observation (either from local encoder or external data). + bool GatherTokenState(std::vector& target_buffer, size_t offset) { + if (!is_using_encoder_) { + // No encoder configured; use token_state_data_ (can be set externally via ROS2/ZMQ) + std::copy(token_state_data_.begin(), token_state_data_.end(), target_buffer.begin() + offset); + return true; + } + + if (!encoder_engine_) { + std::cerr << "✗ Error: Encoder engine not initialized!" << std::endl; + return false; + } + + // Gather encoder observations (populate encoder's internal input buffer) + if (!GatherEncoderObservations()) { + std::cerr << "✗ Error: Failed to gather encoder observations!" << std::endl; + return false; + } + + // Run encoder inference (handles CPU→GPU transfer, inference, GPU→CPU transfer) + if (!encoder_engine_->Encode()) { + std::cerr << "✗ Error: Encoder inference failed" << std::endl; + return false; + } + + // Access encoded tokens from encoder's internal buffer (already populated by Encode) + auto& token_buffer = encoder_engine_->GetTokenBuffer(); + const size_t token_dim = encoder_engine_->GetTokenDimension(); + + // Validate token dimension matches expected size + if (token_dim != token_state_data_.size()) { + std::cerr << "✗ Error: Encoder output dimension (" << token_dim + << ") doesn't match token state buffer size (" << token_state_data_.size() << ")!" << std::endl; + return false; + } + + for (size_t i = 0; i < token_dim; ++i) { + const double v = static_cast(token_buffer[i]); + token_state_data_[i] = v; + target_buffer[offset + i] = v; + } + return true; + } + + bool GatherEncoderMode(std::vector& target_buffer, size_t offset, int fill_zeros_num = 0) { + target_buffer[offset] = static_cast(current_motion_->GetEncodeMode()); + for (int i = 1; i <= fill_zeros_num; ++i) { + target_buffer[offset + i] = 0; + } + return true; + } + + // ========================================================================= + // Observation registry + // + // Single source of truth mapping observation names (as they appear in + // observation_config.yaml) to their dimension and gatherer lambda. + // Both the policy and encoder observation systems use this registry. + // ========================================================================= + + /// Build the complete observation registry (name, dimension, gatherer function). + std::vector GetObservationRegistry() { + // Use token dimension from encoder config (defaults to 64 if not configured) + size_t token_dim = (encoder_config_.dimension > 0) ? encoder_config_.dimension : 64; + return {{"token_state", token_dim, [this](std::vector& buf, size_t offset) { return GatherTokenState(buf, offset); }}, + {"encoder_mode", 3, [this](std::vector& buf, size_t offset) { return GatherEncoderMode(buf, offset, 2); }}, + {"encoder_mode_4", 4, [this](std::vector& buf, size_t offset) { return GatherEncoderMode(buf, offset, 3); }}, + {"motion_joint_positions", 29, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 1, 1); }}, + {"motion_joint_velocities", 29, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 1, 1); }}, + {"motion_anchor_orientation", 6, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 1, 1); }}, + {"motion_root_z_position", 1, [this](std::vector& buf, size_t offset) { return GatherMotionRootZPositionMultiFrame(buf, offset, 1, 1); }}, + {"motion_root_z_position_10frame_step5", 10, [this](std::vector& buf, size_t offset) { return GatherMotionRootZPositionMultiFrame(buf, offset, 10, 5); }}, + {"motion_root_z_position_10frame_step1", 10, [this](std::vector& buf, size_t offset) { return GatherMotionRootZPositionMultiFrame(buf, offset, 10, 1); }}, + {"motion_root_z_position_3frame_step1", 3, [this](std::vector& buf, size_t offset) { return GatherMotionRootZPositionMultiFrame(buf, offset, 3, 1); }}, + {"motion_anchor_orientation_10frame_step5", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 5); }}, + {"motion_anchor_orientation_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1); }}, + // Heading-only variants (mode=1): use robot yaw-only quaternion + // Matches Python heading setting: quat_mul(quat_inv(get_heading_q(robot_pelvis_quat)), ref_quat) + {"motion_anchor_orientation_heading", 6, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 1, 1, 1); }}, + {"motion_anchor_orientation_heading_10frame_step5", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 5, 1); }}, + {"motion_anchor_orientation_heading_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1, 1); }}, + // Refheading variants (mode=2): use reference first-frame yaw-only quaternion (no robot state) + // Matches Python refheading setting: quat_mul(quat_inv(get_heading_q(ref_first_frame)), ref_quat) + {"motion_anchor_orientation_refheading", 6, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 1, 1, 2); }}, + {"motion_anchor_orientation_refheading_10frame_step5", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 5, 2); }}, + {"motion_anchor_orientation_refheading_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1, 2); }}, + {"motion_joint_positions_10frame_step5", 290, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 10, 5); }}, + {"motion_joint_velocities_10frame_step5", 290, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 10, 5); }}, + {"motion_joint_positions_10frame_step1", 290, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 10, 1); }}, + {"motion_joint_velocities_10frame_step1", 290, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 10, 1); }}, + {"motion_joint_positions_3frame_step1", 87, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 3, 1); }}, + {"motion_joint_velocities_3frame_step1", 87, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 3, 1); }}, + {"motion_joint_positions_lowerbody_10frame_step5", 120, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 10, 5, lower_body_joint_mujoco_order_in_isaaclab_index); }}, + {"motion_joint_velocities_lowerbody_10frame_step5", 120, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 10, 5, lower_body_joint_mujoco_order_in_isaaclab_index); }}, + {"motion_joint_positions_lowerbody_10frame_step1", 120, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 10, 1, lower_body_joint_mujoco_order_in_isaaclab_index); }}, + {"motion_joint_velocities_lowerbody_10frame_step1", 120, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 10, 1, lower_body_joint_mujoco_order_in_isaaclab_index); }}, + {"motion_joint_positions_wrists_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 10, 1, wrist_joint_isaaclab_order_in_isaaclab_index); }}, + {"motion_joint_positions_wrists_2frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 2, 1, wrist_joint_isaaclab_order_in_isaaclab_index); }}, + {"motion_joint_positions_wrists_4frame_step1", 24, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 4, 1, wrist_joint_isaaclab_order_in_isaaclab_index); }}, // low-latency SONIC (smpl 4-frame) + {"motion_joint_velocities_wrists_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 10, 1, wrist_joint_isaaclab_order_in_isaaclab_index); }}, + {"motion_joint_positions_5frame_step5", 145, [this](std::vector& buf, size_t offset) { return GatherMotionJointPositionsMultiFrame(buf, offset, 5, 5); }}, + {"motion_joint_velocities_5frame_step5", 145, [this](std::vector& buf, size_t offset) { return GatherMotionJointVelocitiesMultiFrame(buf, offset, 5, 5); }}, + // SMPL data gathering (dimensions assume 24 joints, 21 poses - adjust based on actual data) + {"smpl_joints", 72, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 1, 1); }}, // 24*3 + {"smpl_joints_5frame_step5", 360, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 5, 5); }}, // 24*3*5 + {"smpl_joints_10frame_step5", 720, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 10, 5); }}, // 24*3*10 + {"smpl_joints_10frame_step1", 720, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 10, 1); }}, // 24*3*10 + {"smpl_joints_lower_10frame_step1", 270, [this](std::vector& buf, size_t offset) {return GatherMotionSmplJointsMultiFrame(buf, offset, 10, 1, {0,1,2,4,5,7,8,10,11}); }}, // 9*3*10 lower body joints + {"smpl_joints_2frame_step1", 144, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 2, 1); }}, // 24*3*2 + {"smpl_joints_4frame_step1", 288, [this](std::vector& buf, size_t offset) { return GatherMotionSmplJointsMultiFrame(buf, offset, 4, 1); }}, // 24*3*4, low-latency SONIC + {"smpl_pose", 63, [this](std::vector& buf, size_t offset) { return GatherMotionSmplPosesMultiFrame(buf, offset, 1, 1); }}, // 21*3 + {"smpl_pose_5frame_step5", 315, [this](std::vector& buf, size_t offset) { return GatherMotionSmplPosesMultiFrame(buf, offset, 5, 5); }}, // 21*3*5 + {"smpl_pose_10frame_step5", 630, [this](std::vector& buf, size_t offset) { return GatherMotionSmplPosesMultiFrame(buf, offset, 10, 5); }}, // 21*3*10 + {"smpl_pose_10frame_step1", 630, [this](std::vector& buf, size_t offset) { return GatherMotionSmplPosesMultiFrame(buf, offset, 10, 1); }}, // 21*3*10 + {"smpl_elbow_wrist_poses_10frame_step1", 120, [this](std::vector& buf, size_t offset) { return GatherMotionSmplPosesMultiFrame(buf, offset, 10, 1, {17, 18, 19, 20}); }}, // 4*3*10 + {"smpl_root_z_10frame_step1", 10, [this](std::vector& buf, size_t offset) { return GatherMotionRootZPositionMultiFrame(buf, offset, 10, 1); }}, + {"smpl_anchor_orientation_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1); }}, + {"smpl_anchor_orientation_2frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 2, 1); }}, + {"smpl_anchor_orientation_4frame_step1", 24, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 4, 1); }}, // low-latency SONIC (smpl 4-frame) + // SMPL heading-only variants (mode=1, matches Python smpl_root_ori_heading_multi_future) + {"smpl_anchor_orientation_heading_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1, 1); }}, + {"smpl_anchor_orientation_heading_2frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 2, 1, 1); }}, + // SMPL refheading variants (mode=2, matches Python smpl_root_ori_refheading_multi_future) + {"smpl_anchor_orientation_refheading_10frame_step1", 60, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 10, 1, 2); }}, + {"smpl_anchor_orientation_refheading_2frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherMotionAnchorOrientationMutiFrame(buf, offset, 2, 1, 2); }}, + // Heading diff: yaw from robot to reference first frame (refheading decoder input) + {"heading_diff_robot_ref", 6, [this](std::vector& buf, size_t offset) { return GatherHeadingDiffRobotRef(buf, offset); }}, + // VR 3-point data gathering + {"vr_3point_local_target", 9, [this](std::vector& buf, size_t offset) { return GatherVR3PointPosition(buf, offset); }}, + // NOTE: In the TELEOP time, the vr_3point_local_target == vr_3point_local_target_compliant + {"vr_3point_local_target_compliant", 9, [this](std::vector& buf, size_t offset) { return GatherVR3PointPosition(buf, offset); }}, + {"vr_3point_local_orn_target", 12, [this](std::vector& buf, size_t offset) { return GatherVR3PointOrientation(buf, offset); }}, + {"vr_3point_compliance", 3, [this](std::vector& buf, size_t offset) { return GatherVR3PointCompliance(buf, offset); }}, + // VR 5-point data gathering + {"vr_5point_local_target", 15, [this](std::vector& buf, size_t offset) { return GatherVR5PointPosition(buf, offset); }}, + {"vr_5point_local_orn_target", 20, [this](std::vector& buf, size_t offset) { return GatherVR5PointOrientation(buf, offset); }}, + // History robot state gathering + {"base_angular_velocity", 3, [this](std::vector& buf, size_t offset) { return GatherHisBaseAngularVelocity(buf, offset, 1, 1); }}, + {"body_joint_positions", 29, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointPositions(buf, offset, 1, 1); }}, + {"body_joint_velocities", 29, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointVelocities(buf, offset, 1, 1); }}, + {"last_actions", 29, [this](std::vector& buf, size_t offset) { return GatherHisLastActions(buf, offset, 1, 1); }}, + {"gravity_dir", 3, [this](std::vector& buf, size_t offset) { return GatherHisGravityDir(buf, offset, 1, 1); }}, + {"his_body_joint_positions_4frame_step1", 116, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointPositions(buf, offset, 4, 1); }}, + {"his_body_joint_velocities_4frame_step1", 116, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointVelocities(buf, offset, 4, 1); }}, + {"his_last_actions_4frame_step1", 116, [this](std::vector& buf, size_t offset) { return GatherHisLastActions(buf, offset, 4, 1); }}, + {"his_base_angular_velocity_4frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherHisBaseAngularVelocity(buf, offset, 4, 1); }}, + {"his_gravity_dir_4frame_step1", 12, [this](std::vector& buf, size_t offset) { return GatherHisGravityDir(buf, offset, 4, 1); }}, + {"his_body_joint_positions_10frame_step1", 290, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointPositions(buf, offset, 10, 1); }}, + {"his_body_joint_velocities_10frame_step1", 290, [this](std::vector& buf, size_t offset) { return GatherHisBodyJointVelocities(buf, offset, 10, 1); }}, + {"his_last_actions_10frame_step1", 290, [this](std::vector& buf, size_t offset) { return GatherHisLastActions(buf, offset, 10, 1); }}, + {"his_base_angular_velocity_10frame_step1", 30, [this](std::vector& buf, size_t offset) { return GatherHisBaseAngularVelocity(buf, offset, 10, 1); }}, + {"his_gravity_dir_10frame_step1", 30, [this](std::vector& buf, size_t offset) { return GatherHisGravityDir(buf, offset, 10, 1); }}}; + } + + // Initialize observation functions + void InitializeObservationFunctions() { + // Get all available observations from registry (single source of truth!) + auto registry = GetObservationRegistry(); + + // ========================================================================= + // Initialize policy observations + // ========================================================================= + active_obs_functions_.clear(); + size_t current_offset = 0; + + for (const auto& config : obs_config_) { + if (!config.enabled) continue; + + // Find observation in registry + auto registry_it = std::find_if(registry.begin(), registry.end(), + [&config](const ObservationRegistry& obs) { + return obs.name == config.name; + }); + + if (registry_it == registry.end()) { + std::cerr << "✗ Error: Unknown observation function '" << config.name << "' in configuration!" << std::endl; + throw std::runtime_error("Invalid observation configuration: unknown function '" + config.name + "'"); + } + + // Get dimension directly from registry entry + size_t dimension = registry_it->dimension; + if (dimension == 0) { + std::cerr << "✗ Error: Observation function '" << config.name << "' has invalid dimension!" << std::endl; + throw std::runtime_error("Invalid observation configuration: zero dimension for '" + config.name + "'"); + } + + // Add to active functions (get function directly from registry) + active_obs_functions_.emplace_back(config.name, registry_it->function, current_offset, dimension); + current_offset += dimension; + } + + // Validate total dimension matches model input + size_t model_input_dim = policy_engine_->GetInputDimension(); + if (current_offset != model_input_dim) { + std::cerr << "✗ Error: Total observation dimension (" << current_offset + << ") doesn't match model input dimension (" << model_input_dim << ")!" << std::endl; + throw std::runtime_error("Observation dimension mismatch"); + } + + // ========================================================================= + // Initialize encoder observations (only if encoder is actually loaded) + // ========================================================================= + active_encoder_obs_functions_.clear(); + if (encoder_engine_ && encoder_engine_->IsInitialized() && encoder_config_.dimension > 0 && !encoder_config_.encoder_observations.empty()) { + std::cout << "Initializing encoder observations..." << std::endl; + size_t encoder_offset = 0; + size_t encoder_input_size = encoder_engine_->GetInputDimension(); + + for (const auto& config : encoder_config_.encoder_observations) { + if (!config.enabled) continue; + + // Find observation in registry + auto registry_it = std::find_if(registry.begin(), registry.end(), + [&config](const ObservationRegistry& obs) { + return obs.name == config.name; + }); + + if (registry_it == registry.end()) { + std::cerr << "✗ Error: Unknown encoder observation function '" << config.name << "'!" << std::endl; + throw std::runtime_error("Invalid encoder observation: unknown function '" + config.name + "'"); + } + + size_t dimension = registry_it->dimension; + if (dimension == 0) { + std::cerr << "✗ Error: Encoder observation '" << config.name << "' has invalid dimension!" << std::endl; + throw std::runtime_error("Invalid encoder observation: zero dimension for '" + config.name + "'"); + } + + // Add to active encoder functions + active_encoder_obs_functions_.emplace_back(config.name, registry_it->function, encoder_offset, dimension); + encoder_offset += dimension; + } + + // Validate encoder input dimension matches expected + if (encoder_offset != encoder_input_size) { + std::ostringstream oss; + oss << "Encoder observation dimension mismatch: got " << encoder_offset + << ", expected " << encoder_input_size; + throw std::runtime_error(oss.str()); + } + + std::cout << "✓ Initialized " << active_encoder_obs_functions_.size() + << " encoder observations (total dim: " << encoder_offset << ")" << std::endl; + } + + // ========================================================================= + // Check if vr_3point_compliance observation is enabled (in main or encoder obs) + // This affects whether keyboard compliance controls (g/h/b/v) have any effect + // ========================================================================= + has_vr_3point_compliance_obs_ = false; + + // Check main observations + for (const auto& obs : active_obs_functions_) { + if (obs.name == "vr_3point_compliance") { + has_vr_3point_compliance_obs_ = true; + break; + } + } + + // Check encoder observations if not found in main + if (!has_vr_3point_compliance_obs_) { + for (const auto& obs : active_encoder_obs_functions_) { + if (obs.name == "vr_3point_compliance") { + has_vr_3point_compliance_obs_ = true; + break; + } + } + } + } + + // Log observation configuration + void LogObservationConfiguration() { + std::cout << "\n=== Observation Configuration ===" << std::endl; + std::cout << "Active policy observations (runtime order):" << std::endl; + + size_t total_enabled_dim = 0; + + // Show only active observations (clean and focused) + for (size_t i = 0; i < active_obs_functions_.size(); i++) { + const auto& active_obs = active_obs_functions_[i]; + + std::cout << " " << (i + 1) << ". " + << active_obs.name << " (" << active_obs.dimension << "D)" + << " [offset: " << active_obs.offset << "]" << std::endl; + + total_enabled_dim += active_obs.dimension; + } + + std::cout << "\nPolicy Summary:" << std::endl; + std::cout << " Total dimension: " << total_enabled_dim << std::endl; + size_t model_input_dim = policy_engine_->GetInputDimension(); + std::cout << " Model dimension: " << model_input_dim << std::endl; + + if (total_enabled_dim == model_input_dim) { + std::cout << " ✓ Dimension match: Configuration is valid!" << std::endl; + } else { + std::ostringstream oss; + oss << "Policy observation dimension mismatch: total_enabled_dim=" << total_enabled_dim + << ", model_input_dim=" << model_input_dim + << ", difference=" << (int64_t)model_input_dim - (int64_t)total_enabled_dim; + throw std::runtime_error(oss.str()); + } + + // Show encoder observations if enabled + if (!active_encoder_obs_functions_.empty()) { + std::cout << "\n--- Encoder Observations ---" << std::endl; + size_t total_encoder_dim = 0; + + for (size_t i = 0; i < active_encoder_obs_functions_.size(); i++) { + const auto& active_obs = active_encoder_obs_functions_[i]; + + std::cout << " " << (i + 1) << ". " + << active_obs.name << " (" << active_obs.dimension << "D)" + << " [offset: " << active_obs.offset << "]" << std::endl; + + total_encoder_dim += active_obs.dimension; + } + + std::cout << "\nEncoder Summary:" << std::endl; + std::cout << " Total dimension: " << total_encoder_dim << std::endl; + if (encoder_engine_ && encoder_engine_->IsInitialized()) { + size_t encoder_input_size = encoder_engine_->GetInputDimension(); + std::cout << " Model dimension: " << encoder_input_size << std::endl; + + if (total_encoder_dim == encoder_input_size) { + std::cout << " ✓ Dimension match: Encoder configuration is valid!" << std::endl; + } else { + std::ostringstream oss; + oss << "Encoder configuration dimension mismatch: total_encoder_dim=" << total_encoder_dim + << ", encoder_model_input_dim=" << encoder_input_size; + throw std::runtime_error(oss.str()); + } + } + } + + std::cout << "================================\n" << std::endl; + } + + // Gather observations (simplified - functions read from internal state) + bool GatherObservations() { + // Clear observation buffer + std::fill(obs_buffer_.begin(), obs_buffer_.end(), 0.0); + + // Process observations using pre-built active functions (no map lookup needed!) + for (const auto& active_obs : active_obs_functions_) { + bool success = active_obs.function(obs_buffer_, active_obs.offset); + + if (!success) { + std::cout << "Error: Failed to gather observation: " << active_obs.name << std::endl; + return false; + } + } + + return true; + } + + // Gather encoder observations (populate encoder input buffer) + // Observation functions read from internal state (state_logger_, current_motion_, etc.) + // Mode-specific optimization: Only compute observations required for current encoder mode + bool GatherEncoderObservations() { + if (!is_using_encoder_ || active_encoder_obs_functions_.empty()) { + return true; // Nothing to do + } + + // Get reference to encoder's internal input buffer + auto& encoder_input_buffer = encoder_engine_->GetInputBuffer(); + + // Clear encoder observation buffer (safe default for unused observations) + std::fill(encoder_obs_buffer_.begin(), encoder_obs_buffer_.end(), 0.0); + + // Store the intended encoder mode for warning purposes + int intended_encoder_mode = current_motion_->GetEncodeMode(); + + // Build list of modes to try (start with current mode, then all others as fallback) + std::vector modes_to_try; + + if (!encoder_config_.encoder_modes.empty()) { + // Start with intended mode if valid + if (current_motion_->GetEncodeMode() >= 0) { + modes_to_try.push_back(current_motion_->GetEncodeMode()); + } + + // Add all other modes as fallbacks + for (const auto& mode_config : encoder_config_.encoder_modes) { + if (mode_config.mode_id != current_motion_->GetEncodeMode()) { + modes_to_try.push_back(mode_config.mode_id); + } + } + } + + // If no modes configured, try without mode filter + if (modes_to_try.empty()) { + modes_to_try.push_back(-1); // -1 means no mode filter (all observations required) + } + + // Try each mode until one succeeds + for (size_t attempt = 0; attempt < modes_to_try.size(); ++attempt) { + int mode_to_try = modes_to_try[attempt]; + current_motion_->SetEncodeMode(mode_to_try); + + // Determine which observations to gather based on encoder mode + std::vector required_observations; + bool use_mode_filter = false; + std::string mode_name; + + // Check if mode-specific filtering is configured + if (!encoder_config_.encoder_modes.empty() && current_motion_->GetEncodeMode() >= 0) { + // Find the current mode configuration + for (const auto& mode_config : encoder_config_.encoder_modes) { + if (mode_config.mode_id == current_motion_->GetEncodeMode()) { + required_observations = mode_config.required_observations; + use_mode_filter = true; + mode_name = mode_config.name; + + // Only log when mode changes to avoid spam + if (current_motion_->GetEncodeMode() != last_logged_encoder_mode_) { + std::cout << "[Mode Filter] Switched to mode '" << mode_config.name << "' (ID=" << current_motion_->GetEncodeMode() + << ") with " << required_observations.size() << " required observations" << std::endl; + last_logged_encoder_mode_ = current_motion_->GetEncodeMode(); + } + break; + } + } + } + + // Process encoder observations using pre-built active functions + bool all_success = true; + for (const auto& active_obs : active_encoder_obs_functions_) { + // Check if this observation is required for current mode + bool is_required = !use_mode_filter; // If no mode filter, all are required + + if (use_mode_filter) { + // Check if observation is in required list + is_required = std::find(required_observations.begin(), required_observations.end(), + active_obs.name) != required_observations.end(); + } + + if (is_required) { + // Compute the observation + bool success = active_obs.function(encoder_obs_buffer_, active_obs.offset); + + if (!success) { + std::cerr << "✗ Error: Failed to gather encoder observation: " << active_obs.name + << " for mode " << current_motion_->GetEncodeMode() + << (!mode_name.empty() ? " ('" + mode_name + "')" : "") << std::endl; + all_success = false; + break; + } + } + // else: Not required for this mode - leave as zero (already initialized) + // This saves computation time for expensive observations + } + + // Check if this mode succeeded + if (all_success) { + // Success! Copy encoder observations to encoder input buffer (double -> float) + for (size_t i = 0; i < encoder_input_buffer.size() && i < encoder_obs_buffer_.size(); ++i) { + encoder_input_buffer[i] = static_cast(encoder_obs_buffer_[i]); + } + + // Warn if we had to switch from intended mode + if (current_motion_->GetEncodeMode() != intended_encoder_mode && attempt > 0) { + std::cerr << "⚠ Warning: Intended encoder mode " << intended_encoder_mode + << " failed, successfully switched to fallback mode " << current_motion_->GetEncodeMode() + << (!mode_name.empty() ? " ('" + mode_name + "')" : "") << std::endl; + } + + return true; + } else { + // This mode failed - warn if it was the intended mode + if (current_motion_->GetEncodeMode() == intended_encoder_mode && attempt == 0) { + std::cerr << "⚠ Warning: Intended encoder mode " << intended_encoder_mode + << (!mode_name.empty() ? " ('" + mode_name + "')" : "") + << " failed, trying fallback modes..." << std::endl; + } + + // Clear buffer and try next mode + std::fill(encoder_obs_buffer_.begin(), encoder_obs_buffer_.end(), 0.0); + } + } + + // All modes failed + std::cerr << "✗ Error: All available encoder modes failed to gather observations" << std::endl; + return false; + } + + + + public: + OperatorState operator_state; + + G1Deploy( + std::string networkInterface, + std::string model_file_path, + std::string motion_data_path, + bool disable_crc_check = false, + std::string obs_config_path = "", + std::string encoder_file_path = "", + std::string planner_file_path = "", + std::string target_motion_file_path = "", + std::string planner_motion_file_path = "", + std::string policy_input_file_path = "", + std::string input_type = "keyboard", + std::string output_type = "zmq", + std::string record_input_file_path = "", + std::string playback_input_file_path = "", + bool planner_fp16 = false, + bool policy_fp16 = false, + std::string logs_dir = "", + bool enable_csv_logs = false, + std::string zmq_host = "localhost", + int zmq_port = 5556, + std::string zmq_topic = "pose", + bool zmq_conflate = false, + bool zmq_verbose = false, + int zmq_out_port = 5557, + std::string zmq_out_topic = "g1_debug", + bool enable_motion_recording = false, + std::array initial_compliance = {0.05, 0.05, 0.0}, + double initial_max_close_ratio = 1.0) + : time_(0.0), + publish_dt_(0.002), + control_dt_(0.02), + planner_dt_(0.1), + input_dt_(0.01), + duration_(3.0), + counter_(0), + mode_pr_(Mode::PR), + mode_machine_(0), + disable_crc_check_(disable_crc_check), + program_state_(ProgramState::INIT), + last_action {0.0}, + last_left_hand_action {0.0}, + last_right_hand_action {0.0}, + enable_motion_recording_(enable_motion_recording), + initial_vr_3point_compliance_(initial_compliance), + initial_max_close_ratio_(initial_max_close_ratio), + //env(ORT_LOGGING_LEVEL_WARNING, "G1Deploy"), + model_path(model_file_path), + planner_path(planner_file_path) { + + // Initialize ChannelFactory + ChannelFactory::Instance()->Init(0, networkInterface); + + // Initialize Dex3 hands (ChannelFactory already initialized above) + dex3_hands_.initialize(""); + + audio_thread_ = std::make_unique(); + + if(!target_motion_file_path.empty()) + { + // clear existing file: + std::ofstream f(target_motion_file_path); + f.close(); + + // open file in append mode: + target_motion_file_ = std::make_unique(target_motion_file_path, std::ios::app); + } + + if(!planner_motion_file_path.empty()) + { + // clear existing file: + std::ofstream f(planner_motion_file_path); + f.close(); + + // open file in append mode: + planner_motion_file_ = std::make_unique(planner_motion_file_path, std::ios::app); + } + + if(!policy_input_file_path.empty()) + { + // clear existing file: + std::ofstream f(policy_input_file_path); + f.close(); + + // open file in append mode: + policy_input_file_ = std::make_unique(policy_input_file_path, std::ios::app); + } + + if(!record_input_file_path.empty()) + { + // clear existing file: + std::ofstream f(record_input_file_path); + f.close(); + + // open file in append mode: + record_input_file_ = std::make_unique(record_input_file_path, std::ios::app); + std::cout << "Initialized record input file: " << record_input_file_path << std::endl; + } + + if(!playback_input_file_path.empty()) + { + // open file in append mode: + playback_input_file_ = std::make_unique(playback_input_file_path); + std::cout << "Initialized playback input file: " << playback_input_file_path << std::endl; + } + + movement_state_buffer_.SetData(MovementState()); + + // Initialize planner motion state as shared_ptr + planner_motion_ = std::make_shared(); + planner_motion_->ReserveCapacity(1500, 29, 1, 1, 0, 0); + planner_motion_->timesteps = 0; + planner_motion_->name = "planner_motion"; + // try to shutdown motion control-related service + msc_ = std::make_unique(); + msc_->SetTimeout(5.0f); + msc_->Init(); + std::string form, name; + while (msc_->CheckMode(form, name), !name.empty()) { + if (msc_->ReleaseMode()) std::cout << "Failed to switch to Release Mode\n"; + sleep(5); + } + + // create publisher + lowcmd_publisher_.reset(new ChannelPublisher(HG_CMD_TOPIC)); + lowcmd_publisher_->InitChannel(); + // create subscriber + lowstate_subscriber_.reset(new ChannelSubscriber(HG_STATE_TOPIC)); + lowstate_subscriber_->InitChannel(std::bind(&G1Deploy::LowStateHandler, this, std::placeholders::_1), 1); + imutorso_subscriber_.reset(new ChannelSubscriber(HG_IMU_TORSO)); + imutorso_subscriber_->InitChannel(std::bind(&G1Deploy::imuTorsoHandler, this, std::placeholders::_1), 1); + // Load motion data + if (motion_reader_.ReadFromCSV(motion_data_path)) { + if (!motion_reader_.motions.empty()) { + std::cout << "✓ Motion data loaded successfully!" << std::endl; + // motion_reader_.PrintSummary(); + motion_reader_.current_motion_index_ = 0; + std::string motion_name; + { + std::lock_guard lock(current_motion_mutex_); + current_motion_ = motion_reader_.GetMotionShared(motion_reader_.current_motion_index_); + current_frame_ = 0; + motion_name = current_motion_->name; + } + operator_state.play = false; + std::cout << "Started with motion: " << motion_name << " (paused at frame 0)" << std::endl; + } else { + std::cout << "✗ Error: Motion directory found but no valid motions loaded from " << motion_data_path + << std::endl; + std::cout << "Check that motion folders contain valid CSV files." << std::endl; + std::cout << "Control system cannot function without motion data!" << std::endl; + std::cout << "Exiting..." << std::endl; + throw std::runtime_error("No valid motions found in motion data directory"); + } + } else { + std::cout << "✗ Error: Could not access motion data from " << motion_data_path << std::endl; + std::cout << "Make sure the path exists and contains motion folders." << std::endl; + std::cout << "Control system cannot function without motion data!" << std::endl; + std::cout << "Exiting..." << std::endl; + throw std::runtime_error("Failed to load motion data"); + } + + // Initialize control policy + policy_engine_ = std::make_unique(); + + if (!policy_engine_->Initialize(model_path, policy_fp16)) { + throw std::runtime_error("Failed to initialize control policy from: " + model_path); + } + + // Initialize observation buffer with correct size (zero-initialized) + size_t obs_dim = policy_engine_->GetInputDimension(); + obs_buffer_.resize(obs_dim, 0.0); + + // Capture CUDA graph for optimized execution + if (!policy_engine_->CaptureGraph()) { + throw std::runtime_error("Failed to capture control policy CUDA graph"); + } + + std::cout << "✓ Policy model loaded successfully!" << std::endl; + + // Load observation configuration FIRST (before encoder/planner initialization) + std::cout << "Loading observation configuration..." << std::endl; + FullObservationConfig full_obs_config; + if (!obs_config_path.empty()) { + std::cout << "Using observation config file: " << obs_config_path << std::endl; + full_obs_config = ObservationConfigParser::ParseFullConfig(obs_config_path); + } else { + std::cout << "Using default observation configuration" << std::endl; + full_obs_config.observations = ObservationConfigParser::ParseConfig(); + } + + // Check if config parsing failed (empty observations returned) + if (full_obs_config.observations.empty()) { + throw std::runtime_error("Failed to parse observation configuration - check config file for errors"); + } + + obs_config_ = full_obs_config.observations; + encoder_config_ = full_obs_config.encoder; + + // Initialize token buffer size from encoder config + if (encoder_config_.dimension > 0) { + token_state_data_.resize(encoder_config_.dimension, 0.0); + std::cout << "✓ Token state buffer initialized (size: " << encoder_config_.dimension << ")" << std::endl; + } + + // ========================================================================= + // Initialize encoder engine + // ========================================================================= + // Note: Parser already validates that if token_state is enabled, encoder_config has dimension > 0 + // So if dimension <= 0 here, it means token_state is disabled - just ignore encoder_file_path + if (!encoder_file_path.empty() && encoder_config_.dimension > 0) { + std::cout << "Initializing encoder..." << std::endl; + encoder_engine_ = std::make_unique(); + + if (!encoder_engine_->Initialize(encoder_file_path, encoder_config_.use_fp16)) { + throw std::runtime_error("Failed to initialize encoder engine from: " + encoder_file_path); + } + + // Validate encoder output dimension matches config + if (encoder_engine_->GetTokenDimension() != static_cast(encoder_config_.dimension)) { + std::cerr << "⚠ Warning: Encoder model output dimension (" << encoder_engine_->GetTokenDimension() + << ") doesn't match config dimension (" << encoder_config_.dimension << ")" << std::endl; + } + + // Initialize encoder observation buffer with correct size + size_t encoder_input_size = encoder_engine_->GetInputDimension(); + encoder_obs_buffer_.resize(encoder_input_size, 0.0); + + // Capture CUDA graph for optimized execution + if (!encoder_engine_->CaptureGraph()) { + throw std::runtime_error("Failed to capture encoder CUDA graph"); + } + + std::cout << "✓ Encoder model loaded successfully!" << std::endl; + is_using_encoder_ = true; + initial_encoder_mode_ = 0; // Encoder available, default to mode 0. + } else { + if (encoder_config_.dimension > 0) { + std::cout << "Encoder config found but no encoder file provided - tokens can be set externally" << std::endl; + initial_encoder_mode_ = -1; + } else { + std::cout << "No encoder configured" << std::endl; + initial_encoder_mode_ = -2; + } + is_using_encoder_ = false; + } + + // ========================================================================= + // Initialize encode_mode for all loaded reference motions and planner motion + // ========================================================================= + // Set the encode_mode for all loaded reference motions based on encoder availability + std::cout << "Setting encode_mode for " << motion_reader_.motions.size() << " loaded reference motions..." << std::endl; + for (auto& motion : motion_reader_.motions) { + motion->SetEncodeMode(initial_encoder_mode_); + std::cout << " Motion '" << motion->name << "' encode_mode set to: " << initial_encoder_mode_ << std::endl; + } + + // Set encode_mode for planner motion + planner_motion_->SetEncodeMode(initial_encoder_mode_); + std::cout << "Planner motion encode_mode set to: " << initial_encoder_mode_ << std::endl; + + // Initialize planner + if (!planner_path.empty()) { + PlannerConfig planner_config; + planner_config.model_path = planner_path; + if (planner_path.find("V0") != std::string::npos) + { + planner_config.version = 0; + } + else if (planner_path.find("V1") != std::string::npos) + { + planner_config.version = 1; + } + else if (planner_path.find("V2") != std::string::npos) + { + planner_config.version = 2; + } + else + { + std::cout << "Unsupported planner version: " << planner_path << std::endl; + throw std::runtime_error("Unsupported planner version: " + planner_path); + } + planner_ = std::make_unique(planner_fp16, 0, planner_config); + } + + // Initialize observation function map + InitializeObservationFunctions(); + + // Log observation configuration details + LogObservationConfiguration(); + + // Prepare robot configuration for data collection (after all initialization is complete) + std::map> robot_config; + robot_config["model_path"] = model_path; + robot_config["reference_motion_path"] = motion_data_path; + robot_config["planner_path"] = planner_path.empty() ? "none" : planner_path; + robot_config["obs_config_path"] = obs_config_path.empty() ? "none" : obs_config_path; + robot_config["encoder_file"] = encoder_file_path.empty() ? "none" : encoder_file_path; + robot_config["control_frequency"] = 1.0 / control_dt_; + robot_config["planner_frequency"] = 1.0 / planner_dt_; + robot_config["is_using_encoder"] = is_using_encoder_; + robot_config["policy_fp16"] = policy_fp16; + robot_config["planner_fp16"] = planner_fp16; + + // Initialize state logger with complete robot configuration + try { + std::string resolved_logs_dir = logs_dir; + // dt is control_dt_; pass complete robot_config to constructor + state_logger_ = std::make_unique(resolved_logs_dir, 10000, G1_NUM_MOTOR, G1_NUM_MOTOR, + control_dt_, enable_csv_logs, robot_config); + } catch (const std::exception& e) { + std::cerr << "[ERROR] Failed to initialize state logger: " << e.what() << std::endl; + std::cerr << "State logger is required for operation. Exiting..." << std::endl; + throw; // Re-throw to stop program initialization + } + + // Initialize input interface based on type + if (input_type == "gamepad") { + input_interface_ = std::make_unique(); + std::cout << "Initialized gamepad input interface" << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } + else if (input_type == "gamepad_manager") { + input_interface_ = std::make_unique(zmq_host, zmq_port, zmq_topic, zmq_conflate, zmq_verbose); + std::cout << "Initialized demo gamepad manager input interface" << std::endl; + std::cout << " Host: " << zmq_host << ":" << zmq_port << std::endl; + std::cout << " Topic: " << zmq_topic << std::endl; + std::cout << " Conflate: " << (zmq_conflate ? "enabled" : "disabled") << std::endl; + std::cout << " Verbose: " << (zmq_verbose ? "enabled" : "disabled") << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } + else if (input_type == "manager") { + input_interface_ = std::make_unique( + zmq_host, zmq_port, zmq_topic, zmq_conflate, zmq_verbose + ); + std::cout << "Initialized interface manager (Shift+1/2/3/4 [! @ # $] to switch: keyboard, gamepad, zmq" +#if HAS_ROS2 + " , ros2" +#endif + ")" << std::endl; + std::cout << " Host: " << zmq_host << ":" << zmq_port << std::endl; + std::cout << " Topic: " << zmq_topic << std::endl; + std::cout << " Conflate: " << (zmq_conflate ? "enabled" : "disabled") << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } + else if (input_type == "zmq") { + input_interface_ = std::make_unique( + zmq_host, zmq_port, zmq_topic, zmq_conflate, zmq_verbose + ); + std::cout << "Initialized ZMQ endpoint interface" << std::endl; + std::cout << " Host: " << zmq_host << ":" << zmq_port << std::endl; + std::cout << " Topic: " << zmq_topic << std::endl; + std::cout << " Conflate: " << (zmq_conflate ? "enabled" : "disabled") << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } + else if (input_type == "zmq_manager") { + input_interface_ = std::make_unique( + zmq_host, zmq_port, zmq_topic, "command", "planner", zmq_conflate, zmq_verbose + ); + std::cout << "Initialized ZMQ manager" << std::endl; + std::cout << " Host: " << zmq_host << ":" << zmq_port << std::endl; + std::cout << " Pose topic: " << zmq_topic << std::endl; + std::cout << " Command topic: command" << std::endl; + std::cout << " Planner topic: planner" << std::endl; + std::cout << " Conflate: " << (zmq_conflate ? "enabled" : "disabled") << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } +#if HAS_ROS2 + else if (input_type == "ros2") { + // ROS2 input interface will be initialized without encoder mode parameter + input_interface_ = std::make_unique(true, "g1_deploy_ros2_handler"); + std::cout << "Initialized ROS2 input interface" << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } +#endif + else { + input_interface_ = std::make_unique(); + std::cout << "Initialized keyboard input interface (default)" << std::endl; + std::cout << " Initial encoder mode: " << initial_encoder_mode_ << std::endl; + } + + // Set initial VR 3-point compliance values for all input interfaces + // These are keyboard-controlled: g/h for left hand, b/v for right hand + if (input_interface_) { + input_interface_->SetVR3PointCompliance(initial_vr_3point_compliance_); + // Set initial max close ratio for hands (keyboard-controlled: X/C keys) + input_interface_->SetMaxCloseRatio(initial_max_close_ratio_); + dex3_hands_.SetMaxCloseRatio(initial_max_close_ratio_); + std::cout << "[INFO] Initial VR 3-point compliance: [" + << initial_vr_3point_compliance_[0] << ", " + << initial_vr_3point_compliance_[1] << ", " + << initial_vr_3point_compliance_[2] << "]" << std::endl; + std::cout << "[INFO] Initial hand max close ratio: " << initial_max_close_ratio_ + << " (1.0 = full closure allowed, 0.2 = limited)" << std::endl; + std::cout << "[INFO] Keyboard controls: g/h = left hand +/- 0.1, b/v = right hand +/- 0.1 (range: 0.01-0.5)" << std::endl; + std::cout << "[INFO] Keyboard controls: x/c = hand max close ratio +/- 0.1 (range: 0.2-1.0)" << std::endl; + + // Info message about compliance observation status + if (!has_vr_3point_compliance_obs_) { + std::cout << "\n┌─────────────────────────────────────────────────────────────────────────────┐" << std::endl; + std::cout << "│ Compliance control: DISABLED │" << std::endl; + std::cout << "│ Policy does not observe 'vr_3point_compliance'. │" << std::endl; + std::cout << "│ Keyboard controls (g/h/b/v) will be ignored for this policy. │" << std::endl; + std::cout << "│ To enable, use a compliance-aware policy that observes it natively. │" << std::endl; + std::cout << "└─────────────────────────────────────────────────────────────────────────────┘\n" << std::endl; + } else { + std::cout << "\n┌─────────────────────────────────────────────────────────────────────────────┐" << std::endl; + std::cout << "│ Compliance control: ENABLED │" << std::endl; + std::cout << "│ Policy observes 'vr_3point_compliance'. Keyboard controls (g/h/b/v) work. │" << std::endl; + std::cout << "└─────────────────────────────────────────────────────────────────────────────┘\n" << std::endl; + } + } + + // Initialize output interfaces based on type (now that state_logger_ is ready) + // Supports multiple simultaneous outputs with --output-type all + bool create_zmq = (output_type == "zmq" || output_type == "all"); + bool create_ros2 = false; +#if HAS_ROS2 + create_ros2 = (output_type == "ros2" || output_type == "all"); +#endif + + if (create_zmq) { + auto zmq_handler = std::make_unique(*state_logger_, zmq_out_port, zmq_out_topic); + std::cout << "Initialized ZMQ output interface" << std::endl; + // Publish robot config so subscribers can receive it before control loop starts + zmq_handler->publish_config(); + output_interfaces_.push_back(std::move(zmq_handler)); + } + +#if HAS_ROS2 + if (create_ros2) { + auto ros2_handler = std::make_unique(*state_logger_, "g1_output_handler"); + std::cout << "Initialized ROS2 output interface" << std::endl; + // Publish robot config so subscribers can receive it before control loop starts + ros2_handler->publish_config(); + output_interfaces_.push_back(std::move(ros2_handler)); + } +#endif + + if (output_interfaces_.empty() && output_type != "all") { + std::cout << "Unknown output type '" << output_type << "' - no output will be published" << std::endl; + } else { + std::cout << "Total output interfaces initialized: " << output_interfaces_.size() << std::endl; + } + + // create threads + input_thread_ptr_ = CreateRecurrentThreadEx("Input", UT_CPU_ID_NONE, input_dt_ * 1e6, &G1Deploy::Input, this); + command_writer_ptr_ = CreateRecurrentThreadEx("command_writer", UT_CPU_ID_NONE, publish_dt_ * 1e6, + &G1Deploy::LowCommandWriter, this); + control_thread_ptr_ = + CreateRecurrentThreadEx("control", UT_CPU_ID_NONE, control_dt_ * 1e6, &G1Deploy::Control, this); + + if (planner_) { + planner_thread_ptr_ = + CreateRecurrentThreadEx("planner", UT_CPU_ID_NONE, planner_dt_ * 1e6, &G1Deploy::Planner, this); + } + + SetThreadPriority(); + } + + ~G1Deploy() + { + // CUDA resources are now cleaned up by the PolicyEngine and planner classes automatically + } + + void SetThreadPriority() { + struct sched_param param; + param.sched_priority = sched_get_priority_max(SCHED_FIFO); + pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m); + cpu_set_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(0, &cpuset); + pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); + } + + /// DDS callback: receives a 500 Hz LowState message from the robot SDK. + /// Validates CRC (unless disabled for MuJoCo sim) and stores the result + /// in the thread-safe low_state_buffer_. + void LowStateHandler(const void* message) { + LowState_ low_state = *(const LowState_*)message; + + // Only perform CRC check if not disabled (for MuJoCo simulation compatibility) + if (!disable_crc_check_) { + uint32_t received_crc = low_state.crc(); + uint32_t calculated_crc = Crc32Core((uint32_t*)&low_state, (sizeof(LowState_) >> 2) - 1); + + if (received_crc != calculated_crc) { + static int crc_error_count = 0; + crc_error_count++; + std::cout << "[ERROR] CRC Error #" << crc_error_count << " - Received: 0x" << std::hex << received_crc + << ", Calculated: 0x" << calculated_crc << ", Size: " << sizeof(LowState_) << " bytes" << std::dec + << std::endl; + return; + } + } + + // Check motor error states (prints only on transitions) + { + std::array motorstates; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + motorstates[i] = low_state.motor_state()[i].motorstate(); + } + error_monitor_.update(motorstates); + } + + low_state_buffer_.SetData(low_state); + + // update mode machine + if (mode_machine_ != low_state.mode_machine()) { + if (mode_machine_ == 0) std::cout << "G1 type: " << unsigned(low_state.mode_machine()) << std::endl; + mode_machine_ = low_state.mode_machine(); + } + } + + /// DDS callback: receives secondary (torso) IMU data. + void imuTorsoHandler(const void* message) { + IMUState_ imu_torso = *(const IMUState_*)message; + imu_torso_buffer_.SetData(imu_torso); + } + + /** + * @brief Command-writer thread body (500 Hz). + * + * Reads the latest MotorCommand from motor_command_buffer_, packs it + * into a LowCmd_ DDS message with CRC, and publishes via DDS. + * Also publishes Dex3 hand commands at the same cadence. + */ + void LowCommandWriter() { + LowCmd_ dds_low_command; + dds_low_command.mode_pr() = static_cast(mode_pr_); + dds_low_command.mode_machine() = mode_machine_; + + const std::shared_ptr mc = motor_command_buffer_.GetDataWithTime().data; + if (mc) { + for (size_t i = 0; i < G1_NUM_MOTOR; i++) { + dds_low_command.motor_cmd().at(i).mode() = 1; // 1:Enable, 0:Disable + dds_low_command.motor_cmd().at(i).tau() = mc->tau_ff.at(i); + dds_low_command.motor_cmd().at(i).q() = mc->q_target.at(i); + dds_low_command.motor_cmd().at(i).dq() = mc->dq_target.at(i); + dds_low_command.motor_cmd().at(i).kp() = mc->kp.at(i); + dds_low_command.motor_cmd().at(i).kd() = mc->kd.at(i); + } + + dds_low_command.crc() = Crc32Core((uint32_t*)&dds_low_command, (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } + + // Publish Dex3 hand commands at the same publish cadence + dex3_hands_.writeOnce(); + } + + /// Gracefully stop all threads and send a damping-only command. + void Stop() { + operator_state.stop = true; + + if (control_thread_ptr_) { + input_thread_ptr_->Wait(); + input_thread_ptr_.reset(); + control_thread_ptr_->Wait(); + control_thread_ptr_.reset(); + command_writer_ptr_->Wait(); + command_writer_ptr_.reset(); + if (planner_thread_ptr_) { + planner_thread_ptr_->Wait(); + planner_thread_ptr_.reset(); + } + } + CreateDampingCommand(); + LowCommandWriter(); + std::cout << "Stop" << std::endl; + } + + /// Write a zero-torque, damping-only motor command (safe shutdown pose). + void CreateDampingCommand() { + MotorCommand motor_command_tmp; + const std::shared_ptr ls = low_state_buffer_.GetDataWithTime().data; + + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = 0.0; + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = 0; + motor_command_tmp.kd.at(i) = 8; + } + motor_command_buffer_.SetData(motor_command_tmp); + } + + /** + * @brief INIT state handler: ramp the robot from its current pose to the + * default standing angles over `duration_` seconds (linear interpolation). + * + * Called at 50 Hz until the ramp completes, at which point the state machine + * transitions to WAIT_FOR_CONTROL and the Dex3 hands open. + * @return True once LowState data is available; false if not yet ready. + */ + bool InitControl() { + auto low_state_data = low_state_buffer_.GetDataWithTime(); + const std::shared_ptr ls = low_state_data.data; + if (!ls) { + return false; + } + MotorCommand motor_command_tmp; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = static_cast(default_angles[i]); + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = kps[i]; + motor_command_tmp.kd.at(i) = kds[i]; + } + time_ += control_dt_; + if (time_ < duration_) { + for (int i = 0; i < G1_NUM_MOTOR; i++) { + double ratio = std::clamp(time_ / duration_, 0.0, 1.0); + double current_pos = ls->motor_state()[i].q(); + motor_command_tmp.q_target.at(i) = + static_cast(current_pos * (1.0 - ratio) + default_angles[i] * ratio); + } + dex3_hands_.close(true); + dex3_hands_.close(false); + } else { + program_state_ = ProgramState::WAIT_FOR_CONTROL; + dex3_hands_.open(true); + dex3_hands_.open(false); + std::cout << "Init Done" << std::endl; + } + motor_command_buffer_.SetData(motor_command_tmp); + return true; + } + + /// Check for valid LowState data and recent updates; if invalid, transition to ERROR state. + bool CheckSafety() { + auto low_state_data = low_state_buffer_.GetDataWithTime(); + const std::shared_ptr ls = low_state_data.data; + if (!ls) { + std::cout << "[ERROR] LowState data is not available in the middle of the control loop!" << std::endl; + return false; + } + + auto now = std::chrono::steady_clock::now(); + if (now - low_state_data.timestamp > LOW_STATE_ABSENT_THRESHOLD) { + std::cout << "[ERROR] Lost LowState data connection from robot!" << std::endl; + return false; + } + + return true; + } + + /// Get current ROS 2 timestamp (seconds) from the first ROS2 output interface, or 0.0 if none. + double GetRosTimestamp() { + // Get ROS timestamp from the first ROS2 output interface (0.0 if none available) + double ros_timestamp = 0.0; +#if HAS_ROS2 + for (auto& output_interface : output_interfaces_) { + if (output_interface && output_interface->GetType() == OutputInterface::OutputType::ROS2) { + auto* ros2_handler = dynamic_cast(output_interface.get()); + if (ros2_handler) { + ros_timestamp = ros2_handler->GetROSTimestamp(); + break; // Use timestamp from first ROS2 interface found + } + } + } +#endif + return ros_timestamp; + } + + /** + * @brief Read the latest robot state (IMU + joints + hands) and log it. + * + * Reads LowState and torso IMU from their DataBuffers, remaps joint positions + * from hardware order to IsaacLab order (subtracting default_angles), and + * calls StateLogger::LogFullState() with the complete snapshot. + * + * @return False if LowState or IMU data is missing or a joint velocity + * exceeds the safety threshold (35 rad/s). + */ + bool GatherRobotStateToLogger() { + auto low_state_data = low_state_buffer_.GetDataWithTime(); + auto imu_data = imu_torso_buffer_.GetDataWithTime(); + const std::shared_ptr ls = low_state_data.data; + const std::shared_ptr imu_torso = imu_data.data; + if (!ls || !imu_torso) { + std::cout << "✗ Error: LowState or IMUState is not available in the middle of the control loop!" << std::endl; + return false; + } + used_low_state_data_ = (low_state_data); + used_imu_torso_data_ = (imu_data); + // robot state data + std::array body_q = {0.0}; + std::array body_dq = {0.0}; + + auto unitree_joint_state = ls->motor_state(); + std::array motor_temperature = {0.0}; + std::array motor_error = {0.0}; + std::array motor_torque = {0.0}; + for (int i = 0; i < G1_NUM_MOTOR; i++) { + body_q[i] = + unitree_joint_state[mujoco_to_isaaclab[i]].q() - default_angles[mujoco_to_isaaclab[i]]; // URDF order + body_dq[i] = unitree_joint_state[mujoco_to_isaaclab[i]].dq(); // URDF order + if (body_dq[i] > 35 && !disable_crc_check_) { + std::cout << "✗ Error: body_dq[" << i << "] = " << body_dq[i] << " > 35." + << std::endl; + return false; + } + // Extract motor temperature (2 values per motor: winding, driver) in hardware order + motor_temperature[i * 2] = static_cast(unitree_joint_state[i].temperature()[0]); + motor_temperature[i * 2 + 1] = static_cast(unitree_joint_state[i].temperature()[1]); + // Extract motor error code in hardware order + motor_error[i] = static_cast(unitree_joint_state[i].motorstate()); + // Extract estimated torque in hardware order + motor_torque[i] = static_cast(unitree_joint_state[i].tau_est()); + + // High temperature hysteresis check (enter >= 90, exit < 85) + int16_t max_temp = std::max(unitree_joint_state[i].temperature()[0], + unitree_joint_state[i].temperature()[1]); + if (motor_high_temp_[i]) { + if (max_temp < HIGH_TEMP_EXIT) { motor_high_temp_[i] = false; } + } else { + if (max_temp >= HIGH_TEMP_ENTER) { motor_high_temp_[i] = true; } + } + } + + // Build high temperature warning message for audio + { + static const char* joint_names_hw[] = { + "Left Hip Pitch", "Left Hip Roll", "Left Hip Yaw", "Left Knee", + "Left Ankle Pitch", "Left Ankle Roll", "Right Hip Pitch", "Right Hip Roll", + "Right Hip Yaw", "Right Knee", "Right Ankle Pitch", "Right Ankle Roll", + "Waist Yaw", "Waist Roll", "Waist Pitch", + "Left Shoulder Pitch", "Left Shoulder Roll", "Left Shoulder Yaw", "Left Elbow", + "Left Wrist Roll", "Left Wrist Pitch", "Left Wrist Yaw", + "Right Shoulder Pitch", "Right Shoulder Roll", "Right Shoulder Yaw", "Right Elbow", + "Right Wrist Roll", "Right Wrist Pitch", "Right Wrist Yaw", + }; + bool any_high = false; + std::string high_temp_msg = "Warning! High temperature at "; + std::string high_temp_print_msg = "Warning! High temperature at "; + bool first = true; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + if (motor_high_temp_[i]) { + any_high = true; + int16_t t = std::max(unitree_joint_state[i].temperature()[0], + unitree_joint_state[i].temperature()[1]); + if (!first) { high_temp_msg += ", "; high_temp_print_msg += ", "; } + high_temp_msg += joint_names_hw[i]; + high_temp_print_msg += std::string(joint_names_hw[i]) + "(" + std::to_string(t) + ")"; + first = false; + } + } + high_temp_warning_ = any_high; + high_temp_message_ = any_high ? high_temp_msg : ""; + + // Print to console at ~1s intervals while overheating (50 Hz control loop) + if (any_high) { + static int high_temp_print_counter = 0; + if (high_temp_print_counter % 50 == 0) { + std::cout << "[HighTemp] " << high_temp_print_msg << std::endl; + } + high_temp_print_counter++; + } + } + + std::array base_quat = float_to_double<4>(ls->imu_state().quaternion()); // qw, qx, qy, qz + std::array base_ang_vel = float_to_double<3>(ls->imu_state().gyroscope()); + std::array base_accel = float_to_double<3>(ls->imu_state().accelerometer()); + + std::array body_torso_quat = float_to_double<4>(imu_torso->quaternion()); //qw, qx, qy, qz + std::array body_torso_ang_vel = float_to_double<3>(imu_torso->gyroscope()); + std::array body_torso_accel = float_to_double<3>(imu_torso->accelerometer()); + + // Collect hand states from Dex3 hands + std::array left_hand_q = {0.0}; + std::array left_hand_dq = {0.0}; + std::array right_hand_q = {0.0}; + std::array right_hand_dq = {0.0}; + + auto left_hand_state_ptr = dex3_hands_.getState(true); + if (left_hand_state_ptr) { + for (int i = 0; i < 7; ++i) { + left_hand_q[i] = left_hand_state_ptr->motor_state()[i].q(); + left_hand_dq[i] = left_hand_state_ptr->motor_state()[i].dq(); + } + } + + auto right_hand_state_ptr = dex3_hands_.getState(false); + if (right_hand_state_ptr) { + for (int i = 0; i < 7; ++i) { + right_hand_q[i] = right_hand_state_ptr->motor_state()[i].q(); + right_hand_dq[i] = right_hand_state_ptr->motor_state()[i].dq(); + } + } + + // Log robot state for analysis and debugging + if (state_logger_) { + // Get ROS timestamp if using ROS2 output interface (0.0 for non-ROS2 interfaces) + double ros_timestamp = GetRosTimestamp(); + state_logger_->LogFullState(base_quat, base_ang_vel, base_accel, body_torso_quat, body_torso_ang_vel, body_torso_accel, + std::span(body_q), + std::span(body_dq), + std::span(last_action), + std::span(motor_temperature), + std::span(motor_error), + std::span(motor_torque), + std::span(left_hand_q), + std::span(left_hand_dq), + std::span(right_hand_q), + std::span(right_hand_dq), + std::span(last_left_hand_action), + std::span(last_right_hand_action), + ros_timestamp); + } + return true; + } + + /** + * @brief Snapshot all input-interface data into local buffers. + * + * Called once per control tick **before** GatherObservations(). Copies VR + * positions / orientations / compliance, hand joints, upper-body targets, + * and external token state from the active InputInterface into member + * buffers so that observations, logging, and output all use a consistent + * snapshot. + * + * Also handles the external-token-state fallback logic: + * - If encoder is loaded → token_state_data_ will be populated later + * by GatherTokenState() during observation gathering. + * - If no encoder and external token data arrives (ZMQ/ROS2) → copies it. + * - If no encoder and no external data → error recovery depending on + * initial_encoder_mode_ (-1 = stop, 0+ = fall back to local encoder). + */ + bool GatherInputInterfaceData() { + // Snapshot input interface data into buffers before gathering observations + // This ensures observations, logging, and output all use the same data + // some of the data will be overwritten by the motion dataset if we are not using the buffered interface data + std::tie(has_vr_3point_data_, vr_3point_position_buffer_) = input_interface_->GetVR3PointPosition(); + std::tie(std::ignore, vr_3point_orientation_buffer_) = input_interface_->GetVR3PointOrientation(); + vr_3point_compliance_buffer_ = input_interface_->GetVR3PointCompliance(); + std::tie(has_vr_5point_data_, vr_5point_position_buffer_) = input_interface_->GetVR5PointPosition(); + std::tie(std::ignore, vr_5point_orientation_buffer_) = input_interface_->GetVR5PointOrientation(); + std::tie(has_left_hand_data_, left_hand_joint_buffer_) = input_interface_->GetHandPose(true); + std::tie(has_right_hand_data_, right_hand_joint_buffer_) = input_interface_->GetHandPose(false); + std::tie(has_upper_body_data_, upper_body_joint_positions_buffer_) = input_interface_->GetUpperBodyJointPositions(); + std::tie(std::ignore, upper_body_joint_velocities_buffer_) = input_interface_->GetUpperBodyJointVelocities(); + + auto last_update_time = input_interface_->GetLastUpdateTime(); + if (last_update_time.has_value()) { + auto streaming_data_delay = std::chrono::steady_clock::now() - last_update_time.value(); + streaming_data_delay_rolling_stats_.push(static_cast(std::chrono::duration_cast(streaming_data_delay).count())); + + bool streaming_data_absent = streaming_data_delay > STREAMING_DATA_ABSENT_THRESHOLD; + streaming_data_absent_debouncer_.update(streaming_data_absent); + } + + auto low_state_data = low_state_buffer_.GetDataWithTime(); + bool low_state_late = (std::chrono::steady_clock::now() - low_state_data.timestamp) > LOW_STATE_LATE_THRESHOLD; + + audio_thread_->SetCommand( + AudioCommand{ + .streaming_data_absent = streaming_data_absent_debouncer_.state(), + .motor_error = error_monitor_.hasErrors(), + .low_state_late = low_state_late, + .tts_message = std::move(pending_tts_), + .high_temperature = high_temp_warning_, + .high_temperature_message = high_temp_message_, + }); + pending_tts_.clear(); + + // if encoder mode is not -2, we need to get the token state data either from the encoder or the external token state + if (initial_encoder_mode_ != -2) { + // get the external token state from the input interface + bool has_ext_token_data; + std::vector temp_token_state_data; + { + std::lock_guard motion_lock(current_motion_mutex_); + std::tie(has_ext_token_data, temp_token_state_data) = input_interface_->GetExternalTokenState(); + } + + // if the external token state is not empty, we need to copy the data to the token_state_data_ + // and set the is_using_encoder_ to false + if (has_ext_token_data) { + if (temp_token_state_data.empty()) { + std::cout << "⚠ Warning: The external token state is empty" << std::endl; + std::cout << "but interface says it has external token state" << std::endl; + std::cout << "No copying happened." << std::endl; + return true; + } + + // check if the size of the temp_token_state_data is the same as the token_state_data_ + if (temp_token_state_data.size() != token_state_data_.size()) { + std::cout << "⚠ Warning: The size of the external token state is not the same as what defined in the config file" << std::endl; + std::cout << "temp_token_state_data.size(): " << temp_token_state_data.size() << std::endl; + std::cout << "token_state_data_.size(): " << token_state_data_.size() << std::endl; + std::cout << "No copying happened." << std::endl; + } else { + std::copy(temp_token_state_data.begin(), temp_token_state_data.end(), token_state_data_.begin()); + is_using_encoder_ = false; + // Safety: Mark that we've received at least one token + if (!first_token_received_) { + first_token_received_ = true; + std::cout << "[Token Safety] ✓ First token received! Control can now be started." << std::endl; + } + last_token_time_ = std::chrono::steady_clock::now(); + + static int token_copy_count = 0; + if (token_copy_count % 50 == 0) { // Warn every ~1 second + std::cout << "[Token Flow] Copied external tokens, tokens[0]=" << token_state_data_[0] << std::endl; + + } + token_copy_count++; + } + } + else if (!has_ext_token_data && !is_using_encoder_) { // if encoder is not used and the external token state is empty + if (initial_encoder_mode_ == -1) { // no encoder is loaded, we need to wait for the external tokens + // Token input mode: waiting for external tokens + auto now = std::chrono::steady_clock::now(); + + // Check if we've received first token + if (!first_token_received_) { + // Warn but don't block - allow control to start + static auto startup_time = std::chrono::steady_clock::now(); + auto elapsed = std::chrono::duration_cast(now - startup_time); + + // Reset the current token_state_data_ to zeros + token_state_data_.assign(token_state_data_.size(), 0.0); + + static int wait_count = 0; + if (wait_count % 250 == 0) { // Print every ~5 seconds (50Hz * 250 = 5s) + std::cout << "⚠ [Token Safety] WARNING: No tokens received yet (" + << elapsed.count() << "s elapsed). " + << "Robot will use zero tokens until tokens start streaming." << std::endl; + } + wait_count++; + } else { + // We've received tokens before, check freshness + if (last_token_time_.has_value()) { + auto time_since_last = std::chrono::duration_cast( + now - last_token_time_.value()); + + if (time_since_last > TOKEN_TIMEOUT_MS) { + static int stale_count = 0; + if (stale_count % 50 == 0) { // Warn every ~1 second + std::cout << "⚠ [Token Safety] WARNING: No tokens received for " + << time_since_last.count() << "ms (timeout: " + << TOKEN_TIMEOUT_MS.count() << "ms). " + << "Robot will use last received tokens." << std::endl; + } + stale_count++; + // Don't pause - just warn + } + } + } + + } else { + // if encoder mode is not -1, we need to turn on the encoder + std::cout << "No encoder is used and not using external tokens" << std::endl; + std::cout << "Turning on the encoder now" << std::endl; + is_using_encoder_ = true; + } + } + } + return true; + } + + /** + * @brief Run the policy neural network and produce a motor command. + * + * Converts the double-precision observation buffer to float, copies it + * into the PolicyEngine's pinned input buffer, runs TensorRT inference, + * then maps the action output (IsaacLab order) to a MotorCommand + * (hardware order) using `g1_action_scale` and `default_angles`. + */ + bool CreatePolicyCommand() { + // Convert double observation to float and populate policy's internal input buffer + auto& obs_buffer_float = policy_engine_->GetInputBuffer(); + for (size_t i = 0; i < obs_buffer_.size(); i++) { + obs_buffer_float[i] = static_cast(obs_buffer_[i]); + } + + // Run policy inference (handles CPU→GPU transfer, inference, GPU→CPU transfer) + if (!policy_engine_->Infer()) { + std::cerr << "✗ Error: Control policy inference failed" << std::endl; + return false; + } + + // Access actions from control policy's internal buffer (already populated by Infer) + auto& action_buffer = policy_engine_->GetActionBuffer(); + float* floatarr = action_buffer.data(); + + MotorCommand motor_command_tmp; + for (int i = 0; i < G1_NUM_MOTOR; i++) { + const double action_value = static_cast(floatarr[isaaclab_to_mujoco[i]]) * g1_action_scale[i]; + last_action[i] = static_cast(floatarr[i]); + motor_command_tmp.q_target.at(i) = static_cast(default_angles[i] + action_value); + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.kp.at(i) = kps[i]; + motor_command_tmp.kd.at(i) = kds[i]; + motor_command_tmp.dq_target.at(i) = 0.0; + } + motor_command_buffer_.SetData(motor_command_tmp); + return true; + } + + /** + * @brief Advance the playback cursor and blend planner output. + * + * Called at the end of each control tick. Two cases: + * + * 1. **Planner active**: Checks if a new planner animation is available. + * If so, blends it into the existing planner_motion_ using a linear + * cross-fade over 8 frames. Then advances current_frame_ by 1. + * + * 2. **Reference-motion mode**: Advances current_frame_ by 1. Clamps or + * resets to 0 when the motion ends (except for "streamed" motions, + * which hold the last valid frame while waiting for new data). + * + * @return True on success. + */ + bool CurrentFrameAdvancement() { + // get current motion and frame from planner when planner is enabled and initialized + std::lock_guard motion_lock(current_motion_mutex_); + if (planner_ && planner_->planner_state_.enabled && planner_->planner_state_.initialized) { + std::lock_guard planner_lock(planner_->planner_motion_mutex_); + + // Check if the planner thread has finished generating a valid animation: + if (planner_->motion_available_ && planner_->planner_motion_50hz_.timesteps > 0) { + + const auto &planner_motion_gen = planner_->planner_motion_50hz_; + planner_->motion_available_ = false; + + // special case if this is the first time we're receiving a planner motion: + bool is_the_first_time = false; + bool success = false; + if(planner_motion_->timesteps == 0) + { + // step through the frames and copy the animation over: + for(int f = 0; f < planner_motion_gen.timesteps; ++f) + { + std::copy( + planner_motion_gen.JointPositions(f), + planner_motion_gen.JointPositions(f) + planner_motion_gen.GetNumJoints(), + planner_motion_->JointPositions(f) + ); + + std::copy( + planner_motion_gen.JointVelocities(f), + planner_motion_gen.JointVelocities(f) + planner_motion_gen.GetNumJoints(), + planner_motion_->JointVelocities(f) + ); + + planner_motion_->BodyPositions(f)[0] = planner_motion_gen.BodyPositions(f)[0]; + planner_motion_->BodyQuaternions(f)[0] = planner_motion_gen.BodyQuaternions(f)[0]; + } + planner_motion_->timesteps = planner_motion_gen.timesteps; + success = true; + is_the_first_time = true; + } + else + { + + auto fgen = planner_->gen_frame_; + + // Ok, a new planner animation is available. We want to do these things: + // * rebase the old planner_motion_ so current_frame_ is at frame 0 + // * fade in the new planner animation, starting at frame fgen - current_frame_ + // (or frame 0 if fgen < current_frame_) + + // The newly generated animation starts at frame fgen - current_frame_ on this + // new timeline, so the total length of the animation will be this: + auto new_anim_length = fgen - current_frame_ + planner_motion_gen.timesteps; + + // guess we've got to sit this out if things arrived so late that we don't have any frames + // we can copy over... + if(new_anim_length > 0) + { + // We want to insert a region where the old animation is blended with the new one + // using a linearly decaying weight. If current_frame_ > fgen, this needs to start + // immediately, otherwise it should start at at frame fgen - current_frame_: + auto blend_start_frame = std::max(0, fgen - current_frame_); + + // choosing 8 for the width of the blend region because this is about the size of the + // context we use for conditioning the planner model + const int blend_num_frames = 8; + + // step through the frames and blend the animations: + for(int f = 0; f < new_anim_length; ++f) + { + // corresponding frames in the old animation and the new one from the + // planner that we're blending in: + int f_old = f + current_frame_; + int f_new = f_old - fgen; + + // clamp to valid ranges: + f_old = std::clamp(f_old, 0, planner_motion_->timesteps - 1); + f_new = std::clamp(f_new, 0, planner_motion_gen.timesteps - 1); + + // calculate linearly decaying blend weight: + double w_new = double(f - blend_start_frame) / blend_num_frames; + w_new = std::clamp(w_new, 0.0, 1.0); + double w_old = 1.0 - w_new; + + // blend joint_positions + joint_velocities: + for(size_t j=0; j < planner_motion_->GetNumJoints(); ++j) + { + planner_motion_->JointPositions(f)[j] = + w_old * planner_motion_->JointPositions(f_old)[j] + + w_new * planner_motion_gen.JointPositions(f_new)[j]; + planner_motion_->JointVelocities(f)[j] = + w_old * planner_motion_->JointVelocities(f_old)[j] + + w_new * planner_motion_gen.JointVelocities(f_new)[j]; + } + + // blend the global xyz position: + for(int j=0; j < 3; ++j) + { + planner_motion_->BodyPositions(f)[0][j] = + w_old * planner_motion_->BodyPositions(f_old)[0][j] + + w_new * planner_motion_gen.BodyPositions(f_new)[0][j]; + } + + // blend the global rotation quaternion using a slerp: + std::array q0 = planner_motion_->BodyQuaternions(f_old)[0]; + std::array q1 = planner_motion_gen.BodyQuaternions(f_new)[0]; + planner_motion_->BodyQuaternions(f)[0] = quat_slerp_d(q0, q1, w_new); + } + + // set the new timestep count and reset the current frame to 0: + planner_motion_->timesteps = new_anim_length; + success = true; + } + } + + if(success) + { + if(planner_motion_file_) + { + // log the motion that we just copied/blended over: + for(int frame = 0; frame < planner_motion_->timesteps; frame++) { + (*planner_motion_file_) << planner_motion_->BodyPositions(frame)[0][0] << ","; + (*planner_motion_file_) << planner_motion_->BodyPositions(frame)[0][1] << ","; + (*planner_motion_file_) << planner_motion_->BodyPositions(frame)[0][2] << ","; + + (*planner_motion_file_) << planner_motion_->BodyQuaternions(frame)[0][0] << ","; + (*planner_motion_file_) << planner_motion_->BodyQuaternions(frame)[0][1] << ","; + (*planner_motion_file_) << planner_motion_->BodyQuaternions(frame)[0][2] << ","; + (*planner_motion_file_) << planner_motion_->BodyQuaternions(frame)[0][3] << ","; + + for(int i = 0; i < 29; i++) { + (*planner_motion_file_) << planner_motion_->JointPositions(frame)[isaaclab_to_mujoco[i]] << ","; + } + + (*planner_motion_file_) << std::endl; + } + + // insert a blank line to separate motions: + (*planner_motion_file_) << std::endl; + } + + // switch the current motion to planner_motion: + current_frame_ = 0; + // Assign shared_ptr directly - planner_motion_ is already a shared_ptr + current_motion_ = planner_motion_; + idle_readapt_stored_ = false; + if(is_the_first_time) { + reinitialize_heading_ = true; + } + } + } + + // Frame advancement at control frequency (50Hz) for smooth playback + if (current_motion_->timesteps > 0 && operator_state.play) { + int new_frame = current_frame_ + 1; + if (new_frame >= current_motion_->timesteps) { + new_frame = current_motion_->timesteps - 1; // Clamp to last frame + // Error-based readaptation in idle mode with double-threshold state machine. + // IDLE: do nothing. ADAPTING: blend toward robot state. RECOVERING: blend toward planner target. + auto movement_state_data = movement_state_buffer_.GetDataWithTime().data; + if(movement_state_data && movement_state_data->locomotion_mode == static_cast(LocomotionMode::IDLE)) { + auto low_state = low_state_buffer_.GetDataWithTime().data; + if (low_state) { + auto motor_state = low_state->motor_state(); + + // Store original planner targets on first entry + if (!idle_readapt_stored_) { + for (int idx : lower_body_joint_isaaclab_order_in_isaaclab_index) { + idle_readapt_original_targets_[idx] = planner_motion_->JointPositions(new_frame)[idx]; + } + idle_readapt_stored_ = true; + idle_readapt_state_ = IdleReadaptState::IDLE; + } + + // Compute average error across all lower-body joints + double total_error = 0.0; + for (int idx : lower_body_joint_isaaclab_order_in_isaaclab_index) { + total_error += std::abs(planner_motion_->JointPositions(new_frame)[idx] + - motor_state[mujoco_to_isaaclab[idx]].q()); + } + double avg_error = total_error / static_cast(lower_body_joint_isaaclab_order_in_isaaclab_index.size()); + + // State transitions + switch (idle_readapt_state_) { + case IdleReadaptState::IDLE: + if (avg_error > kAdaptTrigger) { + idle_readapt_state_ = IdleReadaptState::ADAPTING; + } else if (avg_error < kRecoverTrigger) { + idle_readapt_state_ = IdleReadaptState::RECOVERING; + } + break; + case IdleReadaptState::ADAPTING: + if (avg_error < kAdaptStop) { + idle_readapt_state_ = IdleReadaptState::IDLE; + } + break; + case IdleReadaptState::RECOVERING: + if (avg_error > kAdaptTrigger) { + idle_readapt_state_ = IdleReadaptState::ADAPTING; + } + break; + } + + // Apply blend based on current state + if (idle_readapt_state_ == IdleReadaptState::ADAPTING) { + for (int idx : lower_body_joint_isaaclab_order_in_isaaclab_index) { + double actual = motor_state[mujoco_to_isaaclab[idx]].q(); + planner_motion_->JointPositions(new_frame)[idx] = + 0.98 * planner_motion_->JointPositions(new_frame)[idx] + 0.02 * actual; + } + } else if (idle_readapt_state_ == IdleReadaptState::RECOVERING) { + for (int idx : lower_body_joint_isaaclab_order_in_isaaclab_index) { + planner_motion_->JointPositions(new_frame)[idx] = + 0.98 * planner_motion_->JointPositions(new_frame)[idx] + 0.02 * idle_readapt_original_targets_[idx]; + } + } + // IDLE state: do nothing + } + } + } + current_frame_ = new_frame; + } + } + + // Update motion frame playback for non-planner motion + bool use_planner_motion = (current_motion_ && current_motion_ == planner_motion_); + if (!use_planner_motion && current_motion_ && current_motion_->timesteps > 0 && operator_state.play) { + // Update display motion current frame + current_frame_++; + // Check if motion completed (reached the end) + if (current_motion_->name != "streamed") { + if (current_frame_ >= current_motion_->timesteps) { + operator_state.play = false; + if (current_motion_ ->name != "temporary_motion") { + std::cout << "______________________________________________________" << std::endl; + std::cout << "Motion index: " << motion_reader_.current_motion_index_ << " : " << current_motion_->name << " completed." << std::endl; + std::cout << "______________________________________________________" << std::endl; + } else { + std::cout << "Temporary motion completed." << std::endl; + } + current_frame_ = 0; // Reset to beginning + // Total reset: both base quaternion and delta heading + reinitialize_heading_ = true; + std::cout << "Reset to frame 0." << std::endl; + } + } else { + if (current_frame_ >= current_motion_->timesteps - saved_frame_for_observation_window_) { + current_frame_ = current_frame_ - 1; + std::cout << "Motion " << current_motion_->name << " completed and waiting following motion" << std::endl; + } + } + } + return true; + } + + /** + * @brief Input thread body (100 Hz). + * + * 1. Calls input_interface_->update() to poll keyboard / gamepad / network. + * 2. Forwards raw gamepad data from LowState to the active interface. + * 3. Calls input_interface_->handle_input() to translate flags into + * system-state changes (motion switching, planner commands, etc.). + * 4. Optionally records / plays back input state for offline replay. + */ + void Input() { + if (operator_state.stop) { return; } + + // Update input interface (poll for new data) + input_interface_->update(); + + // Handle input using the interface - input handler updates everything directly + const std::shared_ptr low_state_data = low_state_buffer_.GetDataWithTime().data; + std::array current_quat = {0.0, 0.0, 0.0, 1.0}; + if(low_state_data) { + current_quat = float_to_double<4>(low_state_data->imu_state().quaternion()); + } + + // Update gamepad data if using gamepad interface (or manager) + if (auto gamepad = dynamic_cast(input_interface_.get())) { + if(low_state_data) { + memcpy(gamepad->gamepad_data.buff, &low_state_data->wireless_remote()[0], 40); + }else{ + for(int i = 0; i < 40; i++) { + gamepad->gamepad_data.buff[i] = 0; + } + } + } + else if (auto manager = dynamic_cast(input_interface_.get())) { + if (low_state_data) { + manager->UpdateGamepadRemoteData(&low_state_data->wireless_remote()[0], 40); + } else { + uint8_t zeros[40] = {0}; + manager->UpdateGamepadRemoteData(zeros, 40); + } + } + else if (auto gamepad_mgr = dynamic_cast(input_interface_.get())) { + if (low_state_data) { + gamepad_mgr->UpdateGamepadRemoteData(&low_state_data->wireless_remote()[0], 40); + } else { + uint8_t zeros[40] = {0}; + gamepad_mgr->UpdateGamepadRemoteData(zeros, 40); + } + } + + + bool has_planner = static_cast(planner_); + + if (has_planner) { + input_interface_->handle_input(motion_reader_, current_motion_, current_frame_, operator_state, + reinitialize_heading_, heading_state_buffer_, has_planner, planner_->planner_state_, movement_state_buffer_, current_motion_mutex_, report_temperature_); + } else { + PlannerState planner_state{false, false}; + input_interface_->handle_input(motion_reader_, current_motion_, current_frame_, operator_state, + reinitialize_heading_, heading_state_buffer_, has_planner, planner_state, movement_state_buffer_, current_motion_mutex_, report_temperature_); + } + + if (playback_input_file_ && program_state_ == ProgramState::CONTROL) { + std::string line; + PlannerState ps{false, false}; + auto &planner_state = has_planner ? planner_->planner_state_ : ps; + if (std::getline(*playback_input_file_, line)) { + + MovementState movement_state; + std::istringstream iss(line); + std::string token; + std::getline(iss, token, ','); + motion_reader_.current_motion_index_ = std::stoi(token); + std::getline(iss, token, ','); + //current_frame_ = std::stoi(token); + std::getline(iss, token, ','); + operator_state.play = std::stoi(token); + std::getline(iss, token, ','); + operator_state.start = std::stoi(token); + std::getline(iss, token, ','); + operator_state.stop = std::stoi(token); + std::getline(iss, token, ','); + planner_state.enabled = std::stoi(token); + std::getline(iss, token, ','); + planner_state.initialized = std::stoi(token); + std::getline(iss, token, ','); + movement_state.locomotion_mode = std::stoi(token); + std::getline(iss, token, ','); + movement_state.movement_direction[0] = std::stof(token); + std::getline(iss, token, ','); + movement_state.movement_direction[1] = std::stof(token); + std::getline(iss, token, ','); + movement_state.movement_direction[2] = std::stof(token); + std::getline(iss, token, ','); + movement_state.facing_direction[0] = std::stof(token); + std::getline(iss, token, ','); + movement_state.facing_direction[1] = std::stof(token); + std::getline(iss, token, ','); + movement_state.facing_direction[2] = std::stof(token); + std::getline(iss, token, ','); + movement_state.movement_speed = std::stof(token); + movement_state_buffer_.SetData(movement_state); + + if(!(has_planner && planner_state.enabled && planner_state.initialized)) { + std::lock_guard lock(current_motion_mutex_); + current_motion_ = motion_reader_.GetMotionShared(motion_reader_.current_motion_index_); + } + } + } + + if (record_input_file_ && program_state_ == ProgramState::CONTROL) { + auto movement_state_data = movement_state_buffer_.GetDataWithTime(); + PlannerState ps{false, false}; + const auto &planner_state = has_planner ? planner_->planner_state_ : ps; + (*record_input_file_) << motion_reader_.current_motion_index_ << ","; + (*record_input_file_) << current_frame_ << ","; + (*record_input_file_) << operator_state.play << ","; + (*record_input_file_) << operator_state.start << ","; + (*record_input_file_) << operator_state.stop << ","; + + (*record_input_file_) << planner_state.enabled << ","; + (*record_input_file_) << planner_state.initialized << ","; + + (*record_input_file_) << movement_state_data.data->locomotion_mode << ","; + (*record_input_file_) << movement_state_data.data->movement_direction[0] << ","; + (*record_input_file_) << movement_state_data.data->movement_direction[1] << ","; + (*record_input_file_) << movement_state_data.data->movement_direction[2] << ","; + (*record_input_file_) << movement_state_data.data->facing_direction[0] << ","; + (*record_input_file_) << movement_state_data.data->facing_direction[1] << ","; + (*record_input_file_) << movement_state_data.data->facing_direction[2] << ","; + (*record_input_file_) << movement_state_data.data->movement_speed << ","; + (*record_input_file_) << movement_state_data.data->height << ","; + (*record_input_file_) << std::endl; + } + + } + + /** + * @brief Planner thread body (10 Hz). + * + * When the planner is enabled: + * - First call: initialises the planner with the robot's current pose + * (base quaternion + joint positions) and runs an initial inference. + * - Subsequent calls: reads the latest MovementState from the + * movement_state_buffer_, decides whether a replan is needed (mode + * change, direction change, or periodic timer), and if so calls + * UpdatePlanning() which runs TensorRT inference and produces a new + * 30 Hz trajectory (resampled to 50 Hz by the base class). + * + * Replan intervals vary by locomotion type: + * - Running: every 0.1 s + * - Crawling: every 0.2 s + * - Boxing: every 1.0 s + * - Default: every 1.0 s + * + * The generated animation is stored in planner_->planner_motion_50hz_ + * and picked up by CurrentFrameAdvancement() in the control thread. + */ + void Planner() { + if (operator_state.stop) { return; } + auto low_state_data = low_state_buffer_.GetDataWithTime(); + const std::shared_ptr ls = low_state_data.data; + + if (planner_ && planner_->planner_state_.enabled) { + if (ls) { + if (!planner_->planner_state_.initialized) { + try { + std::cout << "Initializing planner..." << std::endl; + planner_motion_->timesteps = 0; + std::cout << "Setting planner_motion encode mode to " << initial_encoder_mode_ << std::endl; + planner_motion_->SetEncodeMode(initial_encoder_mode_); + // Get base quaternion and joint positions from robot state + std::array base_quat = float_to_double<4>(ls->imu_state().quaternion()); + std::array joint_positions; + for (int i = 0; i < G1_NUM_MOTOR; i++) { + joint_positions[i] = ls->motor_state()[i].q(); + } + // Initialize planner with robot state + if(!planner_->Initialize(base_quat, joint_positions)) { + throw std::runtime_error("Error when initializing planner"); + } + + std::cout << "Planner initialized successfully!" << std::endl; + + // Start recording session for planner motion (if enabled) + if (enable_motion_recording_) { + if (planner_motion_recorder_.IsActive()) { + planner_motion_recorder_.Finalize(); + } + planner_motion_recorder_.StartSession("planner_motion"); + } + + } catch (const std::exception& e) { + std::cout << "✗ Error initializing planner: " << e.what() << std::endl; + std::cout << "Disabling planner to prevent further errors..." << std::endl; + planner_->planner_state_.enabled = false; + planner_->planner_state_.initialized = false; + planner_motion_->timesteps = 0; + // reset operator state and current motion and frame + { + std::lock_guard lock(current_motion_mutex_); + operator_state.play = false; + current_frame_ = 0; + current_motion_ = motion_reader_.GetMotionShared(motion_reader_.current_motion_index_); + } + // Finalize recording if initialization failed + if (planner_motion_recorder_.IsActive()) { + planner_motion_recorder_.Finalize(); + } + + return; + } + } + else { + if (planner_motion_->timesteps == 0) { + std::cout << "Planner() no data in planner_motion_, returning. If control loop is started, this should only happen once when planner is initialized. If control loop is not started, this should keep returning until control loop is started." << std::endl; + return; + } + bool need_replan = false; + + // bool of different reason to replan + bool time_to_replan = false; + bool facing_direction_changed = false; + bool height_changed = false; + bool movement_mode_changed = false; + bool movement_speed_changed = false; + bool movement_direction_changed = false; + bool under_static_motion_mode = is_static_motion_mode(static_cast(last_movement_state_.locomotion_mode)); + + // Read current movement mode from thread-safe buffer + auto movement_state_data = movement_state_buffer_.GetDataWithTime(); + + if (movement_state_data.data) { + // bool of checking if facing direction is changed + facing_direction_changed = movement_state_data.data->facing_direction[0] != last_movement_state_.facing_direction[0] || + movement_state_data.data->facing_direction[1] != last_movement_state_.facing_direction[1] || + movement_state_data.data->facing_direction[2] != last_movement_state_.facing_direction[2]; + // bool of checking if height is changed + height_changed = movement_state_data.data->height != last_movement_state_.height; + // bool of checking if movement mode is changed + movement_mode_changed = movement_state_data.data->locomotion_mode != last_movement_state_.locomotion_mode; + // bool of checking if movement speed is changed + movement_speed_changed = movement_state_data.data->movement_speed != last_movement_state_.movement_speed; + // bool of checking if movement direction is changed + movement_direction_changed = movement_state_data.data->movement_direction[0] != last_movement_state_.movement_direction[0] || + movement_state_data.data->movement_direction[1] != last_movement_state_.movement_direction[1] || + movement_state_data.data->movement_direction[2] != last_movement_state_.movement_direction[2]; + // bool of checking if the last movement value is under the static motion mode + under_static_motion_mode = is_static_motion_mode(static_cast(movement_state_data.data->locomotion_mode)); + } + bool is_running = movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::RUN); + bool is_boxing = movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::LEFT_PUNCH) || + movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::RIGHT_PUNCH) || + movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::RANDOM_PUNCH) || + movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::LEFT_HOOK) || + movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::RIGHT_HOOK); + bool is_crawling = movement_state_data.data->locomotion_mode == static_cast(LocomotionMode::CRAWLING); + // increment replan interval counter + replan_interval_counter_ += planner_dt_; + // check if need to replan + if(is_running) { + if(replan_interval_counter_ >= replan_interval_running_) { + // reset replan interval counter + replan_interval_counter_ = 0.0f; + // set need to replan to true + time_to_replan = true; + } + } else if(is_crawling) { + if(replan_interval_counter_ >= replan_interval_crawling_) { + // reset replan interval counter + replan_interval_counter_ = 0.0f; + // set need to replan to true + time_to_replan = true; + } + } else if(is_boxing) { + if(replan_interval_counter_ >= replan_interval_boxing_) { + // reset replan interval counter + replan_interval_counter_ = 0.0f; + // set need to replan to true + time_to_replan = true; + } + } else { + if(replan_interval_counter_ >= replan_interval_) { + // reset replan interval counter + replan_interval_counter_ = 0.0f; + // set need to replan to true + time_to_replan = true; + } + } + + if (movement_mode_changed || facing_direction_changed || height_changed) { + need_replan = true; + } else if (!under_static_motion_mode && (movement_speed_changed || movement_direction_changed || (time_to_replan && movement_state_data.data->movement_speed != 0))) { + need_replan = true; + } + + if (!need_replan) { + // no need to replan, return + return; + } + + auto gather_input_start_time = std::chrono::steady_clock::now(); + + int current_mode = static_cast(LocomotionMode::IDLE); + std::array movement_direction = {0.0f, 0.0f, 0.0f}; + std::array facing_direction = {1.0f, 0.0f, 0.0f}; // Default forward + float movement_speed = -1.0f; + float target_height = -1.0f; + + if (movement_state_data.data) { + current_mode = movement_state_data.data->locomotion_mode; + movement_direction[0] = movement_state_data.data->movement_direction[0]; + movement_direction[1] = movement_state_data.data->movement_direction[1]; + movement_direction[2] = movement_state_data.data->movement_direction[2]; + facing_direction[0] = movement_state_data.data->facing_direction[0]; + facing_direction[1] = movement_state_data.data->facing_direction[1]; + facing_direction[2] = movement_state_data.data->facing_direction[2]; + movement_speed = movement_state_data.data->movement_speed; + target_height = movement_state_data.data->height; + + // Update last movement state for next iteration comparison (update here to avoid missing the update) + last_movement_state_.locomotion_mode = movement_state_data.data->locomotion_mode; + last_movement_state_.movement_direction = movement_state_data.data->movement_direction; + last_movement_state_.facing_direction = movement_state_data.data->facing_direction; + last_movement_state_.movement_speed = movement_state_data.data->movement_speed; + last_movement_state_.height = movement_state_data.data->height; + } + + try { + // Update planning with current movement parameters + + // gotta make sure planner_motion actually has data... + if(!planner_->UpdatePlanning( + current_frame_, + planner_motion_, + current_mode, + movement_speed, + target_height, + movement_direction, + facing_direction + )) { + throw std::runtime_error("Error when updating planner"); + } + + } catch (const std::exception& e) { + std::cout << "✗ Error during planning update: " << e.what() << std::endl; + std::cout << "Disabling planner to prevent further errors..." << std::endl; + planner_->planner_state_.enabled = false; + planner_->planner_state_.initialized = false; + planner_motion_->timesteps = 0; + // reset operator state and current motion and frame + { + std::lock_guard lock(current_motion_mutex_); + operator_state.play = false; + current_frame_ = 0; + current_motion_ = motion_reader_.GetMotionShared(motion_reader_.current_motion_index_); + } + // Finalize recording if planning update failed + if (planner_motion_recorder_.IsActive()) { + planner_motion_recorder_.Finalize(); + } + + return; + } + } + } + } else if (planner_ && !planner_->planner_state_.enabled) { + // since the planner is disabled, we make sure to reset initialized and timesteps + planner_->planner_state_.initialized = false; + + // Finalize planner motion recording when planner is disabled + if (planner_motion_recorder_.IsActive()) { + planner_motion_recorder_.Finalize(); + } + + return; + } + } + + /** + * @brief Control thread body (50 Hz) — the main real-time control loop. + * + * State machine: + * - INIT: ramps the robot to the default standing pose (InitControl). + * - WAIT_FOR_CONTROL: idle, waiting for operator "start" signal. + * - CONTROL: each tick performs the full pipeline: + * 1. GatherRobotStateToLogger — read IMU + joints, log to StateLogger. + * 2. GatherInputInterfaceData — snapshot VR / hand / token data. + * 3. GatherObservations — fill the policy observation vector. + * 4. LogPostState — append encoder token to the latest log entry. + * 5. CreatePolicyCommand — run TensorRT policy, produce MotorCommand. + * 6. Update Dex3 hands (max-close ratio + joint targets). + * 7. Publish state to all output interfaces (ZMQ / ROS2). + * 8. Handle motion recording (streamed + planner). + * 9. CurrentFrameAdvancement — advance playback cursor, blend planner. + * 10. Periodic timing log every 50 ticks (~1 s). + */ + void Control() { + if (operator_state.stop) { return; } + + switch (program_state_) { + case ProgramState::INIT: + if (!InitControl()) { + std::cout << "LowState is not available, waiting for robot to be ready" << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + // Re-publish robot_config so late-joining subscribers can receive it + // before the policy is activated (ZMQ PUB has no persistence). + for (auto& oi : output_interfaces_) { if (oi) oi->publish_config(); } + break; + + case ProgramState::WAIT_FOR_CONTROL: + if (!CheckSafety()) { + std::cout << "[ERROR] Safety check failed, cannot start control." << std::endl; + operator_state.stop = true; + break; + } + + // Re-publish robot_config so late-joining subscribers can receive it + // before the policy is activated (ZMQ PUB has no persistence). + for (auto& oi : output_interfaces_) { if (oi) oi->publish_config(); } + if (operator_state.start) { + // Warn if starting control in token mode without tokens, but allow it + if (initial_encoder_mode_ == -1 && !first_token_received_) { + static int warn_count = 0; + if (warn_count % 50 == 0) { // Warn every ~1 second + std::cout << "⚠⚠⚠ [Token Safety] WARNING: Starting control before tokens arrive! " + << "Robot will use zero tokens until tokens start streaming." << std::endl; + } + warn_count++; + } + std::cout << "[Control] DEBUG: operator_state.start=true, transitioning to CONTROL state" << std::endl; + program_state_ = ProgramState::CONTROL; + } + break; + + case ProgramState::CONTROL: { + if (!CheckSafety()) { + std::cout << "[ERROR] Safety check failed, stopping control." << std::endl; + operator_state.stop = true; + break; + } + + // NEW: Get data with timestamps for loop timing analysis + auto obs_start_time = std::chrono::steady_clock::now(); + // Increment independent logging counter every control iteration + logging_counter_++; + + if (!GatherRobotStateToLogger()) { + std::cout << "✗ Error: Failed to gather robot state to logger in the middle of the control loop!" << std::endl; + operator_state.stop = true; + std::cout << "Stopping control system." << std::endl; + return; + } + + // Handle temperature report request (F key) + if (report_temperature_) { + report_temperature_ = false; + const auto ls = used_low_state_data_.data; + if (ls) { + static const char* joint_names[] = { + "Left Hip Pitch", "Left Hip Roll", "Left Hip Yaw", "Left Knee", + "Left Ankle Pitch", "Left Ankle Roll", "Right Hip Pitch", "Right Hip Roll", + "Right Hip Yaw", "Right Knee", "Right Ankle Pitch", "Right Ankle Roll", + "Waist Yaw", "Waist Roll", "Waist Pitch", + "Left Shoulder Pitch", "Left Shoulder Roll", "Left Shoulder Yaw", "Left Elbow", + "Left Wrist Roll", "Left Wrist Pitch", "Left Wrist Yaw", + "Right Shoulder Pitch", "Right Shoulder Roll", "Right Shoulder Yaw", "Right Elbow", + "Right Wrist Roll", "Right Wrist Pitch", "Right Wrist Yaw", + }; + + // Print full report to console with joint names + std::cout << "\n[Temperature Report] Motor temperatures (winding / driver):" << std::endl; + std::array, G1_NUM_MOTOR> max_temps; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + auto temp = ls->motor_state()[i].temperature(); + std::cout << " " << std::setw(2) << i << " " << std::setw(22) << std::left + << joint_names[i] << std::right << ": " + << std::setw(4) << temp[0] << " / " << std::setw(4) << temp[1] << std::endl; + max_temps[i] = {std::max(temp[0], temp[1]), i}; + } + std::cout << std::endl; + + // TTS: top 3 hottest motors + std::sort(max_temps.begin(), max_temps.end(), + [](const auto& a, const auto& b) { return a.first > b.first; }); + std::string tts = "Hottest motors: "; + for (int k = 0; k < 3 && k < G1_NUM_MOTOR; ++k) { + auto [temp_val, idx] = max_temps[k]; + if (k > 0) tts += ", "; + tts += std::string(joint_names[idx]) + " " + std::to_string(temp_val); + } + pending_tts_ = tts; + } + } + + if (!GatherInputInterfaceData()) { + return; + } + + + // Lock mutex for observation gathering and output sending to ensure consistency + // This ensures all observations use the same snapshot of current_motion_ and current_frame_ + int current_frame_copy; + int current_encoder_mode_copy; + bool current_play_copy; + std::shared_ptr current_motion_copy = nullptr; + { + std::lock_guard lock(current_motion_mutex_); + current_frame_copy = current_frame_; + current_motion_copy = current_motion_; + current_encoder_mode_copy = current_motion_copy->GetEncodeMode(); + current_play_copy = operator_state.play; + + // reset saved frame for observation window before gathering observations so that we can get the latest value + saved_frame_for_observation_window_ = 0; + + // Update heading state (handles reinitialize_heading_ and frame-0 init) + // Must run before any orientation observation functions + UpdateHeadingState(); + + // Gather all observations using modular functions + // This may update token_state_data_ with encoder output (if encoder is used) + if (!GatherObservations()) { + std::cout << "✗ Error: Failed to gather observations in the middle of the control loop!" << std::endl; + std::cout << "Stopping control system." << std::endl; + operator_state.stop = true; + return; + } + } // Release lock after all observation-dependent operations + + // Log post-state data (token state) to the most recent state logger entry + // This must be called after GatherObservations() which populates token_state_data_ + if (state_logger_) { + std::string motion_name = current_motion_copy ? current_motion_copy->name : ""; + if (!state_logger_->LogPostState(std::span(token_state_data_), current_encoder_mode_copy, motion_name, current_play_copy)) { + std::cerr << "[WARNING] Failed to log token state to state logger" << std::endl; + } + } + + auto obs_end_time = std::chrono::steady_clock::now(); + + if (!CreatePolicyCommand()) { + std::cout << "✗ Error: Failed to create policy command in the middle of the control loop!" << std::endl; + std::cout << "Stopping control system." << std::endl; + operator_state.stop = true; + return; + } + auto motor_command_end_time = std::chrono::steady_clock::now(); + + // Update Dex3 hands max close ratio from keyboard-controlled value (X/C keys) + dex3_hands_.SetMaxCloseRatio(input_interface_->GetMaxCloseRatio()); + + // set hand poses (use buffered data for consistency) + dex3_hands_.setAllJointsCommand(true, left_hand_joint_buffer_); + dex3_hands_.setAllJointsCommand(false, right_hand_joint_buffer_); + + // Update last hand actions for logging (use buffered data) + for (int i = 0; i < 7; ++i) { + last_left_hand_action[i] = left_hand_joint_buffer_[i]; + last_right_hand_action[i] = right_hand_joint_buffer_[i]; + } + + auto hand_joint_end_time = std::chrono::steady_clock::now(); + + // Publish output data (state logger data, robot config, command/motion data) to all output interfaces + for (auto& output_interface : output_interfaces_) { + if (output_interface) { + output_interface->publish( + vr_3point_position_buffer_, vr_3point_orientation_buffer_, vr_3point_compliance_buffer_, + left_hand_joint_buffer_, right_hand_joint_buffer_, init_ref_data_root_rot_array_, + heading_state_buffer_, current_motion_copy, current_frame_copy + ); + } + } + + // Handle recording of streamed motion (if enabled) + if (enable_motion_recording_) { + if (current_motion_copy && current_motion_copy->name == "streamed") { + // Start recording session when streamed starts at frame 0 + if (current_frame_copy == 0 && !zmq_motion_recorder_.IsActive()) { + zmq_motion_recorder_.StartSession("streamed"); + } + + // Write current frame if recording is active + if (zmq_motion_recorder_.IsActive() && operator_state.play) { + zmq_motion_recorder_.WriteFrame(current_motion_copy, current_frame_copy); + } + } else { + // Finalize recording when switching away from streamed + if (zmq_motion_recorder_.IsActive()) { + zmq_motion_recorder_.Finalize(); + } + } + + // Handle recording of planner_motion (closed-loop result) + if (current_motion_copy && current_motion_copy == planner_motion_) { + // Write current frame if recording is active + if (planner_motion_recorder_.IsActive() && operator_state.play) { + planner_motion_recorder_.WriteFrame(current_motion_copy, current_frame_copy); + } + } + } + + // Write target motion to file + if (target_motion_file_) { + (*target_motion_file_) << current_motion_copy->BodyPositions(current_frame_copy)[0][0] << ","; + (*target_motion_file_) << current_motion_copy->BodyPositions(current_frame_copy)[0][1] << ","; + (*target_motion_file_) << current_motion_copy->BodyPositions(current_frame_copy)[0][2] << ","; + + (*target_motion_file_) << current_motion_copy->BodyQuaternions(current_frame_copy)[0][0] << ","; + (*target_motion_file_) << current_motion_copy->BodyQuaternions(current_frame_copy)[0][1] << ","; + (*target_motion_file_) << current_motion_copy->BodyQuaternions(current_frame_copy)[0][2] << ","; + (*target_motion_file_) << current_motion_copy->BodyQuaternions(current_frame_copy)[0][3] << ","; + + for(int i = 0; i < 29; i++) { + (*target_motion_file_) << current_motion_copy->JointPositions(current_frame_copy)[isaaclab_to_mujoco[i]] << ","; + } + + (*target_motion_file_) << std::endl; + } + + if(policy_input_file_) + { + // dump neural network inputs to a log file: + for(auto d : obs_buffer_) + { + (*policy_input_file_) << d << ","; + } + (*policy_input_file_) << std::endl; + } + + if (!CurrentFrameAdvancement()) { + std::cout << "✗ Error: Failed to advance current frame in the middle of the control loop!" << std::endl; + std::cout << "Stopping control system." << std::endl; + operator_state.stop = true; + return; + } + + if (logging_counter_ % 50 == 0) { + auto control_loop_end_time = std::chrono::steady_clock::now(); + auto obs_duration = std::chrono::duration_cast(obs_end_time - obs_start_time); + auto policy_duration = std::chrono::duration_cast(motor_command_end_time - obs_end_time); + auto motor_command_duration = std::chrono::duration_cast(motor_command_end_time - obs_start_time); + auto post_hand_joint_duration = std::chrono::duration_cast(control_loop_end_time - hand_joint_end_time); + + std::cout << "Loop timing - LowState age: " << used_low_state_data_.GetAgeMs() << "ms" + << ", Streaming data mean delay: " << streaming_data_delay_rolling_stats_.mean() << "ms" + << ", Streaming data std delay: " << streaming_data_delay_rolling_stats_.stddev() << "ms" + << ", IMU age: " << used_imu_torso_data_.GetAgeMs() << "ms" + << ", Obs: " << obs_duration.count() << "us" + << ", Policy: " << policy_duration.count() << "us" + << ", Obs 2 Motor Command: " << motor_command_duration.count() << "us" + << ", Post processing: " << post_hand_joint_duration.count() << "us"; + + // Add planner timing if planner is enabled and initialized + if (planner_ && planner_->planner_state_.enabled && planner_->planner_state_.initialized) { + std::cout << ", Planner - Gather Input: " << planner_->last_timing_.gather_input_duration.count() << "us" + << ", Model: " << planner_->last_timing_.model_duration.count() << "us" + << ", Convert50Hz: " << planner_->last_timing_.extract_duration.count() << "us" + << ", Total: " << planner_->last_timing_.total_duration.count() << "us"; + } + + // Only print compliance levels if the policy observes them + if (has_vr_3point_compliance_obs_) { + std::cout << " | Compliance [L,R,H]: [" + << vr_3point_compliance_buffer_[0] << ", " + << vr_3point_compliance_buffer_[1] << ", " + << vr_3point_compliance_buffer_[2] << "]"; + } + + // Print hand max close ratio (keyboard-controlled via X/C keys) + std::cout << " | HandCloseRatio: " << dex3_hands_.GetMaxCloseRatio(); + + std::cout << std::endl; + } + break; + } + } + } +}; + +/** + * @brief Entry point: parse CLI arguments and run the G1 deployment application. + * + * Required positional arguments: + * 1. network_interface – DDS network interface (e.g. "eth0") + * 2. policy_file – Path to the ONNX policy model + * 3. motion_data_path – Directory of pre-loaded reference motions + * + * All other arguments are optional flags (see --help for full list). + * The main loop sleeps until the operator issues a stop signal or ROS2 shuts down. + */ +int main(int argc, char const* argv[]) { + std::cout << "[DEBUG] Program starting..." << std::endl; + if (argc < 4) { + std::cout << "Usage: " << argv[0] << " [OPTIONS]" + << std::endl; + std::cout << " network_interface: network interface for DDS communication" << std::endl; + std::cout << " policy_file: path to ONNX policy file" << std::endl; + std::cout << " motion_data_path: path to motion data directory (e.g., reference/bones_072925_test/)" << std::endl; + std::cout << "\nOptions:" << std::endl; + std::cout << " --planner-file : specify planner file (optional)" << std::endl; + std::cout << " --input-type : input interface type (default: keyboard)" << std::endl; + std::cout << " --output-type : output interface type (default: zmq, 'all' creates all available)" << std::endl; + std::cout << " --target-motion-logfile : write target motion to a csv file if provided" << std::endl; + std::cout << " --planner-motion-logfile : write planner motion to a csv file if provided" << std::endl; + std::cout << " --policy-input-logfile : write policy input tensors to a csv file if provided" << std::endl; + std::cout << " --disable-crc-check: disable CRC validation for MuJoCo simulation" << std::endl; + std::cout << " --obs-config : specify observation configuration YAML file" << std::endl; + std::cout << " --encoder-file : specify encoder ONNX file (optional)" << std::endl; + std::cout << " --planner-precision <16|32>: specify precision to run the planner model at (default: 16)" << std::endl; + std::cout << " --policy-precision <16|32>: specify precision to run the policy model at (default: 32)" << std::endl; + std::cout << " --zmq-host : ZMQ server host (default: localhost)" << std::endl; + std::cout << " --zmq-port : ZMQ server port (default: 5556)" << std::endl; + std::cout << " --zmq-topic : ZMQ topic/prefix (default: pose)" << std::endl; + std::cout << " --zmq-conflate: enable ZMQ CONFLATE (default: disabled)" << std::endl; + std::cout << " --zmq-verbose: enable ZMQ subscriber verbose logs" << std::endl; + std::cout << " --zmq-out-port : ZMQ port for output (default: 5557)" << std::endl; + std::cout << " --zmq-out-topic : ZMQ topic/prefix for output (default: g1_debug)" << std::endl; + std::cout << " --logs-dir : optional logs output base directory (default: logs//)" << std::endl; + std::cout << " --enable-csv-logs: enable writing CSV logs (default: OFF)" << std::endl; + std::cout << " --enable-motion-recording: enable motion recording for ZMQ/planner (default: OFF)" << std::endl; + std::cout << " --set-compliance : set initial VR 3-point compliance (0.01=rigid, 0.5=compliant; default: [0.5, 0.5, 0.0])" << std::endl; + std::cout << " Can specify 1 value (both hands) or 3 values (left_wrist,right_wrist,head)" << std::endl; + std::cout << " Keyboard controls: g/h = left hand +/- 0.1, b/v = right hand +/- 0.1" << std::endl; + std::cout << " --max-close-ratio : set initial hand max close ratio (0.2-1.0; default: 1.0 = full closure)" << std::endl; + std::cout << " 0.2 = limited (80% open), 1.0 = full closure allowed" << std::endl; + std::cout << " Keyboard controls: x/c = +/- 0.1 (always available)" << std::endl; + std::cout << "\nExamples:" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --planner-file policy/planner.onnx --obs-config policy/single_frame/observation_config.yaml --disable-crc-check" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/token/model.onnx reference/bones_072925_test/ --obs-config policy/token/observation_config.yaml --encoder-file policy/token/encoder.onnx" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --input-type gamepad --planner-file policy/planner.onnx" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --input-type gamepad_manager --planner-file policy/planner.onnx --zmq-host localhost --zmq-port 5556" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --input-type zmq --zmq-host 192.168.1.2 --zmq-port 5556 --zmq-topic pose --zmq-conflate" << std::endl; + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --input-type zmq_manager --planner-file policy/planner.onnx --zmq-host localhost --zmq-port 5556" << std::endl; +#if HAS_ROS2 + std::cout << " " << argv[0] << " enp5s0 policy/single_frame/model.onnx reference/bones_072925_test/ --input-type ros2 --planner-file policy/planner.onnx" << std::endl; +#endif + exit(0); + } + std::cout << "[DEBUG] Arguments validated..." << std::endl; + std::string networkInterface = argv[1]; + std::string modelFile = argv[2]; + std::string motionDataPath = argv[3]; + std::string plannerFile = ""; + + // Parse optional arguments + bool disableCrcCheck = false;\ + std::string obsConfigPath = ""; + std::string encoderFile = ""; + std::string targetMotionLogfile = ""; + std::string plannerMotionLogfile = ""; + std::string policyInputLogfile = ""; + std::string recordInputFile = ""; + std::string playbackInputFile = ""; + std::string inputType = "keyboard"; // Default to keyboard + std::string outputType = "zmq"; // Default to zmq + bool plannerFp16 = false; + bool policyFp16 = false; + std::string logsDir = ""; + bool enableCsvLogs = false; + std::string zmq_host = "localhost"; + int zmq_port = 5556; + std::string zmq_topic = "pose"; + bool zmq_conflate = false; // default off; enable with --zmq-conflate + bool zmq_verbose = false; + bool enableMotionRecording = false; // default off; enable with --enable-motion-recording + int zmq_out_port = 5557; + std::string zmq_out_topic = "g1_debug"; + std::array initial_compliance = {0.5, 0.5, 0.0}; // initial compliance is 0.5 for both hands (keyboard controllable) + double initial_max_close_ratio = 1.0; // default allows full closure, use --max-close-ratio to limit + for (int i = 4; i < argc; i++) { + if (std::string(argv[i]) == "--disable-crc-check") { + disableCrcCheck = true; + std::cout << "[INFO] CRC checking disabled for MuJoCo simulation" << std::endl; + } else if (std::string(argv[i]) == "--obs-config") { + if (i + 1 < argc) { + obsConfigPath = argv[i + 1]; + std::cout << "[INFO] Using observation config: " << obsConfigPath << std::endl; + i++; // Skip the next argument since it's the config path + } else { + std::cerr << "Error: --obs-config requires a path argument" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--encoder-file") { + if (i + 1 < argc) { + encoderFile = argv[i + 1]; + std::cout << "[INFO] Using encoder file: " << encoderFile << std::endl; + i++; // Skip the next argument since it's the encoder file path + } else { + std::cerr << "Error: --encoder-file requires a path argument" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--planner-file") { + if (i + 1 < argc) { + plannerFile = argv[i + 1]; + std::cout << "[INFO] Using planner file: " << plannerFile << std::endl; + i++; // Skip the next argument since it's the planner path + } else { + std::cerr << "Error: --planner-file requires a path argument" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--target-motion-logfile") { + if (i + 1 < argc) { + targetMotionLogfile = argv[i + 1]; + std::cout << "[INFO] Using target motion logfile: " << targetMotionLogfile << std::endl; + i++; // Skip the next argument since it's the target motion logfile + } + } else if (std::string(argv[i]) == "--planner-motion-logfile") { + if (i + 1 < argc) { + plannerMotionLogfile = argv[i + 1]; + std::cout << "[INFO] Using planner motion logfile: " << plannerMotionLogfile << std::endl; + i++; // Skip the next argument since it's the planner motion logfile + } + } else if (std::string(argv[i]) == "--policy-input-logfile") { + if (i + 1 < argc) { + policyInputLogfile = argv[i + 1]; + std::cout << "[INFO] Using policy input logfile: " << policyInputLogfile << std::endl; + i++; // Skip the next argument since it's the policy input logfile + } + } else if (std::string(argv[i]) == "--input-type") { + if (i + 1 < argc) { + inputType = argv[i + 1]; + // Validate input type based on what's available + bool valid_input = (inputType == "keyboard" || inputType == "gamepad" || inputType == "gamepad_manager" || inputType == "zmq" || inputType == "zmq_manager" || inputType == "manager"); +#if HAS_ROS2 + valid_input = valid_input || (inputType == "ros2"); +#endif + if (!valid_input) { + std::cerr << "Error: --input-type must be 'keyboard', 'gamepad', 'gamepad_manager', 'manager', 'zmq', or 'zmq_manager'"; +#if HAS_ROS2 + std::cerr << ", or 'ros2'"; +#endif + std::cerr << std::endl; + exit(1); + } + std::cout << "[INFO] Using input type: " << inputType << std::endl; + i++; // Skip the next argument since it's the input type + } else { + std::cerr << "Error: --input-type requires a type argument (keyboard, gamepad, gamepad_manager, manager, zmq, zmq_manager"; +#if HAS_ROS2 + std::cerr << ", or ros2"; +#endif + std::cerr << ")" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--output-type") { + if (i + 1 < argc) { + outputType = argv[i + 1]; + bool valid_output = (outputType == "zmq" || outputType == "all"); +#if HAS_ROS2 + valid_output = valid_output || (outputType == "ros2"); +#endif + if (!valid_output) { + std::cerr << "Error: --output-type must be 'zmq', 'all'"; +#if HAS_ROS2 + std::cerr << ", or 'ros2'"; +#endif + std::cerr << std::endl; + exit(1); + } + std::cout << "[INFO] Using output type: " << outputType << std::endl; + i++; // Skip the next argument since it's the output type + } else { + std::cerr << "Error: --output-type requires a type argument (zmq, all"; +#if HAS_ROS2 + std::cerr << ", or ros2"; +#endif + std::cerr << ")" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--zmq-out-port") { + if (i + 1 < argc) { zmq_out_port = std::stoi(argv[i + 1]); i++; } + } else if (std::string(argv[i]) == "--zmq-out-topic") { + if (i + 1 < argc) { zmq_out_topic = argv[i + 1]; i++; } + } else if (std::string(argv[i]) == "--record-input-file") { + if (i + 1 < argc) { + recordInputFile = argv[i + 1]; + std::cout << "[INFO] Recording input to logfile: " << recordInputFile << std::endl; + i++; // Skip the next argument since it's the input logfile + } + } else if (std::string(argv[i]) == "--playback-input-file") { + if (i + 1 < argc) { + playbackInputFile = argv[i + 1]; + std::cout << "[INFO] Playing input from logfile: " << playbackInputFile << std::endl; + i++; // Skip the next argument since it's the input logfile + } + } else if (std::string(argv[i]) == "--planner-precision") { + if (i + 1 < argc) { + if(argv[i+1] == std::string("16")) + { + plannerFp16 = true; + } + else if(argv[i+1] == std::string("32")) + { + plannerFp16 = false; + } + else{ + throw std::runtime_error("invalid --planner-precision (should be 16 or 32): " + std::string(argv[i+1])); + } + std::cout << "[INFO] Planner precision: " << argv[i+1] << std::endl; + i++; // Skip the next argument since it's the input logfile + } + } else if (std::string(argv[i]) == "--policy-precision") { + std::cerr << "--policy-precision" << std::endl; + if (i + 1 < argc) { + if(argv[i+1] == std::string("16")) + { + policyFp16 = true; + } + else if(argv[i+1] == std::string("32")) + { + policyFp16 = false; + } + else{ + throw std::runtime_error("invalid --policy-precision (should be 16 or 32): " + std::string(argv[i+1])); + } + std::cout << "[INFO] Policy precision: " << argv[i+1] << std::endl; + i++; // Skip the next argument since it's the input logfile + } + else{ + std::cerr << "old and weak" << std::endl; + } + } else if (std::string(argv[i]) == "--enable-csv-logs") { + enableCsvLogs = true; + std::cout << "[INFO] CSV logging enabled" << std::endl; + } else if (std::string(argv[i]) == "--logs-dir") { + if (i + 1 < argc) { + logsDir = argv[i + 1]; + std::cout << "[INFO] Using logs directory: " << logsDir << std::endl; + i++; // Skip next arg (the path) + } else { + std::cerr << "Error: --logs-dir requires a path argument" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--zmq-host") { + if (i + 1 < argc) { zmq_host = argv[i + 1]; i++; } + } else if (std::string(argv[i]) == "--zmq-port") { + if (i + 1 < argc) { zmq_port = std::stoi(argv[i + 1]); i++; } + } else if (std::string(argv[i]) == "--zmq-topic") { + if (i + 1 < argc) { zmq_topic = argv[i + 1]; i++; } + } else if (std::string(argv[i]) == "--zmq-conflate") { + zmq_conflate = true; + } else if (std::string(argv[i]) == "--zmq-verbose") { + zmq_verbose = true; + } else if (std::string(argv[i]) == "--enable-motion-recording") { + enableMotionRecording = true; + std::cout << "[INFO] Motion recording enabled" << std::endl; + } else if (std::string(argv[i]) == "--set-compliance") { + if (i + 1 < argc) { + // Parse compliance values (can be 1 or 3 values) + std::string compliance_str = argv[i + 1]; + std::vector values; + std::stringstream ss(compliance_str); + std::string token; + while (std::getline(ss, token, ',')) { + try { + values.push_back(std::stod(token)); + } catch (...) { + std::cerr << "Error: Invalid compliance value: " << token << std::endl; + exit(1); + } + } + if (values.size() == 1) { + initial_compliance = {values[0], values[0], 0.0}; + std::cout << "[INFO] Initial VR 3-point compliance set to: [" << values[0] + << ", " << values[0] << ", 0.0]" << std::endl; + } else if (values.size() == 3) { + initial_compliance = {values[0], values[1], values[2]}; + std::cout << "[INFO] Initial VR 3-point compliance set to: [" + << values[0] << ", " << values[1] << ", " << values[2] << "]" << std::endl; + } else { + std::cerr << "Error: --set-compliance requires 1 or 3 comma-separated values" << std::endl; + exit(1); + } + i++; // Skip the next argument since it's the compliance value + } else { + std::cerr << "Error: --set-compliance requires a value argument" << std::endl; + exit(1); + } + } else if (std::string(argv[i]) == "--max-close-ratio") { + if (i + 1 < argc) { + try { + initial_max_close_ratio = std::stod(argv[i + 1]); + // Validate range [0.2, 1.0] + if (initial_max_close_ratio < 0.2 || initial_max_close_ratio > 1.0) { + std::cerr << "Error: --max-close-ratio must be between 0.2 and 1.0" << std::endl; + exit(1); + } + std::cout << "[INFO] Initial hand max close ratio set to: " << initial_max_close_ratio + << " (0.2 = limited, 1.0 = full closure)" << std::endl; + } catch (...) { + std::cerr << "Error: Invalid max close ratio value: " << argv[i + 1] << std::endl; + exit(1); + } + i++; // Skip the next argument since it's the ratio value + } else { + std::cerr << "Error: --max-close-ratio requires a value argument" << std::endl; + exit(1); + } + } + } + + std::cout << "[DEBUG] Creating G1Deploy object..." << std::endl; + G1Deploy custom( + networkInterface, + modelFile, + motionDataPath, + disableCrcCheck, + obsConfigPath, + encoderFile, + plannerFile, + targetMotionLogfile, + plannerMotionLogfile, + policyInputLogfile, + inputType, + outputType, + recordInputFile, + playbackInputFile, + plannerFp16, + policyFp16, + logsDir, + enableCsvLogs, + zmq_host, + zmq_port, + zmq_topic, + zmq_conflate, + zmq_verbose, + zmq_out_port, + zmq_out_topic, + enableMotionRecording, + initial_compliance, + initial_max_close_ratio + ); + std::cout << "[DEBUG] G1Deploy object created successfully!" << std::endl; + + // Main application loop - check both operator_state.stop and ROS2 status if using ROS2 +#if HAS_ROS2 + if (inputType == "ros2") { + while (!custom.operator_state.stop && rclcpp::ok()) { + sleep(0.02); + } + if (!rclcpp::ok()) { + std::cout << "[INFO] ROS2 shutdown detected (Ctrl+C)" << std::endl; + } + } else { + while (!custom.operator_state.stop) { sleep(0.02); } + } +#else + while (!custom.operator_state.stop) { sleep(0.02); } +#endif + + std::cout << "[DEBUG] Stopping G1Deploy..." << std::endl; + custom.Stop(); + std::cout << "[DEBUG] Waiting for cleanup..." << std::endl; + sleep(0.5); + std::cout << "[DEBUG] Program exiting normally..." << std::endl; + return 0; +} + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/state_logger.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/state_logger.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d9cf854f49d0941dde5fd6ca6888d268a938ceac --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/src/state_logger.cpp @@ -0,0 +1,506 @@ +/** + * @file state_logger.cpp + * @brief Implementation of StateLogger – ring-buffer management, CSV persistence, + * and metadata output. + * + * Key implementation details: + * - Ring buffer uses modulo arithmetic with `start_` / `size_` indices. + * - CSV times are normalised so that the first `LogFullState` call is t = 0 ms + * (via `std::call_once` in `toMillisNormalized_`). + * - Joint data (q, dq) is transformed from IsaacLab order to hardware / + * MuJoCo order with `default_angles` offsets when writing to CSV, so the + * files contain raw measured robot values. + * - `LogPostState` modifies the newest ring-buffer entry in-place (guarded + * by `ring_mutex_`) and appends token state + metadata to their own CSV files. + * - `GetLatest(n, sample_dt)` supports both stride-based (exact) and + * timestamp-based (approximate) down-sampling. + */ + +#include "state_logger.hpp" +#include "policy_parameters.hpp" + +#include +#include + +using Entry = StateLogger::Entry; + +std::optional>> StateLogger::GetConfig() const { + if (robot_config_.empty()) { + return std::nullopt; + } + return robot_config_; +} + +StateLogger::StateLogger(std::string csv_dir, size_t ring_capacity, int num_joints, int num_actions, double dt_seconds, bool enable_csv, std::map> robot_config) + : dt{dt_seconds}, + csv_path_(getLogsDir(enable_csv, csv_dir)), + capacity_(ring_capacity > 0 ? ring_capacity : 1), + ring_(capacity_), + configured_num_joints_(num_joints), + configured_num_actions_(num_actions), + enable_csv_(enable_csv), + + sink_base_quat_(enable_csv, csv_path_, "base_quat", "base_q", FileSink::HeaderType::QUATERNION), + sink_base_ang_vel_(enable_csv, csv_path_, "base_ang_vel", "base_w", FileSink::HeaderType::XYZ), + sink_base_accel_(enable_csv, csv_path_, "base_accel", "base_a", FileSink::HeaderType::XYZ), + sink_torso_quat_(enable_csv, csv_path_, "torso_quat", "torso_q", FileSink::HeaderType::QUATERNION), + sink_torso_ang_vel_(enable_csv, csv_path_, "torso_ang_vel", "torso_w", FileSink::HeaderType::XYZ), + sink_torso_accel_(enable_csv, csv_path_, "torso_accel", "torso_a", FileSink::HeaderType::XYZ), + sink_q_(enable_csv, csv_path_, "q", "q", FileSink::HeaderType::VECTOR), + sink_dq_(enable_csv, csv_path_, "dq", "dq", FileSink::HeaderType::VECTOR), + sink_action_(enable_csv, csv_path_, "action", "act", FileSink::HeaderType::VECTOR), + sink_motor_temperature_(enable_csv, csv_path_, "motor_temperature", "temp", FileSink::HeaderType::VECTOR), + sink_motor_error_(enable_csv, csv_path_, "motor_error", "err", FileSink::HeaderType::VECTOR), + sink_motor_torque_(enable_csv, csv_path_, "motor_torque", "tau", FileSink::HeaderType::VECTOR), + sink_left_hand_q_(enable_csv, csv_path_, "left_hand_q", "left_hand_q", FileSink::HeaderType::VECTOR), + sink_left_hand_dq_(enable_csv, csv_path_, "left_hand_dq", "left_hand_dq", FileSink::HeaderType::VECTOR), + sink_right_hand_q_(enable_csv, csv_path_, "right_hand_q", "right_hand_q", FileSink::HeaderType::VECTOR), + sink_right_hand_dq_(enable_csv, csv_path_, "right_hand_dq", "right_hand_dq", FileSink::HeaderType::VECTOR), + sink_left_hand_action_(enable_csv, csv_path_, "left_hand_action", "left_hand_act", FileSink::HeaderType::VECTOR), + sink_right_hand_action_(enable_csv, csv_path_, "right_hand_action", "right_hand_act", FileSink::HeaderType::VECTOR), + sink_token_state_(enable_csv, csv_path_, "token_state", "token", FileSink::HeaderType::VECTOR), + sink_encoder_mode_(enable_csv, csv_path_, "encoder_mode", "encoder_mode", FileSink::HeaderType::VECTOR), + sink_motion_playing_(enable_csv, csv_path_, "motion_playing", "playing", FileSink::HeaderType::VECTOR), + + robot_config_(std::move(robot_config)) { + // Open motion_name CSV file + if (enable_csv_) { + std::string motion_name_path = csv_path_ + "/motion_name.csv"; + motion_name_file_.open(motion_name_path, std::ios::out | std::ios::app); + if (motion_name_file_.good()) { + // Check if file is empty to determine if we need header + std::ifstream check_file(motion_name_path, std::ios::binary); + if (check_file.good()) { + check_file.seekg(0, std::ios::end); + motion_name_header_written_ = check_file.tellg() > 0; + } + check_file.close(); + } + + // Write robot configuration metadata to file + writeConfigMetadata_(); + } +} + +uint64_t StateLogger::LogFullState(const std::array& base_quat, + const std::array& base_ang_vel, + const std::array& base_accel, + const std::array& body_torso_quat, + const std::array& body_torso_ang_vel, + const std::array& body_torso_accel, + const std::span& body_q, + const std::span& body_dq, + const std::span& last_action, + const std::span& motor_temperature, + const std::span& motor_error, + const std::span& motor_torque, + const std::span& left_hand_q, + const std::span& left_hand_dq, + const std::span& right_hand_q, + const std::span& right_hand_dq, + const std::span& last_left_hand_action, + const std::span& last_right_hand_action, + double ros_timestamp) { + Entry e; + e.index = next_index_.fetch_add(1, std::memory_order_relaxed); + e.timestamp = std::chrono::system_clock::now(); + e.timestamp_monotonic = std::chrono::steady_clock::now(); + e.ros_timestamp = ros_timestamp; + e.base_quat = base_quat; + e.base_ang_vel = base_ang_vel; + e.base_accel = base_accel; + e.body_torso_quat = body_torso_quat; + e.body_torso_ang_vel = body_torso_ang_vel; + e.body_torso_accel = body_torso_accel; + + // Copy dynamic containers + e.body_q.assign(std::begin(body_q), std::end(body_q)); + e.body_dq.assign(std::begin(body_dq), std::end(body_dq)); + e.last_action.assign(std::begin(last_action), std::end(last_action)); + e.motor_temperature.assign(std::begin(motor_temperature), std::end(motor_temperature)); + e.motor_error.assign(std::begin(motor_error), std::end(motor_error)); + e.motor_torque.assign(std::begin(motor_torque), std::end(motor_torque)); + + // Copy hand state and action containers + e.left_hand_q.assign(std::begin(left_hand_q), std::end(left_hand_q)); + e.left_hand_dq.assign(std::begin(left_hand_dq), std::end(left_hand_dq)); + e.right_hand_q.assign(std::begin(right_hand_q), std::end(right_hand_q)); + e.right_hand_dq.assign(std::begin(right_hand_dq), std::end(right_hand_dq)); + e.last_left_hand_action.assign(std::begin(last_left_hand_action), std::end(last_left_hand_action)); + e.last_right_hand_action.assign(std::begin(last_right_hand_action), std::end(last_right_hand_action)); + + pushToRing_(e); + if (enable_csv_) { + appendCsvLinesSplit_(e); + } + return e.index; +} + +bool StateLogger::LogPostState(const std::span& token_state, int encoder_mode, const std::string& motion_name, bool play) { + std::lock_guard lock(ring_mutex_); + + // Check if we have any entries + if (size_ == 0) { + std::cerr << "[StateLogger ERROR] LogPostState called but no entries exist. Call LogFullState first." << std::endl; + return false; + } + + // Get the newest entry (last one in the ring) + size_t newest_idx = (start_ + size_ - 1) % capacity_; + Entry& newest = ring_[newest_idx]; + + // Check if post-state data was already set + if (newest.has_post_state_data) { + std::cerr << "[StateLogger ERROR] LogPostState called but newest entry (index " << newest.index + << ") already has post-state data. Each entry can only have post-state set once." << std::endl; + return false; + } + + // Update the entry with token state and metadata + newest.token_state.assign(std::begin(token_state), std::end(token_state)); + newest.encoder_mode = encoder_mode; + newest.motion_name = motion_name; + newest.play = play; + newest.has_post_state_data = true; + + // Write to CSV if enabled (token state gets its own file) + if (enable_csv_) { + appendTokenStateToCSV_(newest); + } + + return true; +} + +size_t StateLogger::capacity() const { return capacity_; } +size_t StateLogger::size() const { + std::lock_guard lock(ring_mutex_); + return size_; +} + +std::vector StateLogger::GetLatest(size_t n, bool newest_first) const { + std::lock_guard lock(ring_mutex_); + const size_t count = n < size_ ? n : size_; + std::vector out; + out.reserve(count); + for (size_t i = 0; i < count; ++i) { + size_t idx = (start_ + size_ - 1 - i + capacity_) % capacity_; + out.push_back(ring_[idx]); + } + // Pad with zeros if requested more than available + if (out.size() < n) { + const size_t missing = n - out.size(); + for (size_t i = 0; i < missing; ++i) { out.push_back(makeZeroEntry_()); } + } + // Reverse if oldest_first requested + if (!newest_first) { std::reverse(out.begin(), out.end()); } + return out; +} + +std::vector StateLogger::GetLatest(size_t n, double sample_dt_seconds, bool newest_first) const { + if (sample_dt_seconds <= 0.0) { return GetLatest(n, newest_first); } + std::lock_guard lock(ring_mutex_); + std::vector out; + if (n == 0) return out; + if (size_ == 0) { + // Pad with zeros if requested more than available (consistent with first overload) + out.reserve(n); + for (size_t k = 0; k < n; ++k) { out.push_back(makeZeroEntry_()); } + return out; + } + out.reserve(n); + + // If sample_dt aligns with dt, use stride-based selection for exact spacing + if (dt > 0.0) { + const double ratio = sample_dt_seconds / dt; + const long stride = static_cast(std::llround(ratio)); + const double err = std::fabs(ratio - static_cast(stride)); + if (stride > 0 && err < 1e-6) { + // newest at offset 0, then stride, 2*stride, ... + const size_t newest_idx = (start_ + size_ - 1) % capacity_; + for (size_t j = 0; j < n; ++j) { + const size_t offset = static_cast(j * stride); + if (offset >= size_) break; + const size_t idx = (start_ + size_ - 1 - offset + capacity_) % capacity_; + out.push_back(ring_[idx]); + } + // Pad with zeros if requested more than available + if (out.size() < n) { + const size_t missing = n - out.size(); + for (size_t k = 0; k < missing; ++k) { out.push_back(makeZeroEntry_()); } + } + // Reverse if oldest_first requested + if (!newest_first) { std::reverse(out.begin(), out.end()); } + return out; + } + } + + // Fallback: timestamp-based approximate downsampling + const size_t newest_idx = (start_ + size_ - 1) % capacity_; + Entry newest = ring_[newest_idx]; + out.push_back(newest); + + auto step = std::chrono::duration_cast( + std::chrono::duration(sample_dt_seconds)); + auto next_target_time = newest.timestamp - step; + + size_t scanned = 1; // we already took 1 entry + size_t i = (newest_idx + capacity_ - 1) % capacity_; + while (out.size() < n && scanned < size_) { + const Entry& candidate = ring_[i]; + if (candidate.timestamp <= next_target_time) { + out.push_back(candidate); + next_target_time -= step; + } + i = (i + capacity_ - 1) % capacity_; + scanned += 1; + } + // Pad with zeros if requested more than available + if (out.size() < n) { + const size_t missing = n - out.size(); + for (size_t k = 0; k < missing; ++k) { out.push_back(makeZeroEntry_()); } + } + // Reverse if oldest_first requested + if (!newest_first) { std::reverse(out.begin(), out.end()); } + return out; +} + +double StateLogger::toMillisNormalized_(const std::chrono::system_clock::time_point& t) { + std::call_once(start_once_, [&]{ start_time_ = t; }); + std::chrono::duration delta = t - start_time_; + return delta.count(); +} + +void StateLogger::appendCsvLinesSplit_(const Entry& e) { + if (!enable_csv_) return; + // Common prefix + uint64_t idx = e.index; + const double t_ms = toMillisNormalized_(e.timestamp); + const double t_ros = e.ros_timestamp; + const double t_realtime_ms = std::chrono::duration(e.timestamp.time_since_epoch()).count(); + const double t_monotonic_ms = std::chrono::duration(e.timestamp_monotonic.time_since_epoch()).count(); + + sink_base_quat_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.base_quat)); + sink_base_ang_vel_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.base_ang_vel)); + sink_base_accel_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.base_accel)); + sink_torso_quat_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.body_torso_quat)); + sink_torso_ang_vel_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.body_torso_ang_vel)); + sink_torso_accel_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.body_torso_accel)); + + // Transform body_q and body_dq back to robot measured order for CSV logging + // This reverses the transformation done when reading from robot: + // - body_q: add default_angles back and convert from IsaacLab order to robot hardware order + // - body_dq: convert from IsaacLab order to robot hardware order + std::vector body_q_measured(e.body_q.size()); + std::vector body_dq_measured(e.body_dq.size()); + for (size_t i = 0; i < e.body_q.size() && i < 29; i++) { + body_q_measured[i] = e.body_q[isaaclab_to_mujoco[i]] + default_angles[i]; + body_dq_measured[i] = e.body_dq[isaaclab_to_mujoco[i]]; + } + + sink_q_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(body_q_measured)); + sink_dq_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(body_dq_measured)); + sink_action_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.last_action)); + sink_motor_temperature_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.motor_temperature)); + sink_motor_error_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.motor_error)); + sink_motor_torque_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.motor_torque)); + sink_left_hand_q_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.left_hand_q)); + sink_left_hand_dq_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.left_hand_dq)); + sink_right_hand_q_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.right_hand_q)); + sink_right_hand_dq_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.right_hand_dq)); + sink_left_hand_action_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.last_left_hand_action)); + sink_right_hand_action_.writeLine(idx, t_ms, t_realtime_ms, t_monotonic_ms, t_ros, std::span(e.last_right_hand_action)); +} + +void StateLogger::appendTokenStateToCSV_(const Entry& e) { + if (!enable_csv_) return; + + // Skip if post-state was never set + if (!e.has_post_state_data) { + return; + } + + const double t_ms = toMillisNormalized_(e.timestamp); + const double t_realtime_ms = std::chrono::duration(e.timestamp.time_since_epoch()).count(); + const double t_monotonic_ms = std::chrono::duration(e.timestamp_monotonic.time_since_epoch()).count(); + + // Write token state using FileSink (only if not empty) + if (!e.token_state.empty()) { + sink_token_state_.writeLine(e.index, t_ms, t_realtime_ms, t_monotonic_ms, e.ros_timestamp, std::span(e.token_state)); + } + + // Always write metadata (encoder_mode, motion_name, play state) even if token is empty + // This ensures we have metadata for every frame where LogPostState was called + + // Write encoder mode to separate file (convert int to double for FileSink) + std::array encoder_mode_arr = {static_cast(e.encoder_mode)}; + sink_encoder_mode_.writeLine(e.index, t_ms, t_realtime_ms, t_monotonic_ms, e.ros_timestamp, std::span(encoder_mode_arr)); + + // Write motion playing state to separate file (convert bool to double for FileSink) + std::array motion_playing_arr = {e.play ? 1.0 : 0.0}; + sink_motion_playing_.writeLine(e.index, t_ms, t_realtime_ms, t_monotonic_ms, e.ros_timestamp, std::span(motion_playing_arr)); + + // Write motion name to separate file (custom string handling) + writeMotionNameLine_(e.index, t_ms, t_realtime_ms, t_monotonic_ms, e.ros_timestamp, e.motion_name); +} + +void StateLogger::writeMotionNameLine_(uint64_t index, double t_ms, double t_realtime_ms, double t_monotonic_ms, double ros_timestamp, const std::string& motion_name) { + if (!motion_name_file_.good()) return; + + // Write header if needed + if (!motion_name_header_written_) { + motion_name_file_ << "index,time_ms,time_realtime_ms,time_monotonic_ms,ros_timestamp,motion_name" << std::endl; + motion_name_header_written_ = true; + } + + // Write data line + motion_name_file_.setf(std::ios::fixed, std::ios::floatfield); + motion_name_file_ << std::setprecision(3); + motion_name_file_ << index << ',' << t_ms << ','; + motion_name_file_ << t_realtime_ms << ',' << t_monotonic_ms << ','; + motion_name_file_ << std::setprecision(9); + motion_name_file_ << ros_timestamp << ",\"" << motion_name << "\""; + motion_name_file_ << std::endl; +} + +void StateLogger::pushToRing_(const Entry& e) { + std::lock_guard lock(ring_mutex_); + if (size_ < capacity_) { + size_t pos = (start_ + size_) % capacity_; + ring_[pos] = e; + size_ += 1; + } else { + // Overwrite oldest + ring_[start_] = e; + start_ = (start_ + 1) % capacity_; + } +} + +std::string StateLogger::getLogsDir(bool enable_csv, std::string csv_path) { + if (enable_csv) { // resolve default logs directory if none provided + if (csv_path.empty()) { + csv_path = buildDefaultLogsDir_(); + } + // Ensure directory exists + std::ostringstream cmd; + cmd << "mkdir -p " << csv_path; + int rc = std::system(cmd.str().c_str()); + (void)rc; + } + return csv_path; +} + +std::string StateLogger::buildDefaultLogsDir_() { + auto now = std::chrono::system_clock::now(); + std::time_t tt = std::chrono::system_clock::to_time_t(now); + std::tm tm{}; + localtime_r(&tt, &tm); + std::ostringstream dd, MM, yy, HH, mm, ss; + dd << std::put_time(&tm, "%d"); + MM << std::put_time(&tm, "%m"); + yy << std::put_time(&tm, "%y"); + HH << std::put_time(&tm, "%H"); + mm << std::put_time(&tm, "%M"); + ss << std::put_time(&tm, "%S"); + + std::ostringstream path_builder; + path_builder << "logs/" << dd.str() << '-' << MM.str() << '-' << yy.str() + << '/' << HH.str() << '-' << mm.str() << '-' << ss.str(); + const std::string dir = path_builder.str(); + std::ostringstream cmd; cmd << "mkdir -p " << dir; int rc = std::system(cmd.str().c_str()); (void)rc; + return dir; +} + +void StateLogger::writeConfigMetadata_() { + if (!enable_csv_ || robot_config_.empty()) { + return; + } + + std::string config_path = csv_path_ + "/metadata.json"; + std::ofstream config_file(config_path, std::ios::out | std::ios::trunc); + + if (!config_file.good()) { + std::cerr << "[StateLogger WARNING] Failed to open metadata file: " << config_path << std::endl; + return; + } + + // Write JSON format + config_file << "{\n"; + + // Add logging metadata + config_file << " \"logging\": {\n"; + config_file << " \"dt\": " << dt << ",\n"; + config_file << " \"num_joints\": " << configured_num_joints_ << ",\n"; + config_file << " \"num_actions\": " << configured_num_actions_ << ",\n"; + config_file << " \"ring_capacity\": " << capacity_ << "\n"; + config_file << " }"; + + // Add robot configuration if present + if (!robot_config_.empty()) { + config_file << ",\n \"robot_config\": {\n"; + + bool first = true; + for (const auto& [key, value] : robot_config_) { + if (!first) { + config_file << ",\n"; + } + first = false; + + config_file << " \"" << key << "\": "; + + // Handle different variant types + std::visit([&config_file](auto&& arg) { + using T = std::decay_t; + if constexpr (std::is_same_v) { + config_file << "\"" << arg << "\""; + } else if constexpr (std::is_same_v) { + config_file << (arg ? "true" : "false"); + } else if constexpr (std::is_same_v) { + config_file << arg; + } else if constexpr (std::is_same_v) { + config_file << std::setprecision(9) << arg; + } + }, value); + } + + config_file << "\n }"; + } + + config_file << "\n}\n"; + config_file.close(); + + std::cout << "[StateLogger] Metadata written to: " << config_path << std::endl; +} + +Entry StateLogger::makeZeroEntry_() const { + Entry e; + e.index = 0; + e.timestamp = std::chrono::system_clock::time_point{}; + e.base_quat = {0.0, 0.0, 0.0, 0.0}; + e.base_ang_vel = {0.0, 0.0, 0.0}; + e.base_accel = {0.0, 0.0, 0.0}; + e.body_torso_quat = {0.0, 0.0, 0.0, 0.0}; + e.body_torso_ang_vel = {0.0, 0.0, 0.0}; + e.body_torso_accel = {0.0, 0.0, 0.0}; + if (configured_num_joints_ > 0) { + e.body_q.assign(static_cast(configured_num_joints_), 0.0); + e.body_dq.assign(static_cast(configured_num_joints_), 0.0); + e.motor_temperature.assign(static_cast(configured_num_joints_) * 2, 0.0); + e.motor_error.assign(static_cast(configured_num_joints_), 0.0); + e.motor_torque.assign(static_cast(configured_num_joints_), 0.0); + } + if (configured_num_actions_ > 0) { + e.last_action.assign(static_cast(configured_num_actions_), 0.0); + } + // Hand data (7 motors each) + e.left_hand_q.assign(7, 0.0); + e.left_hand_dq.assign(7, 0.0); + e.right_hand_q.assign(7, 0.0); + e.right_hand_dq.assign(7, 0.0); + e.last_left_hand_action.assign(7, 0.0); + e.last_right_hand_action.assign(7, 0.0); + // Post-state data (default to no post-state data) + e.has_post_state_data = false; + e.token_state.clear(); + return e; +} + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/pose_estimation_server_onboard_test.py b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/pose_estimation_server_onboard_test.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e6e9f9765c4f4726c081479cc908e03eebba9f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/pose_estimation_server_onboard_test.py @@ -0,0 +1,398 @@ +#!/usr/bin/env python3 +""" +Standalone Pose Estimation Server + +This server runs the WebcamPoseEstimator on a separate computer and streams +pose estimation results over the network to robot control systems. + +Usage: + python pose_estimation_server.py --config server_config.yaml +""" + +import argparse +import json +import os +import struct +import time +import numpy as np +from typing import Dict, Optional + +import sys + +import logging +Log = logging.getLogger() +import zmq + +sys.path.append("./") + + + +class PoseEstimationServer: + """ + Standalone server for pose estimation that can run on a separate computer. + + Features: + - Runs WebcamPoseEstimator in a dedicated process + - Streams pose data over ZMQ network protocol + - Supports multiple concurrent clients + - Handles camera input and video files + - Provides real-time pose estimation with low latency + """ + + def __init__( + self, + port: int = 5558, + webcam_config: Optional[Dict] = None, + max_clients: int = 5, + fps: float = 30, + enable_display: bool = True, + verbose: bool = False, + fixed_fps: bool = False, + optimize_onnx_graph: bool = False, + ): + """ + Initialize the pose estimation server. + + Args: + port: ZMQ server port + webcam_config: Configuration for WebcamPoseEstimator + max_clients: Maximum number of concurrent clients + fps: target FPS for pose estimation + enable_display: Whether to show local display window + verbose: Enable verbose logging + fixed_fps: Use fixed FPS timing instead of adaptive timing + """ + self.port = port + self.max_clients = max_clients + self.fps = fps + self.enable_display = enable_display + self.verbose = verbose + self.fixed_fps = fixed_fps + + # Default webcam configuration + self.webcam_config = { + "camera_id": 0, + "video_path": None, + "target_fps": fps, + "context_frames": 121, + "yolo_period": 1, + "yolo_imgsz": 480, + "yolo_conf": 0.4, + "yolo_fp16": True, + "use_torch": False, + "output_root": "outputs/pose_server", + "verbose": verbose, + "display": enable_display, + "save": False, + "disable_cv2_window": not enable_display, + "pose_est_freq": 1, + "fixed_fps": fixed_fps, + "optimize_onnx_graph": optimize_onnx_graph, + } + + # Update with provided config + if webcam_config: + self.webcam_config.update(webcam_config) + + # Initialize ZMQ for publishing + self.context = zmq.Context() + self.socket = self.context.socket(zmq.PUB) + self.socket.bind(f"tcp://*:{self.port}") + + self.socket.setsockopt( + zmq.SNDHWM, 3 + ) # Send high water mark - only keep 3 messages in queue + self.socket.setsockopt(zmq.CONFLATE, 1) # Receive high water mark - small queue + self.socket.setsockopt(zmq.LINGER, 0) # Don't wait for unsent messages on close + self.socket.setsockopt(zmq.IMMEDIATE, 1) # Don't queue messages if no subscribers + + # Give socket time to establish + time.sleep(0.1) + + # Initialize pose estimator + self.pose_estimator = None + self.is_running = False + self.client_count = 0 + + # Performance tracking + self.frame_count = 0 + self.start_time = time.time() + self.last_fps_report = time.time() + + # Remove client tracking since we're broadcasting + self.client_count = 0 # Keep for compatibility but not used + + Log.info(f"[PoseEstimationServer] Initialized on port {self.port}") + + def initialize_pose_estimator(self): + """Initialize the WebcamPoseEstimator.""" + # self.pose_estimator = WebcamPoseEstimator(**self.webcam_config) + Log.info("[PoseEstimationServer] WebcamPoseEstimator initialized successfully") + return True + + def process_pose_estimation(self) -> Optional[Dict]: + """ + Process a single frame and return pose estimation results. + + Returns: + Dictionary containing pose estimation results or None if not ready + """ + + try: + + pose_data = { + "joint_pos": np.ones((201, 29), dtype=np.float32), + "joint_vel": np.ones((201, 29), dtype=np.float32) * 2, + "body_quat_w": np.ones((201, 4), dtype=np.float32) * 3, + "frame_index": np.arange(201, dtype=np.int32), + } + + return pose_data + + except Exception as e: + Log.error(f"[PoseEstimationServer] Error processing frame: {e}") + return {"status": "error", "ready": False, "error": str(e)} + + def _pack_pose_message(self, pose_data: Dict, topic: str = "pose") -> bytes: + """ + Pack pose data into single-frame format: + [topic_prefix][1024-byte JSON header][concatenated binary fields] + + Args: + pose_data: Dictionary containing numpy arrays to send + topic: Topic prefix string + + Returns: + Packed message as bytes + """ + HEADER_SIZE = 1024 + + # Build fields list from pose_data + fields = [] + binary_data = [] + + for key, value in pose_data.items(): + if isinstance(value, np.ndarray): + # Determine dtype string + if value.dtype == np.float32: + dtype_str = "f32" + elif value.dtype == np.float64: + dtype_str = "f64" + elif value.dtype == np.int32: + dtype_str = "i32" + elif value.dtype == np.int64: + dtype_str = "i64" + else: + # Default to f32, cast if needed + dtype_str = "f32" + value = value.astype(np.float32) + + fields.append({ + "name": key, + "dtype": dtype_str, + "shape": list(value.shape) + }) + + # Ensure contiguous and little-endian + if not value.flags['C_CONTIGUOUS']: + value = np.ascontiguousarray(value) + if value.dtype.byteorder == '>': + value = value.astype(value.dtype.newbyteorder('<')) + + binary_data.append(value.tobytes()) + + # Build JSON header + header_dict = { + "v": 1, + "endian": "le", + "fields": fields + } + header_json = json.dumps(header_dict, separators=(',', ':')) + + # Ensure header fits in HEADER_SIZE + if len(header_json) >= HEADER_SIZE: + raise ValueError(f"JSON header too large: {len(header_json)} >= {HEADER_SIZE}") + + # Pack message: [topic][1024-byte header][binary data] + topic_bytes = topic.encode('utf-8') + header_bytes = header_json.encode('utf-8').ljust(HEADER_SIZE, b'\x00') + data_bytes = b''.join(binary_data) + + packed_message = topic_bytes + header_bytes + data_bytes + return packed_message + + def broadcast_pose_data(self): + """ + Broadcast pose estimation data to all subscribers. + """ + pose_data = self.process_pose_estimation() + if pose_data is not None: + try: + # Broadcast pose data with topic "pose" + # print(f"\nsend frame_index:", pose_data["frame_index"]) + + # Pack and send as single frame + packed_message = self._pack_pose_message(pose_data, topic="pose") + self.socket.send(packed_message) + + self.frame_count += 1 + + if self.verbose and self.frame_count % 100 == 0: + Log.info(f"[PoseEstimationServer] Broadcasted frame {self.frame_count}") + + except Exception as e: + Log.error(f"[PoseEstimationServer] Error broadcasting pose data: {e}") + + def report_fps(self): + """Report FPS periodically.""" + current_time = time.time() + if current_time - self.last_fps_report >= 5.0: # Report every 5 seconds + last_frame_count = ( + self.frame_count if not hasattr(self, "last_frame_count") else self.last_frame_count + ) + elapsed = current_time - self.last_fps_report + avg_fps = (self.frame_count - last_frame_count) / elapsed if elapsed > 0 else 0 + Log.info( + f"frame_count: {self.frame_count}, last_frame_count: {last_frame_count}, " + f"[PoseEstimationServer] Broadcasted {self.frame_count - last_frame_count} frames, " + f"Average FPS: {avg_fps:.2f}" + ) + self.last_fps_report = current_time + self.last_frame_count = self.frame_count + + def run(self): + """Run the pose estimation server.""" + Log.info(f"[PoseEstimationServer] Starting broadcast server on port {self.port}") + + # Initialize pose estimator + if not self.initialize_pose_estimator(): + Log.error("[PoseEstimationServer] Failed to initialize pose estimator. Exiting.") + return + + self.is_running = True + self.start_time = time.time() + + Log.info("[PoseEstimationServer] Server ready and broadcasting pose data...") + + try: + + while self.is_running: + try: + # Broadcast pose data continuously + self.broadcast_pose_data() + + # Report FPS periodically + self.report_fps() + + except zmq.ZMQError as e: + if e.errno == zmq.ETERM: + break + Log.error(f"[PoseEstimationServer] ZMQ Error: {e}") + + except Exception as e: + Log.error(f"[PoseEstimationServer] Unexpected error: {e}") + + except KeyboardInterrupt: + Log.info("[PoseEstimationServer] Received interrupt signal") + + finally: + self.cleanup() + + def cleanup(self): + """Clean up resources.""" + Log.info("[PoseEstimationServer] Shutting down...") + + self.is_running = False + + if self.pose_estimator: + try: + self.pose_estimator.release() + except Exception: + pass + + self.socket.close() + self.context.term() + + Log.info("[PoseEstimationServer] Shutdown complete") + + +def load_config(config_path: str) -> Dict: + """Load configuration from YAML file.""" + import yaml + + try: + with open(config_path, "r") as f: + config = yaml.safe_load(f) + return config + except Exception as e: + Log.error(f"Failed to load config from {config_path}: {e}") + return {} + + +def parse_args(): + """Parse command line arguments.""" + parser = argparse.ArgumentParser(description="Pose Estimation Server") + + parser.add_argument("--port", type=int, default=5558, help="Server port (default: 5558)") + parser.add_argument("--config", type=str, default=None, help="Configuration file path") + parser.add_argument("--camera", type=int, default=-1, help="Camera device ID (default: 0)") + parser.add_argument( + "--video", + type=str, + default="external_dependencies/genmo/inputs/videos/zen2_540p.mp4", + help="Video file path (default: None for webcam)", + ) + parser.add_argument("--fps", type=float, default=30, help="Target FPS (default: None)") + parser.add_argument( + "--pose_est_freq", + type=int, + default=1, + help="Run pose estimation every N frames (default: 1)", + ) + parser.add_argument("--no_display", action="store_true", help="Disable display window") + parser.add_argument("--verbose", action="store_true", help="Enable verbose logging") + parser.add_argument( + "--fixed_fps", action="store_true", help="Use fixed FPS timing instead of adaptive timing" + ) + parser.add_argument("-opt", "--optimize_onnx_graph", action="store_true", help="Optimize ONNX graph for inference") + + return parser.parse_args() + + +def main(): + """Main function.""" + args = parse_args() + + # Load configuration + config = {} + if args.config: + config = load_config(args.config) + + # Override with command line arguments + server_config = config.get("server", {}) + webcam_config = config.get("webcam", {}) + + # Command line overrides + if args.camera is not None: + webcam_config["camera_id"] = args.camera + if args.video is not None: + webcam_config["video_path"] = args.video + if hasattr(args, "pose_est_freq") and args.pose_est_freq is not None: + webcam_config["pose_est_freq"] = args.pose_est_freq + # Create and run server + server = PoseEstimationServer( + port=server_config.get("port", args.port), + webcam_config=webcam_config, + max_clients=server_config.get("max_clients", 5), + fps=args.fps, + enable_display=not args.no_display, + verbose=args.verbose, + fixed_fps=args.fixed_fps, + optimize_onnx_graph=args.optimize_onnx_graph, + ) + + server.run() + + +if __name__ == "__main__": + main() diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_ros2.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_ros2.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6b376fa0587129e5edcf396f1b2a0e1ff2388794 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_ros2.cpp @@ -0,0 +1,121 @@ +#ifdef HAS_ROS2 + +#include +#include +#include +#include +#include +#include +#include // For getcwd + +// Include the actual header files from the project +#include "../include/input_interface/input_interface.hpp" +#include "../include/localmotion_kplanner.hpp" +#include "../include/robot_parameters.hpp" +#include "../include/policy_parameters.hpp" +#include "../include/input_interface/ros2_input_handler.hpp" +#include "../include/state_logger.hpp" + + +int main(int argc, char** argv) { + std::cout << "🚀 Testing REAL ROS2InputHandler Class (with PRODUCTION FastRTPS Config)" << std::endl; + std::cout << "=========================================================================" << std::endl; + + // Initialize ROS2 first + rclcpp::init(argc, argv); + std::cout << "💡 Press Ctrl+C to stop the test early" << std::endl; + + // Check if our production FastRTPS config exists + std::cout << "🔍 Checking FastRTPS configuration..." << std::endl; + const char* profile_path = "./config/fastrtps_profile.xml"; + if (FILE* file = fopen(profile_path, "r")) { + fclose(file); + std::cout << "✅ Found FastRTPS profile: " << profile_path << std::endl; + std::cout << "🎯 This should eliminate 'XMLPARSER Error' for production deployment!" << std::endl; + } else { + std::cout << "⚠️ FastRTPS profile not found at: " << profile_path << std::endl; + char* cwd = getcwd(nullptr, 0); + if (cwd) { + std::cout << "📍 Current working directory: " << cwd << std::endl; + free(cwd); + } + } + std::cout << std::endl; + + try { + // Create the actual ROS2InputHandler instance using real class + // Parameters: use_ik_mode (false), node_name, initial_encoder_mode (1 for 3-point tracking) + auto input_handler = std::make_unique(false, "test_real_ros2_handler"); + std::cout << "✅ ROS2InputHandler created successfully!" << std::endl; + std::cout << "📡 Subscribed to topic: ControlPolicy/upper_body_pose (msgpack format)" << std::endl; + std::cout << "🔍 ROS2 Status: " << (rclcpp::ok() ? "OK" : "ERROR") << std::endl; + // Create minimal instances needed for handle_input() test (using actual classes) + MotionDataReader motion_reader; + std::shared_ptr current_motion = nullptr; + bool reinitialize_heading = false; + int current_frame = 0; + OperatorState operator_state; // No namespace needed + std::array quaternion = {0.0, 0.0, 0.0, 1.0}; // Identity quaternion + DataBuffer heading_buffer; + bool has_planner = true; // ROS2 mode requires planner to be available + PlannerState planner_state; + DataBuffer movement_buffer; + std::mutex current_motion_mutex; // Mutex for thread-safe motion access + bool report_temperature = false; + + std::cout << "⏳ Testing ROS2InputHandler with real classes (max 30 seconds)..." << std::endl; + std::cout << "📝 This test expects msgpack-serialized messages on topic:" << std::endl; + std::cout << " ControlPolicy/upper_body_pose (std_msgs/ByteMultiArray)" << std::endl; + std::cout << "📝 Use the Python teleop client to send test messages" << std::endl; + + auto start_time = std::chrono::steady_clock::now(); + int loop_count = 0; + + while (rclcpp::ok() && std::chrono::steady_clock::now() - start_time < std::chrono::seconds(30)) { + // Update ROS2 input handler (process messages) + input_handler->update(); + + // Call handle_input() to test full integration with real classes + // Note: encoder_mode no longer passed as parameter (initialized in constructor) + input_handler->handle_input(motion_reader, current_motion, current_frame, + operator_state, reinitialize_heading, heading_buffer, has_planner, + planner_state, movement_buffer, current_motion_mutex, report_temperature); + + // Print status every 100 loops (~10 seconds) + if (loop_count % 100 == 0) { + std::cout << "📊 Loop " << loop_count + << " | Control goal valid: " << (input_handler->is_receiving_control_goal_data() ? "✅" : "❌") + << " | Planner: " << (planner_state.enabled ? "✅" : "❌") + << std::endl; + } + + loop_count++; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + if (!rclcpp::ok()) { + std::cout << "\n🛑 Test interrupted by user (Ctrl+C)" << std::endl; + } else { + std::cout << "\n✅ Test completed successfully!" << std::endl; + } + std::cout << "🎯 ROS2InputHandler works with real classes and is ready for integration!" << std::endl; + + } catch (const std::exception& e) { + std::cerr << "❌ Error: " << e.what() << std::endl; + return 1; + } + + std::cout << "👋 Shutting down ROS2..." << std::endl; + rclcpp::shutdown(); + return 0; +} + +#else + +int main(int argc, char** argv) { + std::cout << "❌ ROS2 support not compiled. Build with ROS2 environment." << std::endl; + return 1; +} + +#endif + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_zmq_manager.py b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_zmq_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..bf8c71ac8c2752dee9ea0e8ced297c591c518c92 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/test_zmq_manager.py @@ -0,0 +1,703 @@ +#!/usr/bin/env python3 +""" +Test script for ZMQManager + +This script publishes test messages to the command, planner, and pose topics +to demonstrate how to use ZMQManager. + +Usage: + python3 test_zmq_manager.py [--port PORT] [--host HOST] +""" + +import zmq +import numpy as np +import struct +import json +import time +import argparse + +HEADER_SIZE = 1280 # Must match ZMQPackedMessageSubscriber::HEADER_SIZE + +class ZMQPublisher: + """Publisher for ZMQManager topics""" + + def __init__(self, host="*", port=5556, verbose=True): + self.context = zmq.Context() + self.publisher = self.context.socket(zmq.PUB) + self.endpoint = f"tcp://{host}:{port}" + self.publisher.bind(self.endpoint) + self.verbose = verbose + + # Give subscribers time to connect + time.sleep(0.5) + + if self.verbose: + print(f"[Publisher] Bound to {self.endpoint}") + print(f"[Publisher] Publishing on topics: command, planner, pose") + + def send_command(self, start, stop, planner, delta_heading=None): + """ + Send a command message + start: bool (True=start control) + stop: bool (True=stop control) + planner: bool (True=planner mode, False=streamed motion mode) + delta_heading: optional float (absolute delta heading in radians) + """ + topic = b"command" + + # Create header + fields = [ + {"name": "start", "dtype": "u8", "shape": [1]}, + {"name": "stop", "dtype": "u8", "shape": [1]}, + {"name": "planner", "dtype": "u8", "shape": [1]} + ] + + # Optional delta_heading field + if delta_heading is not None: + fields.append({"name": "delta_heading", "dtype": "f32", "shape": [1]}) + + header = { + "v": 1, + "endian": "le", + "count": 1, + "fields": fields + } + + # Serialize header (pad to HEADER_SIZE bytes to match C++ ZMQPackedMessageSubscriber) + header_json = json.dumps(header).encode('utf-8') + header_bytes = header_json + b'\x00' * (HEADER_SIZE - len(header_json)) + + # Serialize data + data = b'' + data += struct.pack('B', 1 if start else 0) # u8 + data += struct.pack('B', 1 if stop else 0) # u8 + data += struct.pack('B', 1 if planner else 0) # u8 + if delta_heading is not None: + data += struct.pack(' 0: + left_min = np.min(joint_pos[:, left_shoulder_pitch]) + left_max = np.max(joint_pos[:, left_shoulder_pitch]) + right_min = np.min(joint_pos[:, right_shoulder_pitch]) + right_max = np.max(joint_pos[:, right_shoulder_pitch]) + print(f" [Motion] Left shoulder pitch (idx {left_shoulder_pitch}): [{left_min:.3f}, {left_max:.3f}] rad ({np.degrees(left_min):.1f}°, {np.degrees(left_max):.1f}°)") + print(f" [Motion] Right shoulder pitch (idx {right_shoulder_pitch}): [{right_min:.3f}, {right_max:.3f}] rad ({np.degrees(right_min):.1f}°, {np.degrees(right_max):.1f}°)") + + return joint_pos, joint_vel, body_quat, frame_indices + + +def test_command_sequence(publisher): + """Test command topic with a sequence of commands""" + print("\n=== Testing Command Topic ===") + + # Test planner mode + print("Starting with planner mode...") + publisher.send_command(start=True, stop=False, planner=True) + time.sleep(1.0) + + # Stop control + print("Stopping control...") + publisher.send_command(start=False, stop=True, planner=True) + time.sleep(1.0) + + # Test streamed motion mode + print("Starting with streamed motion mode...") + publisher.send_command(start=True, stop=False, planner=False) + time.sleep(1.0) + + # Stop control + print("Stopping control...") + publisher.send_command(start=False, stop=True, planner=False) + time.sleep(1.0) + + +def test_planner_sequence(publisher): + """Test planner topic with a sequence of movements""" + print("\n=== Testing Planner Topic ===") + + # Walk forward + print("Walking forward...") + for i in range(10): + publisher.send_planner( + mode=2, # WALK mode + movement=[1.0, 0.0, 0.0], # Forward + facing=[1.0, 0.0, 0.0], + speed=-1.0, + height=-1.0 + ) + time.sleep(0.1) + + # Walk backward + print("Walking backward...") + for i in range(10): + publisher.send_planner( + mode=2, # WALK mode + movement=[-1.0, 0.0, 0.0], # Backward + facing=[1.0, 0.0, 0.0], + speed=-1.0, + height=-1.0 + ) + time.sleep(0.1) + + # Walk in circle + print("Walking in circle...") + for i in range(36): # 3.6 seconds, 10 degrees per step + angle = np.radians(i * 10) + move_x = np.cos(angle) + move_y = np.sin(angle) + face_x = np.cos(angle) + face_y = np.sin(angle) + + publisher.send_planner( + mode=2, # WALK mode + movement=[move_x, move_y, 0.0], + facing=[face_x, face_y, 0.0], + speed=-1.0, + height=-1.0 + ) + time.sleep(0.1) + + # Idle + print("Idle...") + publisher.send_planner( + mode=0, # IDLE mode + movement=[0.0, 0.0, 0.0], + facing=[1.0, 0.0, 0.0], + speed=-1.0, + height=-1.0 + ) + time.sleep(1.0) + + +def test_pose_sequence(publisher): + """Test pose topic with shoulder pitch waving motion data""" + print("\n=== Testing Pose Topic (Shoulder Waving) ===") + + # Send shoulder waving motion data with real-time streaming (catch_up=False) + frame_idx = 0 + chunk_frames = 100 # 2 seconds at 50 Hz + + print("Sending 2s of motion...") + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=chunk_frames, num_joints=29, start_frame=frame_idx, + wave_amplitude=1.5, # Large motion (±1.5 rad = ±86°) + wave_frequency=0.5 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices, catch_up=False) + frame_idx += chunk_frames + + print("Waiting 2s for playback...") + time.sleep(2.0) + + print("Sending another 2s of motion (continuous)...") + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=chunk_frames, num_joints=29, start_frame=frame_idx, + wave_amplitude=1.5, # Large motion + wave_frequency=0.5 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices, catch_up=False) + frame_idx += chunk_frames + + print("Waiting 2s for playback...") + time.sleep(2.0) + + print("Shoulder waving complete!") + + +def _run_planner_and_streamed_steps(publisher): + """Steps 2-13: planner walking, streamed motion, upper body control.""" + # 2. Send initial pose data + input("\n[Press ENTER to begin streaming]") + print("Step 2: Sending initial pose data...") + frame_idx = 0 + for i in range(3): + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=10, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 10 + time.sleep(0.05) + + # 3. Walk forward for 3 seconds + print("Step 3: Walking forward (3 seconds)...") + for i in range(30): + publisher.send_planner( + mode=2, movement=[1.0, 0.0, 0.0], facing=[1.0, 0.0, 0.0], + speed=-1.0, height=-1.0 + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 4. Turn around (rotate 180 degrees) + print("Step 4: Turning around...") + for i in range(20): + angle = np.pi * (i / 20.0) + publisher.send_planner( + mode=2, movement=[0.0, 0.0, 0.0], + facing=[np.cos(angle), np.sin(angle), 0.0], + speed=-1.0, height=-1.0 + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 5. Walk forward again (now facing backward) + print("Step 5: Walking forward (after turn around) for 3 seconds...") + for i in range(30): + publisher.send_planner( + mode=2, movement=[-1.0, 0.0, 0.0], facing=[-1.0, 0.0, 0.0], + speed=-1.0, height=-1.0 + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 6. Mode switch test + print("\nStep 6 - 1: Switching to streamed motion mode...") + publisher.send_command(start=True, stop=False, planner=False) + time.sleep(1.0) + print("\nStep 6 - 2: Switching to planner motion mode...") + publisher.send_command(start=True, stop=False, planner=True) + time.sleep(1.0) + print("\nStep 6 - 3: Switching to streamed motion mode...") + publisher.send_command(start=True, stop=False, planner=False) + time.sleep(1.0) + + # 7. Shoulder waving with rotation (streamed motion) + print("Step 7: Waving shoulders with rotation (streamed motion)...") + chunk_duration = 2.0 + frames_per_chunk = int(50 * chunk_duration) + + print(f" Chunk 1: Sending {frames_per_chunk} frames (2 seconds)...") + joint_pos_1, joint_vel_1, body_quat_1, frame_indices_1 = generate_shoulder_pitch_waving( + num_frames=frames_per_chunk, num_joints=29, start_frame=frame_idx, + wave_amplitude=1.5, wave_frequency=0.5 + ) + publisher.send_pose(joint_pos_1, joint_vel_1, body_quat_1, frame_indices_1, catch_up=False) + frame_idx += frames_per_chunk + + print(f" Waiting 2s for robot to play chunk 1 (with rotation)...") + for i in range(20): + delta_heading = (np.pi / 2.0) * (i / 20.0) + publisher.send_command(start=False, stop=False, planner=False, delta_heading=delta_heading) + time.sleep(0.1) + + print(f" Chunk 2: Sending {frames_per_chunk} frames (2 seconds, continuous from frame {frame_idx})...") + joint_pos_2, joint_vel_2, body_quat_2, frame_indices_2 = generate_shoulder_pitch_waving( + num_frames=frames_per_chunk, num_joints=29, start_frame=frame_idx, + wave_amplitude=1.5, wave_frequency=0.5 + ) + publisher.send_pose(joint_pos_2, joint_vel_2, body_quat_2, frame_indices_2, catch_up=False) + frame_idx += frames_per_chunk + + print(f" Waiting 2s for robot to play chunk 2 (continue rotation)...") + for i in range(20): + delta_heading = (np.pi / 2.0) + (np.pi / 2.0) * (i / 20.0) + publisher.send_command(start=False, stop=False, planner=False, delta_heading=delta_heading) + time.sleep(0.1) + + # 8. Wait + print("Step 8: Additional wait (2 seconds)...") + time.sleep(2.0) + + # 9. Switch back to planner mode + print("\nStep 9: Switching back to planner mode...") + publisher.send_command(start=True, stop=False, planner=True) + time.sleep(1.0) + + # 10. Walk forward again (3 seconds) + print("Step 10: Walking forward again (3 seconds)...") + for i in range(30): + publisher.send_planner( + mode=2, movement=[1.0, 0.0, 0.0], facing=[1.0, 0.0, 0.0], + speed=-1.0, height=-1.0 + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 11. Turn around again (180 degrees) + print("Step 11: Turning around again...") + for i in range(20): + angle = np.pi * (i / 20.0) + publisher.send_planner( + mode=2, movement=[0.0, 0.0, 0.0], + facing=[np.cos(angle), np.sin(angle), 0.0], + speed=-1.0, height=-1.0 + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 12. Walk forward with upper body + hand control (10 seconds) + print("Step 12: Walking forward again (after second turn, 10 seconds)...") + print(" with upper body shoulder waving + hand open/close...") + for i in range(100): + t = i / 100.0 + pitch_amp = 0.5 + omega = 2 * np.pi + pitch = pitch_amp * np.sin(omega * t) + pitch_dot = pitch_amp * omega * np.cos(omega * t) + + upper_body_position = [0.0] * 17 + upper_body_velocity = [0.0] * 17 + upper_body_position[3] = pitch + upper_body_position[4] = -pitch + upper_body_velocity[3] = pitch_dot + upper_body_velocity[4] = -pitch_dot + + time_seconds = i * 0.1 + hand_open_factor = 1.0 if (time_seconds % 2.0) >= 1.0 else 0.0 + left_hand_base = [0.0, 0.0, 1.75, -1.57, -1.75, -1.57, -1.75] + left_hand_position = [b * (1.0 - hand_open_factor) for b in left_hand_base] + right_hand_base = [0.0, 0.0, -1.75, 1.57, 1.75, 1.57, 1.75] + right_hand_position = [b * (1.0 - hand_open_factor) for b in right_hand_base] + + publisher.send_planner( + mode=2, movement=[-1.0, 0.0, 0.0], facing=[-1.0, 0.0, 0.0], + speed=-1.0, height=-1.0, + upper_body_position=upper_body_position, + upper_body_velocity=upper_body_velocity, + left_hand_joints=left_hand_position, + right_hand_joints=right_hand_position, + ) + joint_pos, joint_vel, body_quat, frame_indices = generate_shoulder_pitch_waving( + num_frames=5, num_joints=29, start_frame=frame_idx, + wave_amplitude=0.5, wave_frequency=1.0 + ) + publisher.send_pose(joint_pos, joint_vel, body_quat, frame_indices) + frame_idx += 5 + time.sleep(0.1) + + # 13. Return to idle + print("Step 13: Returning to idle...") + for i in range(10): + publisher.send_planner( + mode=0, movement=[0.0, 0.0, 0.0], facing=[-1.0, 0.0, 0.0], + speed=-1.0, height=-1.0 + ) + time.sleep(0.1) + + +def test_combined_sequence(publisher): + """Test all topics together in a realistic scenario""" + print("\n=== Testing Full Combined Sequence ===") + + # 1. Start control with planner mode + input("\n[Press ENTER to send START command]") + print("Step 1: Starting control with planner mode...") + publisher.send_command(start=True, stop=False, planner=True) + time.sleep(0.5) + + _run_planner_and_streamed_steps(publisher) + + # 14. Stop control + print("\nStep 14: Stopping control...") + publisher.send_command(start=False, stop=True, planner=False) + time.sleep(1.0) + + print("\n=== Full sequence complete! ===") + print(" Phase 1 - Planner mode (steps 1-5): walk, turn, walk") + print(" Phase 2 - Streamed motion v1 (steps 6-8): shoulder waving + delta heading") + print(" Phase 3 - Planner + upper body (steps 9-13): walk with hands") + + +def main(): + parser = argparse.ArgumentParser(description="Test ZMQManager") + parser.add_argument("--host", type=str, default="*", help="Host to bind to (default: *)") + parser.add_argument("--port", type=int, default=5556, help="Port to bind to (default: 5556)") + parser.add_argument("--test", type=str, default="combined", + choices=["command", "planner", "pose", "combined", "all"], + help="Test to run (default: combined)") + parser.add_argument("--quiet", action="store_true", help="Disable verbose output") + args = parser.parse_args() + + print("=" * 60) + print("ZMQManager Test Publisher") + print("=" * 60) + print(f"Host: {args.host}") + print(f"Port: {args.port}") + print(f"Test: {args.test}") + print("=" * 60) + + # Create publisher + publisher = ZMQPublisher(host=args.host, port=args.port, verbose=not args.quiet) + + try: + if args.test == "command": + test_command_sequence(publisher) + elif args.test == "planner": + test_planner_sequence(publisher) + elif args.test == "pose": + test_pose_sequence(publisher) + elif args.test == "combined": + test_combined_sequence(publisher) + elif args.test == "all": + test_command_sequence(publisher) + test_planner_sequence(publisher) + test_pose_sequence(publisher) + test_combined_sequence(publisher) + + print("\n" + "=" * 60) + print("Test complete!") + print("=" * 60) + + except KeyboardInterrupt: + print("\n\nInterrupted by user") + + finally: + publisher.close() + + +if __name__ == "__main__": + main() + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_pose_subscriber_test.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_pose_subscriber_test.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c11e29d325b4ac57af5a0f32fbeb929b9de2195f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_pose_subscriber_test.cpp @@ -0,0 +1,196 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "../include/input_interface/zmq_packed_message_subscriber.hpp" + +static void run_local_publisher(const std::string &bind_endpoint, + const std::string &topic, + int num_messages, + int interval_ms, + bool ramp_prefix) +{ + constexpr size_t HEADER_SIZE = 1024; + + try { + zmq::context_t ctx(1); + zmq::socket_t pub(ctx, zmq::socket_type::pub); + pub.set(zmq::sockopt::sndhwm, 10); + pub.bind(bind_endpoint); + + // Give subscribers time to connect + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + + for (int i = 0; i < num_messages; ++i) { + // Build JSON header with 3 fields: index, timestamp_ns, and fake_positions + nlohmann::json header = { + {"v", 1}, + {"endian", "le"}, + {"fields", nlohmann::json::array({ + nlohmann::json{{"name","index"},{"dtype","i32"},{"shape",{1}}}, + nlohmann::json{{"name","timestamp_ns"},{"dtype","i64"},{"shape",{1}}}, + nlohmann::json{{"name","fake_positions"},{"dtype","f32"},{"shape",{10,3}}} + })} + }; + + std::string header_str = header.dump(); + + // Prepare data + int32_t idx = ramp_prefix ? static_cast(i) : 0; + const auto now_ns = std::chrono::duration_cast( + std::chrono::steady_clock::now().time_since_epoch()).count(); + int64_t ts_ns = static_cast(now_ns); + + // Fake positions: 10x3 float array (120 bytes) + std::vector fake_positions(10 * 3); + for (size_t j = 0; j < fake_positions.size(); ++j) { + fake_positions[j] = static_cast(i) + static_cast(j) * 0.1f; + } + + // Pack into single frame: [topic_prefix][1024-byte JSON header][fields...] + const size_t packed_size = topic.size() + HEADER_SIZE + sizeof(idx) + sizeof(ts_ns) + + fake_positions.size() * sizeof(float); + std::vector packed_data(packed_size, 0); + + size_t offset = 0; + + // Copy topic prefix + std::memcpy(packed_data.data() + offset, topic.data(), topic.size()); + offset += topic.size(); + + // Copy JSON header (null-pad to HEADER_SIZE) + std::memcpy(packed_data.data() + offset, header_str.data(), std::min(header_str.size(), HEADER_SIZE)); + offset += HEADER_SIZE; + + // Copy binary data (in order matching header.fields) + std::memcpy(packed_data.data() + offset, &idx, sizeof(idx)); + offset += sizeof(idx); + std::memcpy(packed_data.data() + offset, &ts_ns, sizeof(ts_ns)); + offset += sizeof(ts_ns); + std::memcpy(packed_data.data() + offset, fake_positions.data(), fake_positions.size() * sizeof(float)); + + // Send as single frame (no separate topic frame) + zmq::message_t packed_msg(packed_data.size()); + std::memcpy(packed_msg.data(), packed_data.data(), packed_data.size()); + + pub.send(packed_msg, zmq::send_flags::none); + + if (i % 20 == 0) { + std::cout << "[TestPublisher] Sent idx=" << idx << " (packed_bytes=" << packed_size << ")" << std::endl; + } + + std::this_thread::sleep_for(std::chrono::milliseconds(interval_ms)); + } + } catch (const zmq::error_t &e) { + std::cerr << "[TestPublisher] ZMQ error: " << e.what() << std::endl; + } catch (const std::exception &e) { + std::cerr << "[TestPublisher] Error: " << e.what() << std::endl; + } +} + +int main(int argc, char** argv) +{ + // Parse command-line args + bool use_conflate = false; + if (argc > 1 && std::string(argv[1]) == "--conflate") { + use_conflate = true; + } + + // Test configuration + const std::string host = "127.0.0.1"; + const int port = 5557; + const std::string topic = "pose"; + const std::string endpoint = "tcp://" + host + ":" + std::to_string(port); + + std::cout << "[Test] Mode: " << (use_conflate ? "CONFLATE" : "NO-CONFLATE") << std::endl; + std::cout << "[Test] Starting local ZMQ PUB at " << endpoint << std::endl; + + // Start the publisher first + std::thread pub_thread(run_local_publisher, endpoint, topic, /*num_messages=*/400, + /*interval_ms=*/10, /*ramp_prefix=*/true); + + // Delay before starting subscriber to simulate late joiner + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + + // Start the subscriber with configurable conflate mode + std::cout << "[Test] Creating subscriber..." << std::endl; + ZMQPackedMessageSubscriber sub(host, port, topic, /*timeout_ms=*/100, /*verbose=*/true, + use_conflate, /*rcv_hwm=*/ use_conflate ? 1 : -1); + std::vector received_indices; + std::vector latencies_ms; + + sub.SetOnDecodedMessage( + [&](const std::string& t, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs){ + if (bufs.size() >= 3 && bufs[0].size >= sizeof(int32_t) && bufs[1].size >= sizeof(int64_t)) { + int32_t idx; + int64_t ts_ns; + std::memcpy(&idx, bufs[0].data, sizeof(int32_t)); + std::memcpy(&ts_ns, bufs[1].data, sizeof(int64_t)); + + received_indices.push_back(static_cast(idx)); + const auto now_ns = std::chrono::duration_cast( + std::chrono::steady_clock::now().time_since_epoch()).count(); + double latency_ms = static_cast(now_ns - ts_ns) / 1e6; + latencies_ms.push_back(latency_ms); + + // Decode first few values from fake_positions to verify + if (received_indices.size() % 20 == 0 && bufs[2].size >= 3 * sizeof(float)) { + float pos[3]; + std::memcpy(pos, bufs[2].data, 3 * sizeof(float)); + std::cout << "[Received] idx=" << idx << " latency_ms=" << latency_ms + << " pos[0]=" << pos[0] << "," << pos[1] << "," << pos[2] << std::endl; + } + } + }); + std::cout << "[Test] Starting subscriber..." << std::endl; + sub.Start(); + std::cout << "[Test] Subscriber started, waiting 2s..." << std::endl; + + // Let it run for a while + std::this_thread::sleep_for(std::chrono::milliseconds(2000)); + + // Stop subscriber and join publisher + sub.Stop(); + if (pub_thread.joinable()) pub_thread.join(); + + // Print results + std::cout << "\n========== TEST RESULTS ==========" << std::endl; + std::cout << "Mode: " << (use_conflate ? "CONFLATE" : "NO-CONFLATE") << std::endl; + if (received_indices.empty()) { + std::cout << "No messages received" << std::endl; + } else { + std::cout << "First index: " << received_indices.front() << std::endl; + std::cout << "Last index: " << received_indices.back() << std::endl; + std::cout << "Total received: " << received_indices.size() << std::endl; + + // Check for gaps (skipped indices) to verify conflate behavior + int gaps = 0; + for (size_t i = 1; i < received_indices.size(); ++i) { + int gap = received_indices[i] - received_indices[i-1]; + if (gap > 1) gaps += (gap - 1); + } + std::cout << "Skipped indices: " << gaps << std::endl; + + if (!latencies_ms.empty()) { + double minv = *std::min_element(latencies_ms.begin(), latencies_ms.end()); + double maxv = *std::max_element(latencies_ms.begin(), latencies_ms.end()); + double avg = std::accumulate(latencies_ms.begin(), latencies_ms.end(), 0.0) / latencies_ms.size(); + std::cout << "Latency [min/avg/max] ms: " << minv << " / " << avg << " / " << maxv << std::endl; + } + } + std::cout << "==================================" << std::endl; + + std::cout << "[Test] Done." << std::endl; + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_python_sender_test.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_python_sender_test.cpp new file mode 100644 index 0000000000000000000000000000000000000000..825e3ab67b2c24ee809ba42815d68ccbfec8da31 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/tests/zmq_python_sender_test.cpp @@ -0,0 +1,436 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "../include/input_interface/zmq_packed_message_subscriber.hpp" + +/** + * Test program for ZMQPackedMessageSubscriber connecting to the Python pose estimation server. + * + * This test connects to the Python server and dynamically detects all available fields. + * Supports Protocol V1 (joint-based) and V2 (SMPL-based) with optional fields. + * + * Usage: + * 1. Start Python server: python pose_estimation_server_onboard_test.py + * 2. Run this test: ./zmq_python_sender_test [--verbose] [--host HOST] [--port PORT] + */ + +// Dynamic field storage +struct FieldData { + std::string name; + std::string dtype; + std::vector shape; + size_t expected_size = 0; + size_t actual_size = 0; + bool present = false; + bool valid = false; + + // Sample values for printing + std::vector sample_values; + + void print_summary() const { + std::cout << " " << name << " (" << dtype << ") shape=["; + for (size_t i = 0; i < shape.size(); ++i) { + std::cout << shape[i]; + if (i < shape.size() - 1) std::cout << ","; + } + std::cout << "] - " << (valid ? "✓ VALID" : "✗ INVALID"); + if (valid && !sample_values.empty()) { + std::cout << " | sample: ["; + for (size_t i = 0; i < std::min(size_t(3), sample_values.size()); ++i) { + if (i > 0) std::cout << ", "; + std::cout << std::fixed << std::setprecision(4) << sample_values[i]; + } + if (sample_values.size() > 3) std::cout << ", ..."; + std::cout << "]"; + } + std::cout << std::endl; + } +}; + +struct MessageData { + int version = 0; + std::map fields; + bool is_valid = false; + + void clear() { + fields.clear(); + is_valid = false; + version = 0; + } + + void print_summary() const { + std::cout << " [MessageData] Protocol V" << version << " - " + << (is_valid ? "✓ VALID" : "✗ INVALID") << std::endl; + std::cout << " Fields detected: " << fields.size() << std::endl; + for (const auto& [name, field] : fields) { + field.print_summary(); + } + } +}; + +int main(int argc, char** argv) +{ + // Parse command-line args + bool verbose = false; + std::string host = "localhost"; + int port = 5558; + + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg == "--verbose" || arg == "-v") { + verbose = true; + } else if (arg == "--host") { + if (i + 1 < argc) { + host = argv[++i]; + } + } else if (arg == "--port") { + if (i + 1 < argc) { + port = std::stoi(argv[++i]); + } + } else if (arg == "--help" || arg == "-h") { + std::cout << "Usage: " << argv[0] << " [OPTIONS]" << std::endl; + std::cout << "Options:" << std::endl; + std::cout << " --verbose, -v Enable verbose output" << std::endl; + std::cout << " --host HOST Server host (default: localhost)" << std::endl; + std::cout << " --port PORT Server port (default: 5558)" << std::endl; + std::cout << " --help, -h Show this help message" << std::endl; + return 0; + } + } + + // Test configuration + const std::string topic = "pose"; + + std::cout << "ZMQ Python Sender Test" << std::endl; + std::cout << "Connecting to: tcp://" << host << ":" << port << " (topic: " << topic << ")" << std::endl; + if (verbose) { + std::cout << "Verbose mode: enabled" << std::endl; + } + std::cout << "Waiting for messages... (Press Ctrl+C to stop)\n" << std::endl; + + // Statistics + int message_count = 0; + int valid_message_count = 0; + int error_count = 0; + std::vector receive_intervals_ms; + auto last_receive_time = std::chrono::steady_clock::now(); + + // Track field changes + std::map previous_fields; + int last_protocol_version = -1; + + // Create subscriber with conflate to get latest data + // Note: subscriber verbose is disabled by default, only enable for deep debugging + ZMQPackedMessageSubscriber sub(host, port, topic, + /*timeout_ms=*/1000, + /*verbose=*/false, + /*conflate=*/true, + /*rcv_hwm=*/1); + + sub.SetOnDecodedMessage( + [&](const std::string& t, + const ZMQPackedMessageSubscriber::DecodedHeader& hdr, + const std::vector& bufs) { + + message_count++; + + // Track receive interval + auto now = std::chrono::steady_clock::now(); + double interval_ms = std::chrono::duration(now - last_receive_time).count(); + if (message_count > 1) { + receive_intervals_ms.push_back(interval_ms); + } + last_receive_time = now; + + // Validate header structure + if (hdr.fields.size() != bufs.size()) { + std::cerr << "\nERROR: Field count (" << hdr.fields.size() + << ") != buffer count (" << bufs.size() << ")" << std::endl; + error_count++; + return; + } + + // Parse message data dynamically + MessageData msg; + msg.version = hdr.version; + bool needs_swap = hdr.NeedsByteSwap(); + bool all_fields_valid = true; + + // First pass: detect all fields and calculate expected sizes + for (size_t i = 0; i < hdr.fields.size(); ++i) { + const auto& field = hdr.fields[i]; + const auto& buf = bufs[i]; + + FieldData field_data; + field_data.name = field.name; + field_data.dtype = field.dtype; + field_data.shape = field.shape; + field_data.actual_size = buf.size; + field_data.present = true; + + // Calculate expected size from shape and dtype + size_t element_size = 0; + if (field.dtype == "f32") element_size = sizeof(float); + else if (field.dtype == "f64") element_size = sizeof(double); + else if (field.dtype == "i32") element_size = sizeof(int32_t); + else if (field.dtype == "i64") element_size = sizeof(int64_t); + else if (field.dtype == "u8" || field.dtype == "bool") element_size = sizeof(uint8_t); + + if (element_size > 0) { + size_t num_elements = 1; + for (auto dim : field.shape) { + num_elements *= dim; + } + field_data.expected_size = num_elements * element_size; + field_data.valid = (field_data.actual_size == field_data.expected_size); + } else { + std::cerr << "\nWARNING: Unknown dtype '" << field.dtype << "' for field '" << field.name << "'" << std::endl; + field_data.valid = false; + } + + if (!field_data.valid) { + all_fields_valid = false; + } + + // Extract sample values for printing (first 3 elements) + if (field_data.valid && buf.size > 0) { + size_t num_samples = std::min(size_t(3), buf.size / element_size); + field_data.sample_values.reserve(num_samples); + + if (field.dtype == "f32") { + for (size_t s = 0; s < num_samples; ++s) { + float val; + std::memcpy(&val, static_cast(buf.data) + s * sizeof(float), sizeof(float)); + if (needs_swap) val = byte_swap(val); + field_data.sample_values.push_back(static_cast(val)); + } + } else if (field.dtype == "f64") { + for (size_t s = 0; s < num_samples; ++s) { + double val; + std::memcpy(&val, static_cast(buf.data) + s * sizeof(double), sizeof(double)); + if (needs_swap) val = byte_swap(val); + field_data.sample_values.push_back(val); + } + } else if (field.dtype == "i32") { + for (size_t s = 0; s < num_samples; ++s) { + int32_t val; + std::memcpy(&val, static_cast(buf.data) + s * sizeof(int32_t), sizeof(int32_t)); + if (needs_swap) val = byte_swap(val); + field_data.sample_values.push_back(static_cast(val)); + } + } else if (field.dtype == "i64") { + for (size_t s = 0; s < num_samples; ++s) { + int64_t val; + std::memcpy(&val, static_cast(buf.data) + s * sizeof(int64_t), sizeof(int64_t)); + if (needs_swap) val = byte_swap(val); + field_data.sample_values.push_back(static_cast(val)); + } + } else if (field.dtype == "u8" || field.dtype == "bool") { + for (size_t s = 0; s < num_samples; ++s) { + uint8_t val; + std::memcpy(&val, static_cast(buf.data) + s * sizeof(uint8_t), sizeof(uint8_t)); + field_data.sample_values.push_back(static_cast(val)); + } + } + } + + msg.fields[field.name] = field_data; + } + + // Validate protocol-specific requirements + msg.is_valid = all_fields_valid; + + // Protocol V1 requires: joint_pos, joint_vel, body_quat, frame_index + if (msg.version == 1) { + bool has_required_v1 = msg.fields.count("joint_pos") && + msg.fields.count("joint_vel") && + (msg.fields.count("body_quat") || msg.fields.count("body_quat_w")) && + (msg.fields.count("frame_index") || msg.fields.count("last_smpl_global_frames")); + if (!has_required_v1) { + std::cerr << "\nERROR: Protocol V1 missing required fields" << std::endl; + msg.is_valid = false; + all_fields_valid = false; + } + } + // Protocol V2 requires: smpl_joints, smpl_pose, body_quat, frame_index + else if (msg.version == 2) { + bool has_required_v2 = (msg.fields.count("smpl_joints") || msg.fields.count("body_pos")) && + msg.fields.count("smpl_pose") && + (msg.fields.count("body_quat") || msg.fields.count("body_quat_w")) && + (msg.fields.count("frame_index") || msg.fields.count("last_smpl_global_frames")); + if (!has_required_v2) { + std::cerr << "\nERROR: Protocol V2 missing required fields (need: smpl_joints, smpl_pose, body_quat, frame_index)" << std::endl; + msg.is_valid = false; + all_fields_valid = false; + } + } + + // Detect field changes (protocol version or field set) + bool fields_changed = false; + if (message_count > 1) { + // Check if protocol version changed + if (last_protocol_version != msg.version) { + std::cerr << "\n⚠⚠⚠ WARNING: Protocol version changed from " << last_protocol_version + << " to " << msg.version << " at message #" << message_count << std::endl; + fields_changed = true; + } + + // Check if field set changed (names, shapes, or dtypes) + if (previous_fields.size() != msg.fields.size()) { + std::cerr << "\n⚠⚠⚠ WARNING: Field count changed from " << previous_fields.size() + << " to " << msg.fields.size() << " at message #" << message_count << std::endl; + fields_changed = true; + } else { + // Same number of fields - check if any changed + for (const auto& [name, field] : msg.fields) { + if (previous_fields.count(name) == 0) { + std::cerr << "\n⚠⚠⚠ WARNING: New field '" << name << "' appeared at message #" << message_count << std::endl; + fields_changed = true; + break; + } + const auto& prev_field = previous_fields[name]; + if (prev_field.dtype != field.dtype || prev_field.shape != field.shape) { + std::cerr << "\n⚠⚠⚠ WARNING: Field '" << name << "' changed at message #" << message_count << std::endl; + std::cerr << " Old: dtype=" << prev_field.dtype << " shape=["; + for (size_t j = 0; j < prev_field.shape.size(); ++j) { + std::cerr << prev_field.shape[j]; + if (j < prev_field.shape.size() - 1) std::cerr << ","; + } + std::cerr << "]" << std::endl; + std::cerr << " New: dtype=" << field.dtype << " shape=["; + for (size_t j = 0; j < field.shape.size(); ++j) { + std::cerr << field.shape[j]; + if (j < field.shape.size() - 1) std::cerr << ","; + } + std::cerr << "]" << std::endl; + fields_changed = true; + break; + } + } + + // Check for removed fields + for (const auto& [name, prev_field] : previous_fields) { + if (msg.fields.count(name) == 0) { + std::cerr << "\n⚠⚠⚠ WARNING: Field '" << name << "' removed at message #" << message_count << std::endl; + fields_changed = true; + break; + } + } + } + } + + // Update tracking + previous_fields = msg.fields; + last_protocol_version = msg.version; + + // Print first message OR when fields change + if (message_count == 1 || fields_changed) { + if (fields_changed) { + std::cout << "\n!!! FIELD CONFIGURATION CHANGED !!!" << std::endl; + } + + std::cout << "\n=== " << (message_count == 1 ? "First Message Detected" : "Message Field Update") << " ===" << std::endl; + std::cout << "Message #" << message_count << std::endl; + std::cout << "Protocol Version: " << msg.version << std::endl; + std::cout << "Fields detected: " << msg.fields.size() << std::endl; + for (const auto& [name, field] : msg.fields) { + std::cout << " - " << name << " (" << field.dtype << ") shape=["; + for (size_t j = 0; j < field.shape.size(); ++j) { + std::cout << field.shape[j]; + if (j < field.shape.size() - 1) std::cout << ","; + } + std::cout << "]"; + if (field.valid) { + std::cout << " ✓"; + } else { + std::cout << " ✗ (size mismatch: expected " << field.expected_size + << " bytes, got " << field.actual_size << ")"; + } + std::cout << std::endl; + } + std::cout << "==============================\n" << std::endl; + } + + // Print results + if (msg.is_valid) { + valid_message_count++; + if (verbose) { + std::cout << "\n[Message #" << message_count << " - interval: " << interval_ms << " ms]" << std::endl; + msg.print_summary(); + } else if (message_count % 30 == 0) { + // Print periodic update without verbose mode + std::cout << "\r[Received: " << message_count << " msgs (V" << msg.version + << ", " << msg.fields.size() << " fields), Latest interval: " + << static_cast(interval_ms) << " ms]" << std::flush; + } + } else { + std::cerr << "\nERROR: Message validation failed" << std::endl; + msg.print_summary(); + error_count++; + } + }); + + sub.Start(); + + // Run until interrupted + try { + while (true) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + + // Print periodic status (every 5 seconds) + static int last_status_count = 0; + if (message_count > 0 && message_count - last_status_count >= 30) { + last_status_count = message_count; + + if (!receive_intervals_ms.empty()) { + double avg_interval = std::accumulate(receive_intervals_ms.begin(), receive_intervals_ms.end(), 0.0) + / receive_intervals_ms.size(); + double avg_fps = 1000.0 / avg_interval; + std::cout << "\n[Status] Received: " << message_count << " msgs (" + << valid_message_count << " valid, " << error_count << " errors) | " + << "Avg: " << avg_fps << " Hz" << std::endl; + } else { + std::cout << "\n[Status] Received: " << message_count << " msgs (" + << valid_message_count << " valid, " << error_count << " errors)" << std::endl; + } + } + } + } catch (const std::exception& e) { + std::cerr << "Exception: " << e.what() << std::endl; + } + + // Cleanup + std::cout << "\n\nStopping..." << std::endl; + sub.Stop(); + + // Print final statistics + std::cout << "\n=== Test Results ===" << std::endl; + std::cout << "Total messages: " << message_count << " (" << valid_message_count << " valid, " + << error_count << " errors)" << std::endl; + + if (!receive_intervals_ms.empty()) { + double min_interval = *std::min_element(receive_intervals_ms.begin(), receive_intervals_ms.end()); + double max_interval = *std::max_element(receive_intervals_ms.begin(), receive_intervals_ms.end()); + double avg_interval = std::accumulate(receive_intervals_ms.begin(), receive_intervals_ms.end(), 0.0) + / receive_intervals_ms.size(); + double avg_fps = 1000.0 / avg_interval; + + std::cout << "Receive rate: " << avg_fps << " Hz (avg: " << avg_interval << " ms, " + << "min: " << min_interval << " ms, max: " << max_interval << " ms)" << std::endl; + } + std::cout << "====================" << std::endl; + + return (error_count > 0) ? 1 : 0; +} + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_fk.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_fk.cpp new file mode 100644 index 0000000000000000000000000000000000000000..935f76e245475f2154ae2d4acf3ef449e8b3701a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_fk.cpp @@ -0,0 +1,91 @@ +#include + +#include "../include/fk.hpp" +#include "../include/motion_data_reader.hpp" + +#include +#include + +TEST(FK, TestFKAndGlobalVelocities) { + + // read some exapmle motion data: + MotionDataReader motion_reader; + motion_reader.ReadFromCSV("reference/bones_072925_test/"); + + RobotFK fk("g1/g1_29dof.xml"); + + auto num_bodies = motion_reader.motions[0]->GetNumBodies(); + auto num_joints = motion_reader.motions[0]->GetNumJoints(); + auto timesteps = motion_reader.motions[0]->timesteps; + + std::vector body_positions_orig(num_bodies * timesteps); + std::vector body_quaternions_orig(num_bodies * timesteps); + + std::vector body_lin_velocities_orig(num_bodies * timesteps); + std::vector body_ang_velocities_orig(num_bodies * timesteps); + + // record original global space data so we can compare it to the computed data: + const auto &seq = *motion_reader.motions[0]; + std::copy(seq.BodyPositions(0), seq.BodyPositions(0) + body_positions_orig.size(), body_positions_orig.begin()); + std::copy(seq.BodyQuaternions(0), seq.BodyQuaternions(0) + body_quaternions_orig.size(), body_quaternions_orig.begin()); + std::copy(seq.BodyLinVelocities(0), seq.BodyLinVelocities(0) + body_lin_velocities_orig.size(), body_lin_velocities_orig.begin()); + std::copy(seq.BodyAngVelocities(0), seq.BodyAngVelocities(0) + body_ang_velocities_orig.size(), body_ang_velocities_orig.begin()); + + // Compute FK and global linear/angular velocities: + motion_reader.motions[0]->ComputeFK(fk); + motion_reader.motions[0]->ComputeGlobalVelocities(); + + // sanity check - make sure at least some of the computed components are + // different from the original data: + bool found_different_pos = false; + bool found_different_quat = false; + bool found_different_lin_vel = false; + bool found_different_ang_vel = false; + for(int f = 0; f < timesteps; ++f) { + for(int b = 0; b < num_bodies; ++b) { + if(seq.BodyPositions(f)[b] != body_positions_orig[f * num_bodies + b]) { + found_different_pos = true; + } + if(seq.BodyLinVelocities(f)[b] != body_lin_velocities_orig[f * num_bodies + b]) { + found_different_lin_vel = true; + } + if(seq.BodyAngVelocities(f)[b] != body_ang_velocities_orig[f * num_bodies + b]) { + found_different_ang_vel = true; + } + if(seq.BodyQuaternions(f)[b] != body_quaternions_orig[f * num_bodies + b]) { + found_different_quat = true; + } + } + } + EXPECT_TRUE(found_different_pos); + EXPECT_TRUE(found_different_quat); + EXPECT_TRUE(found_different_lin_vel); + EXPECT_TRUE(found_different_ang_vel); + + // check the results are close to the original data: + for(int f = 0; f < timesteps; ++f) { + for(int b = 0; b < num_bodies; ++b) { + for(int i = 0; i < 3; ++i) { + EXPECT_NEAR(seq.BodyPositions(f)[b][i], body_positions_orig[f * num_bodies + b][i], 1e-5); + } + for(int i = 0; i < 4; ++i) { + EXPECT_NEAR(seq.BodyQuaternions(f)[b][i], body_quaternions_orig[f * num_bodies + b][i], 1e-5); + } + for(int i = 0; i < 3; ++i) { + EXPECT_NEAR(seq.BodyLinVelocities(f)[b][i], body_lin_velocities_orig[f * num_bodies + b][i], 2e-4); + } + + // I couldn't get this quite right as you can see by the restricted checking range and large tolerance. + // However, if you write everything out to a .csv and plot the curves, they look close enough for me to + // doubt this will cause a problem. Should get to the bottom of this and fix it though. + if(timesteps - f > 10) + { + for(int i = 0; i < 3; ++i) + { + EXPECT_NEAR(seq.BodyAngVelocities(f)[b][i], body_ang_velocities_orig[f * num_bodies + b][i], 5e-3); + } + } + } + } + +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_main.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b42b721635e3d758fadd7674348e042a33d78c87 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/unit_tests/test_main.cpp @@ -0,0 +1,6 @@ +#include "gtest/gtest.h" + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/Dockerfile.devcontainer b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/Dockerfile.devcontainer new file mode 100644 index 0000000000000000000000000000000000000000..e19a6a44dc3f0572f032224f071cd34c8cedd588 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/Dockerfile.devcontainer @@ -0,0 +1,35 @@ +FROM ubuntu:20.04 + +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV DEBIAN_FRONTEND=noninteractive + +USER root + +# install zsh and oh-my-zsh +RUN apt update && apt-get install -y git wget zsh && \ + wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh && chmod +x install.sh +RUN ./install.sh +RUN git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \ + apt install zsh-syntax-highlighting +# configure zsh +RUN echo 'export ZSH=$HOME/.oh-my-zsh' >> ~/.zshrc && \ + echo 'ZSH_THEME="ys"' >> ~/.zshrc && \ + echo 'plugins=(git zsh-autosuggestions)' >> ~/.zshrc && \ + echo 'source $ZSH/oh-my-zsh.sh' >> ~/.zshrc && \ + echo 'source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc +RUN chsh -s /bin/zsh + +# install build tools +RUN apt-get install -y build-essential gcc-9 g++-9 gdb cmake ninja-build + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 + +# install libraries +RUN apt-get install -y libyaml-cpp-dev libeigen3-dev + +WORKDIR /workspace + +CMD ["zsh"] \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/devcontainer.json b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000000000000000000000000000000..cc5928d436b021b8c9f9782fb6b1468d825de404 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Existing Docker Compose (Extend)", + "dockerComposeFile": [ + "docker-compose.yml" + ], + "service": "devcontainer", + "workspaceFolder": "/workspace", + "customizations": { + "vscode": { + "extensions": [ + "gitlab.gitlab-workflow", + "llvm-vs-code-extensions.vscode-clangd", + "xaver.clang-format", + "ms-vscode.cmake-tools", + "zxh404.vscode-proto3", + "donjayamanne.githistory", + "mhutchie.git-graph", + "matepek.vscode-catch2-test-adapter", + "ryanluker.vscode-coverage-gutters", + "donjayamanne.python-extension-pack", + "adam-bender.commit-message-editor", + "axetroy.vscode-changelog-generator", + "vsliveshare.vsliveshare", + "bierner.markdown-mermaid", + "vadimcn.vscode-lldb" + ] + } + } +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/docker-compose.yml b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..8641505ce859b5edd321f8140b8a93f5936e8496 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.devcontainer/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3' +services: + devcontainer: + volumes: + - ..:/workspace:cached + - /tmp/.X11-unix:/tmp/.X11-unix:rw + - /mnt/wslg:/mnt/wslg + - /root/.gazebo/models/:/root/.gazebo/models/ + - /var/run/docker.sock:/var/run/docker.sock + - $HOME/.Xauthority:/tmp/.Xauthority:rw + environment: + - DISPLAY=${DISPLAY} + - XAUTHORITY=/tmp/.Xauthority + + cap_add: + - SYS_PTRACE + command: /bin/sh -c "while sleep 1000; do :; done" + + build: + context: . + dockerfile: Dockerfile.devcontainer + + privileged: true + network_mode: "host" + \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.gitignore b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d3159442d779a62dc26d76afa21555e04a4697d1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/.gitignore @@ -0,0 +1,8 @@ +# IDE +.vscode + +# cpp +build + +#cland +.cache diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9cb429979edcf4f36dcba69e7de97f8a8b757e9d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/CMakeLists.txt @@ -0,0 +1,82 @@ +cmake_minimum_required(VERSION 3.5) +project(unitree_sdk2 VERSION 2.0.0) + +## Project Options +option(BUILD_EXAMPLES "Build examples" ON) + +## Set compiler to use c++ 17 features +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## Chosse build type +set(default_build_type "Release") +if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif () + +## Use GNUInstallDirs to install libraries into correct locations on all platforms. +include(GNUInstallDirs) + +## Put all binary files into /bin and libraries into /lib +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) + +## Check system architecture +message(STATUS "Current system architecture: ${CMAKE_SYSTEM_PROCESSOR}") + +## Import thirdparty libraries +add_subdirectory(thirdparty) + +## Import Unitree SDK2 library +set(UNITREE_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}) +find_library(UNITREE_SDK_LIB unitree_sdk2 PATHS ${UNITREE_SDK_PATH} NO_DEFAULT_PATH) + +if (NOT UNITREE_SDK_LIB) + message(FATAL_ERROR "Unitree SDK library for the architecture is not found") +else () + message(STATUS "Unitree SDK library found at: ${UNITREE_SDK_LIB}") +endif () + +message(STATUS "Importing: ${UNITREE_SDK_LIB}") + +find_package(Threads REQUIRED) + +add_library(unitree_sdk2 STATIC IMPORTED GLOBAL) +set_target_properties(unitree_sdk2 PROPERTIES + IMPORTED_LOCATION ${UNITREE_SDK_LIB}) +target_link_libraries(unitree_sdk2 INTERFACE ddsc ddscxx Threads::Threads) +target_include_directories(unitree_sdk2 INTERFACE + $ + $) + +if (BUILD_EXAMPLES) + add_subdirectory(example) +endif () + +## Install the library +install(DIRECTORY include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +install(FILES ${UNITREE_SDK_LIB} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(FILES cmake/unitree_sdk2Targets.cmake + DESTINATION lib/cmake/unitree_sdk2) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + unitree_sdk2ConfigVersion.cmake + VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" + COMPATIBILITY ExactVersion) + +configure_file(cmake/unitree_sdk2Config.cmake.in unitree_sdk2Config.cmake @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/unitree_sdk2Config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/unitree_sdk2ConfigVersion.cmake" + DESTINATION lib/cmake/unitree_sdk2) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/LICENSE b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d1febdced4f6e7b20d09d99c4a5e818e43f0ccfd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2016-2023 HangZhou YuShu TECHNOLOGY CO.,LTD. ("Unitree Robotics") +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/README.md b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5dcb3879f6450fa42134f4f2c2ea9b9c90d71c14 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/README.md @@ -0,0 +1,60 @@ +# unitree_sdk2 +Unitree robot sdk version 2. + +### Prebuild environment +* OS (Ubuntu 20.04 LTS) +* CPU (aarch64 and x86_64) +* Compiler (gcc version 9.4.0) + +### Environment Setup + +Before building or running the SDK, ensure the following dependencies are installed: + +- CMake (version 3.10 or higher) +- GCC (version 9.4.0) +- Make + +You can install the required packages on Ubuntu 20.04 with: + +```bash +apt-get update +apt-get install -y cmake g++ build-essential libyaml-cpp-dev libeigen3-dev libboost-all-dev libspdlog-dev libfmt-dev +``` + +### Build examples + +To build the examples inside this repository: + +```bash +mkdir build +cd build +cmake .. +make +``` + +### Installation + +To build your own application with the SDK, you can install the unitree_sdk2 to your system directory: + +```bash +mkdir build +cd build +cmake .. +sudo make install +``` + +Or install unitree_sdk2 to a specified directory: + +```bash +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/opt/unitree_robotics +sudo make install +``` + +You can refer to `example/cmake_sample` on how to import the unitree_sdk2 into your CMake project. + +Note that if you install the library to other places other than `/opt/unitree_robotics`, you need to make sure the path is added to "${CMAKE_PREFIX_PATH}" so that cmake can find it with "find_package()". + +### Notice +For more reference information, please go to [Unitree Document Center](https://support.unitree.com/home/zh/developer). diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Config.cmake.in b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Config.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..ff2bad6e0b63f492d261eaa4bae6256f3e6047d4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Config.cmake.in @@ -0,0 +1,7 @@ +include(CMakeFindDependencyMacro) + +# Same syntax as find_package +find_dependency(Threads REQUIRED) + +# Add the targets file +include("${CMAKE_CURRENT_LIST_DIR}/unitree_sdk2Targets.cmake") diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Targets.cmake b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Targets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..5f401aeb1bbec7ec8aa0a8ec91ca6e752d2b6f2e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/cmake/unitree_sdk2Targets.cmake @@ -0,0 +1,96 @@ +if(CMAKE_VERSION VERSION_LESS 3.5.0) + message(FATAL_ERROR "This file relies on consumers using CMake 3.5.0 or greater.") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_sdk2) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target ddsc and ddscxx +add_library(ddsc SHARED IMPORTED GLOBAL) +set_target_properties(ddsc PROPERTIES + IMPORTED_LOCATION ${_IMPORT_PREFIX}/lib/libddsc.so + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "Threads::Threads" + IMPORTED_NO_SONAME TRUE) + +add_library(ddscxx SHARED IMPORTED GLOBAL) +set_target_properties(ddscxx PROPERTIES + IMPORTED_LOCATION ${_IMPORT_PREFIX}/lib/libddscxx.so + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/ddscxx" + INTERFACE_LINK_LIBRARIES "Threads::Threads" + IMPORTED_NO_SONAME TRUE) + +# Create imported target unitree_sdk2 +add_library(unitree_sdk2 STATIC IMPORTED GLOBAL) +set_target_properties(unitree_sdk2 PROPERTIES + IMPORTED_LOCATION ${_IMPORT_PREFIX}/lib/libunitree_sdk2.a + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "ddsc;ddscxx;Threads::Threads" + LINKER_LANGUAGE CXX +) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..3b070858b2b946241fec337e7fb326d6eaa62fb2 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/CMakeLists.txt @@ -0,0 +1,12 @@ +add_subdirectory(helloworld) +add_subdirectory(wireless_controller) +add_subdirectory(jsonize) +add_subdirectory(state_machine) + + +add_subdirectory(go2) +add_subdirectory(b2) +add_subdirectory(h1) +add_subdirectory(g1) +add_subdirectory(go2w) +add_subdirectory(b2w) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..86d6d6519c880809efb6c327355bc36abc5327ba --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/CMakeLists.txt @@ -0,0 +1,5 @@ +add_executable(b2_sport_client b2_sport_client.cpp) +target_link_libraries(b2_sport_client unitree_sdk2) + +add_executable(b2_stand_example b2_stand_example.cpp) +target_link_libraries(b2_stand_example unitree_sdk2) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_sport_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_sport_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b07c8422befc50d64e8ccba0dcb0aaf54f2f4612 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_sport_client.cpp @@ -0,0 +1,24 @@ +#include + +int main() +{ + /* + * Initilaize ChannelFactory + */ + unitree::robot::ChannelFactory::Instance()->Init(0); + unitree::robot::go2::SportClient sc; + + sc.SetTimeout(5.0f); + sc.Init(); + + //Test Api + while (true) + { + int32_t ret = sc.Move(0.5, 0.0, 0.0); + std::cout << "Call Move ret:" << ret << std::endl; + + usleep(1000); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_stand_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_stand_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..916574a616aed907660a2232ce59729b150fdd98 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2/b2_stand_example.cpp @@ -0,0 +1,350 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree::robot::b2; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +class Custom +{ +public: + explicit Custom(){} + ~Custom(){} + + void Init(); + void Start(); + +private: + void InitLowCmd(); + void LowStateMessageHandler(const void* messages); + void LowCmdWrite(); + int queryMotionStatus(); + std::string queryServiceName(std::string form,std::string name); + +private: + float Kp = 1000.0; + float Kd = 10.0; + double time_consume = 0; + int rate_count = 0; + int sin_count = 0; + int motiontime = 0; + float dt = 0.002; // 0.001~0.01 + + MotionSwitcherClient msc; + + unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init + unitree_go::msg::dds_::LowState_ low_state{}; // default init + + /*publisher*/ + ChannelPublisherPtr lowcmd_publisher; + /*subscriber*/ + ChannelSubscriberPtr lowstate_subscriber; + + /*LowCmd write thread*/ + ThreadPtr lowCmdWriteThreadPtr; + + float _targetPos_1[12] = {0.0, 1.36, -2.65, 0.0, 1.36, -2.65, + 0.2, 1.36, -2.65, 0.2, 1.36, -2.65}; + + float _targetPos_2[12] = {0.0, 0.67, -1.3, 0.0, 0.67, -1.3, + 0.0, 0.67, -1.3, 0.0, 0.67, -1.3}; + + float _targetPos_3[12] = {0.0, 1.36, -2.65, 0.0, 1.36, -2.65, + 0.0, 1.36, -2.65, 0.0, 1.36, -2.65}; + + float _targetPos_4[12] = {-0.5, 1.36, -2.65, 0.5, 1.36, -2.65, + -0.5, 1.36, -2.65, 0.5, 1.36, -2.65}; + + float _startPos[12]; + float _duration_1 = 500; + float _duration_2 = 900; + float _duration_3 = 1000; + float _duration_4 = 1100; + float _duration_5 = 500; + float _percent_1 = 0; + float _percent_2 = 0; + float _percent_3 = 0; + float _percent_4 = 0; + float _percent_5 = 0; + + bool firstRun = true; + bool done = false; +}; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len) +{ + unsigned int xbit = 0; + unsigned int data = 0; + unsigned int CRC32 = 0xFFFFFFFF; + const unsigned int dwPolynomial = 0x04c11db7; + + for (unsigned int i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (unsigned int bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + { + CRC32 <<= 1; + } + + if (data & xbit) + CRC32 ^= dwPolynomial; + xbit >>= 1; + } + } + + return CRC32; +} + +void Custom::Init() +{ + InitLowCmd(); + + /*create publisher*/ + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowcmd_publisher->InitChannel(); + + /*create subscriber*/ + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1); + + /*init MotionSwitcherClient*/ + msc.SetTimeout(10.0f); + msc.Init(); + + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc.ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } +} + +void Custom::InitLowCmd() +{ + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x0A); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } +} + +int Custom::queryMotionStatus() +{ + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc.CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; +} + +std::string Custom::queryServiceName(std::string form,std::string name) +{ + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; +} + +void Custom::Start() +{ + /*loop publishing thread*/ + lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &Custom::LowCmdWrite, this); +} + +void Custom::LowStateMessageHandler(const void* message) +{ + low_state = *(unitree_go::msg::dds_::LowState_*)message; +} + +void Custom::LowCmdWrite() +{ + if(_percent_5<1) + { + std::cout<<"Read sensor data example: "<=500) + { + if(firstRun) + { + for(int i = 0; i < 12; i++) + { + _startPos[i] = low_state.motor_state()[i].q(); + } + firstRun = false; + } + + _percent_1 += (float)1 / _duration_1; + _percent_1 = _percent_1 > 1 ? 1 : _percent_1; + if (_percent_1 < 1) + { + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_1) * _startPos[j] + _percent_1 * _targetPos_1[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + if ((_percent_1 == 1)&&(_percent_2 < 1)) + { + _percent_2 += (float)1 / _duration_2; + _percent_2 = _percent_2 > 1 ? 1 : _percent_2; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_2) * _targetPos_1[j] + _percent_2 * _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3<1)) + { + _percent_3 += (float)1 / _duration_3; + _percent_3 = _percent_3 > 1 ? 1 : _percent_3; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3==1)&&(_percent_4<1)) + { + _percent_4 += (float)1 / _duration_4; + _percent_4 = _percent_4 > 1 ? 1 : _percent_4; + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_4) * _targetPos_2[j] + _percent_4 * _targetPos_3[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3==1)&&(_percent_4==1)&&((_percent_5<=1))) + { + _percent_5 += (float)1 / _duration_5; + _percent_5 = _percent_5 > 1 ? 1 : _percent_5; + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_5) * _targetPos_3[j] + _percent_5 * _targetPos_4[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + + lowcmd_publisher->Write(low_cmd); + } + +} + +int main(int argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + std::cout << "WARNING: Make sure the robot is lying on the ground." << std::endl + << "Press Enter to continue..." << std::endl; + std::cin.ignore(); + + ChannelFactory::Instance()->Init(0, argv[1]); + + Custom custom; + custom.Init(); + custom.Start(); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5fc62635cc228e08c2f8aacec82ede6d44ffecd1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/CMakeLists.txt @@ -0,0 +1,5 @@ +add_executable(b2w_sport_client b2w_sport_client.cpp) +target_link_libraries(b2w_sport_client unitree_sdk2) + +add_executable(b2w_stand_example b2w_stand_example.cpp) +target_link_libraries(b2w_stand_example unitree_sdk2) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_sport_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_sport_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7e306ae9c3e85858b180dd36015d4561a08e776b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_sport_client.cpp @@ -0,0 +1,170 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +struct TestOption +{ + std::string name; + int id; +}; + +const vector option_list = + {{"damp", 0}, + {"stand_up", 1}, + {"stand_down", 2}, + {"move forward", 3}, + {"move lateral", 4}, + {"move rotate", 5}, + {"stop_move", 6}, + {"switch_gait", 7}, + {"switch_gait", 8}, + {"recovery", 9}, + }; + +int ConvertToInt(const std::string &str) +{ + try + { + std::stoi(str); + return std::stoi(str); + } + catch (const std::invalid_argument &) + { + return -1; + } + catch (const std::out_of_range &) + { + return -1; + } +} + +class UserInterface +{ +public: + UserInterface(){}; + ~UserInterface(){}; + + void terminalHandle() + { + std::string input; + std::getline(std::cin, input); + + if (input.compare("list") == 0) + { + for (TestOption option : option_list) + { + std::cout << option.name << ", id: " << option.id << std::endl; + } + } + + for (TestOption option : option_list) + { + if (input.compare(option.name) == 0 || ConvertToInt(input) == option.id) + { + test_option_->id = option.id; + test_option_->name = option.name; + std::cout << "Test: " << test_option_->name << ", test_id: " << test_option_->id << std::endl; + } + } + }; + + TestOption *test_option_; +}; + +int main(int argc, char **argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + TestOption test_option; + test_option.id = 1; + + unitree::robot::b2::SportClient sport_client; + sport_client.SetTimeout(25.0f); + sport_client.Init(); + + UserInterface user_interface; + user_interface.test_option_ = &test_option; + + std::cout << "Input \"list \" to list all test option ..." << std::endl; + long res_count = 0; + while (1) + { + auto time_start_trick = std::chrono::high_resolution_clock::now(); + static const constexpr auto dt = std::chrono::microseconds(20000); // 50Hz + + user_interface.terminalHandle(); + + int res = 1; + if (test_option.id == 0) + { + res = sport_client.Damp(); + } + else if (test_option.id == 1) + { + res = sport_client.StandUp(); + } + else if (test_option.id == 2) + { + res = sport_client.StandDown(); + } + else if (test_option.id == 3) + { + res = sport_client.Move(0.3, 0, 0);// the robot will move for 0.5 seconds before stopping. + // If the Move command is called in a loop, the robot will continue moving. + // If no Move request is received within 0.5 seconds, the robot will automatically stop. + } + else if (test_option.id == 4) + { + res = sport_client.Move(0, 0.3, 0);// the robot will move for 0.5 seconds before stopping. + // If the Move command is called in a loop, the robot will continue moving. + // If no Move request is received within 0.5 seconds, the robot will automatically stop. + } + else if (test_option.id == 5) + { + res = sport_client.Move(0, 0, 0.5);// the robot will move for 0.5 seconds before stopping. + // If the Move command is called in a loop, the robot will continue moving. + // If no Move request is received within 0.5 seconds, the robot will automatically stop. + } + else if (test_option.id == 6) + { + res = sport_client.StopMove(); + } + else if (test_option.id == 7) + { + res = sport_client.SwitchGait(0); + } + else if (test_option.id == 8) + { + res = sport_client.SwitchGait(1); + } + else if (test_option.id == 9) + { + res = sport_client.RecoveryStand(); + } + + if (res < 0) + { + res_count += 1; + std::cout << "Request error for: " << option_list[test_option.id].name << ", code: " << res << ", count: " << res_count << std::endl; + } + else + { + res_count = 0; + std::cout << "Request successed: " << option_list[test_option.id].name << ", code: " << res << std::endl; + } + std::this_thread::sleep_until(time_start_trick + dt); + } + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_stand_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_stand_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..381b03718392118a60ab1bd31a4a62063622aef0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/b2w/b2w_stand_example.cpp @@ -0,0 +1,372 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree::robot::b2; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +class Custom +{ +public: + explicit Custom(){} + ~Custom(){} + + void Init(); + void Start(); + +private: + void InitLowCmd(); + void LowStateMessageHandler(const void* messages); + void LowCmdWrite(); + int queryMotionStatus(); + std::string queryServiceName(std::string form,std::string name); + +private: + float Kp = 1000.0; + float Kd = 10.0; + double time_consume = 0; + int rate_count = 0; + int sin_count = 0; + int motiontime = 0; + float dt = 0.002; // 0.001~0.01 + + MotionSwitcherClient msc; + SportClient sc; + + unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init + unitree_go::msg::dds_::LowState_ low_state{}; // default init + + /*publisher*/ + ChannelPublisherPtr lowcmd_publisher; + /*subscriber*/ + ChannelSubscriberPtr lowstate_subscriber; + + /*LowCmd write thread*/ + ThreadPtr lowCmdWriteThreadPtr; + + float _targetPos_1[12] = {0.0, 1.36, -2.65, 0.0, 1.36, -2.65, + -0.2, 1.36, -2.65, 0.2, 1.36, -2.65}; + + float _targetPos_2[12] = {0.0, 0.67, -1.3, 0.0, 0.67, -1.3, + 0.0, 0.67, -1.3, 0.0, 0.67, -1.3}; + + float _targetPos_3[12] = {-0.65, 1.36, -2.65, 0.65, 1.36, -2.65, + -0.65, 1.36, -2.65, 0.65, 1.36, -2.65}; + + float _startPos[12]; + float _duration_1 = 800; + float _duration_2 = 800; + float _duration_3 = 2000; + float _duration_4 = 1500; + float _percent_1 = 0; + float _percent_2 = 0; + float _percent_3 = 0; + float _percent_4 = 0; + + bool firstRun = true; + bool done = false; +}; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len) +{ + unsigned int xbit = 0; + unsigned int data = 0; + unsigned int CRC32 = 0xFFFFFFFF; + const unsigned int dwPolynomial = 0x04c11db7; + + for (unsigned int i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (unsigned int bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + { + CRC32 <<= 1; + } + + if (data & xbit) + CRC32 ^= dwPolynomial; + xbit >>= 1; + } + } + + return CRC32; +} + +void Custom::Init() +{ + InitLowCmd(); + + /*create publisher*/ + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowcmd_publisher->InitChannel(); + + /*create subscriber*/ + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1); + + /*init MotionSwitcherClient*/ + msc.SetTimeout(10.0f); + msc.Init(); + + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc.ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } +} + +void Custom::InitLowCmd() +{ + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x01); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } +} + +int Custom::queryMotionStatus() +{ + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc.CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; +} + +std::string Custom::queryServiceName(std::string form,std::string name) +{ + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; +} + +void Custom::Start() +{ + /*loop publishing thread*/ + lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &Custom::LowCmdWrite, this); +} + +void Custom::LowStateMessageHandler(const void* message) +{ + low_state = *(unitree_go::msg::dds_::LowState_*)message; +} + +void Custom::LowCmdWrite() +{ + if(_percent_4<1) + { + std::cout<<"Read sensor data example: "<=500) + { + if(firstRun) + { + for(int i = 0; i < 12; i++) + { + _startPos[i] = low_state.motor_state()[i].q(); + } + firstRun = false; + } + + _percent_1 += (float)1 / _duration_1; + _percent_1 = _percent_1 > 1 ? 1 : _percent_1; + if (_percent_1 < 1) + { + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_1) * _startPos[j] + _percent_1 * _targetPos_1[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + if ((_percent_1 == 1)&&(_percent_2 < 1)) + { + _percent_2 += (float)1 / _duration_2; + _percent_2 = _percent_2 > 1 ? 1 : _percent_2; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_2) * _targetPos_1[j] + _percent_2 * _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3<1)) + { + _percent_3 += (float)1 / _duration_3; + _percent_3 = _percent_3 > 1 ? 1 : _percent_3; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + if(_percent_3<0.4) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = 3; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + else if((_percent_3>=0.4)&&(_percent_3<0.8)) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = -3; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + else if(_percent_3>=0.8) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = 0; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + } + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3==1)&&((_percent_4<=1))) + { + _percent_4 += (float)1 / _duration_4; + _percent_4 = _percent_4 > 1 ? 1 : _percent_4; + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_4) * _targetPos_2[j] + _percent_4 * _targetPos_3[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + + lowcmd_publisher->Write(low_cmd); + } + +} + +int main(int argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + std::cout << "WARNING: Make sure the robot is lying on the ground." << std::endl + << "Press Enter to continue..." << std::endl; + std::cin.ignore(); + + ChannelFactory::Instance()->Init(0, argv[1]); + + Custom custom; + custom.Init(); + custom.Start(); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..731e551e8de20fab26e5287fc9d68e5fd296f95b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/CMakeLists.txt @@ -0,0 +1,38 @@ +add_executable(g1_loco_client high_level/g1_loco_client_example.cpp) +target_link_libraries(g1_loco_client unitree_sdk2) + +add_executable(g1_arm5_sdk_dds_example high_level/g1_arm5_sdk_dds_example.cpp) +target_link_libraries(g1_arm5_sdk_dds_example unitree_sdk2) + +add_executable(g1_arm7_sdk_dds_example high_level/g1_arm7_sdk_dds_example.cpp) +target_link_libraries(g1_arm7_sdk_dds_example unitree_sdk2) + +add_executable(g1_arm_action_example high_level/g1_arm_action_example.cpp) +target_link_libraries(g1_arm_action_example unitree_sdk2) + +add_executable(g1_ankle_swing_example low_level/g1_ankle_swing_example.cpp) +target_link_libraries(g1_ankle_swing_example unitree_sdk2) + +add_executable(g1_audio_client_example audio/g1_audio_client_example.cpp) +target_link_libraries(g1_audio_client_example unitree_sdk2) + +add_executable(g1_dex3_example dex3/g1_dex3_example.cpp) +target_link_libraries(g1_dex3_example unitree_sdk2) + +find_package(Boost COMPONENTS program_options) +if(Boost_FOUND) + add_executable(g1_termination low_level/terminations.cpp) + target_link_libraries(g1_termination unitree_sdk2 Boost::program_options) +endif() + +find_package(yaml-cpp QUIET) +if(yaml-cpp_FOUND) + if (${yaml-cpp_VERSION} VERSION_GREATER_EQUAL "0.6") + message(STATUS "Found yaml-cpp version ${yaml-cpp_VERSION}") + add_executable(g1_dual_arm_example low_level/g1_dual_arm_example.cpp) + target_link_libraries(g1_dual_arm_example PRIVATE unitree_sdk2 yaml-cpp) + target_compile_definitions(g1_dual_arm_example PUBLIC BLIB_DIR="${CMAKE_CURRENT_SOURCE_DIR}/low_level/behavior_lib/") + else() + message(STATUS "yaml-cpp version ${yaml-cpp_VERSION} is too old, skipping build of g1_dual_arm_example.") + endif() +endif() diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/g1_audio_client_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/g1_audio_client_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06816527c9d844938dc6bbbe6c41991fb7b084ef --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/g1_audio_client_example.cpp @@ -0,0 +1,174 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "wav.hpp" + +#define AUDIO_FILE_PATH "../example/g1/audio/test.wav" +#define AUDIO_SUBSCRIBE_TOPIC "rt/audio_msg" +#define GROUP_IP "239.168.123.161" +#define PORT 5555 + +#define WAV_SECOND 5 // record seconds +#define WAV_LEN (16000 * 2 * WAV_SECOND) +#define CHUNK_SIZE 96000 // 3 seconds +int sock; + +void asr_handler(const void *msg) { + std_msgs::msg::dds_::String_ *resMsg = (std_msgs::msg::dds_::String_ *)msg; + std::cout << "Topic:\"rt/audio_msg\" recv: " << resMsg->data() << std::endl; +} + +std::string get_local_ip_for_multicast() { + struct ifaddrs *ifaddr, *ifa; + char host[NI_MAXHOST]; + std::string result = ""; + + getifaddrs(&ifaddr); + for (ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next) { + if (!ifa->ifa_addr || ifa->ifa_addr->sa_family != AF_INET) continue; + getnameinfo(ifa->ifa_addr, sizeof(struct sockaddr_in), host, NI_MAXHOST, + NULL, 0, NI_NUMERICHOST); + std::string ip(host); + if (ip.find("192.168.123.") == 0) { + result = ip; + break; + } + } + freeifaddrs(ifaddr); + return result; +} + +void thread_mic(void) { + sock = socket(AF_INET, SOCK_DGRAM, 0); + sockaddr_in local_addr{}; + local_addr.sin_family = AF_INET; + local_addr.sin_port = htons(PORT); + local_addr.sin_addr.s_addr = INADDR_ANY; + bind(sock, (sockaddr *)&local_addr, sizeof(local_addr)); + + ip_mreq mreq{}; + inet_pton(AF_INET, GROUP_IP, &mreq.imr_multiaddr); + std::string local_ip = get_local_ip_for_multicast(); + std::cout << "local ip: " << local_ip << std::endl; + mreq.imr_interface.s_addr = inet_addr(local_ip.c_str()); + setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); + + int total_bytes = 0; + std::vector pcm_data; + pcm_data.reserve(WAV_LEN / 2); + std::cout << "start record!" << std::endl; + while (total_bytes < WAV_LEN) { + char buffer[2048]; + ssize_t len = recvfrom(sock, buffer, sizeof(buffer), 0, nullptr, nullptr); + if (len > 0) { + size_t sample_count = len / 2; + const int16_t *samples = reinterpret_cast(buffer); + pcm_data.insert(pcm_data.end(), samples, samples + sample_count); + total_bytes += len; + } + } + + WriteWave("record.wav", 16000, pcm_data.data(), pcm_data.size(), 1); + std::cout << "record finish! save to record.wav " << std::endl; +} + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: audio_client_example [NetWorkInterface(eth0)]" + << std::endl; + exit(0); + } + int32_t ret; + /* + * Initilaize ChannelFactory + */ + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + unitree::robot::g1::AudioClient client; + client.Init(); + client.SetTimeout(10.0f); + + /*ASR message Example*/ + unitree::robot::ChannelSubscriber subscriber( + AUDIO_SUBSCRIBE_TOPIC); + subscriber.InitChannel(asr_handler); + + /*Volume Example*/ + uint8_t volume; + ret = client.GetVolume(volume); + std::cout << "GetVolume API ret:" << ret + << " volume = " << std::to_string(volume) << std::endl; + ret = client.SetVolume(100); + std::cout << "SetVolume to 100% , API ret:" << ret << std::endl; + + /*TTS Example*/ + ret = client.TtsMaker("你好。我是宇树科技的机器人。例程启动成功", + 0); // Auto play + std::cout << "TtsMaker API ret:" << ret << std::endl; + unitree::common::Sleep(5); + + ret = client.TtsMaker( + "Hello. I'm a robot from Unitree Robotics. The example has started " + "successfully. ", + 1); // Engilsh TTS + std::cout << "TtsMaker API ret:" << ret << std::endl; + unitree::common::Sleep(8); + + /*Audio Play Example*/ + int32_t sample_rate = -1; + int8_t num_channels = 0; + bool filestate = false; + std::vector pcm = + ReadWave(AUDIO_FILE_PATH, &sample_rate, &num_channels, &filestate); + + std::cout << "wav file sample_rate = " << sample_rate + << " num_channels = " << std::to_string(num_channels) + << " filestate =" << filestate << "filesize = " << pcm.size() + << std::endl; + + if (filestate && sample_rate == 16000 && num_channels == 1) { + size_t total_size = pcm.size(); + size_t offset = 0; + int chunk_index = 0; + std::string stream_id = + std::to_string(unitree::common::GetCurrentTimeMillisecond()); + + while (offset < total_size) { + size_t remaining = total_size - offset; + size_t current_chunk_size = + std::min(static_cast(CHUNK_SIZE), remaining); + std::vector chunk(pcm.begin() + offset, + pcm.begin() + offset + current_chunk_size); + client.PlayStream("example", stream_id, chunk); + unitree::common::Sleep(1); + std::cout << "Playing size: " << offset << std::endl; + offset += current_chunk_size; + } + + ret = client.PlayStop(stream_id); // stop playback after transmission ends + + } else { + std::cout << "audio file format error, please check!" << std::endl; + } + + /*LED Control Example*/ + client.LedControl(0, 255, 0); + unitree::common::Sleep(1); + client.LedControl(0, 0, 0); + unitree::common::Sleep(1); + client.LedControl(0, 0, 255); + + std::cout << "AudioClient api test finish , asr start..." << std::endl; + + std::thread mic_t(thread_mic); + + while (1) { + sleep(1); // wait for asr message + } + mic_t.join(); + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/test.wav b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/test.wav new file mode 100644 index 0000000000000000000000000000000000000000..c6254050f48ac9f3b8a5eed7e206b7b61fce27d1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/test.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03031d6b8a6d023789280e99a0b823071dd97f3838eb58a68ab5f46c7b9df4a0 +size 132246 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/wav.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/wav.hpp new file mode 100644 index 0000000000000000000000000000000000000000..cadedb930182fbc8d45ae197836fa956cbcf2385 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/audio/wav.hpp @@ -0,0 +1,232 @@ +#ifndef __UT_ROBOT_WAV_READER_HPP__ +#define __UT_ROBOT_WAV_READER_HPP__ + +struct WaveHeader { + void SeekToDataChunk(std::istream &is) { + while (is && subchunk2_id != 0x61746164) { + is.seekg(subchunk2_size, std::istream::cur); + is.read(reinterpret_cast(&subchunk2_id), sizeof(int32_t)); + is.read(reinterpret_cast(&subchunk2_size), sizeof(int32_t)); + } + } + + int32_t chunk_id; + int32_t chunk_size; + int32_t format; + int32_t subchunk1_id; + int32_t subchunk1_size; + int16_t audio_format; + int16_t num_channels; + int32_t sample_rate; + int32_t byte_rate; + int16_t block_align; + int16_t bits_per_sample; + int32_t subchunk2_id; // a tag of this chunk + int32_t subchunk2_size; // size of subchunk2 +}; + +static_assert(sizeof(WaveHeader) == 44); + +std::vector ReadWaveImpl(std::istream &is, int32_t *sampling_rate, + int8_t *channelCount, bool *is_ok) { + WaveHeader header{}; + is.read(reinterpret_cast(&header.chunk_id), sizeof(header.chunk_id)); + + // F F I R + if (header.chunk_id != 0x46464952) { + printf("Expected chunk_id RIFF. Given: 0x%08x\n", header.chunk_id); + *is_ok = false; + return {}; + } + + is.read(reinterpret_cast(&header.chunk_size), + sizeof(header.chunk_size)); + + is.read(reinterpret_cast(&header.format), sizeof(header.format)); + + // E V A W + if (header.format != 0x45564157) { + printf("Expected format WAVE. Given: 0x%08x\n", header.format); + *is_ok = false; + return {}; + } + + is.read(reinterpret_cast(&header.subchunk1_id), + sizeof(header.subchunk1_id)); + + is.read(reinterpret_cast(&header.subchunk1_size), + sizeof(header.subchunk1_size)); + + if (header.subchunk1_id == 0x4b4e554a) { + // skip junk padding + is.seekg(header.subchunk1_size, std::istream::cur); + + is.read(reinterpret_cast(&header.subchunk1_id), + sizeof(header.subchunk1_id)); + + is.read(reinterpret_cast(&header.subchunk1_size), + sizeof(header.subchunk1_size)); + } + + if (header.subchunk1_id != 0x20746d66) { + printf("Expected subchunk1_id 0x20746d66. Given: 0x%08x\n", + header.subchunk1_id); + *is_ok = false; + return {}; + } + + if (header.subchunk1_size != 16 && + header.subchunk1_size != 18) { // 16 for PCM + printf("Expected subchunk1_size 16. Given: %d\n", header.subchunk1_size); + *is_ok = false; + return {}; + } + + is.read(reinterpret_cast(&header.audio_format), + sizeof(header.audio_format)); + + if (header.audio_format != 1) { // 1 for PCM + printf("Expected audio_format 1. Given: %d\n", header.audio_format); + *is_ok = false; + return {}; + } + + is.read(reinterpret_cast(&header.num_channels), + sizeof(header.num_channels)); + + *channelCount = (int8_t)header.num_channels; + + is.read(reinterpret_cast(&header.sample_rate), + sizeof(header.sample_rate)); + + is.read(reinterpret_cast(&header.byte_rate), + sizeof(header.byte_rate)); + + is.read(reinterpret_cast(&header.block_align), + sizeof(header.block_align)); + + is.read(reinterpret_cast(&header.bits_per_sample), + sizeof(header.bits_per_sample)); + + if (header.byte_rate != + (header.sample_rate * header.num_channels * header.bits_per_sample / 8)) { + printf("Incorrect byte rate: %d. Expected: %d", header.byte_rate, + (header.sample_rate * header.num_channels * header.bits_per_sample / + 8)); + *is_ok = false; + return {}; + } + + if (header.block_align != + (header.num_channels * header.bits_per_sample / 8)) { + printf("Incorrect block align: %d. Expected: %d\n", header.block_align, + (header.num_channels * header.bits_per_sample / 8)); + *is_ok = false; + return {}; + } + + if (header.bits_per_sample != 16) { // we support only 16 bits per sample + printf("Expected bits_per_sample 16. Given: %d\n", header.bits_per_sample); + *is_ok = false; + return {}; + } + + if (header.subchunk1_size == 18) { + int16_t extra_size = -1; + is.read(reinterpret_cast(&extra_size), sizeof(int16_t)); + if (extra_size != 0) { + printf( + "Extra size should be 0 for wave from NAudio. Current extra size " + "%d\n", + extra_size); + *is_ok = false; + return {}; + } + } + + is.read(reinterpret_cast(&header.subchunk2_id), + sizeof(header.subchunk2_id)); + + is.read(reinterpret_cast(&header.subchunk2_size), + sizeof(header.subchunk2_size)); + + header.SeekToDataChunk(is); + if (!is) { + *is_ok = false; + return {}; + } + + *sampling_rate = header.sample_rate; + + // header.subchunk2_size contains the number of bytes in the data. + // As we assume each sample contains two bytes, so it is divided by 2 here + std::vector samples(header.subchunk2_size / 2); + + is.read(reinterpret_cast(samples.data()), header.subchunk2_size); + if (!is) { + *is_ok = false; + return {}; + } + + std::vector ans(samples.size() * 2); + for (int32_t i = 0; i != static_cast(samples.size()); ++i) { + ans[i * 2] = samples[i] & 0xFF; + ans[i * 2 + 1] = (samples[i] >> 8) & 0xFF; + } + + *is_ok = true; + return ans; +} + +std::vector ReadWave(const std::string &filename, + int32_t *sampling_rate, int8_t *channelCount, + bool *is_ok) { + std::ifstream is(filename, std::ifstream::binary); + auto samples = ReadWaveImpl(is, sampling_rate, channelCount, is_ok); + return samples; +} + +bool WriteWave(const std::string &filename, int32_t sampling_rate, + const int16_t *samples, int32_t n, uint8_t num_channels) { + WaveHeader header{}; + header.chunk_id = 0x46464952; // FFIR + header.format = 0x45564157; // EVAW + header.subchunk1_id = 0x20746d66; // "fmt " + header.subchunk1_size = 16; // 16 for PCM + header.audio_format = 1; // PCM =1 + + int32_t bits_per_sample = 16; // int16_t + header.num_channels = num_channels; + header.sample_rate = sampling_rate; + header.byte_rate = sampling_rate * num_channels * bits_per_sample / 8; + header.block_align = num_channels * bits_per_sample / 8; + header.bits_per_sample = bits_per_sample; + header.subchunk2_id = 0x61746164; // atad + header.subchunk2_size = n * num_channels * bits_per_sample / 8; + + header.chunk_size = 36 + header.subchunk2_size; + + std::vector samples_int16(n * num_channels); + for (int32_t i = 0; i != n * num_channels; ++i) { + samples_int16[i] = samples[i]; + } + + std::ofstream os(filename, std::ios::binary); + if (!os) { + printf("Failed to create %s", filename.c_str()); + return false; + } + + os.write(reinterpret_cast(&header), sizeof(header)); + os.write(reinterpret_cast(samples_int16.data()), + samples_int16.size() * sizeof(int16_t)); + + if (!os) { + printf("Write %s failed", filename.c_str()); + return false; + } + + return true; +} + +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/dex3/g1_dex3_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/dex3/g1_dex3_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa2f3b91cde9d73eb8a0f026977ba125d0d2d9e1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/dex3/g1_dex3_example.cpp @@ -0,0 +1,326 @@ +#include +#include +#include //replace your sdk path +#include //replace your sdk path +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +enum State { + INIT, + ROTATE, + GRIP, + STOP, + PRINT +}; + +// set URDF Limits +const float maxLimits_left[7]= { 1.05 , 1.05 , 1.75 , 0 , 0 , 0 , 0 }; // set max motor value +const float minLimits_left[7]= { -1.05 , -0.724 , 0 , -1.57 , -1.75 , -1.57 ,-1.75}; +const float maxLimits_right[7]= { 1.05 , 0.742 , 0 , 1.57 , 1.75 , 1.57 , 1.75}; +const float minLimits_right[7]= { -1.05 , -1.05 , -1.75, 0 , 0 , 0 ,0 }; + +// Initing the dds configuration +std::string dds_namespace = "rt/dex3/left"; +std::string sub_namespace = "rt/dex3/left/state"; +unitree::robot::ChannelPublisherPtr handcmd_publisher; +unitree::robot::ChannelSubscriberPtr handstate_subscriber; +unitree_hg::msg::dds_::HandCmd_ msg; +unitree_hg::msg::dds_::HandState_ state; +std::atomic currentState(INIT); +std::mutex stateMutex; + +#define MOTOR_MAX 7 +#define SENSOR_MAX 9 +uint8_t hand_id = 0; + +typedef struct { + uint8_t id : 4; + uint8_t status : 3; + uint8_t timeout: 1; +} RIS_Mode_t; + +// stateToString Method +const char* stateToString(State state) { + switch (state) { + case INIT: return "INIT"; + case ROTATE: return "ROTATE"; + case GRIP: return "GRIP"; + case STOP: return "STOP"; + case PRINT: return "PRINT"; + default: return "UNKNOWN"; + } +} + +// Monitor user's input +char getNonBlockingInput() { + struct termios oldt, newt; + char ch; + int oldf; + + tcgetattr(STDIN_FILENO, &oldt); + newt = oldt; + newt.c_lflag &= ~(ICANON | ECHO); + tcsetattr(STDIN_FILENO, TCSANOW, &newt); + oldf = fcntl(STDIN_FILENO, F_GETFL, 0); + fcntl(STDIN_FILENO, F_SETFL, oldf | O_NONBLOCK); + + ch = getchar(); + + tcsetattr(STDIN_FILENO, TCSANOW, &oldt); + fcntl(STDIN_FILENO, F_SETFL, oldf); + + return ch; +} + +void userInputThread() { + while (true) { + char ch = getNonBlockingInput(); + if (ch == 'q') { + std::cout << "Exiting..." << std::endl; + currentState = STOP; + break; + } else if (ch == 'r') { + currentState = ROTATE; + } else if (ch == 'g') { + currentState = GRIP; + } else if (ch == 'p') { + currentState = PRINT; + } else if (ch == 's') { + currentState = STOP; + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } +} + +// this method can send kp and kd to motors +void rotateMotors(bool isLeftHand) { + static int _count = 1; + static int dir = 1; + const float* maxLimits = isLeftHand ? maxLimits_left : maxLimits_right; + const float* minLimits = isLeftHand ? minLimits_left : minLimits_right; + + for (int i = 0; i < MOTOR_MAX; i++) { + RIS_Mode_t ris_mode; + ris_mode.id = i; + ris_mode.status = 0x01; + + + uint8_t mode = 0; + mode |= (ris_mode.id & 0x0F); + mode |= (ris_mode.status & 0x07) << 4; + mode |= (ris_mode.timeout & 0x01) << 7; + msg.motor_cmd()[i].mode(mode); + msg.motor_cmd()[i].tau(0); + msg.motor_cmd()[i].kp(0.5); + msg.motor_cmd()[i].kd(0.1); + + + float range = maxLimits[i] - minLimits[i]; + float mid = (maxLimits[i] + minLimits[i]) / 2.0; + float amplitude = range / 2.0; + float q = mid + amplitude * sin(_count / 20000.0 * M_PI); + + msg.motor_cmd()[i].q(q); + } + + handcmd_publisher->Write(msg); + _count += dir; + + + if (_count >= 10000) { + dir = -1; + } + if (_count <= -10000) { + dir = 1; + } + + usleep(100); +} + +// this method can send static position to motors +void gripHand(bool isLeftHand) { + + const float* maxLimits = isLeftHand ? maxLimits_left : maxLimits_right; + const float* minLimits = isLeftHand ? minLimits_left : minLimits_right; + + for (int i = 0; i < MOTOR_MAX; i++) { + RIS_Mode_t ris_mode; + ris_mode.id = i; + ris_mode.status = 0x01; + + + uint8_t mode = 0; + mode |= (ris_mode.id & 0x0F); + mode |= (ris_mode.status & 0x07) << 4; + mode |= (ris_mode.timeout & 0x01) << 7; + msg.motor_cmd()[i].mode(mode); + msg.motor_cmd()[i].tau(0); + + + float mid = (maxLimits[i] + minLimits[i]) / 2.0; + + + msg.motor_cmd()[i].q(mid); + msg.motor_cmd()[i].dq(0); + msg.motor_cmd()[i].kp(1.5); + msg.motor_cmd()[i].kd(0.1); + } + + + handcmd_publisher->Write(msg); + usleep(1000000); +} + +// this method can send dynamic position to motors +void stopMotors() { + for (int i = 0; i < MOTOR_MAX; i++) { + RIS_Mode_t ris_mode; + ris_mode.id = i; + ris_mode.status = 0x01; + ris_mode.timeout = 0x01; + + uint8_t mode = 0; + mode |= (ris_mode.id & 0x0F); + mode |= (ris_mode.status & 0x07) << 4; + mode |= (ris_mode.timeout & 0x01) << 7; + msg.motor_cmd()[i].mode(mode); + msg.motor_cmd()[i].tau(0); + msg.motor_cmd()[i].dq(0); + msg.motor_cmd()[i].kp(0); + msg.motor_cmd()[i].kd(0); + msg.motor_cmd()[i].q(0); + + } + handcmd_publisher->Write(msg); + usleep(1000000); +} + +// this method can subscribe dds and show the position for now +void printState(bool isLeftHand){ + Eigen::Matrix q; + + const float* maxLimits = isLeftHand ? maxLimits_left : maxLimits_right; + const float* minLimits = isLeftHand ? minLimits_left : minLimits_right; + for(int i = 0; i < 7; i++) + { + q(i) = state.motor_state()[i].q(); + + q(i) = (q(i) - minLimits[i] ) / (maxLimits[i] - minLimits[i]); + q(i) = std::clamp(q(i), 0.0f, 1.0f); + } + std::cout << "\033[2J\033[H"; + std::cout << "-- Hand State --\n"; + std::cout << "--- Current State: " << "Test" << " ---\n"; + std::cout << "Commands:\n"; + std::cout << " r - Rotate\n"; + std::cout << " g - Grip\n"; + std::cout << " t - Test\n"; + std::cout << " q - Quit\n"; + if(isLeftHand){ + std::cout << " L: " << q.transpose() << std::endl; + }else std::cout << " R: " << q.transpose() << std::endl; + usleep(0.1 * 1e6); + +} + +void StateHandler(const void *message) { + state = *(unitree_hg::msg::dds_::HandState_ *)message; +} + + + + +int main(int argc, const char** argv) +{ + std::cout << " --- Unitree Robotics --- \n"; + std::cout << " Dex3 Hand Example \n\n"; + std::string input; + std::cout << "Please input the hand id (L for left hand, R for right hand): "; + std::cin >> input; + + if (input == "L") { + hand_id = 0; + dds_namespace = "rt/dex3/left"; + sub_namespace = "rt/lf/dex3/left/state"; + } else if (input == "R") { + hand_id = 1; + dds_namespace = "rt/dex3/right"; + sub_namespace = "rt/lf/dex3/right/state"; + } else { + std::cout << "Invalid hand id. Please input 'L' or 'R'." << std::endl; + return -1; + } + + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + handcmd_publisher.reset(new unitree::robot::ChannelPublisher(dds_namespace + "/cmd")); + handstate_subscriber.reset(new unitree::robot::ChannelSubscriber(sub_namespace)); + handcmd_publisher->InitChannel(); + handstate_subscriber->InitChannel( + std::bind(&StateHandler, std::placeholders::_1), 1); + state.motor_state().resize(MOTOR_MAX); + state.press_sensor_state().resize(SENSOR_MAX); + msg.motor_cmd().resize(MOTOR_MAX); + + // handcmd_publisher->msg_.motor_cmd().resize(MOTOR_MAX); + + + std::thread inputThread(userInputThread); + State lastState = INIT; + while (true) { + State state; + { + std::lock_guard lock(stateMutex); + state = currentState.load(); + } + + if (state != lastState) { + std::cout << "\n--- Current State: " << stateToString(state) << " ---\n"; + std::cout << "Commands:\n"; + std::cout << " r - Rotate\n"; + std::cout << " g - Grip\n"; + std::cout << " p - Print_state\n"; + std::cout << " q - Quit\n"; + std::cout << " s - Stop\n"; + lastState = state; + } + + switch (state) { + case INIT: + std::cout << "Initializing..." << std::endl; + currentState = ROTATE; + break; + case ROTATE: + rotateMotors(input == "L"); + break; + case GRIP: + gripHand(input == "L"); + break; + case STOP: + stopMotors(); + break; + case PRINT: + printState(input == "L"); + break; + default: + std::cout << "Invalid state!" << std::endl; + inputThread.join(); + break; + } + } + + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm5_sdk_dds_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm5_sdk_dds_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..19cd308edd8c30e90a86fb97e83f2bda075ef522 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm5_sdk_dds_example.cpp @@ -0,0 +1,256 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + +static const std::string kTopicArmSDK = "rt/arm_sdk"; +static const std::string kTopicState = "rt/lowstate"; +constexpr float kPi = 3.141592654; +constexpr float kPi_2 = 1.57079632; + +enum JointIndex { + // Left leg + kLeftHipPitch = 0, + kLeftHipRoll = 1, + kLeftHipYaw = 2, + kLeftKnee = 3, + kLeftAnkle = 4, + kLeftAnkleRoll = 5, + + // Right leg + kRightHipPitch = 6, + kRightHipRoll = 7, + kRightHipYaw = 8, + kRightKnee = 9, + kRightAnkle = 10, + kRightAnkleRoll = 11, + + kWaistYaw = 12, + kWaistRoll = 13, + kWaistPitch = 14, + + // Left arm + kLeftShoulderPitch = 15, + kLeftShoulderRoll = 16, + kLeftShoulderYaw = 17, + kLeftElbowPitch = 18, + kLeftElbowRoll = 19, + + // Right arm + kRightShoulderPitch = 22, + kRightShoulderRoll = 23, + kRightShoulderYaw = 24, + kRightElbowPitch = 25, + kRightElbowRoll = 26, + + kNotUsedJoint = 29, + kNotUsedJoint1 = 30, + kNotUsedJoint2 = 31, + kNotUsedJoint3 = 32, + kNotUsedJoint4 = 33, + kNotUsedJoint5 = 34 +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + unitree::robot::ChannelPublisherPtr + arm_sdk_publisher; + unitree_hg::msg::dds_::LowCmd_ msg; + + arm_sdk_publisher.reset( + new unitree::robot::ChannelPublisher( + kTopicArmSDK)); + arm_sdk_publisher->InitChannel(); + + unitree::robot::ChannelSubscriberPtr + low_state_subscriber; + + // create subscriber + unitree_hg::msg::dds_::LowState_ state_msg; + low_state_subscriber.reset( + new unitree::robot::ChannelSubscriber( + kTopicState)); + low_state_subscriber->InitChannel([&](const void *msg) { + auto s = ( const unitree_hg::msg::dds_::LowState_* )msg; + memcpy( &state_msg, s, sizeof( unitree_hg::msg::dds_::LowState_ ) ); + }, 1); + + std::array arm_joints = { + JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, + JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbowPitch, + JointIndex::kLeftElbowRoll, + JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, + JointIndex::kRightShoulderYaw, JointIndex::kRightElbowPitch, + JointIndex::kRightElbowRoll, + JointIndex::kWaistYaw, + JointIndex::kWaistRoll, + JointIndex::kWaistPitch}; + + float weight = 0.f; + float weight_rate = 0.2f; + + float kp = 60.f; + float kd = 1.5f; + float dq = 0.f; + float tau_ff = 0.f; + + float control_dt = 0.02f; + float max_joint_velocity = 0.5f; + + float delta_weight = weight_rate * control_dt; + float max_joint_delta = max_joint_velocity * control_dt; + auto sleep_time = + std::chrono::milliseconds(static_cast(control_dt / 0.001f)); + + std::array init_pos{0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0}; + + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, + 0.f, -kPi_2, 0.f, kPi_2, 0.f, + 0.f, 0.f, 0.f}; + + // wait for init + std::cout << "Press ENTER to init arms ..."; + std::cin.get(); + + // get current joint position + std::array current_jpos{}; + std::cout<<"Current joint position: "; + for (int i = 0; i < arm_joints.size(); ++i) { + current_jpos.at(i) = state_msg.motor_state().at(arm_joints.at(i)).q(); + std::cout << current_jpos.at(i) << " "; + } + std::cout << std::endl; + + // set init pos + std::cout << "Initailizing arms ..."; + float init_time = 2.0f; + int init_time_steps = static_cast(init_time / control_dt); + + for (int i = 0; i < init_time_steps; ++i) { + // set weight + weight = 1.0; + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + float phase = 1.0 * i / init_time_steps; + std::cout << "Phase: " << phase << std::endl; + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(init_pos.at(j) * phase + current_jpos.at(j) * (1 - phase)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + // wait for control + std::cout << "Press ENTER to start arm ctrl ..." << std::endl; + std::cin.get(); + + // start control + std::cout << "Start arm ctrl!" << std::endl; + float period = 5.f; + int num_time_steps = static_cast(period / control_dt); + + std::array current_jpos_des{}; + + // lift arms up + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(target_pos.at(j) - current_jpos_des.at(j), + -max_joint_delta, max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // put arms down + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(init_pos.at(j) - current_jpos_des.at(j), -max_joint_delta, + max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // stop control + std::cout << "Stoping arm ctrl ..."; + float stop_time = 2.0f; + int stop_time_steps = static_cast(stop_time / control_dt); + + for (int i = 0; i < stop_time_steps; ++i) { + // increase weight + weight -= delta_weight; + weight = std::clamp(weight, 0.f, 1.f); + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(0); + // send dds msg + arm_sdk_publisher->Write(msg); + + std::cout << "Done!" << std::endl; + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm7_sdk_dds_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm7_sdk_dds_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..019b80536153b56a8a89fc10f843a1513ba8d9df --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm7_sdk_dds_example.cpp @@ -0,0 +1,262 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + +static const std::string kTopicArmSDK = "rt/arm_sdk"; +static const std::string kTopicState = "rt/lowstate"; +constexpr float kPi = 3.141592654; +constexpr float kPi_2 = 1.57079632; + +enum JointIndex { + // Left leg + kLeftHipPitch, + kLeftHipRoll, + kLeftHipYaw, + kLeftKnee, + kLeftAnkle, + kLeftAnkleRoll, + + // Right leg + kRightHipPitch, + kRightHipRoll, + kRightHipYaw, + kRightKnee, + kRightAnkle, + kRightAnkleRoll, + + kWaistYaw, + kWaistRoll, + kWaistPitch, + + // Left arm + kLeftShoulderPitch, + kLeftShoulderRoll, + kLeftShoulderYaw, + kLeftElbow, + kLeftWristRoll, + kLeftWristPitch, + kLeftWristYaw, + // Right arm + kRightShoulderPitch, + kRightShoulderRoll, + kRightShoulderYaw, + kRightElbow, + kRightWristRoll, + kRightWristPitch, + kRightWristYaw, + + kNotUsedJoint, + kNotUsedJoint1, + kNotUsedJoint2, + kNotUsedJoint3, + kNotUsedJoint4, + kNotUsedJoint5 +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + unitree::robot::ChannelPublisherPtr + arm_sdk_publisher; + unitree_hg::msg::dds_::LowCmd_ msg; + + arm_sdk_publisher.reset( + new unitree::robot::ChannelPublisher( + kTopicArmSDK)); + arm_sdk_publisher->InitChannel(); + + unitree::robot::ChannelSubscriberPtr + low_state_subscriber; + + // create subscriber + unitree_hg::msg::dds_::LowState_ state_msg; + low_state_subscriber.reset( + new unitree::robot::ChannelSubscriber( + kTopicState)); + low_state_subscriber->InitChannel([&](const void *msg) { + auto s = ( const unitree_hg::msg::dds_::LowState_* )msg; + memcpy( &state_msg, s, sizeof( unitree_hg::msg::dds_::LowState_ ) ); + }, 1); + + std::array arm_joints = { + JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, + JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbow, + JointIndex::kLeftWristRoll, JointIndex::kLeftWristPitch, + JointIndex::kLeftWristYaw, + JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, + JointIndex::kRightShoulderYaw, JointIndex::kRightElbow, + JointIndex::kRightWristRoll, JointIndex::kRightWristPitch, + JointIndex::kRightWristYaw, + JointIndex::kWaistYaw, + JointIndex::kWaistRoll, + JointIndex::kWaistPitch}; + + float weight = 0.f; + float weight_rate = 0.2f; + + float kp = 60.f; + float kd = 1.5f; + float dq = 0.f; + float tau_ff = 0.f; + + float control_dt = 0.02f; + float max_joint_velocity = 0.5f; + + float delta_weight = weight_rate * control_dt; + float max_joint_delta = max_joint_velocity * control_dt; + auto sleep_time = + std::chrono::milliseconds(static_cast(control_dt / 0.001f)); + + std::array init_pos{0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0}; + + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f, + 0.f, -kPi_2, 0.f, kPi_2, 0.f, 0.f, 0.f, + 0, 0, 0}; + + // wait for init + std::cout << "Press ENTER to init arms ..."; + std::cin.get(); + + // get current joint position + std::array current_jpos{}; + std::cout<<"Current joint position: "; + for (int i = 0; i < arm_joints.size(); ++i) { + current_jpos.at(i) = state_msg.motor_state().at(arm_joints.at(i)).q(); + std::cout << current_jpos.at(i) << " "; + } + std::cout << std::endl; + + // set init pos + std::cout << "Initailizing arms ..."; + float init_time = 2.0f; + int init_time_steps = static_cast(init_time / control_dt); + + for (int i = 0; i < init_time_steps; ++i) { + // increase weight + weight = 1.0; + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + float phase = 1.0 * i / init_time_steps; + std::cout << "Phase: " << phase << std::endl; + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(init_pos.at(j) * phase + current_jpos.at(j) * (1 - phase)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + // wait for control + std::cout << "Press ENTER to start arm ctrl ..." << std::endl; + std::cin.get(); + + // start control + std::cout << "Start arm ctrl!" << std::endl; + float period = 5.f; + int num_time_steps = static_cast(period / control_dt); + + std::array current_jpos_des{}; + + // lift arms up + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(target_pos.at(j) - current_jpos_des.at(j), + -max_joint_delta, max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // put arms down + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(init_pos.at(j) - current_jpos_des.at(j), -max_joint_delta, + max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // stop control + std::cout << "Stoping arm ctrl ..."; + float stop_time = 2.0f; + int stop_time_steps = static_cast(stop_time / control_dt); + + for (int i = 0; i < stop_time_steps; ++i) { + // increase weight + weight -= delta_weight; + weight = std::clamp(weight, 0.f, 1.f); + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(0); + // send dds msg + arm_sdk_publisher->Write(msg); + + std::cout << "Done!" << std::endl; + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm_action_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm_action_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b58a9f27ce4f6d1873e70dadeead72752b57d03d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_arm_action_example.cpp @@ -0,0 +1,80 @@ +/** + * @file g1_arm_action_example.cpp + * @brief This example demonstrates how to use the G1 Arm Action Client to execute predefined arm actions. + */ +#include "unitree/robot/g1/arm/g1_arm_action_error.hpp" +#include "unitree/robot/g1/arm/g1_arm_action_client.hpp" + +using namespace unitree::robot::g1; + +int main(int argc, const char** argv) +{ + std::cout << " --- Unitree Robotics --- \n"; + std::cout << " G1 Arm Action Example \n\n"; + + // Unitree DDS Initialization; arg[1] is the network interface + unitree::robot::ChannelFactory::Instance()->Init(0, argc > 1 ? argv[1] : ""); + + auto client = std::make_shared(); + client->Init(); + client->SetTimeout(10.f); // All actions will last less than 10 seconds. + + std::cout << "Usage: \n"; + std::cout << " - 0: print supported actions.\n"; + std::cout << " - an id: execute an action.\n"; + std::cout << "Attention: \n"; + std::cout << " Some actions will not be displayed on the APP, \n"; + std::cout << " but can be executed by the program.\n"; + std::cout << " These actions may cause the robot to fall,\n"; + std::cout << " so please execute them with caution.\n"; + + int32_t action_id = 0; + std::string line; + while (true) { + std::cout << "\nEnter action ID: .\n"; + std::getline(std::cin, line); + try { + action_id = std::stoi(line); + } catch (const std::exception&) { + std::cout << "Invalid input. Please enter an integer.\n"; + continue; + } + + if (action_id == 0) { + std::string action_list_data; + int32_t ret = client->GetActionList(action_list_data); + if (ret != 0) { + std::cerr << "Failed to get action list, error code: " << ret << "\n"; + continue; + } + std::cout << "Available actions:\n" << action_list_data << std::endl; + } else { + int32_t ret = client->ExecuteAction(action_id); + if(ret != 0) { + switch (ret) + { + case UT_ROBOT_ARM_ACTION_ERR_ARMSDK: + std::cout << UT_ROBOT_ARM_ACTION_ERR_ARMSDK_DESC << std::endl; + break; + case UT_ROBOT_ARM_ACTION_ERR_HOLDING: + std::cout << UT_ROBOT_ARM_ACTION_ERR_HOLDING_DESC << std::endl; + break; + case UT_ROBOT_ARM_ACTION_ERR_INVALID_ACTION_ID: + std::cout << UT_ROBOT_ARM_ACTION_ERR_INVALID_ACTION_ID_DESC << std::endl; + break; + case UT_ROBOT_ARM_ACTION_ERR_INVALID_FSM_ID: + std::cout << "The actions are only supported in fsm id {500, 501, 801}" << std::endl; + std::cout << "You can subscribe the topic rt/sportmodestate to check the fsm id." << std::endl; + std::cout << "And in the state 801, the actions are only supported in the fsm mode {0, 3}." << std::endl; + std::cout << "If an error is still returned at this point, ignore this action."; + break; + default: + std::cerr << "Execute action failed, error code: " << ret << std::endl; + break; + } + } + } + } + + return 0; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_loco_client_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_loco_client_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f0aa76b3e727cbb9eab8e11bb3eebf6e367cbb4d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/high_level/g1_loco_client_example.cpp @@ -0,0 +1,267 @@ +#include +#include +#include + +#include +#include + +std::vector stringToFloatVector(const std::string &str) { + std::vector result; + std::stringstream ss(str); + float num; + while (ss >> num) { + result.push_back(num); + // ignore any trailing whitespace + ss.ignore(); + } + return result; +} + +int main(int argc, char const *argv[]) { + std::map args = {{"network_interface", "lo"}}; + + std::map values; + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg.substr(0, 2) == "--") { + size_t pos = arg.find("="); + std::string key, value; + if (pos != std::string::npos) { + key = arg.substr(2, pos - 2); + value = arg.substr(pos + 1); + + if (value.front() == '"' && value.back() == '"') { + value = value.substr(1, value.length() - 2); + } + } else { + key = arg.substr(2); + value = ""; + } + if (args.find(key) != args.end()) { + args[key] = value; + } else { + args.insert({{key, value}}); + } + } + } + + unitree::robot::ChannelFactory::Instance()->Init(0, + args["network_interface"]); + + unitree::robot::g1::LocoClient client; + + client.Init(); + client.SetTimeout(10.f); + + for (const auto &arg_pair : args) { + std::cout << "Processing command: [" << arg_pair.first << "] with param: [" + << arg_pair.second << "] ..." << std::endl; + if (arg_pair.first == "network_interface") { + continue; + } + + if (arg_pair.first == "get_fsm_id") { + int fsm_id; + client.GetFsmId(fsm_id); + std::cout << "current fsm_id: " << fsm_id << std::endl; + } + + if (arg_pair.first == "get_fsm_mode") { + int fsm_mode; + client.GetFsmMode(fsm_mode); + std::cout << "current fsm_mode: " << fsm_mode << std::endl; + } + + if (arg_pair.first == "get_balance_mode") { + int balance_mode; + client.GetBalanceMode(balance_mode); + std::cout << "current balance_mode: " << balance_mode << std::endl; + } + + if (arg_pair.first == "get_swing_height") { + float swing_height; + client.GetSwingHeight(swing_height); + std::cout << "current swing_height: " << swing_height << std::endl; + } + + if (arg_pair.first == "get_stand_height") { + float stand_height; + client.GetStandHeight(stand_height); + std::cout << "current stand_height: " << stand_height << std::endl; + } + + if (arg_pair.first == "get_phase") { + std::vector phase; + client.GetPhase(phase); + std::cout << "current phase: ("; + for (const auto &p : phase) { + std::cout << p << ", "; + } + std::cout << ")" << std::endl; + } + + if (arg_pair.first == "set_fsm_id") { + int fsm_id = std::stoi(arg_pair.second); + client.SetFsmId(fsm_id); + std::cout << "set fsm_id to " << fsm_id << std::endl; + } + + if (arg_pair.first == "set_balance_mode") { + int balance_mode = std::stoi(arg_pair.second); + client.SetBalanceMode(balance_mode); + std::cout << "set balance_mode to " << balance_mode << std::endl; + } + + if (arg_pair.first == "set_swing_height") { + float swing_height = std::stof(arg_pair.second); + client.SetSwingHeight(swing_height); + std::cout << "set swing_height to " << swing_height << std::endl; + } + + if (arg_pair.first == "set_stand_height") { + float stand_height = std::stof(arg_pair.second); + client.SetStandHeight(stand_height); + std::cout << "set stand_height to " << stand_height << std::endl; + } + + if (arg_pair.first == "set_velocity") { + std::vector param = stringToFloatVector(arg_pair.second); + auto param_size = param.size(); + float vx, vy, omega, duration; + if (param_size == 3) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + duration = 1.f; + } else if (param_size == 4) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + duration = param.at(3); + } else { + std::cerr << "Invalid param size for method SetVelocity: " << param_size + << std::endl; + return 1; + } + + client.SetVelocity(vx, vy, omega, duration); + std::cout << "set velocity to " << arg_pair.second << std::endl; + } + + if (arg_pair.first == "damp") { + client.Damp(); + } + + if (arg_pair.first == "start") { + client.Start(); + } + + if (arg_pair.first == "squat") { + client.Squat(); + } + + if (arg_pair.first == "sit") { + client.Sit(); + } + + if (arg_pair.first == "stand_up") { + client.StandUp(); + } + + if (arg_pair.first == "zero_torque") { + client.ZeroTorque(); + } + + if (arg_pair.first == "stop_move") { + client.StopMove(); + } + + if (arg_pair.first == "high_stand") { + client.HighStand(); + } + + if (arg_pair.first == "low_stand") { + client.LowStand(); + } + + if (arg_pair.first == "balance_stand") { + client.BalanceStand(); + } + + if (arg_pair.first == "continous_gait") { + bool flag; + if (arg_pair.second == "true") { + flag = true; + } else if (arg_pair.second == "false") { + flag = false; + } else { + std::cerr << "invalid argument: " << arg_pair.second << std::endl; + return 1; + } + client.ContinuousGait(flag); + } + + if (arg_pair.first == "switch_move_mode") { + bool flag; + if (arg_pair.second == "true") { + flag = true; + } else if (arg_pair.second == "false") { + flag = false; + } else { + std::cerr << "invalid argument: " << arg_pair.second << std::endl; + return 1; + } + client.SwitchMoveMode(flag); + } + + if (arg_pair.first == "move") { + std::vector param = stringToFloatVector(arg_pair.second); + auto param_size = param.size(); + float vx, vy, omega; + if (param_size == 3) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + } else { + std::cerr << "Invalid param size for method SetVelocity: " << param_size + << std::endl; + return 1; + } + client.Move(vx, vy, omega); + } + + if (arg_pair.first == "set_task_id") { + int task_id = std::stoi(arg_pair.second); + client.SetTaskId(task_id); + std::cout << "set task_id to " << task_id << std::endl; + } + + if (arg_pair.first == "shake_hand") { + client.ShakeHand(0); + std::cout << "Shake hand starts! Waiting for 10 s for ending" + << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(10)); + std::cout << "Shake hand ends!" << std::endl; + client.ShakeHand(1); + } + + if (arg_pair.first == "wave_hand") { + client.WaveHand(); + std::cout << "wave hand" << std::endl; + } + + if (arg_pair.first == "wave_hand_with_turn") { + client.WaveHand(true); + std::cout << "wave hand with turn" << std::endl; + } + + if (arg_pair.first == "set_speed_mode") { + client.SetSpeedMode(std::stoi(arg_pair.second)); + std::cout << "set speed mode" << std::endl; + } + + std::cout << "Done!" << std::endl; + } + + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/behavior_lib/motion.seq b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/behavior_lib/motion.seq new file mode 100644 index 0000000000000000000000000000000000000000..4cea0b4a1a9d043b0d37a1bda5a31640f7d7e545 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/behavior_lib/motion.seq @@ -0,0 +1,11478 @@ +type: CompositeSeq +content: BodyMotion +format_version: 4 +frame_rate: 500 +num_frames: 3817 +components: + - + type: MultiSE3Seq + content: LinkPosition + frame_rate: 500 + num_frames: 3817 + num_parts: 1 + SE3Format: XYZQWQXQYQZ + frames: + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - [ [ 0, 0, 0, 1, 0, 0, 0 ] ] + - + type: MultiValueSeq + content: JointDisplacement + frame_rate: 500 + num_frames: 3817 + num_parts: 14 + frames: + - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] + - [ 7.87320505e-05, 5.98446915e-05, -0.000137732802, -0.000162916933, 0.000334613185, 0.000204073727, -9.2719622e-06, 7.90681158e-05, -6.02467397e-05, 0.000138020198, -0.000163261914, -0.000334461051, 0.00020465349, 9.18847926e-06 ] + - [ 0.000312907365, 0.000238007017, -0.000546440173, -0.000646037799, 0.00132764901, 0.000809023587, -3.6313292e-05, 0.000314239289, -0.00023959673, 0.000547579175, -0.000647398329, -0.00132704643, 0.000811318674, 3.59819297e-05 ] + - [ 0.000699494685, 0.000532429354, -0.00121938556, -0.0014409177, 0.00296290189, 0.0018039426, -7.99621541e-05, 0.000702463757, -0.000535964628, 0.00122192451, -0.00144393526, -0.00296155946, 0.00180905263, 7.92223704e-05 ] + - [ 0.00123546276, 0.000941054079, -0.0021498324, -0.00253911174, 0.00522416622, 0.00317792379, -0.000139056713, 0.00124069176, -0.00094726509, 0.00215430378, -0.00254439871, -0.00522180349, 0.00318691242, 0.00013775182 ] + - [ 0.00191778032, 0.00146182357, -0.00333104414, -0.00393217502, 0.00809523642, 0.00492006018, -0.000212435135, 0.00192587353, -0.00147141277, 0.00333796455, -0.0039403147, -0.00809158184, 0.00493395512, 0.000210412299 ] + - [ 0.00274341613, 0.0020926802, -0.00475628423, -0.00561166264, 0.0115599069, 0.00701944478, -0.000298935582, 0.00275495932, -0.00210632234, 0.00476615442, -0.00562320924, -0.0115546978, 0.00703923782, 0.000296045824 ] + - [ 0.00370933891, 0.00283156635, -0.00641881612, -0.00756912971, 0.0156019721, 0.00946517062, -0.000397396222, 0.00372489935, -0.00284990843, 0.00643212095, -0.00758460834, -0.0155949548, 0.00949181757, 0.000393494416 ] + - [ 0.00481251742, 0.0036764244, -0.00831190325, -0.00979613133, 0.0202052263, 0.0122463307, -0.000506655217, 0.00483264387, -0.00370008572, 0.00832911172, -0.00981603801, -0.0201961562, 0.0122807515, 0.000501600093 ] + - [ 0.0060499204, 0.00462519672, -0.0104288091, -0.0122842226, 0.0253534641, 0.0153520181, -0.000625550734, 0.00607514312, -0.00465476886, 0.0104503743, -0.0123090243, -0.0253421052, 0.0153950965, 0.000619204875 ] + - [ 0.00741851659, 0.00567582569, -0.012762797, -0.0150249586, 0.0310304797, 0.0187713258, -0.000752920936, 0.00744934733, -0.00571187251, 0.0127891563, -0.0150550931, -0.0310166051, 0.0188239099, 0.000745150779 ] + - [ 0.00891527473, 0.00682625369, -0.0153071305, -0.0180098945, 0.0372200677, 0.0224933468, -0.000887603988, 0.00895220674, -0.00686931131, 0.0153387052, -0.0180457706, -0.0372034594, 0.0225562486, 0.000878279827 ] + - [ 0.0105371636, 0.0080744231, -0.018055073, -0.0212305853, 0.0439060224, 0.0265071741, -0.00102843806, 0.0105806716, -0.00812499994, 0.0180922687, -0.0212725826, -0.0438864714, 0.0265811698, 0.00101743404 ] + - [ 0.0122811519, 0.00941827628, -0.020999888, -0.0246785862, 0.0510721382, 0.0308019008, -0.0011742613, 0.0123316921, -0.00947685304, 0.0210430944, -0.0247270554, -0.0510494443, 0.0308877304, 0.00116145543 ] + - [ 0.0141442083, 0.0108557556, -0.0241348389, -0.0283454523, 0.0587022096, 0.0353666199, -0.0013239119, 0.0142022186, -0.0109227853, 0.0241844297, -0.0284007147, -0.0586761816, 0.0354649876, 0.00130918601 ] + - [ 0.0161233017, 0.0123848035, -0.0274531892, -0.0322227386, 0.0667800309, 0.0401904243, -0.001476228, 0.0161892012, -0.0124607113, 0.0275095223, -0.0322850867, -0.0667504865, 0.0403019985, 0.00145946782 ] + - [ 0.0182154008, 0.0140033623, -0.0309482022, -0.0363020003, 0.0752893966, 0.0452624072, -0.00163004778, 0.0182895902, -0.0140885458, 0.0310116198, -0.0363716974, -0.0752561624, 0.0453878201, 0.00161114287 ] + - [ 0.0204174743, 0.0157093744, -0.0346131415, -0.0405747924, 0.084214101, 0.0505716616, -0.00178420939, 0.0205003358, -0.0158042034, 0.0346839697, -0.0406520727, -0.0841770127, 0.0507115094, 0.00176305317 ] + - [ 0.022726491, 0.0175007821, -0.0384412705, -0.0450326702, 0.0935379386, 0.0561072804, -0.00193755101, 0.0228183883, -0.0176055987, 0.0385198196, -0.0451177387, -0.0934968405, 0.0562621236, 0.00191404074 ] + - [ 0.0251394195, 0.0193755279, -0.0424258527, -0.0496671886, 0.103244704, 0.0618583567, -0.0020889108, 0.0252406979, -0.0194906465, 0.0425124171, -0.0497602215, -0.103199449, 0.0620287198, 0.00206294762 ] + - [ 0.0276532287, 0.0213315541, -0.0465601514, -0.0544699027, 0.113318191, 0.0678139834, -0.00223712692, 0.0277642149, -0.0214572613, 0.0466550097, -0.0545710469, -0.113268643, 0.068000355, 0.0022086158 ] + - [ 0.0302648873, 0.0233668031, -0.0508374301, -0.0594323678, 0.123742195, 0.0739632538, -0.00238103754, 0.0303858894, -0.0235033579, 0.0509408451, -0.0595417411, -0.123688223, 0.0741660862, 0.00234988732 ] + - [ 0.032971364, 0.0254792173, -0.0552509523, -0.0645461388, 0.134500509, 0.0802952606, -0.00251948083, 0.0331026718, -0.0256268508, 0.0553631709, -0.06466383, -0.134441995, 0.0805149706, 0.00248560419 ] + - [ 0.0357696276, 0.027666739, -0.0597939814, -0.069802771, 0.145576929, 0.0867990971, -0.00265129494, 0.0359115122, -0.0278256548, 0.0599152345, -0.0699288396, -0.145513762, 0.0870360653, 0.00261460843 ] + - [ 0.0386566469, 0.0299273107, -0.0644597809, -0.0751938193, 0.156955248, 0.0934638561, -0.00277531804, 0.038809361, -0.0300976845, 0.0645902835, -0.075328296, -0.156887325, 0.0937184272, 0.00273574206 ] + - [ 0.0416293905, 0.0322588747, -0.0692416142, -0.0807108389, 0.168619261, 0.100278631, -0.0028903883, 0.0417931682, -0.0324408546, 0.0693815657, -0.0808537252, -0.16854649, 0.100551113, 0.0028478471 ] + - [ 0.0446848272, 0.0346593733, -0.0741327447, -0.0863453848, 0.180552763, 0.107232514, -0.00299534389, 0.0448598843, -0.0348530797, 0.0742823284, -0.0864966532, -0.180475059, 0.107523181, 0.00294976557 ] + - [ 0.0478199257, 0.037126749, -0.0791264359, -0.0920890123, 0.192739547, 0.114314599, -0.00308902296, 0.0480064594, -0.0373322744, 0.0792858194, -0.0922486059, -0.192656836, 0.114623688, 0.00304033948 ] + - [ 0.0510316549, 0.0396589441, -0.0842159513, -0.0979332764, 0.205163409, 0.121513978, -0.00317026368, 0.0512298437, -0.0398763535, 0.0843852861, -0.0981011095, -0.205075624, 0.121841689, 0.00311841086 ] + - [ 0.0543169834, 0.0422539011, -0.0893945542, -0.103869732, 0.217808143, 0.128819746, -0.00323790422, 0.0545269875, -0.0424832316, 0.0895739762, -0.10404569, -0.217715226, 0.129166244, 0.00318282172 ] + - [ 0.0576728799, 0.0449095622, -0.0946555082, -0.109889935, 0.230657542, 0.136220994, -0.00329078273, 0.057894841, -0.0451508233, 0.0948451372, -0.110073873, -0.230559446, 0.136586408, 0.00323241409 ] + - [ 0.0610963133, 0.04762387, -0.0999920767, -0.115985439, 0.243695402, 0.143706815, -0.0033277374, 0.0613303545, -0.0478770433, 0.100192017, -0.116177185, -0.243592086, 0.144091239, 0.00326602998 ] + - [ 0.0645842523, 0.0503947666, -0.105397523, -0.122147801, 0.256905517, 0.151266304, -0.00334760638, 0.0648304783, -0.0506598063, 0.105607862, -0.122347152, -0.256796952, 0.151669794, 0.00328251142 ] + - [ 0.0681336656, 0.0532201946, -0.110865111, -0.128368574, 0.270271681, 0.158888552, -0.00334922783, 0.0683921624, -0.0534970269, 0.111085922, -0.1285753, -0.270157844, 0.15931113, 0.00328070041 ] + - [ 0.0717415219, 0.0560980963, -0.116388103, -0.134639315, 0.283777689, 0.166562653, -0.00333143992, 0.0720123573, -0.0563866198, 0.116619442, -0.134853154, -0.283658568, 0.167004304, 0.00325943899 ] + - [ 0.0754047901, 0.059026414, -0.121959764, -0.140951578, 0.297407335, 0.1742777, -0.00329308081, 0.075688013, -0.0593264996, 0.122201671, -0.141172242, -0.297282926, 0.174738373, 0.00321756916 ] + - [ 0.0791204387, 0.0620030902, -0.127573357, -0.147296919, 0.311144414, 0.182022786, -0.00323298868, 0.07941608, -0.0623145809, 0.127825857, -0.147524088, -0.311014722, 0.182502394, 0.00315393295 ] + - [ 0.0828854367, 0.0650260673, -0.133222144, -0.153666892, 0.324972719, 0.189787003, -0.00315000168, 0.0831935083, -0.0653487786, 0.133485247, -0.15390022, -0.324837758, 0.190285425, 0.00306737238 ] + - [ 0.0866967527, 0.0680932875, -0.138899391, -0.160053052, 0.338876046, 0.197559445, -0.00304295798, 0.0870172483, -0.0684270071, 0.139173088, -0.160292162, -0.338735839, 0.198076522, 0.00295672947 ] + - [ 0.0905513555, 0.0712026933, -0.144598359, -0.166446956, 0.352838188, 0.205329206, -0.00291069575, 0.0908842501, -0.0715471812, 0.144882629, -0.166691441, -0.352692768, 0.205864742, 0.00282084623 ] + - [ 0.0944462138, 0.0743522271, -0.150312313, -0.172840157, 0.366842941, 0.213085377, -0.00275205314, 0.0947914641, -0.0747072155, 0.150607116, -0.173089583, -0.366692348, 0.213639142, 0.00265856468 ] + - [ 0.0983782963, 0.0775398312, -0.156034515, -0.179224211, 0.380874098, 0.220817052, -0.00256586833, 0.0987358404, -0.0779050246, 0.156339797, -0.179478114, -0.380718382, 0.221388781, 0.00246872685 ] + - [ 0.102344572, 0.0807634481, -0.16175823, -0.185590673, 0.394915455, 0.228513324, -0.00235097947, 0.102714329, -0.0811385233, 0.16207392, -0.18584856, -0.394754673, 0.229102713, 0.00225017475 ] + - [ 0.106342009, 0.08402102, -0.167476721, -0.191931099, 0.408950804, 0.236163286, -0.00210622474, 0.106723881, -0.0844056262, 0.167802733, -0.192192447, -0.408785026, 0.236769998, 0.0020017504 ] + - [ 0.110367577, 0.0873104894, -0.173183251, -0.198237042, 0.422963942, 0.243756031, -0.0018304423, 0.110761446, -0.0877042479, 0.173519482, -0.198501301, -0.422793243, 0.244379691, 0.00172229582 ] + - [ 0.114418244, 0.0906297986, -0.178871084, -0.204500059, 0.436938661, 0.251280652, -0.00152247031, 0.114823974, -0.0910323031, 0.179217417, -0.204766648, -0.436763127, 0.25192085, 0.00141065303 ] + - [ 0.118490979, 0.0939768901, -0.184533483, -0.210711704, 0.450858758, 0.258726243, -0.00118114693, 0.118908416, -0.0943877065, 0.184889783, -0.210980015, -0.450678483, 0.259382532, 0.00106566405 ] + - [ 0.122582751, 0.0973497061, -0.190163712, -0.216863533, 0.464708025, 0.266081895, -0.000805310342, 0.123011721, -0.0977683727, 0.190529829, -0.217132926, -0.464523113, 0.266753794, 0.000686170894 ] + - [ 0.126690528, 0.100746189, -0.195755034, -0.222947101, 0.478470257, 0.273336702, -0.000393798698, 0.127130841, -0.101172216, 0.196130803, -0.223216908, -0.47828082, 0.274023693, 0.000271015586 ] + - [ 0.130811279, 0.104164282, -0.201300712, -0.228953962, 0.49212925, 0.280479757, 5.45498337e-05, 0.131262724, -0.104597152, 0.201685951, -0.229223487, -0.491935409, 0.281181286, -0.000180959856 ] + - [ 0.134941974, 0.107601926, -0.20679401, -0.234875672, 0.505668797, 0.287500154, 0.000540897089, 0.135404322, -0.108041095, 0.207188522, -0.235144189, -0.505470681, 0.288215631, -0.000670913413 ] + - [ 0.13907958, 0.111057064, -0.212228191, -0.240703786, 0.519072692, 0.294386985, 0.0010664049, 0.139552585, -0.111501959, 0.212631763, -0.24097054, -0.518870442, 0.295115783, -0.00120000307 ] + - [ 0.143221066, 0.114527639, -0.217596519, -0.246429859, 0.53232473, 0.301129342, 0.00163223511, 0.143704463, -0.114977659, 0.218008921, -0.246694067, -0.532118493, 0.301870801, -0.0017693868 ] + - [ 0.147363402, 0.118011592, -0.222892258, -0.252045446, 0.545408706, 0.30771632, 0.00223954955, 0.147856906, -0.11846611, 0.223313245, -0.252306294, -0.545198639, 0.308469742, -0.00238022259 ] + - [ 0.151503556, 0.121506867, -0.22810867, -0.257542103, 0.558308414, 0.314137012, 0.00288951005, 0.152006865, -0.121965226, 0.228537981, -0.257798749, -0.558094683, 0.314901662, -0.00303366842 ] + - [ 0.155638496, 0.125011405, -0.23323902, -0.262911384, 0.571007648, 0.320380509, 0.00358327845, 0.156151289, -0.125472922, 0.233676378, -0.263162957, -0.570790427, 0.321155618, -0.00373088227 ] + - [ 0.159765192, 0.12852315, -0.23827657, -0.268144844, 0.583490203, 0.326435906, 0.00432201659, 0.16028713, -0.128987113, 0.238721683, -0.268390443, -0.583269676, 0.327220668, -0.00447302212 ] + - [ 0.163880612, 0.132040043, -0.243214584, -0.273234039, 0.595739872, 0.332292295, 0.00510688629, 0.164411336, -0.132505714, 0.243667143, -0.273472735, -0.595516232, 0.333085869, -0.00526124595 ] + - [ 0.167981724, 0.135560026, -0.248046325, -0.278170524, 0.607740452, 0.337938769, 0.0059390494, 0.168520859, -0.136026638, 0.248506006, -0.278401359, -0.6075139, 0.338740277, -0.00609671175 ] + - [ 0.172065499, 0.139081043, -0.252765058, -0.282945853, 0.619475735, 0.343364421, 0.00681966775, 0.172612648, -0.139547801, 0.25323152, -0.283167839, -0.619246481, 0.344172951, -0.00698057749 ] + - [ 0.176128904, 0.142601035, -0.257364045, -0.287551582, 0.630929516, 0.348558345, 0.00774990318, 0.176683654, -0.143067118, 0.257836932, -0.287763702, -0.630697781, 0.349372946, -0.00791400116 ] + - [ 0.180168908, 0.146117945, -0.261836549, -0.291979266, 0.642085591, 0.353509634, 0.00873091752, 0.180730828, -0.146582502, 0.26231549, -0.292180475, -0.641851601, 0.354329321, -0.00889814073 ] + - [ 0.184182479, 0.149629715, -0.266175835, -0.296220461, 0.652927752, 0.358207379, 0.0097638726, 0.184751119, -0.15009187, 0.266660442, -0.296409683, -0.652691746, 0.359031131, -0.00993415419 ] + - [ 0.188183214, 0.153147926, -0.270405548, -0.300291388, 0.663515289, 0.362675975, 0.0108553193, 0.18875816, -0.153606785, 0.27089546, -0.300467496, -0.663277494, 0.363502783, -0.0110286094 ] + - [ 0.192267887, 0.156752068, -0.274702319, -0.30433456, 0.674287262, 0.367119768, 0.0120372626, 0.19284905, -0.157206814, 0.275197434, -0.304496281, -0.674047803, 0.367948896, -0.0122136325 ] + - [ 0.196450211, 0.160453017, -0.279092552, -0.308373739, 0.685308838, 0.371571977, 0.0133124417, 0.197037558, -0.160902862, 0.279592811, -0.308519806, -0.685067821, 0.372402751, -0.0134919802 ] + - [ 0.20072728, 0.164247976, -0.283572388, -0.312408346, 0.696569948, 0.376030902, 0.0146780414, 0.201320775, -0.164692155, 0.284077731, -0.312537528, -0.696327476, 0.376862666, -0.0148608341 ] + - [ 0.205096185, 0.168134152, -0.28813797, -0.3164378, 0.708060521, 0.380494846, 0.0161312464, 0.205695791, -0.168571919, 0.288648337, -0.316548902, -0.707816695, 0.38132696, -0.0163173753 ] + - [ 0.20955402, 0.17210875, -0.292785438, -0.320461524, 0.719770486, 0.384962109, 0.0176692413, 0.210159698, -0.172539381, 0.293300768, -0.320553383, -0.719525404, 0.385793951, -0.0178587853 ] + - [ 0.214097878, 0.176168975, -0.297510934, -0.324478939, 0.731689774, 0.389430995, 0.0192892107, 0.214709586, -0.176591767, 0.298031168, -0.324550428, -0.731443533, 0.390261957, -0.0194822454 ] + - [ 0.21872485, 0.180312032, -0.3023106, -0.328489465, 0.743808313, 0.393899803, 0.0209883394, 0.219342548, -0.180726303, 0.302835677, -0.328539491, -0.743561007, 0.394729297, -0.0211849368 ] + - [ 0.22343203, 0.184535127, -0.307180577, -0.332492523, 0.756116033, 0.398366837, 0.022763812, 0.224055673, -0.184940215, 0.307710437, -0.33252003, -0.755867755, 0.399194289, -0.0229640409 ] + - [ 0.22821651, 0.188835466, -0.312117007, -0.336487535, 0.768602864, 0.402830397, 0.0246128131, 0.228846053, -0.189230728, 0.312651588, -0.336491498, -0.768353704, 0.403655251, -0.024816739 ] + - [ 0.233075383, 0.193210254, -0.317116031, -0.340473922, 0.781258736, 0.407288785, 0.0265325274, 0.23371078, -0.193595071, 0.317655272, -0.340453353, -0.781008781, 0.408110502, -0.0267402126 ] + - [ 0.238005742, 0.197656695, -0.322173791, -0.344451103, 0.794073577, 0.411740302, 0.0285201396, 0.238646943, -0.198030468, 0.322717632, -0.344405049, -0.793822914, 0.412558359, -0.0287316428 ] + - [ 0.243004679, 0.202171996, -0.327286428, -0.348418502, 0.807037318, 0.416183251, 0.0305728344, 0.243651635, -0.202534145, 0.327834807, -0.348346042, -0.806786029, 0.416997142, -0.0307882111 ] + - [ 0.248069287, 0.206753362, -0.332450084, -0.352375538, 0.820139888, 0.420615934, 0.0326877963, 0.248721946, -0.20710333, 0.333002939, -0.352275789, -0.819888055, 0.421425168, -0.0329070987 ] + - [ 0.253196658, 0.211397998, -0.3376609, -0.356321632, 0.833371217, 0.42503665, 0.0348622101, 0.253854967, -0.211735247, 0.33821817, -0.356193744, -0.833118919, 0.425840757, -0.035085487 ] + - [ 0.258383886, 0.21610311, -0.342915019, -0.360256206, 0.846721234, 0.429443703, 0.0370932605, 0.25904779, -0.216427124, 0.343476641, -0.360099363, -0.846468548, 0.430242225, -0.0373205573 ] + - [ 0.263628062, 0.220865903, -0.34820858, -0.364178681, 0.860179869, 0.433835394, 0.039378132, 0.264297506, -0.221176186, 0.348774494, -0.363992102, -0.85992687, 0.434627892, -0.0396094909 ] + - [ 0.26892628, 0.225683582, -0.353537727, -0.368088477, 0.873737051, 0.438210024, 0.0417140093, 0.269601205, -0.22597966, 0.354107869, -0.367871416, -0.873483812, 0.438996076, -0.0419494692 ] + - [ 0.274275632, 0.230553352, -0.358898601, -0.371985016, 0.88738271, 0.442565895, 0.0440980771, 0.274955979, -0.230834772, 0.359472908, -0.371736762, -0.887129301, 0.443345096, -0.0443376735 ] + - [ 0.279673211, 0.23547242, -0.364287342, -0.375867718, 0.901106776, 0.446901308, 0.0465275202, 0.280358919, -0.235738747, 0.364865752, -0.375587595, -0.900853264, 0.447673269, -0.0467712852 ] + - [ 0.28511611, 0.24043799, -0.369700093, -0.379736005, 0.914899178, 0.451214566, 0.048999523, 0.285807115, -0.240688812, 0.370282543, -0.37942337, -0.91464563, 0.451978913, -0.0492474855 ] + - [ 0.29060142, 0.245447268, -0.375132996, -0.383589298, 0.928749846, 0.45550397, 0.0515112703, 0.29129766, -0.245682194, 0.375719423, -0.383243543, -0.928496326, 0.456260348, -0.0517634557 ] + - [ 0.296126236, 0.250497459, -0.380582191, -0.387427018, 0.942648708, 0.459767822, 0.0540599468, 0.296827644, -0.250716118, 0.381172531, -0.38704757, -0.942395278, 0.460515892, -0.0543163773 ] + - [ 0.301687649, 0.255585769, -0.38604382, -0.391248585, 0.956585696, 0.464004422, 0.0566427371, 0.302394157, -0.255787811, 0.386638011, -0.390834907, -0.956332415, 0.464743862, -0.0569034315 ] + - [ 0.307282752, 0.260709403, -0.391514025, -0.39505342, 0.970550738, 0.468212073, 0.0592568258, 0.307994292, -0.260894498, 0.392112003, -0.394605009, -0.970297663, 0.468942578, -0.0595217997 ] + - [ 0.312908638, 0.265865566, -0.396988947, -0.398840946, 0.984533764, 0.472389077, 0.0618993977, 0.31362514, -0.266033406, 0.397590648, -0.398357331, -0.984280951, 0.473110357, -0.0621686632 ] + - [ 0.318562399, 0.271051463, -0.402464729, -0.402610582, 0.998524704, 0.476533734, 0.0645676374, 0.31928379, -0.271201761, 0.403070088, -0.40209133, -0.998272205, 0.477245518, -0.0648412034 ] + - [ 0.324241128, 0.276264301, -0.40793751, -0.40636175, 1.01251349, 0.480644347, 0.0672587295, 0.324967336, -0.27639679, 0.408546464, -0.405806461, -1.01226135, 0.48134638, -0.0675366014 ] + - [ 0.329941918, 0.281501284, -0.413403434, -0.410093871, 1.02649004, 0.484719218, 0.0699698587, 0.330672866, -0.281615718, 0.414015918, -0.40950218, -1.02623832, 0.485411259, -0.0702520388 ] + - [ 0.335661862, 0.286759618, -0.418858641, -0.413806365, 1.0404443, 0.488756647, 0.0726982097, 0.336397474, -0.286855771, 0.419474591, -0.413177942, -1.04019304, 0.489438476, -0.0729846968 ] + - [ 0.341398052, 0.292036508, -0.424299273, -0.417498655, 1.05436619, 0.492754936, 0.0754409672, 0.342138249, -0.292114176, 0.424918624, -0.416833204, -1.05411543, 0.493426348, -0.0757317567 ] + - [ 0.34714758, 0.29732916, -0.429721471, -0.42117016, 1.06824564, 0.496712388, 0.0781953157, 0.347892283, -0.297388159, 0.430344158, -0.42046742, -1.06799543, 0.497373193, -0.0784903998 ] + - [ 0.35290754, 0.302634778, -0.435121378, -0.424820302, 1.08207258, 0.500627303, 0.08095844, 0.353656666, -0.302674946, 0.435747336, -0.424080046, -1.08182296, 0.501277331, -0.0812578076 ] + - [ 0.358675024, 0.307950569, -0.440495134, -0.428448501, 1.09583695, 0.504497983, 0.0837275247, 0.359428491, -0.307971763, 0.441124297, -0.427670538, -1.09558795, 0.505137078, -0.0840311613 ] + - [ 0.364447124, 0.313273738, -0.445838881, -0.43205418, 1.10952866, 0.508322731, 0.0864997545, 0.365204848, -0.313275837, 0.446471185, -0.431238352, -1.10928032, 0.508950754, -0.0868076423 ] + - [ 0.370220934, 0.318601489, -0.451148761, -0.435636758, 1.12313765, 0.512099846, 0.0892723141, 0.370982828, -0.318584393, 0.451784139, -0.434782944, -1.12289001, 0.512716677, -0.0895844318 ] + - [ 0.375993546, 0.323931029, -0.456420915, -0.439195658, 1.13665385, 0.515827632, 0.092042388, 0.376759522, -0.323894658, 0.457059302, -0.438303768, -1.13640693, 0.516433165, -0.0923587113 ] + - [ 0.381762053, 0.329259563, -0.461651485, -0.442730299, 1.1500672, 0.51950439, 0.094807161, 0.382532021, -0.329203858, 0.462292814, -0.441800281, -1.14982103, 0.520098536, -0.095127662 ] + - [ 0.387523547, 0.334584296, -0.466836612, -0.446240103, 1.1633676, 0.523128421, 0.0975638178, 0.388297417, -0.334509219, 0.467480818, -0.445271939, -1.16312222, 0.523711109, -0.0978884652 ] + - [ 0.393275121, 0.339902434, -0.471972438, -0.449724491, 1.17654501, 0.526698027, 0.100309543, 0.3940528, -0.339807966, 0.472619454, -0.448718196, -1.17630043, 0.527269203, -0.100638302 ] + - [ 0.399013868, 0.345211181, -0.477055105, -0.453182884, 1.18958935, 0.53021151, 0.103041521, 0.399795261, -0.345097328, 0.477704863, -0.452138509, -1.18934559, 0.530771135, -0.103374355 ] + - [ 0.40473688, 0.350507744, -0.482080753, -0.456614703, 1.20249054, 0.53366717, 0.105756937, 0.405521893, -0.350374529, 0.482733188, -0.455532333, -1.20224763, 0.534215223, -0.106093804 ] + - [ 0.41044125, 0.355789327, -0.487045525, -0.460019369, 1.21523852, 0.537063311, 0.108452975, 0.411229785, -0.355636795, 0.487700569, -0.458899124, -1.21499647, 0.537599787, -0.108793831 ] + - [ 0.416124071, 0.361053136, -0.491945562, -0.463396303, 1.22782321, 0.540398233, 0.11112682, 0.416916028, -0.360881354, 0.492603148, -0.462238338, -1.22758205, 0.540923145, -0.111471617 ] + - [ 0.421782435, 0.366296377, -0.496777005, -0.466744926, 1.24023456, 0.543670238, 0.113775657, 0.422577715, -0.36610543, 0.497437067, -0.46554943, -1.23999428, 0.544183614, -0.114124343 ] + - [ 0.427413434, 0.371516255, -0.501535996, -0.470064659, 1.25246247, 0.546877627, 0.116396671, 0.428211935, -0.371306251, 0.502198465, -0.468831855, -1.25222311, 0.547379513, -0.116749192 ] + - [ 0.433014163, 0.376709974, -0.506218677, -0.473354923, 1.26449689, 0.550018703, 0.118987045, 0.433815781, -0.376481042, 0.506883486, -0.472085071, -1.26425844, 0.550509161, -0.119343343 ] + - [ 0.438581713, 0.381874742, -0.510821189, -0.476615139, 1.27632775, 0.553091767, 0.121543965, 0.439386343, -0.38162703, 0.511488269, -0.475308531, -1.27609022, 0.553570875, -0.121903979 ] + - [ 0.444113177, 0.387007762, -0.515339674, -0.479844728, 1.28794497, 0.556095121, 0.124064615, 0.444920711, -0.38674144, 0.516008958, -0.478501693, -1.28770837, 0.556562975, -0.124428282 ] + - [ 0.449605647, 0.39210624, -0.519770272, -0.483043111, 1.29933849, 0.559027065, 0.126546181, 0.450415978, -0.391821499, 0.520441692, -0.481664011, -1.29910282, 0.559483778, -0.126913431 ] + - [ 0.455056217, 0.397167382, -0.524109127, -0.48620971, 1.31049822, 0.561885902, 0.128985846, 0.455869235, -0.396864433, 0.524782613, -0.484794941, -1.31026349, 0.562331603, -0.129356608 ] + - [ 0.460461978, 0.402188393, -0.528352379, -0.489343944, 1.32141411, 0.564669934, 0.131380795, 0.461277572, -0.401867468, 0.529027863, -0.487893939, -1.32118031, 0.565104768, -0.131754996 ] + - [ 0.465820024, 0.407166479, -0.532496169, -0.492445236, 1.33207609, 0.567377461, 0.133728213, 0.46663808, -0.406827831, 0.533173583, -0.49096046, -1.33184321, 0.567801591, -0.134105775 ] + - [ 0.471127447, 0.412098844, -0.53653664, -0.495513005, 1.34247407, 0.570006786, 0.136025285, 0.471947851, -0.411742747, 0.537215915, -0.493993961, -1.34224211, 0.570420392, -0.136406126 ] + - [ 0.476381341, 0.416982694, -0.540469933, -0.498546674, 1.352598, 0.572556211, 0.138269196, 0.477203976, -0.416609443, 0.541150999, -0.496993896, -1.35236695, 0.572959487, -0.138653231 ] + - [ 0.481578796, 0.421815235, -0.544292189, -0.501545663, 1.3624378, 0.575024036, 0.140457129, 0.482403545, -0.421425145, 0.544974976, -0.499959722, -1.36220765, 0.575417196, -0.140844271 ] + - [ 0.486716907, 0.426593672, -0.547999551, -0.504509393, 1.3719834, 0.577408563, 0.14258627, 0.48754365, -0.426187079, 0.54868399, -0.502890894, -1.37175414, 0.577791836, -0.142976428 ] + - [ 0.491792766, 0.43131521, -0.551588158, -0.507437285, 1.38122473, 0.579708095, 0.144653803, 0.492621382, -0.430892471, 0.55227418, -0.505786867, -1.38099634, 0.580081727, -0.145046883 ] + - [ 0.496803465, 0.435977054, -0.555054154, -0.510328761, 1.39015172, 0.581920932, 0.146656913, 0.497633832, -0.435538547, 0.555741688, -0.508647098, -1.38992419, 0.582285186, -0.147052816 ] + - [ 0.501746098, 0.440576411, -0.558393679, -0.513183241, 1.3987543, 0.584045376, 0.148592785, 0.502578091, -0.440122534, 0.559082655, -0.511471042, -1.3985276, 0.584400532, -0.14899141 ] + - [ 0.506617756, 0.445110485, -0.561602876, -0.516000146, 1.40702239, 0.58607973, 0.150458603, 0.507451251, -0.444641658, 0.562293224, -0.514258155, -1.40679652, 0.586426082, -0.150859846 ] + - [ 0.511415533, 0.449576481, -0.564677885, -0.518778897, 1.41494594, 0.588022294, 0.152251551, 0.512250401, -0.449093144, 0.565369534, -0.517007892, -1.41472086, 0.588360157, -0.152655305 ] + - [ 0.516136521, 0.453971606, -0.567614848, -0.521518916, 1.42251487, 0.58987137, 0.153968816, 0.516972634, -0.45347422, 0.568307728, -0.51971971, -1.42229055, 0.590201073, -0.154374969 ] + - [ 0.520777813, 0.458293065, -0.570409907, -0.524219622, 1.4297191, 0.591625259, 0.155607581, 0.521615041, -0.45778211, 0.571103946, -0.522393062, -1.42949553, 0.591947149, -0.156016018 ] + - [ 0.525336501, 0.462538062, -0.573059203, -0.526880439, 1.43654857, 0.593282264, 0.15716503, 0.526174711, -0.462014042, 0.573754331, -0.525027407, -1.43632571, 0.593596703, -0.157575635 ] + - [ 0.529809678, 0.466703803, -0.575558878, -0.529500785, 1.44299321, 0.594840686, 0.15863835, 0.530648738, -0.466167242, 0.576255023, -0.527622198, -1.44277102, 0.595148054, -0.159050999 ] + - [ 0.534194438, 0.470787494, -0.577905073, -0.532080083, 1.44904294, 0.596298827, 0.160024723, 0.535034211, -0.470238935, 0.578602165, -0.530176892, -1.4488214, 0.596599521, -0.160439294 ] + - [ 0.538487871, 0.47478634, -0.58009393, -0.534617753, 1.4546877, 0.597654988, 0.161321335, 0.539328221, -0.474226348, 0.580791896, -0.532690944, -1.45446677, 0.59794942, -0.1617377 ] + - [ 0.542687072, 0.478697547, -0.582121591, -0.537113217, 1.45991742, 0.598907471, 0.162525371, 0.543527861, -0.478126707, 0.582820359, -0.53516381, -1.45969705, 0.599196072, -0.162943398 ] + - [ 0.546789132, 0.482518319, -0.583984196, -0.539565894, 1.46472202, 0.600054577, 0.163634015, 0.54763022, -0.481937238, 0.584683695, -0.537594946, -1.46450218, 0.600337793, -0.16405357 ] + - [ 0.550791145, 0.486245862, -0.585677888, -0.541975208, 1.46909143, 0.601094608, 0.164644452, 0.551632391, -0.485655168, 0.586378045, -0.539983807, -1.46887208, 0.601372903, -0.165065397 ] + - [ 0.554690203, 0.489877382, -0.587198808, -0.544340577, 1.47301559, 0.602025865, 0.165553867, 0.555531463, -0.489277722, 0.58789955, -0.542329849, -1.47279668, 0.602299719, -0.16597606 ] + - [ 0.558483399, 0.493410083, -0.588543097, -0.546661425, 1.47648443, 0.602846652, 0.166359444, 0.559324529, -0.492802127, 0.589244353, -0.544632527, -1.47626591, 0.603116561, -0.166782741 ] + - [ 0.562167825, 0.496841172, -0.589706898, -0.54893717, 1.47948786, 0.603555267, 0.167058367, 0.563008679, -0.496225608, 0.590408594, -0.546891298, -1.47926969, 0.603821745, -0.167482622 ] + - [ 0.565740574, 0.500167853, -0.590686351, -0.551167235, 1.48201584, 0.604150015, 0.167647822, 0.566581004, -0.499545393, 0.591388415, -0.549105617, -1.48179795, 0.604413592, -0.168072882 ] + - [ 0.569198739, 0.503387333, -0.591477598, -0.553351041, 1.48405827, 0.604629196, 0.168124994, 0.570038595, -0.502758707, 0.592179956, -0.551274939, -1.48384062, 0.604890419, -0.168550705 ] + - [ 0.572539412, 0.506496815, -0.592076781, -0.555488008, 1.4856051, 0.604991111, 0.168487066, 0.573378544, -0.505862776, 0.59277936, -0.553398721, -1.48538763, 0.605250543, -0.16891327 ] + - [ 0.575759686, 0.509493507, -0.592480041, -0.557577557, 1.48664624, 0.605234063, 0.168731224, 0.576597942, -0.508854826, 0.593182768, -0.555476417, -1.4864289, 0.605492285, -0.16915776 ] + - [ 0.578856654, 0.512374612, -0.59268352, -0.55961911, 1.48717164, 0.605356352, 0.168854652, 0.579693879, -0.511732085, 0.593386321, -0.557507484, -1.48695437, 0.605613962, -0.169281355 ] + - [ 0.581837153, 0.515146673, -0.59269541, -0.561614707, 1.48722766, 0.605366374, 0.168864523, 0.582673195, -0.514501059, 0.593398202, -0.559493908, -1.4870104, 0.605623865, -0.169291238 ] + - [ 0.584758007, 0.517864117, -0.592586088, -0.563579776, 1.48714697, 0.605323785, 0.168819254, 0.585592732, -0.517215863, 0.593288736, -0.561450604, -1.48692978, 0.605580955, -0.169245884 ] + - [ 0.58762928, 0.520536566, -0.592368688, -0.565517103, 1.48698647, 0.60523903, 0.16872933, 0.58846256, -0.519886063, 0.59307105, -0.563380261, -1.48676941, 0.605495564, -0.169155795 ] + - [ 0.590451436, 0.523164441, -0.592044509, -0.567426883, 1.48674706, 0.605112554, 0.168595396, 0.591283143, -0.522512073, 0.592746443, -0.565283067, -1.4865302, 0.605368138, -0.169021612 ] + - [ 0.593224934, 0.525748164, -0.591614848, -0.569309314, 1.48642966, 0.604944798, 0.168418092, 0.594054943, -0.525094311, 0.592316215, -0.56715921, -1.48621306, 0.605199125, -0.168843981 ] + - [ 0.595950236, 0.528288156, -0.591081003, -0.571164594, 1.48603517, 0.604736205, 0.168198062, 0.596778423, -0.527633191, 0.591781667, -0.569008877, -1.4858189, 0.604988972, -0.168623544 ] + - [ 0.598627804, 0.530784838, -0.590444273, -0.57299292, 1.4855645, 0.604487218, 0.167935949, 0.599454046, -0.530129131, 0.591144098, -0.570832258, -1.48534862, 0.604738126, -0.168360946 ] + - [ 0.6012581, 0.53323863, -0.589705955, -0.574794489, 1.48501857, 0.604198279, 0.167632394, 0.602082274, -0.532582545, 0.590404808, -0.572629539, -1.48480314, 0.604447035, -0.168056829 ] + - [ 0.603841584, 0.535649955, -0.588867348, -0.576569498, 1.48439828, 0.603869831, 0.16728804, 0.60466357, -0.53499385, 0.589565096, -0.57440091, -1.48418337, 0.604116145, -0.167711839 ] + - [ 0.606378717, 0.538019233, -0.58792975, -0.578318144, 1.48370454, 0.603502316, 0.16690353, 0.607198397, -0.537363462, 0.588626263, -0.576146557, -1.48349021, 0.603745904, -0.167326618 ] + - [ 0.608869962, 0.540346884, -0.586894458, -0.580040625, 1.48293827, 0.603096177, 0.166479506, 0.609687219, -0.539691797, 0.587589608, -0.57786667, -1.48272457, 0.60333676, -0.16690181 ] + - [ 0.61131578, 0.542633332, -0.585762771, -0.581737138, 1.48210037, 0.602651858, 0.166016611, 0.612130496, -0.54197927, 0.586456431, -0.579561436, -1.48188736, 0.602889158, -0.166438058 ] + - [ 0.613716631, 0.544878995, -0.584535987, -0.58340788, 1.48119175, 0.602169799, 0.165515487, 0.614528694, -0.544226298, 0.585228033, -0.581231042, -1.4809795, 0.602403547, -0.165936007 ] + - [ 0.616072979, 0.547084296, -0.583215404, -0.585053049, 1.48021333, 0.601650445, 0.164976777, 0.616882274, -0.546433296, 0.583905712, -0.582875678, -1.48000189, 0.601880373, -0.165396301 ] + - [ 0.618385282, 0.549249655, -0.58180232, -0.586672841, 1.479166, 0.601094238, 0.164401123, 0.619191698, -0.548600681, 0.582490768, -0.584495531, -1.47895543, 0.601320084, -0.164819582 ] + - [ 0.620654005, 0.551375493, -0.580298033, -0.588267454, 1.47805069, 0.60050162, 0.163789168, 0.621457431, -0.550728868, 0.580984502, -0.586090789, -1.47784104, 0.600723127, -0.164206495 ] + - [ 0.622879606, 0.553462233, -0.578703841, -0.589837085, 1.4768683, 0.599873034, 0.163141553, 0.623679935, -0.552818274, 0.579388214, -0.58766164, -1.47665964, 0.600089949, -0.163557683 ] + - [ 0.625062549, 0.555510294, -0.577021042, -0.591381932, 1.47561974, 0.599208922, 0.162458923, 0.625859671, -0.554869314, 0.577703203, -0.589208273, -1.47541211, 0.599420998, -0.16287379 ] + - [ 0.627203294, 0.557520098, -0.575250935, -0.592902191, 1.47430592, 0.598509728, 0.161741919, 0.627997105, -0.556882404, 0.575930768, -0.590730875, -1.47409939, 0.59871672, -0.16215546 ] + - [ 0.629302303, 0.559492065, -0.573394817, -0.59439806, 1.47292775, 0.597775893, 0.160991183, 0.630092697, -0.558857961, 0.57407221, -0.592229634, -1.47272236, 0.597977562, -0.161403336 ] + - [ 0.631360037, 0.561426618, -0.571453987, -0.595869735, 1.47148614, 0.597007862, 0.160207359, 0.632146911, -0.560796399, 0.572128829, -0.593704738, -1.47128195, 0.597203973, -0.160618062 ] + - [ 0.633376957, 0.563324176, -0.569429742, -0.597317416, 1.46998201, 0.596206075, 0.159391088, 0.63416021, -0.562698136, 0.570101924, -0.595156376, -1.46977907, 0.596396398, -0.159800281 ] + - [ 0.635353525, 0.565185162, -0.567323381, -0.598741297, 1.46841625, 0.595370976, 0.158543014, 0.636133056, -0.564563586, 0.567992796, -0.596584735, -1.46821461, 0.595555286, -0.158950638 ] + - [ 0.637290203, 0.567009996, -0.565136201, -0.600141578, 1.46678978, 0.594503007, 0.157663778, 0.638065912, -0.566393167, 0.565802744, -0.597990003, -1.4665895, 0.594681083, -0.158069776 ] + - [ 0.639187451, 0.568799099, -0.562869501, -0.601518455, 1.46510352, 0.593602612, 0.156754024, 0.639959242, -0.568187293, 0.563533067, -0.599372369, -1.46490463, 0.593774237, -0.157158339 ] + - [ 0.641045731, 0.570552892, -0.560524579, -0.602872124, 1.46335836, 0.592670232, 0.155814393, 0.641813508, -0.569946381, 0.561185067, -0.600732021, -1.46316093, 0.592835195, -0.15621697 ] + - [ 0.642865505, 0.572271797, -0.558102733, -0.604202785, 1.46155522, 0.591706311, 0.154845528, 0.643629172, -0.571670847, 0.558760041, -0.602069145, -1.46135929, 0.591864404, -0.155246314 ] + - [ 0.644647234, 0.573956234, -0.55560526, -0.605510633, 1.45969501, 0.590711291, 0.153848072, 0.645406697, -0.573361107, 0.556259292, -0.603383932, -1.45950063, 0.590862311, -0.154247013 ] + - [ 0.646391379, 0.575606625, -0.55303346, -0.606795866, 1.45777864, 0.589685614, 0.152822668, 0.647146547, -0.575017577, 0.553684117, -0.604676568, -1.45758585, 0.589829363, -0.153219712 ] + - [ 0.648098401, 0.577223391, -0.55038863, -0.608058681, 1.45580702, 0.588629723, 0.151769957, 0.648849184, -0.576640672, 0.551035818, -0.605947241, -1.45561587, 0.588766008, -0.152165054 ] + - [ 0.649768763, 0.578806952, -0.547672068, -0.609299275, 1.45378105, 0.587544062, 0.150690582, 0.650515071, -0.578230808, 0.548315693, -0.60719614, -1.4535916, 0.587672692, -0.151083683 ] + - [ 0.651402924, 0.58035773, -0.544885072, -0.610517846, 1.45170166, 0.586429072, 0.149585186, 0.652144671, -0.579788402, 0.545525043, -0.608423453, -1.45151393, 0.586549864, -0.149976242 ] + - [ 0.653001348, 0.581876146, -0.542028941, -0.611714592, 1.44956974, 0.585285196, 0.148454411, 0.653738446, -0.58131387, 0.542665168, -0.609629367, -1.44938379, 0.58539797, -0.148843376 ] + - [ 0.654564495, 0.583362621, -0.539104971, -0.612889708, 1.44738621, 0.584112876, 0.1472989, 0.655296859, -0.582807627, 0.539737367, -0.610814071, -1.44720208, 0.584217456, -0.147685728 ] + - [ 0.656092826, 0.584817576, -0.536114463, -0.614043393, 1.44515198, 0.582912557, 0.146119295, 0.656820373, -0.584270089, 0.53674294, -0.611977753, -1.44496971, 0.583008772, -0.146503941 ] + - [ 0.657586803, 0.586241432, -0.533058713, -0.615175843, 1.44286795, 0.581684679, 0.144916239, 0.658309451, -0.585701673, 0.533683187, -0.6131206, -1.44268759, 0.581772363, -0.14529866 ] + - [ 0.659046888, 0.58763461, -0.529939019, -0.616287256, 1.44053505, 0.580429686, 0.143690374, 0.659764556, -0.587102793, 0.530559408, -0.614242801, -1.44035662, 0.580508677, -0.144070528 ] + - [ 0.660473541, 0.588997532, -0.52675668, -0.617377829, 1.43815417, 0.57914802, 0.142442343, 0.661186151, -0.588473867, 0.527372903, -0.615344544, -1.43797772, 0.579218161, -0.142820188 ] + - [ 0.661867224, 0.590330617, -0.523512994, -0.61844776, 1.43572622, 0.577840125, 0.141172788, 0.662574697, -0.58981531, 0.524124971, -0.616426017, -1.4355518, 0.577901263, -0.141548285 ] + - [ 0.663228399, 0.591634289, -0.520209259, -0.619497245, 1.43325212, 0.576506442, 0.139882352, 0.663930659, -0.591127538, 0.520816913, -0.617487408, -1.43307977, 0.576558428, -0.140255462 ] + - [ 0.664557526, 0.592908967, -0.516846772, -0.620526482, 1.43073278, 0.575147414, 0.138571676, 0.665254498, -0.592410967, 0.517450027, -0.618528904, -1.43056253, 0.575190106, -0.138942363 ] + - [ 0.665855068, 0.594155072, -0.513426832, -0.621535668, 1.4281691, 0.573763484, 0.137241405, 0.666546679, -0.593666013, 0.514025615, -0.619550695, -1.42800099, 0.573796742, -0.137609631 ] + - [ 0.667121486, 0.595373026, -0.509950738, -0.622525, 1.425562, 0.572355094, 0.13589218, 0.667807662, -0.594893092, 0.510544975, -0.620552967, -1.42539607, 0.572378784, -0.13625791 ] + - [ 0.66835724, 0.59656325, -0.506419786, -0.623494676, 1.42291239, 0.570922688, 0.134524644, 0.669037912, -0.59609262, 0.507009408, -0.621535909, -1.42274866, 0.57093668, -0.134887845 ] + - [ 0.669562793, 0.597726165, -0.502835276, -0.624444892, 1.42022117, 0.569466708, 0.133139438, 0.670237891, -0.597265012, 0.503420214, -0.62249971, -1.42005969, 0.569470876, -0.133500077 ] + - [ 0.670738606, 0.598862191, -0.499198505, -0.625375847, 1.41748925, 0.567987595, 0.131737207, 0.671408062, -0.598410685, 0.499778692, -0.623444556, -1.41733005, 0.567981819, -0.132095252 ] + - [ 0.67188514, 0.599971751, -0.495510771, -0.626287736, 1.41471755, 0.566485794, 0.130318592, 0.672548888, -0.599530055, 0.496086142, -0.624370636, -1.41456067, 0.566469957, -0.130674013 ] + - [ 0.673002856, 0.601055264, -0.491773373, -0.627180759, 1.41190698, 0.564961747, 0.128884235, 0.673660831, -0.600623537, 0.492343864, -0.625278139, -1.41175244, 0.564935737, -0.129237004 ] + - [ 0.674092217, 0.602113153, -0.487987608, -0.62805511, 1.40905844, 0.563415896, 0.12743478, 0.674744354, -0.601691548, 0.488553157, -0.626167251, -1.40890628, 0.563379606, -0.127784868 ] + - [ 0.675153682, 0.603145838, -0.484154774, -0.628910989, 1.40617284, 0.561848684, 0.125970868, 0.67579992, -0.602734503, 0.484715323, -0.627038162, -1.40602309, 0.561802012, -0.126318249 ] + - [ 0.676187715, 0.60415374, -0.48027617, -0.629748592, 1.4032511, 0.560260554, 0.124493143, 0.676827992, -0.603752819, 0.480831659, -0.627891059, -1.40310379, 0.560203401, -0.12483779 ] + - [ 0.677194775, 0.605137281, -0.476353094, -0.630568117, 1.40029412, 0.558651947, 0.123002247, 0.677829033, -0.604746911, 0.476903467, -0.62872613, -1.40014928, 0.558584221, -0.123344136 ] + - [ 0.678175325, 0.606096881, -0.472386844, -0.63136976, 1.39730281, 0.557023308, 0.121498821, 0.678803505, -0.605717195, 0.472932046, -0.629543563, -1.39716048, 0.556944918, -0.12183793 ] + - [ 0.679129826, 0.607032962, -0.468378717, -0.632153719, 1.39427809, 0.555375078, 0.11998351, 0.679751872, -0.606664088, 0.468918696, -0.630343546, -1.39413829, 0.555285941, -0.120319816 ] + - [ 0.680058739, 0.607945944, -0.464330012, -0.632920191, 1.39122086, 0.5537077, 0.118456954, 0.680674595, -0.607588005, 0.464864717, -0.631126268, -1.39108361, 0.553607736, -0.118790437 ] + - [ 0.680962526, 0.608836249, -0.460242027, -0.633669373, 1.38813203, 0.552021617, 0.116919798, 0.681572139, -0.608489361, 0.460771408, -0.631891916, -1.38799737, 0.55191075, -0.117250438 ] + - [ 0.681841648, 0.609704298, -0.45611606, -0.634401463, 1.38501252, 0.550317272, 0.115372682, 0.682444965, -0.609368574, 0.45664007, -0.632640678, -1.38488047, 0.550195431, -0.115700461 ] + - [ 0.682696566, 0.610550511, -0.451953409, -0.635116658, 1.38186323, 0.548595106, 0.113816251, 0.683293536, -0.610226059, 0.452472002, -0.633372743, -1.38173381, 0.548462226, -0.11414115 ] + - [ 0.683527742, 0.611375311, -0.447755373, -0.635815155, 1.37868507, 0.546855564, 0.112251145, 0.684118316, -0.611062232, 0.448268504, -0.634088298, -1.37855831, 0.546711582, -0.11257315 ] + - [ 0.684335638, 0.612179118, -0.443523248, -0.636497151, 1.37547895, 0.545099086, 0.110678008, 0.684919767, -0.611877509, 0.444030876, -0.634787532, -1.37535488, 0.544943946, -0.110997104 ] + - [ 0.685120713, 0.612962352, -0.439258334, -0.637162844, 1.37224578, 0.543326117, 0.109097483, 0.685698351, -0.612672306, 0.439760417, -0.635470632, -1.37212442, 0.543159766, -0.109413655 ] + - [ 0.685883431, 0.613725436, -0.434961928, -0.637812431, 1.36898648, 0.541537098, 0.107510211, 0.686454533, -0.613447038, 0.435458428, -0.636137786, -1.36886785, 0.541359488, -0.107823448 ] + - [ 0.686624252, 0.61446879, -0.430635329, -0.638446108, 1.36570194, 0.539732472, 0.105916836, 0.687188773, -0.614202122, 0.431126209, -0.636789183, -1.36558607, 0.539543559, -0.106227125 ] + - [ 0.687343638, 0.615192836, -0.426279834, -0.639064074, 1.36239309, 0.537912682, 0.104317999, 0.687901536, -0.614937974, 0.426765058, -0.63742501, -1.36227999, 0.537712428, -0.104625331 ] + - [ 0.68804205, 0.615897994, -0.421896742, -0.639666525, 1.35906083, 0.536078171, 0.102714344, 0.688593284, -0.615655009, 0.422376277, -0.638045456, -1.35895052, 0.535866541, -0.10301871 ] + - [ 0.68871995, 0.616584685, -0.41748735, -0.640253659, 1.35570606, 0.534229381, 0.101106512, 0.68926448, -0.616353644, 0.417961164, -0.638650709, -1.35559857, 0.534006345, -0.101407904 ] + - [ 0.689377798, 0.617253331, -0.413052957, -0.640825674, 1.35232971, 0.532366754, 0.0994951464, 0.689915587, -0.617034295, 0.413521021, -0.639240956, -1.35222505, 0.532132288, -0.0997935584 ] + - [ 0.690016057, 0.617904352, -0.408594861, -0.641382765, 1.34893268, 0.530490734, 0.0978808897, 0.690547067, -0.617697377, 0.409057145, -0.639816386, -1.34883087, 0.530244816, -0.098176316 ] + - [ 0.690635187, 0.618538171, -0.40411436, -0.641925131, 1.34551588, 0.528601763, 0.0962643842, 0.691159383, -0.618343306, 0.404570838, -0.640377186, -1.34541694, 0.528344377, -0.0965568207 ] + - [ 0.691235651, 0.619155207, -0.399612751, -0.642452968, 1.34208022, 0.526700284, 0.0946462724, 0.691752998, -0.618972498, 0.400063399, -0.640923546, -1.34198417, 0.526431418, -0.0949357162 ] + - [ 0.691817909, 0.619755882, -0.395091334, -0.642966474, 1.33862661, 0.524786739, 0.0930271969, 0.692328375, -0.61958537, 0.395536128, -0.641455651, -1.33853346, 0.524506387, -0.0933136461 ] + - [ 0.692382423, 0.620340617, -0.390551406, -0.643465847, 1.33515595, 0.522861571, 0.0914078002, 0.692885977, -0.620182337, 0.390990325, -0.641973692, -1.33506572, 0.52256973, -0.0916912542 ] + - [ 0.692929654, 0.620909833, -0.385994265, -0.643951283, 1.33166917, 0.520925223, 0.0897887247, 0.693426266, -0.620763816, 0.38642729, -0.642477855, -1.33158187, 0.520621895, -0.0900691841 ] + - [ 0.693460063, 0.621463951, -0.381421209, -0.644422979, 1.32816716, 0.518978137, 0.0881706129, 0.693949706, -0.621330221, 0.381848322, -0.64296833, -1.32808281, 0.518663328, -0.0884480796 ] + - [ 0.693974113, 0.622003392, -0.376833536, -0.644881134, 1.32465085, 0.517020755, 0.0865541074, 0.694456758, -0.621881969, 0.377254721, -0.643445303, -1.32456945, 0.516694478, -0.0868285843 ] + - [ 0.694472264, 0.622528578, -0.372232545, -0.645325943, 1.32112113, 0.515053521, 0.0849398507, 0.694947886, -0.622419476, 0.372647788, -0.643908963, -1.3210427, 0.51471579, -0.0852113419 ] + - [ 0.694954977, 0.623039929, -0.367619533, -0.645757605, 1.31757892, 0.513076878, 0.0833284852, 0.695423553, -0.622943159, 0.368028821, -0.644359497, -1.31750347, 0.512727713, -0.0835969961 ] + - [ 0.695422715, 0.623537866, -0.362995799, -0.646176316, 1.31402513, 0.511091267, 0.0817206534, 0.695884222, -0.623453432, 0.363399121, -0.644797095, -1.31395267, 0.510730694, -0.0819861906 ] + - [ 0.695875939, 0.624022811, -0.35836264, -0.646582275, 1.31046066, 0.509097131, 0.080116998, 0.696330354, -0.623950712, 0.358759988, -0.645221944, -1.31039121, 0.508725179, -0.080379569 ] + - [ 0.696315109, 0.624495185, -0.353721355, -0.646975677, 1.30688643, 0.507094914, 0.0785181612, 0.696762414, -0.624435414, 0.354112721, -0.645634231, -1.30681999, 0.506711617, -0.0787777752 ] + - [ 0.696740687, 0.624955408, -0.349073242, -0.64735672, 1.30330335, 0.505085057, 0.0769247858, 0.697180863, -0.624907956, 0.349458621, -0.646034146, -1.30323993, 0.504690453, -0.0771814527 ] + - [ 0.697153136, 0.625403902, -0.344419598, -0.647725603, 1.29971233, 0.503068003, 0.0753375141, 0.697586166, -0.625368752, 0.344798986, -0.646421876, -1.29965194, 0.502662136, -0.0755912452 ] + - [ 0.697552915, 0.625841087, -0.339761722, -0.648082521, 1.29611427, 0.501044196, 0.0737569886, 0.697978783, -0.625818218, 0.340135118, -0.646797608, -1.29605692, 0.500627112, -0.0740077965 ] + - [ 0.697940487, 0.626267386, -0.335100912, -0.648427671, 1.29251009, 0.499014077, 0.0721838519, 0.698359179, -0.626256771, 0.335468315, -0.647161532, -1.29245578, 0.498585829, -0.0724317502 ] + - [ 0.698316313, 0.626683219, -0.330438467, -0.648761253, 1.2889007, 0.496978089, 0.0706187465, 0.698727816, -0.626684827, 0.330799878, -0.647513835, -1.28884943, 0.496538734, -0.07086375 ] + - [ 0.698680854, 0.627089007, -0.325775683, -0.649083461, 1.285287, 0.494936675, 0.0690623148, 0.699085156, -0.627102801, 0.326131106, -0.647854705, -1.28523879, 0.494486274, -0.0693044397 ] + - [ 0.699034571, 0.62748517, -0.321113859, -0.649394495, 1.28166991, 0.492890277, 0.0675151994, 0.699431663, -0.627511109, 0.321463299, -0.64818433, -1.28162475, 0.492428896, -0.0677544628 ] + - [ 0.699377927, 0.627872132, -0.316454294, -0.64969455, 1.27805033, 0.490839339, 0.0659780428, 0.6997678, -0.627910168, 0.316797758, -0.648502899, -1.27800823, 0.490367048, -0.0662144631 ] + - [ 0.699711382, 0.628250311, -0.311798285, -0.649983824, 1.27442918, 0.488784302, 0.0644514874, 0.700094029, -0.628300392, 0.312135781, -0.648810598, -1.27439015, 0.488301176, -0.0646850843 ] + - [ 0.700035397, 0.62862013, -0.30714713, -0.650262515, 1.27080736, 0.48672561, 0.0629361758, 0.700410813, -0.628682199, 0.307478669, -0.649107617, -1.27077139, 0.486231728, -0.06316697 ] + - [ 0.700350435, 0.628982009, -0.302502128, -0.65053082, 1.26718579, 0.484663705, 0.0614327505, 0.700718615, -0.629056004, 0.302827722, -0.649394144, -1.26715289, 0.484159151, -0.061660764 ] + - [ 0.700656957, 0.62933637, -0.297864576, -0.650788935, 1.26356538, 0.48259903, 0.0599418539, 0.701017897, -0.629422224, 0.298184239, -0.649670365, -1.26353554, 0.482083893, -0.0601671099 ] + - [ 0.700955423, 0.629683633, -0.293235772, -0.651037059, 1.25994702, 0.480532026, 0.0584641286, 0.701309123, -0.629781273, 0.29354952, -0.64993647, -1.25992025, 0.480006399, -0.0586866515 ] + - [ 0.701246296, 0.630024221, -0.288617016, -0.651275388, 1.25633165, 0.478463138, 0.0570002171, 0.701592755, -0.630133568, 0.288924865, -0.650192646, -1.25630794, 0.477927119, -0.0572200324 ] + - [ 0.701530036, 0.630358553, -0.284009604, -0.65150412, 1.25272015, 0.476392807, 0.0555507618, 0.701869256, -0.630479525, 0.284311574, -0.650439082, -1.25269951, 0.475846498, -0.0557678963 ] + - [ 0.701807106, 0.63068705, -0.279414835, -0.651723451, 1.24911345, 0.474321477, 0.0541164053, 0.702139089, -0.63081956, 0.279710947, -0.650675965, -1.24909587, 0.473764984, -0.0543308869 ] + - [ 0.702077966, 0.631010135, -0.274834006, -0.65193358, 1.24551246, 0.472249589, 0.0526977901, 0.702402716, -0.631154088, 0.275124283, -0.650903483, -1.24549793, 0.471683024, -0.0529096478 ] + - [ 0.702343078, 0.631328228, -0.270268417, -0.652134702, 1.24191807, 0.470177587, 0.0512955586, 0.702660601, -0.631483527, 0.270552882, -0.651121825, -1.2419066, 0.469601065, -0.0515048229 ] + - [ 0.702602903, 0.63164175, -0.265719365, -0.652327017, 1.23833121, 0.468105913, 0.0499103535, 0.702913206, -0.631808291, 0.265998045, -0.651331179, -1.23832279, 0.467519555, -0.0501170557 ] + - [ 0.702857903, 0.631951122, -0.261188147, -0.65251072, 1.23475279, 0.46603501, 0.0485428171, 0.703160994, -0.632128796, 0.261461071, -0.651531732, -1.23474741, 0.465438941, -0.04874699 ] + - [ 0.703108539, 0.632256765, -0.256676063, -0.652686009, 1.2311837, 0.46396532, 0.047193592, 0.703404428, -0.632445459, 0.256943259, -0.651723672, -1.23118136, 0.463359669, -0.0473952694 ] + - [ 0.703355272, 0.632559101, -0.25218441, -0.652853082, 1.22762487, 0.461897286, 0.0458633206, 0.703643971, -0.632758696, 0.25244591, -0.651907189, -1.22762556, 0.461282188, -0.0460625376 ] + - [ 0.703598564, 0.63285855, -0.247714487, -0.653012135, 1.2240772, 0.459831351, 0.0445526455, 0.703880085, -0.633068922, 0.247970324, -0.652082468, -1.22408091, 0.459206944, -0.0447494384 ] + - [ 0.703838876, 0.633155534, -0.24326759, -0.653163366, 1.2205416, 0.457767957, 0.0432622092, 0.704113233, -0.633376553, 0.2435178, -0.6522497, -1.22054833, 0.457134384, -0.0434566154 ] + - [ 0.70407667, 0.633450473, -0.238845019, -0.653306972, 1.21701899, 0.455707547, 0.0419926542, 0.704343878, -0.633682006, 0.239089638, -0.652409071, -1.21702872, 0.455064956, -0.0421847122 ] + - [ 0.704312407, 0.633743789, -0.234448072, -0.65344315, 1.21351027, 0.453650564, 0.040744623, 0.704572483, -0.633985696, 0.234687138, -0.65256077, -1.21352299, 0.452999107, -0.0409343727 ] + - [ 0.704546548, 0.634035902, -0.230078046, -0.653572097, 1.21001634, 0.45159745, 0.0395187581, 0.704799511, -0.634288039, 0.230311599, -0.652704985, -1.21003205, 0.450937284, -0.0397062404 ] + - [ 0.704779555, 0.634327234, -0.22573624, -0.653694012, 1.20653813, 0.449548647, 0.0383157019, 0.705025424, -0.634589452, 0.225964323, -0.652841903, -1.20655682, 0.448879934, -0.0385009592 ] + - [ 0.705011889, 0.634618207, -0.221423951, -0.65380909, 1.20307654, 0.447504599, 0.037136097, 0.705250685, -0.634890349, 0.221646607, -0.652971713, -1.20309819, 0.446827504, -0.0373191725 ] + - [ 0.705244012, 0.63490924, -0.217142479, -0.653917529, 1.19963248, 0.445465749, 0.0359805859, 0.705475758, -0.635191147, 0.217359753, -0.653094603, -1.19965708, 0.444780442, -0.0361615242 ] + - [ 0.705476384, 0.635200755, -0.21289312, -0.654019527, 1.19620686, 0.443432538, 0.0348498111, 0.705701104, -0.635492263, 0.21310506, -0.653210761, -1.19623439, 0.442739195, -0.035028658 ] + - [ 0.705709468, 0.635493173, -0.208677173, -0.65411528, 1.19280059, 0.441405409, 0.0337444151, 0.705927186, -0.635794111, 0.208883829, -0.653320374, -1.19283104, 0.44070421, -0.0339212175 ] + - [ 0.705943724, 0.635786916, -0.204495936, -0.654204987, 1.18941458, 0.439384805, 0.0326650403, 0.706154468, -0.636097108, 0.204697357, -0.653423632, -1.18944794, 0.438675933, -0.0328398464 ] + - [ 0.706179615, 0.636082404, -0.200350707, -0.654288843, 1.18604974, 0.437371169, 0.0316123293, 0.706383413, -0.63640167, 0.200546947, -0.653520722, -1.18608599, 0.436654814, -0.0317851884 ] + - [ 0.706417601, 0.636380058, -0.196242784, -0.654367047, 1.18270698, 0.435364944, 0.0305869247, 0.706614482, -0.636708213, 0.196433896, -0.653611831, -1.1827461, 0.434641297, -0.0307578872 ] + - [ 0.706658143, 0.6366803, -0.192173465, -0.654439795, 1.17938721, 0.433366571, 0.0295894688, 0.706848139, -0.637017153, 0.192359506, -0.653697149, -1.17942919, 0.432635832, -0.0297585864 ] + - [ 0.706901704, 0.63698355, -0.188144049, -0.654507285, 1.17609134, 0.431376494, 0.0286206042, 0.707084847, -0.637328905, 0.188325076, -0.653776862, -1.17613615, 0.430638864, -0.0287879299 ] + - [ 0.707148745, 0.63729023, -0.184155833, -0.654569715, 1.17282028, 0.429395155, 0.0276809734, 0.707325068, -0.637643885, 0.184331906, -0.65385116, -1.17286791, 0.428650841, -0.0278465612 ] + - [ 0.707399726, 0.63760076, -0.180210115, -0.65462728, 1.16957494, 0.427422996, 0.0267712189, 0.707569265, -0.63796251, 0.180381296, -0.653920229, -1.16962537, 0.426672211, -0.026935124 ] + - [ 0.70765511, 0.637915563, -0.176308194, -0.654680179, 1.16635622, 0.425460462, 0.0258919832, 0.707817902, -0.638285196, 0.176474545, -0.653984259, -1.16640943, 0.42470342, -0.0260542621 ] + - [ 0.707915358, 0.638235058, -0.172451368, -0.654728609, 1.16316504, 0.423507993, 0.0250439088, 0.70807144, -0.638612358, 0.172612954, -0.654043437, -1.16322101, 0.422744916, -0.0252046191 ] + - [ 0.70818093, 0.638559667, -0.168640934, -0.654772767, 1.16000231, 0.421566033, 0.0242276381, 0.708330343, -0.638944412, 0.168797821, -0.654097951, -1.16006102, 0.420797145, -0.0243868388 ] + - [ 0.70845229, 0.638889811, -0.164878191, -0.65481285, 1.15686894, 0.419635025, 0.0234438138, 0.708595073, -0.639281775, 0.165030448, -0.654147989, -1.15693036, 0.418860556, -0.0236015647 ] + - [ 0.708729897, 0.639225911, -0.161164436, -0.654849056, 1.15376584, 0.41771541, 0.0226930783, 0.708866093, -0.639624862, 0.161312134, -0.654193739, -1.15382995, 0.416935594, -0.0228494407 ] + - [ 0.709014214, 0.639568388, -0.157500969, -0.654881581, 1.15069391, 0.415807633, 0.021976074, 0.709143866, -0.639974089, 0.157644178, -0.65423539, -1.15076069, 0.415022709, -0.0221311103 ] + - [ 0.709305701, 0.639917664, -0.153889086, -0.654910624, 1.14765407, 0.413912134, 0.0212934436, 0.709428856, -0.640329872, 0.154027881, -0.654273129, -1.14772349, 0.413122345, -0.0214472173 ] + - [ 0.70960482, 0.640274158, -0.150330086, -0.65493638, 1.14464723, 0.412029357, 0.0206458295, 0.709721523, -0.640692627, 0.150464542, -0.654307144, -1.14471927, 0.411234952, -0.0207984053 ] + - [ 0.709912033, 0.640638293, -0.146825268, -0.654959048, 1.14167429, 0.410159745, 0.0200338741, 0.710022332, -0.641062771, 0.146955461, -0.654337624, -1.14174892, 0.409360975, -0.0201853182 ] + - [ 0.7102278, 0.64101049, -0.143375928, -0.654978825, 1.13873617, 0.408303741, 0.0194582201, 0.710331746, -0.641440718, 0.143501938, -0.654364756, -1.13881337, 0.407500863, -0.0196085994 ] + - [ 0.710552584, 0.641391169, -0.139983366, -0.654995908, 1.13583378, 0.406461785, 0.0189195099, 0.710650226, -0.641826885, 0.140105273, -0.654388728, -1.13591351, 0.405655062, -0.0190688928 ] + - [ 0.710886846, 0.641780752, -0.136648879, -0.655010494, 1.13296802, 0.404634323, 0.0184183859, 0.710978236, -0.642221688, 0.136766766, -0.654409729, -1.13305026, 0.403824019, -0.018566842 ] + - [ 0.711231046, 0.64217966, -0.133373765, -0.65502278, 1.13013981, 0.402821795, 0.0179554908, 0.711316239, -0.642625542, 0.133487716, -0.654427946, -1.13022453, 0.402008182, -0.0181030907 ] + - [ 0.711585647, 0.642588313, -0.130159323, -0.655032964, 1.12735006, 0.401024646, 0.017531467, 0.711664697, -0.643038865, 0.130269424, -0.654443567, -1.12743722, 0.400207998, -0.0176782827 ] + - [ 0.71195111, 0.643007133, -0.12700685, -0.655041242, 1.12459966, 0.399243316, 0.017146957, 0.712024073, -0.643462071, 0.127113188, -0.654456781, -1.12468925, 0.398423914, -0.0172930615 ] + - [ 0.712327895, 0.643436541, -0.123917645, -0.655047813, 1.12188955, 0.39747825, 0.0168026032, 0.712394831, -0.643895576, 0.12402031, -0.654467776, -1.12198152, 0.396656378, -0.0169480709 ] + - [ 0.712716466, 0.643876959, -0.120893005, -0.655052873, 1.11922062, 0.395729889, 0.0164990483, 0.712777432, -0.644339797, 0.120992088, -0.654476739, -1.11931495, 0.394905835, -0.0166439545 ] + - [ 0.713117282, 0.644328806, -0.117934229, -0.65505662, 1.11659378, 0.393998677, 0.0162369347, 0.713172339, -0.64479515, 0.118029823, -0.654483859, -1.11669044, 0.393172735, -0.0163813561 ] + - [ 0.713530806, 0.644792504, -0.115042615, -0.655059251, 1.11400995, 0.392285055, 0.016016905, 0.713580016, -0.64526205, 0.115134815, -0.654489323, -1.11410889, 0.391457523, -0.0161609194 ] + - [ 0.713957498, 0.645268475, -0.112219461, -0.655060962, 1.11147003, 0.390589467, 0.0158396015, 0.714000926, -0.645740913, 0.112308362, -0.65449332, -1.11157123, 0.389760648, -0.015983288 ] + - [ 0.71439782, 0.645757139, -0.109466065, -0.655061952, 1.10897494, 0.388912355, 0.0157056668, 0.71443553, -0.646232156, 0.109551766, -0.654496038, -1.10907836, 0.388082555, -0.0158491056 ] + - [ 0.714852234, 0.646258918, -0.106783724, -0.655062418, 1.10652558, 0.387254162, 0.0156157435, 0.714884292, -0.646736194, 0.106866326, -0.654497664, -1.10663118, 0.386423693, -0.0157590159 ] + - [ 0.715321201, 0.646774232, -0.104173738, -0.655062556, 1.10412286, 0.385615331, 0.0155704739, 0.715347674, -0.647253443, 0.104253341, -0.654498387, -1.10423061, 0.384784508, -0.0157136626 ] + - [ 0.715801887, 0.647298743, -0.101628396, -0.655062572, 1.10176349, 0.383993411, 0.015562671, 0.715822829, -0.647779575, 0.101705094, -0.654498514, -1.10187336, 0.383162546, -0.0157058209 ] + - [ 0.716274844, 0.647804291, -0.0990945249, -0.655062559, 1.09942272, 0.382371344, 0.0155458877, 0.716290213, -0.648286515, 0.0991683475, -0.6544988, -1.09953475, 0.381540684, -0.0156888121 ] + - [ 0.71673689, 0.648286461, -0.0965633178, -0.655062348, 1.09709621, 0.380746293, 0.0155126522, 0.716746629, -0.648769865, 0.0966342845, -0.654499182, -1.09721043, 0.379916076, -0.0156551284 ] + - [ 0.717188123, 0.648745596, -0.0940349289, -0.655061745, 1.09478376, 0.379118299, 0.0154633102, 0.717192176, -0.649229971, 0.0941030589, -0.654499463, -1.09490022, 0.378288758, -0.0156051183 ] + - [ 0.717628641, 0.649182037, -0.0915095118, -0.655060555, 1.09248519, 0.377487404, 0.0153982072, 0.717626953, -0.649667176, 0.0915748245, -0.654499445, -1.09260393, 0.376658769, -0.0155391302 ] + - [ 0.718058542, 0.649596126, -0.0889872202, -0.655058584, 1.09020032, 0.375853647, 0.0153176887, 0.718051059, -0.650081825, 0.089049735, -0.65449893, -1.09032137, 0.375026147, -0.0154575125 ] + - [ 0.718477924, 0.649988205, -0.086468208, -0.655055638, 1.08792896, 0.37421707, 0.0152221005, 0.718464593, -0.650474262, 0.0865279441, -0.654497721, -1.08805237, 0.37339093, -0.0153606137 ] + - [ 0.718886884, 0.650358616, -0.0839526289, -0.655051523, 1.08567093, 0.372577713, 0.0151117879, 0.718867654, -0.650844832, 0.0840096056, -0.654495621, -1.08579673, 0.371753156, -0.0152487821 ] + - [ 0.719285521, 0.6507077, -0.0814406366, -0.655046046, 1.08342603, 0.370935616, 0.0149870967, 0.719260342, -0.651193879, 0.0814948732, -0.65449243, -1.08355426, 0.370112862, -0.0151223663 ] + - [ 0.719673932, 0.651035801, -0.0789323849, -0.655039011, 1.08119408, 0.369290821, 0.0148483723, 0.719642755, -0.651521747, 0.0789839006, -0.654487953, -1.08132479, 0.368470087, -0.0149817147 ] + - [ 0.720052215, 0.651343259, -0.0764280276, -0.655030224, 1.0789749, 0.367643367, 0.0146959604, 0.720014991, -0.651828781, 0.0764768415, -0.65448199, -1.07910811, 0.366824868, -0.0148271756 ] + - [ 0.720420469, 0.651630416, -0.0739277184, -0.655019493, 1.07676831, 0.365993296, 0.0145302066, 0.720377152, -0.652115326, 0.0739738498, -0.654474346, -1.07690405, 0.365177244, -0.0146590976 ] + - [ 0.720778791, 0.651897614, -0.071431611, -0.655006621, 1.0745741, 0.364340648, 0.0143514563, 0.720729334, -0.652381726, 0.071475079, -0.654464821, -1.07471242, 0.363527253, -0.0144778291 ] + - [ 0.72112728, 0.652145196, -0.0689398592, -0.654991416, 1.07239211, 0.362685464, 0.0141600553, 0.721071637, -0.652628324, 0.0689806829, -0.654453218, -1.07253303, 0.361874931, -0.0142837184 ] + - [ 0.721466032, 0.652373503, -0.0664526167, -0.654973684, 1.07022214, 0.361027784, 0.013956349, 0.721404161, -0.652855466, 0.0664908153, -0.65443934, -1.0703657, 0.360220319, -0.0140771141 ] + - [ 0.721795146, 0.652582876, -0.0639700374, -0.654953229, 1.06806401, 0.359367649, 0.013740683, 0.721727004, -0.653063496, 0.0640056299, -0.654422988, -1.06821024, 0.358563452, -0.0138583645 ] + - [ 0.72211472, 0.652773659, -0.0614922749, -0.654929859, 1.06591753, 0.3577051, 0.013513403, 0.722040265, -0.653252758, 0.0615252804, -0.654403966, -1.06606646, 0.35690437, -0.0136278182 ] + - [ 0.722424852, 0.652946192, -0.0590194831, -0.654903378, 1.06378251, 0.356040176, 0.0132748544, 0.722344043, -0.653423597, 0.0590499206, -0.654382076, -1.06393417, 0.355243109, -0.0133858234 ] + - [ 0.722725639, 0.653100818, -0.0565518156, -0.654873593, 1.06165878, 0.35437292, 0.0130253829, 0.722638438, -0.653576358, 0.0565797041, -0.654357119, -1.0618132, 0.353579709, -0.0131327288 ] + - [ 0.72301718, 0.653237879, -0.0540894262, -0.65484031, 1.05954614, 0.352703371, 0.0127653341, 0.722923548, -0.653711383, 0.0541147847, -0.654328899, -1.05970334, 0.351914207, -0.0128688826 ] + - [ 0.723299573, 0.653357715, -0.0516324686, -0.654803335, 1.05744441, 0.351031569, 0.0124950534, 0.723199472, -0.653829019, 0.0516553161, -0.654297217, -1.05760442, 0.350246641, -0.0125946334 ] + - [ 0.723572914, 0.65346067, -0.0491810967, -0.654762473, 1.05535339, 0.349357557, 0.0122148866, 0.72346631, -0.653929609, 0.049201452, -0.654261876, -1.05551625, 0.348577049, -0.0123103296 ] + - [ 0.723837304, 0.653547085, -0.0467354642, -0.65471753, 1.05327292, 0.347681374, 0.0119251791, 0.723724159, -0.654013497, 0.0467533463, -0.654222679, -1.05343865, 0.346905469, -0.0120163195 ] + - [ 0.724092838, 0.653617303, -0.0442957248, -0.654668313, 1.0512028, 0.34600306, 0.0116262765, 0.723973121, -0.654081029, 0.0443111525, -0.654179427, -1.05137141, 0.345231938, -0.0117129518 ] + - [ 0.724339616, 0.653671664, -0.0418620323, -0.654614626, 1.04914284, 0.344322658, 0.0113185245, 0.724213292, -0.654132549, 0.0418750245, -0.654131923, -1.04931437, 0.343556496, -0.0114005746 ] + - [ 0.724577734, 0.65371051, -0.0394345403, -0.654556277, 1.04709286, 0.342640206, 0.0110022685, 0.724444773, -0.6541684, 0.0394451159, -0.654079969, -1.04726733, 0.341879179, -0.0110795366 ] + - [ 0.724807292, 0.653734185, -0.0370134028, -0.654493071, 1.04505268, 0.340955746, 0.0106778542, 0.724667663, -0.654188927, 0.0370215805, -0.654023369, -1.04523011, 0.340200026, -0.0107501861 ] + - [ 0.725028386, 0.653743029, -0.0345987734, -0.654424814, 1.0430221, 0.339269318, 0.0103456271, 0.724882059, -0.654194476, 0.0346045721, -0.653961923, -1.04320251, 0.338519074, -0.0104128716 ] + - [ 0.725241115, 0.653737385, -0.0321908059, -0.654351311, 1.04100094, 0.337580963, 0.0100059329, 0.725088063, -0.654185389, 0.0321942442, -0.653895435, -1.04118436, 0.336836362, -0.0100679415 ] + - [ 0.725445577, 0.653717593, -0.029789654, -0.654272369, 1.03898902, 0.335890722, 0.00965911705, 0.725285771, -0.654162012, 0.0297907508, -0.653823706, -1.03917546, 0.335151927, -0.00971574429 ] + - [ 0.725641869, 0.653683997, -0.0273954715, -0.654187793, 1.03698615, 0.334198635, 0.00930552516, 0.725475284, -0.654124689, 0.0273942454, -0.65374654, -1.03717563, 0.333465808, -0.00935662831 ] + - [ 0.72583009, 0.653636939, -0.0250084121, -0.65409739, 1.03499214, 0.332504743, 0.00894550281, 0.725656701, -0.654073765, 0.0250048819, -0.653663738, -1.03518468, 0.331778042, -0.00899094205 ] + - [ 0.726010338, 0.653576759, -0.0226286297, -0.654000965, 1.03300681, 0.330809086, 0.00857939558, 0.72583012, -0.654009583, 0.0226228139, -0.653575102, -1.03320243, 0.330088667, -0.00861903394 ] + - [ 0.726182709, 0.6535038, -0.0202562778, -0.653898325, 1.03102997, 0.329111706, 0.00820754904, 0.72599564, -0.653932488, 0.0202481952, -0.653480436, -1.03122869, 0.328397722, -0.0082412524 ] + - [ 0.726347303, 0.653418403, -0.0178915104, -0.653789274, 1.02906144, 0.327412642, 0.00783030876, 0.726153361, -0.653842825, 0.0178811794, -0.653379542, -1.02926327, 0.326705244, -0.00785794587 ] + - [ 0.726504217, 0.653320912, -0.0155344811, -0.653673619, 1.02710103, 0.325711935, 0.00744802033, 0.726303382, -0.653740937, 0.0155219205, -0.653272221, -1.02730599, 0.32501127, -0.0074694628 ] + - [ 0.72665355, 0.653211667, -0.0131853437, -0.653551166, 1.02514855, 0.324009626, 0.00706102931, 0.726445801, -0.65362717, 0.013170572, -0.653158276, -1.02535665, 0.32331584, -0.0070761516 ] + - [ 0.726795398, 0.65309101, -0.010844252, -0.653421721, 1.02320383, 0.322305756, 0.00666968128, 0.726580717, -0.653501868, 0.0108272876, -0.65303751, -1.02341508, 0.321618991, -0.00667836072 ] + - [ 0.72692986, 0.652959283, -0.00851135969, -0.65328509, 1.02126666, 0.320600364, 0.00627432182, 0.72670823, -0.653365375, 0.00849222122, -0.652909725, -1.02148108, 0.319920761, -0.00627643859 ] + - [ 0.727057033, 0.652816829, -0.00618682052, -0.653141078, 1.01933688, 0.318893493, 0.0058752965, 0.726828439, -0.653218036, 0.00616552645, -0.652774723, -1.01955447, 0.318221188, -0.00587073364 ] + - [ 0.727177017, 0.652663989, -0.00387078826, -0.652989491, 1.01741428, 0.317185182, 0.0054729509, 0.726941442, -0.653060194, 0.00384735705, -0.652632306, -1.01763506, 0.31652031, -0.00546159431 ] + - [ 0.727289908, 0.652501105, -0.00156341665, -0.652830136, 1.01549869, 0.315475472, 0.00506763059, 0.727047339, -0.652892195, 0.00153786676, -0.652482277, -1.01572267, 0.314818165, -0.00504936904 ] + - [ 0.727395805, 0.652328518, 0.000735140534, -0.652662818, 1.01358992, 0.313764403, 0.00465968115, 0.727146229, -0.652714383, -0.000762790717, -0.652324439, -1.01381711, 0.31311479, -0.00463440624 ] + - [ 0.727494805, 0.652146571, 0.00302472956, -0.652487343, 1.01168778, 0.312052017, 0.00424944816, 0.72723821, -0.652527102, -0.00305446164, -0.652158593, -1.01191819, 0.311410224, -0.00421705437 ] + - [ 0.727587006, 0.651955606, 0.00530519666, -0.652303517, 1.00979209, 0.310338353, 0.00383727718, 0.727323382, -0.652330696, -0.00533699227, -0.651984542, -1.01002573, 0.309704504, -0.00379766185 ] + - [ 0.727672507, 0.651755964, 0.0075763881, -0.652111146, 1.00790267, 0.308623453, 0.00342351379, 0.727401843, -0.65212551, -0.0076102289, -0.651802089, -1.00813953, 0.307997669, -0.00337657712 ] + - [ 0.727751405, 0.651547988, 0.00983815012, -0.651910035, 1.00601932, 0.306907357, 0.00300850357, 0.727473693, -0.651911889, -0.0098740178, -0.651611035, -1.00625942, 0.306289757, -0.00295414861 ] + - [ 0.727823798, 0.651332019, 0.012090329, -0.651699992, 1.00414186, 0.305190106, 0.0025925921, 0.727539031, -0.651690176, -0.0121282052, -0.651411183, -1.0043852, 0.304580805, -0.00253072475 ] + - [ 0.727889784, 0.651108399, 0.0143327709, -0.65148082, 1.0022701, 0.30347174, 0.00217612494, 0.727597955, -0.651460717, -0.0143726375, -0.651202335, -1.00251669, 0.302870851, -0.00210665399 ] + - [ 0.727949461, 0.65087747, 0.0165653221, -0.651252328, 1.00040386, 0.3017523, 0.00175944768, 0.727650565, -0.651223855, -0.0166071608, -0.650984295, -1.0006537, 0.301159934, -0.00168228475 ] + - [ 0.728002927, 0.650639574, 0.0187878289, -0.651014319, 0.99854296, 0.300031827, 0.00134290589, 0.72769696, -0.650979935, -0.0188316215, -0.650756863, -0.998796051, 0.299448091, -0.00125796547 ] + - [ 0.728050279, 0.650395052, 0.0210001376, -0.650766601, 0.996687203, 0.29831036, 0.000926845146, 0.727737239, -0.650729302, -0.0210458658, -0.650519842, -0.996943549, 0.29773536, -0.000834044574 ] + - [ 0.728091616, 0.650144248, 0.0232020943, -0.650508979, 0.994836407, 0.296587942, 0.00051161102, 0.7277715, -0.650472299, -0.02324974, -0.650273035, -0.995096009, 0.296021779, -0.000410870508 ] + - [ 0.728127036, 0.649887502, 0.0253935453, -0.650241259, 0.992990386, 0.294864612, 9.75490896e-05, 0.727799843, -0.650209272, -0.0254430903, -0.650016245, -0.993253244, 0.294307387, 1.12082974e-05 ] + - [ 0.728156636, 0.649625156, 0.0275743368, -0.649963246, 0.991148955, 0.293140411, -0.00031499507, 0.727822367, -0.649940564, -0.0276257631, -0.649749272, -0.991415068, 0.29259222, 0.000431843409 ] + - [ 0.728180514, 0.649357553, 0.0297443152, -0.649674748, 0.989311927, 0.291415379, -0.000725675884, 0.727839171, -0.64966652, -0.0297976047, -0.649471921, -0.989581294, 0.290876318, 0.000850686393 ] + - [ 0.728198769, 0.649085033, 0.0319033267, -0.649375569, 0.987479117, 0.289689558, -0.00113414778, 0.727850354, -0.649387484, -0.0319584612, -0.649183992, -0.987751736, 0.289159717, 0.00126738881 ] + - [ 0.728211498, 0.64880794, 0.0340512174, -0.649065516, 0.985650339, 0.287962987, -0.00154006517, 0.727856014, -0.649103802, -0.034108179, -0.648885289, -0.985926207, 0.287442456, 0.00168160224 ] + - [ 0.728218799, 0.648526615, 0.0361878337, -0.648744394, 0.983825406, 0.286235708, -0.0019430825, 0.727856251, -0.648815816, -0.0362466043, -0.648575614, -0.984104519, 0.285724574, 0.00209297824 ] + - [ 0.72822077, 0.6482414, 0.0383130218, -0.64841201, 0.982004134, 0.284507762, -0.00234285418, 0.727851164, -0.648523872, -0.0383735834, -0.648254769, -0.982286488, 0.284006106, 0.00250116837 ] + - [ 0.728217509, 0.647952636, 0.040426628, -0.648068168, 0.980186337, 0.282779187, -0.00273903463, 0.727840852, -0.648228314, -0.0404889626, -0.647922556, -0.980471925, 0.282287093, 0.0029058242 ] + - [ 0.728209114, 0.647660666, 0.0425284984, -0.647712676, 0.978371828, 0.281050027, -0.00313127829, 0.727825414, -0.647929487, -0.0425925882, -0.647578779, -0.978660644, 0.280567571, 0.0033065973 ] + - [ 0.728195683, 0.647365831, 0.0446184794, -0.647345339, 0.976560421, 0.27932032, -0.00351923958, 0.727804949, -0.647627734, -0.0446843063, -0.647223238, -0.976852459, 0.278847579, 0.00370313924 ] + - [ 0.728177313, 0.647068474, 0.0466964172, -0.646965963, 0.974751932, 0.277590107, -0.00390257292, 0.727779555, -0.6473234, -0.0467639634, -0.646855737, -0.975047182, 0.277127154, 0.00409510157 ] + - [ 0.728154103, 0.646768936, 0.048762158, -0.646574353, 0.972946173, 0.27585943, -0.00428093273, 0.727749333, -0.64701683, -0.0488314056, -0.646476078, -0.973244628, 0.275406335, 0.00448213587 ] + - [ 0.72812615, 0.64646756, 0.0508155481, -0.646170317, 0.971142959, 0.274128329, -0.00465397345, 0.72771438, -0.646708368, -0.0508864793, -0.646084063, -0.971444609, 0.273685159, 0.00486389371 ] + - [ 0.728093553, 0.646164686, 0.0528564338, -0.645753658, 0.969342105, 0.272396844, -0.00502134949, 0.727674796, -0.646398359, -0.0529290307, -0.645679495, -0.969646939, 0.271963664, 0.00524002664 ] + - [ 0.728056409, 0.645860657, 0.0548846612, -0.645324185, 0.967543424, 0.270665016, -0.00538271529, 0.727630681, -0.646087146, -0.0549589061, -0.645262175, -0.967851432, 0.270241889, 0.00561018623 ] + - [ 0.728014816, 0.645555815, 0.0569000767, -0.644881701, 0.965746731, 0.268932886, -0.00573772526, 0.727582132, -0.645775074, -0.0569759517, -0.644831907, -0.966057899, 0.268519871, 0.00597402405 ] + - [ 0.727968873, 0.645250502, 0.0589025264, -0.644426014, 0.963951839, 0.267200494, -0.00608603383, 0.727529249, -0.645462488, -0.0589800139, -0.644388493, -0.964266156, 0.266797648, 0.00633119167 ] + - [ 0.727918676, 0.644945059, 0.0608918567, -0.643956929, 0.962158563, 0.265467881, -0.00642729543, 0.727472132, -0.645149732, -0.0609709389, -0.643931734, -0.962476014, 0.265075258, 0.00668134065 ] + - [ 0.727864325, 0.644639829, 0.0628679138, -0.643474252, 0.960366718, 0.263735087, -0.00676116447, 0.727410878, -0.644837151, -0.0629485729, -0.643461434, -0.960687288, 0.26335274, 0.00702412256 ] + - [ 0.727805916, 0.644335153, 0.0648305438, -0.642977789, 0.958576116, 0.262002154, -0.0070872954, 0.727345587, -0.644525088, -0.0649127623, -0.642977394, -0.958899791, 0.26163013, 0.00735918896 ] + - [ 0.727743548, 0.644031373, 0.0667795932, -0.642467346, 0.956786573, 0.260269121, -0.00740534262, 0.727276359, -0.644213889, -0.0668633533, -0.642479418, -0.957113336, 0.259907467, 0.00768619142 ] + - [ 0.727677319, 0.643728832, 0.068714908, -0.641942728, 0.954997902, 0.25853603, -0.00771496057, 0.727203291, -0.643903897, -0.0688001923, -0.641967307, -0.955327736, 0.25818479, 0.00800478151 ] + - [ 0.727607326, 0.64342787, 0.0706363347, -0.641403742, 0.953209918, 0.256802921, -0.00801580366, 0.727126484, -0.643595457, -0.0707231253, -0.641440863, -0.953542805, 0.256462135, 0.00831461079 ] + - [ 0.727533668, 0.64312883, 0.0725437193, -0.640850194, 0.951422435, 0.255069834, -0.00830752633, 0.727046035, -0.643288913, -0.0726319989, -0.640899889, -0.951758357, 0.25473954, 0.00861533082 ] + - [ 0.727456442, 0.642832054, 0.0744369082, -0.640281889, 0.949635266, 0.25333681, -0.008589783, 0.726962045, -0.64298461, -0.0745266591, -0.640344188, -0.949974203, 0.253017045, 0.00890659318 ] + - [ 0.727375747, 0.642537884, 0.0763157477, -0.639698633, 0.947848227, 0.25160389, -0.00886222809, 0.726874612, -0.642682893, -0.0764069523, -0.639773562, -0.948190159, 0.251294686, 0.00918804943 ] + - [ 0.72729168, 0.642246661, 0.0781800838, -0.639100232, 0.946061131, 0.249871115, -0.00912451603, 0.726783835, -0.642384105, -0.0782727248, -0.639187813, -0.946406036, 0.249572502, 0.00945935113 ] + - [ 0.727204339, 0.641958728, 0.080029763, -0.638486493, 0.944273792, 0.248138525, -0.00937630125, 0.726689813, -0.642088591, -0.0801238227, -0.638586743, -0.944621649, 0.24785053, 0.00972014986 ] + - [ 0.727113822, 0.641674426, 0.0818646315, -0.63785722, 0.942486025, 0.24640616, -0.00961723816, 0.726592645, -0.641796696, -0.0819600925, -0.637970155, -0.942836811, 0.246128809, 0.00997009717 ] + - [ 0.727020227, 0.641394097, 0.0836845354, -0.63721222, 0.940697643, 0.244674062, -0.0098469812, 0.726492431, -0.641508763, -0.0837813804, -0.637337851, -0.941051335, 0.244407376, 0.0102088446 ] + - [ 0.726923652, 0.641118083, 0.0854893211, -0.636551299, 0.938908462, 0.242942271, -0.0100651848, 0.726389268, -0.641225138, -0.0855875326, -0.636689633, -0.939265034, 0.24268627, 0.0104360438 ] + - [ 0.726824195, 0.640846726, 0.0872788348, -0.635874263, 0.937118294, 0.241210827, -0.0102715033, 0.726283257, -0.640946164, -0.0873783955, -0.636025305, -0.937477722, 0.240965528, 0.0106513463 ] + - [ 0.726721953, 0.640580368, 0.0890529228, -0.635180916, 0.935326955, 0.239479771, -0.0104655913, 0.726174496, -0.640672187, -0.0891538152, -0.635344667, -0.935689212, 0.239245188, 0.0108544036 ] + - [ 0.726617025, 0.64031935, 0.0908114312, -0.634471067, 0.933534257, 0.237749144, -0.0106471031, 0.726063084, -0.640403549, -0.0909136381, -0.634647523, -0.933899318, 0.237525288, 0.0110448673 ] + - [ 0.726509509, 0.640064016, 0.0925542064, -0.633744519, 0.931740017, 0.236018987, -0.0108156931, 0.725949121, -0.640140597, -0.0926577104, -0.633933675, -0.932107852, 0.235805867, 0.0112223891 ] + - [ 0.726399502, 0.639814705, 0.0942810945, -0.63300108, 0.929944047, 0.234289339, -0.0109710158, 0.725832705, -0.639883674, -0.0943858784, -0.633202925, -0.930314628, 0.234086961, 0.0113866203 ] + - [ 0.726287102, 0.639571761, 0.0959919419, -0.632240555, 0.928146161, 0.232560242, -0.0111127256, 0.725713935, -0.639633124, -0.0960979884, -0.632455075, -0.92851946, 0.23236861, 0.0115372127 ] + - [ 0.726172408, 0.639335525, 0.0976865948, -0.63146275, 0.926346175, 0.230831736, -0.0112404769, 0.72559291, -0.639389293, -0.0977938867, -0.631689929, -0.92672216, 0.23065085, 0.0116738178 ] + - [ 0.726055517, 0.63910634, 0.0993648995, -0.630667471, 0.924543901, 0.229103863, -0.0113539241, 0.72546973, -0.639152524, -0.0994734195, -0.630907288, -0.924922543, 0.228933721, 0.0117960871 ] + - [ 0.725936527, 0.638884546, 0.101026702, -0.629854523, 0.922739155, 0.227376661, -0.0114527217, 0.725344493, -0.638923162, -0.101136433, -0.630106954, -0.923120421, 0.227217259, 0.0119036722 ] + - [ 0.725815536, 0.638670487, 0.102671849, -0.629023713, 0.92093175, 0.225650173, -0.0115365241, 0.725217298, -0.638701551, -0.102782774, -0.62928873, -0.921315607, 0.225501503, 0.0119962247 ] + - [ 0.725692642, 0.638464503, 0.104300186, -0.628174847, 0.919121501, 0.223924438, -0.0116049858, 0.725088244, -0.638488035, -0.104412288, -0.628452419, -0.919507916, 0.223786491, 0.0120733962 ] + - [ 0.725567942, 0.638266936, 0.10591156, -0.62730773, 0.917308222, 0.222199498, -0.0116577611, 0.724957431, -0.63828296, -0.106024821, -0.627597822, -0.91769716, 0.222072261, 0.0121348381 ] + - [ 0.725441536, 0.63807813, 0.107505817, -0.626422168, 0.915491726, 0.220475393, -0.0116945044, 0.724824958, -0.638086669, -0.107620221, -0.626724742, -0.915883153, 0.22035885, 0.0121802022 ] + - [ 0.72531352, 0.637898424, 0.109082803, -0.625517967, 0.913671828, 0.218752163, -0.0117148703, 0.724690922, -0.637899507, -0.109198332, -0.625832982, -0.914065707, 0.218646297, 0.0122091398 ] + - [ 0.725183992, 0.637728162, 0.110642365, -0.624594934, 0.911848342, 0.217029849, -0.011718513, 0.724555425, -0.637721818, -0.110759003, -0.624922343, -0.912244637, 0.216934639, 0.0122213027 ] + - [ 0.725053052, 0.637567686, 0.112184349, -0.623652873, 0.910021083, 0.215308493, -0.0117050871, 0.724418563, -0.637553947, -0.112302077, -0.623992628, -0.910419756, 0.215223915, 0.0122163424 ] + - [ 0.724920795, 0.637417336, 0.1137086, -0.622691592, 0.908189864, 0.213588133, -0.011674247, 0.724280437, -0.637396238, -0.113827403, -0.62304364, -0.908590877, 0.213514162, 0.0121939104 ] + - [ 0.724787321, 0.637277455, 0.115214966, -0.621710895, 0.9063545, 0.211868812, -0.0116256471, 0.724141145, -0.637249036, -0.115334826, -0.62207518, -0.906757813, 0.211805418, 0.0121536583 ] + - [ 0.724652727, 0.637148386, 0.116703292, -0.620710588, 0.904514804, 0.210150569, -0.0115589418, 0.724000787, -0.637112684, -0.116824193, -0.621087051, -0.904920378, 0.210097722, 0.0120952377 ] + - [ 0.724517111, 0.637030468, 0.118173424, -0.619690479, 0.902670591, 0.208433445, -0.0114737855, 0.723859461, -0.636987528, -0.118295349, -0.620079056, -0.903078385, 0.208391111, 0.0120183001 ] + - [ 0.724380571, 0.636924046, 0.11962521, -0.618650371, 0.900821676, 0.206717482, -0.0113698327, 0.723717267, -0.636873911, -0.119748142, -0.619050996, -0.901231648, 0.206685623, 0.0119224971 ] + - [ 0.724243205, 0.63682946, 0.121058495, -0.617590072, 0.898967871, 0.205002719, -0.0112467378, 0.723574303, -0.636772178, -0.121182416, -0.618002675, -0.899379979, 0.204981296, 0.0118074803 ] + - [ 0.724105111, 0.636747052, 0.122473125, -0.616509388, 0.897108992, 0.203289197, -0.0111041552, 0.723430669, -0.636682674, -0.12259802, -0.616933894, -0.897523192, 0.203278169, 0.0116729012 ] + - [ 0.723966386, 0.636677165, 0.123868947, -0.615408123, 0.895244852, 0.201576956, -0.0109417393, 0.723286464, -0.636605742, -0.123994798, -0.615844456, -0.8956611, 0.201576278, 0.0115184115 ] + - [ 0.72382713, 0.63662014, 0.125245807, -0.614286084, 0.893375266, 0.199866038, -0.0107591446, 0.723141785, -0.636541728, -0.125372597, -0.614734163, -0.893793517, 0.199875662, 0.0113436626 ] + - [ 0.723687439, 0.636576319, 0.126603552, -0.613143078, 0.891500048, 0.198156484, -0.0105560255, 0.722996734, -0.636490976, -0.126731264, -0.613602817, -0.891920256, 0.198176359, 0.0111483061 ] + - [ 0.723547411, 0.636546044, 0.127942026, -0.611978909, 0.889619012, 0.196448332, -0.0103320365, 0.722851408, -0.636453829, -0.128070645, -0.612450222, -0.89004113, 0.196478407, 0.0109319936 ] + - [ 0.723407145, 0.636529656, 0.129261078, -0.610793383, 0.887731972, 0.194741625, -0.0100868318, 0.722705906, -0.636430633, -0.129390585, -0.611276178, -0.888155953, 0.194781844, 0.0106943767 ] + - [ 0.723266738, 0.636527499, 0.130560552, -0.609586307, 0.885838742, 0.193036403, -0.00982006605, 0.722560328, -0.636421732, -0.130690932, -0.610080489, -0.886264538, 0.193086707, 0.010435107 ] + - [ 0.723126288, 0.636539913, 0.131840295, -0.608357487, 0.883939137, 0.191332706, -0.00953139357, 0.722414773, -0.636427471, -0.131971531, -0.608862957, -0.884366699, 0.191393035, 0.0101538359 ] + - [ 0.722985894, 0.63656724, 0.133100154, -0.607106728, 0.88203297, 0.189630575, -0.0092204688, 0.722269339, -0.636448192, -0.133232229, -0.607623384, -0.882462248, 0.189700866, 0.0098502151 ] + - [ 0.722845652, 0.636609823, 0.134339975, -0.605833836, 0.880120056, 0.18793005, -0.00888694617, 0.722124126, -0.636484242, -0.134472872, -0.606361573, -0.880550999, 0.188010237, 0.00952389612 ] + - [ 0.722705662, 0.636668003, 0.135559603, -0.604538617, 0.878200208, 0.186231173, -0.0085304801, 0.721979233, -0.636535965, -0.135693307, -0.605077325, -0.878632765, 0.186321187, 0.00917453055 ] + - [ 0.72256602, 0.636742122, 0.136758886, -0.603220878, 0.876273242, 0.184533984, -0.00815072503, 0.721834758, -0.636603704, -0.136893379, -0.603770444, -0.87670736, 0.184633753, 0.00880176993 ] + - [ 0.722426825, 0.636832522, 0.137937669, -0.601880423, 0.874338971, 0.182838524, -0.00774733537, 0.721690801, -0.636687805, -0.138072935, -0.602440732, -0.874774597, 0.182947973, 0.00840526584 ] + - [ 0.722288175, 0.636939545, 0.139095799, -0.600517059, 0.872397209, 0.181144832, -0.00731996554, 0.721547461, -0.636788611, -0.139231821, -0.60108799, -0.872834289, 0.181263886, 0.00798466985 ] + - [ 0.722150167, 0.637063532, 0.140233122, -0.599130592, 0.870447771, 0.179452951, -0.00686826998, 0.721404836, -0.636906468, -0.140369884, -0.599712022, -0.87088625, 0.179581529, 0.00753963351 ] + - [ 0.7220129, 0.637204827, 0.141349484, -0.597720827, 0.868490471, 0.17776292, -0.00639190311, 0.721263026, -0.637041718, -0.141486969, -0.598312629, -0.868930293, 0.17790094, 0.0070698084 ] + - [ 0.721876472, 0.637363769, 0.142444731, -0.596287571, 0.866525122, 0.176074779, -0.00589051935, 0.72112213, -0.637194708, -0.142582923, -0.596889614, -0.866966231, 0.176222157, 0.00657484609 ] + - [ 0.721740979, 0.637540703, 0.14351871, -0.594830629, 0.864551539, 0.174388571, -0.00536377313, 0.720982246, -0.637365781, -0.143657593, -0.59544278, -0.864993877, 0.174545219, 0.00605439813 ] + - [ 0.721606521, 0.637735968, 0.144571267, -0.593349807, 0.862569536, 0.172704334, -0.00481131887, 0.720843475, -0.637555282, -0.144710824, -0.593971929, -0.863013046, 0.172870162, 0.00550811609 ] + - [ 0.721473195, 0.637949908, 0.145602248, -0.591844911, 0.860578927, 0.17102211, -0.004232811, 0.720705914, -0.637763555, -0.145742462, -0.592476862, -0.86102355, 0.171197025, 0.00493565154 ] + - [ 0.721341099, 0.638182864, 0.146611499, -0.590315748, 0.858579527, 0.16934194, -0.00362790394, 0.720569663, -0.637990944, -0.146752355, -0.590957383, -0.859025203, 0.169525847, 0.00433665605 ] + - [ 0.721210332, 0.638435178, 0.147598868, -0.588762122, 0.85657115, 0.167663864, -0.00299625212, 0.72043482, -0.638237794, -0.147740348, -0.589413293, -0.857017817, 0.167856664, 0.00371078119 ] + - [ 0.72108099, 0.638707191, 0.148564199, -0.58718384, 0.854553609, 0.165987923, -0.00233750996, 0.720301486, -0.63850445, -0.148706288, -0.587844396, -0.855001207, 0.166189515, 0.0030576785 ] + - [ 0.720953171, 0.638999247, 0.149507339, -0.585580708, 0.852526719, 0.164314157, -0.00165133188, 0.720169758, -0.638791255, -0.149650021, -0.586250493, -0.852975185, 0.164524437, 0.00237699958 ] + - [ 0.720826975, 0.639311686, 0.150428134, -0.583952532, 0.850490293, 0.162642607, -0.000937372318, 0.720039736, -0.639098555, -0.150571393, -0.584631387, -0.850939566, 0.162861469, 0.00166839597 ] + - [ 0.720702498, 0.63964485, 0.151326432, -0.582299117, 0.848444148, 0.160973313, -0.000195285689, 0.719911519, -0.639426692, -0.15147025, -0.58298688, -0.848894161, 0.161200649, 0.000931519247 ] + - [ 0.720579839, 0.639999082, 0.152202077, -0.580620269, 0.846388095, 0.159306317, 0.000575273579, 0.719785206, -0.639776013, -0.152346439, -0.581316774, -0.846838786, 0.159542015, 0.000166020977 ] + - [ 0.720459095, 0.640374723, 0.153054916, -0.578915795, 0.84432195, 0.157641658, 0.00137465106, 0.719660896, -0.640146861, -0.153199806, -0.579620872, -0.844773252, 0.157885604, -0.000628447277 ] + - [ 0.720340364, 0.640772115, 0.153884796, -0.577185499, 0.842245526, 0.155979378, 0.00220319233, 0.719538687, -0.640539581, -0.154030197, -0.577898977, -0.842697373, 0.156231454, -0.00145223395 ] + - [ 0.720223745, 0.6411916, 0.154691562, -0.575429189, 0.840158638, 0.154319516, 0.00306124297, 0.71941868, -0.640954517, -0.154837459, -0.57615089, -0.840610963, 0.154579604, -0.00230568747 ] + - [ 0.720109335, 0.64163352, 0.155475061, -0.57364667, 0.838061101, 0.152662115, 0.00394914855, 0.719300973, -0.641392013, -0.155621437, -0.574376413, -0.838513835, 0.152930091, -0.00318915627 ] + - [ 0.719997232, 0.642098217, 0.156235139, -0.571837747, 0.835952727, 0.151007213, 0.00486725464, 0.719185664, -0.641852414, -0.156381979, -0.57257535, -0.836405802, 0.151282953, -0.0041029888 ] + - [ 0.719887534, 0.642586033, 0.156971643, -0.570002228, 0.833833331, 0.149354853, 0.00581590683, 0.719072853, -0.642336065, -0.157118929, -0.570747503, -0.834286678, 0.149638229, -0.00504753347 ] + - [ 0.719780339, 0.643097309, 0.157684418, -0.568139917, 0.831702728, 0.147705074, 0.00679545068, 0.71896264, -0.642843309, -0.157832136, -0.568892673, -0.832156275, 0.147995955, -0.00602313874 ] + - [ 0.719675745, 0.643632388, 0.158373312, -0.56625062, 0.829560731, 0.146057917, 0.00780623177, 0.718855122, -0.643374492, -0.158521444, -0.567010664, -0.830014408, 0.146356171, -0.00703015302 ] + - [ 0.71957385, 0.644191611, 0.159038169, -0.564334144, 0.827407155, 0.144413423, 0.00884859568, 0.718750399, -0.643929957, -0.159186701, -0.565101277, -0.82786089, 0.144718914, -0.00806892476 ] + - [ 0.719474751, 0.64477532, 0.159678837, -0.562390294, 0.825241814, 0.142771632, 0.00992288798, 0.718648571, -0.644510049, -0.159827752, -0.563164315, -0.825695533, 0.143084222, -0.00913980239 ] + - [ 0.719378547, 0.645383857, 0.160295161, -0.560418876, 0.823064522, 0.141132585, 0.0110294542, 0.718549735, -0.645115112, -0.160444443, -0.561199581, -0.823518152, 0.141452133, -0.0102431343 ] + - [ 0.719285335, 0.646017564, 0.160886988, -0.558419696, 0.820875093, 0.139496322, 0.0121686401, 0.718453992, -0.645745491, -0.161036622, -0.559206876, -0.821328559, 0.139822684, -0.011379269 ] + - [ 0.719195213, 0.646676783, 0.161454165, -0.55639256, 0.818673341, 0.137862885, 0.013340791, 0.718361439, -0.64640153, -0.161604133, -0.557186003, -0.819126568, 0.138195915, -0.0125485549 ] + - [ 0.71910828, 0.647361856, 0.161996536, -0.554337274, 0.816459081, 0.136232314, 0.0145462526, 0.718272177, -0.647083573, -0.162146825, -0.555136764, -0.816911992, 0.136571862, -0.0137513405 ] + - [ 0.719024633, 0.648073125, 0.16251395, -0.552253644, 0.814232126, 0.134604649, 0.0157853705, 0.718186303, -0.647791966, -0.162664542, -0.553058962, -0.814684645, 0.134950564, -0.0149879741 ] + - [ 0.718944371, 0.648810931, 0.163006251, -0.550141476, 0.811992291, 0.132979931, 0.0170584902, 0.718103918, -0.648527052, -0.163157131, -0.550952399, -0.812444339, 0.133332058, -0.0162588041 ] + - [ 0.71886759, 0.649575616, 0.163473286, -0.548000574, 0.80973939, 0.131358201, 0.0183659574, 0.71802512, -0.649289175, -0.163624439, -0.548816877, -0.810190889, 0.131716383, -0.0175641791 ] + - [ 0.718794389, 0.650367523, 0.163914902, -0.545830747, 0.807473237, 0.129739499, 0.0197081175, 0.717950008, -0.650078681, -0.164066311, -0.546652199, -0.807924107, 0.130103577, -0.0189044475 ] + - [ 0.718724866, 0.651186993, 0.164330944, -0.543631798, 0.805193646, 0.128123866, 0.0210853162, 0.717878681, -0.650895913, -0.164482594, -0.544458168, -0.805643808, 0.128493677, -0.0202799577 ] + - [ 0.718659119, 0.652034367, 0.164721259, -0.541403535, 0.802900432, 0.126511342, 0.0224978991, 0.717811238, -0.651741216, -0.164873134, -0.542234584, -0.803349803, 0.126886722, -0.021691058 ] + - [ 0.718597245, 0.652909989, 0.165085693, -0.539145763, 0.800593408, 0.124901969, 0.0239462117, 0.717747778, -0.652614935, -0.165237777, -0.539981251, -0.801041907, 0.125282748, -0.0231380971 ] + - [ 0.718539343, 0.6538142, 0.165424093, -0.536858288, 0.798272388, 0.123295786, 0.0254305995, 0.717688401, -0.653517413, -0.16557637, -0.537697972, -0.798719933, 0.123681796, -0.0246214232 ] + - [ 0.718485511, 0.654747341, 0.165736304, -0.534540916, 0.795937188, 0.121692835, 0.0269514083, 0.717633205, -0.654448996, -0.16588876, -0.535384548, -0.796383694, 0.122083901, -0.0261413849 ] + - [ 0.718435846, 0.655709755, 0.166022173, -0.532193452, 0.79358762, 0.120093155, 0.0285089835, 0.717582289, -0.655410026, -0.166174791, -0.533040781, -0.794033003, 0.120489102, -0.0276983306 ] + - [ 0.718390446, 0.656701783, 0.166281546, -0.529815703, 0.7912235, 0.118496788, 0.0301036707, 0.717535752, -0.65640085, -0.166434311, -0.530666475, -0.791667675, 0.118897438, -0.0292926086 ] + - [ 0.71834941, 0.657723768, 0.166514269, -0.527407475, 0.788844641, 0.116903775, 0.0317358155, 0.717493693, -0.657421812, -0.166667166, -0.528261431, -0.789287521, 0.117308946, -0.0309245675 ] + - [ 0.718312834, 0.658776051, 0.16672019, -0.524968573, 0.786450857, 0.115314155, 0.0334057635, 0.717456212, -0.658473255, -0.166873201, -0.525825452, -0.786892356, 0.115723664, -0.0325945556 ] + - [ 0.718280818, 0.659858974, 0.166899152, -0.522498803, 0.784041963, 0.11372797, 0.0351138602, 0.717423407, -0.659555524, -0.167052264, -0.52335834, -0.784481993, 0.114141629, -0.0343029215 ] + - [ 0.718253459, 0.660972879, 0.167051004, -0.519997972, 0.781617772, 0.11214526, 0.0368604512, 0.717395377, -0.660668963, -0.167204201, -0.520859898, -0.782056245, 0.112562881, -0.0360500135 ] + - [ 0.718230854, 0.662118108, 0.167175592, -0.517465885, 0.7791781, 0.110566065, 0.0386458822, 0.717372222, -0.661813918, -0.167328858, -0.518329928, -0.779614926, 0.110987456, -0.03783618 ] + - [ 0.718213102, 0.663295003, 0.16727276, -0.514902347, 0.776722759, 0.108990427, 0.0404704986, 0.71735404, -0.662990732, -0.16742608, -0.515768232, -0.777157848, 0.109415393, -0.0396617696 ] + - [ 0.718200301, 0.664503906, 0.167342357, -0.512307166, 0.774251565, 0.107418385, 0.042334646, 0.71734093, -0.66419975, -0.167495715, -0.513174612, -0.774684826, 0.10784673, -0.0415271306 ] + - [ 0.718192549, 0.665745158, 0.167384228, -0.509680146, 0.771764331, 0.105849982, 0.0442386701, 0.717332991, -0.665441316, -0.167537609, -0.510548871, -0.772195672, 0.106281505, -0.0434326114 ] + - [ 0.718189943, 0.667019101, 0.167398219, -0.507021094, 0.769260871, 0.104285256, 0.0461829164, 0.717330323, -0.666715774, -0.167551608, -0.507890812, -0.7696902, 0.104719755, -0.0453785606 ] + - [ 0.718180649, 0.668351898, 0.16737464, -0.504275049, 0.766713655, 0.102711846, 0.0482118965, 0.717321275, -0.668049334, -0.167528166, -0.505145417, -0.767140801, 0.103149119, -0.047409583 ] + - [ 0.71815299, 0.669768335, 0.167304466, -0.501389155, 0.764096389, 0.10111778, 0.0503681452, 0.717294348, -0.669466823, -0.167458401, -0.502259781, -0.764521108, 0.101557628, -0.0495682994 ] + - [ 0.718107296, 0.67126669, 0.167188539, -0.498366373, 0.761410747, 0.0995036818, 0.0526490431, 0.717249865, -0.670966515, -0.167343149, -0.499236872, -0.761832799, 0.0999459114, -0.0518520824 ] + - [ 0.718043902, 0.672845242, 0.167027704, -0.495209665, 0.758658399, 0.0978701779, 0.0550519705, 0.71718815, -0.672546682, -0.16718325, -0.496079658, -0.759077549, 0.0983145969, -0.0542583044 ] + - [ 0.717963139, 0.67450227, 0.166822803, -0.491921992, 0.755841018, 0.0962178933, 0.0575743078, 0.717109526, -0.674205598, -0.166979542, -0.492791109, -0.756257036, 0.0966643132, -0.0567843378 ] + - [ 0.71786534, 0.676236052, 0.16657468, -0.488506316, 0.752960275, 0.0945474533, 0.0602134356, 0.717014317, -0.675941537, -0.166732864, -0.489374193, -0.753372936, 0.0949956887, -0.0594275551 ] + - [ 0.717750837, 0.678044866, 0.166284179, -0.484965599, 0.750017843, 0.0928594831, 0.0629667343, 0.716902846, -0.677752771, -0.166444054, -0.485831878, -0.750426927, 0.0933093519, -0.0621853287 ] + - [ 0.717619962, 0.679926992, 0.165952142, -0.481302802, 0.747015393, 0.0911546082, 0.0658315842, 0.716775437, -0.679637574, -0.16611395, -0.482167133, -0.747420683, 0.0916059311, -0.0650550311 ] + - [ 0.717473049, 0.681880707, 0.165579413, -0.477520887, 0.743954598, 0.0894334539, 0.0688053659, 0.716632415, -0.681594218, -0.165743391, -0.478382927, -0.744355884, 0.0898860549, -0.0680340347 ] + - [ 0.717310429, 0.683904291, 0.165166836, -0.473622816, 0.740837129, 0.0876966454, 0.0718854598, 0.716474101, -0.683620977, -0.165333216, -0.474482228, -0.741234204, 0.0881503516, -0.071119712 ] + - [ 0.717132434, 0.685996022, 0.164715253, -0.469611549, 0.737664658, 0.0859448081, 0.0750692463, 0.716300821, -0.685716125, -0.164884262, -0.470468004, -0.738057321, 0.0863994498, -0.0743094354 ] + - [ 0.716939398, 0.688154178, 0.164225508, -0.465490049, 0.734438858, 0.0841785674, 0.0783541059, 0.716112897, -0.687877934, -0.164397368, -0.466343225, -0.734826911, 0.0846339777, -0.0776005773 ] + - [ 0.716731653, 0.690377038, 0.163698445, -0.461261277, 0.7311614, 0.0823985484, 0.081737419, 0.715910654, -0.690104678, -0.163873374, -0.462110858, -0.731544652, 0.082854564, -0.0809905103 ] + - [ 0.71650953, 0.69266288, 0.163134907, -0.456928195, 0.727833956, 0.0806053766, 0.085216566, 0.715694414, -0.69239463, -0.163313116, -0.457773872, -0.728212219, 0.0810618369, -0.0844766067 ] + - [ 0.716273363, 0.695009983, 0.162535736, -0.452493764, 0.724458198, 0.0787996773, 0.0887889275, 0.715464501, -0.694746062, -0.162717434, -0.453335237, -0.72483129, 0.079256425, -0.088056239 ] + - [ 0.716023484, 0.697416626, 0.161901777, -0.447960947, 0.721035798, 0.0769820757, 0.0924518837, 0.71522124, -0.697157249, -0.162087166, -0.44879792, -0.721403541, 0.0774389567, -0.0917267797 ] + - [ 0.715760225, 0.699881088, 0.161233873, -0.443332704, 0.717568427, 0.0751531973, 0.0962028153, 0.714964953, -0.699626464, -0.16142315, -0.44416489, -0.717930649, 0.0756100604, -0.0954856011 ] + - [ 0.715483919, 0.702401646, 0.160532868, -0.438611997, 0.714057759, 0.0733136672, 0.100039103, 0.714695965, -0.702151979, -0.160726226, -0.439439115, -0.71441429, 0.0737703646, -0.0993300758 ] + - [ 0.715194899, 0.704976579, 0.159799604, -0.433801788, 0.710505465, 0.071464111, 0.103958126, 0.714414598, -0.704732068, -0.15999723, -0.434623564, -0.710856142, 0.0719204977, -0.103257576 ] + - [ 0.714893495, 0.707604166, 0.159034924, -0.428905038, 0.706913216, 0.0696051537, 0.107957266, 0.714121177, -0.707365005, -0.159237003, -0.429721207, -0.707257881, 0.0700610881, -0.107265475 ] + - [ 0.714580042, 0.710282685, 0.158239673, -0.423924709, 0.703282686, 0.0677374209, 0.112033903, 0.713816025, -0.710049061, -0.158446382, -0.42473501, -0.703621184, 0.0681927644, -0.111351144 ] + - [ 0.714254871, 0.713010415, 0.157414694, -0.418863763, 0.699615544, 0.0658615378, 0.116185417, 0.713499466, -0.712782512, -0.157626206, -0.419667943, -0.699947727, 0.0663161548, -0.115511956 ] + - [ 0.713918314, 0.715785635, 0.15656083, -0.413725161, 0.695913465, 0.0639781297, 0.12040919, 0.713171823, -0.715563629, -0.156777312, -0.414522974, -0.696239187, 0.0644318879, -0.119745284 ] + - [ 0.713570705, 0.718606622, 0.155678924, -0.408511865, 0.692178119, 0.0620878219, 0.124702601, 0.71283342, -0.718390686, -0.155900541, -0.409303073, -0.692497241, 0.0625405921, -0.124048499 ] + - [ 0.713212376, 0.721471656, 0.15476982, -0.403226837, 0.688411178, 0.0601912398, 0.12906303, 0.71248458, -0.721261956, -0.154996729, -0.404011207, -0.688723565, 0.0606428958, -0.128418975 ] + - [ 0.712843659, 0.724379016, 0.153834361, -0.397873037, 0.684614315, 0.0582890086, 0.133487859, 0.712125628, -0.724175712, -0.154066716, -0.398650344, -0.684919837, 0.0587394274, -0.132854084 ] + - [ 0.712464886, 0.727326978, 0.15287339, -0.392453428, 0.680789202, 0.0563817538, 0.137974468, 0.711756886, -0.727130229, -0.15311134, -0.393223455, -0.681087732, 0.0568308155, -0.137351198 ] + - [ 0.71207639, 0.730313823, 0.151887751, -0.386970971, 0.676937509, 0.0544701006, 0.142520236, 0.711378679, -0.730123778, -0.15213144, -0.387733506, -0.677228928, 0.0549176885, -0.141907689 ] + - [ 0.711678503, 0.733337829, 0.150878287, -0.381428628, 0.67306091, 0.0525546743, 0.147122545, 0.71099133, -0.733154633, -0.151127853, -0.382183467, -0.673345101, 0.0530006747, -0.146520931 ] + - [ 0.711271558, 0.736397274, 0.149845842, -0.37582936, 0.669161076, 0.0506361003, 0.151778776, 0.710595162, -0.736221067, -0.150101418, -0.376576306, -0.669437929, 0.0510804026, -0.151188296 ] + - [ 0.710855887, 0.739490437, 0.148791259, -0.370176129, 0.665239679, 0.0487150038, 0.156486307, 0.710190499, -0.739321354, -0.149052975, -0.370914992, -0.665509086, 0.0491575008, -0.155907155 ] + - [ 0.710431822, 0.742615596, 0.147715381, -0.364471897, 0.661298392, 0.0467920102, 0.161242521, 0.709777666, -0.742453767, -0.14798336, -0.365202494, -0.661560252, 0.0472325975, -0.160674882 ] + - [ 0.709999697, 0.745771031, 0.146619051, -0.358719625, 0.657338885, 0.0448677449, 0.166044797, 0.709356985, -0.745616578, -0.146893413, -0.359441779, -0.657593101, 0.0453063212, -0.165488849 ] + - [ 0.709559843, 0.748955018, 0.145503114, -0.352922275, 0.653362831, 0.0429428331, 0.170890515, 0.708928779, -0.748808062, -0.145783972, -0.353635817, -0.653609311, 0.0433793004, -0.170346429 ] + - [ 0.709112592, 0.752165838, 0.144368411, -0.347082808, 0.649371903, 0.0410179001, 0.175777057, 0.708493374, -0.752026491, -0.144655876, -0.347787576, -0.649610559, 0.0414521635, -0.175244993 ] + - [ 0.708658278, 0.755401768, 0.143215788, -0.341204186, 0.645367771, 0.0390935713, 0.180701803, 0.708051091, -0.755270138, -0.143509963, -0.341900024, -0.64559852, 0.039525539, -0.180181914 ] + - [ 0.708197232, 0.758661088, 0.142046086, -0.335289371, 0.641352108, 0.037170472, 0.185662132, 0.707602256, -0.758537277, -0.142347071, -0.335976131, -0.641574873, 0.0376000553, -0.185154565 ] + - [ 0.707729788, 0.761942075, 0.14086015, -0.329341324, 0.637326585, 0.0352492275, 0.190655427, 0.707147191, -0.761826181, -0.141168039, -0.330018864, -0.637541293, 0.0356763408, -0.190160319 ] + - [ 0.707256276, 0.765243008, 0.139658822, -0.323363007, 0.633292875, 0.0333304631, 0.195679066, 0.70668622, -0.765135123, -0.139973706, -0.324031192, -0.633499457, 0.033755024, -0.195196547 ] + - [ 0.706777031, 0.768562166, 0.138442947, -0.317357381, 0.62925265, 0.0314148042, 0.20073043, 0.706219667, -0.768462377, -0.138764909, -0.318016084, -0.629451042, 0.0318367332, -0.200260622 ] + - [ 0.706292384, 0.771897828, 0.137213367, -0.311327408, 0.625207582, 0.029502876, 0.205806901, 0.705747855, -0.771806215, -0.137542487, -0.311976509, -0.625397725, 0.0299220971, -0.205349917 ] + - [ 0.705802668, 0.775248271, 0.135970926, -0.30527605, 0.621159342, 0.0275953039, 0.210905857, 0.705271108, -0.775164911, -0.136307279, -0.305915435, -0.621341182, 0.0280117438, -0.210461803 ] + - [ 0.705308214, 0.778611775, 0.134716466, -0.299206267, 0.617109603, 0.0256927133, 0.216024681, 0.70478975, -0.778536738, -0.135060123, -0.29983583, -0.61728309, 0.0261063021, -0.215593654 ] + - [ 0.704809356, 0.781986617, 0.133450833, -0.293121023, 0.613060035, 0.0237957293, 0.221160751, 0.704304104, -0.781919969, -0.133801858, -0.293740663, -0.613225126, 0.0242064001, -0.220742842 ] + - [ 0.704306427, 0.785371077, 0.132174868, -0.287023278, 0.609012313, 0.0219049774, 0.226311449, 0.703814493, -0.785312878, -0.132533322, -0.287632902, -0.609168967, 0.0223126665, -0.225906739 ] + - [ 0.703799757, 0.788763434, 0.130889416, -0.280915994, 0.604968106, 0.0200210829, 0.231474156, 0.703321242, -0.788713737, -0.131255353, -0.281515517, -0.605116288, 0.0204257296, -0.231082718 ] + - [ 0.70328968, 0.792161965, 0.129595319, -0.274802132, 0.600929088, 0.0181446711, 0.23664625, 0.702824674, -0.79212082, -0.12996879, -0.275391475, -0.601068767, 0.0185462178, -0.236268151 ] + - [ 0.702776529, 0.795564949, 0.128293421, -0.268684655, 0.59689693, 0.0162763672, 0.241825114, 0.702325112, -0.7955324, -0.128674472, -0.269263746, -0.597028081, 0.0166747597, -0.241460411 ] + - [ 0.702260634, 0.798970664, 0.126984565, -0.262566524, 0.592873304, 0.0144167967, 0.247008127, 0.701822881, -0.798946751, -0.127373236, -0.263135298, -0.592995906, 0.0148119836, -0.24665687 ] + - [ 0.70174233, 0.80237739, 0.125669595, -0.256450699, 0.588859882, 0.0125665848, 0.25219267, 0.701318304, -0.802362145, -0.126065922, -0.257009098, -0.588973919, 0.012958518, -0.2518549 ] + - [ 0.701221949, 0.805783405, 0.124349355, -0.250340144, 0.584858336, 0.0107263569, 0.257376123, 0.700811703, -0.805776856, -0.124753367, -0.250888117, -0.584963796, 0.0111149914, -0.257051875 ] + - [ 0.700699822, 0.809186988, 0.123024686, -0.244237819, 0.580870338, 0.0088967382, 0.262555867, 0.700303404, -0.809189156, -0.123436411, -0.244775323, -0.580967215, 0.00928203205, -0.262245165 ] + - [ 0.700176282, 0.812586416, 0.121696433, -0.238146687, 0.57689756, 0.00707835415, 0.267729282, 0.69979373, -0.81259732, -0.122115891, -0.238673683, -0.576985851, 0.00746026854, -0.267432145 ] + - [ 0.699651662, 0.815979968, 0.120365439, -0.232069708, 0.572941674, 0.00527183001, 0.272893749, 0.699283004, -0.81599962, -0.120792646, -0.232586167, -0.573021383, 0.00565032926, -0.272610186 ] + - [ 0.699126294, 0.819365924, 0.119032548, -0.226009845, 0.569004351, 0.00347779111, 0.278046648, 0.69877155, -0.819394329, -0.119467514, -0.226515743, -0.569075485, 0.00385284267, -0.277776661 ] + - [ 0.698600511, 0.822742561, 0.117698603, -0.219970058, 0.565087264, 0.00169686276, 0.283185359, 0.698259691, -0.822779722, -0.118141335, -0.22046538, -0.565149836, 0.00206843718, -0.282928942 ] + - [ 0.698074644, 0.826108158, 0.116364446, -0.213953311, 0.561192085, -7.03297052e-05, 0.288307263, 0.697747751, -0.82615407, -0.116814946, -0.214438046, -0.561246112, 0.000297741247, -0.288064402 ] + - [ 0.697549027, 0.829460994, 0.115030922, -0.207962563, 0.557320486, -0.00182316098, 0.29340974, 0.697236054, -0.829515647, -0.115489185, -0.20843671, -0.557365989, -0.0014586167, -0.293180413 ] + - [ 0.697023992, 0.832799348, 0.113698875, -0.202000777, 0.553474138, -0.00356100574, 0.298490171, 0.696724924, -0.832862727, -0.114164892, -0.202464341, -0.553511144, -0.00320000821, -0.298274347 ] + - [ 0.69649987, 0.836121497, 0.112369146, -0.196070914, 0.549654713, -0.00528323867, 0.303545937, 0.696214683, -0.836193583, -0.112842905, -0.196523906, -0.549683254, -0.00492580486, -0.303343577 ] + - [ 0.695976995, 0.83942572, 0.11104258, -0.190175937, 0.545863884, -0.00698923445, 0.308574417, 0.695705656, -0.839506487, -0.111524062, -0.190618375, -0.545883996, -0.00663537821, -0.308385476 ] + - [ 0.6954557, 0.842710296, 0.10972002, -0.184318806, 0.542103322, -0.00867836776, 0.313572992, 0.695198166, -0.842799713, -0.110209202, -0.184750716, -0.542115045, -0.00832809981, -0.313397416 ] + - [ 0.694936315, 0.845973503, 0.108402309, -0.178502483, 0.5383747, -0.0103500133, 0.318539043, 0.694692537, -0.846071535, -0.108899162, -0.178923897, -0.53837808, -0.0100033412, -0.318376769 ] + - [ 0.694419174, 0.849213621, 0.10709029, -0.172729929, 0.534679689, -0.0120035457, 0.32346995, 0.694189092, -0.849320225, -0.107594782, -0.173140888, -0.534674777, -0.011660474, -0.323320908 ] + - [ 0.69390461, 0.852428927, 0.105784808, -0.167004108, 0.531019961, -0.0136383397, 0.328363093, 0.693688155, -0.852544056, -0.106296901, -0.167404656, -0.531006811, -0.0132988698, -0.328227205 ] + - [ 0.693392954, 0.8556177, 0.104486705, -0.161327979, 0.527397188, -0.0152537699, 0.333215853, 0.69319005, -0.855741303, -0.105006355, -0.161718171, -0.527375861, -0.0149179, -0.333093033 ] + - [ 0.69288454, 0.858778219, 0.103196825, -0.155704504, 0.523813042, -0.0168492111, 0.33802561, 0.6926951, -0.858910238, -0.103723985, -0.156084401, -0.523783603, -0.0165169364, -0.337915764 ] + - [ 0.692379698, 0.861908761, 0.101916011, -0.150136646, 0.520269195, -0.0184240378, 0.342789745, 0.692203628, -0.862049133, -0.102450627, -0.150506314, -0.520231713, -0.0180953503, -0.342692771 ] + - [ 0.691878763, 0.865007607, 0.100645107, -0.144627366, 0.51676732, -0.0199776249, 0.347505639, 0.69171596, -0.865156264, -0.101187122, -0.144986879, -0.516721868, -0.0196525134, -0.347421425 ] + - [ 0.691382066, 0.868073034, 0.0993849552, -0.139179625, 0.513309087, -0.0215093469, 0.352170671, 0.691232417, -0.868229902, -0.0999343064, -0.139529064, -0.513255745, -0.0211877973, -0.3520991 ] + - [ 0.690889939, 0.87110332, 0.0981363996, -0.133796385, 0.509896169, -0.0230185786, 0.356782222, 0.690753324, -0.871268321, -0.0986930198, -0.134135839, -0.50983502, -0.0227005735, -0.356723168 ] + - [ 0.690402716, 0.874096745, 0.0969002836, -0.128480607, 0.506530237, -0.0245046947, 0.361337673, 0.690279004, -0.874269794, -0.0974641002, -0.128810171, -0.506461371, -0.0241902136, -0.361291002 ] + - [ 0.689920728, 0.877051587, 0.0956774504, -0.123235254, 0.503212965, -0.0259670697, 0.365834403, 0.689809781, -0.877232595, -0.0962483862, -0.12355503, -0.503136473, -0.0256560892, -0.365799973 ] + - [ 0.689444308, 0.879966124, 0.0944687435, -0.118063286, 0.499946023, -0.0274050785, 0.370269794, 0.689345978, -0.880154996, -0.0950467162, -0.118373383, -0.499862004, -0.0270975717, -0.370247454 ] + - [ 0.688973789, 0.882838636, 0.0932750062, -0.112967665, 0.496731084, -0.0288180956, 0.374641226, 0.68888792, -0.883035271, -0.0938599286, -0.1132682, -0.496639641, -0.0285140328, -0.374630819 ] + - [ 0.688509502, 0.885667399, 0.0920970818, -0.107951354, 0.493569819, -0.0302054958, 0.378946079, 0.688435929, -0.885871693, -0.0926888619, -0.108242448, -0.493471059, -0.029904844, -0.378947438 ] + - [ 0.688051781, 0.888450694, 0.0909358138, -0.103017313, 0.490463901, -0.0315666537, 0.383181734, 0.68799033, -0.888662535, -0.0915343546, -0.103299097, -0.490357936, -0.0312693769, -0.383194685 ] + - [ 0.687600957, 0.891186799, 0.0897920454, -0.0981685044, 0.487415001, -0.0329009441, 0.387345571, 0.687551446, -0.89140607, -0.090397245, -0.0984411146, -0.487301949, -0.032607003, -0.387369932 ] + - [ 0.687157363, 0.893873992, 0.08866662, -0.0934078894, 0.484424792, -0.0342077415, 0.391434971, 0.6871196, -0.894100572, -0.0892783717, -0.09367147, -0.484304773, -0.033917094, -0.391470552 ] + - [ 0.686721332, 0.896510551, 0.087560381, -0.0887384297, 0.481494945, -0.0354864208, 0.395447313, 0.686695116, -0.896744314, -0.088178573, -0.0889931315, -0.481368087, -0.0351990213, -0.395493916 ] + - [ 0.686293195, 0.899094756, 0.0864741718, -0.084163087, 0.478627132, -0.0367363565, 0.39937998, 0.686278318, -0.899335569, -0.0870986875, -0.0844090676, -0.478493566, -0.0364521565, -0.399437398 ] + - [ 0.685873286, 0.901624885, 0.0854088356, -0.0796848228, 0.475823026, -0.0379569233, 0.40323035, 0.68586953, -0.90187261, -0.0860395536, -0.079922247, -0.475682887, -0.0376758713, -0.40329837 ] + - [ 0.685461936, 0.904099216, 0.0843652159, -0.0753065987, 0.473084297, -0.039147496, 0.406995804, 0.685469074, -0.904353711, -0.0850020097, -0.0755356381, -0.472937727, -0.0388695371, -0.407074204 ] + - [ 0.685059479, 0.906516028, 0.083344156, -0.0710313763, 0.470412619, -0.0403074491, 0.410673724, 0.685077275, -0.906777144, -0.0839868942, -0.0712522096, -0.470259762, -0.0400325255, -0.410762272 ] + - [ 0.684666246, 0.908873599, 0.0823464993, -0.0668621173, 0.467809663, -0.0414361575, 0.414261488, 0.684694456, -0.909141184, -0.0829950457, -0.0670749299, -0.46765067, -0.0411642082, -0.414359948 ] + - [ 0.68428257, 0.911170209, 0.0813730891, -0.0628017832, 0.465277101, -0.0425329957, 0.417756479, 0.684320942, -0.911444102, -0.0820273026, -0.0630067678, -0.465112127, -0.0422639565, -0.417864604 ] + - [ 0.683908783, 0.913404135, 0.0804247688, -0.0588533356, 0.462816605, -0.0435973385, 0.421156075, 0.683957054, -0.913684173, -0.0810845032, -0.0590506916, -0.462645809, -0.0433311422, -0.421273612 ] + - [ 0.683545218, 0.915573656, 0.0795023818, -0.0550197362, 0.460429846, -0.0446285605, 0.424457658, 0.683603118, -0.915859669, -0.0801674862, -0.05520967, -0.460253394, -0.0443651367, -0.424584344 ] + - [ 0.683192207, 0.917677051, 0.0786067713, -0.0513039465, 0.458118497, -0.0456260364, 0.427658608, 0.683259456, -0.917968864, -0.0792770898, -0.0514866715, -0.457936557, -0.0453653117, -0.427794173 ] + - [ 0.682850083, 0.919712598, 0.0777387808, -0.0477089281, 0.455884231, -0.0465891409, 0.430756305, 0.682926392, -0.920010031, -0.0784141526, -0.0478846646, -0.455696977, -0.0463310386, -0.430900471 ] + - [ 0.682519178, 0.921678576, 0.0768992536, -0.0442376426, 0.453728717, -0.0475172486, 0.433748131, 0.682604251, -0.921981443, -0.077579513, -0.0444066181, -0.453536329, -0.0472616891, -0.433900612 ] + - [ 0.682199824, 0.923573263, 0.0760890331, -0.0408930517, 0.45165363, -0.0484097344, 0.436631465, 0.682293355, -0.923881373, -0.0767740094, -0.0410555003, -0.45145629, -0.0481566347, -0.436791967 ] + - [ 0.681892354, 0.925394938, 0.0753089626, -0.0376781169, 0.44966064, -0.0492659727, 0.439403687, 0.681994028, -0.925708095, -0.0759984804, -0.0378342799, -0.449458537, -0.049015247, -0.439571908 ] + - [ 0.6815971, 0.92714188, 0.0745598855, -0.0345957998, 0.44775142, -0.0500853384, 0.442062179, 0.681706593, -0.927459882, -0.0752537643, -0.0347459253, -0.447544746, -0.0498368975, -0.442237809 ] + - [ 0.681314395, 0.928812367, 0.0738426451, -0.031649062, 0.445927641, -0.050867206, 0.44460432, 0.681431375, -0.929135007, -0.0745406996, -0.0317934053, -0.445716595, -0.0506209579, -0.444787041 ] + - [ 0.681044571, 0.930404677, 0.0731580848, -0.0288408652, 0.444190975, -0.0516109504, 0.447027492, 0.681168697, -0.930731743, -0.0738601247, -0.0289796882, -0.44397576, -0.0513667996, -0.447216978 ] + - [ 0.680787961, 0.931917089, 0.072507048, -0.0261741708, 0.442543095, -0.0523159461, 0.449329074, 0.680918883, -0.932248363, -0.0732128781, -0.0263077428, -0.442323917, -0.0520737942, -0.449524991 ] + - [ 0.680544896, 0.933347882, 0.071890378, -0.0236519406, 0.440985672, -0.0529815678, 0.451506447, 0.680682256, -0.933683141, -0.0725997983, -0.0237805375, -0.440762743, -0.0527413133, -0.451708453 ] + - [ 0.68031571, 0.934695334, 0.0713089182, -0.0212771361, 0.439520378, -0.0536071902, 0.453556992, 0.680459139, -0.93503435, -0.0720217236, -0.0214010409, -0.439293916, -0.0533687284, -0.453764736 ] + - [ 0.680100735, 0.935957724, 0.0707635119, -0.0190527189, 0.438148886, -0.054192188, 0.455478088, 0.680249857, -0.936300263, -0.0714794926, -0.0191722215, -0.437919111, -0.0539554112, -0.455691213 ] + - [ 0.679900302, 0.93713333, 0.0702550025, -0.0169816506, 0.436872867, -0.054735936, 0.457267117, 0.680054733, -0.937479154, -0.0709739437, -0.017097048, -0.436640006, -0.0545007331, -0.457485257 ] + - [ 0.679714746, 0.938220431, 0.0697842334, -0.0150668928, 0.435693992, -0.0552378086, 0.458921458, 0.67987409, -0.938569294, -0.0705059153, -0.0151784888, -0.435458277, -0.0550040658, -0.459144239 ] + - [ 0.679544397, 0.939217305, 0.0693520478, -0.0133114072, 0.434613935, -0.0556971807, 0.460438493, 0.679708253, -0.939568959, -0.0700762458, -0.0134195125, -0.4343756, -0.0554647807, -0.460665533 ] + - [ 0.679389588, 0.940122231, 0.0689592892, -0.0117181552, 0.433634367, -0.056113427, 0.461815601, 0.679557544, -0.94047642, -0.0696857738, -0.0118230878, -0.433393653, -0.0558822495, -0.46204651 ] + - [ 0.679250653, 0.940933488, 0.068606801, -0.0102900986, 0.432756959, -0.056485922, 0.463050163, 0.679422288, -0.941289952, -0.0693353377, -0.010392183, -0.432514113, -0.0562558438, -0.463284544 ] + - [ 0.679127922, 0.941649354, 0.0682954264, -0.00903019887, 0.431983385, -0.0568140405, 0.46413956, 0.679302808, -0.942007826, -0.0690257759, -0.00912976692, -0.431738655, -0.056584935, -0.464377006 ] + - [ 0.67902173, 0.942268107, 0.0680260088, -0.00794141765, 0.431315315, -0.0570971572, 0.465081172, 0.679199428, -0.942628318, -0.0687579268, -0.00803880796, -0.431068957, -0.0568688948, -0.465321269 ] + - [ 0.678932407, 0.942788026, 0.0677993916, -0.00702671653, 0.430754422, -0.0573346467, 0.465872379, 0.679112471, -0.943149699, -0.068532629, -0.00712227471, -0.430506695, -0.0571070946, -0.466114705 ] + - [ 0.678860287, 0.94320739, 0.0676164182, -0.00628905712, 0.430302378, -0.0575258837, 0.466510562, 0.679042261, -0.943570243, -0.0683507208, -0.00638313573, -0.430053546, -0.0572989061, -0.466754688 ] + - [ 0.678805702, 0.943524478, 0.0674779319, -0.00573140102, 0.429960854, -0.057670243, 0.466993102, 0.678989121, -0.943888223, -0.0682130407, -0.00582435958, -0.429711186, -0.0574437009, -0.467238589 ] + - [ 0.678768984, 0.943737567, 0.067384776, -0.00535670981, 0.429731522, -0.0577670991, 0.467317378, 0.678953375, -0.944101913, -0.0681204272, -0.00544891483, -0.429481293, -0.0575408505, -0.46756378 ] + - [ 0.678750465, 0.943844936, 0.067337794, -0.00516794511, 0.429616056, -0.0578158268, 0.467480771, 0.678935348, -0.944209585, -0.0680737187, -0.00525977001, -0.429365543, -0.0575897264, -0.467727635 ] + - [ 0.678748135, 0.943858438, 0.0673318817, -0.0051442107, 0.429601544, -0.0578219471, 0.467501318, 0.678933079, -0.944223125, -0.0680678408, -0.00523598776, -0.429350996, -0.0575958653, -0.46774824 ] + - [ 0.678748135, 0.943858438, 0.0673318817, -0.0051442107, 0.429601544, -0.0578219471, 0.467501318, 0.678933079, -0.944223125, -0.0680678408, -0.00523598776, -0.429350996, -0.0575958653, -0.46774824 ] + - [ 0.678748135, 0.943858438, 0.0673318817, -0.0051442107, 0.429601544, -0.0578219471, 0.467501318, 0.678933079, -0.944223125, -0.0680678408, -0.00523598776, -0.429350996, -0.0575958653, -0.46774824 ] + - [ 0.678748135, 0.943858438, 0.0673318817, -0.0051442107, 0.429601544, -0.0578219471, 0.467501318, 0.678933079, -0.944223125, -0.0680678408, -0.00523598776, -0.429350996, -0.0575958653, -0.46774824 ] + - [ 0.678743939, 0.943849197, 0.0673295698, -0.00512904662, 0.429611493, -0.0578285948, 0.467526334, 0.678928875, -0.944213844, -0.0680655081, -0.00522082905, -0.429360999, -0.0576025681, -0.467773195 ] + - [ 0.678710477, 0.943775765, 0.0673111364, -0.00500854512, 0.429690549, -0.0578814211, 0.467725125, 0.678895346, -0.944140094, -0.0680469089, -0.00510037025, -0.429440485, -0.0576558322, -0.467971501 ] + - [ 0.678643821, 0.943630165, 0.0672744271, -0.00476961508, 0.429847303, -0.0579861649, 0.468119288, 0.678828557, -0.943993862, -0.068009871, -0.00486152486, -0.429598091, -0.0577614441, -0.468364703 ] + - [ 0.67854425, 0.943413714, 0.0672196067, -0.00441441957, 0.430080334, -0.058141878, 0.468705254, 0.678728788, -0.943776472, -0.0679545619, -0.00450645519, -0.429832388, -0.0579184477, -0.468949239 ] + - [ 0.678412043, 0.94312773, 0.0671468397, -0.00394512167, 0.430388224, -0.0583476121, 0.469479454, 0.67859632, -0.943489249, -0.0678811489, -0.00403732356, -0.430141951, -0.0581258869, -0.469721551 ] + - [ 0.67824748, 0.942773533, 0.0670562905, -0.00336388446, 0.430769553, -0.058602419, 0.470438321, 0.678431433, -0.943133516, -0.0677897995, -0.00345629227, -0.430525353, -0.0583828055, -0.470678079 ] + - [ 0.67805084, 0.942352439, 0.0669481238, -0.00267287101, 0.431222902, -0.0589053503, 0.471578285, 0.678234407, -0.942710596, -0.0676806811, -0.00276552365, -0.430981166, -0.0586882474, -0.471815263 ] + - [ 0.677822402, 0.941865767, 0.0668225042, -0.00187424441, 0.431746852, -0.0592554578, 0.472895778, 0.678005522, -0.942221814, -0.0675539611, -0.00196718, -0.431507964, -0.0590412565, -0.473129543 ] + - [ 0.677562446, 0.941314836, 0.0666795961, -0.000970167739, 0.432339985, -0.0596517932, 0.474387233, 0.677745059, -0.941668494, -0.067409807, -0.00106342363, -0.432104321, -0.0594408767, -0.474617359 ] + - [ 0.677271251, 0.940700963, 0.0665195641, 3.71959326e-05, 0.43300088, -0.0600934083, 0.47604908, 0.677453299, -0.941051959, -0.0672483862, -5.64168656e-05, -0.432768808, -0.0598861518, -0.476275153 ] + - [ 0.676949096, 0.940025466, 0.0663425727, 0.00114568352, 0.43372812, -0.0605793549, 0.47787775, 0.677130522, -0.940373534, -0.0670698662, 0.00105167799, -0.4335, -0.0603761257, -0.478099363 ] + - [ 0.676596261, 0.939289664, 0.0661487866, 0.00235313195, 0.434520283, -0.0611086846, 0.479869677, 0.676777007, -0.939634542, -0.0668744143, 0.00225869863, -0.434296469, -0.0609098423, -0.480086431 ] + - [ 0.676213024, 0.938494875, 0.0659383703, 0.00365737814, 0.435375953, -0.0616804491, 0.482021291, 0.676393036, -0.938836306, -0.066662198, 0.00356248274, -0.435156789, -0.0614863455, -0.482232797 ] + - [ 0.675799666, 0.937642417, 0.0657114883, 0.00505625902, 0.436293709, -0.0622937003, 0.484329023, 0.675978888, -0.937980152, -0.0664333847, 0.004960868, -0.436079533, -0.0621046791, -0.484534901 ] + - [ 0.675356466, 0.936733608, 0.0654683052, 0.0065476115, 0.437272132, -0.0629474898, 0.486789306, 0.675534844, -0.937067403, -0.0661881419, 0.0064516921, -0.437063275, -0.062763887, -0.486989182 ] + - [ 0.674883703, 0.935769767, 0.0652089856, 0.00812927251, 0.438309804, -0.0636408694, 0.489398571, 0.675061185, -0.936099382, -0.0659266369, 0.00803279274, -0.438106586, -0.0634630132, -0.489592083 ] + - [ 0.674381655, 0.93475221, 0.0649336939, 0.00979907896, 0.439405304, -0.0643728908, 0.492153249, 0.67455819, -0.935077414, -0.0656490373, 0.00970200759, -0.439208041, -0.0642011014, -0.492340042 ] + - [ 0.673850604, 0.933682258, 0.0646425948, 0.0115548678, 0.440557215, -0.0651426058, 0.495049772, 0.674026141, -0.934002822, -0.0653555104, 0.0114571743, -0.440366212, -0.0649771955, -0.4952295 ] + - [ 0.673290827, 0.932561227, 0.0643358528, 0.0133944759, 0.441764116, -0.0659490661, 0.498084572, 0.673465317, -0.93287693, -0.0650462237, 0.0132961307, -0.441579673, -0.0657903395, -0.498256898 ] + - [ 0.672702605, 0.931390436, 0.0640136324, 0.0153157402, 0.443024589, -0.0667913234, 0.501254079, 0.672875999, -0.931701063, -0.0647213446, 0.0152167143, -0.442846997, -0.0666395771, -0.501418675 ] + - [ 0.672086216, 0.930171203, 0.0636760982, 0.0173164977, 0.444337215, -0.0676684294, 0.504554727, 0.672258466, -0.930476543, -0.0643810405, 0.0172167629, -0.444166757, -0.0675239524, -0.504711272 ] + - [ 0.67144194, 0.928904846, 0.0633234148, 0.0193945852, 0.445700574, -0.0685794359, 0.507982946, 0.671613001, -0.929204695, -0.0640254789, 0.0192941142, -0.445537526, -0.0684425091, -0.508131129 ] + - [ 0.670770056, 0.927592683, 0.0629557468, 0.0215478397, 0.447113248, -0.0695233947, 0.511535168, 0.670939882, -0.927886843, -0.0636548271, 0.0214466058, -0.446957877, -0.0693942911, -0.511674687 ] + - [ 0.670070844, 0.926236033, 0.0625732585, 0.0237740981, 0.448573816, -0.0704993574, 0.515207824, 0.67023939, -0.926524311, -0.0632692527, 0.0236720755, -0.448426385, -0.0703783423, -0.515338385 ] + - [ 0.669344582, 0.924836214, 0.0621761147, 0.0260711973, 0.450080861, -0.0715063758, 0.518997347, 0.669511806, -0.925118422, -0.062868923, 0.0259683608, -0.449941621, -0.0713937066, -0.519118664 ] + - [ 0.668591551, 0.923394543, 0.0617644799, 0.0284369742, 0.451632963, -0.0725435016, 0.522900167, 0.668757409, -0.9236705, -0.0624540056, 0.0283332996, -0.451502158, -0.0724394278, -0.523011965 ] + - [ 0.667812029, 0.921912339, 0.0613385186, 0.0308692659, 0.453228703, -0.0736097866, 0.526912716, 0.667976481, -0.92218187, -0.0620246677, 0.0307647295, -0.453106571, -0.0735145499, -0.527014727 ] + - [ 0.667006297, 0.92039092, 0.0608983953, 0.0333659091, 0.454866662, -0.0747042825, 0.531031426, 0.667169301, -0.920653854, -0.0615810768, 0.0332604881, -0.454753432, -0.0746181166, -0.531123391 ] + - [ 0.666174632, 0.918831605, 0.0604442747, 0.0359247408, 0.45654542, -0.075826041, 0.535252728, 0.666336151, -0.919087778, -0.0611234005, 0.0358184133, -0.456441315, -0.0757491719, -0.535334397 ] + - [ 0.665317315, 0.917235711, 0.0599763213, 0.0385435979, 0.458263559, -0.0769741139, 0.539573054, 0.665477309, -0.917484964, -0.060651806, 0.0384363425, -0.458168792, -0.0769067597, -0.539644185 ] + - [ 0.664434624, 0.915604556, 0.0594946997, 0.0412203174, 0.460019659, -0.0781475529, 0.543988836, 0.664593057, -0.915846736, -0.0601664609, 0.0411121137, -0.459934437, -0.0780899238, -0.544049196 ] + - [ 0.66352684, 0.913939459, 0.0589995743, 0.0439527361, 0.461812302, -0.0793454097, 0.548496504, 0.663683675, -0.91417442, -0.0596675325, 0.0438435644, -0.461736823, -0.0792977082, -0.54854587 ] + - [ 0.662594241, 0.912241738, 0.0584911098, 0.0467386911, 0.463640068, -0.0805667361, 0.553092491, 0.662749443, -0.912469337, -0.0591551883, 0.0466285323, -0.463574523, -0.0805291566, -0.553130647 ] + - [ 0.661637107, 0.910512711, 0.0579694706, 0.0495760192, 0.465501538, -0.0818105838, 0.557773229, 0.661790642, -0.910732813, -0.0586295958, 0.0494648551, -0.46544611, -0.0817833129, -0.557799968 ] + - [ 0.660655716, 0.908753695, 0.0574348214, 0.0524625572, 0.467395293, -0.0830760046, 0.562535148, 0.660807552, -0.908966171, -0.0580909223, 0.0523503705, -0.467350158, -0.0830592211, -0.562550272 ] + - [ 0.65965035, 0.90696601, 0.0568873268, 0.0553961423, 0.469319913, -0.0843620501, 0.56737468, 0.659800453, -0.907170735, -0.0575393352, 0.0552829162, -0.469285239, -0.084355925, -0.567378 ] + - [ 0.658621286, 0.905150974, 0.0563271511, 0.0583746112, 0.471273981, -0.0856677721, 0.572288258, 0.658769626, -0.905347829, -0.0569750021, 0.0582603299, -0.471249927, -0.0856724684, -0.572279593 ] + - [ 0.657568804, 0.903309904, 0.0557544591, 0.061395801, 0.473256076, -0.0869922224, 0.577272312, 0.657715351, -0.903498776, -0.0563980903, 0.0612804492, -0.473242794, -0.0870078954, -0.57725149 ] + - [ 0.656493184, 0.901444119, 0.0551694153, 0.0644575484, 0.475264779, -0.0883344526, 0.582323273, 0.656637908, -0.901624901, -0.0558087673, 0.0643411119, -0.475262415, -0.0883612496, -0.582290132 ] + - [ 0.655394704, 0.899554936, 0.0545721842, 0.0675576905, 0.477298672, -0.0896935146, 0.587437575, 0.655537578, -0.899727527, -0.0552072005, 0.0674401556, -0.477307363, -0.0897315751, -0.587391959 ] + - [ 0.654273644, 0.897643675, 0.0539629303, 0.0706940642, 0.479356335, -0.09106846, 0.592611648, 0.654414641, -0.897807979, -0.0545935573, 0.0705754181, -0.479376209, -0.0911179156, -0.592553412 ] + - [ 0.653130284, 0.895711653, 0.0533418183, 0.0738645063, 0.481436349, -0.0924583405, 0.597841923, 0.653269378, -0.895867579, -0.0539680052, 0.073744737, -0.481467529, -0.0925193152, -0.59777093 ] + - [ 0.651964902, 0.893760188, 0.0527090127, 0.0770668539, 0.483537295, -0.093862208, 0.603124833, 0.652102068, -0.893907653, -0.0533307116, 0.07694595, -0.483579894, -0.0939348175, -0.603040954 ] + - [ 0.650777778, 0.891790599, 0.052064678, 0.0802989438, 0.485657754, -0.0952791142, 0.608456808, 0.650912992, -0.891929524, -0.0526818438, 0.0801768947, -0.485711878, -0.0953634666, -0.608359924 ] + - [ 0.649569192, 0.889804203, 0.0514089787, 0.0835586129, 0.487796307, -0.0967081107, 0.613834281, 0.649702431, -0.889934515, -0.0520215695, 0.083435409, -0.487862054, -0.0968043062, -0.613724281 ] + - [ 0.648339423, 0.887802319, 0.0507420796, 0.0868436982, 0.489951535, -0.0981482494, 0.619253683, 0.648470665, -0.887923951, -0.0513500559, 0.0867193304, -0.490028995, -0.0982563803, -0.619130465 ] + - [ 0.647088749, 0.885786264, 0.050064145, 0.0901520366, 0.492122018, -0.0995985819, 0.624711446, 0.647217973, -0.885899155, -0.0506674705, 0.0900264967, -0.492211275, -0.0997187327, -0.624574915 ] + - [ 0.645817451, 0.883757358, 0.0493753395, 0.093481465, 0.494306337, -0.10105816, 0.630204001, 0.645944637, -0.883861452, -0.0499739808, 0.0933547455, -0.494407466, -0.101190407, -0.630054073 ] + - [ 0.644525807, 0.881716918, 0.0486758278, 0.0968298203, 0.496503074, -0.102526035, 0.63572778, 0.644650938, -0.881812165, -0.0492697541, 0.0967019146, -0.496616142, -0.102670448, -0.635564379 ] + - [ 0.643214097, 0.879666262, 0.0479657743, 0.10019494, 0.498710809, -0.10400126, 0.641279213, 0.643337154, -0.879752617, -0.0485549579, 0.100065842, -0.498835876, -0.104157899, -0.641102272 ] + - [ 0.641882601, 0.877606709, 0.0472453436, 0.10357466, 0.500928122, -0.105482885, 0.646854734, 0.642003567, -0.877684134, -0.0478297597, 0.103444364, -0.501065242, -0.105651803, -0.646664194 ] + - [ 0.640531597, 0.875539577, 0.0465147003, 0.106966817, 0.503153596, -0.106969963, 0.652450774, 0.640650456, -0.875608039, -0.0470943268, 0.10683532, -0.503302811, -0.107151206, -0.652246584 ] + - [ 0.639161365, 0.873466183, 0.0457740089, 0.11036925, 0.505385811, -0.108461545, 0.658063763, 0.639278103, -0.873525655, -0.0463488267, 0.110236547, -0.505547158, -0.10865515, -0.657845882 ] + - [ 0.637772184, 0.871387846, 0.0450234339, 0.113779793, 0.507623347, -0.109956683, 0.663690134, 0.637886788, -0.871438307, -0.0455934268, 0.113645882, -0.507796856, -0.110162679, -0.66345853 ] + - [ 0.636364334, 0.869305885, 0.04426314, 0.117196286, 0.509864786, -0.111454429, 0.669326318, 0.63647679, -0.869347318, -0.0448282946, 0.117061164, -0.510050477, -0.111672837, -0.669080967 ] + - [ 0.634938094, 0.867221616, 0.0434932916, 0.120616563, 0.512108709, -0.112953834, 0.674968747, 0.635048391, -0.867254012, -0.0440535975, 0.12048023, -0.512306595, -0.113184669, -0.674709633 ] + - [ 0.633493743, 0.865136359, 0.0427140534, 0.124038463, 0.514353695, -0.11445395, 0.680613852, 0.633601871, -0.865159714, -0.0432695028, 0.123900918, -0.514563784, -0.114697218, -0.680340969 ] + - [ 0.63203156, 0.863051432, 0.0419255899, 0.127459823, 0.516598327, -0.11595383, 0.686258065, 0.632137509, -0.863065746, -0.0424761781, 0.127321065, -0.516820616, -0.116209528, -0.685971415 ] + - [ 0.630551826, 0.860968152, 0.0411280655, 0.130878478, 0.518841185, -0.117452524, 0.691897818, 0.630655587, -0.860973433, -0.0416737908, 0.130738509, -0.519075664, -0.117720643, -0.691597412 ] + - [ 0.629054818, 0.858887838, 0.040321645, 0.134292267, 0.52108085, -0.118949084, 0.697529541, 0.629156384, -0.858884099, -0.0408625083, 0.134151088, -0.521327502, -0.119229607, -0.697215399 ] + - [ 0.627540817, 0.856811808, 0.0395064928, 0.137699025, 0.523315903, -0.120442563, 0.703149667, 0.627640181, -0.856799068, -0.040042498, 0.13755664, -0.523574702, -0.120735463, -0.702821817 ] + - [ 0.626010102, 0.85474138, 0.0386827735, 0.14109659, 0.525544925, -0.121932011, 0.708754628, 0.626107259, -0.854719663, -0.0392139273, 0.140953001, -0.525815839, -0.122237255, -0.708413106 ] + - [ 0.624462953, 0.852677872, 0.0378506517, 0.1444828, 0.527766496, -0.123416481, 0.714340854, 0.624557898, -0.852647208, -0.0383769637, 0.144338011, -0.528049485, -0.123734028, -0.713985707 ] + - [ 0.622899647, 0.850622603, 0.0370102918, 0.14785549, 0.529979198, -0.124895025, 0.719904777, 0.622992377, -0.850583027, -0.0375317747, 0.147709506, -0.530274213, -0.125224825, -0.71953606 ] + - [ 0.621320466, 0.848576891, 0.0361618585, 0.151212497, 0.532181611, -0.126366693, 0.72544283, 0.621410978, -0.848528445, -0.0366785276, 0.151065324, -0.532488596, -0.126708691, -0.725060604 ] + - [ 0.619725687, 0.846542053, 0.0353055163, 0.15455166, 0.534372317, -0.127830539, 0.730951443, 0.619813981, -0.846484784, -0.0358173899, 0.154403303, -0.534691208, -0.128184668, -0.730555781 ] + - [ 0.618115591, 0.844519408, 0.0344414298, 0.157870813, 0.536549895, -0.129285612, 0.736427047, 0.618201666, -0.844453369, -0.034948529, 0.157721281, -0.536880622, -0.129651801, -0.73601803 ] + - [ 0.616490457, 0.842510274, 0.0335697635, 0.161167796, 0.538712928, -0.130730967, 0.741866076, 0.616574313, -0.842435523, -0.0340721123, 0.161017095, -0.539055411, -0.131109134, -0.741443792 ] + - [ 0.614850564, 0.840515969, 0.0326906819, 0.164440443, 0.540859995, -0.132165653, 0.747264959, 0.614932203, -0.840432572, -0.0331883073, 0.164288583, -0.541214148, -0.13255571, -0.746829507 ] + - [ 0.613196192, 0.838537812, 0.0318043497, 0.167686593, 0.542989679, -0.133588723, 0.75262013, 0.613275616, -0.838445837, -0.0322972814, 0.167533583, -0.543355407, -0.133990574, -0.752171616 ] + - [ 0.611527619, 0.83657712, 0.0309109313, 0.170904082, 0.545100559, -0.134999228, 0.757928018, 0.611604833, -0.836476644, -0.031399202, 0.170749932, -0.545477759, -0.135412769, -0.757466558 ] + - [ 0.609845125, 0.834635211, 0.0300105914, 0.174090747, 0.547191216, -0.13639622, 0.763185057, 0.609920134, -0.834526315, -0.0304942366, 0.173935469, -0.54757978, -0.13682134, -0.762710774 ] + - [ 0.60814899, 0.832713405, 0.0291034944, 0.177244426, 0.549260232, -0.137778752, 0.768387677, 0.608221798, -0.832596176, -0.0295825526, 0.17708803, -0.549660041, -0.138215329, -0.767900704 ] + - [ 0.606439492, 0.830813018, 0.028189805, 0.180362954, 0.551306187, -0.139145874, 0.77353231, 0.606510108, -0.830687549, -0.0286643174, 0.180205453, -0.551717117, -0.139593782, -0.773032789 ] + - [ 0.604716912, 0.82893537, 0.0272696877, 0.183444169, 0.553327663, -0.140496639, 0.778615388, 0.604785342, -0.82880176, -0.0277396984, 0.183285576, -0.553749579, -0.140955741, -0.778103469 ] + - [ 0.602981528, 0.827081777, 0.026343307, 0.186485908, 0.55532324, -0.141830098, 0.783633342, 0.603047781, -0.82694013, -0.0268088631, 0.186326238, -0.555756002, -0.142300251, -0.783109183 ] + - [ 0.601233619, 0.825253559, 0.0254108275, 0.189486008, 0.557291498, -0.143145302, 0.788582603, 0.601297706, -0.825103985, -0.0258719789, 0.189325275, -0.557734958, -0.143626356, -0.788046373 ] + - [ 0.599473466, 0.823452034, 0.0244724137, 0.192442305, 0.55923102, -0.144441305, 0.793459604, 0.599535397, -0.823294648, -0.0249292133, 0.192280525, -0.559685021, -0.144933099, -0.792911478 ] + - [ 0.597701347, 0.821678519, 0.0235282303, 0.195352637, 0.561140385, -0.145717156, 0.798260776, 0.597761135, -0.821513444, -0.0239807336, 0.195189825, -0.561604764, -0.146219525, -0.79770094 ] + - [ 0.595917542, 0.819934333, 0.0225784417, 0.198214841, 0.563018174, -0.146971909, 0.802982551, 0.595975198, -0.819761695, -0.0230267073, 0.198051015, -0.563492759, -0.147484676, -0.802411197 ] + - [ 0.594122329, 0.818220794, 0.0216232125, 0.201026753, 0.56486297, -0.148204615, 0.807621359, 0.594177869, -0.818040727, -0.0220673019, 0.20086193, -0.565347581, -0.148727598, -0.807038691 ] + - [ 0.592315989, 0.81653922, 0.0206627072, 0.20378621, 0.566673351, -0.149414325, 0.812173633, 0.592369428, -0.816351861, -0.0211026847, 0.20362041, -0.567167802, -0.149947334, -0.811579861 ] + - [ 0.590498801, 0.81489093, 0.0196970905, 0.206491049, 0.5684479, -0.150600091, 0.816635804, 0.590550153, -0.814696424, -0.0201330231, 0.206324291, -0.568951996, -0.151142928, -0.816031149 ] + - [ 0.588671044, 0.81327724, 0.0187265269, 0.209139108, 0.570185197, -0.151760966, 0.821004304, 0.588720327, -0.813075738, -0.0191584847, 0.208971412, -0.570698736, -0.152313423, -0.820388993 ] + - [ 0.586832997, 0.811699471, 0.0177511808, 0.211728223, 0.571883823, -0.152896, 0.825275564, 0.586880229, -0.811491127, -0.0181792369, 0.211559609, -0.572406594, -0.153457864, -0.824649835 ] + - [ 0.584984939, 0.810158939, 0.016771217, 0.214256231, 0.573542359, -0.154004246, 0.829446016, 0.58503014, -0.809943916, -0.017195447, 0.214086721, -0.574074144, -0.154575295, -0.828810115 ] + - [ 0.583127151, 0.808656963, 0.0157867998, 0.216720968, 0.575159386, -0.155084755, 0.833512092, 0.58317034, -0.808435427, -0.0162072826, 0.216550586, -0.575699959, -0.155664759, -0.832866273 ] + - [ 0.581259911, 0.807194861, 0.014798094, 0.219120273, 0.576733484, -0.156136579, 0.837470222, 0.58130111, -0.806966986, -0.0152149109, 0.218949041, -0.577282613, -0.1567253, -0.83681475 ] + - [ 0.579383498, 0.805773951, 0.0138052639, 0.221451982, 0.578263235, -0.157158769, 0.84131684, 0.579422729, -0.805539915, -0.0142184996, 0.221279923, -0.578820678, -0.157755962, -0.840651985 ] + - [ 0.577498192, 0.804395551, 0.0128084743, 0.223713931, 0.579747219, -0.158150378, 0.845048375, 0.577535478, -0.804155539, -0.0132182159, 0.223541071, -0.580312728, -0.15875579, -0.844374418 ] + - [ 0.575604273, 0.80306098, 0.0118078896, 0.225903958, 0.581184018, -0.159110458, 0.84866126, 0.575639638, -0.802815181, -0.0122142273, 0.225730322, -0.581757336, -0.159723826, -0.847978491 ] + - [ 0.573702019, 0.801771556, 0.0108036744, 0.228019899, 0.582572212, -0.160038059, 0.852151927, 0.573735489, -0.801520166, -0.0112067014, 0.227845513, -0.583153075, -0.160659114, -0.851460644 ] + - [ 0.57179171, 0.800528596, 0.00979599324, 0.230059592, 0.583910381, -0.160932234, 0.855516806, 0.57182331, -0.800271816, -0.0101958054, 0.229884484, -0.584498518, -0.1615607, -0.854817316 ] + - [ 0.569873625, 0.799333419, 0.00878501068, 0.232020873, 0.585197108, -0.161792034, 0.85875233, 0.569903384, -0.799071457, -0.00918170678, 0.23184507, -0.585792238, -0.162427626, -0.858044948 ] + - [ 0.567948044, 0.798187343, 0.00777089127, 0.23390158, 0.586430973, -0.162616511, 0.86185493, 0.567975989, -0.797920412, -0.00816457304, 0.23372511, -0.587032809, -0.163258936, -0.86113998 ] + - [ 0.566015246, 0.797091687, 0.00675379958, 0.235699549, 0.587610556, -0.163404717, 0.864821037, 0.566041406, -0.796820005, -0.00714457158, 0.235522442, -0.588218803, -0.164053675, -0.864098853 ] + - [ 0.56407551, 0.796047768, 0.00573390014, 0.237412617, 0.588734439, -0.164155704, 0.867647084, 0.564099916, -0.79577156, -0.00612186982, 0.237234903, -0.589348795, -0.164810886, -0.866918007 ] + - [ 0.562129115, 0.795056904, 0.00471135751, 0.239038621, 0.589801202, -0.164868523, 0.870329501, 0.562151798, -0.7947764, -0.0050966352, 0.238860331, -0.590421356, -0.165529612, -0.869593881 ] + - [ 0.560176342, 0.794120414, 0.00368633625, 0.240575398, 0.590809427, -0.165542226, 0.872864721, 0.560197334, -0.793835849, -0.00406903514, 0.240396564, -0.59143506, -0.166208899, -0.872122917 ] + - [ 0.558217468, 0.793239615, 0.00265900091, 0.242020785, 0.591757694, -0.166175865, 0.875249175, 0.558236804, -0.792951232, -0.00303923708, 0.241841439, -0.592388481, -0.166847789, -0.874501555 ] + - [ 0.556252774, 0.792415827, 0.00162951605, 0.243372619, 0.592644584, -0.166768491, 0.877479294, 0.556270487, -0.792123871, -0.00200740845, 0.243192794, -0.593280192, -0.167445327, -0.876726235 ] + - [ 0.554282539, 0.791650367, 0.000598046209, 0.244628736, 0.593468678, -0.167319157, 0.87955151, 0.554298665, -0.791355092, -0.000973716667, 0.244448467, -0.594108765, -0.168000556, -0.878793396 ] + - [ 0.552307041, 0.790944553, -0.000435244049, 0.245786975, 0.594228557, -0.167826914, 0.881462255, 0.552321617, -0.790646218, 6.16708273e-05, 0.245606295, -0.594872774, -0.168512521, -0.880699481 ] + - [ 0.550326562, 0.790299703, -0.00147019017, 0.246845171, 0.594922802, -0.168290813, 0.88320796, 0.550339625, -0.789998572, 0.00109858661, 0.246664116, -0.595570792, -0.168980265, -0.882440928 ] + - [ 0.548341379, 0.789717136, -0.00250662761, 0.247801161, 0.595549993, -0.168709907, 0.884785057, 0.548352967, -0.789413479, 0.00213686324, 0.247619768, -0.596201392, -0.169402832, -0.884014178 ] + - [ 0.546351772, 0.78919817, -0.00354439181, 0.248652783, 0.596108712, -0.169083247, 0.886189977, 0.546361926, -0.788892263, 0.0031763333, 0.248471088, -0.596763148, -0.169779266, -0.885415671 ] + - [ 0.544358021, 0.788744123, -0.00458331822, 0.249397874, 0.59659754, -0.169409885, 0.887419152, 0.54436678, -0.788436247, 0.00421682935, 0.249215914, -0.597254632, -0.170108612, -0.886641848 ] + - [ 0.542360404, 0.788356312, -0.00562324228, 0.25003427, 0.597015056, -0.169688872, 0.888469013, 0.542367811, -0.788046755, 0.00525818397, 0.249852084, -0.597674418, -0.170389911, -0.887689149 ] + - [ 0.540359202, 0.788036057, -0.00666399943, 0.250559808, 0.597359843, -0.169919261, 0.889335992, 0.540365298, -0.787725111, 0.00630022973, 0.250377436, -0.598021078, -0.17062221, -0.888554013 ] + - [ 0.538354693, 0.787784675, -0.00770542514, 0.250972325, 0.597630481, -0.170100104, 0.890016521, 0.538359523, -0.787472639, 0.00734279919, 0.250789807, -0.598293187, -0.170804551, -0.889232882 ] + - [ 0.536347156, 0.787603484, -0.00874735484, 0.251269658, 0.59782555, -0.17023045, 0.890507032, 0.536350765, -0.787290663, 0.00838572492, 0.251087035, -0.598489317, -0.170935978, -0.889722196 ] + - [ 0.534336872, 0.787493803, -0.00978962398, 0.251449644, 0.597943633, -0.170309354, 0.890803955, 0.534339304, -0.787180506, 0.0094288395, 0.251266957, -0.598608041, -0.171015535, -0.890018395 ] + - [ 0.532324119, 0.78745695, -0.010832068, 0.25151012, 0.597983309, -0.170335866, 0.890903722, 0.532325422, -0.787143493, 0.0104719755, 0.251327412, -0.598647933, -0.171042267, -0.890117919 ] + - [ 0.530290767, 0.787473286, -0.0118783419, 0.251488656, 0.597978924, -0.170310787, 0.890853073, 0.530290967, -0.787159907, 0.0115188234, 0.251305936, -0.598643541, -0.171017139, -0.890067291 ] + - [ 0.528218805, 0.787522089, -0.0129321694, 0.251424487, 0.597965824, -0.170235817, 0.890701765, 0.528217905, -0.787208941, 0.0125731449, 0.251241732, -0.598630419, -0.17094202, -0.889916045 ] + - [ 0.526108688, 0.787603051, -0.0139934892, 0.251317947, 0.597944092, -0.170111353, 0.890450753, 0.526106695, -0.787290286, 0.0136348795, 0.251135133, -0.59860865, -0.17081731, -0.889665136 ] + - [ 0.523960875, 0.787715863, -0.0150622401, 0.251169368, 0.597913811, -0.169937795, 0.890100994, 0.523957791, -0.787403631, 0.0147039667, 0.250986474, -0.598578318, -0.170643408, -0.88931552 ] + - [ 0.521775822, 0.787860216, -0.0161383606, 0.250979086, 0.597875063, -0.169715539, 0.889653444, 0.521771652, -0.787548668, 0.015780346, 0.250796088, -0.598539506, -0.170420714, -0.888868154 ] + - [ 0.519553985, 0.788035802, -0.0172217896, 0.250747434, 0.597827932, -0.169444986, 0.88910906, 0.519548735, -0.787725085, 0.0168639567, 0.25056431, -0.598492296, -0.170149626, -0.888323993 ] + - [ 0.517295822, 0.788242313, -0.0183124657, 0.250474744, 0.597772499, -0.169126532, 0.888468798, 0.517289496, -0.787932574, 0.0179547385, 0.250291473, -0.598436771, -0.169830544, -0.887683994 ] + - [ 0.51500179, 0.788479439, -0.0194103276, 0.250161352, 0.597708849, -0.168760577, 0.887733615, 0.514994392, -0.788170823, 0.0190526307, 0.249977912, -0.598373014, -0.169463867, -0.886949112 ] + - [ 0.512672345, 0.788746874, -0.0205153139, 0.249807591, 0.597637063, -0.168347518, 0.886904466, 0.512663879, -0.788439524, 0.0201575728, 0.24962396, -0.598301108, -0.169049994, -0.886120304 ] + - [ 0.510307945, 0.789044307, -0.0216273634, 0.249413794, 0.597557225, -0.167887755, 0.885982309, 0.510298416, -0.788738365, 0.0212695044, 0.249229952, -0.598221136, -0.168589326, -0.885198525 ] + - [ 0.507909046, 0.789371431, -0.0227464148, 0.248980295, 0.597469417, -0.167381685, 0.8849681, 0.507898459, -0.789067038, 0.0223883648, 0.248796221, -0.598133182, -0.16808226, -0.884184731 ] + - [ 0.505476105, 0.789727937, -0.0238724068, 0.248507429, 0.597373722, -0.166829707, 0.883862794, 0.505464464, -0.789425232, 0.0235140935, 0.248323102, -0.598037327, -0.167529196, -0.883079879 ] + - [ 0.503009579, 0.790113517, -0.025005278, 0.247995528, 0.597270224, -0.166232219, 0.882667349, 0.502996889, -0.789812637, 0.0246466301, 0.247810929, -0.597933655, -0.166930534, -0.881884924 ] + - [ 0.500509925, 0.790527862, -0.0261449672, 0.247444926, 0.597159004, -0.16558962, 0.881382721, 0.500496191, -0.790228944, 0.0257859139, 0.247260035, -0.597822249, -0.166286673, -0.880600823 ] + - [ 0.4979776, 0.790970664, -0.027291413, 0.246855958, 0.597040145, -0.164902307, 0.880009866, 0.497962826, -0.790673843, 0.0269318845, 0.246670755, -0.597703192, -0.165598011, -0.879228531 ] + - [ 0.495413061, 0.791441614, -0.0284445541, 0.246228956, 0.596913731, -0.16417068, 0.878549741, 0.495397251, -0.791147022, 0.0280844813, 0.246043423, -0.597576566, -0.164864949, -0.877769004 ] + - [ 0.492816764, 0.791940404, -0.0296043293, 0.245564255, 0.596779844, -0.163395136, 0.877003301, 0.492799923, -0.791648174, 0.0292436439, 0.245378372, -0.597442455, -0.164087886, -0.876223199 ] + - [ 0.490189167, 0.792466726, -0.0307706771, 0.244862188, 0.596638567, -0.162576075, 0.875371504, 0.4901713, -0.792176987, 0.0304093115, 0.244675938, -0.597300942, -0.16326722, -0.874592071 ] + - [ 0.487530727, 0.79302027, -0.0319435364, 0.244123089, 0.596489983, -0.161713893, 0.873655306, 0.487511837, -0.792733152, 0.0315814238, 0.243936453, -0.597152109, -0.162403352, -0.872876577 ] + - [ 0.484841899, 0.793600728, -0.0331228458, 0.243347291, 0.596334174, -0.16080899, 0.871855663, 0.484821993, -0.793316359, 0.0327599203, 0.243160252, -0.596996039, -0.161496679, -0.871077672 ] + - [ 0.482123142, 0.794207793, -0.034308544, 0.242535129, 0.596171224, -0.159861765, 0.869973531, 0.482102223, -0.793926297, 0.0339447403, 0.242347668, -0.596832816, -0.160547603, -0.869196312 ] + - [ 0.479374912, 0.794841155, -0.0355005697, 0.241686936, 0.596001214, -0.158872614, 0.868009868, 0.479352985, -0.794562657, 0.0351358233, 0.241499037, -0.596662523, -0.159556521, -0.867233454 ] + - [ 0.476597666, 0.795500506, -0.0366988616, 0.240803046, 0.595824229, -0.157841937, 0.865965628, 0.476574736, -0.79522513, 0.0363331089, 0.240614691, -0.596485241, -0.158523834, -0.865190053 ] + - [ 0.473791861, 0.796185537, -0.0379033583, 0.239883792, 0.595640351, -0.156770133, 0.86384177, 0.473767932, -0.795913404, 0.0375365364, 0.239694965, -0.596301055, -0.157449939, -0.863067066 ] + - [ 0.470957954, 0.79689594, -0.0391139986, 0.238929509, 0.595449662, -0.155657598, 0.861639248, 0.47093303, -0.796627171, 0.0387460455, 0.238740193, -0.596110047, -0.156335238, -0.860865448 ] + - [ 0.468096401, 0.797631407, -0.0403307211, 0.237940529, 0.595252245, -0.154504733, 0.85935902, 0.468070488, -0.79736612, 0.0399615754, 0.23775071, -0.595912301, -0.155180128, -0.858586155 ] + - [ 0.46520766, 0.798391629, -0.0415534647, 0.236917187, 0.595048183, -0.153311934, 0.857002042, 0.465180762, -0.798129941, 0.0411830658, 0.236726848, -0.595707898, -0.15398501, -0.856230143 ] + - [ 0.462292187, 0.799176297, -0.0427821678, 0.235859817, 0.59483756, -0.152079601, 0.85456927, 0.462264309, -0.798918324, 0.042410456, 0.235668942, -0.595496922, -0.152750282, -0.853798369 ] + - [ 0.45935044, 0.799985104, -0.0440167693, 0.234768751, 0.594620457, -0.150808132, 0.852061661, 0.459321587, -0.79973096, 0.0436436856, 0.234577326, -0.595279456, -0.151476344, -0.851291788 ] + - [ 0.456382875, 0.80081774, -0.0452572078, 0.233644324, 0.594396958, -0.149497925, 0.849480171, 0.456353051, -0.800567538, 0.044882694, 0.233452334, -0.595055583, -0.150163595, -0.848711357 ] + - [ 0.453389949, 0.801673898, -0.0465034221, 0.23248687, 0.594167145, -0.148149378, 0.846825756, 0.453359159, -0.801427749, 0.0461274206, 0.2322943, -0.594825386, -0.148812435, -0.846058031 ] + - [ 0.450372119, 0.802553268, -0.0477553507, 0.231296722, 0.593931102, -0.146762891, 0.844099373, 0.450340367, -0.802311283, 0.0473778051, 0.231103558, -0.594588947, -0.147423262, -0.843332766 ] + - [ 0.447329842, 0.803455542, -0.0490129325, 0.230074214, 0.59368891, -0.14533886, 0.841301978, 0.447297133, -0.803217829, 0.0486337867, 0.229880442, -0.59434635, -0.145996475, -0.840536519 ] + - [ 0.444263575, 0.804380412, -0.0502761061, 0.22881968, 0.593440653, -0.143877686, 0.838434528, 0.444229914, -0.804147077, 0.0498953051, 0.228625286, -0.594097678, -0.144532475, -0.837670244 ] + - [ 0.441173774, 0.805327569, -0.0515448101, 0.227533452, 0.593186414, -0.142379765, 0.835497979, 0.441139166, -0.805098719, 0.0511622996, 0.227338425, -0.593843014, -0.14303166, -0.8347349 ] + - [ 0.438060897, 0.806296705, -0.0528189834, 0.226215866, 0.592926275, -0.140845496, 0.832493287, 0.438025347, -0.806072443, 0.0524347098, 0.226020191, -0.593582439, -0.14149443, -0.83173144 ] + - [ 0.434925401, 0.807287512, -0.0540985645, 0.224867255, 0.592660319, -0.139275278, 0.829421409, 0.434888912, -0.80706794, 0.053712475, 0.22467092, -0.593316039, -0.139921183, -0.828660822 ] + - [ 0.431767742, 0.80829968, -0.0553834922, 0.223487952, 0.592388629, -0.137669509, 0.826283301, 0.43173032, -0.808084901, 0.0549955349, 0.223290945, -0.593043894, -0.13831232, -0.825524001 ] + - [ 0.428588377, 0.809332901, -0.0566737051, 0.222078292, 0.592111288, -0.136028587, 0.823079919, 0.428550026, -0.809123014, 0.0562838288, 0.2218806, -0.59276609, -0.13666824, -0.822321933 ] + - [ 0.425387763, 0.810386868, -0.0579691421, 0.220638607, 0.591828379, -0.134352911, 0.819812221, 0.425348489, -0.81018197, 0.0575772962, 0.220440219, -0.592482707, -0.13498934, -0.819055575 ] + - [ 0.422166357, 0.811461271, -0.0592697416, 0.219169232, 0.591539983, -0.13264288, 0.816481161, 0.422126164, -0.81126146, 0.0588758766, 0.218970137, -0.592193829, -0.133276022, -0.815725882 ] + - [ 0.418924617, 0.812555802, -0.0605754425, 0.2176705, 0.591246186, -0.13089889, 0.813087698, 0.418883509, -0.812361172, 0.0601795095, 0.217470687, -0.59189954, -0.131528684, -0.81233381 ] + - [ 0.415662998, 0.813670152, -0.0618861835, 0.216142745, 0.590947068, -0.129121341, 0.809632786, 0.415620981, -0.813480799, 0.0614881343, 0.215942203, -0.591599922, -0.129747726, -0.808880316 ] + - [ 0.412381958, 0.814804013, -0.0632019031, 0.214586301, 0.590642713, -0.127310632, 0.806117383, 0.412339036, -0.814620028, 0.0628016905, 0.214385019, -0.591295058, -0.127933546, -0.805366354 ] + - [ 0.409081953, 0.815957077, -0.0645225402, 0.213001502, 0.590333203, -0.125467159, 0.802542445, 0.409038132, -0.815778551, 0.0641201176, 0.21279947, -0.59098503, -0.126086545, -0.801792882 ] + - [ 0.405763441, 0.817129035, -0.0658480334, 0.21138868, 0.590018622, -0.123591323, 0.798908928, 0.405718725, -0.816956057, 0.0654433551, 0.211185889, -0.590669923, -0.12420712, -0.798160856 ] + - [ 0.402426879, 0.818319578, -0.0671783214, 0.209748171, 0.589699052, -0.121683521, 0.795217789, 0.402381272, -0.818152237, 0.0667713424, 0.209544611, -0.590349819, -0.122295673, -0.79447123 ] + - [ 0.399072722, 0.819528399, -0.0685133429, 0.208080307, 0.589374576, -0.119744151, 0.791469984, 0.39902623, -0.819366781, 0.0681040189, 0.207875969, -0.5900248, -0.120352601, -0.790724962 ] + - [ 0.395701429, 0.820755188, -0.0698530366, 0.206385423, 0.589045277, -0.117773612, 0.787666469, 0.395654056, -0.820599378, 0.0694413242, 0.206180297, -0.58969495, -0.118378304, -0.786923007 ] + - [ 0.392313456, 0.821999638, -0.0711973412, 0.204663851, 0.588711237, -0.115772303, 0.783808201, 0.392265207, -0.821849719, 0.0707831978, 0.20445793, -0.589360352, -0.116373181, -0.783066321 ] + - [ 0.38890926, 0.823261439, -0.0725461953, 0.202915926, 0.58837254, -0.113740621, 0.779896136, 0.388860139, -0.823117494, 0.072129579, 0.202709201, -0.589021088, -0.114337633, -0.779155861 ] + - [ 0.385489298, 0.824540283, -0.0738995377, 0.201141982, 0.588029268, -0.111678964, 0.775931231, 0.385439311, -0.824402393, 0.0734804074, 0.200934445, -0.588677242, -0.112272057, -0.775192582 ] + - [ 0.382054027, 0.825835862, -0.0752573071, 0.199342352, 0.587681504, -0.109587733, 0.771914441, 0.382003178, -0.825704105, 0.0748356225, 0.199133995, -0.588328896, -0.110176853, -0.77117744 ] + - [ 0.378603903, 0.827147867, -0.0766194421, 0.19751737, 0.587329331, -0.107467323, 0.767846724, 0.378552197, -0.827022322, 0.0761951636, 0.197308186, -0.587976134, -0.108052421, -0.767111391 ] + - [ 0.375139384, 0.82847599, -0.0779858815, 0.195667369, 0.586972832, -0.105318135, 0.763729036, 0.375086826, -0.828356733, 0.0775589704, 0.195457352, -0.587619038, -0.105899159, -0.762995392 ] + - [ 0.371660926, 0.829819922, -0.0793565639, 0.193792684, 0.586612089, -0.103140566, 0.759562333, 0.371607521, -0.829707028, 0.0789269822, 0.193581826, -0.587257692, -0.103717467, -0.758830397 ] + - [ 0.368168986, 0.831179355, -0.080731428, 0.191893648, 0.586247185, -0.100935015, 0.755347571, 0.36811474, -0.831072897, 0.0802991385, 0.191681942, -0.586892177, -0.101507745, -0.754617364 ] + - [ 0.364664022, 0.832553981, -0.0821104126, 0.189970594, 0.585878203, -0.09870188, 0.751085707, 0.364608938, -0.832454031, 0.0816753788, 0.189758035, -0.586522578, -0.0992703909, -0.750357249 ] + - [ 0.36114649, 0.83394349, -0.0834934563, 0.188023857, 0.585505226, -0.0964415592, 0.746777698, 0.361090573, -0.833850118, 0.0830556426, 0.187810439, -0.586148977, -0.0970058047, -0.746051006 ] + - [ 0.357616847, 0.835347575, -0.0848804978, 0.18605377, 0.585128337, -0.0941544512, 0.742424499, 0.357560103, -0.835260851, 0.0844398694, 0.185839488, -0.585771457, -0.0947143855, -0.741699593 ] + - [ 0.354075549, 0.836765926, -0.0862714758, 0.184060667, 0.584747618, -0.0918409543, 0.738027067, 0.354017983, -0.836685917, 0.0858279985, 0.183845515, -0.585390101, -0.0923965327, -0.737303964 ] + - [ 0.350523055, 0.838198236, -0.0876663289, 0.182044882, 0.584363152, -0.0895014669, 0.733586359, 0.35046467, -0.838125009, 0.0872199695, 0.181828855, -0.585004993, -0.0900526454, -0.732865077 ] + - [ 0.34695982, 0.839644197, -0.089064996, 0.180006748, 0.583975022, -0.0871363872, 0.72910333, 0.346900623, -0.839577814, 0.0886157219, 0.179789841, -0.584616214, -0.0876831229, -0.728383887 ] + - [ 0.343386302, 0.841103498, -0.0904674157, 0.177946599, 0.583583311, -0.0847461138, 0.724578938, 0.343326296, -0.841044025, 0.0900151951, 0.177728809, -0.584223847, -0.0852883645, -0.723861351 ] + - [ 0.339802957, 0.842575833, -0.0918735266, 0.175864769, 0.583188102, -0.0823310448, 0.720014138, 0.339742148, -0.84252333, 0.0914183286, 0.175646091, -0.583827977, -0.0828687696, -0.719298423 ] + - [ 0.336210242, 0.844060892, -0.0932832675, 0.173761591, 0.582789477, -0.0798915787, 0.715409888, 0.336148636, -0.84401542, 0.0928250618, 0.173542022, -0.583428685, -0.0804247372, -0.714696061 ] + - [ 0.332608615, 0.845558367, -0.094696577, 0.171637399, 0.582387519, -0.0774281138, 0.710767142, 0.332546215, -0.845519985, 0.0942353343, 0.171416936, -0.583026055, -0.0779566667, -0.71005522 ] + - [ 0.328998532, 0.84706795, -0.0961133939, 0.169492527, 0.581982311, -0.0749410485, 0.706086859, 0.328935344, -0.847036715, 0.0956490855, 0.169271166, -0.58262017, -0.0754649575, -0.705376856 ] + - [ 0.32538045, 0.848589332, -0.0975336569, 0.167327309, 0.581573937, -0.0724307811, 0.701369994, 0.325316479, -0.8485653, 0.0970662548, 0.167105048, -0.582211112, -0.0729500086, -0.700661925 ] + - [ 0.321754826, 0.850122205, -0.0989573045, 0.165142078, 0.581162477, -0.06989771, 0.696617503, 0.321690076, -0.85010543, 0.0984867818, 0.164918914, -0.581798964, -0.0704122194, -0.695911384 ] + - [ 0.318122116, 0.85166626, -0.100384276, 0.162937168, 0.580748017, -0.0673422335, 0.691830343, 0.318056593, -0.851656795, 0.0999106059, 0.162713099, -0.58138381, -0.0678519893, -0.691126187 ] + - [ 0.314482779, 0.853221189, -0.101814509, 0.160712912, 0.580330637, -0.06476475, 0.687009471, 0.314416487, -0.853219085, 0.101337667, 0.160487937, -0.580965733, -0.0652697173, -0.686307292 ] + - [ 0.31083727, 0.854786683, -0.103247943, 0.158469646, 0.579910422, -0.0621656579, 0.682155842, 0.310770214, -0.854791991, 0.102767903, 0.158243762, -0.580544814, -0.0626658029, -0.681455654 ] + - [ 0.307186046, 0.856362433, -0.104684516, 0.156207701, 0.579487453, -0.0595453554, 0.677270413, 0.307118232, -0.856375202, 0.104201256, 0.155980908, -0.580121138, -0.0600406452, -0.676572229 ] + - [ 0.303529565, 0.857948132, -0.106124168, 0.153927412, 0.579061814, -0.056904241, 0.672354141, 0.303460998, -0.857968408, 0.105637663, 0.15369971, -0.579694787, -0.0573946435, -0.671657973 ] + - [ 0.299868283, 0.859543471, -0.107566837, 0.151629113, 0.578633588, -0.0542427129, 0.667407982, 0.299798967, -0.8595713, 0.107077065, 0.1514005, -0.579265844, -0.0547281972, -0.666713842 ] + - [ 0.296202657, 0.861148141, -0.109012461, 0.149313137, 0.578202856, -0.0515611696, 0.662432891, 0.296132598, -0.861183567, 0.1085194, 0.149083613, -0.578834393, -0.0520417054, -0.661740793 ] + - [ 0.292533145, 0.862761834, -0.110460979, 0.146979818, 0.577769703, -0.0488600094, 0.657429827, 0.292462346, -0.8628049, 0.109964609, 0.146749383, -0.578400515, -0.0493355675, -0.65673978 ] + - [ 0.288860202, 0.864384241, -0.111912331, 0.144629489, 0.577334211, -0.0461396307, 0.652399745, 0.28878867, -0.864434988, 0.111412631, 0.144398144, -0.577964294, -0.0466101827, -0.651711761 ] + - [ 0.285184286, 0.866015055, -0.113366454, 0.142262486, 0.576896462, -0.0434004317, 0.647343601, 0.285112026, -0.866073522, 0.112863406, 0.14203023, -0.577525813, -0.0438659502, -0.646657691 ] + - [ 0.281505854, 0.867653965, -0.114823288, 0.13987914, 0.57645654, -0.040642811, 0.642262352, 0.28143287, -0.867720192, 0.114316872, 0.139645976, -0.577085155, -0.0411032694, -0.641578525 ] + - [ 0.277825363, 0.869300665, -0.11628277, 0.137479786, 0.576014527, -0.0378671667, 0.637156954, 0.27775166, -0.869374688, 0.115772969, 0.137245714, -0.576642402, -0.0383225395, -0.636475221 ] + - [ 0.274143269, 0.870954845, -0.11774484, 0.135064758, 0.575570506, -0.0350738973, 0.632028363, 0.274068852, -0.8710367, 0.117231638, 0.13482978, -0.576197639, -0.0355241597, -0.631348735 ] + - [ 0.270460029, 0.872616198, -0.119209437, 0.132634389, 0.57512456, -0.0322634011, 0.626877537, 0.270384904, -0.872705918, 0.118692816, 0.132398507, -0.575750947, -0.0327085294, -0.626200021 ] + - [ 0.266776101, 0.874284413, -0.120676499, 0.130189013, 0.574676771, -0.0294360764, 0.621705431, 0.266700272, -0.874382031, 0.120156444, 0.129952229, -0.575302409, -0.0298760478, -0.621030036 ] + - [ 0.26309194, 0.875959184, -0.122145964, 0.127728963, 0.574227223, -0.0265923217, 0.616513002, 0.263015414, -0.876064731, 0.121622462, 0.127491281, -0.574852109, -0.0270271142, -0.615839736 ] + - [ 0.259408005, 0.877640202, -0.123617773, 0.125254574, 0.573775999, -0.0237325353, 0.611301206, 0.259330786, -0.877753707, 0.123090808, 0.125015995, -0.57440013, -0.0241621278, -0.610630078 ] + - [ 0.255724752, 0.879327157, -0.125091862, 0.12276618, 0.57332318, -0.0208571155, 0.606070999, 0.255646844, -0.87944865, 0.124561422, 0.122526707, -0.573946554, -0.021281488, -0.605402016 ] + - [ 0.252042638, 0.881019743, -0.126568171, 0.120264113, 0.57286885, -0.0179664606, 0.600823339, 0.251964047, -0.881149248, 0.126034243, 0.12002375, -0.573491464, -0.0183855938, -0.600156508 ] + - [ 0.24836212, 0.882717649, -0.128046639, 0.117748707, 0.572413092, -0.0150609691, 0.59555918, 0.248282851, -0.882855193, 0.127509212, 0.117507459, -0.573034943, -0.0154748448, -0.594894509 ] + - [ 0.244683654, 0.884420568, -0.129527204, 0.115220297, 0.571955988, -0.0121410393, 0.590279481, 0.244603712, -0.884566175, 0.128986267, 0.114978167, -0.572577075, -0.01254964, -0.589616975 ] + - [ 0.241007698, 0.886128192, -0.131009805, 0.112679216, 0.571497622, -0.00920706954, 0.584985196, 0.240927088, -0.886281883, 0.130465349, 0.112436208, -0.572117942, -0.00961037884, -0.584324861 ] + - [ 0.237334708, 0.887840211, -0.132494381, 0.110125798, 0.571038076, -0.00625945815, 0.579677283, 0.237253435, -0.888002007, 0.131946396, 0.109881916, -0.571657627, -0.0066574605, -0.579019125 ] + - [ 0.233665142, 0.889556317, -0.13398087, 0.107560376, 0.570577432, -0.0032986035, 0.574356698, 0.233583211, -0.889726238, 0.133429347, 0.107315626, -0.571196213, -0.00369128426, -0.573700722 ] + - [ 0.229999455, 0.891276202, -0.135469211, 0.104983284, 0.570115775, -0.00032490395, 0.569024397, 0.229916872, -0.891454266, 0.134914143, 0.104737672, -0.570733783, -0.000712249403, -0.568370608 ] + - [ 0.226338106, 0.892999558, -0.136959343, 0.102394855, 0.569653185, 0.00266124215, 0.563681337, 0.226254876, -0.893185781, 0.136400723, 0.102148386, -0.57027042, 0.00227924481, -0.563029739 ] + - [ 0.222681551, 0.894726075, -0.138451204, 0.0997954249, 0.569189747, 0.00565943646, 0.558328473, 0.222597678, -0.894920472, 0.137889027, 0.0995481046, -0.569806207, 0.00528279912, -0.557679072 ] + - [ 0.219030247, 0.896455446, -0.139944734, 0.0971853256, 0.568725543, 0.00866928061, 0.552966763, 0.218945737, -0.896658031, 0.139378993, 0.0969371604, -0.569341226, 0.00829801426, -0.552319561 ] + - [ 0.21538465, 0.898187362, -0.14143987, 0.0945648913, 0.568260656, 0.0116903763, 0.547597163, 0.215299508, -0.898398146, 0.140870561, 0.0943158877, -0.568875562, 0.0113244909, -0.546952163 ] + - [ 0.211745219, 0.899921514, -0.142936552, 0.0919344557, 0.567795169, 0.014722325, 0.54222063, 0.21165945, -0.900140508, 0.142363672, 0.0916846205, -0.568409296, 0.0143618299, -0.541577834 ] + - [ 0.208112409, 0.901657594, -0.144434718, 0.0892943524, 0.567329164, 0.0177647286, 0.536838118, 0.208026018, -0.901884808, 0.143858263, 0.0890436928, -0.567942511, 0.0174096319, -0.53619753 ] + - [ 0.204486677, 0.903395294, -0.145934307, 0.0866449153, 0.566862725, 0.0208171886, 0.531450586, 0.20439967, -0.903630734, 0.145354275, 0.0863934387, -0.567475292, 0.0204674977, -0.530812208 ] + - [ 0.20086848, 0.905134304, -0.147435257, 0.0839864779, 0.566395933, 0.0238793067, 0.526058989, 0.200780862, -0.905377978, 0.146851648, 0.0837341923, -0.567007719, 0.0235350279, -0.525422822 ] + - [ 0.197258276, 0.906874318, -0.148937508, 0.0813193742, 0.565928873, 0.0269506845, 0.520664284, 0.197170052, -0.907126229, 0.14835032, 0.0810662874, -0.566539878, 0.0266118234, -0.520030329 ] + - [ 0.193656521, 0.908615025, -0.150440998, 0.0786439376, 0.565461626, 0.0300309237, 0.515267426, 0.193567696, -0.908875177, 0.149850231, 0.0783900582, -0.566071849, 0.0296974848, -0.514635686 ] + - [ 0.190063672, 0.910356118, -0.151945665, 0.075960502, 0.564994276, 0.0331196259, 0.509869374, 0.189974251, -0.910624513, 0.151351321, 0.0757058386, -0.565603717, 0.032791613, -0.509239847 ] + - [ 0.186480186, 0.912097288, -0.153451449, 0.0732694011, 0.564526905, 0.0362163928, 0.504471082, 0.186390174, -0.912373927, 0.152853528, 0.0730139627, -0.565135564, 0.0358938085, -0.503843769 ] + - [ 0.18290652, 0.913838226, -0.154958288, 0.0705709686, 0.564059596, 0.0393208261, 0.499073508, 0.182815923, -0.914123108, 0.154356794, 0.0703147645, -0.564667474, 0.0390036722, -0.498448408 ] + - [ 0.179343131, 0.915578625, -0.156466121, 0.0678655382, 0.563592431, 0.0424325272, 0.493677607, 0.179251953, -0.915871746, 0.155861056, 0.067608578, -0.564199528, 0.0421208048, -0.493054721 ] + - [ 0.175790475, 0.917318175, -0.157974886, 0.0651534436, 0.563125495, 0.045551098, 0.488284336, 0.175698722, -0.917619532, 0.157366255, 0.0648957373, -0.563731811, 0.045244807, -0.487663662 ] + - [ 0.17224901, 0.919056569, -0.159484522, 0.0624350185, 0.562658869, 0.0486761401, 0.482894652, 0.172156687, -0.919366156, 0.15887233, 0.0621765764, -0.563264404, 0.0483752795, -0.482276188 ] + - [ 0.168719192, 0.920793498, -0.160994968, 0.0597105967, 0.562192637, 0.051807255, 0.477509511, 0.168626305, -0.921111308, 0.16037922, 0.0594514292, -0.562797392, 0.0515118232, -0.476893256 ] + - [ 0.165201478, 0.922528652, -0.162506162, 0.0569805118, 0.56172688, 0.0549440446, 0.472129869, 0.165108032, -0.922854677, 0.161886865, 0.0567206299, -0.562330856, 0.0546540386, -0.47151582 ] + - [ 0.161696325, 0.924261725, -0.164018044, 0.0542450975, 0.561261683, 0.0580861103, 0.466756682, 0.161602325, -0.924595955, 0.163395204, 0.0539845124, -0.561864881, 0.0578015266, -0.466144837 ] + - [ 0.158204191, 0.925992407, -0.165530552, 0.0515046877, 0.560797127, 0.0612330538, 0.461390908, 0.158109642, -0.926334831, 0.164904178, 0.0512434107, -0.561399548, 0.0609538879, -0.460781263 ] + - [ 0.154725531, 0.927720389, -0.167043624, 0.0487596159, 0.560333296, 0.0643844769, 0.456033501, 0.154630439, -0.928070994, 0.166413724, 0.0484976589, -0.560934941, 0.0641107233, -0.455426054 ] + - [ 0.151260804, 0.929445364, -0.1685572, 0.046010216, 0.559870272, 0.0675399811, 0.45068542, 0.151165173, -0.929804136, 0.167923784, 0.045747591, -0.560471142, 0.0672716333, -0.450080167 ] + - [ 0.147810465, 0.931167023, -0.170071217, 0.0432568215, 0.559408138, 0.0706991681, 0.44534762, 0.147714301, -0.931533946, 0.169434295, 0.042993541, -0.560008235, 0.0704362189, -0.444744556 ] + - [ 0.144374971, 0.932885058, -0.171585615, 0.0404997663, 0.558946977, 0.0738616396, 0.440021057, 0.14427828, -0.933260114, 0.170945198, 0.040235843, -0.559546303, 0.0736040807, -0.439420178 ] + - [ 0.140954781, 0.934599159, -0.173100333, 0.037739384, 0.558486872, 0.0770269971, 0.434706689, 0.140857567, -0.934982331, 0.172456433, 0.0374748309, -0.559085428, 0.0767748194, -0.434107988 ] + - [ 0.137550349, 0.936309019, -0.174615308, 0.0349760084, 0.558027905, 0.0801948423, 0.42940547, 0.137452619, -0.936700286, 0.173967938, 0.0347108389, -0.558625694, 0.0799480358, -0.428808944 ] + - [ 0.134162134, 0.938014329, -0.176130481, 0.0322099732, 0.55757016, 0.083364777, 0.424118359, 0.134063892, -0.938413669, 0.175479653, 0.0319442008, -0.558167183, 0.0831233306, -0.423524001 ] + - [ 0.130790592, 0.93971478, -0.177645789, 0.029441612, 0.557113719, 0.0865364027, 0.41884631, 0.130691844, -0.940122171, 0.176991518, 0.0291752507, -0.557709978, 0.0863003046, -0.418254115 ] + - [ 0.12743618, 0.941410064, -0.179161171, 0.0266712586, 0.556658664, 0.089709321, 0.413590281, 0.127336931, -0.941825482, 0.178503472, 0.0264043227, -0.557254162, 0.0894785585, -0.413000242 ] + - [ 0.124099356, 0.943099873, -0.180676565, 0.0238992468, 0.55620508, 0.0928831337, 0.408351228, 0.12399961, -0.943523291, 0.180015454, 0.0236317508, -0.556799819, 0.0926576929, -0.407763337 ] + - [ 0.120780575, 0.944783899, -0.182191912, 0.0211259101, 0.555753048, 0.0960574423, 0.403130107, 0.120680339, -0.945215289, 0.181527405, 0.020857869, -0.556347031, 0.0958373088, -0.402544358 ] + - [ 0.117480295, 0.946461831, -0.183707148, 0.0183515824, 0.555302651, 0.0992318485, 0.397927875, 0.117379573, -0.946901165, 0.183039263, 0.0180830112, -0.555895881, 0.0990170067, -0.397344259 ] + - [ 0.114198972, 0.948133363, -0.185222214, 0.0155765973, 0.554853972, 0.102405954, 0.392745488, 0.114097771, -0.948580611, 0.184550968, 0.0153075116, -0.555446452, 0.102196387, -0.392163998 ] + - [ 0.110937064, 0.949798186, -0.186737047, 0.0128012886, 0.554407095, 0.10557936, 0.387583902, 0.110835389, -0.950253316, 0.186062459, 0.0125317042, -0.554998826, 0.105375052, -0.387004529 ] + - [ 0.107695028, 0.951455991, -0.188251586, 0.0100259899, 0.553962101, 0.108751669, 0.382444074, 0.107592883, -0.951918969, 0.187573676, 0.00975592296, -0.554553088, 0.1085526, -0.381866809 ] + - [ 0.104473319, 0.953106469, -0.18976577, 0.00725103508, 0.553519074, 0.111922483, 0.377326961, 0.104370711, -0.953577262, 0.189084559, 0.0069805019, -0.55410932, 0.111728634, -0.376751794 ] + - [ 0.101272397, 0.954749313, -0.191279538, 0.00447675772, 0.553078096, 0.115091402, 0.372233517, 0.10116933, -0.955227883, 0.190595046, 0.00420577507, -0.553667604, 0.114902753, -0.37166044 ] + - [ 0.0980927157, 0.956384213, -0.192792828, 0.00170349156, 0.55263925, 0.118258028, 0.367164701, 0.0979891964, -0.956870524, 0.192105078, 0.00143207648, -0.553228024, 0.118074559, -0.366593703 ] + - [ 0.0949347339, 0.958010862, -0.19430558, -0.00106842967, 0.552202619, 0.121421964, 0.362121469, 0.0948307671, -0.958504874, 0.193614593, -0.00134025984, -0.552790663, 0.121243652, -0.361552538 ] + - [ 0.091798908, 0.959628951, -0.195817731, -0.00383867227, 0.551768286, 0.12458281, 0.357104776, 0.091694499, -0.960130624, 0.195123532, -0.00411089988, -0.552355603, 0.124409633, -0.356537903 ] + - [ 0.0886856949, 0.961238171, -0.197329221, -0.00660690252, 0.551336333, 0.127740169, 0.352115579, 0.0885808492, -0.961747462, 0.196631833, -0.00687950961, -0.551922928, 0.127572103, -0.351550752 ] + - [ 0.0855955515, 0.962838214, -0.198839987, -0.0093727867, 0.550906844, 0.130893642, 0.347154835, 0.0854902744, -0.963355081, 0.198139437, -0.00964575501, -0.55149272, 0.130730662, -0.346592043 ] + - [ 0.0825289347, 0.964428772, -0.20034997, -0.0121359911, 0.550479901, 0.134042831, 0.342223499, 0.0824232316, -0.964953168, 0.199646282, -0.0124093021, -0.551065063, 0.133884911, -0.34166273 ] + - [ 0.0794863013, 0.966009535, -0.201859107, -0.014896182, 0.550055587, 0.137187337, 0.337322529, 0.0793801778, -0.966541416, 0.201152309, -0.0151698167, -0.550640039, 0.137034451, -0.33676377 ] + - [ 0.0764681083, 0.967580196, -0.203367338, -0.0176530258, 0.549633984, 0.140326762, 0.332452881, 0.0763615697, -0.968119513, 0.202657455, -0.017926965, -0.550217732, 0.140178883, -0.331896119 ] + - [ 0.0734748125, 0.969140446, -0.2048746, -0.0204061886, 0.549215176, 0.143460708, 0.327615511, 0.0733678643, -0.969687149, 0.204161663, -0.0206804129, -0.549798223, 0.143317807, -0.327060733 ] + - [ 0.0705068709, 0.970689976, -0.206380833, -0.0231553368, 0.548799246, 0.146588776, 0.322811375, 0.0703995185, -0.971244016, 0.205664869, -0.0234298263, -0.549381597, 0.146450824, -0.322258567 ] + - [ 0.0675647404, 0.972228478, -0.207885975, -0.0259001366, 0.548386276, 0.149710569, 0.31804143, 0.0674569892, -0.972789802, 0.207167015, -0.0261748713, -0.548967936, 0.149577535, -0.317490579 ] + - [ 0.0646488777, 0.973755644, -0.209389965, -0.0286402544, 0.547976348, 0.152825686, 0.313306633, 0.0645407333, -0.974324198, 0.208668039, -0.0289152137, -0.548557323, 0.15269754, -0.312757723 ] + - [ 0.0617597399, 0.975271165, -0.210892742, -0.0313753564, 0.547569547, 0.155933731, 0.308607939, 0.0616512077, -0.975846894, 0.210167881, -0.0316505197, -0.548149841, 0.155810441, -0.308060956 ] + - [ 0.0588977839, 0.976774733, -0.212394244, -0.034105109, 0.547165954, 0.159034305, 0.303946305, 0.0587888692, -0.97735758, 0.21166648, -0.0343804552, -0.547745573, 0.158915838, -0.303401234 ] + - [ 0.0560634664, 0.978266039, -0.21389441, -0.0368291784, 0.546765652, 0.16212701, 0.299322687, 0.0559541749, -0.978855947, 0.213163777, -0.0371046861, -0.547344601, 0.162013331, -0.298779513 ] + - [ 0.0532572444, 0.979744774, -0.215393179, -0.0395472308, 0.546368725, 0.165211447, 0.294738043, 0.0531475815, -0.980341683, 0.214659709, -0.0398228784, -0.54694701, 0.165102522, -0.294196749 ] + - [ 0.0504795748, 0.981210631, -0.21689049, -0.0422589327, 0.545975254, 0.168287217, 0.290193327, 0.0503695461, -0.98181448, 0.216154218, -0.0425346982, -0.546552881, 0.168183011, -0.289653897 ] + - [ 0.0477309145, 0.9826633, -0.21838628, -0.0449639502, 0.545585323, 0.171353923, 0.285689497, 0.0476205254, -0.983274027, 0.217647242, -0.0452398113, -0.546162298, 0.1712544, -0.285151914 ] + - [ 0.0450117204, 0.984102474, -0.21988049, -0.0476619496, 0.545199015, 0.174411166, 0.281227509, 0.0449009763, -0.984720014, 0.21913872, -0.0479378838, -0.545775344, 0.174316287, -0.280691757 ] + - [ 0.0423224493, 0.985527844, -0.221373057, -0.0503525974, 0.544816412, 0.177458548, 0.27680832, 0.0422113559, -0.986152132, 0.220628593, -0.0506285816, -0.545392101, 0.177368276, -0.276274379 ] + - [ 0.0396635582, 0.9869391, -0.22286392, -0.0530355596, 0.544437598, 0.180495671, 0.272432885, 0.039552121, -0.98757007, 0.2221168, -0.0533115708, -0.545012653, 0.180409965, -0.271900739 ] + - [ 0.037035504, 0.988335936, -0.224353018, -0.0557105027, 0.544062654, 0.183522135, 0.268102161, 0.0369237284, -0.988973518, 0.22360328, -0.0559865173, -0.544637082, 0.183440956, -0.267571792 ] + - [ 0.0344387435, 0.989718042, -0.22584029, -0.0583770928, 0.543691664, 0.186537544, 0.263817105, 0.0343266351, -0.990362168, 0.225087972, -0.058653087, -0.544265472, 0.18646085, -0.263288493 ] + - [ 0.0318737336, 0.99108511, -0.227325674, -0.0610349964, 0.543324711, 0.189541497, 0.259578673, 0.031761298, -0.991735708, 0.226570817, -0.0613109461, -0.543897905, 0.189469247, -0.259051799 ] + - [ 0.0293409313, 0.992436831, -0.228809109, -0.0636838796, 0.542961877, 0.192533598, 0.255387821, 0.0292281739, -0.993093829, 0.228051753, -0.0639597603, -0.543534464, 0.192465749, -0.254862666 ] + - [ 0.0268407934, 0.993772897, -0.230290534, -0.0663234089, 0.542603246, 0.195513448, 0.251245505, 0.0267277199, -0.99443622, 0.22953072, -0.0665991958, -0.543175233, 0.195449955, -0.250722049 ] + - [ 0.0243737768, 0.995093, -0.231769887, -0.0689532503, 0.542248899, 0.198480647, 0.247152683, 0.0242603927, -0.995762573, 0.231007658, -0.0692289184, -0.542820293, 0.198421466, -0.246630906 ] + - [ 0.0219403384, 0.99639683, -0.233247107, -0.0715730703, 0.54189892, 0.201434799, 0.24311031, 0.0218266493, -0.997072576, 0.232482506, -0.0718485943, -0.542469729, 0.201379884, -0.242590191 ] + - [ 0.0195409351, 0.99768408, -0.234722133, -0.0741825352, 0.541553392, 0.204375504, 0.239119344, 0.0194269465, -0.998365921, 0.233955203, -0.0744578892, -0.542123623, 0.204324809, -0.238600861 ] + - [ 0.0171760238, 0.998954442, -0.236194904, -0.0767813111, 0.541212397, 0.207302365, 0.235180739, 0.0170617414, -0.999642296, 0.235425689, -0.0770564694, -0.541782057, 0.207255842, -0.234663872 ] + - [ 0.0148460614, 1.00020761, -0.237665357, -0.0793690645, 0.540876018, 0.210214983, 0.231295453, 0.0147314907, -1.00090139, 0.236893904, -0.0796440006, -0.541445116, 0.210172583, -0.230780179 ] + - [ 0.0125515048, 1.00144326, -0.239133433, -0.0819454615, 0.540544339, 0.213112959, 0.227464442, 0.0124366513, -1.0021429, 0.238359786, -0.0822201489, -0.541112881, 0.213074633, -0.226950739 ] + - [ 0.0102928108, 1.00266111, -0.240599068, -0.0845101685, 0.540217441, 0.215995895, 0.223688662, 0.0101776803, -1.00336651, 0.239823276, -0.0847845802, -0.540785437, 0.215961593, -0.223176508 ] + - [ 0.00807043634, 1.00386083, -0.242062204, -0.0870628518, 0.539895408, 0.218863393, 0.21996907, 0.00795503438, -1.00457191, 0.241284313, -0.0873369607, -0.540462865, 0.218833064, -0.219458442 ] + - [ 0.00588483837, 1.00504212, -0.243522777, -0.0896031776, 0.539578322, 0.221715055, 0.216306623, 0.00576917055, -1.00575879, 0.242742836, -0.0898769561, -0.540145248, 0.221688647, -0.215797496 ] + - [ 0.00373647373, 1.00620467, -0.244980726, -0.0921308123, 0.539266266, 0.224550482, 0.212702276, 0.00362054568, -1.00692685, 0.244198785, -0.0924042325, -0.539832671, 0.224527941, -0.212194628 ] + - [ 0.00162579933, 1.00734817, -0.246435991, -0.0946454221, 0.538959323, 0.227369275, 0.209156985, 0.00150961668, -1.00807576, 0.245652099, -0.0949184559, -0.539525215, 0.227350548, -0.208650792 ] + - [ -0.000446727939, 1.00847231, -0.24788851, -0.0971466733, 0.538657577, 0.230171037, 0.205671709, -0.000563159551, -1.00920523, 0.247102718, -0.0974192923, -0.539222963, 0.230156069, -0.205166944 ] + - [ -0.00248065119, 1.00957679, -0.249338222, -0.0996342322, 0.538361108, 0.232955369, 0.202247402, -0.00259732612, -1.01031494, 0.248550581, -0.0999064076, -0.538925999, 0.232944105, -0.201744042 ] + - [ -0.00447551354, 1.0106613, -0.250785065, -0.102107765, 0.538070001, 0.235721873, 0.198885021, -0.00459242614, -1.01140458, 0.249995628, -0.102379468, -0.538634405, 0.235714255, -0.19838304 ] + - [ -0.00643085808, 1.01172552, -0.252228978, -0.104566938, 0.537784339, 0.238470151, 0.195585522, -0.00654800269, -1.01247384, 0.251437798, -0.104838139, -0.538348265, 0.238466121, -0.195084894 ] + - [ -0.00834622793, 1.01276915, -0.2536699, -0.107011418, 0.537504203, 0.241199803, 0.192349863, -0.00846359888, -1.01352241, 0.25287703, -0.107282087, -0.538067661, 0.241199304, -0.191850562 ] + - [ -0.0102211662, 1.01379189, -0.25510777, -0.109440871, 0.537229678, 0.243910432, 0.189178998, -0.0103387578, -1.01454999, 0.254313264, -0.109710978, -0.537792676, 0.243913404, -0.188680998 ] + - [ -0.012055216, 1.01479341, -0.256542525, -0.111854962, 0.536960844, 0.246601639, 0.186073886, -0.0121730226, -1.01555625, 0.255746441, -0.112124477, -0.537523393, 0.246608022, -0.185577159 ] + - [ -0.0138479204, 1.01577342, -0.257974106, -0.114253359, 0.536697787, 0.249273027, 0.183035481, -0.0139659363, -1.0165409, 0.257176498, -0.114522252, -0.537259895, 0.249282758, -0.182540001 ] + - [ -0.0155988225, 1.01673161, -0.25940245, -0.116635728, 0.536440587, 0.251924196, 0.180064741, -0.0157170421, -1.01750362, 0.258603375, -0.116903967, -0.537002265, 0.251937215, -0.179570479 ] + - [ -0.0173074655, 1.01766766, -0.260827496, -0.119001735, 0.536189329, 0.254554748, 0.177162622, -0.017425883, -1.01844411, 0.260027013, -0.119269289, -0.536750587, 0.254570991, -0.17666955 ] + - [ -0.0189733925, 1.01858127, -0.262249183, -0.121351046, 0.535944094, 0.257164285, 0.17433008, -0.0190920021, -1.01936204, 0.26144735, -0.121617884, -0.536504942, 0.257183688, -0.17383817 ] + - [ -0.0205961465, 1.01947213, -0.26366745, -0.123683328, 0.535704966, 0.259752409, 0.171568071, -0.0207149426, -1.02025712, 0.262864325, -0.123949417, -0.536265414, 0.259774907, -0.171077294 ] + - [ -0.0221752707, 1.02033993, -0.265082235, -0.125998246, 0.535472027, 0.262318721, 0.168877553, -0.0222942476, -1.02112903, 0.26427788, -0.126263555, -0.536032085, 0.262344249, -0.168387879 ] + - [ -0.0237103081, 1.02118437, -0.266493477, -0.128295468, 0.535245361, 0.264862822, 0.166259481, -0.0238294601, -1.02197747, 0.265687952, -0.128559964, -0.53580504, 0.264891313, -0.165770881 ] + - [ -0.025200802, 1.02200513, -0.267901114, -0.130574659, 0.53502505, 0.267384316, 0.163714812, -0.0253201233, -1.02280211, 0.267094481, -0.13083831, -0.53558436, 0.267415702, -0.163227255 ] + - [ -0.0266462953, 1.0228019, -0.269305086, -0.132835486, 0.534811176, 0.269882802, 0.161244502, -0.0267657802, -1.02360266, 0.268497407, -0.133098258, -0.535370129, 0.269917015, -0.160757958 ] + - [ -0.0280463313, 1.02357439, -0.270705332, -0.135077615, 0.534603823, 0.272357883, 0.158849507, -0.0281659739, -1.0243788, 0.269896669, -0.135339474, -0.535162429, 0.272394853, -0.158363946 ] + - [ -0.0294004529, 1.02432227, -0.272101789, -0.137300712, 0.534403074, 0.274809161, 0.156530784, -0.0295202476, -1.02513023, 0.271292208, -0.137561626, -0.534961344, 0.274848817, -0.156046174 ] + - [ -0.0307082034, 1.02504524, -0.273494396, -0.139504444, 0.534209011, 0.277236237, 0.15428929, -0.0308281444, -1.02585662, 0.272683961, -0.139764378, -0.534766956, 0.277278508, -0.153805599 ] + - [ -0.0319691258, 1.025743, -0.274883093, -0.141688476, 0.534021717, 0.279638713, 0.15212598, -0.0320892073, -1.02655768, 0.274071869, -0.141947396, -0.534579349, 0.279683527, -0.151643177 ] + - [ -0.0331827632, 1.02641523, -0.276267817, -0.143852476, 0.533841274, 0.28201619, 0.150041812, -0.0333029795, -1.02723309, 0.275455871, -0.144110347, -0.534398605, 0.282063474, -0.149559863 ] + - [ -0.0343486587, 1.02706162, -0.277648508, -0.145996109, 0.533667767, 0.28436827, 0.148037741, -0.034469004, -1.02788255, 0.276835907, -0.146252896, -0.534224807, 0.28441795, -0.147556614 ] + - [ -0.0354663556, 1.02768188, -0.279025104, -0.148119042, 0.533501277, 0.286694554, 0.146114724, -0.035586824, -1.02850574, 0.278211915, -0.14837471, -0.534058038, 0.286746556, -0.145634386 ] + - [ -0.0365353967, 1.02827568, -0.280397544, -0.150220941, 0.533341887, 0.288994645, 0.144273717, -0.0366559826, -1.02910235, 0.279583837, -0.150475455, -0.533898381, 0.289048892, -0.143794134 ] + - [ -0.0375553254, 1.02884272, -0.281765767, -0.152301472, 0.53318968, 0.291268144, 0.142515677, -0.0376760228, -1.02967207, 0.28095161, -0.152554795, -0.53374592, 0.291324559, -0.142036815 ] + - [ -0.0385256846, 1.02938269, -0.283129711, -0.154360302, 0.533044739, 0.293514653, 0.140841559, -0.0386464878, -1.0302146, 0.282315175, -0.154612399, -0.533600737, 0.293573159, -0.140363384 ] + - [ -0.0394460174, 1.02989528, -0.284489315, -0.156397097, 0.532907146, 0.295733773, 0.139252322, -0.0395669206, -1.03072962, 0.283674471, -0.15664793, -0.533462914, 0.295794291, -0.138774798 ] + - [ -0.0403158671, 1.03038019, -0.285844518, -0.158411523, 0.532776986, 0.297925106, 0.13774892, -0.0404368644, -1.03121683, 0.285029437, -0.158661056, -0.533332535, 0.297987556, -0.137272013 ] + - [ -0.0411347767, 1.0308371, -0.287195258, -0.160403246, 0.532654339, 0.300088253, 0.13633231, -0.0412558623, -1.0316759, 0.286380013, -0.160651443, -0.533209684, 0.300152555, -0.135855984 ] + - [ -0.0419022893, 1.03126572, -0.288541475, -0.162371933, 0.532539289, 0.302222817, 0.135003449, -0.0420234573, -1.03210655, 0.287726139, -0.162618755, -0.533094442, 0.30228889, -0.134527668 ] + - [ -0.0426179479, 1.03166572, -0.289883106, -0.16431725, 0.53243192, 0.304328398, 0.133763293, -0.0427391926, -1.03250844, 0.289067753, -0.16456266, -0.532986892, 0.30439616, -0.13328802 ] + - [ -0.0432812958, 1.0320368, -0.29122009, -0.166238863, 0.532332312, 0.306404599, 0.132612798, -0.0434026113, -1.03288128, 0.290404796, -0.166482823, -0.532887119, 0.306473966, -0.132137997 ] + - [ -0.0438918761, 1.03237865, -0.292552367, -0.168136439, 0.532240551, 0.308451021, 0.131552921, -0.0440132564, -1.03322475, 0.291737206, -0.168378911, -0.532795203, 0.308521909, -0.131078555 ] + - [ -0.0444492317, 1.03269097, -0.293879875, -0.170009644, 0.532156718, 0.310467266, 0.130584618, -0.0445706711, -1.03353855, 0.293064924, -0.170250589, -0.53271123, 0.310539591, -0.130110649 ] + - [ -0.044952906, 1.03297344, -0.295202552, -0.171858144, 0.532080895, 0.312452936, 0.129708845, -0.0450743985, -1.03382236, 0.294387888, -0.172097523, -0.532635281, 0.31252661, -0.129235236 ] + - [ -0.0454024418, 1.03322576, -0.296520337, -0.173681606, 0.532013167, 0.314407631, 0.12892656, -0.0455239817, -1.03407587, 0.295706039, -0.173919379, -0.532567439, 0.314482569, -0.128453271 ] + - [ -0.0457973824, 1.03344762, -0.297833169, -0.175479695, 0.531953615, 0.316330955, 0.128238718, -0.0459189637, -1.03429878, 0.297019315, -0.175715823, -0.532507788, 0.316407068, -0.127765711 ] + - [ -0.0461372709, 1.03363871, -0.299140987, -0.177252078, 0.531902323, 0.318222507, 0.127646275, -0.0462588877, -1.03449077, 0.298327657, -0.177486522, -0.53245641, 0.318299708, -0.127173512 ] + - [ -0.0464216504, 1.03379871, -0.300443729, -0.178998422, 0.531859373, 0.320081891, 0.127150189, -0.0465432968, -1.03465154, 0.299631003, -0.17923114, -0.532413388, 0.320160089, -0.126677629 ] + - [ -0.0466500639, 1.03392734, -0.301741335, -0.180718392, 0.531824848, 0.321908707, 0.126751415, -0.046771734, -1.03478077, 0.300929293, -0.180949345, -0.532378805, 0.321987812, -0.126279019 ] + - [ -0.0468220547, 1.03402426, -0.303033742, -0.182411655, 0.531798831, 0.323702558, 0.12645091, -0.0469437425, -1.03487815, 0.302222466, -0.182640802, -0.532352745, 0.323782478, -0.125978637 ] + - [ -0.0469371657, 1.03408918, -0.304320889, -0.184077877, 0.531781405, 0.325463045, 0.12624963, -0.0470588655, -1.03494338, 0.303510463, -0.184305177, -0.532335289, 0.325543688, -0.12577744 ] + - [ -0.0469949402, 1.03412179, -0.305602715, -0.185716725, 0.531772652, 0.327189769, 0.126148532, -0.0471166458, -1.03497614, 0.304793222, -0.185942136, -0.532326522, 0.327271042, -0.125676383 ] + - [ -0.0469919796, 1.03411398, -0.306881169, -0.187331725, 0.531791206, 0.328886255, 0.126137403, -0.0471136937, -1.03496831, 0.306072698, -0.187555199, -0.532345046, 0.328968063, -0.12566528 ] + - [ -0.0469106993, 1.03401917, -0.308168194, -0.188945781, 0.531947747, 0.330575759, 0.126149801, -0.0470324755, -1.03487314, 0.307360857, -0.18916723, -0.532501366, 0.330658001, -0.125677849 ] + - [ -0.0467490346, 1.03383046, -0.309465599, -0.190562606, 0.532259103, 0.332262114, 0.126174543, -0.0468709341, -1.03468372, 0.308659514, -0.190781937, -0.532812282, 0.332344689, -0.125702931 ] + - [ -0.0465079202, 1.03354882, -0.31077318, -0.192182061, 0.532723475, 0.333945244, 0.12621157, -0.0466300035, -1.03440102, 0.309968462, -0.192399182, -0.533275998, 0.334028052, -0.125740464 ] + - [ -0.0461882906, 1.03317521, -0.312090731, -0.193804007, 0.533339061, 0.335625074, 0.126260825, -0.0463106177, -1.03402601, 0.311287494, -0.194018827, -0.533890716, 0.335708016, -0.125790391 ] + - [ -0.0457910807, 1.0327106, -0.313418045, -0.195428304, 0.534104063, 0.337301527, 0.126322249, -0.0459137108, -1.03355965, 0.312616403, -0.195640734, -0.534654637, 0.337384506, -0.12585265 ] + - [ -0.0453172252, 1.03215594, -0.314754919, -0.197054813, 0.53501668, 0.338974528, 0.126395785, -0.0454402166, -1.03300291, 0.313954981, -0.197264765, -0.535565965, 0.339057447, -0.125927183 ] + - [ -0.0447676587, 1.03151219, -0.316101146, -0.198683395, 0.536075111, 0.340644, 0.126481375, -0.0448910692, -1.03235676, 0.315303022, -0.198890781, -0.536622901, 0.340726765, -0.126013929 ] + - [ -0.0441433159, 1.03078033, -0.31745652, -0.200313911, 0.537277557, 0.342309869, 0.126578961, -0.0442672026, -1.03162216, 0.316660319, -0.200518645, -0.537823648, 0.342392385, -0.126112829 ] + - [ -0.0434451316, 1.02996131, -0.318820837, -0.201946221, 0.538622217, 0.343972057, 0.126688484, -0.0435695508, -1.03080008, 0.318026665, -0.202148219, -0.539166409, 0.344054231, -0.126223823 ] + - [ -0.0426740404, 1.02905609, -0.320193891, -0.203580186, 0.540107291, 0.34563049, 0.126809888, -0.0427990477, -1.02989148, 0.319401854, -0.203779365, -0.540649386, 0.345712231, -0.126346852 ] + - [ -0.0418309771, 1.02806564, -0.321575475, -0.205215667, 0.54173098, 0.347285092, 0.126943113, -0.0419566274, -1.02889733, 0.320785677, -0.205411944, -0.542270781, 0.347366308, -0.126481855 ] + - [ -0.0409168764, 1.02699091, -0.322965386, -0.206852525, 0.543491481, 0.348935785, 0.127088103, -0.0410432238, -1.02781861, 0.322177929, -0.207045819, -0.544028796, 0.349016388, -0.126628773 ] + - [ -0.0399326729, 1.02583288, -0.324363416, -0.20849062, 0.545386997, 0.350582496, 0.1272448, -0.0400597709, -1.02665626, 0.323578401, -0.208680851, -0.545921634, 0.350662396, -0.126787546 ] + - [ -0.0388793014, 1.0245925, -0.325769361, -0.210129813, 0.547415726, 0.352225147, 0.127413145, -0.0390072027, -1.02541127, 0.324986888, -0.210316902, -0.547947498, 0.352304258, -0.126958115 ] + - [ -0.0377576966, 1.02327073, -0.327183015, -0.211769965, 0.549575868, 0.353863664, 0.12759308, -0.0378864533, -1.02408459, 0.326403183, -0.211953836, -0.550104589, 0.353941898, -0.12714042 ] + - [ -0.0365687931, 1.02186854, -0.328604173, -0.213410937, 0.551865623, 0.355497969, 0.127784549, -0.0366984565, -1.0226772, 0.327827077, -0.213591512, -0.55239111, 0.355575243, -0.127334401 ] + - [ -0.0353135257, 1.02038689, -0.330032628, -0.215052589, 0.554283191, 0.357127988, 0.127987492, -0.0354441465, -1.02119006, 0.329258365, -0.215229794, -0.554805263, 0.357204218, -0.127539998 ] + - [ -0.0339928291, 1.01882674, -0.331468177, -0.216694782, 0.556826771, 0.358753645, 0.128201852, -0.0341244571, -1.01962413, 0.33069684, -0.216868543, -0.557345251, 0.358828747, -0.127757152 ] + - [ -0.032607638, 1.01718905, -0.332910612, -0.218337377, 0.559494564, 0.360374863, 0.128427571, -0.0327403224, -1.01798038, 0.332142294, -0.218507622, -0.560009276, 0.360448756, -0.127985803 ] + - [ -0.031158887, 1.01547479, -0.334359728, -0.219980235, 0.56228477, 0.361991567, 0.128664591, -0.0312926763, -1.01625979, 0.333594521, -0.220146892, -0.56279554, 0.362064171, -0.128225891 ] + - [ -0.029647511, 1.01368491, -0.335815321, -0.221623216, 0.565195587, 0.36360368, 0.128912855, -0.0297824529, -1.01446331, 0.335053313, -0.221786214, -0.565702246, 0.363674916, -0.128477357 ] + - [ -0.0280744445, 1.01182039, -0.337277184, -0.223266181, 0.568225216, 0.365211128, 0.129172304, -0.0282105861, -1.01259191, 0.336518464, -0.223425453, -0.568727597, 0.365280917, -0.12874014 ] + - [ -0.0264406223, 1.00988217, -0.338745112, -0.22490899, 0.571371858, 0.366813834, 0.12944288, -0.02657801, -1.01064656, 0.337989767, -0.225064468, -0.571869793, 0.366882099, -0.129014182 ] + - [ -0.0247469792, 1.00787123, -0.340218899, -0.226551506, 0.57463371, 0.368411723, 0.129724526, -0.0248856585, -1.00862822, 0.339467015, -0.226703122, -0.575127039, 0.368478388, -0.129299422 ] + - [ -0.0229944497, 1.00578853, -0.34169834, -0.228193588, 0.578008974, 0.370004718, 0.130017183, -0.0231344656, -1.00653786, 0.34095, -0.228341277, -0.578497536, 0.370069708, -0.129595801 ] + - [ -0.0211839686, 1.00363502, -0.34318323, -0.229835096, 0.58149585, 0.371592743, 0.130320794, -0.0213253653, -1.00437646, 0.342438516, -0.229978796, -0.581979486, 0.371655986, -0.129903259 ] + - [ -0.0193164707, 1.00141167, -0.344673362, -0.231475893, 0.585092536, 0.373175724, 0.130635302, -0.0194592916, -1.00214496, 0.343932357, -0.231615539, -0.585571092, 0.373237146, -0.130221736 ] + - [ -0.0173928905, 0.999119444, -0.346168532, -0.233115838, 0.588797233, 0.374753584, 0.130960647, -0.0175371784, -0.999844345, 0.345431314, -0.233251369, -0.589270557, 0.374813113, -0.130551173 ] + - [ -0.0154141629, 0.996759303, -0.347668533, -0.234754793, 0.592608141, 0.376326246, 0.131296772, -0.0155599599, -0.997475575, 0.346935182, -0.234886148, -0.593076082, 0.376383814, -0.13089151 ] + - [ -0.0133812225, 0.994332207, -0.349173161, -0.236392618, 0.59652346, 0.377893636, 0.13164362, -0.0135285699, -0.995039618, 0.348443752, -0.236519738, -0.596985871, 0.377949173, -0.131242687 ] + - [ -0.011295004, 0.991839121, -0.350682209, -0.238029173, 0.600541388, 0.379455678, 0.132001131, -0.0114439424, -0.992537441, 0.349956819, -0.238152001, -0.600998124, 0.379509115, -0.131604644 ] + - [ -0.00915644209, 0.989281005, -0.352195473, -0.23966432, 0.604660127, 0.381012295, 0.13236925, -0.00930701152, -0.989970008, 0.351474175, -0.239782798, -0.605111046, 0.381063566, -0.131977322 ] + - [ -0.00696647154, 0.986658821, -0.353712746, -0.241297919, 0.608877876, 0.382563411, 0.132747916, -0.00711871115, -0.987338288, 0.352995613, -0.241411992, -0.609322837, 0.382612451, -0.132360661 ] + - [ -0.00472602702, 0.983973533, -0.355233823, -0.242929832, 0.613192834, 0.384108952, 0.133137074, -0.00487997531, -0.984643245, 0.354520926, -0.243039445, -0.613631701, 0.384155696, -0.132754601 ] + - [ -0.00243604324, 0.981226102, -0.3567585, -0.244559918, 0.617603202, 0.385648841, 0.133536664, -0.00259173798, -0.981885848, 0.356049908, -0.244665018, -0.61803584, 0.385693225, -0.133159083 ] + - [ -9.74548868e-05, 0.978417489, -0.358286569, -0.246188039, 0.62210718, 0.387183002, 0.133946629, -0.000254933154, -0.979067061, 0.357582352, -0.246288574, -0.622533456, 0.387224964, -0.133574046 ] + - [ 0.00228880332, 0.975548658, -0.359817826, -0.247814055, 0.626702967, 0.388711359, 0.134366911, 0.00212950518, -0.976187851, 0.35911805, -0.247909975, -0.627122752, 0.388750839, -0.133999432 ] + - [ 0.00472179669, 0.97262057, -0.361352065, -0.249437827, 0.631388762, 0.390233837, 0.134797452, 0.00456064302, -0.973249185, 0.360656795, -0.249529082, -0.631801929, 0.390270774, -0.134435181 ] + - [ 0.00720059051, 0.969634188, -0.36288908, -0.251059216, 0.636162767, 0.39175036, 0.135238194, 0.0070375464, -0.97025203, 0.362198381, -0.251145757, -0.636569191, 0.391784695, -0.134881232 ] + - [ 0.00972425009, 0.966590474, -0.364428667, -0.252678082, 0.64102318, 0.393260851, 0.135689079, 0.0095592813, -0.96719735, 0.363742601, -0.252759863, -0.641422739, 0.393292527, -0.135337526 ] + - [ 0.0122918407, 0.963490389, -0.365970619, -0.254294287, 0.645968202, 0.394765235, 0.13615005, 0.0121249138, -0.964086114, 0.365289247, -0.254371261, -0.646360777, 0.394794196, -0.135804003 ] + - [ 0.0149024277, 0.960334896, -0.367514731, -0.255907691, 0.650996032, 0.396263437, 0.136621048, 0.0147335098, -0.960919287, 0.366838113, -0.255979814, -0.651381505, 0.396289626, -0.136280604 ] + - [ 0.0175550763, 0.957124957, -0.369060797, -0.257518154, 0.656104871, 0.397755379, 0.137102016, 0.0173841353, -0.957697835, 0.368388992, -0.257585383, -0.656483128, 0.397778743, -0.136767269 ] + - [ 0.0202488518, 0.953861534, -0.370608613, -0.259125538, 0.661292917, 0.399240988, 0.137592895, 0.0200758565, -0.954422725, 0.369941677, -0.25918783, -0.661663846, 0.399261472, -0.137263938 ] + - [ 0.0229828196, 0.950545589, -0.372157972, -0.260729704, 0.666558371, 0.400720185, 0.138093629, 0.0228077392, -0.951094924, 0.371495961, -0.260787017, -0.666921863, 0.40073774, -0.137770552 ] + - [ 0.0257560449, 0.947178085, -0.373708668, -0.262330511, 0.671899433, 0.402192897, 0.138604158, 0.0255788495, -0.947715398, 0.373051637, -0.262382807, -0.672255381, 0.402207469, -0.13828705 ] + - [ 0.0285675931, 0.943759984, -0.375260498, -0.263927821, 0.677314302, 0.403659046, 0.139124425, 0.0283882534, -0.944285112, 0.374608497, -0.26397506, -0.677662602, 0.403670588, -0.138813374 ] + - [ 0.0314165294, 0.940292247, -0.376813254, -0.265521495, 0.682801178, 0.405118557, 0.139654373, 0.031235017, -0.940805034, 0.376166336, -0.26556364, -0.683141728, 0.405127019, -0.139349462 ] + - [ 0.0343019191, 0.936775836, -0.378366731, -0.267111393, 0.688358261, 0.406571355, 0.140193942, 0.0341182061, -0.937276131, 0.377724946, -0.267148408, -0.688690963, 0.406576689, -0.139895257 ] + - [ 0.0372228275, 0.933211715, -0.379920724, -0.268697376, 0.693983751, 0.408017363, 0.140743076, 0.0370368869, -0.933699367, 0.37928412, -0.268729225, -0.694308507, 0.408019524, -0.140450697 ] + - [ 0.0401783199, 0.929600845, -0.381475028, -0.270279305, 0.699675848, 0.409456505, 0.141301716, 0.0399901253, -0.93007571, 0.380843651, -0.270305955, -0.699992565, 0.409455447, -0.141015724 ] + - [ 0.0431674616, 0.925944188, -0.383029436, -0.27185704, 0.705432752, 0.410888706, 0.141869805, 0.0429769874, -0.926406126, 0.382403333, -0.271878459, -0.705741337, 0.410884386, -0.141590276 ] + - [ 0.046189318, 0.922242706, -0.384583744, -0.273430442, 0.711252661, 0.41231389, 0.142447285, 0.0459965392, -0.922691582, 0.383962958, -0.273446598, -0.711553026, 0.412306264, -0.142174296 ] + - [ 0.0492429543, 0.918497362, -0.386137745, -0.274999373, 0.717133777, 0.413731981, 0.143034097, 0.0490478466, -0.918933043, 0.38552232, -0.275010236, -0.717425836, 0.413721007, -0.142767723 ] + - [ 0.0523274357, 0.914709117, -0.387691235, -0.276563692, 0.723074299, 0.415142903, 0.143630184, 0.0521299757, -0.915131476, 0.38708121, -0.276569233, -0.723357967, 0.415128541, -0.143370497 ] + - [ 0.0554418277, 0.910878934, -0.389244007, -0.278123261, 0.729072427, 0.41654658, 0.144235488, 0.0552419924, -0.911287849, 0.388639424, -0.278123452, -0.729347623, 0.416528791, -0.143982559 ] + - [ 0.0585851955, 0.907007774, -0.390795857, -0.27967794, 0.73512636, 0.417942936, 0.144849952, 0.0583829629, -0.907403126, 0.390196753, -0.279672754, -0.735393005, 0.417921681, -0.144603849 ] + - [ 0.0617566043, 0.903096601, -0.392346578, -0.28122759, 0.741234299, 0.419331897, 0.145473516, 0.0615519531, -0.903478274, 0.39175299, -0.281217003, -0.741492317, 0.419307138, -0.145234307 ] + - [ 0.0649551196, 0.899146375, -0.393895965, -0.282772071, 0.747394442, 0.420713384, 0.146106124, 0.064748029, -0.89951426, 0.393307929, -0.282756059, -0.74764376, 0.420685087, -0.145873873 ] + - [ 0.0681798065, 0.89515806, -0.395443813, -0.284311246, 0.753604991, 0.422087324, 0.146747717, 0.0679702566, -0.89551205, 0.394861363, -0.284289784, -0.753845537, 0.422055453, -0.146522488 ] + - [ 0.0714297305, 0.891132617, -0.396989916, -0.285844973, 0.759864145, 0.42345364, 0.147398237, 0.071217702, -0.891472611, 0.396413085, -0.285818041, -0.760095851, 0.423418161, -0.147180092 ] + - [ 0.0747039567, 0.887071009, -0.398534069, -0.287373114, 0.766170104, 0.424812255, 0.148057628, 0.0744894311, -0.887396909, 0.397962888, -0.287340692, -0.766392902, 0.424773136, -0.147846626 ] + - [ 0.0780015504, 0.882974197, -0.400076065, -0.288895531, 0.772521067, 0.426163096, 0.14872583, 0.07778451, -0.88328591, 0.399510564, -0.288857598, -0.772734895, 0.426120304, -0.148522029 ] + - [ 0.0813215771, 0.878843144, -0.401615701, -0.290412082, 0.778915234, 0.427506084, 0.149402785, 0.0811020047, -0.87914058, 0.401055907, -0.290368622, -0.779120031, 0.42745959, -0.149206243 ] + - [ 0.0846631019, 0.874678812, -0.403152769, -0.29192263, 0.785350806, 0.428841145, 0.150088437, 0.0844409811, -0.874961887, 0.40259871, -0.291873624, -0.785546513, 0.42879092, -0.149899206 ] + - [ 0.0880251902, 0.870482162, -0.404687064, -0.293427035, 0.791825981, 0.430168203, 0.150782727, 0.0878005053, -0.870750796, 0.404138767, -0.293372469, -0.792012543, 0.430114218, -0.15060086 ] + - [ 0.0914069073, 0.866254158, -0.406218382, -0.294925157, 0.798338961, 0.431487182, 0.151485596, 0.0911796433, -0.866508273, 0.405675869, -0.294865016, -0.798516323, 0.43142941, -0.151311145 ] + - [ 0.0948073185, 0.861995761, -0.407746516, -0.296416858, 0.804887944, 0.432798006, 0.152196988, 0.0945774611, -0.862235286, 0.407209811, -0.296351129, -0.805056057, 0.432736422, -0.152030001 ] + - [ 0.0982254889, 0.857707933, -0.409271261, -0.297901999, 0.81147113, 0.434100599, 0.152916845, 0.0979930247, -0.857932801, 0.408740385, -0.297830669, -0.811629945, 0.434035178, -0.152757368 ] + - [ 0.101660484, 0.853391637, -0.410792411, -0.299380439, 0.81808672, 0.435394886, 0.153645108, 0.1014254, -0.853601783, 0.410267384, -0.299303498, -0.81823619, 0.435325604, -0.153493187 ] + - [ 0.105111369, 0.849047834, -0.412309762, -0.30085204, 0.824732913, 0.43668079, 0.154381719, 0.104873653, -0.8492432, 0.411790601, -0.300769479, -0.824872996, 0.436607625, -0.154237398 ] + - [ 0.10857721, 0.844677487, -0.413823106, -0.302316662, 0.831407908, 0.437958236, 0.155126621, 0.108336851, -0.844858017, 0.41330983, -0.302228472, -0.831538564, 0.437881166, -0.154989941 ] + - [ 0.11205707, 0.840281558, -0.41533224, -0.303774166, 0.838109907, 0.439227148, 0.155879756, 0.111814058, -0.840447202, 0.414824863, -0.30368034, -0.838231096, 0.439146153, -0.155750757 ] + - [ 0.115550017, 0.835861009, -0.416836956, -0.305224414, 0.844837107, 0.440487449, 0.156641066, 0.11530434, -0.836011719, 0.416335493, -0.305124946, -0.844948795, 0.440402511, -0.156519786 ] + - [ 0.119055115, 0.831416802, -0.418337051, -0.306667265, 0.851587711, 0.441739065, 0.157410493, 0.118806765, -0.831552537, 0.417841514, -0.30656215, -0.851689864, 0.441650166, -0.157296967 ] + - [ 0.122571429, 0.826949899, -0.419832318, -0.308102581, 0.858359916, 0.442981919, 0.158187978, 0.122320398, -0.827070621, 0.419342719, -0.307991816, -0.858452504, 0.442889042, -0.158082242 ] + - [ 0.126098025, 0.822461263, -0.421322552, -0.309530222, 0.865151923, 0.444215935, 0.158973466, 0.125844304, -0.822566938, 0.4208389, -0.309413804, -0.865234918, 0.444119065, -0.158875551 ] + - [ 0.129633969, 0.817951855, -0.422807546, -0.310950048, 0.871961933, 0.445441038, 0.159766896, 0.129377551, -0.818042453, 0.422329851, -0.310827977, -0.872035309, 0.44534016, -0.159676834 ] + - [ 0.133178324, 0.813422637, -0.424287097, -0.312361922, 0.878788144, 0.446657152, 0.160568212, 0.132919203, -0.813498134, 0.423815365, -0.312234197, -0.878851878, 0.446552252, -0.160486031 ] + - [ 0.136730157, 0.808874573, -0.425760998, -0.313765703, 0.885628756, 0.447864201, 0.161377355, 0.136468327, -0.808934947, 0.425295234, -0.313632326, -0.885682829, 0.447755267, -0.161303082 ] + - [ 0.140288533, 0.804308623, -0.427229043, -0.315161252, 0.892481969, 0.449062109, 0.162194268, 0.140023989, -0.804353858, 0.426769252, -0.315022226, -0.892526362, 0.44894913, -0.162127928 ] + - [ 0.143852517, 0.79972575, -0.428691028, -0.31654843, 0.899345984, 0.4502508, 0.163018893, 0.143585256, -0.799755833, 0.428237213, -0.316403758, -0.899380682, 0.450133767, -0.16296051 ] + - [ 0.147421175, 0.795126917, -0.430146746, -0.317927097, 0.906218999, 0.451430198, 0.163851171, 0.147151192, -0.795141839, 0.429698908, -0.317776785, -0.90624399, 0.451309102, -0.163800767 ] + - [ 0.150993571, 0.790513084, -0.431595992, -0.319297115, 0.913099216, 0.452600228, 0.164691045, 0.150720864, -0.790512843, 0.431154131, -0.319141168, -0.913114489, 0.452475061, -0.164648639 ] + - [ 0.154568772, 0.785885215, -0.433038561, -0.320658344, 0.919984833, 0.453760813, 0.165538458, 0.154293338, -0.78586981, 0.432602675, -0.32049677, -0.91999038, 0.453631569, -0.165504068 ] + - [ 0.158145842, 0.781244272, -0.434474247, -0.322010646, 0.92687405, 0.454911879, 0.166393351, 0.15786768, -0.781213707, 0.434044333, -0.321843453, -0.926869867, 0.454778552, -0.166366993 ] + - [ 0.161723847, 0.776591216, -0.435902844, -0.323353879, 0.933765067, 0.456053348, 0.167255666, 0.161442956, -0.776545501, 0.435478899, -0.323181077, -0.933751151, 0.455915934, -0.167237354 ] + - [ 0.165301852, 0.77192701, -0.437324148, -0.324687907, 0.940656084, 0.457185145, 0.168125345, 0.165018232, -0.771866158, 0.436906164, -0.324509507, -0.940632435, 0.457043641, -0.168115093 ] + - [ 0.168878922, 0.767252616, -0.438737952, -0.326012588, 0.947545301, 0.458307195, 0.169002331, 0.168592574, -0.767176643, 0.438325923, -0.325828603, -0.947511922, 0.458161599, -0.169000148 ] + - [ 0.172454122, 0.762568996, -0.440144051, -0.327327784, 0.954430918, 0.459419421, 0.169886565, 0.172165048, -0.762477925, 0.439737968, -0.327138227, -0.954387813, 0.459269733, -0.169892461 ] + - [ 0.176026519, 0.757877112, -0.441542239, -0.328633356, 0.961311135, 0.460521748, 0.17077799, 0.17573472, -0.757770968, 0.441142093, -0.328438241, -0.961258312, 0.460367967, -0.170791971 ] + - [ 0.179595176, 0.753177926, -0.442932311, -0.329929164, 0.96818415, 0.461614099, 0.171676548, 0.179300656, -0.753056739, 0.44253809, -0.329728508, -0.96812162, 0.461456227, -0.17169862 ] + - [ 0.183159161, 0.748472401, -0.444314062, -0.33121507, 0.975048165, 0.462696399, 0.172582181, 0.182861922, -0.748336206, 0.443925752, -0.331008889, -0.97497594, 0.462534439, -0.172612347 ] + - [ 0.186717537, 0.743761498, -0.445687286, -0.332490933, 0.981901378, 0.463768572, 0.17349483, 0.186417584, -0.743610333, 0.445304873, -0.332279246, -0.981819473, 0.463602528, -0.173533092 ] + - [ 0.19026937, 0.73904618, -0.447051777, -0.333756615, 0.98874199, 0.464830543, 0.174414439, 0.189966708, -0.738880088, 0.446675246, -0.333539442, -0.988650424, 0.464660419, -0.174460797 ] + - [ 0.193813725, 0.734327409, -0.44840733, -0.335011977, 0.995568201, 0.465882234, 0.175340949, 0.19350836, -0.734146437, 0.448036663, -0.334789337, -0.995466993, 0.465708037, -0.1753954 ] + - [ 0.197349668, 0.729606146, -0.449753739, -0.336256878, 1.00237821, 0.466923572, 0.176274303, 0.197041607, -0.729410346, 0.449388918, -0.336028795, -1.00226738, 0.466745308, -0.176336843 ] + - [ 0.200876264, 0.724883355, -0.451090799, -0.337491181, 1.00917022, 0.467954479, 0.177214442, 0.200565513, -0.724672781, 0.450731803, -0.337257676, -1.0090498, 0.467772157, -0.177285066 ] + - [ 0.204392579, 0.720159997, -0.452418304, -0.338714745, 1.01594242, 0.468974879, 0.178161308, 0.204079146, -0.71993471, 0.452065113, -0.338475844, -1.01581244, 0.468788509, -0.178240008 ] + - [ 0.207897676, 0.715437034, -0.453736049, -0.339927431, 1.02269303, 0.469984698, 0.179114844, 0.207581571, -0.715197098, 0.453388639, -0.339683159, -1.02255351, 0.46979429, -0.179201611 ] + - [ 0.211390623, 0.710715429, -0.455043829, -0.3411291, 1.02942023, 0.470983858, 0.180074992, 0.211071854, -0.710460912, 0.454702175, -0.340879485, -1.02927121, 0.470789425, -0.180169815 ] + - [ 0.214870484, 0.705996143, -0.456341437, -0.342319614, 1.03612223, 0.471972285, 0.181041693, 0.214549061, -0.705727118, 0.456005514, -0.342064682, -1.03596374, 0.471773838, -0.18114456 ] + - [ 0.218336324, 0.701280139, -0.457628668, -0.343498832, 1.04279722, 0.472949903, 0.182014891, 0.218012258, -0.700996682, 0.457298449, -0.343238613, -1.04262931, 0.472747456, -0.182125785 ] + - [ 0.22178721, 0.696568378, -0.458905317, -0.344666615, 1.04944341, 0.473916634, 0.182994527, 0.221460511, -0.696270572, 0.458580773, -0.34440114, -1.04926611, 0.473710204, -0.183113432 ] + - [ 0.225222205, 0.691861824, -0.460171178, -0.345822825, 1.056059, 0.474872405, 0.183980543, 0.224892886, -0.691549753, 0.45985228, -0.345552125, -1.05587236, 0.474662007, -0.184107441 ] + - [ 0.228640375, 0.687161437, -0.461426045, -0.346967321, 1.06264219, 0.475817138, 0.184972881, 0.22830845, -0.686835191, 0.461112761, -0.346691429, -1.06244625, 0.475602789, -0.185107752 ] + - [ 0.232040786, 0.682468181, -0.462669714, -0.348099965, 1.06919117, 0.476750759, 0.185971483, 0.231706268, -0.682127854, 0.462362011, -0.347818915, -1.06898598, 0.476532478, -0.186114305 ] + - [ 0.235422503, 0.677783018, -0.463901978, -0.349220617, 1.07570415, 0.47767319, 0.186976292, 0.235085406, -0.677428707, 0.463599822, -0.348934445, -1.07548976, 0.477450997, -0.187127041 ] + - [ 0.238784592, 0.673106908, -0.465122633, -0.350329139, 1.08217933, 0.478584357, 0.18798725, 0.23844493, -0.672738716, 0.464825987, -0.35003788, -1.08195579, 0.478358273, -0.1881459 ] + - [ 0.242126116, 0.668440815, -0.466331472, -0.35142539, 1.0886149, 0.479484183, 0.189004298, 0.241783907, -0.66805885, 0.4660403, -0.351129083, -1.08838227, 0.47925423, -0.189170822 ] + - [ 0.245446143, 0.663785701, -0.46752829, -0.352509232, 1.09500907, 0.480372593, 0.19002738, 0.245101401, -0.663390072, 0.467242553, -0.352207915, -1.09476741, 0.480138793, -0.190201747 ] + - [ 0.248743737, 0.659142528, -0.468712881, -0.353580525, 1.10136003, 0.481249511, 0.191056436, 0.24839648, -0.658733351, 0.468432539, -0.353274238, -1.1011094, 0.481011889, -0.191238617 ] + - [ 0.252017963, 0.654512258, -0.469885041, -0.35463913, 1.10766599, 0.482114861, 0.192091409, 0.251668209, -0.654089652, 0.469610052, -0.354327915, -1.10740645, 0.481873442, -0.19228137 ] + - [ 0.255267887, 0.649895853, -0.471044563, -0.355684908, 1.11392514, 0.482968566, 0.193132241, 0.254915655, -0.649459942, 0.470774885, -0.355368808, -1.11365676, 0.482723378, -0.193329947 ] + - [ 0.258492574, 0.645294275, -0.472191242, -0.35671772, 1.12013569, 0.483810552, 0.194178875, 0.258137882, -0.644845186, 0.47192683, -0.356396778, -1.11985854, 0.483561621, -0.19438429 ] + - [ 0.261691089, 0.640708486, -0.473324872, -0.357737426, 1.12629584, 0.484640742, 0.195231252, 0.261333958, -0.640246353, 0.473065681, -0.357411687, -1.12600998, 0.484388098, -0.195444337 ] + - [ 0.264862498, 0.636139449, -0.474445248, -0.358743887, 1.13240377, 0.485459061, 0.196289314, 0.264502948, -0.635664407, 0.474191231, -0.358413397, -1.1321093, 0.485202733, -0.196510029 ] + - [ 0.268005866, 0.631588126, -0.475552165, -0.359736964, 1.13845771, 0.486265432, 0.197353004, 0.267643919, -0.631100316, 0.475303273, -0.359401771, -1.13815468, 0.486005451, -0.197581307 ] + - [ 0.271120258, 0.627055478, -0.476645416, -0.360716518, 1.14445583, 0.487059781, 0.198422263, 0.270755936, -0.626555045, 0.476401599, -0.360376669, -1.14414433, 0.486796179, -0.198658111 ] + - [ 0.274204739, 0.622542468, -0.477724797, -0.361682409, 1.15039636, 0.48784203, 0.199497035, 0.273838065, -0.622029561, 0.477486003, -0.361337955, -1.15007647, 0.487574841, -0.19974038 ] + - [ 0.277258376, 0.618050058, -0.478790102, -0.362634498, 1.15627747, 0.488612104, 0.20057726, 0.276889372, -0.617524831, 0.478556279, -0.36228549, -1.15594928, 0.488341363, -0.200828056 ] + - [ 0.280280232, 0.61357921, -0.479841125, -0.363572645, 1.16209738, 0.489369928, 0.201662881, 0.279908924, -0.613041821, 0.479612218, -0.363219136, -1.16176097, 0.48909567, -0.201921079 ] + - [ 0.283269374, 0.609130887, -0.480877661, -0.364496713, 1.16785429, 0.490115425, 0.20275384, 0.282895786, -0.608581496, 0.480653615, -0.364138755, -1.16750974, 0.489837687, -0.203019389 ] + - [ 0.286224866, 0.604706049, -0.481899503, -0.36540656, 1.17354638, 0.490848519, 0.20385008, 0.285849024, -0.604144825, 0.481680261, -0.365044209, -1.17319379, 0.490567339, -0.204122926 ] + - [ 0.289145775, 0.600305661, -0.482906448, -0.366302049, 1.17917187, 0.491569136, 0.204951542, 0.288767705, -0.599732772, 0.482691951, -0.365935359, -1.17881134, 0.491284552, -0.20523163 ] + - [ 0.292031164, 0.595930683, -0.483898289, -0.367183039, 1.18472896, 0.492277198, 0.206058168, 0.291650894, -0.595346304, 0.483688477, -0.366812069, -1.18436057, 0.491989252, -0.206345442 ] + - [ 0.294880101, 0.591582077, -0.484874821, -0.368049392, 1.19021583, 0.49297263, 0.207169901, 0.294497658, -0.590986389, 0.484669632, -0.3676742, -1.1898397, 0.492681362, -0.207464302 ] + - [ 0.297691649, 0.587260807, -0.485835837, -0.368900969, 1.1956307, 0.493655357, 0.208286682, 0.297307062, -0.586653991, 0.485635209, -0.368521613, -1.19524692, 0.493360809, -0.208588151 ] + - [ 0.300464874, 0.582967834, -0.486781134, -0.369737629, 1.20097176, 0.494325302, 0.209408454, 0.300078172, -0.582350078, 0.486585002, -0.369354171, -1.20058044, 0.494027519, -0.209716928 ] + - [ 0.303198842, 0.578704119, -0.487710504, -0.370559234, 1.20623722, 0.494982389, 0.210535159, 0.302810055, -0.578075616, 0.487518804, -0.370171736, -1.20583846, 0.494681415, -0.210850574 ] + - [ 0.305892617, 0.574470626, -0.488623743, -0.371365645, 1.21142526, 0.495626543, 0.211666739, 0.305501776, -0.573831571, 0.488436407, -0.370974169, -1.21101917, 0.495322424, -0.21198903 ] + - [ 0.308545266, 0.570268317, -0.489520645, -0.372156722, 1.2165341, 0.496257688, 0.212803136, 0.308152401, -0.569618909, 0.489337604, -0.371761333, -1.2161208, 0.495950471, -0.213132235 ] + - [ 0.311155853, 0.566098153, -0.490401005, -0.372932326, 1.22156193, 0.496875747, 0.213944292, 0.310760997, -0.565438598, 0.490222189, -0.37253309, -1.22114153, 0.496565481, -0.21428013 ] + - [ 0.313723444, 0.561961096, -0.491264617, -0.373692317, 1.22650695, 0.497480646, 0.215090149, 0.31332663, -0.561291603, 0.491089955, -0.373289301, -1.22607956, 0.497167379, -0.215432655 ] + - [ 0.316247103, 0.55785811, -0.492111275, -0.374436558, 1.23136737, 0.498072308, 0.21624065, 0.315848365, -0.557178891, 0.491940694, -0.374029829, -1.23093311, 0.497756091, -0.21658975 ] + - [ 0.318725897, 0.553790155, -0.492940775, -0.375164907, 1.23614137, 0.498650658, 0.217395736, 0.318325268, -0.553101428, 0.4927742, -0.374754535, -1.23570037, 0.498331542, -0.217751356 ] + - [ 0.32115889, 0.549758194, -0.493752909, -0.375877227, 1.24082717, 0.499215619, 0.21855535, 0.320756406, -0.54906018, 0.493590266, -0.375463282, -1.24037955, 0.498893657, -0.218917413 ] + - [ 0.323545148, 0.54576319, -0.494547474, -0.376573377, 1.24542295, 0.499767115, 0.219719433, 0.323140844, -0.545056115, 0.494388685, -0.376155931, -1.24496885, 0.499442362, -0.220087861 ] + - [ 0.325883737, 0.541806103, -0.495324263, -0.377253219, 1.24992693, 0.500305072, 0.220887928, 0.325477649, -0.541090197, 0.49516925, -0.376832344, -1.24946646, 0.499977581, -0.221262641 ] + - [ 0.328173721, 0.537887898, -0.496083071, -0.377916613, 1.2543373, 0.500829413, 0.222060777, 0.327765887, -0.537163395, 0.495931754, -0.377492384, -1.2538706, 0.500499241, -0.222441692 ] + - [ 0.330414165, 0.534009534, -0.496823693, -0.378563421, 1.25865226, 0.501340061, 0.223237923, 0.330004622, -0.533276673, 0.496675989, -0.378135912, -1.25817946, 0.501007266, -0.223624956 ] + - [ 0.332604136, 0.530171976, -0.497545922, -0.379193502, 1.26287001, 0.501836943, 0.224419306, 0.332192923, -0.529430999, 0.49740175, -0.37876279, -1.26239126, 0.501501582, -0.224812372 ] + - [ 0.334742698, 0.526376184, -0.498249554, -0.379806717, 1.26698875, 0.50231998, 0.225604869, 0.334329854, -0.525627339, 0.498108829, -0.37937288, -1.26650418, 0.501982113, -0.226003881 ] + - [ 0.336828916, 0.522623121, -0.498934382, -0.380402928, 1.27100667, 0.502789098, 0.226794555, 0.336414481, -0.521866659, 0.498797019, -0.379966044, -1.27051643, 0.502448787, -0.227199423 ] + - [ 0.338861856, 0.518913749, -0.499600202, -0.380981994, 1.27492199, 0.503244221, 0.227988305, 0.338445871, -0.518149926, 0.499466114, -0.380542145, -1.27442622, 0.502901526, -0.228398938 ] + - [ 0.340840584, 0.515249031, -0.500246807, -0.381543778, 1.2787329, 0.503685273, 0.229186062, 0.34042309, -0.514478105, 0.500115905, -0.381101043, -1.27823174, 0.503340258, -0.229602366 ] + - [ 0.342764164, 0.511629927, -0.500873993, -0.382088139, 1.2824376, 0.504112178, 0.230387768, 0.342345203, -0.510852164, 0.500746187, -0.381642602, -1.28193121, 0.503764906, -0.230809649 ] + - [ 0.344631662, 0.508057402, -0.501481554, -0.382614938, 1.28603428, 0.50452486, 0.231593364, 0.344211276, -0.507273069, 0.501356753, -0.382166683, -1.28552282, 0.504175398, -0.232020726 ] + - [ 0.346442143, 0.504532415, -0.502069284, -0.383124036, 1.28952116, 0.504923244, 0.232802793, 0.346020377, -0.503741786, 0.501947395, -0.382673147, -1.28900477, 0.504571656, -0.233235537 ] + - [ 0.348194673, 0.501055931, -0.502636977, -0.383615294, 1.29289642, 0.505307253, 0.234015997, 0.34777157, -0.500259281, 0.502517906, -0.383161858, -1.29237526, 0.504953608, -0.234454022 ] + - [ 0.349888316, 0.49762891, -0.503184429, -0.384088572, 1.29615828, 0.505676812, 0.235232918, 0.349463921, -0.496826521, 0.50306808, -0.383632676, -1.29563251, 0.505321179, -0.235676123 ] + - [ 0.351522138, 0.494252315, -0.503711433, -0.384543732, 1.29930492, 0.506031845, 0.236453498, 0.351096497, -0.493444473, 0.50359771, -0.384085464, -1.29877471, 0.505674292, -0.236901779 ] + - [ 0.353095205, 0.490927109, -0.504217784, -0.384980634, 1.30233455, 0.506372275, 0.23767768, 0.352668364, -0.490114102, 0.504106588, -0.384520084, -1.30180006, 0.506012875, -0.238130931 ] + - [ 0.354606581, 0.487654252, -0.504703277, -0.385399138, 1.30524536, 0.506698028, 0.238905404, 0.354178588, -0.486836375, 0.504594508, -0.384936397, -1.30470676, 0.506336852, -0.239363518 ] + - [ 0.356055332, 0.484434708, -0.505167707, -0.385799106, 1.30803557, 0.507009027, 0.240136615, 0.355626234, -0.483612259, 0.505061263, -0.385334266, -1.30749303, 0.506646149, -0.240599482 ] + - [ 0.357440523, 0.481269438, -0.505610866, -0.386180398, 1.31070336, 0.507305196, 0.241371253, 0.357010368, -0.480442719, 0.505506645, -0.385713553, -1.31015705, 0.50694069, -0.241838762 ] + - [ 0.358761219, 0.478159405, -0.506032551, -0.386542875, 1.31324694, 0.507586461, 0.242609261, 0.358330058, -0.477328723, 0.505930449, -0.38607412, -1.31269704, 0.507220401, -0.243081298 ] + - [ 0.360016487, 0.475105571, -0.506432555, -0.386886398, 1.31566451, 0.507852743, 0.24385058, 0.359584368, -0.474271236, 0.506332466, -0.386415828, -1.31511119, 0.507485208, -0.244327032 ] + - [ 0.36120539, 0.472108897, -0.506810674, -0.387210827, 1.31795427, 0.508103969, 0.245095154, 0.360772364, -0.471271225, 0.50671249, -0.386738539, -1.31739771, 0.507735035, -0.245575903 ] + - [ 0.362326995, 0.469170347, -0.5071667, -0.387516023, 1.32011441, 0.508340062, 0.246342923, 0.361893114, -0.468329656, 0.507070315, -0.387042116, -1.3195548, 0.507969808, -0.246827852 ] + - [ 0.363380367, 0.466290881, -0.50750043, -0.387801847, 1.32214314, 0.508560946, 0.247593831, 0.362945682, -0.465447496, 0.507405732, -0.387326421, -1.32158067, 0.508189452, -0.248082818 ] + - [ 0.36436457, 0.463471463, -0.507811657, -0.388068161, 1.32403865, 0.508766545, 0.248847818, 0.363929135, -0.462625712, 0.507718536, -0.387591315, -1.32347351, 0.508393893, -0.249340743 ] + - [ 0.365278671, 0.460713054, -0.508100176, -0.388314823, 1.32579915, 0.508956784, 0.250104829, 0.364842539, -0.459865268, 0.508008519, -0.38783666, -1.32523152, 0.508583056, -0.250601566 ] + - [ 0.366121734, 0.458016617, -0.508365782, -0.388541696, 1.32742284, 0.509131587, 0.251364803, 0.365684959, -0.457167133, 0.508275474, -0.388062318, -1.32685292, 0.508756866, -0.251865228 ] + - [ 0.366892825, 0.455383113, -0.508608268, -0.388748639, 1.32890792, 0.509290877, 0.252627684, 0.366455462, -0.454532272, 0.508519194, -0.388268152, -1.32833589, 0.508915248, -0.253131669 ] + - [ 0.36759101, 0.452813505, -0.50882743, -0.388935515, 1.33025258, 0.509434579, 0.253893414, 0.367153114, -0.451961651, 0.508739473, -0.388454023, -1.32967865, 0.509058128, -0.254400829 ] + - [ 0.368215352, 0.450308755, -0.509023061, -0.389102182, 1.33145502, 0.509562618, 0.255161935, 0.36777698, -0.449456238, 0.508936103, -0.388619793, -1.3308794, 0.50918543, -0.255672649 ] + - [ 0.368764919, 0.447869825, -0.509194957, -0.389248503, 1.33251345, 0.509674917, 0.256433189, 0.368326128, -0.447016998, 0.509108878, -0.388765325, -1.33193634, 0.509297081, -0.256947069 ] + - [ 0.369238774, 0.445497677, -0.509342912, -0.389374338, 1.33342607, 0.5097714, 0.257707117, 0.368799622, -0.444644897, 0.50925759, -0.388890479, -1.33284767, 0.509393006, -0.258224029 ] + - [ 0.369635984, 0.443193273, -0.50946672, -0.389479548, 1.33419107, 0.509851991, 0.258983663, 0.369196529, -0.442340903, 0.509382033, -0.388995119, -1.33361159, 0.509473129, -0.259503469 ] + - [ 0.369955614, 0.440957576, -0.509566175, -0.389563993, 1.33480666, 0.509916616, 0.260262767, 0.369515915, -0.440105981, 0.509481999, -0.389079105, -1.3342263, 0.509537377, -0.260785331 ] + - [ 0.370196728, 0.438791547, -0.509641073, -0.389627534, 1.33527103, 0.509965197, 0.261544373, 0.369756845, -0.437941099, 0.509557282, -0.389142301, -1.33469002, 0.509585674, -0.262069553 ] + - [ 0.370358393, 0.436696149, -0.509691208, -0.389670032, 1.33558239, 0.509997659, 0.262828423, 0.369918387, -0.435847221, 0.509607675, -0.389184567, -1.33500094, 0.509617945, -0.263356076 ] + - [ 0.370439673, 0.434672344, -0.509716374, -0.389691348, 1.33573893, 0.510013927, 0.264114858, 0.369999605, -0.433825316, 0.50963297, -0.389205767, -1.33515726, 0.509634117, -0.264644841 ] + - [ 0.370449156, 0.432720625, -0.509719481, -0.389678254, 1.33576182, 0.510013135, 0.265409487, 0.370009132, -0.431875903, 0.509636142, -0.389192697, -1.33518025, 0.50963334, -0.265941654 ] + - [ 0.370443354, 0.430838347, -0.509719096, -0.38955298, 1.33578737, 0.509990628, 0.266747064, 0.370003745, -0.429996485, 0.509636142, -0.389067726, -1.33520681, 0.509611053, -0.267281267 ] + - [ 0.370431665, 0.429023976, -0.509718334, -0.389304586, 1.33583751, 0.509945935, 0.268132418, 0.369992878, -0.42818554, 0.509636142, -0.388819936, -1.33525895, 0.509566795, -0.268668509 ] + - [ 0.370413997, 0.427276355, -0.509717201, -0.388935321, 1.33591124, 0.509879392, 0.269564465, 0.369976434, -0.426441903, 0.509636142, -0.388451569, -1.33533566, 0.509500899, -0.2701023 ] + - [ 0.370390261, 0.425594329, -0.509715704, -0.388447435, 1.33600755, 0.509791335, 0.271042124, 0.369954316, -0.424764407, 0.509636142, -0.387964868, -1.33543592, 0.509413696, -0.27158156 ] + - [ 0.370360367, 0.423976743, -0.509713851, -0.387843175, 1.33612544, 0.5096821, 0.272564313, 0.369926427, -0.423151889, 0.509636142, -0.387362076, -1.33555869, 0.509305518, -0.273105211 ] + - [ 0.370324224, 0.42242244, -0.509711647, -0.387124791, 1.33626391, 0.509552021, 0.27412995, 0.369892669, -0.421603183, 0.509636142, -0.386645437, -1.33570298, 0.509176696, -0.274672173 ] + - [ 0.370281743, 0.420930266, -0.509709099, -0.386294531, 1.33642197, 0.509401436, 0.275737954, 0.369852945, -0.420117122, 0.509636142, -0.385817195, -1.33586774, 0.509027562, -0.276281366 ] + - [ 0.370232833, 0.419499065, -0.509706216, -0.385354644, 1.33659859, 0.509230678, 0.277387243, 0.369807159, -0.418692543, 0.509636142, -0.384879592, -1.33605197, 0.508858448, -0.27793171 ] + - [ 0.370177404, 0.418127681, -0.509703003, -0.384307379, 1.3367928, 0.509040084, 0.279076734, 0.369755213, -0.417328279, 0.509636142, -0.383834872, -1.33625464, 0.508669685, -0.279622127 ] + - [ 0.370115365, 0.416814959, -0.509699467, -0.383154985, 1.33700357, 0.50882999, 0.280805346, 0.369697011, -0.416023166, 0.509636142, -0.382685277, -1.33647474, 0.508461605, -0.281351536 ] + - [ 0.370046628, 0.415559743, -0.509695616, -0.38189971, 1.33722991, 0.508600731, 0.282571997, 0.369632454, -0.414776037, 0.509636142, -0.381433053, -1.33671125, 0.508234539, -0.283118858 ] + - [ 0.369971101, 0.414360878, -0.509691456, -0.380543803, 1.33747082, 0.508352643, 0.284375606, 0.369561446, -0.413585728, 0.509636142, -0.38008044, -1.33696313, 0.50798882, -0.284923014 ] + - [ 0.369888695, 0.413217208, -0.509686994, -0.379089513, 1.3377253, 0.508086061, 0.286215089, 0.36948389, -0.412451073, 0.509636142, -0.378629684, -1.33722938, 0.507724778, -0.286762923 ] + - [ 0.369799319, 0.412127578, -0.509682237, -0.377539088, 1.33799234, 0.507801322, 0.288089366, 0.369399688, -0.411370907, 0.509636142, -0.377083027, -1.33750898, 0.507442745, -0.288637508 ] + - [ 0.369702883, 0.411090833, -0.509677193, -0.375894778, 1.33827094, 0.50749876, 0.289997355, 0.369308744, -0.410344065, 0.509636142, -0.375442713, -1.3378009, 0.507143053, -0.290545687 ] + - [ 0.369599298, 0.410105816, -0.509671867, -0.374158832, 1.3385601, 0.507178711, 0.291937974, 0.36921096, -0.409369381, 0.509636142, -0.373710984, -1.33810413, 0.506826034, -0.292486382 ] + - [ 0.369488472, 0.409171372, -0.509666267, -0.372333497, 1.33885881, 0.506841511, 0.29391014, 0.36910624, -0.408445689, 0.509636142, -0.371890084, -1.33841764, 0.506492018, -0.294458512 ] + - [ 0.369370316, 0.408286346, -0.509660399, -0.370421022, 1.33916608, 0.506487496, 0.295912773, 0.368994486, -0.407571825, 0.509636142, -0.369982257, -1.33874041, 0.506141338, -0.296460999 ] + - [ 0.36924474, 0.407449582, -0.509654271, -0.368423658, 1.3394809, 0.506117002, 0.297944789, 0.368875601, -0.406746624, 0.509636142, -0.367989745, -1.33907143, 0.505774326, -0.298492763 ] + - [ 0.369111653, 0.406659924, -0.50964789, -0.366343651, 1.33980227, 0.505730363, 0.300005108, 0.368749488, -0.405968919, 0.509636142, -0.365914793, -1.33940968, 0.505391312, -0.300552725 ] + - [ 0.368970966, 0.405916218, -0.509641262, -0.364183251, 1.34012919, 0.505327915, 0.302092648, 0.368616049, -0.405237545, 0.509636142, -0.363759643, -1.33975412, 0.504992628, -0.302639804 ] + - [ 0.368822588, 0.405217307, -0.509634394, -0.361944707, 1.34046065, 0.504909995, 0.304206326, 0.368475189, -0.404551338, 0.509636142, -0.361526538, -1.34010376, 0.504578607, -0.304752921 ] + - [ 0.368666429, 0.404562037, -0.509627293, -0.359630267, 1.34079566, 0.504476938, 0.306345061, 0.368326809, -0.403909131, 0.509636142, -0.359217722, -1.34045756, 0.504149579, -0.306890998 ] + - [ 0.368502399, 0.403949251, -0.509619966, -0.357242181, 1.34113321, 0.504029079, 0.308507771, 0.368170812, -0.40330976, 0.509636142, -0.356835438, -1.3408145, 0.503705877, -0.309052953 ] + - [ 0.368330408, 0.403377794, -0.509612421, -0.354782697, 1.34147229, 0.503566754, 0.310693375, 0.368007102, -0.402752059, 0.509636142, -0.35438193, -1.34117357, 0.503247831, -0.311237709 ] + - [ 0.368150366, 0.40284651, -0.509604663, -0.352254063, 1.34181192, 0.503090299, 0.312900789, 0.367835581, -0.402234863, 0.509636142, -0.351859441, -1.34153375, 0.502775774, -0.313444184 ] + - [ 0.367962182, 0.402354245, -0.509596699, -0.349658529, 1.34215108, 0.502600049, 0.315128933, 0.367656153, -0.401757006, 0.509636142, -0.349270213, -1.34189401, 0.502290037, -0.3156713 ] + - [ 0.367765767, 0.401899842, -0.509588538, -0.346998343, 1.34248877, 0.50209634, 0.317376724, 0.367468719, -0.401317323, 0.509636142, -0.346616491, -1.34225333, 0.501790951, -0.317917978 ] + - [ 0.36756103, 0.401482146, -0.509580185, -0.344275754, 1.34282399, 0.501579508, 0.319643081, 0.367273183, -0.400914649, 0.509636142, -0.343900517, -1.34261071, 0.501278849, -0.320183137 ] + - [ 0.367347881, 0.401100001, -0.509571648, -0.34149301, 1.34315573, 0.501049888, 0.321926922, 0.367069448, -0.400547818, 0.509636142, -0.341124536, -1.3429651, 0.500754062, -0.322465698 ] + - [ 0.36712623, 0.400752252, -0.509562932, -0.338652362, 1.34348301, 0.500507815, 0.324227165, 0.366857417, -0.400215665, 0.509636142, -0.338290789, -1.3433155, 0.500216921, -0.324764582 ] + - [ 0.366895987, 0.400437744, -0.509554046, -0.335756056, 1.34380481, 0.499953627, 0.326542728, 0.366636992, -0.399917025, 0.509636142, -0.335401522, -1.34366089, 0.499667758, -0.327078709 ] + - [ 0.366657061, 0.400155321, -0.509544997, -0.332806343, 1.34412012, 0.499387657, 0.328872529, 0.366408077, -0.399650732, 0.509636142, -0.332458975, -1.34400024, 0.499106905, -0.329406999 ] + - [ 0.366409363, 0.399903827, -0.50953579, -0.32980547, 1.34442796, 0.498810242, 0.331215487, 0.366170574, -0.399415621, 0.509636142, -0.329465394, -1.34433254, 0.498534693, -0.331748374 ] + - [ 0.366152803, 0.399682107, -0.509526433, -0.326755687, 1.34472732, 0.498221718, 0.333570519, 0.365924386, -0.399210527, 0.509636142, -0.326423022, -1.34465677, 0.497951454, -0.334101753 ] + - [ 0.36588729, 0.399489005, -0.509516933, -0.323659242, 1.34501719, 0.497622419, 0.335936544, 0.365669416, -0.399034284, 0.509636142, -0.323334101, -1.3449719, 0.497357519, -0.336466057 ] + - [ 0.365612734, 0.399323366, -0.509507297, -0.320518384, 1.34529657, 0.497012683, 0.33831248, 0.365405568, -0.398885727, 0.509636142, -0.320200875, -1.34527691, 0.49675322, -0.338840207 ] + - [ 0.365329045, 0.399184034, -0.509497531, -0.317335362, 1.34556446, 0.496392843, 0.340697245, 0.365132743, -0.398763691, 0.509636142, -0.317025587, -1.3455708, 0.496138889, -0.341223122 ] + - [ 0.365036133, 0.399069854, -0.509487643, -0.314112424, 1.34581986, 0.495763237, 0.343089758, 0.364850845, -0.39866701, 0.509636142, -0.313810481, -1.34585252, 0.495514858, -0.343613724 ] + - [ 0.364733908, 0.398979671, -0.50947764, -0.31085182, 1.34606177, 0.495124199, 0.345488935, 0.364559776, -0.398594519, 0.509636142, -0.310557799, -1.34612108, 0.494881457, -0.346010933 ] + - [ 0.364422279, 0.398912328, -0.509467528, -0.307555798, 1.34628918, 0.494476065, 0.347893696, 0.36425944, -0.398545052, 0.509636142, -0.307269786, -1.34637544, 0.494239018, -0.348413669 ] + - [ 0.364101157, 0.39886667, -0.509457314, -0.304226607, 1.34650109, 0.493819171, 0.350302959, 0.36394974, -0.398517445, 0.509636142, -0.303948684, -1.34661459, 0.493587874, -0.350820853 ] + - [ 0.363770451, 0.398841542, -0.509447005, -0.300866495, 1.3466965, 0.493153853, 0.352715641, 0.363630578, -0.398510531, 0.509636142, -0.300596737, -1.3468375, 0.492928356, -0.353231406 ] + - [ 0.363430072, 0.398835788, -0.509436608, -0.297477712, 1.34687441, 0.492480446, 0.355130661, 0.363301857, -0.398523146, 0.509636142, -0.297216188, -1.34704316, 0.492260794, -0.355644247 ] + - [ 0.363079928, 0.398848253, -0.50942613, -0.294062506, 1.34703381, 0.491799285, 0.357546938, 0.36296348, -0.398554124, 0.509636142, -0.29380928, -1.34723054, 0.491585522, -0.358058297 ] + - [ 0.362719931, 0.398877781, -0.509415578, -0.290623125, 1.34717371, 0.491110707, 0.359963388, 0.36261535, -0.3986023, 0.509636142, -0.290378257, -1.34739863, 0.49090287, -0.360472478 ] + - [ 0.362349989, 0.398923217, -0.509404959, -0.287161819, 1.3472931, 0.490415047, 0.362378931, 0.362257369, -0.398666509, 0.509636142, -0.286925362, -1.34754641, 0.49021317, -0.362885708 ] + - [ 0.361970012, 0.398983405, -0.509394279, -0.283680837, 1.34739097, 0.489712641, 0.364792485, 0.361889442, -0.398745585, 0.509636142, -0.283452838, -1.34767285, 0.489516754, -0.365296909 ] + - [ 0.361579912, 0.399057189, -0.509383546, -0.280182427, 1.34746633, 0.489003824, 0.367202967, 0.36151147, -0.398838362, 0.509636142, -0.279962928, -1.34777694, 0.488813953, -0.367705002 ] + - [ 0.361179596, 0.399143414, -0.509372766, -0.276668837, 1.34751818, 0.488288931, 0.369609296, 0.361123357, -0.398943676, 0.509636142, -0.276457876, -1.34785766, 0.488105098, -0.370108906 ] + - [ 0.360768976, 0.399240925, -0.509361947, -0.273142318, 1.34754551, 0.4875683, 0.37201039, 0.360725005, -0.399060362, 0.509636142, -0.272939926, -1.34791399, 0.487390523, -0.372507542 ] + - [ 0.360347961, 0.399348566, -0.509351094, -0.269605116, 1.34754731, 0.486842264, 0.374405167, 0.360316317, -0.399187253, 0.509636142, -0.269411319, -1.3479449, 0.486670557, -0.374899831 ] + - [ 0.359916461, 0.399465182, -0.509340216, -0.266059482, 1.3475226, 0.486111161, 0.376792545, 0.359897196, -0.399323184, 0.509636142, -0.2658743, -1.34794937, 0.485945533, -0.377284693 ] + - [ 0.359474385, 0.399589616, -0.509329319, -0.262507664, 1.34747036, 0.485375324, 0.379171443, 0.359467545, -0.39946699, 0.509636142, -0.262331113, -1.3479264, 0.485215783, -0.379661049 ] + - [ 0.359021644, 0.399720714, -0.50931841, -0.25895191, 1.34738959, 0.484635091, 0.381540778, 0.359027268, -0.399617507, 0.509636142, -0.258783999, -1.34787495, 0.484481637, -0.382027818 ] + - [ 0.358558148, 0.39985732, -0.509307496, -0.25539447, 1.3472793, 0.483890797, 0.383899469, 0.358576266, -0.399773567, 0.509636142, -0.255235203, -1.34779401, 0.483743428, -0.384383922 ] + - [ 0.358083806, 0.399998278, -0.509296583, -0.251837592, 1.34713847, 0.483142777, 0.386246433, 0.358114442, -0.399934007, 0.509636142, -0.251686968, -1.34768255, 0.483001487, -0.386728282 ] + - [ 0.357598529, 0.400142434, -0.509285679, -0.248283525, 1.34696611, 0.482391367, 0.38858059, 0.357641701, -0.40009766, 0.509636142, -0.248141537, -1.34753956, 0.482256145, -0.389059816 ] + - [ 0.357102225, 0.40028863, -0.509274791, -0.244734518, 1.34676121, 0.481636903, 0.390900857, 0.357157943, -0.400263362, 0.509636142, -0.244601153, -1.34736402, 0.481507735, -0.391377447 ] + - [ 0.356594806, 0.400435713, -0.509263925, -0.241192819, 1.34652278, 0.480879719, 0.393206152, 0.356663073, -0.400429947, 0.509636142, -0.24106806, -1.34715491, 0.480756588, -0.393680094 ] + - [ 0.35607618, 0.400582526, -0.509253088, -0.237660678, 1.34624981, 0.480120153, 0.395495394, 0.356156994, -0.400596249, 0.509636142, -0.237544501, -1.3469112, 0.480003035, -0.395966678 ] + - [ 0.355546258, 0.400727913, -0.509242288, -0.234140342, 1.34594129, 0.47935854, 0.3977675, 0.355639607, -0.400761104, 0.509636142, -0.234032719, -1.34663188, 0.479247409, -0.398236119 ] + - [ 0.355004949, 0.400870721, -0.50923153, -0.230634061, 1.34559623, 0.478595214, 0.400021389, 0.355110816, -0.400923346, 0.509636142, -0.230534958, -1.34631593, 0.47849004, -0.400487339 ] + - [ 0.354452164, 0.401009791, -0.509220823, -0.227144084, 1.34521362, 0.477830512, 0.402255979, 0.354570525, -0.401081809, 0.509636142, -0.227053461, -1.34596232, 0.47773126, -0.402719256 ] + - [ 0.353887813, 0.401143971, -0.509210173, -0.223672659, 1.34479247, 0.47706477, 0.404470188, 0.354018635, -0.401235329, 0.509636142, -0.223590471, -1.34557005, 0.476971402, -0.404930793 ] + - [ 0.353311804, 0.401272102, -0.509199586, -0.220222034, 1.34433176, 0.476298323, 0.406662934, 0.353455049, -0.40138274, 0.509636142, -0.220148231, -1.34513808, 0.476210795, -0.407120868 ] + - [ 0.352724048, 0.401393032, -0.50918907, -0.21679446, 1.3438305, 0.475531506, 0.408833135, 0.352879671, -0.401522876, 0.509636142, -0.216728985, -1.34466539, 0.475449773, -0.409288404 ] + - [ 0.352124455, 0.401505602, -0.509178632, -0.213392184, 1.34328768, 0.474764656, 0.41097971, 0.352292404, -0.401654573, 0.509636142, -0.213334976, -1.34415098, 0.474688667, -0.41143232 ] + - [ 0.351512935, 0.40160866, -0.509168278, -0.210017456, 1.34270231, 0.473998108, 0.413101577, 0.351693149, -0.401776664, 0.509636142, -0.209968448, -1.34359381, 0.473927808, -0.413551536 ] + - [ 0.350889397, 0.401701047, -0.509158016, -0.206672523, 1.34207338, 0.473232198, 0.415197653, 0.351081811, -0.401887985, 0.509636142, -0.206631643, -1.34299287, 0.473167527, -0.415644974 ] + - [ 0.350253752, 0.40178161, -0.509147852, -0.203359635, 1.34139988, 0.47246726, 0.417266857, 0.350458292, -0.401987371, 0.509636142, -0.203326805, -1.34234714, 0.472408158, -0.417711553 ] + - [ 0.349605909, 0.401849193, -0.509137793, -0.200081041, 1.34068082, 0.471703632, 0.419308107, 0.349822495, -0.402073655, 0.509636142, -0.200056177, -1.34165559, 0.47165003, -0.419750195 ] + - [ 0.348945779, 0.40190264, -0.509127847, -0.196838989, 1.3399152, 0.470941648, 0.421320322, 0.349174323, -0.402145673, 0.509636142, -0.196822003, -1.34091722, 0.470893476, -0.421759819 ] + - [ 0.34827327, 0.401940795, -0.509118019, -0.193635728, 1.339102, 0.470181644, 0.423302419, 0.348513679, -0.402202259, 0.509636142, -0.193626526, -1.34013099, 0.470138828, -0.423739346 ] + - [ 0.347588293, 0.401962503, -0.509108317, -0.190473507, 1.33824024, 0.469423956, 0.425253316, 0.347840465, -0.402242248, 0.509636142, -0.190471988, -1.33929589, 0.469386416, -0.425687697 ] + - [ 0.346890758, 0.401966609, -0.509098748, -0.187354575, 1.3373289, 0.46866892, 0.427171932, 0.347154584, -0.402264474, 0.509636142, -0.187360634, -1.3384109, 0.468636573, -0.427603792 ] + - [ 0.346180574, 0.401951957, -0.509089319, -0.18428118, 1.33636699, 0.46791687, 0.429057185, 0.34645594, -0.402267772, 0.509636142, -0.184294707, -1.33747499, 0.46788963, -0.429486552 ] + - [ 0.345457652, 0.401917392, -0.509080036, -0.18125557, 1.3353535, 0.467168144, 0.430907993, 0.345744435, -0.402250978, 0.509636142, -0.18127645, -1.33648716, 0.467145919, -0.431334897 ] + - [ 0.344721902, 0.401861758, -0.509070907, -0.178279996, 1.33428743, 0.466423075, 0.432723274, 0.345019972, -0.402212925, 0.509636142, -0.178308106, -1.33544637, 0.466405771, -0.433147747 ] + - [ 0.343973232, 0.401783899, -0.509061939, -0.175356706, 1.33316778, 0.465682001, 0.434501946, 0.344282455, -0.402152448, 0.509636142, -0.175391919, -1.33435161, 0.465669518, -0.434924023 ] + - [ 0.343211553, 0.40168266, -0.509053137, -0.172487947, 1.33199355, 0.464945256, 0.436242927, 0.343531785, -0.402068381, 0.509636142, -0.172530131, -1.33320186, 0.464937491, -0.436662645 ] + - [ 0.342436776, 0.401556885, -0.50904451, -0.16967597, 1.33076372, 0.464213176, 0.437945136, 0.342767866, -0.401959561, 0.509636142, -0.169724987, -1.33199609, 0.464210023, -0.438362535 ] + - [ 0.341648809, 0.40140542, -0.509036064, -0.166923023, 1.32947732, 0.463486097, 0.439607491, 0.3419906, -0.40182482, 0.509636142, -0.166978729, -1.3307333, 0.463487445, -0.440022612 ] + - [ 0.340847563, 0.401227108, -0.509027806, -0.164231354, 1.32813332, 0.462764355, 0.44122891, 0.341199892, -0.401662994, 0.509636142, -0.1642936, -1.32941245, 0.462770087, -0.441641796 ] + - [ 0.340032947, 0.401020793, -0.509019743, -0.161603213, 1.32673072, 0.462048285, 0.44280831, 0.340395642, -0.401472917, 0.509636142, -0.161671845, -1.32803253, 0.462058283, -0.443219009 ] + - [ 0.339204871, 0.400785322, -0.509011881, -0.159040848, 1.32526854, 0.461338222, 0.444344611, 0.339577755, -0.401253425, 0.509636142, -0.159115706, -1.32659252, 0.461352363, -0.444753171 ] + - [ 0.338363246, 0.400519537, -0.509004229, -0.156546508, 1.32374575, 0.460634503, 0.44583673, 0.338746133, -0.401003351, 0.509636142, -0.156627427, -1.3250914, 0.460652659, -0.446243203 ] + - [ 0.337507981, 0.400222283, -0.508996792, -0.154122441, 1.32216137, 0.459937463, 0.447283586, 0.33790068, -0.400721531, 0.509636142, -0.154209251, -1.32352815, 0.459959503, -0.447688024 ] + - [ 0.336638986, 0.399892405, -0.508989577, -0.151770897, 1.32051439, 0.459247438, 0.448684096, 0.337041297, -0.400406798, 0.509636142, -0.15186342, -1.32190175, 0.459273227, -0.449086555 ] + - [ 0.33575617, 0.399528748, -0.508982592, -0.149494124, 1.3188038, 0.458564763, 0.450037179, 0.336167888, -0.400057989, 0.509636142, -0.14959218, -1.32021117, 0.458594161, -0.450437717 ] + - [ 0.334859444, 0.399130155, -0.508975843, -0.147294371, 1.31702861, 0.457889774, 0.451341753, 0.335280356, -0.399673937, 0.509636142, -0.147397772, -1.31845541, 0.457922638, -0.451740431 ] + - [ 0.333948718, 0.398695472, -0.508969337, -0.145173887, 1.3151878, 0.457222806, 0.452596736, 0.334378603, -0.399253476, 0.509636142, -0.14528244, -1.31663343, 0.457258989, -0.452993616 ] + - [ 0.333023901, 0.398223542, -0.508963082, -0.14313492, 1.31328039, 0.456564196, 0.453801045, 0.333462533, -0.398795443, 0.509636142, -0.143248427, -1.31474422, 0.456603546, -0.454196193 ] + - [ 0.332084903, 0.397713211, -0.508957083, -0.14117972, 1.31130537, 0.455914278, 0.454953601, 0.332532048, -0.39829867, 0.509636142, -0.141297978, -1.31278677, 0.45595664, -0.455347083 ] + - [ 0.331131634, 0.397163322, -0.508951348, -0.139310534, 1.30926173, 0.455273389, 0.45605332, 0.331587052, -0.397761994, 0.509636142, -0.139433334, -1.31076004, 0.455318603, -0.456445206 ] + - [ 0.330164005, 0.396572721, -0.508945885, -0.137529612, 1.30714847, 0.454641864, 0.45709912, 0.330627447, -0.397184248, 0.509636142, -0.137656739, -1.30866302, 0.454689767, -0.457489482 ] + - [ 0.329181924, 0.395940251, -0.508940698, -0.135839202, 1.3049646, 0.454020039, 0.45808992, 0.329653136, -0.396564268, 0.509636142, -0.135970437, -1.30649469, 0.454070462, -0.458478833 ] + - [ 0.328185302, 0.395264757, -0.508935797, -0.134241554, 1.30270911, 0.45340825, 0.459024638, 0.328664022, -0.395900887, 0.509636142, -0.134376671, -1.30425402, 0.453461022, -0.459412178 ] + - [ 0.327174048, 0.394545084, -0.508931187, -0.132738916, 1.30038099, 0.452806831, 0.459902193, 0.327660007, -0.395192941, 0.509636142, -0.132877684, -1.30194001, 0.452861777, -0.460288438 ] + - [ 0.326148072, 0.393780076, -0.508926875, -0.131333536, 1.29797924, 0.452216119, 0.460721501, 0.326640995, -0.394439265, 0.509636142, -0.131475719, -1.29955163, 0.452273059, -0.461106534 ] + - [ 0.325107285, 0.392968578, -0.508922868, -0.130027664, 1.29550287, 0.451636449, 0.461481482, 0.325606889, -0.393638692, 0.509636142, -0.13017302, -1.29708785, 0.451695199, -0.461865386 ] + - [ 0.324051596, 0.392109434, -0.508919174, -0.128823549, 1.29295087, 0.451068157, 0.462181053, 0.324557592, -0.392790058, 0.509636142, -0.12897183, -1.29454767, 0.451128529, -0.462563914 ] + - [ 0.322980915, 0.391201488, -0.508915799, -0.127723438, 1.29032224, 0.450511579, 0.462819133, 0.323493005, -0.391892197, 0.509636142, -0.127874393, -1.29193005, 0.450573382, -0.46320104 ] + - [ 0.321895152, 0.390243586, -0.50891275, -0.126729581, 1.28761597, 0.449967049, 0.46339464, 0.322413033, -0.390943943, 0.509636142, -0.126882951, -1.28923399, 0.450030087, -0.463775682 ] + - [ 0.320794217, 0.38923457, -0.508910034, -0.125844227, 1.28483106, 0.449434905, 0.463906491, 0.321317579, -0.389944133, 0.509636142, -0.125999748, -1.28645845, 0.449498978, -0.464286763 ] + - [ 0.319678019, 0.388173287, -0.508907657, -0.125069623, 1.28196652, 0.448915481, 0.464353606, 0.320206544, -0.388891599, 0.509636142, -0.125227027, -1.28360243, 0.448980385, -0.464733202 ] + - [ 0.318546468, 0.387058581, -0.508905627, -0.12440802, 1.27902134, 0.448409113, 0.464734902, 0.319079832, -0.387785178, 0.509636142, -0.124567031, -1.28066489, 0.448474641, -0.46511392 ] + - [ 0.317399475, 0.385889295, -0.508903951, -0.123861666, 1.27599451, 0.447916137, 0.465049298, 0.317937345, -0.386623703, 0.509636142, -0.124022004, -1.27764483, 0.447982076, -0.465427837 ] + - [ 0.316236949, 0.384664275, -0.508902635, -0.123432809, 1.27288504, 0.447436889, 0.465295711, 0.316778988, -0.385406009, 0.509636142, -0.12359419, -1.27454121, 0.447503022, -0.465673874 ] + - [ 0.3150588, 0.383382365, -0.508901687, -0.123123699, 1.26969192, 0.446971703, 0.46547306, 0.315604662, -0.38413093, 0.509636142, -0.12328583, -1.27135302, 0.447037812, -0.465850951 ] + - [ 0.313864938, 0.382042409, -0.508901113, -0.122936584, 1.26641415, 0.446520916, 0.465580262, 0.31441427, -0.382797303, 0.509636142, -0.12309917, -1.26807925, 0.446586776, -0.465957989 ] + - [ 0.312655272, 0.380643252, -0.50890092, -0.122873712, 1.26305073, 0.446084863, 0.465616237, 0.313207716, -0.38140396, 0.509636142, -0.123036451, -1.26471886, 0.446150246, -0.465993908 ] + - [ 0.311421233, 0.379191934, -0.508858527, -0.122901669, 1.25959382, 0.445674939, 0.465552797, 0.311976502, -0.37995805, 0.509593557, -0.123064262, -1.26126414, 0.445739607, -0.46593057 ] + - [ 0.310154672, 0.37769675, -0.508732093, -0.122984895, 1.25603718, 0.445301709, 0.465363735, 0.310712558, -0.378467985, 0.509466553, -0.123147057, -1.25770896, 0.445365421, -0.465741809 ] + - [ 0.308856128, 0.376158425, -0.508522735, -0.123122425, 1.25238219, 0.444964268, 0.465050935, 0.309416427, -0.376934491, 0.509256251, -0.123283873, -1.25405472, 0.445026786, -0.465429507 ] + - [ 0.307526142, 0.374577682, -0.50823157, -0.123313295, 1.24863024, 0.444661709, 0.46461628, 0.308088652, -0.375358299, 0.508963776, -0.123473752, -1.25030282, 0.4447228, -0.464995544 ] + - [ 0.306165254, 0.372955248, -0.507859716, -0.123556538, 1.2447827, 0.444393124, 0.464061657, 0.306729776, -0.373740136, 0.50859025, -0.123715732, -1.24645465, 0.444452561, -0.464441802 ] + - [ 0.304774004, 0.371291847, -0.507408289, -0.123851189, 1.24084097, 0.444157609, 0.46338895, 0.305340343, -0.372080732, 0.508136797, -0.124008853, -1.2425116, 0.444215165, -0.463770159 ] + - [ 0.303352932, 0.369588204, -0.506878406, -0.124196282, 1.23680642, 0.443954256, 0.462600043, 0.303920895, -0.370380814, 0.507604541, -0.124352154, -1.23847508, 0.444009712, -0.462982499 ] + - [ 0.301902579, 0.367845045, -0.506271186, -0.124590853, 1.23268044, 0.443782158, 0.461696821, 0.302471975, -0.368641112, 0.506994604, -0.124744676, -1.23434646, 0.443835299, -0.462080701 ] + - [ 0.300423485, 0.366063093, -0.505587744, -0.125033935, 1.22846441, 0.44364041, 0.460681168, 0.300994126, -0.366862354, 0.50630811, -0.125185459, -1.23012716, 0.443691024, -0.461066645 ] + - [ 0.298916191, 0.364243074, -0.504829197, -0.125524564, 1.22415972, 0.443528104, 0.459554969, 0.299487892, -0.365045268, 0.505546183, -0.12567354, -1.22581856, 0.443575984, -0.459942214 ] + - [ 0.297381236, 0.362385713, -0.503996664, -0.126061774, 1.21976775, 0.443444334, 0.458320109, 0.297953815, -0.363190585, 0.504709944, -0.126207961, -1.22142206, 0.443489277, -0.458709288 ] + - [ 0.29581916, 0.360491734, -0.503091261, -0.126644599, 1.21528988, 0.443388194, 0.456978473, 0.296392438, -0.361299031, 0.503800519, -0.12678776, -1.21693905, 0.443430002, -0.457369747 ] + - [ 0.294230504, 0.358561864, -0.502114106, -0.127272075, 1.2107275, 0.443358777, 0.455531944, 0.294804305, -0.359371335, 0.502819029, -0.127411978, -1.21237093, 0.443397256, -0.455925472 ] + - [ 0.292615809, 0.356596825, -0.501066314, -0.127943235, 1.20608199, 0.443355177, 0.453982408, 0.293189959, -0.357408227, 0.501766599, -0.128079654, -1.2077191, 0.443390136, -0.454378344 ] + - [ 0.290975614, 0.354597345, -0.499949005, -0.128657115, 1.20135474, 0.443376487, 0.452331749, 0.291549942, -0.355410435, 0.500644352, -0.128789827, -1.20298494, 0.443407741, -0.452730245 ] + - [ 0.289310459, 0.352564147, -0.498763294, -0.129412749, 1.19654712, 0.443421801, 0.450581851, 0.289884798, -0.353378687, 0.49945341, -0.129541538, -1.19816985, 0.443449169, -0.450983054 ] + - [ 0.287620886, 0.350497956, -0.497510298, -0.130209171, 1.19166052, 0.443490211, 0.4487346, 0.28819507, -0.351313713, 0.498194898, -0.130333825, -1.19327523, 0.443513517, -0.449138652 ] + - [ 0.285907434, 0.348399497, -0.496191136, -0.131045416, 1.18669633, 0.443580812, 0.44679188, 0.2864813, -0.34921624, 0.496869938, -0.131165728, -1.18830247, 0.443599883, -0.44719892 ] + - [ 0.284170643, 0.346269496, -0.494806923, -0.131920519, 1.18165593, 0.443692697, 0.444755576, 0.284744032, -0.347086997, 0.495479655, -0.132036288, -1.18325297, 0.443707364, -0.44516574 ] + - [ 0.282411053, 0.344108677, -0.493358778, -0.132833514, 1.1765407, 0.44382496, 0.442627571, 0.282983809, -0.344926714, 0.49402517, -0.132944543, -1.17812812, 0.44383506, -0.443040991 ] + - [ 0.280629206, 0.341917765, -0.491847817, -0.133783437, 1.17135202, 0.443976694, 0.440409752, 0.281201174, -0.342736118, 0.492507608, -0.133889533, -1.17292932, 0.443982067, -0.440826555 ] + - [ 0.278825641, 0.339697485, -0.490275157, -0.13476932, 1.16609128, 0.444146992, 0.438104002, 0.27939667, -0.340515938, 0.490928091, -0.134870298, -1.16765795, 0.444147483, -0.438524312 ] + - [ 0.277000897, 0.337448562, -0.488641916, -0.1357902, 1.16075987, 0.444334948, 0.435712206, 0.27757084, -0.338266904, 0.489287744, -0.135885878, -1.16231542, 0.444330406, -0.436136143 ] + - [ 0.275155517, 0.335171721, -0.48694921, -0.13684511, 1.15535916, 0.444539656, 0.433236248, 0.275724227, -0.335989742, 0.487587689, -0.136935311, -1.15690313, 0.444529934, -0.43366393 ] + - [ 0.27329004, 0.332867686, -0.485198158, -0.137933086, 1.14989055, 0.444760208, 0.430678014, 0.273857374, -0.333685183, 0.485829049, -0.138017638, -1.15142245, 0.444745165, -0.431109552 ] + - [ 0.271405005, 0.330537184, -0.483389875, -0.139053162, 1.1443554, 0.444995699, 0.428039388, 0.271970824, -0.331353955, 0.484012949, -0.139131898, -1.1458748, 0.444975196, -0.42847489 ] + - [ 0.269500954, 0.328180938, -0.481525479, -0.140204372, 1.13875512, 0.445245222, 0.425322254, 0.27006512, -0.328996786, 0.48214051, -0.140277131, -1.14026156, 0.445219126, -0.425761826 ] + - [ 0.267578426, 0.325799673, -0.479606087, -0.14138575, 1.13309107, 0.445507871, 0.422528497, 0.268140805, -0.326614405, 0.480212858, -0.141452377, -1.13458413, 0.445476052, -0.42297224 ] + - [ 0.265637962, 0.323394115, -0.477632816, -0.142596333, 1.12736465, 0.445782738, 0.419660002, 0.266198423, -0.32420754, 0.478231114, -0.142656674, -1.1288439, 0.445745072, -0.420108013 ] + - [ 0.263680103, 0.320964989, -0.475606784, -0.143835154, 1.12157724, 0.446068917, 0.416718653, 0.264238516, -0.321776921, 0.476196402, -0.143889063, -1.12304228, 0.446025283, -0.417171025 ] + - [ 0.261705387, 0.318513018, -0.473529107, -0.145101248, 1.11573021, 0.446365503, 0.413706335, 0.262261627, -0.319323276, 0.474109845, -0.145148583, -1.11718064, 0.446315785, -0.414163158 ] + - [ 0.259714356, 0.316038929, -0.471400903, -0.146393649, 1.10982497, 0.446671588, 0.410624932, 0.2602683, -0.316847333, 0.471972568, -0.146434274, -1.1112604, 0.446615673, -0.411086292 ] + - [ 0.25770755, 0.313543447, -0.469223288, -0.147711392, 1.10386288, 0.446986266, 0.407476329, 0.258259077, -0.314349821, 0.469785692, -0.147745175, -1.10528293, 0.446924047, -0.407942308 ] + - [ 0.255685509, 0.311027295, -0.466997381, -0.149053511, 1.09784533, 0.44730863, 0.404262412, 0.256234502, -0.311831469, 0.467550342, -0.149080327, -1.09924965, 0.447240004, -0.404733087 ] + - [ 0.253648773, 0.3084912, -0.464724297, -0.150419042, 1.09177371, 0.447637773, 0.400985063, 0.254195117, -0.309293006, 0.46526764, -0.150438768, -1.09316193, 0.447562641, -0.401460509 ] + - [ 0.251597883, 0.305935885, -0.462405154, -0.151807018, 1.0856494, 0.447972791, 0.397646168, 0.252141466, -0.306735159, 0.46293871, -0.151819538, -1.08702119, 0.447891057, -0.398126456 ] + - [ 0.249533378, 0.303362076, -0.46004107, -0.153216475, 1.07947378, 0.448312775, 0.394247612, 0.250074091, -0.304158658, 0.460564676, -0.153221677, -1.0808288, 0.44822435, -0.394732808 ] + - [ 0.2474558, 0.300770499, -0.457633161, -0.154646447, 1.07324824, 0.448656819, 0.390791279, 0.247993536, -0.301564231, 0.45814666, -0.154644225, -1.07458617, 0.448561617, -0.391281446 ] + - [ 0.245365687, 0.298161877, -0.455182544, -0.156095968, 1.06697416, 0.449004017, 0.387279054, 0.245900344, -0.298952607, 0.455685785, -0.15608622, -1.0682947, 0.448901956, -0.387774251 ] + - [ 0.243263581, 0.295536935, -0.452690337, -0.157564074, 1.06065292, 0.449353462, 0.383712821, 0.243795058, -0.296324515, 0.453183176, -0.157546703, -1.06195576, 0.449244464, -0.384213103 ] + - [ 0.241150022, 0.2928964, -0.450157657, -0.159049798, 1.05428591, 0.449704248, 0.380094465, 0.24167822, -0.293680683, 0.450639955, -0.159024714, -1.05557077, 0.449588241, -0.380599884 ] + - [ 0.23902555, 0.290240994, -0.447585621, -0.160552175, 1.04787451, 0.450055468, 0.376425871, 0.239550375, -0.291021839, 0.448057246, -0.160519291, -1.04914112, 0.449932382, -0.376936473 ] + - [ 0.236890705, 0.287571445, -0.444975345, -0.162070241, 1.0414201, 0.450406216, 0.372708923, 0.237412064, -0.288348713, 0.445436172, -0.162029475, -1.04266819, 0.450275988, -0.373224753 ] + - [ 0.234746028, 0.284888475, -0.442327948, -0.163603029, 1.03492407, 0.450755585, 0.368945506, 0.235263831, -0.285662033, 0.442777857, -0.163554304, -1.03615339, 0.450618154, -0.369466603 ] + - [ 0.232592058, 0.282192812, -0.439644545, -0.165149573, 1.02838781, 0.451102669, 0.365137504, 0.233106219, -0.282962527, 0.440083423, -0.16509282, -1.02959811, 0.450957979, -0.365663905 ] + - [ 0.230429336, 0.279485178, -0.436926255, -0.16670891, 1.02181269, 0.45144656, 0.361286802, 0.230939772, -0.280250925, 0.437353993, -0.16664406, -1.02300375, 0.451294561, -0.361818538 ] + - [ 0.228258402, 0.276766299, -0.434174195, -0.168280073, 1.01520009, 0.451786354, 0.357395284, 0.228765031, -0.277527954, 0.434590692, -0.168207066, -1.01637169, 0.451626997, -0.357932385 ] + - [ 0.226079797, 0.274036901, -0.431389481, -0.169862097, 1.00855141, 0.452121143, 0.353464836, 0.226582541, -0.274794344, 0.431794643, -0.169780876, -1.00970334, 0.451954386, -0.354007326 ] + - [ 0.22389406, 0.271297707, -0.428573231, -0.171454016, 1.00186803, 0.45245002, 0.349497342, 0.224392843, -0.272050823, 0.428966968, -0.17136453, -1.00300008, 0.452275825, -0.350045241 ] + - [ 0.221701733, 0.268549444, -0.425726561, -0.173054865, 0.995151325, 0.452772079, 0.345494686, 0.222196482, -0.26929812, 0.426108791, -0.172957068, -0.996263323, 0.452590412, -0.346048012 ] + - [ 0.219503354, 0.265792836, -0.42285059, -0.174663679, 0.988402683, 0.453086414, 0.341458753, 0.219994001, -0.266536963, 0.423221236, -0.174557529, -0.98949445, 0.452897244, -0.342017519 ] + - [ 0.217299465, 0.263028607, -0.419946433, -0.176279492, 0.981623488, 0.453392118, 0.337391428, 0.217785941, -0.263768081, 0.420305425, -0.176164953, -0.98269486, 0.45319542, -0.337955643 ] + - [ 0.215090605, 0.260257483, -0.417015209, -0.177901339, 0.974815123, 0.453688285, 0.333294595, 0.215572847, -0.260992203, 0.417362483, -0.177778379, -0.975865947, 0.453484038, -0.333864264 ] + - [ 0.212877316, 0.257480189, -0.414058034, -0.179528254, 0.967978973, 0.453974007, 0.32917014, 0.213355262, -0.258210057, 0.414393531, -0.179396847, -0.969009107, 0.453762195, -0.329745264 ] + - [ 0.210660136, 0.254697449, -0.411076025, -0.181159272, 0.961116419, 0.454248379, 0.325019945, 0.211133728, -0.255422372, 0.411399695, -0.181019397, -0.962125734, 0.454028988, -0.325600524 ] + - [ 0.208439607, 0.251909989, -0.4080703, -0.182793428, 0.954228846, 0.454510495, 0.320845897, 0.208908788, -0.252629876, 0.408382096, -0.182645069, -0.955217223, 0.454283517, -0.321431924 ] + - [ 0.206216268, 0.249118533, -0.405041975, -0.184429756, 0.947317638, 0.454759446, 0.316649879, 0.206680986, -0.249833299, 0.405341858, -0.184272901, -0.948284968, 0.454524878, -0.317241344 ] + - [ 0.203990661, 0.246323807, -0.401992169, -0.18606729, 0.940384179, 0.454994328, 0.312433777, 0.204450865, -0.247033368, 0.402280105, -0.185901934, -0.941330364, 0.45475217, -0.313030666 ] + - [ 0.201763324, 0.243526534, -0.398921997, -0.187705066, 0.93342985, 0.455214233, 0.308199474, 0.202218967, -0.244230812, 0.399197959, -0.187531207, -0.934354806, 0.454964489, -0.308801771 ] + - [ 0.199534799, 0.240727442, -0.395832577, -0.189342118, 0.926456038, 0.455418255, 0.303948856, 0.199985836, -0.241426361, 0.396096545, -0.189159759, -0.927359689, 0.455160935, -0.304556539 ] + - [ 0.197305625, 0.237927253, -0.392725027, -0.190977481, 0.919464124, 0.455605488, 0.299683807, 0.197752015, -0.238620742, 0.392976985, -0.190786631, -0.920346408, 0.455340605, -0.300296851 ] + - [ 0.195076343, 0.235126693, -0.389600462, -0.192610189, 0.912455492, 0.455775024, 0.295406212, 0.195518046, -0.235814685, 0.389840402, -0.192410862, -0.913316357, 0.455502596, -0.296024587 ] + - [ 0.192847493, 0.232326488, -0.386460001, -0.194239276, 0.905431526, 0.455925958, 0.291117956, 0.193284474, -0.233008917, 0.386687921, -0.194031491, -0.90627093, 0.455646007, -0.29174163 ] + - [ 0.190619616, 0.229527361, -0.383304761, -0.195863778, 0.89839361, 0.456057383, 0.286820922, 0.19105184, -0.230204167, 0.383520664, -0.195647559, -0.899211524, 0.455769935, -0.287449858 ] + - [ 0.188393251, 0.226730038, -0.380135858, -0.197482728, 0.891343128, 0.456168392, 0.282516996, 0.188820688, -0.227401165, 0.380339754, -0.197258104, -0.892139531, 0.455873478, -0.283151154 ] + - [ 0.186168939, 0.223935244, -0.37695441, -0.199095162, 0.884281462, 0.456258079, 0.278208062, 0.186591562, -0.224600639, 0.377146316, -0.198862166, -0.885056348, 0.455955735, -0.278847398 ] + - [ 0.183947219, 0.221143704, -0.373761534, -0.200700115, 0.877209996, 0.456325537, 0.273896004, 0.184365003, -0.221803317, 0.373941471, -0.200458786, -0.877963369, 0.456015801, -0.274540471 ] + - [ 0.181728633, 0.218356143, -0.370558347, -0.202296619, 0.870130114, 0.456369861, 0.269582709, 0.182141555, -0.219009928, 0.370726344, -0.202047002, -0.870861988, 0.456052777, -0.270232253 ] + - [ 0.179513721, 0.215573284, -0.367345966, -0.203883712, 0.8630432, 0.456390142, 0.265270059, 0.179921762, -0.2162212, 0.367502057, -0.203625854, -0.863753601, 0.456065758, -0.265924626 ] + - [ 0.177303023, 0.212795855, -0.364125508, -0.205460425, 0.855950637, 0.456385476, 0.26095994, 0.177706166, -0.213437863, 0.364269735, -0.205194381, -0.856639602, 0.456053844, -0.26161947 ] + - [ 0.175097078, 0.210024579, -0.36089809, -0.207025796, 0.848853809, 0.456354954, 0.256654236, 0.17549531, -0.210660644, 0.3610305, -0.206751624, -0.849521386, 0.456016132, -0.257318665 ] + - [ 0.172896428, 0.207260181, -0.357664831, -0.208578857, 0.841754099, 0.456297672, 0.252354831, 0.173289737, -0.207890273, 0.357785476, -0.208296623, -0.842400347, 0.45595172, -0.253024094 ] + - [ 0.170701612, 0.204503387, -0.354426845, -0.210118644, 0.83465289, 0.456212722, 0.248063612, 0.17108999, -0.205127479, 0.354535785, -0.209828415, -0.83527788, 0.455859705, -0.248737636 ] + - [ 0.168513171, 0.20175492, -0.351185252, -0.211644192, 0.827551567, 0.456099197, 0.243782461, 0.168896613, -0.202372988, 0.351282552, -0.211346042, -0.828155381, 0.455739185, -0.244461172 ] + - [ 0.166331645, 0.199015507, -0.347941167, -0.213154534, 0.820451513, 0.455956192, 0.239513264, 0.166710149, -0.199627532, 0.3480269, -0.212848542, -0.821034243, 0.455589259, -0.240196583 ] + - [ 0.164157574, 0.196285872, -0.344695708, -0.214648705, 0.813354112, 0.455782799, 0.235257905, 0.164531139, -0.196891837, 0.344769951, -0.214334956, -0.813915862, 0.455409023, -0.23594575 ] + - [ 0.161991498, 0.19356674, -0.341449993, -0.216125741, 0.806260747, 0.455578113, 0.23101827, 0.162360129, -0.194166633, 0.341512829, -0.215804323, -0.806801632, 0.455197577, -0.231710553 ] + - [ 0.159833958, 0.190858836, -0.338205137, -0.217584675, 0.799172801, 0.455341227, 0.226796241, 0.16019766, -0.191452648, 0.338256658, -0.217255683, -0.799692948, 0.454954017, -0.227492874 ] + - [ 0.157685495, 0.188162884, -0.334962259, -0.219024542, 0.792091659, 0.455071233, 0.222593705, 0.158044275, -0.188750611, 0.33500256, -0.218688074, -0.792591205, 0.454677441, -0.223294594 ] + - [ 0.155546647, 0.185479611, -0.331722476, -0.220444377, 0.785018704, 0.454767226, 0.218412545, 0.155900518, -0.18606125, 0.33175166, -0.220100537, -0.785497798, 0.454366948, -0.219117592 ] + - [ 0.153417956, 0.18280974, -0.328486904, -0.221843214, 0.777955319, 0.4544283, 0.214254647, 0.153766932, -0.183385295, 0.32850508, -0.221492112, -0.77841412, 0.454021635, -0.21496375 ] + - [ 0.151299961, 0.180153997, -0.32525666, -0.223220089, 0.770902889, 0.454053547, 0.210121895, 0.15164406, -0.180723473, 0.325263943, -0.222861838, -0.771341568, 0.4536406, -0.210834949 ] + - [ 0.149193204, 0.177513106, -0.322032863, -0.224574034, 0.763862796, 0.453642061, 0.206016173, 0.149532444, -0.178076513, 0.322029374, -0.224208754, -0.764281535, 0.45322294, -0.206733069 ] + - [ 0.147098223, 0.174887793, -0.318816629, -0.225904086, 0.756836424, 0.453192936, 0.201939366, 0.147432628, -0.175445145, 0.318802494, -0.225531901, -0.757235417, 0.452767754, -0.202659991 ] + - [ 0.14501556, 0.172278782, -0.315609074, -0.227209279, 0.749825157, 0.452705265, 0.197893359, 0.145345155, -0.172830096, 0.315584428, -0.226830317, -0.750204607, 0.452274139, -0.198617596 ] + - [ 0.142945755, 0.169686798, -0.312411317, -0.228488647, 0.742830378, 0.452178142, 0.193880037, 0.143270568, -0.170232095, 0.312376299, -0.228103042, -0.743190502, 0.451741193, -0.194607765 ] + - [ 0.140889348, 0.167112567, -0.309224474, -0.229741225, 0.735853472, 0.451610659, 0.189901283, 0.14120941, -0.167651872, 0.30917923, -0.229349117, -0.736194495, 0.451168014, -0.190632378 ] + - [ 0.138846878, 0.164556813, -0.306049663, -0.230966047, 0.728895821, 0.451001911, 0.185958983, 0.139162224, -0.165090153, 0.305994345, -0.23056758, -0.729217982, 0.4505537, -0.186693316 ] + - [ 0.136818887, 0.162020261, -0.302888, -0.232162149, 0.721958809, 0.450350992, 0.182055021, 0.137129553, -0.162547669, 0.302822766, -0.231757472, -0.722262357, 0.449897348, -0.182792461 ] + - [ 0.134805915, 0.159503636, -0.299740603, -0.233328564, 0.715043819, 0.449656993, 0.178191282, 0.13511194, -0.160025147, 0.299665617, -0.232917831, -0.715329015, 0.449198057, -0.178931692 ] + - [ 0.132808502, 0.157007663, -0.296608588, -0.234464327, 0.708152236, 0.44891901, 0.17436965, 0.133109929, -0.157523317, 0.296524022, -0.234047697, -0.70841935, 0.448454923, -0.175112892 ] + - [ 0.130827187, 0.154533067, -0.293493074, -0.235568474, 0.701285443, 0.448136136, 0.170592011, 0.131124061, -0.155042907, 0.293399103, -0.235146111, -0.701534757, 0.447667046, -0.171337939 ] + - [ 0.128862512, 0.152080573, -0.290395177, -0.236640037, 0.694444824, 0.447307463, 0.166860248, 0.129154881, -0.152584646, 0.290291984, -0.236212111, -0.694676632, 0.446833522, -0.167608716 ] + - [ 0.126915017, 0.149650905, -0.287316014, -0.237678053, 0.687631761, 0.446432086, 0.163176246, 0.127202931, -0.150149261, 0.287203788, -0.237244738, -0.687846368, 0.44595345, -0.163927103 ] + - [ 0.124985241, 0.147244789, -0.284256702, -0.238681555, 0.680847639, 0.445509097, 0.15954189, 0.125268754, -0.147737483, 0.284135639, -0.23824303, -0.681045361, 0.445025928, -0.16029498 ] + - [ 0.123073726, 0.14486295, -0.281218358, -0.239649579, 0.674093841, 0.444537591, 0.155959064, 0.123352894, -0.145350039, 0.281088659, -0.239206028, -0.674275006, 0.444050052, -0.156714229 ] + - [ 0.12118101, 0.142506112, -0.278202101, -0.240581158, 0.667371751, 0.443516662, 0.152429654, 0.121455894, -0.142987658, 0.278063973, -0.240132771, -0.667536696, 0.443024922, -0.153186731 ] + - [ 0.119307636, 0.140175001, -0.275209045, -0.241475328, 0.660682752, 0.442445401, 0.148955543, 0.119578295, -0.140651069, 0.275062703, -0.241022298, -0.660831827, 0.441949634, -0.149714366 ] + - [ 0.117454142, 0.137870341, -0.27224031, -0.242331123, 0.654028229, 0.441322904, 0.145538616, 0.117720643, -0.138341, 0.272085972, -0.241873649, -0.654161793, 0.440823287, -0.146299014 ] + - [ 0.115621069, 0.135592857, -0.269297012, -0.243147577, 0.647409564, 0.440148262, 0.142180759, 0.115883479, -0.13605818, 0.269134905, -0.242685865, -0.64752799, 0.439644979, -0.142942558 ] + - [ 0.113808958, 0.133343275, -0.266380267, -0.243923726, 0.64082814, 0.438920571, 0.138883854, 0.114067346, -0.133803338, 0.266210624, -0.243457984, -0.640931812, 0.438413806, -0.139646877 ] + - [ 0.112018348, 0.131122319, -0.263491194, -0.244658603, 0.634285343, 0.437638923, 0.135649788, 0.112272788, -0.131577202, 0.263314253, -0.244189046, -0.634374653, 0.437128868, -0.136413852 ] + - [ 0.110249779, 0.128930714, -0.260630909, -0.245351244, 0.627782555, 0.436302412, 0.132480445, 0.110500348, -0.1293805, 0.260446914, -0.24487809, -0.627857909, 0.435789262, -0.133245364 ] + - [ 0.108503793, 0.126769184, -0.257800529, -0.246000683, 0.621321159, 0.434910131, 0.129377709, 0.108750569, -0.127213963, 0.257609732, -0.245524157, -0.621382974, 0.434394085, -0.130143294 ] + - [ 0.106780929, 0.124638456, -0.255001172, -0.246605954, 0.61490254, 0.433461175, 0.126343465, 0.107023994, -0.125078317, 0.254803829, -0.246126286, -0.614951243, 0.432942436, -0.127109523 ] + - [ 0.105081728, 0.122539254, -0.252233955, -0.247166092, 0.608528082, 0.431954635, 0.123379597, 0.105321165, -0.122974292, 0.252030328, -0.246683516, -0.60856411, 0.431433411, -0.124145931 ] + - [ 0.103406729, 0.120472302, -0.249499994, -0.247680132, 0.602199166, 0.430389606, 0.12048799, 0.103642626, -0.120902616, 0.249290354, -0.247194887, -0.602222971, 0.429866111, -0.1212544 ] + - [ 0.101756474, 0.118438327, -0.246800408, -0.248147109, 0.595917178, 0.428765182, 0.117670529, 0.101988921, -0.118864019, 0.24658503, -0.247659439, -0.59592922, 0.42823963, -0.118436809 ] + - [ 0.100131501, 0.116438051, -0.244136312, -0.248566056, 0.589683501, 0.427080455, 0.114929099, 0.100360591, -0.116859228, 0.243915478, -0.248076211, -0.589684252, 0.426553069, -0.115695041 ] + - [ 0.0985323522, 0.114472202, -0.241508824, -0.248936009, 0.583499517, 0.425334519, 0.112265584, 0.0987581802, -0.114888972, 0.241282822, -0.248444243, -0.583489462, 0.424805524, -0.113030975 ] + - [ 0.0969595669, 0.112541503, -0.238919062, -0.249256002, 0.577366612, 0.423526468, 0.109681868, 0.0971822316, -0.11295398, 0.238688185, -0.248762575, -0.577346244, 0.422996094, -0.110446492 ] + - [ 0.0954136856, 0.110646679, -0.236368142, -0.249525069, 0.571286169, 0.421655396, 0.107179836, 0.0956332882, -0.111054981, 0.23613269, -0.249030245, -0.571255993, 0.421123875, -0.107943474 ] + - [ 0.0938952486, 0.108788456, -0.233857182, -0.249742246, 0.56525957, 0.419720395, 0.104761373, 0.0941118929, -0.109192702, 0.233617462, -0.249246294, -0.565220104, 0.419187967, -0.1055238 ] + - [ 0.0924047959, 0.106967558, -0.231387298, -0.249906566, 0.5592882, 0.417720559, 0.102428363, 0.092618589, -0.107367874, 0.231143623, -0.249409762, -0.559239971, 0.417187466, -0.103189352 ] + - [ 0.090942868, 0.10518471, -0.228959608, -0.250017066, 0.553373442, 0.415654982, 0.100182692, 0.0911539193, -0.105581223, 0.228712296, -0.249519687, -0.553316989, 0.415121471, -0.100942011 ] + - [ 0.0895100049, 0.103440637, -0.226575229, -0.250072778, 0.54751668, 0.413522758, 0.0980262429, 0.0897184269, -0.10383348, 0.226324605, -0.24957511, -0.547452554, 0.41298908, -0.0987836571 ] + - [ 0.0881116906, 0.101731923, -0.224228333, -0.250061217, 0.541700139, 0.411311808, 0.0959524215, 0.0883175827, -0.102121202, 0.22397472, -0.24956355, -0.54162887, 0.410778225, -0.0967076762 ] + - [ 0.0867772565, 0.100034246, -0.221878091, -0.249913774, 0.53581086, 0.408955891, 0.0939114977, 0.0869806262, -0.100419899, 0.221621765, -0.249416401, -0.5357328, 0.408422708, -0.0946642473 ] + - [ 0.0855099643, 0.0983436886, -0.219517957, -0.249621735, 0.529832633, 0.406447237, 0.0918949948, 0.0857108039, -0.098725627, 0.21925918, -0.249124943, -0.529748098, 0.405914758, -0.0926448854 ] + - [ 0.0843080354, 0.0966604543, -0.217148298, -0.249188072, 0.523768471, 0.403789435, 0.0899028339, 0.084506338, -0.0970385926, 0.21688733, -0.248692142, -0.523677772, 0.40325796, -0.0906495196 ] + - [ 0.0831696915, 0.0949847457, -0.214769484, -0.248615754, 0.517621391, 0.400986075, 0.0879349363, 0.0833654503, -0.0953590006, 0.214506578, -0.248120964, -0.517524835, 0.400455896, -0.0886780786 ] + - [ 0.0820931541, 0.0933167655, -0.212381882, -0.247907755, 0.511394406, 0.398040745, 0.0859912232, 0.082286363, -0.0936870564, 0.212117286, -0.247414374, -0.511292294, 0.397512148, -0.0867304915 ] + - [ 0.0810766446, 0.0916567166, -0.20998586, -0.247067044, 0.505090533, 0.394957034, 0.0840716157, 0.0812672981, -0.0920229651, 0.209719818, -0.246575336, -0.504983161, 0.3944303, -0.0848066871 ] + - [ 0.0801183845, 0.0900048017, -0.207581785, -0.246096593, 0.498712786, 0.391738531, 0.082176035, 0.0803064776, -0.0903669323, 0.207314538, -0.245606817, -0.498600445, 0.391213932, -0.0829065943 ] + - [ 0.0792165955, 0.0883612236, -0.205170027, -0.244999374, 0.49226418, 0.388388824, 0.0803044024, 0.0794021235, -0.0887191632, 0.204901807, -0.244511781, -0.492147156, 0.38786663, -0.081030142 ] + - [ 0.0783694989, 0.0867261851, -0.202750953, -0.243778356, 0.48574773, 0.384911504, 0.078456639, 0.078552458, -0.0870798631, 0.202481991, -0.243293193, -0.485626305, 0.384391974, -0.0791772591 ] + - [ 0.0775753164, 0.0850998891, -0.200324931, -0.242436512, 0.479166451, 0.381310159, 0.0766326661, 0.077755703, -0.0854492375, 0.200055451, -0.24195402, -0.479040901, 0.380793548, -0.0773478745 ] + - [ 0.0768322695, 0.0834825382, -0.197892329, -0.240976812, 0.472523358, 0.377588377, 0.0748324047, 0.0770100806, -0.0838274916, 0.19762255, -0.240497225, -0.472393953, 0.377074934, -0.0755419172 ] + - [ 0.0761385795, 0.0818743353, -0.195453515, -0.239402228, 0.465821467, 0.373749748, 0.0730557762, 0.0763138128, -0.0822148307, 0.195183653, -0.238925775, -0.465688473, 0.373239715, -0.0737593159 ] + - [ 0.0754924682, 0.0802754833, -0.193008856, -0.237715731, 0.459063792, 0.369797861, 0.0713027016, 0.0756651217, -0.0806114602, 0.192739123, -0.237242634, -0.45892747, 0.369291474, -0.0719999997 ] + - [ 0.074892157, 0.0786861848, -0.190558722, -0.235920292, 0.452253348, 0.365736304, 0.0695731023, 0.0750622292, -0.0790175855, 0.190289321, -0.235450768, -0.452113954, 0.365233792, -0.0702638974 ] + - [ 0.0743358673, 0.0771066427, -0.18810348, -0.234018882, 0.44539315, 0.361568666, 0.0678668993, 0.0745033575, -0.0774334118, 0.187834613, -0.233553142, -0.445250935, 0.361070254, -0.0685509379 ] + - [ 0.0738218208, 0.0755370598, -0.185643498, -0.232014472, 0.438486213, 0.357298537, 0.0661840139, 0.0739867285, -0.0758591445, 0.18537536, -0.231552721, -0.438341423, 0.356804441, -0.0668610501 ] + - [ 0.073348239, 0.0739776388, -0.183179144, -0.229910034, 0.431535553, 0.352929505, 0.0645243673, 0.0735105644, -0.0742949889, 0.182911926, -0.229452471, -0.431388429, 0.352439936, -0.0651941629 ] + - [ 0.0729133433, 0.0724285827, -0.180710786, -0.227708538, 0.424544184, 0.348465159, 0.0628878807, 0.0730730871, -0.0727411504, 0.180444675, -0.227255356, -0.42439496, 0.347980321, -0.0635502053 ] + - [ 0.0725153553, 0.0708900941, -0.178238792, -0.225412955, 0.417515121, 0.343909088, 0.0612744752, 0.0726725186, -0.0711978343, 0.177973968, -0.224964343, -0.417364029, 0.34342918, -0.0619291061 ] + - [ 0.0721524965, 0.0693623758, -0.17576353, -0.223026258, 0.41045138, 0.339264882, 0.059684072, 0.0723070811, -0.069665246, 0.175500171, -0.222582395, -0.410298645, 0.338790095, -0.0603307942 ] + - [ 0.0718229885, 0.0678456307, -0.173285368, -0.220551417, 0.403355975, 0.334536128, 0.0581165924, 0.0719749966, -0.0681435907, 0.173023645, -0.220112479, -0.403201818, 0.334066649, -0.0587551985 ] + - [ 0.0715250526, 0.0663400615, -0.170804675, -0.217991402, 0.396231921, 0.329726416, 0.0565719575, 0.071674487, -0.0666330738, 0.170544755, -0.21755756, -0.396076557, 0.329262424, -0.057202248 ] + - [ 0.0712569105, 0.0648458711, -0.168321817, -0.215349186, 0.389082234, 0.324839335, 0.0550500886, 0.0714037744, -0.0651339006, 0.168063862, -0.214920602, -0.388925874, 0.324381002, -0.0556718715 ] + - [ 0.0710167837, 0.0633632623, -0.165837163, -0.21262774, 0.381909928, 0.319878474, 0.0535509067, 0.071161081, -0.0636462765, 0.165581331, -0.212204572, -0.381752777, 0.319425968, -0.0541639979 ] + - [ 0.0708028937, 0.0618924377, -0.163351081, -0.209830034, 0.374718018, 0.314847421, 0.0520743332, 0.0709446286, -0.0621704068, 0.163097525, -0.209412434, -0.374560276, 0.314400902, -0.0526785561 ] + - [ 0.070613462, 0.0604336003, -0.160863939, -0.206959039, 0.36750952, 0.309749766, 0.0506202892, 0.0707526394, -0.0607064968, 0.160612806, -0.206547153, -0.367351383, 0.309309388, -0.0512154751 ] + - [ 0.0704467101, 0.0589869528, -0.158376105, -0.204017728, 0.360287448, 0.304589097, 0.0491886958, 0.0705833353, -0.0592547519, 0.158127538, -0.203611696, -0.360129106, 0.304155009, -0.0497746837 ] + - [ 0.0703008596, 0.057552698, -0.155887948, -0.20100907, 0.353054818, 0.299369004, 0.0477794744, 0.0704349385, -0.0578153774, 0.155642084, -0.200609026, -0.352896456, 0.298941346, -0.0483561108 ] + - [ 0.0701741319, 0.0561310387, -0.153399834, -0.197936038, 0.345814644, 0.294093075, 0.046392546, 0.0703056709, -0.0563885786, 0.153156808, -0.197542109, -0.345656442, 0.293671983, -0.0469596854 ] + - [ 0.0700647486, 0.0547221778, -0.150912132, -0.194801602, 0.338569941, 0.2887649, 0.0450278319, 0.0701937546, -0.0549745609, 0.150672072, -0.194413911, -0.338412076, 0.288350503, -0.0455853362 ] + - [ 0.0699709313, 0.0533263179, -0.148425211, -0.191608733, 0.331323725, 0.283388066, 0.0436852533, 0.0700974117, -0.0535735296, 0.14818824, -0.191227397, -0.331166365, 0.282980487, -0.0442329924 ] + - [ 0.0698909013, 0.0519436619, -0.145939437, -0.188360403, 0.324079011, 0.277966164, 0.0423647313, 0.0700148641, -0.05218569, 0.145705675, -0.187985532, -0.323922321, 0.27756552, -0.0429025826 ] + - [ 0.0698228802, 0.0505744126, -0.143455179, -0.185059583, 0.316838813, 0.272502781, 0.0410661872, 0.0699443339, -0.0508112475, 0.14322474, -0.184691281, -0.316682954, 0.272109182, -0.0415940359 ] + - [ 0.0697650896, 0.0492187728, -0.140972806, -0.181709244, 0.309606146, 0.267001508, 0.0397895421, 0.0698840432, -0.0494504074, 0.140745798, -0.181347609, -0.309451273, 0.266615057, -0.0403072811 ] + - [ 0.069715751, 0.0478769453, -0.138492684, -0.178312356, 0.302384027, 0.261465932, 0.0385347172, 0.0698322139, -0.048103375, 0.138269212, -0.177957483, -0.302230289, 0.261086728, -0.0390422472 ] + - [ 0.0696730859, 0.0465491329, -0.136015183, -0.174871892, 0.295175468, 0.255899644, 0.0373016338, 0.0697870682, -0.0467703557, 0.135795347, -0.174523866, -0.295023011, 0.255527777, -0.037798863 ] + - [ 0.0696353157, 0.0452355383, -0.133540669, -0.171390822, 0.287983487, 0.250306231, 0.036090213, 0.069746828, -0.0454515549, 0.133324564, -0.171049724, -0.28783245, 0.249941786, -0.0365770574 ] + - [ 0.0696006621, 0.0439363644, -0.131069512, -0.167872118, 0.280811096, 0.244689282, 0.034900376, 0.0697097154, -0.0441471777, 0.130857227, -0.167538022, -0.280661614, 0.244332339, -0.0353767594 ] + - [ 0.0695673465, 0.0426518139, -0.128602078, -0.16431875, 0.273661313, 0.239052388, 0.033732044, 0.0696739524, -0.0428574296, 0.128393699, -0.163991726, -0.273513516, 0.238703018, -0.0341978978 ] + - [ 0.0695335905, 0.0413820897, -0.126138737, -0.16073369, 0.266537151, 0.233399135, 0.0325851382, 0.0696377611, -0.0415825159, 0.125934344, -0.160413801, -0.266391163, 0.233057406, -0.0330404016 ] + - [ 0.0694976156, 0.0401273946, -0.123679856, -0.157119909, 0.259441626, 0.227733114, 0.0314595798, 0.0695993635, -0.040322642, 0.123479525, -0.156807212, -0.259297567, 0.227399085, -0.0319041996 ] + - [ 0.0694576432, 0.0388879312, -0.121225802, -0.153480378, 0.252377752, 0.222057914, 0.03035529, 0.0695569817, -0.0390780132, 0.121029604, -0.153174925, -0.252235737, 0.221731638, -0.0307892207 ] + - [ 0.069411895, 0.0376639026, -0.118776945, -0.149818069, 0.245348545, 0.216377122, 0.0292721899, 0.0695088376, -0.0378488347, 0.118584945, -0.149519904, -0.245208683, 0.216058648, -0.0296953939 ] + - [ 0.0693585924, 0.0364555113, -0.116333652, -0.146135951, 0.23835702, 0.210694329, 0.0282102008, 0.0694531534, -0.036635312, 0.116145912, -0.145845114, -0.238219416, 0.210383696, -0.0286226481 ] + - [ 0.0692959569, 0.0352629603, -0.11389629, -0.142436997, 0.231406191, 0.205013123, 0.0271692439, 0.069388151, -0.0354376503, 0.113712866, -0.142153522, -0.231270945, 0.204710367, -0.027570912 ] + - [ 0.0692222101, 0.0340864523, -0.111465229, -0.138724178, 0.224499074, 0.199337093, 0.0261492403, 0.0693120525, -0.0342560551, 0.111286173, -0.138448092, -0.22436628, 0.199042242, -0.0265401148 ] + - [ 0.0691355735, 0.0329261901, -0.109040836, -0.135000464, 0.217638684, 0.193669828, 0.0251501113, 0.0692230799, -0.0330907316, 0.108866194, -0.134731789, -0.21750843, 0.193382904, -0.0255301852 ] + - [ 0.0690342686, 0.0317823765, -0.106623479, -0.131268828, 0.210828036, 0.188014917, 0.024171778, 0.0691194553, -0.0319418852, 0.106453293, -0.131007579, -0.210700408, 0.187735936, -0.0245410521 ] + - [ 0.0689165169, 0.0306552144, -0.104213526, -0.127532239, 0.204070144, 0.182375948, 0.0232141617, 0.0689994007, -0.0308097212, 0.104047833, -0.127278427, -0.203945221, 0.18210492, -0.0235726445 ] + - [ 0.0687805399, 0.0295449064, -0.101811345, -0.12379367, 0.197368025, 0.176756512, 0.0222771834, 0.0688611382, -0.0296944449, 0.101650178, -0.123547298, -0.19724588, 0.17649344, -0.0226248912 ] + - [ 0.0686245592, 0.0284516554, -0.0994173036, -0.120056091, 0.190724692, 0.171160196, 0.0213607645, 0.0687028897, -0.0285962618, 0.0992606897, -0.119817158, -0.190605395, 0.170905077, -0.0216977212 ] + - [ 0.0684467963, 0.0273756642, -0.0970317706, -0.116322474, 0.18414316, 0.165590589, 0.0204648261, 0.0685228774, -0.027515377, 0.0968797325, -0.116090971, -0.184026776, 0.165343414, -0.0207910633 ] + - [ 0.0682454726, 0.0263171356, -0.0946551136, -0.112595789, 0.177626446, 0.160051281, 0.0195892894, 0.0683193232, -0.0264519959, 0.0945076691, -0.112371703, -0.177513033, 0.159812034, -0.0199048465 ] + - [ 0.0680188098, 0.0252762724, -0.0922877006, -0.108879009, 0.171177564, 0.15454586, 0.0187340755, 0.0680904492, -0.025406324, 0.0921448628, -0.10866232, -0.171067176, 0.15431452, -0.0190389996 ] + - [ 0.0677650293, 0.0242532774, -0.0899298997, -0.105175103, 0.164799528, 0.149077916, 0.0178991058, 0.0678344775, -0.0243785664, 0.0897916768, -0.104965785, -0.164692215, 0.148854454, -0.0181934516 ] + - [ 0.0674823526, 0.0232483533, -0.0875820788, -0.101487043, 0.158495354, 0.143651037, 0.0170843013, 0.06754963, -0.0233689287, 0.0874484743, -0.101285065, -0.15839116, 0.143435419, -0.0173681314 ] + - [ 0.0671690013, 0.022261703, -0.085244606, -0.0978178004, 0.152268057, 0.138268812, 0.0162895833, 0.0672341288, -0.0223776159, 0.0851156185, -0.0976231253, -0.15216702, 0.138060997, -0.0165629678 ] + - [ 0.0668231968, 0.0212935292, -0.0829178492, -0.0941703463, 0.146120652, 0.13293483, 0.015514873, 0.066886196, -0.0214048336, 0.0827934725, -0.0939829303, -0.146022807, 0.132734772, -0.0157778898 ] + - [ 0.0664431608, 0.0203440348, -0.0806021764, -0.0905476518, 0.140056154, 0.127652681, 0.0147600915, 0.0665040535, -0.0204507871, 0.0804823995, -0.0903674456, -0.139961529, 0.127460325, -0.0150128262 ] + - [ 0.0660271146, 0.0194134226, -0.0782979556, -0.086952688, 0.134077578, 0.122425952, 0.0140251601, 0.0660859235, -0.0195156816, 0.0781827627, -0.0867796364, -0.133986197, 0.12224124, -0.014267706 ] + - [ 0.0655732799, 0.0185018953, -0.0760055549, -0.083388426, 0.128187939, 0.117258233, 0.0133099999, 0.0656300279, -0.0185997225, 0.0758949254, -0.0832224679, -0.128099821, 0.117081098, -0.0135424581 ] + - [ 0.0650798782, 0.0176096557, -0.0737253423, -0.079857837, 0.122390252, 0.112153113, 0.0126145321, 0.0651345888, -0.0177031152, 0.0736192507, -0.0796989055, -0.12230541, 0.111983483, -0.0128370113 ] + - [ 0.0645451309, 0.0167369066, -0.0714576856, -0.0763638921, 0.116687532, 0.10711418, 0.011938678, 0.0645978283, -0.016826065, 0.0713561018, -0.0762119142, -0.116605975, 0.106951978, -0.0121512946 ] + - [ 0.0639672596, 0.0158838509, -0.069202953, -0.0729095626, 0.111082793, 0.102145024, 0.0112823587, 0.0640179683, -0.0159687772, 0.0691058419, -0.0727644594, -0.111004526, 0.101990164, -0.0114852368 ] + - [ 0.0633444858, 0.0150506913, -0.0669615125, -0.0694978194, 0.105579052, 0.0972492342, 0.0106454953, 0.0633932309, -0.0151314571, 0.0668688341, -0.0693595062, -0.105504072, 0.0971016252, -0.0108387669 ] + - [ 0.062675031, 0.0142376306, -0.064733732, -0.0661316339, 0.100179323, 0.0924303984, 0.0100280092, 0.0627218382, -0.0143143101, 0.0646454417, -0.06600002, -0.100107624, 0.0922899434, -0.0102118138 ] + - [ 0.0619571167, 0.0134448717, -0.0625199795, -0.0628139771, 0.094886621, 0.087692106, 0.00942982152, 0.0620020122, -0.0135175415, 0.0624360279, -0.0626889659, -0.094818191, 0.0875587014, -0.00960430636 ] + - [ 0.0611889646, 0.0126726172, -0.060320623, -0.0595478201, 0.089703961, 0.083037946, 0.00885085339, 0.0612319749, -0.0127413567, 0.0602409559, -0.0594293092, -0.0896387839, 0.0829114818, -0.00901617347 ] + - [ 0.0603687959, 0.0119210701, -0.0581360306, -0.0563361342, 0.0846343581, 0.0784715072, 0.00829102603, 0.0604099483, -0.011985961, 0.0580605887, -0.0562240151, -0.0845724123, 0.0783518673, -0.00844734406 ] + - [ 0.0594948324, 0.011190433, -0.0559665703, -0.0531818904, 0.0796808272, 0.0739963786, 0.00775026066, 0.0595341545, -0.0112515596, 0.0558952898, -0.0530760488, -0.0796220862, 0.0738834406, -0.00789774701 ] + - [ 0.0585652955, 0.0104809088, -0.0538126099, -0.05008806, 0.0748463835, 0.0696161491, 0.00722847844, 0.0586028156, -0.0105383581, 0.0537454221, -0.0499883757, -0.0747908155, 0.0695097842, -0.00736731124 ] + - [ 0.0575784067, 0.00979270033, -0.0516745177, -0.047057614, 0.0701340419, 0.0653344075, 0.00672560058, 0.0576141536, -0.00984656159, 0.0516113489, -0.0469639608, -0.0700816102, 0.0652344808, -0.00685596564 ] + - [ 0.0565323875, 0.00912601032, -0.0495526614, -0.0440935236, 0.0655468175, 0.061154743, 0.00624154827, 0.0565663904, -0.00917637553, 0.0494934335, -0.0440057695, -0.0654974803, 0.0610611131, -0.00636363911 ] + - [ 0.0554254595, 0.00848104159, -0.0474474092, -0.0411987599, 0.0610877252, 0.0570807443, 0.0057762427, 0.0554577482, -0.00852800522, 0.0473920389, -0.041116767, -0.0610414357, 0.0569932636, -0.00589026056 ] + - [ 0.0542558442, 0.00785799692, -0.045359129, -0.0383762942, 0.05675978, 0.0531160004, 0.00532960507, 0.054286449, -0.00790165599, 0.0453075285, -0.0382999184, -0.0567164865, 0.0530345151, -0.00543575888 ] + - [ 0.0530217631, 0.00725707912, -0.0432881889, -0.0356290975, 0.0525659971, 0.0492641002, 0.00490155656, 0.0530507148, -0.00729753319, 0.0432402653, -0.0355581892, -0.0525256425, 0.04918845, -0.00500006298 ] + - [ 0.0517214377, 0.00667849097, -0.0412349568, -0.032960141, 0.0485093914, 0.0455286326, 0.00449201838, 0.0517487677, -0.00671584214, 0.0411906126, -0.0328945444, -0.0484719139, 0.0454586512, -0.00458310175 ] + - [ 0.0503530896, 0.00612243528, -0.0391998008, -0.0303723959, 0.0445929779, 0.0419131866, 0.0041009117, 0.0503788296, -0.00615678817, 0.0391589335, -0.0303119493, -0.0445583104, 0.0418487011, -0.0041848041 ] + - [ 0.0489149401, 0.00558911484, -0.0371830888, -0.0278688332, 0.0408197716, 0.038421351, 0.00372815773, 0.0489391227, -0.00562057663, 0.0371455913, -0.0278133692, -0.0407878422, 0.0383621826, -0.00380509893 ] + - [ 0.047405211, 0.00507873244, -0.0351851889, -0.0254524242, 0.0371927876, 0.0350567149, 0.00337367766, 0.047427869, -0.00510741285, 0.0351509491, -0.0254017692, -0.0371635192, 0.0350026781, -0.00344391514 ] + - [ 0.0458221236, 0.00459149088, -0.0332064689, -0.0231261399, 0.0337150409, 0.0318228671, 0.00303739267, 0.0458432905, -0.00461750215, 0.0331753701, -0.0230801147, -0.0336883513, 0.0317737703, -0.00310118164 ] + - [ 0.0441638996, 0.00412759295, -0.0312472971, -0.0208929516, 0.0303895465, 0.0287233965, 0.00271922397, 0.0441836092, -0.00415104987, 0.0312192175, -0.0208513708, -0.0303653485, 0.0286790418, -0.00277682731 ] + - [ 0.0424287603, 0.00368724145, -0.0293080412, -0.0187558303, 0.0272193193, 0.0257618921, 0.00241909274, 0.0424470472, -0.00370826135, 0.0292828546, -0.0187185028, -0.0271975209, 0.0257220754, -0.00247078107 ] + - [ 0.0406149274, 0.00327063917, -0.0273890695, -0.0167177473, 0.0242073745, 0.0229419428, 0.00213692018, 0.0406318266, -0.00328934193, 0.0273666444, -0.016684476, -0.0241878783, 0.0229064536, -0.00218297181 ] + - [ 0.0387206224, 0.00287798891, -0.0254907497, -0.0147816736, 0.021356727, 0.0202671376, 0.00187262747, 0.0387361692, -0.00289449692, 0.0254709503, -0.0147522554, -0.0213394307, 0.020235759, -0.00191332843 ] + - [ 0.0367440667, 0.00250949346, -0.02361345, -0.0129505805, 0.0186703919, 0.0177410652, 0.00162613582, 0.0367582973, -0.00252393168, 0.0235961353, -0.0129248065, -0.0186551882, 0.0177135743, -0.00166177984 ] + - [ 0.0346834819, 0.00216535561, -0.0217575384, -0.011227439, 0.0161513841, 0.0153673147, 0.00139736641, 0.0346964329, -0.00217785152, 0.0217425627, -0.0112050944, -0.0161381606, 0.0153434822, -0.00142825494 ] + - [ 0.0325370896, 0.00184577817, -0.0199233828, -0.00961522031, 0.0138027187, 0.013149475, 0.00118624044, 0.0325487979, -0.00185646179, 0.0199105956, -0.00959608429, -0.013791358, 0.0131290652, -0.00121268262 ] + - [ 0.0303031111, 0.00155096392, -0.0181113512, -0.00811689558, 0.0116274107, 0.011091135, 0.000992679102, 0.0303136144, -0.00155996782, 0.0181005973, -0.00810074149, -0.0116177904, 0.011073906, -0.00101499179 ] + - [ 0.0279797682, 0.00128111566, -0.0163218117, -0.00673543595, 0.00962847515, 0.00919588368, 0.000816603582, 0.0279891044, -0.00128857494, 0.016312931, -0.00672203122, -0.00962046759, 0.00918158725, -0.000835111357 ] + - [ 0.0255652821, 0.00103643619, -0.0145551323, -0.00547381257, 0.007808927, 0.00746730988, 0.000657935077, 0.0255734901, -0.00104248849, 0.0145479597, -0.00546291869, -0.00780239969, 0.00745569158, -0.000672970209 ] + - [ 0.0230578746, 0.000817128297, -0.0128116808, -0.00433499658, 0.00617178129, 0.00590900255, 0.000516594779, 0.0230649934, -0.000821913796, 0.0128060468, -0.00432636915, -0.00616659662, 0.0058998016, -0.000528497253 ] + - [ 0.020455767, 0.000623394779, -0.0110918255, -0.00332195913, 0.00472005305, 0.00452455062, 0.00039250388, 0.0204618363, -0.000627056197, 0.0110875554, -0.00331534783, -0.00471606837, 0.00451749997, -0.00040162139 ] + - [ 0.017757181, 0.000455438431, -0.00939593413, -0.00243767136, 0.00345675728, 0.00331754301, 0.000285583572, 0.0177622409, -0.000458121027, 0.00939284867, -0.00243281996, -0.00345382491, 0.00331236931, -0.000292271519 ] + - [ 0.014960338, 0.000313462048, -0.00772437485, -0.00168510443, 0.002384909, 0.00229156865, 0.000195755049, 0.0149644293, -0.000315313617, 0.00772228985, -0.00168175077, -0.0023828762, 0.00228799227, -0.000200376543 ] + - [ 0.0120634596, 0.000197668423, -0.00607751562, -0.00106722949, 0.00150752323, 0.00145021646, 0.000122939503, 0.0120666234, -0.000198839303, 0.00607624211, -0.00106510551, -0.00150623221, 0.00144795147, -0.000125865362 ] + - [ 0.00906476719, 0.000108260353, -0.00445572444, -0.000587017663, 0.000827614979, 0.00079707536, 6.7058126e-05, 0.00906704538, -0.000108903418, 0.00445506864, -0.000585849392, -0.000826902932, 0.00079582955, -6.86668774e-05 ] + - [ 0.00596248241, 4.54406308e-05, -0.0028593693, -0.000247440114, 0.00034819927, 0.000335734273, 2.80321107e-05, 0.00596391718, -4.57112951e-05, 0.00285913263, -0.000246947664, -0.000347898321, 0.000335209148, -2.87099896e-05 ] + - [ 0.00275482673, 9.41205228e-06, -0.00128881821, -5.14679862e-05, 7.22911165e-05, 6.97821229e-05, 5.78264978e-06, 0.00275546087, -9.46826864e-06, 0.00128879728, -5.13655556e-05, -7.22283529e-05, 6.96728981e-05, -5.92359989e-06 ] + - [ -0.000558860327, -2.86193393e-08, 0.000255877129, 0, 0, 0, 0, -0.000558983901, 2.84709477e-08, -0.000255888261, 0, 0, 0, 0 ] + - [ -0.00392849744, -1.39212023e-06, 0.00178898088, 0, 0, 0, 0, -0.00392935302, 1.3848573e-06, -0.00178908708, 0, 0, 0, 0 ] + - [ -0.00732623335, -4.76604358e-06, 0.00331835235, 0, 0, 0, 0, -0.00732780477, 4.74102277e-06, -0.00331860183, 0, 0, 0, 0 ] + - [ -0.0107519477, -1.01051992e-05, 0.00484398488, 0, 0, 0, 0, -0.0107542189, 1.00518142e-05, -0.00484442558, 0, 0, 0, 0 ] + - [ -0.0142055203, -1.73643971e-05, 0.00636587184, 0, 0, 0, 0, -0.0142084752, 1.72720784e-05, -0.00636655139, 0, 0, 0, 0 ] + - [ -0.0176868306, -2.64984471e-05, 0.00788400659, 0, 0, 0, 0, -0.0176904534, 2.63566622e-05, -0.00788497232, 0, 0, 0, 0 ] + - [ -0.0211957585, -3.7462159e-05, 0.00939838251, 0, 0, 0, 0, -0.0212000333, 3.72604126e-05, -0.00939968142, 0, 0, 0, 0 ] + - [ -0.0247321836, -5.02103427e-05, 0.0109089929, 0, 0, 0, 0, -0.0247370947, 4.99381762e-05, -0.0109106718, 0, 0, 0, 0 ] + - [ -0.0282959857, -6.46978081e-05, 0.0124158313, 0, 0, 0, 0, -0.0283015172, 6.43448e-05, -0.0124179364, 0, 0, 0, 0 ] + - [ -0.0318870443, -8.08793651e-05, 0.0139188908, 0, 0, 0, 0, -0.0318931807, 8.04351308e-05, -0.0139214684, 0, 0, 0, 0 ] + - [ -0.0355052391, -9.87098236e-05, 0.015418165, 0, 0, 0, 0, -0.0355119649, 9.81640155e-05, -0.0154212607, 0, 0, 0, 0 ] + - [ -0.03915045, -0.000118143993, 0.0169136471, 0, 0, 0, 0, -0.0391577496, 0.000117486301, -0.0169173066, 0, 0, 0, 0 ] + - [ -0.0428225564, -0.000139136684, 0.0184053306, 0, 0, 0, 0, -0.0428304145, 0.000138356834, -0.018409599, 0, 0, 0, 0 ] + - [ -0.0465214382, -0.000161642707, 0.0198932087, 0, 0, 0, 0, -0.0465298395, 0.000160730461, -0.0198981309, 0, 0, 0, 0 ] + - [ -0.0502469751, -0.00018561687, 0.021377275, 0, 0, 0, 0, -0.0502559042, 0.000184562029, -0.0213828955, 0, 0, 0, 0 ] + - [ -0.0539990466, -0.000211013984, 0.0228575226, 0, 0, 0, 0, -0.0540084884, 0.000209806386, -0.0228638858, 0, 0, 0, 0 ] + - [ -0.0577775325, -0.000237788858, 0.024333945, 0, 0, 0, 0, -0.0577874719, 0.000236418377, -0.0243410949, 0, 0, 0, 0 ] + - [ -0.0615823124, -0.000265896304, 0.0258065356, 0, 0, 0, 0, -0.0615927344, 0.000264352851, -0.0258145157, 0, 0, 0, 0 ] + - [ -0.0654132662, -0.000295291129, 0.0272752877, 0, 0, 0, 0, -0.0654241558, 0.000293564652, -0.0272841415, 0, 0, 0, 0 ] + - [ -0.0692702733, -0.000325928146, 0.0287401946, 0, 0, 0, 0, -0.0692816157, 0.00032400863, -0.0287499652, 0, 0, 0, 0 ] + - [ -0.0731532136, -0.000357762162, 0.0302012498, 0, 0, 0, 0, -0.0731649939, 0.000355639629, -0.0302119798, 0, 0, 0, 0 ] + - [ -0.0770619667, -0.000390747988, 0.0316584466, 0, 0, 0, 0, -0.0770741702, 0.000388412498, -0.0316701785, 0, 0, 0, 0 ] + - [ -0.0809964123, -0.000424840435, 0.0331117783, 0, 0, 0, 0, -0.0810090243, 0.000422282082, -0.0331245544, 0, 0, 0, 0 ] + - [ -0.0849564301, -0.000459994311, 0.0345612384, 0, 0, 0, 0, -0.0849694361, 0.00045720323, -0.0345751004, 0, 0, 0, 0 ] + - [ -0.0889418997, -0.000496164427, 0.0360068202, 0, 0, 0, 0, -0.0889552852, 0.000493130787, -0.0360218096, 0, 0, 0, 0 ] + - [ -0.0929527009, -0.000533305593, 0.0374485169, 0, 0, 0, 0, -0.0929664514, 0.0005300196, -0.0374646751, 0, 0, 0, 0 ] + - [ -0.0969887134, -0.000571372618, 0.0388863222, 0, 0, 0, 0, -0.0970028146, 0.000567824517, -0.0389036899, 0, 0, 0, 0 ] + - [ -0.101049817, -0.000610320312, 0.0403202291, 0, 0, 0, 0, -0.101064254, 0.000606500384, -0.0403388472, 0, 0, 0, 0 ] + - [ -0.105135891, -0.000650103486, 0.0417502312, 0, 0, 0, 0, -0.10515065, 0.000646002048, -0.0417701399, 0, 0, 0, 0 ] + - [ -0.109246815, -0.000690676949, 0.0431763218, 0, 0, 0, 0, -0.109261883, 0.000686284356, -0.0431975611, 0, 0, 0, 0 ] + - [ -0.113382469, -0.000731995511, 0.0445984943, 0, 0, 0, 0, -0.113397831, 0.000727302155, -0.0446211039, 0, 0, 0, 0 ] + - [ -0.117542733, -0.000774013982, 0.046016742, 0, 0, 0, 0, -0.117558375, 0.000769010291, -0.0460407613, 0, 0, 0, 0 ] + - [ -0.121727486, -0.000816687171, 0.0474310583, 0, 0, 0, 0, -0.121743394, 0.000811363611, -0.0474565265, 0, 0, 0, 0 ] + - [ -0.125936609, -0.000859969889, 0.0488414365, 0, 0, 0, 0, -0.125952769, 0.000854316963, -0.0488683923, 0, 0, 0, 0 ] + - [ -0.13016998, -0.000903816946, 0.0502478701, 0, 0, 0, 0, -0.130186379, 0.000897825193, -0.050276352, 0, 0, 0, 0 ] + - [ -0.134427479, -0.000948183151, 0.0516503523, 0, 0, 0, 0, -0.134444103, 0.000941843147, -0.0516803986, 0, 0, 0, 0 ] + - [ -0.138708987, -0.000993023314, 0.0530488765, 0, 0, 0, 0, -0.138725822, 0.000986325674, -0.0530805251, 0, 0, 0, 0 ] + - [ -0.143014382, -0.00103829225, 0.0544434362, 0, 0, 0, 0, -0.143031415, 0.00103122762, -0.0544767245, 0, 0, 0, 0 ] + - [ -0.147343545, -0.00108394476, 0.0558340246, 0, 0, 0, 0, -0.147360762, 0.00107650383, -0.05586899, 0, 0, 0, 0 ] + - [ -0.151696355, -0.00112993565, 0.0572206351, 0, 0, 0, 0, -0.151713743, 0.00112210915, -0.0572573146, 0, 0, 0, 0 ] + - [ -0.156072692, -0.00117621975, 0.0586032611, 0, 0, 0, 0, -0.156090237, 0.00116799843, -0.0586416914, 0, 0, 0, 0 ] + - [ -0.160472435, -0.00122275185, 0.059981896, 0, 0, 0, 0, -0.160490125, 0.00121412652, -0.0600221134, 0, 0, 0, 0 ] + - [ -0.164895465, -0.00126948677, 0.0613565331, 0, 0, 0, 0, -0.164913285, 0.00126044826, -0.0613985736, 0, 0, 0, 0 ] + - [ -0.16934166, -0.00131637932, 0.0627271657, 0, 0, 0, 0, -0.169359599, 0.0013069185, -0.0627710652, 0, 0, 0, 0 ] + - [ -0.173810901, -0.0013633843, 0.0640937873, 0, 0, 0, 0, -0.173828945, 0.00135349209, -0.0641395812, 0, 0, 0, 0 ] + - [ -0.178303067, -0.00141045654, 0.0654563912, 0, 0, 0, 0, -0.178321203, 0.00140012387, -0.0655041146, 0, 0, 0, 0 ] + - [ -0.182818038, -0.00145755082, 0.0668149708, 0, 0, 0, 0, -0.182836254, 0.00144676869, -0.0668646586, 0, 0, 0, 0 ] + - [ -0.187355694, -0.00150462198, 0.0681695194, 0, 0, 0, 0, -0.187373976, 0.0014933814, -0.0682212061, 0, 0, 0, 0 ] + - [ -0.191915915, -0.00155162481, 0.0695200304, 0, 0, 0, 0, -0.19193425, 0.00153991684, -0.0695737502, 0, 0, 0, 0 ] + - [ -0.196498579, -0.00159851413, 0.0708664971, 0, 0, 0, 0, -0.196516955, 0.00158632986, -0.070922284, 0, 0, 0, 0 ] + - [ -0.201103567, -0.00164524475, 0.0722089129, 0, 0, 0, 0, -0.201121972, 0.00163257531, -0.0722668006, 0, 0, 0, 0 ] + - [ -0.205730758, -0.00169177147, 0.0735472712, 0, 0, 0, 0, -0.205749179, 0.00167860803, -0.073607293, 0, 0, 0, 0 ] + - [ -0.210380032, -0.00173804911, 0.0748815654, 0, 0, 0, 0, -0.210398457, 0.00172438288, -0.0749437542, 0, 0, 0, 0 ] + - [ -0.215051269, -0.00178403248, 0.0762117887, 0, 0, 0, 0, -0.215069686, 0.00176985469, -0.0762761774, 0, 0, 0, 0 ] + - [ -0.219744349, -0.00182967638, 0.0775379347, 0, 0, 0, 0, -0.219762744, 0.00181497832, -0.0776045555, 0, 0, 0, 0 ] + - [ -0.22445915, -0.00187493562, 0.0788599965, 0, 0, 0, 0, -0.224477513, 0.00185970861, -0.0789288816, 0, 0, 0, 0 ] + - [ -0.229195554, -0.00191976503, 0.0801779676, 0, 0, 0, 0, -0.229213871, 0.00190400041, -0.0802491489, 0, 0, 0, 0 ] + - [ -0.233953439, -0.00196411939, 0.0814918414, 0, 0, 0, 0, -0.233971699, 0.00194780856, -0.0815653503, 0, 0, 0, 0 ] + - [ -0.238732685, -0.00200795354, 0.0828016112, 0, 0, 0, 0, -0.238750876, 0.00199108792, -0.0828774789, 0, 0, 0, 0 ] + - [ -0.243533172, -0.00205122227, 0.0841072704, 0, 0, 0, 0, -0.243551281, 0.00203379333, -0.0841855278, 0, 0, 0, 0 ] + - [ -0.248354779, -0.00209388039, 0.0854088123, 0, 0, 0, 0, -0.248372796, 0.00207587963, -0.08548949, 0, 0, 0, 0 ] + - [ -0.253197387, -0.00213588272, 0.0867062304, 0, 0, 0, 0, -0.253215299, 0.00211730167, -0.0867893586, 0, 0, 0, 0 ] + - [ -0.258060875, -0.00217718407, 0.0879995178, 0, 0, 0, 0, -0.258078671, 0.0021580143, -0.0880851266, 0, 0, 0, 0 ] + - [ -0.262945122, -0.00221773924, 0.0892886682, 0, 0, 0, 0, -0.26296279, 0.00219797238, -0.0893767872, 0, 0, 0, 0 ] + - [ -0.267850009, -0.00225750304, 0.0905736747, 0, 0, 0, 0, -0.267867537, 0.00223713073, -0.0906643333, 0, 0, 0, 0 ] + - [ -0.272775414, -0.00229643029, 0.0918545307, 0, 0, 0, 0, -0.272792792, 0.00227544421, -0.091947758, 0, 0, 0, 0 ] + - [ -0.277721218, -0.0023344758, 0.0931312297, 0, 0, 0, 0, -0.277738434, 0.00231286767, -0.0932270544, 0, 0, 0, 0 ] + - [ -0.282687301, -0.00237159436, 0.094403765, 0, 0, 0, 0, -0.282704343, 0.00234935596, -0.0945022155, 0, 0, 0, 0 ] + - [ -0.287673542, -0.00240774081, 0.0956721299, 0, 0, 0, 0, -0.287690399, 0.00238486391, -0.0957732344, 0, 0, 0, 0 ] + - [ -0.29267982, -0.00244286993, 0.0969363178, 0, 0, 0, 0, -0.292696481, 0.00241934639, -0.0970401042, 0, 0, 0, 0 ] + - [ -0.297706016, -0.00247693655, 0.098196322, 0, 0, 0, 0, -0.29772247, 0.00245275822, -0.0983028179, 0, 0, 0, 0 ] + - [ -0.302752008, -0.00250989548, 0.099452136, 0, 0, 0, 0, -0.302768245, 0.00248505427, -0.0995613686, 0, 0, 0, 0 ] + - [ -0.307817678, -0.00254170152, 0.100703753, 0, 0, 0, 0, -0.307833686, 0.00251618938, -0.100815749, 0, 0, 0, 0 ] + - [ -0.312902904, -0.00257230948, 0.101951167, 0, 0, 0, 0, -0.312918672, 0.00254611839, -0.102065953, 0, 0, 0, 0 ] + - [ -0.318007566, -0.00260167418, 0.10319437, 0, 0, 0, 0, -0.318023084, 0.00257479616, -0.103311973, 0, 0, 0, 0 ] + - [ -0.323131544, -0.00262975042, 0.104433357, 0, 0, 0, 0, -0.323146801, 0.00260217752, -0.104553802, 0, 0, 0, 0 ] + - [ -0.328274718, -0.00265649301, 0.10566812, 0, 0, 0, 0, -0.328289703, 0.00262821733, -0.105791433, 0, 0, 0, 0 ] + - [ -0.333436967, -0.00268185676, 0.106898653, 0, 0, 0, 0, -0.333451669, 0.00265287043, -0.10702486, 0, 0, 0, 0 ] + - [ -0.33861817, -0.00270579649, 0.108124949, 0, 0, 0, 0, -0.33863258, 0.00267609166, -0.108254075, 0, 0, 0, 0 ] + - [ -0.343818209, -0.00272826701, 0.109347002, 0, 0, 0, 0, -0.343832315, 0.00269783589, -0.109479072, 0, 0, 0, 0 ] + - [ -0.349036961, -0.00274922311, 0.110564805, 0, 0, 0, 0, -0.349050754, 0.00271805795, -0.110699843, 0, 0, 0, 0 ] + - [ -0.354274307, -0.00276861962, 0.111778351, 0, 0, 0, 0, -0.354287777, 0.00273671268, -0.111916381, 0, 0, 0, 0 ] + - [ -0.359530128, -0.00278641134, 0.112987634, 0, 0, 0, 0, -0.359543263, 0.00275375495, -0.11312868, 0, 0, 0, 0 ] + - [ -0.364804301, -0.00280255308, 0.114192647, 0, 0, 0, 0, -0.364817092, 0.00276913959, -0.114336733, 0, 0, 0, 0 ] + - [ -0.370096707, -0.00281699966, 0.115393383, 0, 0, 0, 0, -0.370109145, 0.00278282144, -0.115540533, 0, 0, 0, 0 ] + - [ -0.375407226, -0.00282970587, 0.116589837, 0, 0, 0, 0, -0.3754193, 0.00279475537, -0.116740072, 0, 0, 0, 0 ] + - [ -0.380735738, -0.00284062654, 0.117782, 0, 0, 0, 0, -0.380747438, 0.00280489621, -0.117935344, 0, 0, 0, 0 ] + - [ -0.386082121, -0.00284971648, 0.118969867, 0, 0, 0, 0, -0.386093437, 0.00281319881, -0.119126343, 0, 0, 0, 0 ] + - [ -0.391446257, -0.00285693048, 0.120153431, 0, 0, 0, 0, -0.391457179, 0.00281961801, -0.12031306, 0, 0, 0, 0 ] + - [ -0.396828023, -0.00286222336, 0.121332685, 0, 0, 0, 0, -0.396838543, 0.00282410867, -0.121495489, 0, 0, 0, 0 ] + - [ -0.402227301, -0.00286554994, 0.122507623, 0, 0, 0, 0, -0.402237408, 0.00282662564, -0.122673623, 0, 0, 0, 0 ] + - [ -0.40764397, -0.00286686502, 0.123678238, 0, 0, 0, 0, -0.407653655, 0.00282712375, -0.123847455, 0, 0, 0, 0 ] + - [ -0.413077909, -0.00286612341, 0.124844523, 0, 0, 0, 0, -0.413087163, 0.00282555785, -0.125016979, 0, 0, 0, 0 ] + - [ -0.418528998, -0.00286327992, 0.126006472, 0, 0, 0, 0, -0.418537811, 0.0028218828, -0.126182186, 0, 0, 0, 0 ] + - [ -0.423997117, -0.00285828936, 0.127164077, 0, 0, 0, 0, -0.42400548, 0.00281605344, -0.127343071, 0, 0, 0, 0 ] + - [ -0.429482146, -0.00285110654, 0.128317334, 0, 0, 0, 0, -0.42949005, 0.00280802461, -0.128499627, 0, 0, 0, 0 ] + - [ -0.434983964, -0.00284168628, 0.129466234, 0, 0, 0, 0, -0.434991399, 0.00279775116, -0.129651846, 0, 0, 0, 0 ] + - [ -0.440502451, -0.00282998337, 0.130610771, 0, 0, 0, 0, -0.440509409, 0.00278518794, -0.130799721, 0, 0, 0, 0 ] + - [ -0.446037486, -0.00281595264, 0.131750939, 0, 0, 0, 0, -0.446043958, 0.0027702898, -0.131943246, 0, 0, 0, 0 ] + - [ -0.45158895, -0.00279954888, 0.132886731, 0, 0, 0, 0, -0.451594926, 0.00275301159, -0.133082413, 0, 0, 0, 0 ] + - [ -0.457156721, -0.00278072692, 0.134018139, 0, 0, 0, 0, -0.457162194, 0.00273330814, -0.134217217, 0, 0, 0, 0 ] + - [ -0.462740681, -0.00275944156, 0.135145159, 0, 0, 0, 0, -0.46274564, 0.0027111343, -0.135347649, 0, 0, 0, 0 ] + - [ -0.468340707, -0.0027356476, 0.136267782, 0, 0, 0, 0, -0.468345145, 0.00268644494, -0.136473702, 0, 0, 0, 0 ] + - [ -0.473956681, -0.00270929987, 0.137386003, 0, 0, 0, 0, -0.473960589, 0.00265919488, -0.137595371, 0, 0, 0, 0 ] + - [ -0.479588482, -0.00268035317, 0.138499815, 0, 0, 0, 0, -0.479591851, 0.00262933898, -0.138712647, 0, 0, 0, 0 ] + - [ -0.485235988, -0.0026487623, 0.13960921, 0, 0, 0, 0, -0.48523881, 0.00259683208, -0.139825524, 0, 0, 0, 0 ] + - [ -0.490899081, -0.00261448209, 0.140714183, 0, 0, 0, 0, -0.490901348, 0.00256162903, -0.140933996, 0, 0, 0, 0 ] + - [ -0.49657764, -0.00257746733, 0.141814727, 0, 0, 0, 0, -0.496579343, 0.00252368468, -0.142038054, 0, 0, 0, 0 ] + - [ -0.502271544, -0.00253767285, 0.142910835, 0, 0, 0, 0, -0.502272675, 0.00248295388, -0.143137693, 0, 0, 0, 0 ] + - [ -0.507980673, -0.00249505344, 0.144002501, 0, 0, 0, 0, -0.507981224, 0.00243939146, -0.144232904, 0, 0, 0, 0 ] + - [ -0.513704908, -0.00244956392, 0.145089717, 0, 0, 0, 0, -0.51370487, 0.00239295229, -0.145323682, 0, 0, 0, 0 ] + - [ -0.519444126, -0.00240115911, 0.146172477, 0, 0, 0, 0, -0.519443492, 0.0023435912, -0.14641002, 0, 0, 0, 0 ] + - [ -0.525198209, -0.0023497938, 0.147250776, 0, 0, 0, 0, -0.525196971, 0.00229126304, -0.147491909, 0, 0, 0, 0 ] + - [ -0.530967036, -0.00229542281, 0.148324605, 0, 0, 0, 0, -0.530965186, 0.00223592266, -0.148569345, 0, 0, 0, 0 ] + - [ -0.536750486, -0.00223800095, 0.149393958, 0, 0, 0, 0, -0.536748016, 0.00217752491, -0.149642318, 0, 0, 0, 0 ] + - [ -0.54254844, -0.00217748302, 0.150458829, 0, 0, 0, 0, -0.542545342, 0.00211602462, -0.150710823, 0, 0, 0, 0 ] + - [ -0.548360776, -0.00211382385, 0.151519211, 0, 0, 0, 0, -0.548357044, 0.00205137666, -0.151774853, 0, 0, 0, 0 ] + - [ -0.554187375, -0.00204697823, 0.152575098, 0, 0, 0, 0, -0.554183, 0.00198353586, -0.1528344, 0, 0, 0, 0 ] + - [ -0.560028117, -0.00197690098, 0.153626482, 0, 0, 0, 0, -0.560023092, 0.00191245708, -0.153889458, 0, 0, 0, 0 ] + - [ -0.56588288, -0.00190354691, 0.154673358, 0, 0, 0, 0, -0.565877198, 0.00183809515, -0.15494002, 0, 0, 0, 0 ] + - [ -0.571751545, -0.00182687083, 0.155715718, 0, 0, 0, 0, -0.571745198, 0.00176040494, -0.155986079, 0, 0, 0, 0 ] + - [ -0.577633992, -0.00174682755, 0.156753556, 0, 0, 0, 0, -0.577626972, 0.00167934127, -0.157027627, 0, 0, 0, 0 ] + - [ -0.583530099, -0.00166337187, 0.157786865, 0, 0, 0, 0, -0.5835224, 0.00159485901, -0.158064659, 0, 0, 0, 0 ] + - [ -0.589439747, -0.00157645861, 0.158815638, 0, 0, 0, 0, -0.589431362, 0.00150691299, -0.159097166, 0, 0, 0, 0 ] + - [ -0.595362816, -0.00148604258, 0.15983987, 0, 0, 0, 0, -0.595353738, 0.00141545807, -0.160125143, 0, 0, 0, 0 ] + - [ -0.601299185, -0.00139207859, 0.160859553, 0, 0, 0, 0, -0.601289406, 0.00132044908, -0.161148582, 0, 0, 0, 0 ] + - [ -0.607248734, -0.00129452144, 0.161874681, 0, 0, 0, 0, -0.607238248, 0.00122184089, -0.162167475, 0, 0, 0, 0 ] + - [ -0.613211342, -0.00119332595, 0.162885246, 0, 0, 0, 0, -0.613200142, 0.00111958833, -0.163181818, 0, 0, 0, 0 ] + - [ -0.619186889, -0.00108844693, 0.163891243, 0, 0, 0, 0, -0.619174968, 0.00101364625, -0.164191601, 0, 0, 0, 0 ] + - [ -0.625175255, -0.000979839181, 0.164892665, 0, 0, 0, 0, -0.625162607, 0.000903969497, -0.165196819, 0, 0, 0, 0 ] + - [ -0.63117632, -0.000867457521, 0.165889505, 0, 0, 0, 0, -0.631162937, 0.000790512921, -0.166197464, 0, 0, 0, 0 ] + - [ -0.637189963, -0.000751256758, 0.166881756, 0, 0, 0, 0, -0.63717584, 0.000673231366, -0.16719353, 0, 0, 0, 0 ] + - [ -0.643216063, -0.000631191701, 0.167869413, 0, 0, 0, 0, -0.643201194, 0.00055207968, -0.168185009, 0, 0, 0, 0 ] + - [ -0.649254502, -0.000507217161, 0.168852467, 0, 0, 0, 0, -0.649238879, 0.00042701271, -0.169171895, 0, 0, 0, 0 ] + - [ -0.655305157, -0.000379287947, 0.169830913, 0, 0, 0, 0, -0.655288775, 0.000297985302, -0.17015418, 0, 0, 0, 0 ] + - [ -0.66136791, -0.000247358869, 0.170804744, 0, 0, 0, 0, -0.661350762, 0.000164952303, -0.171131858, 0, 0, 0, 0 ] + - [ -0.667442639, -0.000111384737, 0.171773954, 0, 0, 0, 0, -0.667424719, 2.78685598e-05, -0.172104922, 0, 0, 0, 0 ] + - [ -0.673529225, 2.86796389e-05, 0.172738535, 0, 0, 0, 0, -0.673510527, -0.00011331108, -0.173073365, 0, 0, 0, 0 ] + - [ -0.679627547, 0.000172879449, 0.173698481, 0, 0, 0, 0, -0.679608065, -0.000258631771, -0.174037179, 0, 0, 0, 0 ] + - [ -0.685737484, 0.000321259884, 0.174653785, 0, 0, 0, 0, -0.685717212, -0.000408138664, -0.174996359, 0, 0, 0, 0 ] + - [ -0.691858917, 0.000473866134, 0.175604441, 0, 0, 0, 0, -0.691837849, -0.000561876915, -0.175950896, 0, 0, 0, 0 ] + - [ -0.697991725, 0.000630743388, 0.176550442, 0, 0, 0, 0, -0.697969856, -0.000719891675, -0.176900785, 0, 0, 0, 0 ] + - [ -0.704135787, 0.000791936837, 0.177491782, 0, 0, 0, 0, -0.704113111, -0.000882228098, -0.177846018, 0, 0, 0, 0 ] + - [ -0.710290984, 0.00095749167, 0.178428454, 0, 0, 0, 0, -0.710267496, -0.00104893134, -0.178786587, 0, 0, 0, 0 ] + - [ -0.716457195, 0.00112745308, 0.17936045, 0, 0, 0, 0, -0.716432889, -0.00122004655, -0.179722487, 0, 0, 0, 0 ] + - [ -0.7226343, 0.00130186625, 0.180287766, 0, 0, 0, 0, -0.72260917, -0.00139561888, -0.180653711, 0, 0, 0, 0 ] + - [ -0.728822179, 0.00148077638, 0.181210393, 0, 0, 0, 0, -0.728796219, -0.00157569348, -0.181580251, 0, 0, 0, 0 ] + - [ -0.735020711, 0.00166422866, 0.182128326, 0, 0, 0, 0, -0.734993917, -0.00176031552, -0.1825021, 0, 0, 0, 0 ] + - [ -0.741229775, 0.00185226827, 0.183041557, 0, 0, 0, 0, -0.741202142, -0.00194953014, -0.183419251, 0, 0, 0, 0 ] + - [ -0.747449253, 0.0020449404, 0.18395008, 0, 0, 0, 0, -0.747420774, -0.00214338249, -0.184331698, 0, 0, 0, 0 ] + - [ -0.753679022, 0.00224229025, 0.184853889, 0, 0, 0, 0, -0.753649694, -0.00234191773, -0.185239434, 0, 0, 0, 0 ] + - [ -0.759918963, 0.00244436301, 0.185752976, 0, 0, 0, 0, -0.75988878, -0.00254518101, -0.186142452, 0, 0, 0, 0 ] + - [ -0.766168956, 0.00265120387, 0.186647336, 0, 0, 0, 0, -0.766137914, -0.00275321749, -0.187040744, 0, 0, 0, 0 ] + - [ -0.772428881, 0.002862858, 0.187536961, 0, 0, 0, 0, -0.772396973, -0.00296607231, -0.187934303, 0, 0, 0, 0 ] + - [ -0.778698616, 0.00307937062, 0.188421844, 0, 0, 0, 0, -0.778665839, -0.00318379063, -0.188823124, 0, 0, 0, 0 ] + - [ -0.784978042, 0.0033007869, 0.18930198, 0, 0, 0, 0, -0.784944391, -0.00340641761, -0.189707199, 0, 0, 0, 0 ] + - [ -0.791267038, 0.00352715204, 0.190177362, 0, 0, 0, 0, -0.791232508, -0.0036339984, -0.19058652, 0, 0, 0, 0 ] + - [ -0.797565485, 0.00375851123, 0.191047982, 0, 0, 0, 0, -0.797530072, -0.00386657814, -0.191461081, 0, 0, 0, 0 ] + - [ -0.803873261, 0.00399490965, 0.191913835, 0, 0, 0, 0, -0.80383696, -0.004104202, -0.192330876, 0, 0, 0, 0 ] + - [ -0.810190246, 0.0042363925, 0.192774913, 0, 0, 0, 0, -0.810153053, -0.00434691513, -0.193195896, 0, 0, 0, 0 ] + - [ -0.816516321, 0.00448300496, 0.193631211, 0, 0, 0, 0, -0.816478231, -0.00459476267, -0.194056136, 0, 0, 0, 0 ] + - [ -0.822851364, 0.00473479224, 0.19448272, 0, 0, 0, 0, -0.822812374, -0.00484778979, -0.194911588, 0, 0, 0, 0 ] + - [ -0.829195256, 0.00499179951, 0.195329436, 0, 0, 0, 0, -0.829155361, -0.00510604164, -0.195762245, 0, 0, 0, 0 ] + - [ -0.835547876, 0.00525407197, 0.19617135, 0, 0, 0, 0, -0.835507072, -0.00536956336, -0.196608101, 0, 0, 0, 0 ] + - [ -0.841909104, 0.0055216548, 0.197008457, 0, 0, 0, 0, -0.841867387, -0.00563840012, -0.197449148, 0, 0, 0, 0 ] + - [ -0.84827882, 0.0057945932, 0.19784075, 0, 0, 0, 0, -0.848236185, -0.00591259706, -0.198285379, 0, 0, 0, 0 ] + - [ -0.854656902, 0.00607293236, 0.198668222, 0, 0, 0, 0, -0.854613347, -0.00619219934, -0.199116788, 0, 0, 0, 0 ] + - [ -0.861043232, 0.00635671747, 0.199490867, 0, 0, 0, 0, -0.860998751, -0.00647725211, -0.199943368, 0, 0, 0, 0 ] + - [ -0.867437688, 0.00664599372, 0.200308677, 0, 0, 0, 0, -0.867392279, -0.00676780053, -0.200765111, 0, 0, 0, 0 ] + - [ -0.873840151, 0.00694080629, 0.201121647, 0, 0, 0, 0, -0.873793809, -0.00706388975, -0.201582011, 0, 0, 0, 0 ] + - [ -0.880250499, 0.00724120039, 0.201929769, 0, 0, 0, 0, -0.880203222, -0.00736556491, -0.20239406, 0, 0, 0, 0 ] + - [ -0.886668613, 0.00754722119, 0.202733038, 0, 0, 0, 0, -0.886620397, -0.00767287119, -0.203201253, 0, 0, 0, 0 ] + - [ -0.893094373, 0.00785891389, 0.203531445, 0, 0, 0, 0, -0.893045213, -0.00798585372, -0.204003581, 0, 0, 0, 0 ] + - [ -0.899527657, 0.00817632368, 0.204324986, 0, 0, 0, 0, -0.899477552, -0.00830455766, -0.204801038, 0, 0, 0, 0 ] + - [ -0.905968346, 0.00849949574, 0.205113652, 0, 0, 0, 0, -0.905917291, -0.00862902816, -0.205593617, 0, 0, 0, 0 ] + - [ -0.91241632, 0.00882847528, 0.205897438, 0, 0, 0, 0, -0.912364312, -0.00895931038, -0.206381312, 0, 0, 0, 0 ] + - [ -0.918871457, 0.00916330747, 0.206676337, 0, 0, 0, 0, -0.918818494, -0.00929544947, -0.207164114, 0, 0, 0, 0 ] + - [ -0.925333639, 0.00950403752, 0.207450342, 0, 0, 0, 0, -0.925279717, -0.00963749059, -0.207942017, 0, 0, 0, 0 ] + - [ -0.931802743, 0.0098507106, 0.208219447, 0, 0, 0, 0, -0.93174786, -0.00998547888, -0.208715015, 0, 0, 0, 0 ] + - [ -0.938278651, 0.0102033719, 0.208983644, 0, 0, 0, 0, -0.938222803, -0.0103394595, -0.2094831, 0, 0, 0, 0 ] + - [ -0.944761242, 0.0105620666, 0.209742928, 0, 0, 0, 0, -0.944704426, -0.0106994776, -0.210246265, 0, 0, 0, 0 ] + - [ -0.951250395, 0.01092684, 0.210497291, 0, 0, 0, 0, -0.951192609, -0.0110655783, -0.211004504, 0, 0, 0, 0 ] + - [ -0.957745991, 0.0112977371, 0.211246727, 0, 0, 0, 0, -0.957687232, -0.0114378069, -0.211757809, 0, 0, 0, 0 ] + - [ -0.964247908, 0.0116748033, 0.21199123, 0, 0, 0, 0, -0.964188173, -0.0118162083, -0.212506174, 0, 0, 0, 0 ] + - [ -0.970756027, 0.0120580836, 0.212730792, 0, 0, 0, 0, -0.970695314, -0.0122008279, -0.213249591, 0, 0, 0, 0 ] + - [ -0.977270227, 0.0124476232, 0.213465407, 0, 0, 0, 0, -0.977208534, -0.0125917107, -0.213988054, 0, 0, 0, 0 ] + - [ -0.983790388, 0.0128434675, 0.214195069, 0, 0, 0, 0, -0.983727712, -0.0129889019, -0.214721555, 0, 0, 0, 0 ] + - [ -0.99031639, 0.0132456615, 0.214919771, 0, 0, 0, 0, -0.990252728, -0.0133924467, -0.215450089, 0, 0, 0, 0 ] + - [ -0.996848112, 0.0136542504, 0.215639505, 0, 0, 0, 0, -0.996783462, -0.0138023902, -0.216173647, 0, 0, 0, 0 ] + - [ -1.00338543, 0.0140692795, 0.216354267, 0, 0, 0, 0, -1.00331979, -0.0142187775, -0.216892223, 0, 0, 0, 0 ] + - [ -1.00992824, 0.0144907939, 0.217064048, 0, 0, 0, 0, -1.0098616, -0.0146416539, -0.21760581, 0, 0, 0, 0 ] + - [ -1.0164764, 0.0149188388, 0.217768842, 0, 0, 0, 0, -1.01640877, -0.0150710644, -0.2183144, 0, 0, 0, 0 ] + - [ -1.0230298, 0.0153534593, 0.218468643, 0, 0, 0, 0, -1.02296118, -0.0155070543, -0.219017988, 0, 0, 0, 0 ] + - [ -1.02958832, 0.0157947008, 0.219163444, 0, 0, 0, 0, -1.0295187, -0.0159496686, -0.219716566, 0, 0, 0, 0 ] + - [ -1.03615183, 0.0162426084, 0.219853239, 0, 0, 0, 0, -1.03608121, -0.0163989525, -0.220410127, 0, 0, 0, 0 ] + - [ -1.04272023, 0.0166972272, 0.22053802, 0, 0, 0, 0, -1.04264861, -0.0168549513, -0.221098665, 0, 0, 0, 0 ] + - [ -1.04929338, 0.0171586025, 0.221217781, 0, 0, 0, 0, -1.04922076, -0.0173177099, -0.221782171, 0, 0, 0, 0 ] + - [ -1.05587117, 0.0176267795, 0.221892515, 0, 0, 0, 0, -1.05579755, -0.0177872737, -0.22246064, 0, 0, 0, 0 ] + - [ -1.06245348, 0.0181018033, 0.222562217, 0, 0, 0, 0, -1.06237885, -0.0182636877, -0.223134064, 0, 0, 0, 0 ] + - [ -1.06904018, 0.0185837191, 0.223226878, 0, 0, 0, 0, -1.06896454, -0.018746997, -0.223802437, 0, 0, 0, 0 ] + - [ -1.07563117, 0.0190725722, 0.223886493, 0, 0, 0, 0, -1.07555452, -0.019237247, -0.224465751, 0, 0, 0, 0 ] + - [ -1.0822263, 0.0195684076, 0.224541055, 0, 0, 0, 0, -1.08214864, -0.0197344826, -0.225124, 0, 0, 0, 0 ] + - [ -1.08882548, 0.0200712707, 0.225190557, 0, 0, 0, 0, -1.08874681, -0.0202387491, -0.225777176, 0, 0, 0, 0 ] + - [ -1.09542856, 0.0205812065, 0.225834993, 0, 0, 0, 0, -1.09534888, -0.0207500915, -0.226425273, 0, 0, 0, 0 ] + - [ -1.10203545, 0.0210982604, 0.226474355, 0, 0, 0, 0, -1.10195475, -0.0212685552, -0.227068284, 0, 0, 0, 0 ] + - [ -1.10864601, 0.0216224774, 0.227108638, 0, 0, 0, 0, -1.1085643, -0.0217941851, -0.227706202, 0, 0, 0, 0 ] + - [ -1.11526012, 0.0221539027, 0.227737835, 0, 0, 0, 0, -1.1151774, -0.0223270266, -0.228339019, 0, 0, 0, 0 ] + - [ -1.12187767, 0.0226925817, 0.228361939, 0, 0, 0, 0, -1.12179393, -0.0228671246, -0.22896673, 0, 0, 0, 0 ] + - [ -1.12849853, 0.0232385593, 0.228980943, 0, 0, 0, 0, -1.12841377, -0.0234145244, -0.229589326, 0, 0, 0, 0 ] + - [ -1.13512259, 0.0237918809, 0.229594841, 0, 0, 0, 0, -1.13503681, -0.0239692711, -0.230206801, 0, 0, 0, 0 ] + - [ -1.14174972, 0.0243525917, 0.230203626, 0, 0, 0, 0, -1.14166292, -0.0245314099, -0.230819149, 0, 0, 0, 0 ] + - [ -1.1483798, 0.0249207367, 0.230807291, 0, 0, 0, 0, -1.14829199, -0.025100986, -0.231426361, 0, 0, 0, 0 ] + - [ -1.15501271, 0.0254963612, 0.231405831, 0, 0, 0, 0, -1.15492388, -0.0256780444, -0.232028432, 0, 0, 0, 0 ] + - [ -1.16164834, 0.0260795105, 0.231999237, 0, 0, 0, 0, -1.16155849, -0.0262626304, -0.232625354, 0, 0, 0, 0 ] + - [ -1.16828656, 0.0266702296, 0.232587505, 0, 0, 0, 0, -1.16819569, -0.026854789, -0.233217121, 0, 0, 0, 0 ] + - [ -1.17492725, 0.0272685638, 0.233170626, 0, 0, 0, 0, -1.17483536, -0.0274545655, -0.233803724, 0, 0, 0, 0 ] + - [ -1.18157029, 0.0278745582, 0.233748594, 0, 0, 0, 0, -1.18147739, -0.028062005, -0.234385158, 0, 0, 0, 0 ] + - [ -1.18821557, 0.0284882581, 0.234321403, 0, 0, 0, 0, -1.18812164, -0.0286771526, -0.234961416, 0, 0, 0, 0 ] + - [ -1.19486295, 0.0291097087, 0.234889047, 0, 0, 0, 0, -1.19476801, -0.0293000536, -0.23553249, 0, 0, 0, 0 ] + - [ -1.20151233, 0.0297389551, 0.235451517, 0, 0, 0, 0, -1.20141636, -0.029930753, -0.236098374, 0, 0, 0, 0 ] + - [ -1.20816357, 0.0303760425, 0.236008809, 0, 0, 0, 0, -1.20806659, -0.030569296, -0.236659061, 0, 0, 0, 0 ] + - [ -1.21481657, 0.0310210161, 0.236560914, 0, 0, 0, 0, -1.21471856, -0.0312157278, -0.237214543, 0, 0, 0, 0 ] + - [ -1.2214712, 0.0316739211, 0.237107827, 0, 0, 0, 0, -1.22137217, -0.0318700935, -0.237764814, 0, 0, 0, 0 ] + - [ -1.22812733, 0.0323348028, 0.237649541, 0, 0, 0, 0, -1.22802728, -0.0325324382, -0.238309867, 0, 0, 0, 0 ] + - [ -1.23478485, 0.0330037062, 0.238186049, 0, 0, 0, 0, -1.23468379, -0.0332028072, -0.238849694, 0, 0, 0, 0 ] + - [ -1.24144365, 0.0336806766, 0.238717345, 0, 0, 0, 0, -1.24134156, -0.0338812456, -0.23938429, 0, 0, 0, 0 ] + - [ -1.24810359, 0.0343657591, 0.239243421, 0, 0, 0, 0, -1.24800049, -0.0345677984, -0.239913647, 0, 0, 0, 0 ] + - [ -1.25476455, 0.035058999, 0.239764272, 0, 0, 0, 0, -1.25466044, -0.035262511, -0.240437758, 0, 0, 0, 0 ] + - [ -1.26142643, 0.0357604415, 0.240279891, 0, 0, 0, 0, -1.2613213, -0.0359654284, -0.240956616, 0, 0, 0, 0 ] + - [ -1.26808909, 0.0364701317, 0.24079027, 0, 0, 0, 0, -1.26798295, -0.0366765958, -0.241470214, 0, 0, 0, 0 ] + - [ -1.27475243, 0.0371881148, 0.241295404, 0, 0, 0, 0, -1.27464526, -0.0373960583, -0.241978545, 0, 0, 0, 0 ] + - [ -1.2814163, 0.037914436, 0.241795286, 0, 0, 0, 0, -1.28130813, -0.0381238611, -0.242481603, 0, 0, 0, 0 ] + - [ -1.28808061, 0.0386491405, 0.242289909, 0, 0, 0, 0, -1.28797142, -0.0388600494, -0.24297938, 0, 0, 0, 0 ] + - [ -1.29474522, 0.0393922736, 0.242779266, 0, 0, 0, 0, -1.29463502, -0.0396046683, -0.243471869, 0, 0, 0, 0 ] + - [ -1.30141001, 0.0401438803, 0.243263351, 0, 0, 0, 0, -1.30129881, -0.0403577629, -0.243959064, 0, 0, 0, 0 ] + - [ -1.30807487, 0.0409040059, 0.243742158, 0, 0, 0, 0, -1.30796266, -0.0411193784, -0.244440958, 0, 0, 0, 0 ] + - [ -1.31473968, 0.0416726955, 0.244215679, 0, 0, 0, 0, -1.31462646, -0.04188956, -0.244917543, 0, 0, 0, 0 ] + - [ -1.32140431, 0.0424499944, 0.244683908, 0, 0, 0, 0, -1.32129008, -0.0426683528, -0.245388813, 0, 0, 0, 0 ] + - [ -1.32806865, 0.0432359478, 0.245146838, 0, 0, 0, 0, -1.32795342, -0.043455802, -0.24585476, 0, 0, 0, 0 ] + - [ -1.33473257, 0.0440306008, 0.245604463, 0, 0, 0, 0, -1.33461633, -0.0442519526, -0.246315379, 0, 0, 0, 0 ] + - [ -1.34139595, 0.0448339986, 0.246056775, 0, 0, 0, 0, -1.34127872, -0.04505685, -0.246770661, 0, 0, 0, 0 ] + - [ -1.34805868, 0.0456461865, 0.24650377, 0, 0, 0, 0, -1.34794045, -0.0458705392, -0.2472206, 0, 0, 0, 0 ] + - [ -1.35472063, 0.0464672095, 0.246945439, 0, 0, 0, 0, -1.3546014, -0.0466930653, -0.247665189, 0, 0, 0, 0 ] + - [ -1.36138169, 0.047297113, 0.247381776, 0, 0, 0, 0, -1.36126146, -0.0475244736, -0.248104421, 0, 0, 0, 0 ] + - [ -1.36804173, 0.048135942, 0.247812774, 0, 0, 0, 0, -1.3679205, -0.0483648092, -0.248538289, 0, 0, 0, 0 ] + - [ -1.37470063, 0.0489837418, 0.248238428, 0, 0, 0, 0, -1.37457841, -0.0492141172, -0.248966786, 0, 0, 0, 0 ] + - [ -1.38135827, 0.0498405576, 0.248658729, 0, 0, 0, 0, -1.38123506, -0.0500724428, -0.249389905, 0, 0, 0, 0 ] + - [ -1.38801453, 0.0507064345, 0.249073672, 0, 0, 0, 0, -1.38789034, -0.0509398312, -0.24980764, 0, 0, 0, 0 ] + - [ -1.3946693, 0.0515814178, 0.24948325, 0, 0, 0, 0, -1.39454412, -0.0518163274, -0.250219983, 0, 0, 0, 0 ] + - [ -1.40132244, 0.0524655526, 0.249887457, 0, 0, 0, 0, -1.40119628, -0.0527019767, -0.250626927, 0, 0, 0, 0 ] + - [ -1.40797385, 0.0533588842, 0.250286285, 0, 0, 0, 0, -1.40784671, -0.0535968242, -0.251028466, 0, 0, 0, 0 ] + - [ -1.41462339, 0.0542614576, 0.250679728, 0, 0, 0, 0, -1.41449528, -0.0545009151, -0.251424592, 0, 0, 0, 0 ] + - [ -1.42127096, 0.0551733182, 0.251067779, 0, 0, 0, 0, -1.42114187, -0.0554142945, -0.251815298, 0, 0, 0, 0 ] + - [ -1.42791643, 0.0560945111, 0.251450432, 0, 0, 0, 0, -1.42778636, -0.0563370075, -0.252200579, 0, 0, 0, 0 ] + - [ -1.43455968, 0.0570250815, 0.25182768, 0, 0, 0, 0, -1.43442864, -0.0572690994, -0.252580426, 0, 0, 0, 0 ] + - [ -1.44120058, 0.0579650745, 0.252199517, 0, 0, 0, 0, -1.44106858, -0.0582106152, -0.252954832, 0, 0, 0, 0 ] + - [ -1.44783903, 0.0589145354, 0.252565935, 0, 0, 0, 0, -1.44770606, -0.0591616001, -0.253323792, 0, 0, 0, 0 ] + - [ -1.45447489, 0.0598735094, 0.252926929, 0, 0, 0, 0, -1.45434096, -0.0601220993, -0.253687297, 0, 0, 0, 0 ] + - [ -1.46110805, 0.0608420416, 0.253282491, 0, 0, 0, 0, -1.46097316, -0.061092158, -0.254045341, 0, 0, 0, 0 ] + - [ -1.46773839, 0.0618201773, 0.253632615, 0, 0, 0, 0, -1.46760255, -0.0620718212, -0.254397917, 0, 0, 0, 0 ] + - [ -1.47436579, 0.0628079615, 0.253977295, 0, 0, 0, 0, -1.47422899, -0.0630611342, -0.254745018, 0, 0, 0, 0 ] + - [ -1.48099013, 0.0638054397, 0.254316523, 0, 0, 0, 0, -1.48085238, -0.064060142, -0.255086637, 0, 0, 0, 0 ] + - [ -1.48761128, 0.0648126568, 0.254650293, 0, 0, 0, 0, -1.48747259, -0.0650688899, -0.255422768, 0, 0, 0, 0 ] + - [ -1.49422913, 0.0658296581, 0.254978598, 0, 0, 0, 0, -1.49408949, -0.066087423, -0.255753402, 0, 0, 0, 0 ] + - [ -1.50084355, 0.0668564888, 0.255301432, 0, 0, 0, 0, -1.50070298, -0.0671157865, -0.256078534, 0, 0, 0, 0 ] + - [ -1.50745443, 0.0678931941, 0.255618788, 0, 0, 0, 0, -1.50731292, -0.0681540254, -0.256398156, 0, 0, 0, 0 ] + - [ -1.51406165, 0.0689398191, 0.25593066, 0, 0, 0, 0, -1.51391921, -0.069202185, -0.256712261, 0, 0, 0, 0 ] + - [ -1.52066508, 0.0699964091, 0.25623704, 0, 0, 0, 0, -1.52052171, -0.0702603104, -0.257020843, 0, 0, 0, 0 ] + - [ -1.52726461, 0.0710630093, 0.256537923, 0, 0, 0, 0, -1.52712032, -0.0713284468, -0.257323894, 0, 0, 0, 0 ] + - [ -1.53386011, 0.0721396648, 0.256833301, 0, 0, 0, 0, -1.5337149, -0.0724066393, -0.257621408, 0, 0, 0, 0 ] + - [ -1.54045147, 0.0732264209, 0.257123168, 0, 0, 0, 0, -1.54030534, -0.073494933, -0.257913377, 0, 0, 0, 0 ] + - [ -1.54703856, 0.0743233226, 0.257407517, 0, 0, 0, 0, -1.54689152, -0.0745933732, -0.258199795, 0, 0, 0, 0 ] + - [ -1.55362126, 0.0754304153, 0.257686342, 0, 0, 0, 0, -1.55347331, -0.0757020049, -0.258480655, 0, 0, 0, 0 ] + - [ -1.56019946, 0.0765477441, 0.257959636, 0, 0, 0, 0, -1.56005061, -0.0768208734, -0.258755949, 0, 0, 0, 0 ] + - [ -1.56677303, 0.0776753541, 0.258227392, 0, 0, 0, 0, -1.56662328, -0.0779500237, -0.259025672, 0, 0, 0, 0 ] + - [ -1.57334186, 0.0788132907, 0.258489604, 0, 0, 0, 0, -1.57319121, -0.0790895011, -0.259289815, 0, 0, 0, 0 ] + - [ -1.57990582, 0.0799615989, 0.258746265, 0, 0, 0, 0, -1.57975427, -0.0802393507, -0.259548372, 0, 0, 0, 0 ] + - [ -1.58646479, 0.0811203239, 0.258997369, 0, 0, 0, 0, -1.58631235, -0.0813996176, -0.259801336, 0, 0, 0, 0 ] + - [ -1.59301865, 0.0822895111, 0.259242908, 0, 0, 0, 0, -1.59286533, -0.082570347, -0.2600487, 0, 0, 0, 0 ] + - [ -1.59956728, 0.0834692054, 0.259482877, 0, 0, 0, 0, -1.59941309, -0.083751584, -0.260290457, 0, 0, 0, 0 ] + - [ -1.60611057, 0.0846594522, 0.259717268, 0, 0, 0, 0, -1.6059555, -0.0849433739, -0.260526601, 0, 0, 0, 0 ] + - [ -1.61264838, 0.0858602967, 0.259946074, 0, 0, 0, 0, -1.61249244, -0.0861457616, -0.260757123, 0, 0, 0, 0 ] + - [ -1.61918061, 0.0870717839, 0.26016929, 0, 0, 0, 0, -1.61902381, -0.0873587925, -0.260982018, 0, 0, 0, 0 ] + - [ -1.62570713, 0.0882939591, 0.260386909, 0, 0, 0, 0, -1.62554946, -0.0885825117, -0.261201279, 0, 0, 0, 0 ] + - [ -1.63222781, 0.0895268676, 0.260598924, 0, 0, 0, 0, -1.6320693, -0.0898169643, -0.261414897, 0, 0, 0, 0 ] + - [ -1.63874255, 0.0907705544, 0.260805328, 0, 0, 0, 0, -1.63858318, -0.0910621954, -0.261622868, 0, 0, 0, 0 ] + - [ -1.64525122, 0.0920250647, 0.261006115, 0, 0, 0, 0, -1.64509101, -0.0923182502, -0.261825182, 0, 0, 0, 0 ] + - [ -1.65175369, 0.0932904439, 0.261201277, 0, 0, 0, 0, -1.65159264, -0.093585174, -0.262021835, 0, 0, 0, 0 ] + - [ -1.65824986, 0.094566737, 0.26139081, 0, 0, 0, 0, -1.65808797, -0.0948630117, -0.262212817, 0, 0, 0, 0 ] + - [ -1.66473959, 0.0958539892, 0.261574705, 0, 0, 0, 0, -1.66457688, -0.0961518086, -0.262398124, 0, 0, 0, 0 ] + - [ -1.67122277, 0.0971522458, 0.261752956, 0, 0, 0, 0, -1.67105924, -0.0974516099, -0.262577747, 0, 0, 0, 0 ] + - [ -1.67769928, 0.0984615519, 0.261925556, 0, 0, 0, 0, -1.67753493, -0.0987624606, -0.26275168, 0, 0, 0, 0 ] + - [ -1.684169, 0.0997819527, 0.2620925, 0, 0, 0, 0, -1.68400383, -0.100084406, -0.262919917, 0, 0, 0, 0 ] + - [ -1.6906318, 0.101113493, 0.26225378, 0, 0, 0, 0, -1.69046583, -0.101417491, -0.263082448, 0, 0, 0, 0 ] + - [ -1.69708757, 0.102456219, 0.262409389, 0, 0, 0, 0, -1.6969208, -0.102761761, -0.263239269, 0, 0, 0, 0 ] + - [ -1.70353619, 0.103810175, 0.262559321, 0, 0, 0, 0, -1.70336862, -0.104117261, -0.263390372, 0, 0, 0, 0 ] + - [ -1.70997753, 0.105175407, 0.26270357, 0, 0, 0, 0, -1.70980918, -0.105484037, -0.263535751, 0, 0, 0, 0 ] + - [ -1.71641148, 0.106551959, 0.262842129, 0, 0, 0, 0, -1.71624234, -0.106862133, -0.263675397, 0, 0, 0, 0 ] + - [ -1.72283792, 0.107939877, 0.26297499, 0, 0, 0, 0, -1.722668, -0.108251594, -0.263809304, 0, 0, 0, 0 ] + - [ -1.72925672, 0.109339206, 0.263102148, 0, 0, 0, 0, -1.72908603, -0.109652466, -0.263937466, 0, 0, 0, 0 ] + - [ -1.73566777, 0.110749992, 0.263223595, 0, 0, 0, 0, -1.73549631, -0.111064794, -0.264059875, 0, 0, 0, 0 ] + - [ -1.74207094, 0.112172278, 0.263339326, 0, 0, 0, 0, -1.74189872, -0.112488623, -0.264176525, 0, 0, 0, 0 ] + - [ -1.74846611, 0.113606112, 0.263449333, 0, 0, 0, 0, -1.74829315, -0.113923998, -0.264287408, 0, 0, 0, 0 ] + - [ -1.75485317, 0.115051537, 0.263553611, 0, 0, 0, 0, -1.75467946, -0.115370965, -0.264392517, 0, 0, 0, 0 ] + - [ -1.761232, 0.116508599, 0.263652151, 0, 0, 0, 0, -1.76105754, -0.116829568, -0.264491846, 0, 0, 0, 0 ] + - [ -1.76760246, 0.117977344, 0.263744948, 0, 0, 0, 0, -1.76742728, -0.118299852, -0.264585388, 0, 0, 0, 0 ] + - [ -1.77396445, 0.119457815, 0.263831995, 0, 0, 0, 0, -1.77378854, -0.119781864, -0.264673135, 0, 0, 0, 0 ] + - [ -1.78031785, 0.12095006, 0.263913285, 0, 0, 0, 0, -1.78014121, -0.121275647, -0.264755081, 0, 0, 0, 0 ] + - [ -1.78666252, 0.122454122, 0.263988812, 0, 0, 0, 0, -1.78648517, -0.122781247, -0.264831219, 0, 0, 0, 0 ] + - [ -1.79299836, 0.123970047, 0.264058569, 0, 0, 0, 0, -1.79282031, -0.12429871, -0.264901542, 0, 0, 0, 0 ] + - [ -1.79932524, 0.12549788, 0.264122549, 0, 0, 0, 0, -1.79914649, -0.12582808, -0.264966043, 0, 0, 0, 0 ] + - [ -1.80564304, 0.127037666, 0.264180746, 0, 0, 0, 0, -1.80546359, -0.127369403, -0.265024714, 0, 0, 0, 0 ] + - [ -1.81195164, 0.128589451, 0.264233153, 0, 0, 0, 0, -1.81177151, -0.128922723, -0.26507755, 0, 0, 0, 0 ] + - [ -1.81825093, 0.13015328, 0.264279764, 0, 0, 0, 0, -1.81807012, -0.130488086, -0.265124543, 0, 0, 0, 0 ] + - [ -1.82454077, 0.131729198, 0.264320572, 0, 0, 0, 0, -1.82435929, -0.132065537, -0.265165686, 0, 0, 0, 0 ] + - [ -1.83082106, 0.133317249, 0.26435557, 0, 0, 0, 0, -1.83063891, -0.133655121, -0.265200972, 0, 0, 0, 0 ] + - [ -1.83709166, 0.13491748, 0.264384751, 0, 0, 0, 0, -1.83690886, -0.135256884, -0.265230395, 0, 0, 0, 0 ] + - [ -1.84335247, 0.136529936, 0.264408109, 0, 0, 0, 0, -1.84316901, -0.13687087, -0.265253946, 0, 0, 0, 0 ] + - [ -1.84960335, 0.138154661, 0.264425638, 0, 0, 0, 0, -1.84941925, -0.138497125, -0.265271621, 0, 0, 0, 0 ] + - [ -1.8558442, 0.139791701, 0.26443733, 0, 0, 0, 0, -1.85565946, -0.140135693, -0.26528341, 0, 0, 0, 0 ] + - [ -1.86207488, 0.141441101, 0.26444318, 0, 0, 0, 0, -1.86188952, -0.141786621, -0.265289308, 0, 0, 0, 0 ] + - [ -1.8683086, 0.143101947, 0.264439776, 0, 0, 0, 0, -1.86812262, -0.143448995, -0.265285883, 0, 0, 0, 0 ] + - [ -1.87462456, 0.144768592, 0.264406828, 0, 0, 0, 0, -1.87443795, -0.145117184, -0.265252718, 0, 0, 0, 0 ] + - [ -1.88103437, 0.146440286, 0.264341282, 0, 0, 0, 0, -1.88084712, -0.14679044, -0.265186737, 0, 0, 0, 0 ] + - [ -1.88753625, 0.148117245, 0.264243501, 0, 0, 0, 0, -1.88734836, -0.148468979, -0.265088308, 0, 0, 0, 0 ] + - [ -1.89412843, 0.149799685, 0.264113847, 0, 0, 0, 0, -1.89393988, -0.150153015, -0.264957797, 0, 0, 0, 0 ] + - [ -1.90080912, 0.151487823, 0.263952685, 0, 0, 0, 0, -1.90061991, -0.151842766, -0.264795569, 0, 0, 0, 0 ] + - [ -1.90757656, 0.153181874, 0.263760378, 0, 0, 0, 0, -1.90738667, -0.153538448, -0.26460199, 0, 0, 0, 0 ] + - [ -1.91442895, 0.154882055, 0.26353729, 0, 0, 0, 0, -1.91423838, -0.155240275, -0.264377428, 0, 0, 0, 0 ] + - [ -1.92136452, 0.156588582, 0.263283784, 0, 0, 0, 0, -1.92117326, -0.156948465, -0.264122247, 0, 0, 0, 0 ] + - [ -1.9283815, 0.15830167, 0.263000223, 0, 0, 0, 0, -1.92818954, -0.158663232, -0.263836814, 0, 0, 0, 0 ] + - [ -1.93547811, 0.160021537, 0.26268697, 0, 0, 0, 0, -1.93528544, -0.160384793, -0.263521494, 0, 0, 0, 0 ] + - [ -1.94265256, 0.161748397, 0.262344391, 0, 0, 0, 0, -1.94245918, -0.162113364, -0.263176655, 0, 0, 0, 0 ] + - [ -1.94990308, 0.163482468, 0.261972847, 0, 0, 0, 0, -1.94970898, -0.16384916, -0.262802662, 0, 0, 0, 0 ] + - [ -1.9572279, 0.165223966, 0.261572702, 0, 0, 0, 0, -1.95703306, -0.165592398, -0.262399882, 0, 0, 0, 0 ] + - [ -1.96462523, 0.166973106, 0.261144321, 0, 0, 0, 0, -1.96442966, -0.167343294, -0.261968679, 0, 0, 0, 0 ] + - [ -1.97209329, 0.168730105, 0.260688065, 0, 0, 0, 0, -1.97189698, -0.169102062, -0.261509421, 0, 0, 0, 0 ] + - [ -1.97963031, 0.170495179, 0.2602043, 0, 0, 0, 0, -1.97943325, -0.17086892, -0.261022474, 0, 0, 0, 0 ] + - [ -1.98723451, 0.172268544, 0.259693387, 0, 0, 0, 0, -1.98703669, -0.172644083, -0.260508203, 0, 0, 0, 0 ] + - [ -1.99490412, 0.174050416, 0.259155691, 0, 0, 0, 0, -1.99470553, -0.174427767, -0.259966974, 0, 0, 0, 0 ] + - [ -2.00263735, 0.175841011, 0.258591576, 0, 0, 0, 0, -2.00243799, -0.176220188, -0.259399155, 0, 0, 0, 0 ] + - [ -2.01043242, 0.177640546, 0.258001404, 0, 0, 0, 0, -2.01023229, -0.178021562, -0.25880511, 0, 0, 0, 0 ] + - [ -2.01828756, 0.179449236, 0.257385539, 0, 0, 0, 0, -2.01808665, -0.179832105, -0.258185206, 0, 0, 0, 0 ] + - [ -2.02620099, 0.181267298, 0.256744345, 0, 0, 0, 0, -2.02599929, -0.181652032, -0.257539809, 0, 0, 0, 0 ] + - [ -2.03417093, 0.183094948, 0.256078185, 0, 0, 0, 0, -2.03396844, -0.18348156, -0.256869285, 0, 0, 0, 0 ] + - [ -2.04219561, 0.184932402, 0.255387423, 0, 0, 0, 0, -2.04199231, -0.185320904, -0.256174001, 0, 0, 0, 0 ] + - [ -2.05027324, 0.186779876, 0.254672421, 0, 0, 0, 0, -2.05006914, -0.187170281, -0.255454321, 0, 0, 0, 0 ] + - [ -2.05840204, 0.188637586, 0.253933544, 0, 0, 0, 0, -2.05819714, -0.189029905, -0.254710613, 0, 0, 0, 0 ] + - [ -2.06658025, 0.190505749, 0.253171155, 0, 0, 0, 0, -2.06637453, -0.190899994, -0.253943243, 0, 0, 0, 0 ] + - [ -2.07480608, 0.192384581, 0.252385618, 0, 0, 0, 0, -2.07459954, -0.192780763, -0.253152576, 0, 0, 0, 0 ] + - [ -2.08307775, 0.194274297, 0.251577295, 0, 0, 0, 0, -2.08287039, -0.194672428, -0.252338979, 0, 0, 0, 0 ] + - [ -2.09139349, 0.196175114, 0.250746551, 0, 0, 0, 0, -2.0911853, -0.196575205, -0.251502817, 0, 0, 0, 0 ] + - [ -2.09975151, 0.198087247, 0.249893749, 0, 0, 0, 0, -2.09954249, -0.198489309, -0.250644457, 0, 0, 0, 0 ] + - [ -2.10815004, 0.200010914, 0.249019252, 0, 0, 0, 0, -2.10794019, -0.200414957, -0.249764265, 0, 0, 0, 0 ] + - [ -2.11658731, 0.201946331, 0.248123424, 0, 0, 0, 0, -2.11637661, -0.202352365, -0.248862607, 0, 0, 0, 0 ] + - [ -2.12506152, 0.203893713, 0.247206628, 0, 0, 0, 0, -2.12484998, -0.204301748, -0.247939849, 0, 0, 0, 0 ] + - [ -2.13357091, 0.205853276, 0.246269228, 0, 0, 0, 0, -2.13335853, -0.206263323, -0.246996357, 0, 0, 0, 0 ] + - [ -2.1421137, 0.207825237, 0.245311588, 0, 0, 0, 0, -2.14190046, -0.208237304, -0.246032497, 0, 0, 0, 0 ] + - [ -2.15068811, 0.209809812, 0.24433407, 0, 0, 0, 0, -2.15047402, -0.210223909, -0.245048636, 0, 0, 0, 0 ] + - [ -2.15929236, 0.211807216, 0.243337038, 0, 0, 0, 0, -2.15907741, -0.212223353, -0.244045139, 0, 0, 0, 0 ] + - [ -2.16792467, 0.213817667, 0.242320856, 0, 0, 0, 0, -2.16770886, -0.214235852, -0.243022372, 0, 0, 0, 0 ] + - [ -2.17658326, 0.21584138, 0.241285887, 0, 0, 0, 0, -2.17636659, -0.216261622, -0.241980703, 0, 0, 0, 0 ] + - [ -2.18526636, 0.217878572, 0.240232495, 0, 0, 0, 0, -2.18504883, -0.218300879, -0.240920495, 0, 0, 0, 0 ] + - [ -2.19397219, 0.219929458, 0.239161043, 0, 0, 0, 0, -2.19375379, -0.220353838, -0.239842117, 0, 0, 0, 0 ] + - [ -2.20269897, 0.221994255, 0.238071894, 0, 0, 0, 0, -2.2024797, -0.222420716, -0.238745933, 0, 0, 0, 0 ] + - [ -2.21144493, 0.224073178, 0.236965412, 0, 0, 0, 0, -2.21122478, -0.224501728, -0.23763231, 0, 0, 0, 0 ] + - [ -2.22020827, 0.226166444, 0.235841961, 0, 0, 0, 0, -2.21998726, -0.22659709, -0.236501615, 0, 0, 0, 0 ] + - [ -2.22898724, 0.22827427, 0.234701904, 0, 0, 0, 0, -2.22876535, -0.228707019, -0.235354212, 0, 0, 0, 0 ] + - [ -2.23778004, 0.230396871, 0.233545605, 0, 0, 0, 0, -2.23755728, -0.23083173, -0.234190469, 0, 0, 0, 0 ] + - [ -2.2465849, 0.232534463, 0.232373426, 0, 0, 0, 0, -2.24636126, -0.23297144, -0.23301075, 0, 0, 0, 0 ] + - [ -2.25540004, 0.234687262, 0.231185732, 0, 0, 0, 0, -2.25517553, -0.235126363, -0.231815424, 0, 0, 0, 0 ] + - [ -2.26422369, 0.236855486, 0.229982886, 0, 0, 0, 0, -2.2639983, -0.237296716, -0.230604854, 0, 0, 0, 0 ] + - [ -2.27305407, 0.239039349, 0.228765251, 0, 0, 0, 0, -2.27282779, -0.239482714, -0.229379408, 0, 0, 0, 0 ] + - [ -2.28188939, 0.241239068, 0.227533191, 0, 0, 0, 0, -2.28166224, -0.241684575, -0.228139452, 0, 0, 0, 0 ] + - [ -2.29072788, 0.243454859, 0.22628707, 0, 0, 0, 0, -2.29049985, -0.243902513, -0.226885352, 0, 0, 0, 0 ] + - [ -2.29956777, 0.245686938, 0.22502725, 0, 0, 0, 0, -2.29933885, -0.246136745, -0.225617473, 0, 0, 0, 0 ] + - [ -2.30840726, 0.247935522, 0.223754095, 0, 0, 0, 0, -2.30817747, -0.248387485, -0.224336182, 0, 0, 0, 0 ] + - [ -2.3172446, 0.250200826, 0.222467969, 0, 0, 0, 0, -2.31701392, -0.250654952, -0.223041845, 0, 0, 0, 0 ] + - [ -2.32607799, 0.252483067, 0.221169236, 0, 0, 0, 0, -2.32584644, -0.252939359, -0.221734828, 0, 0, 0, 0 ] + - [ -2.33490566, 0.25478246, 0.219858258, 0, 0, 0, 0, -2.33467323, -0.255240924, -0.220415498, 0, 0, 0, 0 ] + - [ -2.34372583, 0.257099222, 0.218535399, 0, 0, 0, 0, -2.34349252, -0.257559861, -0.219084219, 0, 0, 0, 0 ] + - [ -2.35253673, 0.25943357, 0.217201023, 0, 0, 0, 0, -2.35230254, -0.259896387, -0.217741359, 0, 0, 0, 0 ] + - [ -2.36133657, 0.261785718, 0.215855493, 0, 0, 0, 0, -2.36110151, -0.262250719, -0.216387284, 0, 0, 0, 0 ] + - [ -2.37012358, 0.264155884, 0.214499173, 0, 0, 0, 0, -2.36988764, -0.264623071, -0.215022358, 0, 0, 0, 0 ] + - [ -2.37889598, 0.266544284, 0.213132426, 0, 0, 0, 0, -2.37865917, -0.267013659, -0.21364695, 0, 0, 0, 0 ] + - [ -2.38765199, 0.268951133, 0.211755615, 0, 0, 0, 0, -2.38741431, -0.2694227, -0.212261424, 0, 0, 0, 0 ] + - [ -2.39638984, 0.271376647, 0.210369105, 0, 0, 0, 0, -2.39615128, -0.271850409, -0.210866147, 0, 0, 0, 0 ] + - [ -2.40510774, 0.273821044, 0.208973257, 0, 0, 0, 0, -2.40486832, -0.274297003, -0.209461484, 0, 0, 0, 0 ] + - [ -2.41380391, 0.276284539, 0.207568437, 0, 0, 0, 0, -2.41356363, -0.276762697, -0.208047803, 0, 0, 0, 0 ] + - [ -2.42247659, 0.278767348, 0.206155008, 0, 0, 0, 0, -2.42223544, -0.279247707, -0.206625468, 0, 0, 0, 0 ] + - [ -2.43112399, 0.281269687, 0.204733332, 0, 0, 0, 0, -2.43088198, -0.281752249, -0.205194847, 0, 0, 0, 0 ] + - [ -2.43974433, 0.283791772, 0.203303774, 0, 0, 0, 0, -2.43950146, -0.284276539, -0.203756305, 0, 0, 0, 0 ] + - [ -2.44833583, 0.28633382, 0.201866696, 0, 0, 0, 0, -2.44809211, -0.286820793, -0.202310208, 0, 0, 0, 0 ] + - [ -2.45689673, 0.288896047, 0.200422463, 0, 0, 0, 0, -2.45665215, -0.289385226, -0.200856922, 0, 0, 0, 0 ] + - [ -2.46542523, 0.291478669, 0.198971438, 0, 0, 0, 0, -2.4651798, -0.291970055, -0.199396814, 0, 0, 0, 0 ] + - [ -2.47391956, 0.294081902, 0.197513984, 0, 0, 0, 0, -2.47367329, -0.294575496, -0.19793025, 0, 0, 0, 0 ] + - [ -2.48237794, 0.296705962, 0.196050465, 0, 0, 0, 0, -2.48213083, -0.297201764, -0.196457595, 0, 0, 0, 0 ] + - [ -2.4907986, 0.299351065, 0.194581244, 0, 0, 0, 0, -2.49055065, -0.299849075, -0.194979216, 0, 0, 0, 0 ] + - [ -2.49917976, 0.302017427, 0.193106684, 0, 0, 0, 0, -2.49893097, -0.302517646, -0.193495479, 0, 0, 0, 0 ] + - [ -2.50751964, 0.304705266, 0.19162715, 0, 0, 0, 0, -2.50727002, -0.305207692, -0.192006749, 0, 0, 0, 0 ] + - [ -2.51581645, 0.307414795, 0.190143005, 0, 0, 0, 0, -2.51556601, -0.307919428, -0.190513394, 0, 0, 0, 0 ] + - [ -2.52406843, 0.310146233, 0.188654612, 0, 0, 0, 0, -2.52381717, -0.310653072, -0.189015778, 0, 0, 0, 0 ] + - [ -2.53227379, 0.312899795, 0.187162334, 0, 0, 0, 0, -2.53202171, -0.313408839, -0.187514269, 0, 0, 0, 0 ] + - [ -2.54043076, 0.315675697, 0.185666536, 0, 0, 0, 0, -2.54017787, -0.316186944, -0.186009232, 0, 0, 0, 0 ] + - [ -2.54853756, 0.318474155, 0.18416758, 0, 0, 0, 0, -2.54828386, -0.318987604, -0.184501033, 0, 0, 0, 0 ] + - [ -2.55659241, 0.321295385, 0.18266583, 0, 0, 0, 0, -2.55633791, -0.321811034, -0.182990039, 0, 0, 0, 0 ] + - [ -2.56459353, 0.324139604, 0.18116165, 0, 0, 0, 0, -2.56433823, -0.324657451, -0.181476615, 0, 0, 0, 0 ] + - [ -2.57253915, 0.327007028, 0.179655403, 0, 0, 0, 0, -2.57228306, -0.32752707, -0.179961128, 0, 0, 0, 0 ] + - [ -2.58042748, 0.329897872, 0.178147452, 0, 0, 0, 0, -2.5801706, -0.330420108, -0.178443943, 0, 0, 0, 0 ] + - [ -2.58825675, 0.332812354, 0.176638161, 0, 0, 0, 0, -2.5879991, -0.333336779, -0.176925428, 0, 0, 0, 0 ] + - [ -2.59602518, 0.335750688, 0.175127894, 0, 0, 0, 0, -2.59576675, -0.336277301, -0.175405947, 0, 0, 0, 0 ] + - [ -2.60373099, 0.338713092, 0.173617013, 0, 0, 0, 0, -2.6034718, -0.339241888, -0.173885867, 0, 0, 0, 0 ] + - [ -2.61137241, 0.341699781, 0.172105883, 0, 0, 0, 0, -2.61111245, -0.342230758, -0.172365554, 0, 0, 0, 0 ] + - [ -2.61894765, 0.344710972, 0.170594867, 0, 0, 0, 0, -2.61868694, -0.345244125, -0.170845374, 0, 0, 0, 0 ] + - [ -2.62645494, 0.34774688, 0.169084328, 0, 0, 0, 0, -2.62619348, -0.348282206, -0.169325693, 0, 0, 0, 0 ] + - [ -2.6338925, 0.350807722, 0.167574629, 0, 0, 0, 0, -2.6336303, -0.351345216, -0.167806878, 0, 0, 0, 0 ] + - [ -2.64125856, 0.353893714, 0.166066136, 0, 0, 0, 0, -2.64099562, -0.354433372, -0.166289294, 0, 0, 0, 0 ] + - [ -2.64855132, 0.357005073, 0.164559209, 0, 0, 0, 0, -2.64828766, -0.357546889, -0.164773307, 0, 0, 0, 0 ] + - [ -2.65576902, 0.360142013, 0.163054214, 0, 0, 0, 0, -2.65550465, -0.360685983, -0.163259284, 0, 0, 0, 0 ] + - [ -2.66290988, 0.363304752, 0.161551514, 0, 0, 0, 0, -2.6626448, -0.363850871, -0.161747591, 0, 0, 0, 0 ] + - [ -2.66997212, 0.366493505, 0.160051472, 0, 0, 0, 0, -2.66970633, -0.367041768, -0.160238593, 0, 0, 0, 0 ] + - [ -2.67695396, 0.369708489, 0.158554452, 0, 0, 0, 0, -2.67668748, -0.370258889, -0.158732657, 0, 0, 0, 0 ] + - [ -2.68385363, 0.37294992, 0.157060817, 0, 0, 0, 0, -2.68358646, -0.373502452, -0.157230149, 0, 0, 0, 0 ] + - [ -2.69066934, 0.376218013, 0.15557093, 0, 0, 0, 0, -2.69040149, -0.376772671, -0.155731436, 0, 0, 0, 0 ] + - [ -2.69739932, 0.379512986, 0.154085155, 0, 0, 0, 0, -2.69713079, -0.380069763, -0.154236882, 0, 0, 0, 0 ] + - [ -2.70404178, 0.382835054, 0.152603856, 0, 0, 0, 0, -2.7037726, -0.383393943, -0.152746854, 0, 0, 0, 0 ] + - [ -2.71059496, 0.386184433, 0.151127396, 0, 0, 0, 0, -2.71032513, -0.386745428, -0.151261718, 0, 0, 0, 0 ] + - [ -2.71705707, 0.38956134, 0.149656139, 0, 0, 0, 0, -2.7167866, -0.390124434, -0.149781841, 0, 0, 0, 0 ] + - [ -2.72342634, 0.39296599, 0.148190447, 0, 0, 0, 0, -2.72315523, -0.393531175, -0.148307589, 0, 0, 0, 0 ] + - [ -2.72970099, 0.3963986, 0.146730685, 0, 0, 0, 0, -2.72942925, -0.396965869, -0.146839326, 0, 0, 0, 0 ] + - [ -2.73587923, 0.399859386, 0.145277216, 0, 0, 0, 0, -2.73560688, -0.400428731, -0.145377421, 0, 0, 0, 0 ] + - [ -2.74195929, 0.403348564, 0.143830403, 0, 0, 0, 0, -2.74168634, -0.403919977, -0.143922238, 0, 0, 0, 0 ] + - [ -2.7479394, 0.40686635, 0.14239061, 0, 0, 0, 0, -2.74766585, -0.407439822, -0.142474144, 0, 0, 0, 0 ] + - [ -2.75381777, 0.41041296, 0.140958201, 0, 0, 0, 0, -2.75354364, -0.410988484, -0.141033504, 0, 0, 0, 0 ] + - [ -2.75959263, 0.413988611, 0.139533538, 0, 0, 0, 0, -2.75931792, -0.414566177, -0.139600686, 0, 0, 0, 0 ] + - [ -2.7652622, 0.417593519, 0.138116986, 0, 0, 0, 0, -2.76498693, -0.418173118, -0.138176055, 0, 0, 0, 0 ] + - [ -2.7708247, 0.421227899, 0.136708907, 0, 0, 0, 0, -2.77054887, -0.421809522, -0.136759976, 0, 0, 0, 0 ] + - [ -2.77627836, 0.424891968, 0.135309666, 0, 0, 0, 0, -2.77600198, -0.425475606, -0.135352817, 0, 0, 0, 0 ] + - [ -2.78162138, 0.428585942, 0.133919625, 0, 0, 0, 0, -2.78134448, -0.429171585, -0.133954944, 0, 0, 0, 0 ] + - [ -2.78685201, 0.432310038, 0.132539149, 0, 0, 0, 0, -2.78657458, -0.432897675, -0.132566721, 0, 0, 0, 0 ] + - [ -2.79196845, 0.43606447, 0.1311686, 0, 0, 0, 0, -2.79169051, -0.436654092, -0.131188516, 0, 0, 0, 0 ] + - [ -2.79696893, 0.439849456, 0.129808342, 0, 0, 0, 0, -2.7966905, -0.440441052, -0.129820695, 0, 0, 0, 0 ] + - [ -2.80185168, 0.443665212, 0.128458739, 0, 0, 0, 0, -2.80157276, -0.444258771, -0.128463623, 0, 0, 0, 0 ] + - [ -2.80661491, 0.447511953, 0.127120154, 0, 0, 0, 0, -2.80633551, -0.448107465, -0.127117667, 0, 0, 0, 0 ] + - [ -2.81125685, 0.451389897, 0.125792951, 0, 0, 0, 0, -2.81097699, -0.45198735, -0.125783193, 0, 0, 0, 0 ] + - [ -2.81577571, 0.455299258, 0.124477493, 0, 0, 0, 0, -2.81549541, -0.455898641, -0.124460567, 0, 0, 0, 0 ] + - [ -2.82016973, 0.459240253, 0.123174143, 0, 0, 0, 0, -2.81988898, -0.459841555, -0.123150155, 0, 0, 0, 0 ] + - [ -2.82443712, 0.463213099, 0.121883265, 0, 0, 0, 0, -2.82415595, -0.463816307, -0.121852323, 0, 0, 0, 0 ] + - [ -2.8285761, 0.467218011, 0.120605223, 0, 0, 0, 0, -2.82829452, -0.467823113, -0.120567437, 0, 0, 0, 0 ] + - [ -2.8325849, 0.471255205, 0.11934038, 0, 0, 0, 0, -2.83230292, -0.47186219, -0.119295863, 0, 0, 0, 0 ] + - [ -2.83646173, 0.475324899, 0.118089099, 0, 0, 0, 0, -2.83617937, -0.475933753, -0.118037967, 0, 0, 0, 0 ] + - [ -2.84020483, 0.479427307, 0.116851744, 0, 0, 0, 0, -2.83992209, -0.480038017, -0.116794117, 0, 0, 0, 0 ] + - [ -2.84381241, 0.483562646, 0.115628678, 0, 0, 0, 0, -2.84352931, -0.4841752, -0.115564676, 0, 0, 0, 0 ] + - [ -2.84728269, 0.487731132, 0.114420265, 0, 0, 0, 0, -2.84699925, -0.488345517, -0.114350012, 0, 0, 0, 0 ] + - [ -2.8506139, 0.491932981, 0.113226869, 0, 0, 0, 0, -2.85033013, -0.492549183, -0.113150491, 0, 0, 0, 0 ] + - [ -2.85380426, 0.49616841, 0.112048852, 0, 0, 0, 0, -2.85352017, -0.496786415, -0.111966479, 0, 0, 0, 0 ] + - [ -2.85685199, 0.500437635, 0.110886579, 0, 0, 0, 0, -2.85656759, -0.501057428, -0.110798341, 0, 0, 0, 0 ] + - [ -2.85975531, 0.504740871, 0.109740412, 0, 0, 0, 0, -2.85947062, -0.505362439, -0.109646444, 0, 0, 0, 0 ] + - [ -2.86251244, 0.509078335, 0.108610715, 0, 0, 0, 0, -2.86222748, -0.509701663, -0.108511155, 0, 0, 0, 0 ] + - [ -2.86512161, 0.513450242, 0.107497853, 0, 0, 0, 0, -2.86483639, -0.514075316, -0.107392838, 0, 0, 0, 0 ] + - [ -2.86758103, 0.51785681, 0.106402187, 0, 0, 0, 0, -2.86729557, -0.518483615, -0.106291861, 0, 0, 0, 0 ] + - [ -2.86988894, 0.522298254, 0.105324082, 0, 0, 0, 0, -2.86960325, -0.522926774, -0.105208589, 0, 0, 0, 0 ] + - [ -2.87204355, 0.526774791, 0.104263901, 0, 0, 0, 0, -2.87175764, -0.52740501, -0.104143389, 0, 0, 0, 0 ] + - [ -2.87404308, 0.531286636, 0.103222008, 0, 0, 0, 0, -2.87375697, -0.53191854, -0.103096626, 0, 0, 0, 0 ] + - [ -2.87588576, 0.535834006, 0.102198766, 0, 0, 0, 0, -2.87559947, -0.536467578, -0.102068666, 0, 0, 0, 0 ] + - [ -2.8775698, 0.540417116, 0.101194538, 0, 0, 0, 0, -2.87728334, -0.54105234, -0.101059876, 0, 0, 0, 0 ] + - [ -2.87909343, 0.545036184, 0.100209689, 0, 0, 0, 0, -2.87880682, -0.545673043, -0.100070622, 0, 0, 0, 0 ] + - [ -2.88045488, 0.549691424, 0.0992445808, 0, 0, 0, 0, -2.88016813, -0.550329903, -0.09910127, 0, 0, 0, 0 ] + - [ -2.88165236, 0.554383054, 0.0982995777, 0, 0, 0, 0, -2.88136549, -0.555023135, -0.0981521856, 0, 0, 0, 0 ] + - [ -2.88268409, 0.559111289, 0.097375043, 0, 0, 0, 0, -2.88239712, -0.559752955, -0.0972237353, 0, 0, 0, 0 ] + - [ -2.8835483, 0.563876345, 0.0964713403, 0, 0, 0, 0, -2.88326125, -0.564519579, -0.096316285, 0, 0, 0, 0 ] + - [ -2.88424321, 0.56867844, 0.0955888329, 0, 0, 0, 0, -2.88395609, -0.569323224, -0.0954302008, 0, 0, 0, 0 ] + - [ -2.88476704, 0.573517787, 0.0947278844, 0, 0, 0, 0, -2.88447987, -0.574164104, -0.094565849, 0, 0, 0, 0 ] + - [ -2.88511802, 0.578394605, 0.0938888583, 0, 0, 0, 0, -2.88483081, -0.579042436, -0.0937235955, 0, 0, 0, 0 ] + - [ -2.88529435, 0.583309109, 0.093072118, 0, 0, 0, 0, -2.88500713, -0.583958436, -0.0929038064, 0, 0, 0, 0 ] + - [ -2.88531648, 0.588270977, 0.0922753826, -1.79714436e-05, 0, 0, 0, -2.88502925, -0.588921784, -0.0921041911, -1.79606143e-05, 0, 0, 0 ] + - [ -2.88531648, 0.593336582, 0.0914830216, -0.000161191909, 0, 0, 0, -2.88502925, -0.593988866, -0.0913090471, -0.000161094777, 0, 0, 0 ] + - [ -2.88531648, 0.598514033, 0.0906924286, -0.000446224515, 0, 0, 0, -2.88502925, -0.599167794, -0.0905157547, -0.000445955627, 0, 0, 0 ] + - [ -2.88531648, 0.603801909, 0.0899036272, -0.000871599706, 0, 0, 0, -2.88502925, -0.604457147, -0.0897243371, -0.000871074494, 0, 0, 0 ] + - [ -2.88531648, 0.609198789, 0.089116641, -0.00143584793, 0, 0, 0, -2.88502925, -0.609855504, -0.0889348171, -0.00143498271, 0, 0, 0 ] + - [ -2.88531648, 0.614703253, 0.0883314937, -0.00213749962, 0, 0, 0, -2.88502925, -0.615361444, -0.0881472176, -0.0021362116, 0, 0, 0 ] + - [ -2.88531649, 0.62031388, 0.087548209, -0.00297508523, 0, 0, 0, -2.88502925, -0.620973546, -0.0873615617, -0.00297329249, 0, 0, 0 ] + - [ -2.88531649, 0.626029248, 0.0867668106, -0.0039471352, 0, 0, 0, -2.88502925, -0.626690389, -0.0865778723, -0.00394475672, 0, 0, 0 ] + - [ -2.88531649, 0.631847937, 0.085987322, -0.00505217998, 0, 0, 0, -2.88502925, -0.632510553, -0.0857961723, -0.00504913562, 0, 0, 0 ] + - [ -2.88531649, 0.637768526, 0.085209767, -0.00628875001, 0, 0, 0, -2.88502925, -0.638432616, -0.0850164846, -0.00628496051, 0, 0, 0 ] + - [ -2.88531649, 0.643789594, 0.0844341693, -0.00765537573, 0, 0, 0, -2.88502925, -0.644455157, -0.0842388323, -0.00765076272, 0, 0, 0 ] + - [ -2.8853165, 0.649909721, 0.0836605524, -0.00915058759, 0, 0, 0, -2.88502925, -0.650576755, -0.0834632382, -0.00914507359, 0, 0, 0 ] + - [ -2.8853165, 0.656127485, 0.0828889402, -0.010772916, 0, 0, 0, -2.88502925, -0.65679599, -0.0826897254, -0.0107664244, 0, 0, 0 ] + - [ -2.8853165, 0.662441465, 0.0821193561, -0.0125208915, 0, 0, 0, -2.88502925, -0.663111441, -0.0819183167, -0.0125133466, 0, 0, 0 ] + - [ -2.88531651, 0.668850242, 0.0813518239, -0.0143930444, 0, 0, 0, -2.88502925, -0.669521686, -0.0811490352, -0.0143843714, 0, 0, 0 ] + - [ -2.88531651, 0.675352393, 0.0805863673, -0.0163879053, 0, 0, 0, -2.88502925, -0.676025304, -0.0803819036, -0.0163780302, 0, 0, 0 ] + - [ -2.88531651, 0.681946498, 0.0798230099, -0.0185040045, 0, 0, 0, -2.88502925, -0.682620876, -0.0796169451, -0.0184928543, 0, 0, 0 ] + - [ -2.88531652, 0.688631136, 0.0790617754, -0.0207398725, 0, 0, 0, -2.88502925, -0.689306979, -0.0788541826, -0.020727375, 0, 0, 0 ] + - [ -2.88531652, 0.695404886, 0.0783026875, -0.0230940398, 0, 0, 0, -2.88502925, -0.696082193, -0.0780936389, -0.0230801237, 0, 0, 0 ] + - [ -2.88531653, 0.702266328, 0.0775457698, -0.0255650367, 0, 0, 0, -2.88502925, -0.702945097, -0.0773353371, -0.0255496316, 0, 0, 0 ] + - [ -2.88531653, 0.70921404, 0.0767910459, -0.0281513938, 0, 0, 0, -2.88502925, -0.70989427, -0.0765793001, -0.0281344302, 0, 0, 0 ] + - [ -2.88531653, 0.716246602, 0.0760385396, -0.0308516415, 0, 0, 0, -2.88502925, -0.716928291, -0.0758255508, -0.0308330508, 0, 0, 0 ] + - [ -2.88531654, 0.723362593, 0.0752882746, -0.0336643102, 0, 0, 0, -2.88502925, -0.724045738, -0.0750741122, -0.0336440246, 0, 0, 0 ] + - [ -2.88531654, 0.730560591, 0.0745402743, -0.0365879304, 0, 0, 0, -2.88502925, -0.731245192, -0.0743250073, -0.036565883, 0, 0, 0 ] + - [ -2.88531655, 0.737839177, 0.0737945627, -0.0396210324, 0, 0, 0, -2.88502925, -0.738525232, -0.0735782589, -0.0395971574, 0, 0, 0 ] + - [ -2.88531656, 0.745196928, 0.0730511632, -0.0427621469, 0, 0, 0, -2.88502925, -0.745884435, -0.0728338901, -0.042736379, 0, 0, 0 ] + - [ -2.88531656, 0.752632426, 0.0723100996, -0.0460098041, 0, 0, 0, -2.88502925, -0.753321382, -0.0720919238, -0.0459820793, 0, 0, 0 ] + - [ -2.88531657, 0.760144247, 0.0715713956, -0.0493625346, 0, 0, 0, -2.88502925, -0.760834651, -0.0713523829, -0.0493327895, 0, 0, 0 ] + - [ -2.88531657, 0.767730972, 0.0708350747, -0.0528188687, 0, 0, 0, -2.88502925, -0.768422821, -0.0706152904, -0.0527870409, 0, 0, 0 ] + - [ -2.88531658, 0.77539118, 0.0701011607, -0.056377337, 0, 0, 0, -2.88502925, -0.776084472, -0.0698806692, -0.0563433649, 0, 0, 0 ] + - [ -2.88531659, 0.78312345, 0.0693696772, -0.0600364699, 0, 0, 0, -2.88502925, -0.783818183, -0.0691485422, -0.0600002928, 0, 0, 0 ] + - [ -2.88531659, 0.790926361, 0.068640648, -0.0637947978, 0, 0, 0, -2.88502925, -0.791622532, -0.0684189325, -0.063756356, 0, 0, 0 ] + - [ -2.8853166, 0.798798491, 0.0679140965, -0.0676508511, 0, 0, 0, -2.88502925, -0.799496099, -0.067691863, -0.0676100858, 0, 0, 0 ] + - [ -2.88531661, 0.806738422, 0.0671900466, -0.0716031604, 0, 0, 0, -2.88502925, -0.807437462, -0.0669673565, -0.0715600134, 0, 0, 0 ] + - [ -2.88531661, 0.81474473, 0.0664685219, -0.075650256, 0, 0, 0, -2.88502925, -0.815445201, -0.0662454362, -0.0756046703, 0, 0, 0 ] + - [ -2.88531662, 0.822815996, 0.0657495461, -0.0797906684, 0, 0, 0, -2.88502925, -0.823517896, -0.0655261248, -0.0797425878, 0, 0, 0 ] + - [ -2.88531663, 0.830950799, 0.0650331428, -0.0840229281, 0, 0, 0, -2.88502925, -0.831654124, -0.0648094454, -0.0839722972, 0, 0, 0 ] + - [ -2.88531664, 0.839147718, 0.0643193356, -0.0883455654, 0, 0, 0, -2.88502925, -0.839852464, -0.064095421, -0.0882923297, 0, 0, 0 ] + - [ -2.88531664, 0.847405331, 0.0636081483, -0.0927571109, 0, 0, 0, -2.88502925, -0.848111497, -0.0633840743, -0.0927012169, 0, 0, 0 ] + - [ -2.88531665, 0.855722219, 0.0628996045, -0.097256095, 0, 0, 0, -2.88502925, -0.856429802, -0.0626754285, -0.0971974899, 0, 0, 0 ] + - [ -2.88531666, 0.86409696, 0.0621937279, -0.101841048, 0, 0, 0, -2.88502925, -0.864805956, -0.0619695064, -0.10177968, 0, 0, 0 ] + - [ -2.88531667, 0.872528133, 0.0614905421, -0.106510501, 0, 0, 0, -2.88502925, -0.873238539, -0.0612663311, -0.106446319, 0, 0, 0 ] + - [ -2.88531668, 0.881014318, 0.0607900708, -0.111262983, 0, 0, 0, -2.88502925, -0.881726131, -0.0605659253, -0.111195938, 0, 0, 0 ] + - [ -2.88531669, 0.889554093, 0.0600923377, -0.116097026, 0, 0, 0, -2.88502925, -0.89026731, -0.0598683122, -0.116027067, 0, 0, 0 ] + - [ -2.88531669, 0.898146038, 0.0593973665, -0.121011159, 0, 0, 0, -2.88502925, -0.898860655, -0.0591735146, -0.12093824, 0, 0, 0 ] + - [ -2.8853167, 0.906788732, 0.0587051807, -0.126003914, 0, 0, 0, -2.88502925, -0.907504746, -0.0584815555, -0.125927986, 0, 0, 0 ] + - [ -2.88531671, 0.915480754, 0.0580158041, -0.131073821, 0, 0, 0, -2.88502925, -0.916198161, -0.0577924578, -0.130994838, 0, 0, 0 ] + - [ -2.88531672, 0.924220683, 0.0573292603, -0.136219409, 0, 0, 0, -2.88502925, -0.92493948, -0.0571062445, -0.136137326, 0, 0, 0 ] + - [ -2.88531673, 0.933007099, 0.056645573, -0.14143921, 0, 0, 0, -2.88502925, -0.933727281, -0.0564229386, -0.141353981, 0, 0, 0 ] + - [ -2.88531674, 0.94183858, 0.0559647659, -0.146731755, 0, 0, 0, -2.88502925, -0.942560144, -0.0557425629, -0.146643336, 0, 0, 0 ] + - [ -2.88531675, 0.950713705, 0.0552868626, -0.152095572, 0, 0, 0, -2.88502925, -0.951436648, -0.0550651405, -0.152003922, 0, 0, 0 ] + - [ -2.88531676, 0.959631055, 0.0546118868, -0.157529194, 0, 0, 0, -2.88502925, -0.960355372, -0.0543906942, -0.157434269, 0, 0, 0 ] + - [ -2.88531677, 0.968589207, 0.0539398621, -0.16303115, 0, 0, 0, -2.88502925, -0.969314894, -0.0537192471, -0.16293291, 0, 0, 0 ] + - [ -2.88531678, 0.977586741, 0.0532708123, -0.168599971, 0, 0, 0, -2.88502925, -0.978313795, -0.053050822, -0.168498375, 0, 0, 0 ] + - [ -2.88531679, 0.986622236, 0.0526047609, -0.174234187, 0, 0, 0, -2.88502925, -0.987350652, -0.0523854419, -0.174129196, 0, 0, 0 ] + - [ -2.8853168, 0.995694272, 0.0519417317, -0.179932328, 0, 0, 0, -2.88502925, -0.996424045, -0.0517231298, -0.179823904, 0, 0, 0 ] + - [ -2.88531681, 1.00480143, 0.0512817483, -0.185692926, 0, 0, 0, -2.88502925, -1.00553255, -0.0510639087, -0.18558103, 0, 0, 0 ] + - [ -2.88531682, 1.01394228, 0.0506248344, -0.19151451, 0, 0, 0, -2.88502925, -1.01467476, -0.0504078013, -0.191399107, 0, 0, 0 ] + - [ -2.88531683, 1.02311541, 0.0499710136, -0.197395612, 0, 0, 0, -2.88502925, -1.02384923, -0.0497548308, -0.197276664, 0, 0, 0 ] + - [ -2.88531684, 1.0323194, 0.0493203096, -0.20333476, 0, 0, 0, -2.88502925, -1.03305456, -0.0491050201, -0.203212234, 0, 0, 0 ] + - [ -2.88531685, 1.04155282, 0.0486727461, -0.209330487, 0, 0, 0, -2.88502925, -1.04228932, -0.0484583921, -0.209204348, 0, 0, 0 ] + - [ -2.88531686, 1.05081426, 0.0480283468, -0.215381322, 0, 0, 0, -2.88502925, -1.05155209, -0.0478149697, -0.215251537, 0, 0, 0 ] + - [ -2.88531687, 1.06010229, 0.0473871352, -0.221485796, 0, 0, 0, -2.88502925, -1.06084145, -0.0471747759, -0.221352332, 0, 0, 0 ] + - [ -2.88531688, 1.0694155, 0.0467491351, -0.227642439, 0, 0, 0, -2.88502925, -1.07015598, -0.0465378336, -0.227505265, 0, 0, 0 ] + - [ -2.88531689, 1.07875246, 0.0461143701, -0.233849782, 0, 0, 0, -2.88502925, -1.07949425, -0.0459041659, -0.233708867, 0, 0, 0 ] + - [ -2.8853169, 1.08811175, 0.0454828639, -0.240106355, 0, 0, 0, -2.88502925, -1.08885485, -0.0452737956, -0.23996167, 0, 0, 0 ] + - [ -2.88531692, 1.09749195, 0.0448546402, -0.246410688, 0, 0, 0, -2.88502925, -1.09823636, -0.0446467457, -0.246262205, 0, 0, 0 ] + - [ -2.88531693, 1.10689164, 0.0442297226, -0.252761312, 0, 0, 0, -2.88502925, -1.10763735, -0.0440230391, -0.252609002, 0, 0, 0 ] + - [ -2.88531694, 1.1163094, 0.0436081348, -0.259156758, 0, 0, 0, -2.88502925, -1.11705641, -0.0434026988, -0.259000594, 0, 0, 0 ] + - [ -2.88531695, 1.12574381, 0.0429899004, -0.265595556, 0, 0, 0, -2.88502925, -1.12649211, -0.0427857478, -0.265435512, 0, 0, 0 ] + - [ -2.88531696, 1.13519345, 0.0423750432, -0.272076236, 0, 0, 0, -2.88502925, -1.13594303, -0.0421722089, -0.271912287, 0, 0, 0 ] + - [ -2.88531697, 1.14465689, 0.0417635867, -0.278597329, 0, 0, 0, -2.88502925, -1.14540775, -0.0415621052, -0.278429451, 0, 0, 0 ] + - [ -2.88531698, 1.15413272, 0.0411555547, -0.285157365, 0, 0, 0, -2.88502925, -1.15488485, -0.0409554595, -0.284985534, 0, 0, 0 ] + - [ -2.885317, 1.16361951, 0.0405509708, -0.291754875, 0, 0, 0, -2.88502925, -1.16437292, -0.0403522949, -0.291579068, 0, 0, 0 ] + - [ -2.88531701, 1.17311585, 0.0399498587, -0.298388389, 0, 0, 0, -2.88502925, -1.17387051, -0.0397526342, -0.298208585, 0, 0, 0 ] + - [ -2.88531702, 1.18262031, 0.039352242, -0.305056438, 0, 0, 0, -2.88502925, -1.18337623, -0.0391565005, -0.304872615, 0, 0, 0 ] + - [ -2.88531703, 1.19213147, 0.0387581444, -0.311757551, 0, 0, 0, -2.88502925, -1.19288864, -0.0385639166, -0.311569691, 0, 0, 0 ] + - [ -2.88531704, 1.20164791, 0.0381675896, -0.31849026, 0, 0, 0, -2.88502925, -1.20240633, -0.0379749056, -0.318298343, 0, 0, 0 ] + - [ -2.88531705, 1.21116821, 0.0375806012, -0.325253095, 0, 0, 0, -2.88502925, -1.21192787, -0.0373894903, -0.325057102, 0, 0, 0 ] + - [ -2.88531707, 1.22069095, 0.036997203, -0.332044586, 0, 0, 0, -2.88502925, -1.22145185, -0.0368076937, -0.331844501, 0, 0, 0 ] + - [ -2.88531708, 1.23021472, 0.0364174184, -0.338863264, 0, 0, 0, -2.88502925, -1.23097684, -0.0362295388, -0.33865907, 0, 0, 0 ] + - [ -2.88531709, 1.23973807, 0.0358412714, -0.345707659, 0, 0, 0, -2.88502925, -1.24050142, -0.0356550485, -0.345499341, 0, 0, 0 ] + - [ -2.8853171, 1.24925961, 0.0352687854, -0.352576302, 0, 0, 0, -2.88502925, -1.25002417, -0.0350842458, -0.352363845, 0, 0, 0 ] + - [ -2.88531712, 1.2587779, 0.0346999842, -0.359467723, 0, 0, 0, -2.88502925, -1.25954367, -0.0345171535, -0.359251113, 0, 0, 0 ] + - [ -2.88531713, 1.26829153, 0.0341348914, -0.366380453, 0, 0, 0, -2.88502925, -1.2690585, -0.0339537947, -0.366159677, 0, 0, 0 ] + - [ -2.88531714, 1.27779907, 0.0335735306, -0.373313021, 0, 0, 0, -2.88502925, -1.27856724, -0.0333941923, -0.373088069, 0, 0, 0 ] + - [ -2.88531715, 1.28729911, 0.0330159257, -0.380263959, 0, 0, 0, -2.88502925, -1.28806846, -0.0328383693, -0.380034818, 0, 0, 0 ] + - [ -2.88531716, 1.29679021, 0.0324621001, -0.387231797, 0, 0, 0, -2.88502925, -1.29756075, -0.0322863485, -0.386998457, 0, 0, 0 ] + - [ -2.88531718, 1.30627097, 0.0319120777, -0.394215065, 0, 0, 0, -2.88502925, -1.30704269, -0.031738153, -0.393977517, 0, 0, 0 ] + - [ -2.88531719, 1.31573996, 0.031365882, -0.401212294, 0, 0, 0, -2.88502925, -1.31651285, -0.0311938057, -0.40097053, 0, 0, 0 ] + - [ -2.8853172, 1.32519576, 0.0308235367, -0.408222015, 0, 0, 0, -2.88502925, -1.32596981, -0.0306533295, -0.407976026, 0, 0, 0 ] + - [ -2.88531721, 1.33463695, 0.0302850654, -0.415242757, 0, 0, 0, -2.88502925, -1.33541215, -0.0301167474, -0.414992538, 0, 0, 0 ] + - [ -2.88531723, 1.34406211, 0.029750492, -0.422273051, 0, 0, 0, -2.88502925, -1.34483846, -0.0295840823, -0.422018595, 0, 0, 0 ] + - [ -2.88531724, 1.35346981, 0.0292198399, -0.429311427, 0, 0, 0, -2.88502925, -1.3542473, -0.0290553572, -0.429052731, 0, 0, 0 ] + - [ -2.88531725, 1.36285865, 0.0286931329, -0.436356417, 0, 0, 0, -2.88502925, -1.36363727, -0.028530595, -0.436093475, 0, 0, 0 ] + - [ -2.88531726, 1.37222718, 0.0281703946, -0.44340655, 0, 0, 0, -2.88502925, -1.37300693, -0.0280098188, -0.44313936, 0, 0, 0 ] + - [ -2.88531728, 1.38157401, 0.0276516487, -0.450460357, 0, 0, 0, -2.88502925, -1.38235487, -0.0274930513, -0.450188916, 0, 0, 0 ] + - [ -2.88531729, 1.39089769, 0.0271369189, -0.457516368, 0, 0, 0, -2.88502925, -1.39167967, -0.0269803156, -0.457240676, 0, 0, 0 ] + - [ -2.8853173, 1.40019682, 0.0266262289, -0.464573114, 0, 0, 0, -2.88502925, -1.4009799, -0.0264716346, -0.464293169, 0, 0, 0 ] + - [ -2.88531731, 1.40946997, 0.0261196022, -0.471629125, 0, 0, 0, -2.88502925, -1.41025415, -0.0259670313, -0.471344929, 0, 0, 0 ] + - [ -2.88531733, 1.41871572, 0.0256170626, -0.478682932, 0, 0, 0, -2.88502925, -1.41950099, -0.0254665286, -0.478394485, 0, 0, 0 ] + - [ -2.88531734, 1.42793266, 0.0251186337, -0.485733065, 0, 0, 0, -2.88502925, -1.42871901, -0.0249701495, -0.48544037, 0, 0, 0 ] + - [ -2.88531735, 1.43711935, 0.0246243392, -0.492778055, 0, 0, 0, -2.88502925, -1.43790677, -0.0244779169, -0.492481114, 0, 0, 0 ] + - [ -2.88531736, 1.44627438, 0.0241342027, -0.499816431, 0, 0, 0, -2.88502925, -1.44706287, -0.0239898537, -0.49951525, 0, 0, 0 ] + - [ -2.88531738, 1.45539633, 0.023648248, -0.506846725, 0, 0, 0, -2.88502925, -1.45618588, -0.0235059829, -0.506541307, 0, 0, 0 ] + - [ -2.88531739, 1.46448378, 0.0231664986, -0.513867467, 0, 0, 0, -2.88502925, -1.46527437, -0.0230263275, -0.513557819, 0, 0, 0 ] + - [ -2.8853174, 1.4735353, 0.0226889783, -0.520877188, 0, 0, 0, -2.88502925, -1.47432694, -0.0225509104, -0.520563315, 0, 0, 0 ] + - [ -2.88531741, 1.48254948, 0.0222157107, -0.527874417, 0, 0, 0, -2.88502925, -1.48334215, -0.0220797546, -0.527556328, 0, 0, 0 ] + - [ -2.88531743, 1.49152489, 0.0217467195, -0.534857685, 0, 0, 0, -2.88502925, -1.49231859, -0.0216128829, -0.534535388, 0, 0, 0 ] + - [ -2.88531744, 1.50046012, 0.0212820283, -0.541825523, 0, 0, 0, -2.88502925, -1.50125483, -0.0211503184, -0.541499027, 0, 0, 0 ] + - [ -2.88531745, 1.50935374, 0.0208216608, -0.548776461, 0, 0, 0, -2.88502925, -1.51014946, -0.020692084, -0.548445776, 0, 0, 0 ] + - [ -2.88531746, 1.51820433, 0.0203656407, -0.555709029, 0, 0, 0, -2.88502925, -1.51900105, -0.0202382026, -0.555374168, 0, 0, 0 ] + - [ -2.88531747, 1.52701047, 0.0199139917, -0.562621759, 0, 0, 0, -2.88502925, -1.52780818, -0.0197886972, -0.562282732, 0, 0, 0 ] + - [ -2.88531749, 1.53577074, 0.0194667373, -0.56951318, 0, 0, 0, -2.88502925, -1.53656943, -0.0193435908, -0.56917, 0, 0, 0 ] + - [ -2.8853175, 1.54448372, 0.0190239013, -0.576381823, 0, 0, 0, -2.88502925, -1.54528339, -0.0189029062, -0.576034504, 0, 0, 0 ] + - [ -2.88531751, 1.55314799, 0.0185855074, -0.583226218, 0, 0, 0, -2.88502925, -1.55394862, -0.0184666664, -0.582874775, 0, 0, 0 ] + - [ -2.88531752, 1.56176213, 0.0181515791, -0.590044896, 0, 0, 0, -2.88502925, -1.56256372, -0.0180348945, -0.589689344, 0, 0, 0 ] + - [ -2.88531754, 1.57032471, 0.0177221402, -0.596836387, 0, 0, 0, -2.88502925, -1.57112725, -0.0176076132, -0.596476743, 0, 0, 0 ] + - [ -2.88531755, 1.57883432, 0.0172972143, -0.603599222, 0, 0, 0, -2.88502925, -1.5796378, -0.0171848457, -0.603235502, 0, 0, 0 ] + - [ -2.88531756, 1.58728954, 0.0168768251, -0.610331931, 0, 0, 0, -2.88502925, -1.58809394, -0.0167666147, -0.609964154, 0, 0, 0 ] + - [ -2.88531757, 1.59568894, 0.0164609962, -0.617033044, 0, 0, 0, -2.88502925, -1.59649426, -0.0163529433, -0.61666123, 0, 0, 0 ] + - [ -2.88531758, 1.6040311, 0.0160497514, -0.623701093, 0, 0, 0, -2.88502925, -1.60483733, -0.0159438545, -0.62332526, 0, 0, 0 ] + - [ -2.88531759, 1.6123146, 0.0156431143, -0.630334607, 0, 0, 0, -2.88502925, -1.61312174, -0.0155393711, -0.629954777, 0, 0, 0 ] + - [ -2.88531761, 1.62053803, 0.0152411085, -0.636932117, 0, 0, 0, -2.88502925, -1.62134605, -0.0151395161, -0.636548311, 0, 0, 0 ] + - [ -2.88531762, 1.62869996, 0.0148437577, -0.643492153, 0, 0, 0, -2.88502925, -1.62950886, -0.0147443125, -0.643104394, 0, 0, 0 ] + - [ -2.88531763, 1.63679896, 0.0144510856, -0.650013246, 0, 0, 0, -2.88502925, -1.63760874, -0.0143537831, -0.649621558, 0, 0, 0 ] + - [ -2.88531764, 1.64483363, 0.0140631158, -0.656493926, 0, 0, 0, -2.88502925, -1.64564427, -0.0139679511, -0.656098333, 0, 0, 0 ] + - [ -2.88531765, 1.65280253, 0.013679872, -0.662932724, 0, 0, 0, -2.88502925, -1.65361403, -0.0135868392, -0.662533251, 0, 0, 0 ] + - [ -2.88531766, 1.66070425, 0.0133013779, -0.66932817, 0, 0, 0, -2.88502925, -1.66151659, -0.0132104705, -0.668924843, 0, 0, 0 ] + - [ -2.88531767, 1.66853737, 0.0129276572, -0.675678794, 0, 0, 0, -2.88502925, -1.66935054, -0.0128388679, -0.67527164, 0, 0, 0 ] + - [ -2.88531769, 1.67630046, 0.0125587334, -0.681983127, 0, 0, 0, -2.88502925, -1.67711446, -0.0124720544, -0.681572175, 0, 0, 0 ] + - [ -2.8853177, 1.68399211, 0.0121946304, -0.6882397, 0, 0, 0, -2.88502925, -1.68480692, -0.0121100528, -0.687824978, 0, 0, 0 ] + - [ -2.88531771, 1.69161089, 0.0118353716, -0.694447043, 0, 0, 0, -2.88502925, -1.6924265, -0.0117528862, -0.69402858, 0, 0, 0 ] + - [ -2.88531772, 1.69915538, 0.0114809808, -0.700603686, 0, 0, 0, -2.88502925, -1.69997179, -0.0114005774, -0.700181513, 0, 0, 0 ] + - [ -2.88531773, 1.70662416, 0.0111314817, -0.70670816, 0, 0, 0, -2.88502925, -1.70744136, -0.0110531495, -0.706282308, 0, 0, 0 ] + - [ -2.88531774, 1.71401582, 0.010786898, -0.712758995, 0, 0, 0, -2.88502925, -1.71483379, -0.0107106254, -0.712329497, 0, 0, 0 ] + - [ -2.88531775, 1.72132893, 0.0104472532, -0.718754722, 0, 0, 0, -2.88502925, -1.72214766, -0.010373028, -0.718321611, 0, 0, 0 ] + - [ -2.88531776, 1.72856206, 0.010112571, -0.72469387, 0, 0, 0, -2.88502925, -1.72938154, -0.0100403804, -0.724257181, 0, 0, 0 ] + - [ -2.88531777, 1.73571381, 0.00978287521, -0.730574972, 0, 0, 0, -2.88502925, -1.73653403, -0.00971270528, -0.730134738, 0, 0, 0 ] + - [ -2.88531778, 1.74278274, 0.00945818938, -0.736396556, 0, 0, 0, -2.88502925, -1.74360369, -0.00939002579, -0.735952815, 0, 0, 0 ] + - [ -2.88531779, 1.74976744, 0.00913853719, -0.742157154, 0, 0, 0, -2.88502925, -1.75058911, -0.00907236482, -0.741709941, 0, 0, 0 ] + - [ -2.8853178, 1.75666648, 0.00882394232, -0.747855295, 0, 0, 0, -2.88502925, -1.75748887, -0.00875974532, -0.747404649, 0, 0, 0 ] + - [ -2.88531781, 1.76347845, 0.00851442842, -0.753489511, 0, 0, 0, -2.88502925, -1.76430154, -0.00845219025, -0.75303547, 0, 0, 0 ] + - [ -2.88531782, 1.77020193, 0.00821001917, -0.759058332, 0, 0, 0, -2.88502925, -1.7710257, -0.00814972254, -0.758600935, 0, 0, 0 ] + - [ -2.88531783, 1.77683549, 0.00791073822, -0.764560288, 0, 0, 0, -2.88502925, -1.77765993, -0.00785236514, -0.764099576, 0, 0, 0 ] + - [ -2.88531784, 1.78337771, 0.00761660924, -0.76999391, 0, 0, 0, -2.88502925, -1.78420282, -0.00756014101, -0.769529923, 0, 0, 0 ] + - [ -2.88531785, 1.78982717, 0.0073276559, -0.775357727, 0, 0, 0, -2.88502925, -1.79065294, -0.00727307308, -0.774890509, 0, 0, 0 ] + - [ -2.88531786, 1.79618245, 0.00704390187, -0.780650272, 0, 0, 0, -2.88502925, -1.79700886, -0.00699118432, -0.780179864, 0, 0, 0 ] + - [ -2.88531787, 1.80244213, 0.00676537079, -0.785870073, 0, 0, 0, -2.88502925, -1.80326918, -0.00671449766, -0.785396519, 0, 0, 0 ] + - [ -2.88531788, 1.80860479, 0.00649208635, -0.791015661, 0, 0, 0, -2.88502925, -1.80943246, -0.00644303605, -0.790539007, 0, 0, 0 ] + - [ -2.88531789, 1.81466901, 0.0062240722, -0.796085568, 0, 0, 0, -2.88502925, -1.81549729, -0.00617682245, -0.795605859, 0, 0, 0 ] + - [ -2.8853179, 1.82063337, 0.00596135202, -0.801078323, 0, 0, 0, -2.88502925, -1.82146224, -0.0059158798, -0.800595605, 0, 0, 0 ] + - [ -2.8853179, 1.82649644, 0.00570394945, -0.805992456, 0, 0, 0, -2.88502925, -1.8273259, -0.00566023104, -0.805506778, 0, 0, 0 ] + - [ -2.88531791, 1.83225681, 0.00545188818, -0.810826499, 0, 0, 0, -2.88502925, -1.83308684, -0.00540989912, -0.810337907, 0, 0, 0 ] + - [ -2.88531792, 1.83791305, 0.00520519186, -0.815578981, 0, 0, 0, -2.88502925, -1.83874365, -0.005164907, -0.815087526, 0, 0, 0 ] + - [ -2.88531793, 1.84346375, 0.00496388416, -0.820248434, 0, 0, 0, -2.88502925, -1.8442949, -0.00492527762, -0.819754165, 0, 0, 0 ] + - [ -2.88531794, 1.84890748, 0.00472798874, -0.824833387, 0, 0, 0, -2.88502925, -1.84973917, -0.00469103393, -0.824336355, 0, 0, 0 ] + - [ -2.88531795, 1.85424283, 0.00449752927, -0.829332371, 0, 0, 0, -2.88502925, -1.85507504, -0.00446219887, -0.828832628, 0, 0, 0 ] + - [ -2.88531795, 1.85946836, 0.00427252941, -0.833743917, 0, 0, 0, -2.88502925, -1.86030108, -0.00423879539, -0.833241515, 0, 0, 0 ] + - [ -2.88531796, 1.86458266, 0.00405301283, -0.838066554, 0, 0, 0, -2.88502925, -1.86541589, -0.00402084645, -0.837561548, 0, 0, 0 ] + - [ -2.88531797, 1.86958432, 0.00383900319, -0.842298814, 0, 0, 0, -2.88502925, -1.87041804, -0.00380837498, -0.841791257, 0, 0, 0 ] + - [ -2.88531798, 1.8744719, 0.00363052416, -0.846439226, 0, 0, 0, -2.88502925, -1.8753061, -0.00360140394, -0.845929175, 0, 0, 0 ] + - [ -2.88531798, 1.87924399, 0.00342759941, -0.850486322, 0, 0, 0, -2.88502925, -1.88007865, -0.00339995628, -0.849973832, 0, 0, 0 ] + - [ -2.88531799, 1.88389917, 0.00323025258, -0.854438631, 0, 0, 0, -2.88502925, -1.88473428, -0.00320405493, -0.853923759, 0, 0, 0 ] + - [ -2.885318, 1.88843601, 0.00303850736, -0.858294684, 0, 0, 0, -2.88502925, -1.88927157, -0.00301372286, -0.857777489, 0, 0, 0 ] + - [ -2.885318, 1.8928531, 0.00285238741, -0.862053012, 0, 0, 0, -2.88502925, -1.89368908, -0.002828983, -0.861533552, 0, 0, 0 ] + - [ -2.88531801, 1.89714901, 0.00267191638, -0.865712145, 0, 0, 0, -2.88502925, -1.89798541, -0.00264985831, -0.86519048, 0, 0, 0 ] + - [ -2.88531802, 1.90132233, 0.00249711795, -0.869270613, 0, 0, 0, -2.88502925, -1.90215913, -0.00247637173, -0.868746804, 0, 0, 0 ] + - [ -2.88531802, 1.90537162, 0.00232801578, -0.872726947, 0, 0, 0, -2.88502925, -1.90620882, -0.00230854621, -0.872201056, 0, 0, 0 ] + - [ -2.88531803, 1.90929548, 0.00216463354, -0.876079678, 0, 0, 0, -2.88502925, -1.91013306, -0.0021464047, -0.875551766, 0, 0, 0 ] + - [ -2.88531803, 1.91309249, 0.00200699488, -0.879327335, 0, 0, 0, -2.88502925, -1.91393042, -0.00198997015, -0.878797466, 0, 0, 0 ] + - [ -2.88531804, 1.91676121, 0.00185512348, -0.88246845, 0, 0, 0, -2.88502925, -1.91759949, -0.0018392655, -0.881936688, 0, 0, 0 ] + - [ -2.88531805, 1.92030023, 0.001709043, -0.885501552, 0, 0, 0, -2.88502925, -1.92113885, -0.0016943137, -0.884967962, 0, 0, 0 ] + - [ -2.88531805, 1.92370813, 0.0015687771, -0.888425172, 0, 0, 0, -2.88502925, -1.92454708, -0.0015551377, -0.88788982, 0, 0, 0 ] + - [ -2.88531806, 1.92698348, 0.00143434945, -0.89123784, 0, 0, 0, -2.88502925, -1.92782274, -0.00142176045, -0.890700794, 0, 0, 0 ] + - [ -2.88531806, 1.93012488, 0.00130578371, -0.893938088, 0, 0, 0, -2.88502925, -1.93096443, -0.00129420489, -0.893399415, 0, 0, 0 ] + - [ -2.88531806, 1.93313088, 0.00118310355, -0.896524445, 0, 0, 0, -2.88502925, -1.93397073, -0.00117249397, -0.895984213, 0, 0, 0 ] + - [ -2.88531807, 1.93600009, 0.00106633264, -0.898995442, 0, 0, 0, -2.88502925, -1.9368402, -0.00105665065, -0.898453721, 0, 0, 0 ] + - [ -2.88531807, 1.93873106, 0.000955494625, -0.901349609, 0, 0, 0, -2.88502925, -1.93957144, -0.000946697859, -0.90080647, 0, 0, 0 ] + - [ -2.88531808, 1.94132239, 0.000850613187, -0.903585477, 0, 0, 0, -2.88502925, -1.94216301, -0.000842658556, -0.903040991, 0, 0, 0 ] + - [ -2.88531808, 1.94377266, 0.000751711986, -0.905701577, 0, 0, 0, -2.88502925, -1.9446135, -0.000744555687, -0.905155815, 0, 0, 0 ] + - [ -2.88531808, 1.94608043, 0.000658814686, -0.907696438, 0, 0, 0, -2.88502925, -1.94692149, -0.000652412199, -0.907149474, 0, 0, 0 ] + - [ -2.88531809, 1.9482443, 0.000571944952, -0.90956859, 0, 0, 0, -2.88502925, -1.94908556, -0.00056625104, -0.909020498, 0, 0, 0 ] + - [ -2.88531809, 1.95026283, 0.000491126448, -0.911316566, 0, 0, 0, -2.88502925, -1.95110428, -0.000486095158, -0.910767421, 0, 0, 0 ] + - [ -2.88531809, 1.95213461, 0.00041638284, -0.912938894, 0, 0, 0, -2.88502925, -1.95297624, -0.000411967499, -0.912388771, 0, 0, 0 ] + - [ -2.8853181, 1.95385822, 0.000347737793, -0.914434106, 0, 0, 0, -2.88502925, -1.95470001, -0.000343891013, -0.913883082, 0, 0, 0 ] + - [ -2.8853181, 1.95543224, 0.00028521497, -0.915800732, 0, 0, 0, -2.88502925, -1.95627417, -0.000281888646, -0.915248884, 0, 0, 0 ] + - [ -2.8853181, 1.95685524, 0.000228838037, -0.917037302, 0, 0, 0, -2.88502925, -1.95769731, -0.000225983347, -0.916484709, 0, 0, 0 ] + - [ -2.8853181, 1.95812581, 0.000178630658, -0.918142347, 0, 0, 0, -2.88502925, -1.958968, -0.000176198063, -0.917589088, 0, 0, 0 ] + - [ -2.8853181, 1.95924253, 0.000134616499, -0.919114397, 0, 0, 0, -2.88502925, -1.96008481, -0.000132555742, -0.918560553, 0, 0, 0 ] + - [ -2.88531811, 1.96020397, 9.68192227e-05, -0.919951982, 0, 0, 0, -2.88502925, -1.96104634, -9.50793318e-05, -0.919397633, 0, 0, 0 ] + - [ -2.88531811, 1.96100871, 6.52624954e-05, -0.920653634, 0, 0, 0, -2.88502925, -1.96185115, -6.37917799e-05, -0.920098862, 0, 0, 0 ] + - [ -2.88531811, 1.96165533, 3.99699813e-05, -0.921217882, 0, 0, 0, -2.88502925, -1.96249784, -3.87160342e-05, -0.920662771, 0, 0, 0 ] + - [ -2.88531811, 1.96214241, 2.09653451e-05, -0.921643257, 0, 0, 0, -2.88502925, -1.96298496, -1.98750423e-05, -0.921087889, 0, 0, 0 ] + - [ -2.88531811, 1.96246853, 8.27225166e-06, -0.92192829, 0, 0, 0, -2.88502925, -1.96331112, -7.29175199e-06, -0.92137275, 0, 0, 0 ] + - [ -2.88531811, 1.96263228, 1.91436558e-06, -0.922071511, 0, 0, 0, -2.88502925, -1.96347487, -9.89111062e-07, -0.921515884, 0, 0, 0 ] + - [ -2.88529777, 1.96265281, 1.11851458e-06, -0.922075779, 0, 0, 0, -2.88500891, -1.96349541, -2.00204204e-07, -0.921520146, 0, 0, 0 ] + - [ -2.88513536, 1.96265281, 1.11846699e-06, -0.921966372, 0, 0, 0, -2.88484652, -1.96349541, -2.00195687e-07, -0.921410772, 0, 0, 0 ] + - [ -2.88481138, 1.96265281, 1.11837207e-06, -0.92174812, 0, 0, 0, -2.88452257, -1.96349541, -2.00178696e-07, -0.921192586, 0, 0, 0 ] + - [ -2.88432669, 1.96265281, 1.11823005e-06, -0.921421608, 0, 0, 0, -2.88403794, -1.96349541, -2.00153277e-07, -0.920866171, 0, 0, 0 ] + - [ -2.88368217, 1.96265282, 1.11804121e-06, -0.92098742, 0, 0, 0, -2.88339348, -1.96349541, -2.00119475e-07, -0.920432114, 0, 0, 0 ] + - [ -2.88287868, 1.96265282, 1.11780578e-06, -0.920446142, 0, 0, 0, -2.88259008, -1.96349541, -2.00077336e-07, -0.919890999, 0, 0, 0 ] + - [ -2.88191708, 1.96265282, 1.11752404e-06, -0.919798359, 0, 0, 0, -2.88162859, -1.96349541, -2.00026905e-07, -0.919243411, 0, 0, 0 ] + - [ -2.88079826, 1.96265283, 1.11719622e-06, -0.919044656, 0, 0, 0, -2.88050988, -1.96349541, -1.99968229e-07, -0.918489935, 0, 0, 0 ] + - [ -2.87952307, 1.96265283, 1.11682259e-06, -0.918185619, 0, 0, 0, -2.87923483, -1.96349541, -1.99901353e-07, -0.917631156, 0, 0, 0 ] + - [ -2.87809239, 1.96265283, 1.1164034e-06, -0.917221833, 0, 0, 0, -2.8778043, -1.96349541, -1.99826321e-07, -0.91666766, 0, 0, 0 ] + - [ -2.87650709, 1.96265284, 1.1159389e-06, -0.916153883, 0, 0, 0, -2.87621917, -1.96349541, -1.9974318e-07, -0.91560003, 0, 0, 0 ] + - [ -2.87476803, 1.96265285, 1.11542935e-06, -0.914982353, 0, 0, 0, -2.87448029, -1.96349541, -1.99651976e-07, -0.914428853, 0, 0, 0 ] + - [ -2.87287608, 1.96265285, 1.11487501e-06, -0.91370783, 0, 0, 0, -2.87258854, -1.96349541, -1.99552754e-07, -0.913154713, 0, 0, 0 ] + - [ -2.87083211, 1.96265286, 1.11427613e-06, -0.912330898, 0, 0, 0, -2.87054479, -1.96349541, -1.99445559e-07, -0.911778196, 0, 0, 0 ] + - [ -2.86863699, 1.96265287, 1.11363295e-06, -0.910852143, 0, 0, 0, -2.86834991, -1.96349541, -1.99330436e-07, -0.910299885, 0, 0, 0 ] + - [ -2.86629159, 1.96265287, 1.11294575e-06, -0.90927215, 0, 0, 0, -2.86600476, -1.96349541, -1.99207433e-07, -0.908720367, 0, 0, 0 ] + - [ -2.86379678, 1.96265288, 1.11221477e-06, -0.907591504, 0, 0, 0, -2.86351021, -1.96349541, -1.99076593e-07, -0.907040226, 0, 0, 0 ] + - [ -2.86115342, 1.96265289, 1.11144026e-06, -0.90581079, 0, 0, 0, -2.86086714, -1.96349541, -1.98937964e-07, -0.905260048, 0, 0, 0 ] + - [ -2.85836239, 1.9626529, 1.11062248e-06, -0.903930594, 0, 0, 0, -2.8580764, -1.96349541, -1.98791589e-07, -0.903380416, 0, 0, 0 ] + - [ -2.85542455, 1.96265291, 1.10976169e-06, -0.9019515, 0, 0, 0, -2.85513887, -1.96349541, -1.98637515e-07, -0.901401917, 0, 0, 0 ] + - [ -2.85234077, 1.96265292, 1.10885814e-06, -0.899874094, 0, 0, 0, -2.85205542, -1.96349541, -1.98475788e-07, -0.899325136, 0, 0, 0 ] + - [ -2.84911193, 1.96265293, 1.10791209e-06, -0.89769896, 0, 0, 0, -2.84882692, -1.96349541, -1.98306452e-07, -0.897150657, 0, 0, 0 ] + - [ -2.84573888, 1.96265294, 1.10692378e-06, -0.895426685, 0, 0, 0, -2.84545423, -1.96349541, -1.98129554e-07, -0.894879065, 0, 0, 0 ] + - [ -2.8422225, 1.96265296, 1.10589348e-06, -0.893057854, 0, 0, 0, -2.84193822, -1.96349541, -1.97945139e-07, -0.892510946, 0, 0, 0 ] + - [ -2.83856366, 1.96265297, 1.10482143e-06, -0.890593051, 0, 0, 0, -2.83827977, -1.96349541, -1.97753252e-07, -0.890046884, 0, 0, 0 ] + - [ -2.83476322, 1.96265298, 1.1037079e-06, -0.888032862, 0, 0, 0, -2.83447974, -1.96349541, -1.97553939e-07, -0.887487464, 0, 0, 0 ] + - [ -2.83082205, 1.96265299, 1.10255313e-06, -0.885377871, 0, 0, 0, -2.83053899, -1.96349541, -1.97347247e-07, -0.884833272, 0, 0, 0 ] + - [ -2.82674103, 1.96265301, 1.10135739e-06, -0.882628665, 0, 0, 0, -2.8264584, -1.96349541, -1.97133219e-07, -0.882084892, 0, 0, 0 ] + - [ -2.82252102, 1.96265302, 1.10012092e-06, -0.879785828, 0, 0, 0, -2.82223884, -1.96349541, -1.96911902e-07, -0.87924291, 0, 0, 0 ] + - [ -2.81816289, 1.96265304, 1.09884398e-06, -0.876849946, 0, 0, 0, -2.81788117, -1.96349541, -1.96683342e-07, -0.876307911, 0, 0, 0 ] + - [ -2.8136675, 1.96265305, 1.09752683e-06, -0.873821603, 0, 0, 0, -2.81338627, -1.96349541, -1.96447583e-07, -0.873280479, 0, 0, 0 ] + - [ -2.80903574, 1.96265307, 1.09616972e-06, -0.870701386, 0, 0, 0, -2.808755, -1.96349541, -1.96204672e-07, -0.870161199, 0, 0, 0 ] + - [ -2.80426846, 1.96265308, 1.0947729e-06, -0.867489878, 0, 0, 0, -2.80398822, -1.96349541, -1.95954654e-07, -0.866950657, 0, 0, 0 ] + - [ -2.79936654, 1.9626531, 1.09333663e-06, -0.864187666, 0, 0, 0, -2.79908682, -1.96349541, -1.95697574e-07, -0.863649437, 0, 0, 0 ] + - [ -2.79433083, 1.96265312, 1.09186117e-06, -0.860795334, 0, 0, 0, -2.79405165, -1.96349541, -1.95433479e-07, -0.860258126, 0, 0, 0 ] + - [ -2.78916222, 1.96265313, 1.09034676e-06, -0.857313468, 0, 0, 0, -2.78888359, -1.96349541, -1.95162413e-07, -0.856777306, 0, 0, 0 ] + - [ -2.78386157, 1.96265315, 1.08879366e-06, -0.853742652, 0, 0, 0, -2.78358351, -1.96349541, -1.94884423e-07, -0.853207565, 0, 0, 0 ] + - [ -2.77842976, 1.96265317, 1.08720213e-06, -0.850083473, 0, 0, 0, -2.77815227, -1.96349541, -1.94599553e-07, -0.849549485, 0, 0, 0 ] + - [ -2.77286763, 1.96265319, 1.08557242e-06, -0.846336515, 0, 0, 0, -2.77259074, -1.96349541, -1.9430785e-07, -0.845803654, 0, 0, 0 ] + - [ -2.76717608, 1.96265321, 1.08390479e-06, -0.842502363, 0, 0, 0, -2.76689979, -1.96349541, -1.94009359e-07, -0.841970655, 0, 0, 0 ] + - [ -2.76135596, 1.96265323, 1.08219949e-06, -0.838581603, 0, 0, 0, -2.76108029, -1.96349541, -1.93704125e-07, -0.838051074, 0, 0, 0 ] + - [ -2.75540814, 1.96265325, 1.08045677e-06, -0.83457482, 0, 0, 0, -2.75513311, -1.96349541, -1.93392194e-07, -0.834045496, 0, 0, 0 ] + - [ -2.7493335, 1.96265327, 1.0786769e-06, -0.830482599, 0, 0, 0, -2.74905911, -1.96349541, -1.93073612e-07, -0.829954505, 0, 0, 0 ] + - [ -2.7431329, 1.96265329, 1.07686011e-06, -0.826305525, 0, 0, 0, -2.74285917, -1.96349541, -1.92748424e-07, -0.825778687, 0, 0, 0 ] + - [ -2.73680721, 1.96265331, 1.07500668e-06, -0.822044184, 0, 0, 0, -2.73653415, -1.96349541, -1.92416675e-07, -0.821518626, 0, 0, 0 ] + - [ -2.7303573, 1.96265333, 1.07311685e-06, -0.81769916, 0, 0, 0, -2.73008492, -1.96349541, -1.92078412e-07, -0.817174909, 0, 0, 0 ] + - [ -2.72378403, 1.96265335, 1.07119087e-06, -0.813271039, 0, 0, 0, -2.72351236, -1.96349541, -1.9173368e-07, -0.812748119, 0, 0, 0 ] + - [ -2.71708828, 1.96265338, 1.06922901e-06, -0.808760405, 0, 0, 0, -2.71681732, -1.96349541, -1.91382524e-07, -0.808238842, 0, 0, 0 ] + - [ -2.71027092, 1.9626534, 1.06723152e-06, -0.804167845, 0, 0, 0, -2.71000068, -1.96349541, -1.9102499e-07, -0.803647663, 0, 0, 0 ] + - [ -2.70333281, 1.96265342, 1.06519864e-06, -0.799493944, 0, 0, 0, -2.70306331, -1.96349541, -1.90661123e-07, -0.798975167, 0, 0, 0 ] + - [ -2.69627482, 1.96265345, 1.06313064e-06, -0.794739286, 0, 0, 0, -2.69600607, -1.96349541, -1.9029097e-07, -0.794221938, 0, 0, 0 ] + - [ -2.68909782, 1.96265347, 1.06102777e-06, -0.789904456, 0, 0, 0, -2.68882984, -1.96349541, -1.89914575e-07, -0.789388562, 0, 0, 0 ] + - [ -2.68180268, 1.9626535, 1.05889029e-06, -0.784990041, 0, 0, 0, -2.68153548, -1.96349541, -1.89531984e-07, -0.784475624, 0, 0, 0 ] + - [ -2.67439027, 1.96265352, 1.05671845e-06, -0.779996624, 0, 0, 0, -2.67412386, -1.96349541, -1.89143244e-07, -0.779483709, 0, 0, 0 ] + - [ -2.66686146, 1.96265355, 1.0545125e-06, -0.774924792, 0, 0, 0, -2.66659584, -1.96349541, -1.88748398e-07, -0.774413402, 0, 0, 0 ] + - [ -2.65921711, 1.96265357, 1.05227269e-06, -0.76977513, 0, 0, 0, -2.65895231, -1.96349541, -1.88347493e-07, -0.769265288, 0, 0, 0 ] + - [ -2.6514581, 1.9626536, 1.04999929e-06, -0.764548222, 0, 0, 0, -2.65119412, -1.96349541, -1.87940575e-07, -0.764039952, 0, 0, 0 ] + - [ -2.64358529, 1.96265362, 1.04769255e-06, -0.759244654, 0, 0, 0, -2.64332215, -1.96349541, -1.87527688e-07, -0.758737978, 0, 0, 0 ] + - [ -2.63559955, 1.96265365, 1.04535272e-06, -0.753865011, 0, 0, 0, -2.63533726, -1.96349541, -1.87108879e-07, -0.753359953, 0, 0, 0 ] + - [ -2.62750175, 1.96265368, 1.04298006e-06, -0.748409879, 0, 0, 0, -2.62724032, -1.96349541, -1.86684193e-07, -0.747906461, 0, 0, 0 ] + - [ -2.61929276, 1.96265371, 1.04057481e-06, -0.742879842, 0, 0, 0, -2.61903221, -1.96349541, -1.86253676e-07, -0.742378086, 0, 0, 0 ] + - [ -2.61097345, 1.96265373, 1.03813725e-06, -0.737275485, 0, 0, 0, -2.61071378, -1.96349541, -1.85817373e-07, -0.736775415, 0, 0, 0 ] + - [ -2.60254469, 1.96265376, 1.03566761e-06, -0.731597394, 0, 0, 0, -2.60228591, -1.96349541, -1.8537533e-07, -0.731099031, 0, 0, 0 ] + - [ -2.59400733, 1.96265379, 1.03316615e-06, -0.725846155, 0, 0, 0, -2.59374947, -1.96349541, -1.84927592e-07, -0.725349521, 0, 0, 0 ] + - [ -2.58536227, 1.96265382, 1.03063314e-06, -0.720022352, 0, 0, 0, -2.58510532, -1.96349541, -1.84474205e-07, -0.719527469, 0, 0, 0 ] + - [ -2.57661035, 1.96265385, 1.02806882e-06, -0.71412657, 0, 0, 0, -2.57635434, -1.96349541, -1.84015214e-07, -0.713633459, 0, 0, 0 ] + - [ -2.56775246, 1.96265388, 1.02547345e-06, -0.708159394, 0, 0, 0, -2.56749739, -1.96349541, -1.83550665e-07, -0.707668078, 0, 0, 0 ] + - [ -2.55878946, 1.96265391, 1.02284728e-06, -0.702121411, 0, 0, 0, -2.55853534, -1.96349541, -1.83080604e-07, -0.70163191, 0, 0, 0 ] + - [ -2.54972221, 1.96265394, 1.02019056e-06, -0.696013204, 0, 0, 0, -2.54946906, -1.96349541, -1.82605076e-07, -0.69552554, 0, 0, 0 ] + - [ -2.54055159, 1.96265397, 1.01750356e-06, -0.68983536, 0, 0, 0, -2.54029942, -1.96349541, -1.82124127e-07, -0.689349553, 0, 0, 0 ] + - [ -2.53127847, 1.962654, 1.01478653e-06, -0.683588463, 0, 0, 0, -2.53102728, -1.96349541, -1.81637801e-07, -0.683104534, 0, 0, 0 ] + - [ -2.52190371, 1.96265404, 1.01203971e-06, -0.677273099, 0, 0, 0, -2.52165352, -1.96349541, -1.81146146e-07, -0.676791069, 0, 0, 0 ] + - [ -2.51242819, 1.96265407, 1.00926337e-06, -0.670889852, 0, 0, 0, -2.512179, -1.96349541, -1.80649206e-07, -0.670409741, 0, 0, 0 ] + - [ -2.50285276, 1.9626541, 1.00645776e-06, -0.664439308, 0, 0, 0, -2.5026046, -1.96349541, -1.80147026e-07, -0.663961137, 0, 0, 0 ] + - [ -2.49317831, 1.96265413, 1.00362314e-06, -0.657922053, 0, 0, 0, -2.49293117, -1.96349541, -1.79639654e-07, -0.657445841, 0, 0, 0 ] + - [ -2.4834057, 1.96265416, 1.00075975e-06, -0.651338671, 0, 0, 0, -2.4831596, -1.96349541, -1.79127133e-07, -0.650864438, 0, 0, 0 ] + - [ -2.47353579, 1.9626542, 9.97867858e-07, -0.644689747, 0, 0, 0, -2.47329075, -1.96349541, -1.78609509e-07, -0.644217514, 0, 0, 0 ] + - [ -2.46356946, 1.96265423, 9.94947712e-07, -0.637975867, 0, 0, 0, -2.46332548, -1.96349541, -1.78086829e-07, -0.637505653, 0, 0, 0 ] + - [ -2.45350758, 1.96265427, 9.91999569e-07, -0.631197616, 0, 0, 0, -2.45326466, -1.96349541, -1.77559138e-07, -0.63072944, 0, 0, 0 ] + - [ -2.44335101, 1.9626543, 9.89023682e-07, -0.624355579, 0, 0, 0, -2.44310917, -1.96349541, -1.7702648e-07, -0.62388946, 0, 0, 0 ] + - [ -2.43310062, 1.96265433, 9.86020307e-07, -0.617450342, 0, 0, 0, -2.43285988, -1.96349541, -1.76488903e-07, -0.616986298, 0, 0, 0 ] + - [ -2.42275729, 1.96265437, 9.82989698e-07, -0.610482489, 0, 0, 0, -2.42251764, -1.96349541, -1.75946451e-07, -0.61002054, 0, 0, 0 ] + - [ -2.41232187, 1.9626544, 9.79932109e-07, -0.603452605, 0, 0, 0, -2.41208334, -1.96349541, -1.75399169e-07, -0.60299277, 0, 0, 0 ] + - [ -2.40179524, 1.96265444, 9.76847796e-07, -0.596361277, 0, 0, 0, -2.40155783, -1.96349541, -1.74847104e-07, -0.595903574, 0, 0, 0 ] + - [ -2.39117827, 1.96265448, 9.73737012e-07, -0.589209088, 0, 0, 0, -2.39094199, -1.96349541, -1.74290302e-07, -0.588753536, 0, 0, 0 ] + - [ -2.38047183, 1.96265451, 9.70600011e-07, -0.581996625, 0, 0, 0, -2.38023668, -1.96349541, -1.73728806e-07, -0.581543241, 0, 0, 0 ] + - [ -2.36967678, 1.96265455, 9.6743705e-07, -0.574724472, 0, 0, 0, -2.36944278, -1.96349541, -1.73162664e-07, -0.574273275, 0, 0, 0 ] + - [ -2.35879399, 1.96265459, 9.64248381e-07, -0.567393215, 0, 0, 0, -2.35856115, -1.96349541, -1.72591921e-07, -0.566944222, 0, 0, 0 ] + - [ -2.34782434, 1.96265462, 9.6103426e-07, -0.560003439, 0, 0, 0, -2.34759267, -1.96349541, -1.72016622e-07, -0.559556667, 0, 0, 0 ] + - [ -2.33676868, 1.96265466, 9.57794941e-07, -0.552555728, 0, 0, 0, -2.33653819, -1.96349541, -1.71436812e-07, -0.552111196, 0, 0, 0 ] + - [ -2.3256279, 1.9626547, 9.54530679e-07, -0.545050669, 0, 0, 0, -2.32539859, -1.96349541, -1.70852538e-07, -0.544608394, 0, 0, 0 ] + - [ -2.31440285, 1.96265473, 9.51241727e-07, -0.537488847, 0, 0, 0, -2.31417474, -1.96349541, -1.70263845e-07, -0.537048845, 0, 0, 0 ] + - [ -2.30309441, 1.96265477, 9.47928342e-07, -0.529870846, 0, 0, 0, -2.3028675, -1.96349541, -1.69670778e-07, -0.529433134, 0, 0, 0 ] + - [ -2.29170345, 1.96265481, 9.44590776e-07, -0.522197251, 0, 0, 0, -2.29147775, -1.96349541, -1.69073384e-07, -0.521761847, 0, 0, 0 ] + - [ -2.28023083, 1.96265485, 9.41229286e-07, -0.514468649, 0, 0, 0, -2.28000635, -1.96349541, -1.68471707e-07, -0.514035568, 0, 0, 0 ] + - [ -2.26867742, 1.96265489, 9.37844125e-07, -0.506685624, 0, 0, 0, -2.26845417, -1.96349541, -1.67865793e-07, -0.506254883, 0, 0, 0 ] + - [ -2.2570441, 1.96265493, 9.34435547e-07, -0.498848761, 0, 0, 0, -2.25682208, -1.96349541, -1.67255688e-07, -0.498420377, 0, 0, 0 ] + - [ -2.24533172, 1.96265497, 9.31003808e-07, -0.490958646, 0, 0, 0, -2.24511095, -1.96349541, -1.66641437e-07, -0.490532634, 0, 0, 0 ] + - [ -2.23354116, 1.96265501, 9.27549161e-07, -0.483015863, 0, 0, 0, -2.23332165, -1.96349541, -1.66023085e-07, -0.482592239, 0, 0, 0 ] + - [ -2.2216733, 1.96265505, 9.24071862e-07, -0.475020999, 0, 0, 0, -2.22145505, -1.96349541, -1.6540068e-07, -0.474599779, 0, 0, 0 ] + - [ -2.20972898, 1.96265509, 9.20572165e-07, -0.466974637, 0, 0, 0, -2.209512, -1.96349541, -1.64774265e-07, -0.466555836, 0, 0, 0 ] + - [ -2.19770909, 1.96265513, 9.17050324e-07, -0.458877364, 0, 0, 0, -2.19749339, -1.96349541, -1.64143887e-07, -0.458460998, 0, 0, 0 ] + - [ -2.1856145, 1.96265517, 9.13506594e-07, -0.450729765, 0, 0, 0, -2.18540009, -1.96349541, -1.6350959e-07, -0.450315848, 0, 0, 0 ] + - [ -2.17344607, 1.96265521, 9.0994123e-07, -0.442532424, 0, 0, 0, -2.17323295, -1.96349541, -1.62871422e-07, -0.442120972, 0, 0, 0 ] + - [ -2.16120466, 1.96265525, 9.06354485e-07, -0.434285927, 0, 0, 0, -2.16099285, -1.96349541, -1.62229426e-07, -0.433876954, 0, 0, 0 ] + - [ -2.14889116, 1.96265529, 9.02746615e-07, -0.425990859, 0, 0, 0, -2.14868066, -1.96349541, -1.61583649e-07, -0.42558438, 0, 0, 0 ] + - [ -2.13650643, 1.96265533, 8.99117874e-07, -0.417647806, 0, 0, 0, -2.13629724, -1.96349541, -1.60934137e-07, -0.417243835, 0, 0, 0 ] + - [ -2.12405133, 1.96265538, 8.95468517e-07, -0.409257351, 0, 0, 0, -2.12384347, -1.96349541, -1.60280934e-07, -0.408855904, 0, 0, 0 ] + - [ -2.11152674, 1.96265542, 8.91798797e-07, -0.400820082, 0, 0, 0, -2.11132021, -1.96349541, -1.59624087e-07, -0.400421171, 0, 0, 0 ] + - [ -2.09893352, 1.96265546, 8.8810897e-07, -0.392336582, 0, 0, 0, -2.09872833, -1.96349541, -1.58963641e-07, -0.391940222, 0, 0, 0 ] + - [ -2.08627255, 1.9626555, 8.84399291e-07, -0.383807438, 0, 0, 0, -2.0860687, -1.96349541, -1.58299641e-07, -0.383413642, 0, 0, 0 ] + - [ -2.07354469, 1.96265555, 8.80670013e-07, -0.375233234, 0, 0, 0, -2.0733422, -1.96349541, -1.57632133e-07, -0.374842016, 0, 0, 0 ] + - [ -2.0607508, 1.96265559, 8.76921391e-07, -0.366614555, 0, 0, 0, -2.06054967, -1.96349541, -1.56961163e-07, -0.366225928, 0, 0, 0 ] + - [ -2.04789177, 1.96265563, 8.7315368e-07, -0.357951986, 0, 0, 0, -2.04769201, -1.96349541, -1.56286776e-07, -0.357565965, 0, 0, 0 ] + - [ -2.03496845, 1.96265568, 8.69367134e-07, -0.349246114, 0, 0, 0, -2.03477007, -1.96349541, -1.55609018e-07, -0.34886271, 0, 0, 0 ] + - [ -2.02198172, 1.96265572, 8.65562007e-07, -0.340497523, 0, 0, 0, -2.02178472, -1.96349541, -1.54927934e-07, -0.340116749, 0, 0, 0 ] + - [ -2.00893245, 1.96265576, 8.61738555e-07, -0.331706797, 0, 0, 0, -2.00873684, -1.96349541, -1.5424357e-07, -0.331328666, 0, 0, 0 ] + - [ -1.9958215, 1.96265581, 8.57897032e-07, -0.322874524, 0, 0, 0, -1.99562728, -1.96349541, -1.53555971e-07, -0.322499048, 0, 0, 0 ] + - [ -1.98264974, 1.96265585, 8.54037692e-07, -0.314001286, 0, 0, 0, -1.98245692, -1.96349541, -1.52865183e-07, -0.313628479, 0, 0, 0 ] + - [ -1.96941805, 1.9626559, 8.5016079e-07, -0.305087671, 0, 0, 0, -1.96922663, -1.96349541, -1.52171252e-07, -0.304717543, 0, 0, 0 ] + - [ -1.95612728, 1.96265594, 8.4626658e-07, -0.296134262, 0, 0, 0, -1.95593728, -1.96349541, -1.51474223e-07, -0.295766827, 0, 0, 0 ] + - [ -1.94277831, 1.96265599, 8.42355317e-07, -0.287141646, 0, 0, 0, -1.94258973, -1.96349541, -1.50774142e-07, -0.286776914, 0, 0, 0 ] + - [ -1.92937201, 1.96265603, 8.38427256e-07, -0.278110407, 0, 0, 0, -1.92918486, -1.96349541, -1.50071054e-07, -0.27774839, 0, 0, 0 ] + - [ -1.91590924, 1.96265608, 8.3448265e-07, -0.26904113, 0, 0, 0, -1.91572352, -1.96349541, -1.49365004e-07, -0.268681841, 0, 0, 0 ] + - [ -1.90239088, 1.96265612, 8.30521755e-07, -0.259934402, 0, 0, 0, -1.9022066, -1.96349541, -1.48656039e-07, -0.25957785, 0, 0, 0 ] + - [ -1.88881779, 1.96265617, 8.26544825e-07, -0.250790806, 0, 0, 0, -1.88863496, -1.96349541, -1.47944204e-07, -0.250437003, 0, 0, 0 ] + - [ -1.87519085, 1.96265622, 8.22552114e-07, -0.241610928, 0, 0, 0, -1.87500946, -1.96349541, -1.47229544e-07, -0.241259886, 0, 0, 0 ] + - [ -1.86151091, 1.96265626, 8.18543878e-07, -0.232395354, 0, 0, 0, -1.86133098, -1.96349541, -1.46512105e-07, -0.232047082, 0, 0, 0 ] + - [ -1.84777885, 1.96265631, 8.1452037e-07, -0.223144668, 0, 0, 0, -1.84760038, -1.96349541, -1.45791933e-07, -0.222799177, 0, 0, 0 ] + - [ -1.83399554, 1.96265635, 8.10481845e-07, -0.213859456, 0, 0, 0, -1.83381854, -1.96349541, -1.45069073e-07, -0.213516757, 0, 0, 0 ] + - [ -1.82016185, 1.9626564, 8.06428557e-07, -0.204540302, 0, 0, 0, -1.81998632, -1.96349541, -1.4434357e-07, -0.204200406, 0, 0, 0 ] + - [ -1.80627865, 1.96265645, 8.02360762e-07, -0.195187793, 0, 0, 0, -1.80610459, -1.96349541, -1.43615471e-07, -0.194850708, 0, 0, 0 ] + - [ -1.79234679, 1.96265649, 7.98278713e-07, -0.185802513, 0, 0, 0, -1.79217422, -1.96349541, -1.4288482e-07, -0.18546825, 0, 0, 0 ] + - [ -1.77836716, 1.96265654, 7.94182666e-07, -0.176385048, 0, 0, 0, -1.77819608, -1.96349541, -1.42151664e-07, -0.176053616, 0, 0, 0 ] + - [ -1.76434062, 1.96265659, 7.90072874e-07, -0.166935982, 0, 0, 0, -1.76417103, -1.96349541, -1.41416048e-07, -0.166607391, 0, 0, 0 ] + - [ -1.75026804, 1.96265664, 7.85949593e-07, -0.157455901, 0, 0, 0, -1.75009995, -1.96349541, -1.40678017e-07, -0.15713016, 0, 0, 0 ] + - [ -1.73615029, 1.96265668, 7.81813076e-07, -0.14794539, 0, 0, 0, -1.7359837, -1.96349541, -1.39937617e-07, -0.147622509, 0, 0, 0 ] + - [ -1.72198824, 1.96265673, 7.77663578e-07, -0.138405034, 0, 0, 0, -1.72182316, -1.96349541, -1.39194894e-07, -0.138085021, 0, 0, 0 ] + - [ -1.70778275, 1.96265678, 7.73501355e-07, -0.128835418, 0, 0, 0, -1.70761918, -1.96349541, -1.38449892e-07, -0.128518283, 0, 0, 0 ] + - [ -1.6935347, 1.96265683, 7.69326659e-07, -0.119237129, 0, 0, 0, -1.69337264, -1.96349541, -1.37702659e-07, -0.118922879, 0, 0, 0 ] + - [ -1.67924495, 1.96265688, 7.65139747e-07, -0.10961075, 0, 0, 0, -1.67908441, -1.96349541, -1.36953239e-07, -0.109299395, 0, 0, 0 ] + - [ -1.66491437, 1.96265692, 7.60940871e-07, -0.0999568667, 0, 0, 0, -1.66475536, -1.96349541, -1.36201677e-07, -0.0996484143, 0, 0, 0 ] + - [ -1.65054384, 1.96265697, 7.56730288e-07, -0.0902760649, 0, 0, 0, -1.65038635, -1.96349541, -1.3544802e-07, -0.0899705231, 0, 0, 0 ] + - [ -1.63613421, 1.96265702, 7.52508251e-07, -0.0805689295, 0, 0, 0, -1.63597826, -1.96349541, -1.34692313e-07, -0.0802663063, 0, 0, 0 ] + - [ -1.62168636, 1.96265707, 7.48275015e-07, -0.0708360456, 0, 0, 0, -1.62153195, -1.96349541, -1.33934601e-07, -0.0705363487, 0, 0, 0 ] + - [ -1.60720116, 1.96265712, 7.44030835e-07, -0.0610779986, 0, 0, 0, -1.60704829, -1.96349541, -1.3317493e-07, -0.0607812355, 0, 0, 0 ] + - [ -1.59267947, 1.96265717, 7.39775964e-07, -0.0512953734, 0, 0, 0, -1.59252815, -1.96349541, -1.32413346e-07, -0.0510015516, 0, 0, 0 ] + - [ -1.57812217, 1.96265722, 7.35510658e-07, -0.0414887554, 0, 0, 0, -1.57797239, -1.96349541, -1.31649894e-07, -0.0411978821, 0, 0, 0 ] + - [ -1.56353012, 1.96265727, 7.31235171e-07, -0.0316587297, 0, 0, 0, -1.56338189, -1.96349541, -1.3088462e-07, -0.031370812, 0, 0, 0 ] + - [ -1.54890419, 1.96265732, 7.26949757e-07, -0.0218058816, 0, 0, 0, -1.54875752, -1.96349541, -1.30117569e-07, -0.0215209262, 0, 0, 0 ] + - [ -1.53424525, 1.96265736, 7.22654672e-07, -0.0119307961, 0, 0, 0, -1.53410014, -1.96349541, -1.29348786e-07, -0.0116488098, 0, 0, 0 ] + - [ -1.51955417, 1.96265741, 7.18350169e-07, -0.0020340586, 0, 0, 0, -1.51941063, -1.96349541, -1.28578319e-07, -0.00175504789, 0, 0, 0 ] + - [ -1.50483182, 1.96265746, 7.14036504e-07, 0.00788374583, 0, 0, 0, -1.50468984, -1.96349541, -1.27806211e-07, 0.00815977463, 0, 0, 0 ] + - [ -1.49007907, 1.96265751, 7.0971393e-07, 0.017822032, 0, 0, 0, -1.48993866, -1.96349541, -1.27032508e-07, 0.0180950727, 0, 0, 0 ] + - [ -1.47529678, 1.96265756, 7.05382702e-07, 0.0277802146, 0, 0, 0, -1.47515794, -1.96349541, -1.26257257e-07, 0.0280502613, 0, 0, 0 ] + - [ -1.46048582, 1.96265761, 7.01043075e-07, 0.0377577086, 0, 0, 0, -1.46034856, -1.96349541, -1.25480502e-07, 0.0380247554, 0, 0, 0 ] + - [ -1.44564706, 1.96265766, 6.96695303e-07, 0.0477539287, 0, 0, 0, -1.44551138, -1.96349541, -1.24702289e-07, 0.04801797, 0, 0, 0 ] + - [ -1.43078138, 1.96265771, 6.92339641e-07, 0.0577682898, 0, 0, 0, -1.43064728, -1.96349541, -1.23922664e-07, 0.0580293202, 0, 0, 0 ] + - [ -1.41588964, 1.96265776, 6.87976343e-07, 0.0678002066, 0, 0, 0, -1.41575712, -1.96349541, -1.23141673e-07, 0.0680582208, 0, 0, 0 ] + - [ -1.4009727, 1.96265781, 6.83605664e-07, 0.077849094, 0, 0, 0, -1.40084177, -1.96349541, -1.2235936e-07, 0.0781040868, 0, 0, 0 ] + - [ -1.38603144, 1.96265786, 6.79227858e-07, 0.0879143667, 0, 0, 0, -1.3859021, -1.96349541, -1.21575771e-07, 0.0881663333, 0, 0, 0 ] + - [ -1.37106673, 1.96265792, 6.7484318e-07, 0.0979954396, 0, 0, 0, -1.37093898, -1.96349541, -1.20790953e-07, 0.0982443752, 0, 0, 0 ] + - [ -1.35607943, 1.96265797, 6.70451885e-07, 0.108091728, 0, 0, 0, -1.35595327, -1.96349541, -1.2000495e-07, 0.108337628, 0, 0, 0 ] + - [ -1.34107041, 1.96265802, 6.66054226e-07, 0.118202645, 0, 0, 0, -1.34094586, -1.96349541, -1.19217808e-07, 0.118445505, 0, 0, 0 ] + - [ -1.32604055, 1.96265807, 6.61650459e-07, 0.128327607, 0, 0, 0, -1.32591759, -1.96349541, -1.18429573e-07, 0.128567423, 0, 0, 0 ] + - [ -1.3109907, 1.96265812, 6.57240837e-07, 0.138466029, 0, 0, 0, -1.31086935, -1.96349541, -1.17640289e-07, 0.138702797, 0, 0, 0 ] + - [ -1.29592175, 1.96265817, 6.52825617e-07, 0.148617325, 0, 0, 0, -1.295802, -1.96349541, -1.16850004e-07, 0.148851041, 0, 0, 0 ] + - [ -1.28083455, 1.96265822, 6.48405051e-07, 0.15878091, 0, 0, 0, -1.2807164, -1.96349541, -1.16058762e-07, 0.15901157, 0, 0, 0 ] + - [ -1.26572998, 1.96265827, 6.43979395e-07, 0.168956199, 0, 0, 0, -1.26561344, -1.96349541, -1.15266609e-07, 0.169183799, 0, 0, 0 ] + - [ -1.2506089, 1.96265832, 6.39548902e-07, 0.179142606, 0, 0, 0, -1.25049397, -1.96349541, -1.1447359e-07, 0.179367144, 0, 0, 0 ] + - [ -1.23547219, 1.96265837, 6.35113829e-07, 0.189339547, 0, 0, 0, -1.23535887, -1.96349541, -1.13679751e-07, 0.189561019, 0, 0, 0 ] + - [ -1.22032071, 1.96265842, 6.30674428e-07, 0.199546436, 0, 0, 0, -1.220209, -1.96349541, -1.12885137e-07, 0.199764839, 0, 0, 0 ] + - [ -1.20515533, 1.96265847, 6.26230955e-07, 0.209762688, 0, 0, 0, -1.20504524, -1.96349541, -1.12089795e-07, 0.20997802, 0, 0, 0 ] + - [ -1.18997692, 1.96265853, 6.21783664e-07, 0.219987718, 0, 0, 0, -1.18986844, -1.96349541, -1.11293769e-07, 0.220199976, 0, 0, 0 ] + - [ -1.17478635, 1.96265858, 6.1733281e-07, 0.230220941, 0, 0, 0, -1.17467949, -1.96349541, -1.10497106e-07, 0.230430122, 0, 0, 0 ] + - [ -1.15958449, 1.96265863, 6.12878647e-07, 0.240461771, 0, 0, 0, -1.15947924, -1.96349541, -1.0969985e-07, 0.240667873, 0, 0, 0 ] + - [ -1.1443722, 1.96265868, 6.0842143e-07, 0.250709624, 0, 0, 0, -1.14426858, -1.96349541, -1.08902048e-07, 0.250912644, 0, 0, 0 ] + - [ -1.12915036, 1.96265873, 6.03961413e-07, 0.260963914, 0, 0, 0, -1.12904835, -1.96349541, -1.08103744e-07, 0.261163851, 0, 0, 0 ] + - [ -1.11391983, 1.96265878, 5.9949885e-07, 0.271224055, 0, 0, 0, -1.11381944, -1.96349541, -1.07304985e-07, 0.271420907, 0, 0, 0 ] + - [ -1.09868148, 1.96265883, 5.95033997e-07, 0.281489464, 0, 0, 0, -1.09858272, -1.96349541, -1.06505816e-07, 0.281683229, 0, 0, 0 ] + - [ -1.08343619, 1.96265888, 5.90567108e-07, 0.291759553, 0, 0, 0, -1.08333904, -1.96349541, -1.05706282e-07, 0.291950231, 0, 0, 0 ] + - [ -1.06818481, 1.96265894, 5.86098437e-07, 0.30203374, 0, 0, 0, -1.06808929, -1.96349541, -1.0490643e-07, 0.302221328, 0, 0, 0 ] + - [ -1.05292822, 1.96265899, 5.81628239e-07, 0.312311437, 0, 0, 0, -1.05283432, -1.96349541, -1.04106304e-07, 0.312495936, 0, 0, 0 ] + - [ -1.03766729, 1.96265904, 5.77156768e-07, 0.32259206, 0, 0, 0, -1.03757501, -1.96349541, -1.0330595e-07, 0.322773468, 0, 0, 0 ] + - [ -1.02240288, 1.96265909, 5.7268428e-07, 0.332875024, 0, 0, 0, -1.02231223, -1.96349541, -1.02505414e-07, 0.33305334, 0, 0, 0 ] + - [ -1.00713586, 1.96265914, 5.68211027e-07, 0.343159744, 0, 0, 0, -1.00704684, -1.96349541, -1.01704742e-07, 0.343334968, 0, 0, 0 ] + - [ -0.991867112, 1.96265919, 5.63737266e-07, 0.353445634, 0, 0, 0, -0.99177971, -1.96349541, -1.00903978e-07, 0.353617765, 0, 0, 0 ] + - [ -0.976597492, 1.96265924, 5.5926325e-07, 0.363732109, 0, 0, 0, -0.976511714, -1.96349541, -1.00103169e-07, 0.363901148, 0, 0, 0 ] + - [ -0.961327871, 1.9626593, 5.54789234e-07, 0.374018584, 0, 0, 0, -0.961243719, -1.96349541, -9.93023597e-08, 0.37418453, 0, 0, 0 ] + - [ -0.94605912, 1.96265935, 5.50315473e-07, 0.384304474, 0, 0, 0, -0.945976592, -1.96349541, -9.8501596e-08, 0.384467327, 0, 0, 0 ] + - [ -0.930792106, 1.9626594, 5.4584222e-07, 0.394589194, 0, 0, 0, -0.930711202, -1.96349541, -9.77009235e-08, 0.394748955, 0, 0, 0 ] + - [ -0.915527698, 1.96265945, 5.41369732e-07, 0.404872158, 0, 0, 0, -0.915448418, -1.96349541, -9.69003876e-08, 0.405028827, 0, 0, 0 ] + - [ -0.900266764, 1.9626595, 5.36898261e-07, 0.415152781, 0, 0, 0, -0.900189109, -1.96349541, -9.61000339e-08, 0.415306359, 0, 0, 0 ] + - [ -0.885010174, 1.96265955, 5.32428063e-07, 0.425430478, 0, 0, 0, -0.884934142, -1.96349541, -9.52999081e-08, 0.425580967, 0, 0, 0 ] + - [ -0.869758796, 1.96265961, 5.27959392e-07, 0.435704665, 0, 0, 0, -0.869684387, -1.96349541, -9.45000556e-08, 0.435852064, 0, 0, 0 ] + - [ -0.854513499, 1.96265966, 5.23492503e-07, 0.445974754, 0, 0, 0, -0.854440712, -1.96349541, -9.3700522e-08, 0.446119066, 0, 0, 0 ] + - [ -0.839275152, 1.96265971, 5.1902765e-07, 0.456240163, 0, 0, 0, -0.839203985, -1.96349541, -9.29013528e-08, 0.456381388, 0, 0, 0 ] + - [ -0.824044622, 1.96265976, 5.14565088e-07, 0.466500304, 0, 0, 0, -0.823975076, -1.96349541, -9.21025937e-08, 0.466638444, 0, 0, 0 ] + - [ -0.808822779, 1.96265981, 5.10105071e-07, 0.476754594, 0, 0, 0, -0.808754853, -1.96349541, -9.13042901e-08, 0.476889651, 0, 0, 0 ] + - [ -0.793610492, 1.96265986, 5.05647853e-07, 0.487002447, 0, 0, 0, -0.793544184, -1.96349541, -9.05064877e-08, 0.487134422, 0, 0, 0 ] + - [ -0.778408629, 1.96265991, 5.0119369e-07, 0.497243277, 0, 0, 0, -0.778343939, -1.96349541, -8.9709232e-08, 0.497372173, 0, 0, 0 ] + - [ -0.763218059, 1.96265996, 4.96742836e-07, 0.5074765, 0, 0, 0, -0.763154985, -1.96349541, -8.89125685e-08, 0.507602319, 0, 0, 0 ] + - [ -0.74803965, 1.96266002, 4.92295545e-07, 0.51770153, 0, 0, 0, -0.747978191, -1.96349541, -8.81165428e-08, 0.517824275, 0, 0, 0 ] + - [ -0.732874271, 1.96266007, 4.87852072e-07, 0.527917782, 0, 0, 0, -0.732814426, -1.96349541, -8.73212005e-08, 0.528037456, 0, 0, 0 ] + - [ -0.717722791, 1.96266012, 4.83412672e-07, 0.538124671, 0, 0, 0, -0.717664558, -1.96349541, -8.65265871e-08, 0.538241276, 0, 0, 0 ] + - [ -0.702586079, 1.96266017, 4.78977598e-07, 0.548321612, 0, 0, 0, -0.702529456, -1.96349541, -8.57327482e-08, 0.548435151, 0, 0, 0 ] + - [ -0.687465003, 1.96266022, 4.74547106e-07, 0.558508019, 0, 0, 0, -0.687409989, -1.96349541, -8.49397293e-08, 0.558618496, 0, 0, 0 ] + - [ -0.672360432, 1.96266027, 4.70121449e-07, 0.568683308, 0, 0, 0, -0.672307026, -1.96349541, -8.4147576e-08, 0.568790725, 0, 0, 0 ] + - [ -0.657273235, 1.96266032, 4.65700883e-07, 0.578846893, 0, 0, 0, -0.657221433, -1.96349541, -8.33563339e-08, 0.578951254, 0, 0, 0 ] + - [ -0.64220428, 1.96266037, 4.61285663e-07, 0.588998189, 0, 0, 0, -0.642154082, -1.96349541, -8.25660485e-08, 0.589099498, 0, 0, 0 ] + - [ -0.627154436, 1.96266042, 4.56876041e-07, 0.599136611, 0, 0, 0, -0.627105839, -1.96349541, -8.17767653e-08, 0.599234872, 0, 0, 0 ] + - [ -0.612124571, 1.96266047, 4.52472274e-07, 0.609261573, 0, 0, 0, -0.612077573, -1.96349541, -8.098853e-08, 0.60935679, 0, 0, 0 ] + - [ -0.597115555, 1.96266052, 4.48074616e-07, 0.61937249, 0, 0, 0, -0.597070154, -1.96349541, -8.0201388e-08, 0.619464667, 0, 0, 0 ] + - [ -0.582128256, 1.96266057, 4.4368332e-07, 0.629468778, 0, 0, 0, -0.58208445, -1.96349541, -7.9415385e-08, 0.62955792, 0, 0, 0 ] + - [ -0.567163543, 1.96266063, 4.39298642e-07, 0.639549851, 0, 0, 0, -0.567121328, -1.96349541, -7.86305665e-08, 0.639635962, 0, 0, 0 ] + - [ -0.552222283, 1.96266068, 4.34920836e-07, 0.649615124, 0, 0, 0, -0.552181659, -1.96349541, -7.7846978e-08, 0.649698208, 0, 0, 0 ] + - [ -0.537305347, 1.96266073, 4.30550157e-07, 0.659664011, 0, 0, 0, -0.53726631, -1.96349541, -7.70646652e-08, 0.659744074, 0, 0, 0 ] + - [ -0.522413603, 1.96266078, 4.26186859e-07, 0.669695928, 0, 0, 0, -0.52237615, -1.96349541, -7.62836735e-08, 0.669772975, 0, 0, 0 ] + - [ -0.507547919, 1.96266083, 4.21831197e-07, 0.679710289, 0, 0, 0, -0.507512048, -1.96349541, -7.55040486e-08, 0.679784325, 0, 0, 0 ] + - [ -0.492709164, 1.96266088, 4.17483425e-07, 0.689706509, 0, 0, 0, -0.492674871, -1.96349541, -7.47258359e-08, 0.68977754, 0, 0, 0 ] + - [ -0.477898207, 1.96266093, 4.13143798e-07, 0.699684003, 0, 0, 0, -0.47786549, -1.96349541, -7.39490811e-08, 0.699752034, 0, 0, 0 ] + - [ -0.463115916, 1.96266098, 4.0881257e-07, 0.709642186, 0, 0, 0, -0.463084772, -1.96349541, -7.31738297e-08, 0.709707222, 0, 0, 0 ] + - [ -0.448363161, 1.96266103, 4.04489996e-07, 0.719580472, 0, 0, 0, -0.448333586, -1.96349541, -7.24001272e-08, 0.71964252, 0, 0, 0 ] + - [ -0.433640809, 1.96266108, 4.00176331e-07, 0.729498277, 0, 0, 0, -0.433612801, -1.96349541, -7.16280192e-08, 0.729557343, 0, 0, 0 ] + - [ -0.418949729, 1.96266113, 3.95871828e-07, 0.739395014, 0, 0, 0, -0.418923285, -1.96349541, -7.08575514e-08, 0.739451105, 0, 0, 0 ] + - [ -0.404290791, 1.96266117, 3.91576743e-07, 0.7492701, 0, 0, 0, -0.404265906, -1.96349541, -7.00887691e-08, 0.749323221, 0, 0, 0 ] + - [ -0.389664863, 1.96266122, 3.87291329e-07, 0.759122948, 0, 0, 0, -0.389641534, -1.96349541, -6.93217181e-08, 0.759173107, 0, 0, 0 ] + - [ -0.375072813, 1.96266127, 3.83015842e-07, 0.768952973, 0, 0, 0, -0.375051037, -1.96349541, -6.85564437e-08, 0.769000177, 0, 0, 0 ] + - [ -0.360515511, 1.96266132, 3.78750536e-07, 0.778759591, 0, 0, 0, -0.360495283, -1.96349541, -6.77929917e-08, 0.778803847, 0, 0, 0 ] + - [ -0.345993824, 1.96266137, 3.74495666e-07, 0.788542217, 0, 0, 0, -0.345975141, -1.96349541, -6.70314076e-08, 0.788583531, 0, 0, 0 ] + - [ -0.331508622, 1.96266142, 3.70251485e-07, 0.798300264, 0, 0, 0, -0.33149148, -1.96349541, -6.62717369e-08, 0.798338644, 0, 0, 0 ] + - [ -0.317060773, 1.96266147, 3.66018249e-07, 0.808033148, 0, 0, 0, -0.317045169, -1.96349541, -6.55140251e-08, 0.808068601, 0, 0, 0 ] + - [ -0.302651146, 1.96266152, 3.61796212e-07, 0.817740283, 0, 0, 0, -0.302637075, -1.96349541, -6.47583179e-08, 0.817772818, 0, 0, 0 ] + - [ -0.288280609, 1.96266157, 3.57585629e-07, 0.827421085, 0, 0, 0, -0.288268068, -1.96349541, -6.40046608e-08, 0.827450709, 0, 0, 0 ] + - [ -0.273950032, 1.96266161, 3.53386754e-07, 0.837074968, 0, 0, 0, -0.273939015, -1.96349541, -6.32530993e-08, 0.83710169, 0, 0, 0 ] + - [ -0.259660283, 1.96266166, 3.49199841e-07, 0.846701347, 0, 0, 0, -0.259650786, -1.96349541, -6.2503679e-08, 0.846725174, 0, 0, 0 ] + - [ -0.245412231, 1.96266171, 3.45025145e-07, 0.856299636, 0, 0, 0, -0.24540425, -1.96349541, -6.17564455e-08, 0.856320578, 0, 0, 0 ] + - [ -0.231206743, 1.96266176, 3.40862922e-07, 0.865869252, 0, 0, 0, -0.231200274, -1.96349541, -6.10114443e-08, 0.865887316, 0, 0, 0 ] + - [ -0.21704469, 1.96266181, 3.36713424e-07, 0.875409608, 0, 0, 0, -0.217039728, -1.96349541, -6.0268721e-08, 0.875424804, 0, 0, 0 ] + - [ -0.20292694, 1.96266185, 3.32576907e-07, 0.884920119, 0, 0, 0, -0.202923479, -1.96349541, -5.95283211e-08, 0.884932455, 0, 0, 0 ] + - [ -0.18885436, 1.9626619, 3.28453626e-07, 0.8944002, 0, 0, 0, -0.188852397, -1.96349541, -5.87902902e-08, 0.894409686, 0, 0, 0 ] + - [ -0.174827821, 1.96266195, 3.24343834e-07, 0.903849266, 0, 0, 0, -0.17482735, -1.96349541, -5.80546739e-08, 0.903855911, 0, 0, 0 ] + - [ -0.160848191, 1.962662, 3.20247787e-07, 0.913266731, 0, 0, 0, -0.160849207, -1.96349541, -5.73215177e-08, 0.913270545, 0, 0, 0 ] + - [ -0.146916338, 1.96266204, 3.16165738e-07, 0.922652011, 0, 0, 0, -0.146918837, -1.96349541, -5.65908671e-08, 0.922653003, 0, 0, 0 ] + - [ -0.133033131, 1.96266209, 3.12097943e-07, 0.93200452, 0, 0, 0, -0.133037107, -1.96349541, -5.58627678e-08, 0.932002701, 0, 0, 0 ] + - [ -0.119199439, 1.96266214, 3.08044655e-07, 0.941323674, 0, 0, 0, -0.119204887, -1.96349541, -5.51372653e-08, 0.941319052, 0, 0, 0 ] + - [ -0.10541613, 1.96266218, 3.0400613e-07, 0.950608886, 0, 0, 0, -0.105423044, -1.96349541, -5.44144051e-08, 0.950601472, 0, 0, 0 ] + - [ -0.0916840732, 1.96266223, 2.99982622e-07, 0.959859572, 0, 0, 0, -0.0916924488, -1.96349541, -5.36942327e-08, 0.959849377, 0, 0, 0 ] + - [ -0.0780041374, 1.96266227, 2.95974386e-07, 0.969075146, 0, 0, 0, -0.0780139684, -1.96349541, -5.29767939e-08, 0.969062181, 0, 0, 0 ] + - [ -0.064377191, 1.96266232, 2.91981675e-07, 0.978255024, 0, 0, 0, -0.0643884719, -1.96349541, -5.2262134e-08, 0.978239298, 0, 0, 0 ] + - [ -0.0508041028, 1.96266237, 2.88004745e-07, 0.98739862, 0, 0, 0, -0.0508168279, -1.96349541, -5.15502988e-08, 0.987380145, 0, 0, 0 ] + - [ -0.0372857415, 1.96266241, 2.8404385e-07, 0.996505348, 0, 0, 0, -0.0372999048, -1.96349541, -5.08413336e-08, 0.996484136, 0, 0, 0 ] + - [ -0.0238229756, 1.96266246, 2.80099244e-07, 1.00557462, 0, 0, 0, -0.0238385714, -1.96349541, -5.01352842e-08, 1.00555069, 0, 0, 0 ] + - [ -0.010416674, 1.9626625, 2.76171183e-07, 1.01460586, 0, 0, 0, -0.0104336961, -1.96349541, -4.9432196e-08, 1.01457921, 0, 0, 0 ] + - [ 0.00293229481, 1.96266255, 2.7225992e-07, 1.02359848, 0, 0, 0, 0.00291385234, -1.96349541, -4.87321145e-08, 1.02356912, 0, 0, 0 ] + - [ 0.016223062, 1.96266259, 2.6836571e-07, 1.03255189, 0, 0, 0, 0.0162032055, -1.96349541, -4.80350855e-08, 1.03251984, 0, 0, 0 ] + - [ 0.029454759, 1.96266264, 2.64488808e-07, 1.0414655, 0, 0, 0, 0.0294334946, -1.96349541, -4.73411543e-08, 1.04143077, 0, 0, 0 ] + - [ 0.0426265171, 1.96266268, 2.60629468e-07, 1.05033874, 0, 0, 0, 0.0426038512, -1.96349541, -4.66503667e-08, 1.05030134, 0, 0, 0 ] + - [ 0.0557374675, 1.96266273, 2.56787945e-07, 1.05917102, 0, 0, 0, 0.0557134067, -1.96349541, -4.5962768e-08, 1.05913096, 0, 0, 0 ] + - [ 0.0687867417, 1.96266277, 2.52964493e-07, 1.06796174, 0, 0, 0, 0.0687612925, -1.96349541, -4.5278404e-08, 1.06791904, 0, 0, 0 ] + - [ 0.0817734709, 1.96266281, 2.49159367e-07, 1.07671033, 0, 0, 0, 0.08174664, -1.96349541, -4.45973201e-08, 1.076665, 0, 0, 0 ] + - [ 0.0946967865, 1.96266286, 2.45372821e-07, 1.0854162, 0, 0, 0, 0.0946685806, -1.96349541, -4.39195619e-08, 1.08536826, 0, 0, 0 ] + - [ 0.10755582, 1.9626629, 2.41605109e-07, 1.09407877, 0, 0, 0, 0.107526246, -1.96349541, -4.32451749e-08, 1.09402822, 0, 0, 0 ] + - [ 0.120349702, 1.96266294, 2.37856487e-07, 1.10269745, 0, 0, 0, 0.120318767, -1.96349541, -4.25742048e-08, 1.10264431, 0, 0, 0 ] + - [ 0.133077565, 1.96266299, 2.34127209e-07, 1.11127166, 0, 0, 0, 0.133045275, -1.96349541, -4.1906697e-08, 1.11121594, 0, 0, 0 ] + - [ 0.145738539, 1.96266303, 2.3041753e-07, 1.1198008, 0, 0, 0, 0.145704902, -1.96349541, -4.12426972e-08, 1.11974252, 0, 0, 0 ] + - [ 0.158331756, 1.96266307, 2.26727703e-07, 1.1282843, 0, 0, 0, 0.15829678, -1.96349541, -4.05822509e-08, 1.12822347, 0, 0, 0 ] + - [ 0.170856348, 1.96266311, 2.23057983e-07, 1.13672157, 0, 0, 0, 0.170820038, -1.96349541, -3.99254036e-08, 1.1366582, 0, 0, 0 ] + - [ 0.183311445, 1.96266316, 2.19408626e-07, 1.14511202, 0, 0, 0, 0.18327381, -1.96349541, -3.9272201e-08, 1.14504613, 0, 0, 0 ] + - [ 0.195696179, 1.9626632, 2.15779885e-07, 1.15345508, 0, 0, 0, 0.195657227, -1.96349541, -3.86226885e-08, 1.15338668, 0, 0, 0 ] + - [ 0.208009681, 1.96266324, 2.12172015e-07, 1.16175014, 0, 0, 0, 0.207969419, -1.96349541, -3.79769117e-08, 1.16167925, 0, 0, 0 ] + - [ 0.220251083, 1.96266328, 2.0858527e-07, 1.16999664, 0, 0, 0, 0.220209518, -1.96349541, -3.73349162e-08, 1.16992327, 0, 0, 0 ] + - [ 0.232419516, 1.96266332, 2.05019906e-07, 1.17819398, 0, 0, 0, 0.232376656, -1.96349541, -3.66967475e-08, 1.17811814, 0, 0, 0 ] + - [ 0.24451411, 1.96266336, 2.01476176e-07, 1.18634158, 0, 0, 0, 0.244469964, -1.96349541, -3.60624512e-08, 1.18626329, 0, 0, 0 ] + - [ 0.256533999, 1.9626634, 1.97954335e-07, 1.19443886, 0, 0, 0, 0.256488574, -1.96349541, -3.54320729e-08, 1.19435813, 0, 0, 0 ] + - [ 0.268478312, 1.96266344, 1.94454638e-07, 1.20248522, 0, 0, 0, 0.268431616, -1.96349541, -3.48056581e-08, 1.20240207, 0, 0, 0 ] + - [ 0.280346182, 1.96266348, 1.90977339e-07, 1.21048008, 0, 0, 0, 0.280298223, -1.96349541, -3.41832524e-08, 1.21039453, 0, 0, 0 ] + - [ 0.292136738, 1.96266352, 1.87522692e-07, 1.21842286, 0, 0, 0, 0.292087525, -1.96349541, -3.35649012e-08, 1.21833493, 0, 0, 0 ] + - [ 0.303849114, 1.96266356, 1.84090953e-07, 1.22631298, 0, 0, 0, 0.303798655, -1.96349541, -3.29506503e-08, 1.22622267, 0, 0, 0 ] + - [ 0.31548244, 1.9626636, 1.80682376e-07, 1.23414984, 0, 0, 0, 0.315430743, -1.96349541, -3.23405451e-08, 1.23405718, 0, 0, 0 ] + - [ 0.327035847, 1.96266364, 1.77297214e-07, 1.24193287, 0, 0, 0, 0.326982921, -1.96349541, -3.17346312e-08, 1.24183786, 0, 0, 0 ] + - [ 0.338508467, 1.96266368, 1.73935724e-07, 1.24966147, 0, 0, 0, 0.338454321, -1.96349541, -3.11329542e-08, 1.24956414, 0, 0, 0 ] + - [ 0.349899432, 1.96266372, 1.70598158e-07, 1.25733506, 0, 0, 0, 0.349844073, -1.96349541, -3.05355595e-08, 1.25723543, 0, 0, 0 ] + - [ 0.361207871, 1.96266376, 1.67284773e-07, 1.26495306, 0, 0, 0, 0.361151309, -1.96349541, -2.99424929e-08, 1.26485114, 0, 0, 0 ] + - [ 0.372432917, 1.96266379, 1.63995822e-07, 1.27251489, 0, 0, 0, 0.372375161, -1.96349541, -2.93537997e-08, 1.27241069, 0, 0, 0 ] + - [ 0.383573702, 1.96266383, 1.60731559e-07, 1.28001995, 0, 0, 0, 0.38351476, -1.96349541, -2.87695257e-08, 1.27991349, 0, 0, 0 ] + - [ 0.394629355, 1.96266387, 1.5749224e-07, 1.28746766, 0, 0, 0, 0.394569237, -1.96349541, -2.81897163e-08, 1.28735896, 0, 0, 0 ] + - [ 0.40559901, 1.9626639, 1.54278119e-07, 1.29485743, 0, 0, 0, 0.405537725, -1.96349541, -2.7614417e-08, 1.29474652, 0, 0, 0 ] + - [ 0.416481796, 1.96266394, 1.51089451e-07, 1.30218869, 0, 0, 0, 0.416419353, -1.96349541, -2.70436736e-08, 1.30207557, 0, 0, 0 ] + - [ 0.427276846, 1.96266398, 1.47926489e-07, 1.30946084, 0, 0, 0, 0.427213254, -1.96349541, -2.64775315e-08, 1.30934554, 0, 0, 0 ] + - [ 0.43798329, 1.96266401, 1.44789489e-07, 1.31667331, 0, 0, 0, 0.437918559, -1.96349541, -2.59160362e-08, 1.31655583, 0, 0, 0 ] + - [ 0.44860026, 1.96266405, 1.41678704e-07, 1.32382549, 0, 0, 0, 0.4485344, -1.96349541, -2.53592334e-08, 1.32370587, 0, 0, 0 ] + - [ 0.459126888, 1.96266409, 1.38594391e-07, 1.33091682, 0, 0, 0, 0.459059908, -1.96349541, -2.48071685e-08, 1.33079507, 0, 0, 0 ] + - [ 0.469562304, 1.96266412, 1.35536802e-07, 1.33794671, 0, 0, 0, 0.469494213, -1.96349541, -2.42598872e-08, 1.33782284, 0, 0, 0 ] + - [ 0.47990564, 1.96266416, 1.32506193e-07, 1.34491456, 0, 0, 0, 0.479836449, -1.96349541, -2.3717435e-08, 1.34478859, 0, 0, 0 ] + - [ 0.490156028, 1.96266419, 1.29502818e-07, 1.3518198, 0, 0, 0, 0.490085746, -1.96349541, -2.31798575e-08, 1.35169175, 0, 0, 0 ] + - [ 0.500312598, 1.96266422, 1.26526931e-07, 1.35866183, 0, 0, 0, 0.500241235, -1.96349541, -2.26472002e-08, 1.35853173, 0, 0, 0 ] + - [ 0.510374481, 1.96266426, 1.23578788e-07, 1.36544009, 0, 0, 0, 0.510302048, -1.96349541, -2.21195087e-08, 1.36530795, 0, 0, 0 ] + - [ 0.52034081, 1.96266429, 1.20658642e-07, 1.37215397, 0, 0, 0, 0.520267317, -1.96349541, -2.15968284e-08, 1.37201981, 0, 0, 0 ] + - [ 0.530210716, 1.96266433, 1.17766749e-07, 1.37880289, 0, 0, 0, 0.530136172, -1.96349541, -2.10792051e-08, 1.37866673, 0, 0, 0 ] + - [ 0.539983329, 1.96266436, 1.14903362e-07, 1.38538627, 0, 0, 0, 0.539907746, -1.96349541, -2.05666843e-08, 1.38524814, 0, 0, 0 ] + - [ 0.549657782, 1.96266439, 1.12068737e-07, 1.39190353, 0, 0, 0, 0.549581169, -1.96349541, -2.00593114e-08, 1.39176343, 0, 0, 0 ] + - [ 0.559233205, 1.96266442, 1.09263127e-07, 1.39835407, 0, 0, 0, 0.559155573, -1.96349541, -1.95571321e-08, 1.39821204, 0, 0, 0 ] + - [ 0.56870873, 1.96266445, 1.06486788e-07, 1.40473732, 0, 0, 0, 0.56863009, -1.96349541, -1.90601919e-08, 1.40459336, 0, 0, 0 ] + - [ 0.578083488, 1.96266449, 1.03739973e-07, 1.41105268, 0, 0, 0, 0.57800385, -1.96349541, -1.85685365e-08, 1.41090683, 0, 0, 0 ] + - [ 0.58735661, 1.96266452, 1.01022938e-07, 1.41729958, 0, 0, 0, 0.587275986, -1.96349541, -1.80822112e-08, 1.41715185, 0, 0, 0 ] + - [ 0.596527228, 1.96266455, 9.83359363e-08, 1.42347742, 0, 0, 0, 0.596445629, -1.96349541, -1.76012617e-08, 1.42332783, 0, 0, 0 ] + - [ 0.605594473, 1.96266458, 9.56792232e-08, 1.42958563, 0, 0, 0, 0.605511909, -1.96349541, -1.71257336e-08, 1.4294342, 0, 0, 0 ] + - [ 0.614557477, 1.96266461, 9.30530531e-08, 1.43562361, 0, 0, 0, 0.614473959, -1.96349541, -1.66556724e-08, 1.43547037, 0, 0, 0 ] + - [ 0.62341537, 1.96266464, 9.04576804e-08, 1.44159079, 0, 0, 0, 0.62333091, -1.96349541, -1.61911237e-08, 1.44143575, 0, 0, 0 ] + - [ 0.632167285, 1.96266467, 8.78933596e-08, 1.44748657, 0, 0, 0, 0.632081893, -1.96349541, -1.5732133e-08, 1.44732976, 0, 0, 0 ] + - [ 0.640812352, 1.9626647, 8.53603453e-08, 1.45331037, 0, 0, 0, 0.64072604, -1.96349541, -1.52787459e-08, 1.45315182, 0, 0, 0 ] + - [ 0.649349702, 1.96266473, 8.2858892e-08, 1.45906161, 0, 0, 0, 0.649262482, -1.96349541, -1.48310079e-08, 1.45890133, 0, 0, 0 ] + - [ 0.657778468, 1.96266476, 8.03892542e-08, 1.4647397, 0, 0, 0, 0.657690351, -1.96349541, -1.43889646e-08, 1.46457771, 0, 0, 0 ] + - [ 0.666097779, 1.96266478, 7.79516865e-08, 1.47034406, 0, 0, 0, 0.666008778, -1.96349541, -1.39526615e-08, 1.47018038, 0, 0, 0 ] + - [ 0.674306769, 1.96266481, 7.55464433e-08, 1.4758741, 0, 0, 0, 0.674216894, -1.96349541, -1.35221443e-08, 1.47570876, 0, 0, 0 ] + - [ 0.682404567, 1.96266484, 7.31737793e-08, 1.48132923, 0, 0, 0, 0.682313831, -1.96349541, -1.30974585e-08, 1.48116225, 0, 0, 0 ] + - [ 0.690390306, 1.96266487, 7.08339489e-08, 1.48670887, 0, 0, 0, 0.69029872, -1.96349541, -1.26786495e-08, 1.48654027, 0, 0, 0 ] + - [ 0.698263116, 1.96266489, 6.85272066e-08, 1.49201244, 0, 0, 0, 0.698170692, -1.96349541, -1.22657631e-08, 1.49184225, 0, 0, 0 ] + - [ 0.706022129, 1.96266492, 6.6253807e-08, 1.49723935, 0, 0, 0, 0.70592888, -1.96349541, -1.18588447e-08, 1.49706758, 0, 0, 0 ] + - [ 0.713666477, 1.96266494, 6.40140046e-08, 1.50238901, 0, 0, 0, 0.713572414, -1.96349541, -1.14579399e-08, 1.5022157, 0, 0, 0 ] + - [ 0.72119529, 1.96266497, 6.18080539e-08, 1.50746084, 0, 0, 0, 0.721100426, -1.96349541, -1.10630943e-08, 1.507286, 0, 0, 0 ] + - [ 0.7286077, 1.96266499, 5.96362094e-08, 1.51245426, 0, 0, 0, 0.728512047, -1.96349541, -1.06743533e-08, 1.51227792, 0, 0, 0 ] + - [ 0.735902838, 1.96266502, 5.74987257e-08, 1.51736867, 0, 0, 0, 0.735806409, -1.96349541, -1.02917627e-08, 1.51719086, 0, 0, 0 ] + - [ 0.743079836, 1.96266504, 5.53958573e-08, 1.5222035, 0, 0, 0, 0.742982643, -1.96349541, -9.91536788e-09, 1.52202423, 0, 0, 0 ] + - [ 0.750137824, 1.96266507, 5.33278588e-08, 1.52695816, 0, 0, 0, 0.750039881, -1.96349541, -9.54521445e-09, 1.52677746, 0, 0, 0 ] + - [ 0.757075935, 1.96266509, 5.12949845e-08, 1.53163206, 0, 0, 0, 0.756977253, -1.96349541, -9.18134796e-09, 1.53144996, 0, 0, 0 ] + - [ 0.763893299, 1.96266511, 4.92974892e-08, 1.53622462, 0, 0, 0, 0.763793892, -1.96349541, -8.82381398e-09, 1.53604114, 0, 0, 0 ] + - [ 0.770589048, 1.96266514, 4.73356272e-08, 1.54073526, 0, 0, 0, 0.770488929, -1.96349541, -8.47265806e-09, 1.54055041, 0, 0, 0 ] + - [ 0.777162313, 1.96266516, 4.54096531e-08, 1.54516338, 0, 0, 0, 0.777061494, -1.96349541, -8.12792576e-09, 1.5449772, 0, 0, 0 ] + - [ 0.783612225, 1.96266518, 4.35198215e-08, 1.5495084, 0, 0, 0, 0.783510721, -1.96349541, -7.78966264e-09, 1.54932092, 0, 0, 0 ] + - [ 0.789937917, 1.9626652, 4.16663868e-08, 1.55376974, 0, 0, 0, 0.789835739, -1.96349541, -7.45791424e-09, 1.55358098, 0, 0, 0 ] + - [ 0.796138518, 1.96266522, 3.98496037e-08, 1.55794682, 0, 0, 0, 0.79603568, -1.96349541, -7.13272614e-09, 1.5577568, 0, 0, 0 ] + - [ 0.802213161, 1.96266524, 3.80697265e-08, 1.56203904, 0, 0, 0, 0.802109677, -1.96349541, -6.81414389e-09, 1.56184779, 0, 0, 0 ] + - [ 0.808160976, 1.96266526, 3.63270098e-08, 1.56604582, 0, 0, 0, 0.80805686, -1.96349541, -6.50221305e-09, 1.56585337, 0, 0, 0 ] + - [ 0.813981096, 1.96266528, 3.46217083e-08, 1.56996658, 0, 0, 0, 0.81387636, -1.96349541, -6.19697917e-09, 1.56977295, 0, 0, 0 ] + - [ 0.819672651, 1.9626653, 3.29540763e-08, 1.57380073, 0, 0, 0, 0.819567309, -1.96349541, -5.89848781e-09, 1.57360595, 0, 0, 0 ] + - [ 0.825234772, 1.96266532, 3.13243684e-08, 1.57754769, 0, 0, 0, 0.825128839, -1.96349541, -5.60678453e-09, 1.57735178, 0, 0, 0 ] + - [ 0.830666592, 1.96266534, 2.97328391e-08, 1.58120687, 0, 0, 0, 0.830560081, -1.96349541, -5.32191489e-09, 1.58100986, 0, 0, 0 ] + - [ 0.835967241, 1.96266536, 2.8179743e-08, 1.58477769, 0, 0, 0, 0.835860166, -1.96349541, -5.04392444e-09, 1.5845796, 0, 0, 0 ] + - [ 0.84113585, 1.96266537, 2.66653346e-08, 1.58825955, 0, 0, 0, 0.841028225, -1.96349541, -4.77285874e-09, 1.58806042, 0, 0, 0 ] + - [ 0.846171552, 1.96266539, 2.51898684e-08, 1.59165188, 0, 0, 0, 0.846063391, -1.96349541, -4.50876336e-09, 1.59145173, 0, 0, 0 ] + - [ 0.851073477, 1.96266541, 2.37535989e-08, 1.5949541, 0, 0, 0, 0.850964794, -1.96349541, -4.25168384e-09, 1.59475295, 0, 0, 0 ] + - [ 0.855840756, 1.96266542, 2.23567806e-08, 1.5981656, 0, 0, 0, 0.855731567, -1.96349541, -4.00166574e-09, 1.59796349, 0, 0, 0 ] + - [ 0.860472522, 1.96266544, 2.09996682e-08, 1.60128582, 0, 0, 0, 0.860362839, -1.96349541, -3.75875463e-09, 1.60108277, 0, 0, 0 ] + - [ 0.864967904, 1.96266545, 1.9682516e-08, 1.60431416, 0, 0, 0, 0.864857743, -1.96349541, -3.52299606e-09, 1.60411021, 0, 0, 0 ] + - [ 0.869326035, 1.96266547, 1.84055787e-08, 1.60725005, 0, 0, 0, 0.869215411, -1.96349541, -3.29443558e-09, 1.60704521, 0, 0, 0 ] + - [ 0.873546046, 1.96266548, 1.71691107e-08, 1.61009288, 0, 0, 0, 0.873434973, -1.96349541, -3.07311876e-09, 1.60988719, 0, 0, 0 ] + - [ 0.877627069, 1.9626655, 1.59733666e-08, 1.61284209, 0, 0, 0, 0.877515561, -1.96349541, -2.85909115e-09, 1.61263557, 0, 0, 0 ] + - [ 0.881568234, 1.96266551, 1.48186008e-08, 1.61549708, 0, 0, 0, 0.881456306, -1.96349541, -2.65239832e-09, 1.61528976, 0, 0, 0 ] + - [ 0.885368672, 1.96266552, 1.3705068e-08, 1.61805727, 0, 0, 0, 0.885256341, -1.96349541, -2.45308581e-09, 1.61784918, 0, 0, 0 ] + - [ 0.889027516, 1.96266553, 1.26330227e-08, 1.62052207, 0, 0, 0, 0.888914795, -1.96349541, -2.26119918e-09, 1.62031324, 0, 0, 0 ] + - [ 0.892543896, 1.96266555, 1.16027193e-08, 1.6228909, 0, 0, 0, 0.892430801, -1.96349541, -2.076784e-09, 1.62268136, 0, 0, 0 ] + - [ 0.895916944, 1.96266556, 1.06144124e-08, 1.62516318, 0, 0, 0, 0.895803491, -1.96349541, -1.89988582e-09, 1.62495295, 0, 0, 0 ] + - [ 0.899145792, 1.96266557, 9.66835654e-09, 1.62733831, 0, 0, 0, 0.899031994, -1.96349541, -1.7305502e-09, 1.62712743, 0, 0, 0 ] + - [ 0.902229569, 1.96266558, 8.76480622e-09, 1.62941572, 0, 0, 0, 0.902115444, -1.96349541, -1.56882269e-09, 1.62920421, 0, 0, 0 ] + - [ 0.905167409, 1.96266559, 7.90401595e-09, 1.63139481, 0, 0, 0, 0.905052971, -1.96349541, -1.41474886e-09, 1.63118271, 0, 0, 0 ] + - [ 0.907958441, 1.9626656, 7.08624028e-09, 1.63327501, 0, 0, 0, 0.907843706, -1.96349541, -1.26837425e-09, 1.63306234, 0, 0, 0 ] + - [ 0.910601798, 1.96266561, 6.31173373e-09, 1.63505572, 0, 0, 0, 0.910486782, -1.96349541, -1.12974444e-09, 1.63484252, 0, 0, 0 ] + - [ 0.913096611, 1.96266562, 5.58075081e-09, 1.63673637, 0, 0, 0, 0.912981329, -1.96349541, -9.98904972e-10, 1.63652266, 0, 0, 0 ] + - [ 0.91544201, 1.96266562, 4.89354606e-09, 1.63831636, 0, 0, 0, 0.915326479, -1.96349541, -8.75901407e-10, 1.63810218, 0, 0, 0 ] + - [ 0.917637129, 1.96266563, 4.25037399e-09, 1.63979512, 0, 0, 0, 0.917521364, -1.96349541, -7.60779304e-10, 1.63958049, 0, 0, 0 ] + - [ 0.919681096, 1.96266564, 3.65148914e-09, 1.64117205, 0, 0, 0, 0.919565114, -1.96349541, -6.53584219e-10, 1.64095701, 0, 0, 0 ] + - [ 0.921573045, 1.96266564, 3.09714602e-09, 1.64244657, 0, 0, 0, 0.921456862, -1.96349541, -5.5436171e-10, 1.64223115, 0, 0, 0 ] + - [ 0.923312106, 1.96266565, 2.58759917e-09, 1.6436181, 0, 0, 0, 0.923195738, -1.96349541, -4.63157335e-10, 1.64340233, 0, 0, 0 ] + - [ 0.924897411, 1.96266566, 2.1231031e-09, 1.64468605, 0, 0, 0, 0.924780874, -1.96349541, -3.80016652e-10, 1.64446995, 0, 0, 0 ] + - [ 0.926328091, 1.96266566, 1.70391233e-09, 1.64564984, 0, 0, 0, 0.926211401, -1.96349541, -3.04985218e-10, 1.64543345, 0, 0, 0 ] + - [ 0.927603277, 1.96266566, 1.3302814e-09, 1.64650887, 0, 0, 0, 0.927486451, -1.96349541, -2.3810859e-10, 1.64629223, 0, 0, 0 ] + - [ 0.9287221, 1.96266567, 1.00246483e-09, 1.64726258, 0, 0, 0, 0.928605156, -1.96349541, -1.79432327e-10, 1.64704571, 0, 0, 0 ] + - [ 0.929683693, 1.96266567, 7.20717138e-10, 1.64791036, 0, 0, 0, 0.929566646, -1.96349541, -1.29001985e-10, 1.64769329, 0, 0, 0 ] + - [ 0.930487185, 1.96266567, 4.85292852e-10, 1.64845164, 0, 0, 0, 0.930370054, -1.96349541, -8.68631228e-11, 1.64823441, 0, 0, 0 ] + - [ 0.93113171, 1.96266568, 2.96446496e-10, 1.64888583, 0, 0, 0, 0.931014509, -1.96349541, -5.30612975e-11, 1.64866847, 0, 0, 0 ] + - [ 0.931616397, 1.96266568, 1.54432594e-10, 1.64921234, 0, 0, 0, 0.931499145, -1.96349541, -2.76420667e-11, 1.64899488, 0, 0, 0 ] + - [ 0.931940378, 1.96266568, 5.95056703e-11, 1.64943059, 0, 0, 0, 0.931823092, -1.96349541, -1.0650988e-11, 1.64921307, 0, 0, 0 ] + - [ 0.932102785, 1.96266568, 1.19202488e-11, 1.64954, 0, 0, 0, 0.931985482, -1.96349541, -2.13361896e-12, 1.64932244, 0, 0, 0 ] + - [ 0.932123127, 1.96266568, -2.21793021e-05, 1.64955315, -1.67084124e-05, 0, 0, 0.932005821, -1.96349541, 2.2186112e-05, 1.64933559, 1.67084858e-05, 0, 0 ] + - [ 0.932123129, 1.96266568, -0.000199130147, 1.64954877, -0.000150011385, 0, 0, 0.932005821, -1.96349541, 0.000199191249, 1.64933119, 0.000150012044, 0, 0 ] + - [ 0.932123132, 1.96266568, -0.000551795923, 1.64954005, -0.000415686273, 0, 0, 0.932005821, -1.96349541, 0.000551965227, 1.64932243, 0.0004156881, 0, 0 ] + - [ 0.932123137, 1.96266568, -0.00107888698, 1.64952701, -0.000812761541, 0, 0, 0.932005821, -1.96349541, 0.001079218, 1.64930933, 0.000812765113, 0, 0 ] + - [ 0.932123143, 1.96266568, -0.00177911366, 1.64950969, -0.00134026565, 0, 0, 0.932005821, -1.96349541, 0.00177965953, 1.64929192, 0.00134027154, 0, 0 ] + - [ 0.932123151, 1.96266568, -0.00265118632, 1.64948812, -0.00199722707, 0, 0, 0.932005821, -1.96349541, 0.00265199975, 1.64927025, 0.00199723584, 0, 0 ] + - [ 0.93212316, 1.96266568, -0.0036938153, 1.64946233, -0.00278267425, 0, 0, 0.932005821, -1.96349541, 0.00369494863, 1.64924434, 0.00278268648, 0, 0 ] + - [ 0.932123171, 1.96266568, -0.00490571097, 1.64943235, -0.00369563566, 0, 0, 0.932005821, -1.96349541, 0.00490721612, 1.64921422, 0.0036956519, 0, 0 ] + - [ 0.932123184, 1.96266568, -0.00628558365, 1.64939822, -0.00473513977, 0, 0, 0.932005821, -1.96349541, 0.00628751218, 1.64917993, 0.00473516058, 0, 0 ] + - [ 0.932123198, 1.96266568, -0.00783214371, 1.64935996, -0.00590021504, 0, 0, 0.932005821, -1.96349541, 0.00783454675, 1.64914149, 0.00590024097, 0, 0 ] + - [ 0.932123213, 1.96266568, -0.0095441015, 1.64931762, -0.00718988992, 0, 0, 0.932005821, -1.96349541, 0.00954702979, 1.64909895, 0.00718992152, 0, 0 ] + - [ 0.93212323, 1.96266568, -0.0114201674, 1.64927121, -0.00860319289, 0, 0, 0.932005821, -1.96349541, 0.0114236713, 1.64905232, 0.0086032307, 0, 0 ] + - [ 0.932123249, 1.96266568, -0.0134590516, 1.64922077, -0.0101391524, 0, 0, 0.932005821, -1.96349541, 0.0134631811, 1.64900165, 0.010139197, 0, 0 ] + - [ 0.932123269, 1.96266568, -0.0156594647, 1.64916634, -0.0117967969, 0, 0, 0.932005821, -1.96349541, 0.0156642693, 1.64894697, 0.0117968488, 0, 0 ] + - [ 0.93212329, 1.96266568, -0.0180201168, 1.64910795, -0.0135751549, 0, 0, 0.932005821, -1.96349541, 0.0180256457, 1.6488883, 0.0135752146, 0, 0 ] + - [ 0.932123313, 1.96266568, -0.0205397185, 1.64904563, -0.0154732549, 0, 0, 0.932005821, -1.96349541, 0.0205460204, 1.64882568, 0.0154733229, 0, 0 ] + - [ 0.932123337, 1.96266568, -0.0232169799, 1.6489794, -0.0174901252, 0, 0, 0.932005821, -1.96349541, 0.0232241033, 1.64875914, 0.0174902021, 0, 0 ] + - [ 0.932123363, 1.96266568, -0.0260506115, 1.64890931, -0.0196247944, 0, 0, 0.932005821, -1.96349541, 0.0260586043, 1.64868872, 0.0196248806, 0, 0 ] + - [ 0.93212339, 1.96266568, -0.0290393237, 1.64883538, -0.0218762909, 0, 0, 0.932005821, -1.96349541, 0.0290482334, 1.64861444, 0.021876387, 0, 0 ] + - [ 0.932123418, 1.96266568, -0.0321818267, 1.64875764, -0.0242436432, 0, 0, 0.932005821, -1.96349541, 0.0321917006, 1.64853635, 0.0242437497, 0, 0 ] + - [ 0.932123448, 1.96266568, -0.0354768309, 1.64867614, -0.0267258797, 0, 0, 0.932005821, -1.96349541, 0.0354877158, 1.64845446, 0.0267259972, 0, 0 ] + - [ 0.932123479, 1.96266568, -0.0389230467, 1.64859089, -0.029322029, 0, 0, 0.932005821, -1.96349541, 0.0389349889, 1.64836881, 0.0293221579, 0, 0 ] + - [ 0.932123512, 1.96266568, -0.0425191844, 1.64850194, -0.0320311195, 0, 0, 0.932005821, -1.96349541, 0.04253223, 1.64827944, 0.0320312602, 0, 0 ] + - [ 0.932123546, 1.96266568, -0.0462639543, 1.64840931, -0.0348521795, 0, 0, 0.932005821, -1.96349541, 0.0462781489, 1.64818637, 0.0348523327, 0, 0 ] + - [ 0.932123581, 1.96266568, -0.0501560669, 1.64831303, -0.0377842377, 0, 0, 0.932005821, -1.96349541, 0.0501714556, 1.64808964, 0.0377844038, 0, 0 ] + - [ 0.932123618, 1.96266568, -0.0541942324, 1.64821314, -0.0408263225, 0, 0, 0.932005821, -1.96349541, 0.0542108601, 1.64798929, 0.0408265019, 0, 0 ] + - [ 0.932123655, 1.96266568, -0.0583771612, 1.64810967, -0.0439774622, 0, 0, 0.932005821, -1.96349541, 0.0583950723, 1.64788533, 0.0439776555, 0, 0 ] + - [ 0.932123695, 1.96266568, -0.0627035637, 1.64800265, -0.0472366855, 0, 0, 0.932005821, -1.96349541, 0.0627228022, 1.64777781, 0.0472368931, 0, 0 ] + - [ 0.932123735, 1.96266568, -0.0671721502, 1.64789212, -0.0506030207, 0, 0, 0.932005821, -1.96349541, 0.0671927598, 1.64766675, 0.0506032431, 0, 0 ] + - [ 0.932123777, 1.96266568, -0.0717816311, 1.6477781, -0.0540754964, 0, 0, 0.932005821, -1.96349541, 0.0718036549, 1.6475522, 0.054075734, 0, 0 ] + - [ 0.93212382, 1.96266568, -0.0765307167, 1.64766062, -0.0576531409, 0, 0, 0.932005821, -1.96349541, 0.0765541975, 1.64743417, 0.0576533943, 0, 0 ] + - [ 0.932123864, 1.96266568, -0.0814181173, 1.64753973, -0.0613349828, 0, 0, 0.932005821, -1.96349541, 0.0814430977, 1.64731271, 0.0613352523, 0, 0 ] + - [ 0.932123909, 1.96266568, -0.0864425433, 1.64741544, -0.0651200504, 0, 0, 0.932005821, -1.96349541, 0.0864690653, 1.64718784, 0.0651203366, 0, 0 ] + - [ 0.932123956, 1.96266568, -0.0916027051, 1.6472878, -0.0690073724, 0, 0, 0.932005821, -1.96349541, 0.0916308103, 1.6470596, 0.0690076756, 0, 0 ] + - [ 0.932124004, 1.96266568, -0.0968973129, 1.64715683, -0.072995977, 0, 0, 0.932005821, -1.96349541, 0.0969270426, 1.64692801, 0.0729962978, 0, 0 ] + - [ 0.932124053, 1.96266568, -0.102325077, 1.64702257, -0.0770848929, 0, 0, 0.932005821, -1.96349541, 0.102356472, 1.64679312, 0.0770852317, 0, 0 ] + - [ 0.932124104, 1.96266568, -0.107884708, 1.64688505, -0.0812731484, 0, 0, 0.932005821, -1.96349541, 0.107917809, 1.64665495, 0.0812735056, 0, 0 ] + - [ 0.932124155, 1.96266568, -0.113574917, 1.64674429, -0.0855597721, 0, 0, 0.932005821, -1.96349541, 0.113609763, 1.64651354, 0.0855601481, 0, 0 ] + - [ 0.932124208, 1.96266568, -0.119394412, 1.64660034, -0.0899437923, 0, 0, 0.932005821, -1.96349541, 0.119431045, 1.64636891, 0.0899441876, 0, 0 ] + - [ 0.932124262, 1.96266568, -0.125341906, 1.64645322, -0.0944242376, 0, 0, 0.932005821, -1.96349541, 0.125380363, 1.6462211, 0.0944246525, 0, 0 ] + - [ 0.932124317, 1.96266568, -0.131416108, 1.64630297, -0.0990001363, 0, 0, 0.932005821, -1.96349541, 0.131456429, 1.64607014, 0.0990005714, 0, 0 ] + - [ 0.932124373, 1.96266568, -0.137615728, 1.64614961, -0.103670517, 0, 0, 0.932005821, -1.96349541, 0.137657951, 1.64591607, 0.103670973, 0, 0 ] + - [ 0.93212443, 1.96266568, -0.143939478, 1.64599319, -0.108434408, 0, 0, 0.932005821, -1.96349541, 0.143983641, 1.64575891, 0.108434885, 0, 0 ] + - [ 0.932124488, 1.96266568, -0.150386066, 1.64583372, -0.113290838, 0, 0, 0.932005821, -1.96349541, 0.150432207, 1.64559869, 0.113291336, 0, 0 ] + - [ 0.932124548, 1.96266568, -0.156954204, 1.64567125, -0.118238836, 0, 0, 0.932005821, -1.96349541, 0.15700236, 1.64543546, 0.118239355, 0, 0 ] + - [ 0.932124608, 1.96266568, -0.163642602, 1.64550581, -0.123277429, 0, 0, 0.932005821, -1.96349541, 0.16369281, 1.64526924, 0.123277971, 0, 0 ] + - [ 0.93212467, 1.96266568, -0.170449971, 1.64533742, -0.128405647, 0, 0, 0.932005821, -1.96349541, 0.170502267, 1.64510006, 0.128406211, 0, 0 ] + - [ 0.932124733, 1.96266568, -0.17737502, 1.64516612, -0.133622517, 0, 0, 0.932005821, -1.96349541, 0.177429441, 1.64492796, 0.133623104, 0, 0 ] + - [ 0.932124796, 1.96266568, -0.184416459, 1.64499194, -0.138927069, 0, 0, 0.932005821, -1.96349541, 0.184473041, 1.64475296, 0.138927679, 0, 0 ] + - [ 0.932124861, 1.96266568, -0.191573001, 1.64481492, -0.14431833, 0, 0, 0.932005821, -1.96349541, 0.191631779, 1.6445751, 0.144318964, 0, 0 ] + - [ 0.932124927, 1.96266568, -0.198843354, 1.64463508, -0.149795329, 0, 0, 0.932005821, -1.96349541, 0.198904362, 1.64439442, 0.149795987, 0, 0 ] + - [ 0.932124994, 1.96266568, -0.206226229, 1.64445245, -0.155357095, 0, 0, 0.932005821, -1.96349541, 0.206289502, 1.64421094, 0.155357778, 0, 0 ] + - [ 0.932125062, 1.96266568, -0.213720336, 1.64426708, -0.161002656, 0, 0, 0.932005821, -1.96349541, 0.213785909, 1.64402469, 0.161003364, 0, 0 ] + - [ 0.93212513, 1.96266568, -0.221324386, 1.64407898, -0.166731041, 0, 0, 0.932005821, -1.96349541, 0.221392292, 1.64383571, 0.166731773, 0, 0 ] + - [ 0.9321252, 1.96266568, -0.22903709, 1.6438882, -0.172541277, 0, 0, 0.932005821, -1.96349541, 0.229107362, 1.64364403, 0.172542035, 0, 0 ] + - [ 0.932125271, 1.96266568, -0.236857156, 1.64369476, -0.178432394, 0, 0, 0.932005821, -1.96349541, 0.236929828, 1.64344969, 0.178433178, 0, 0 ] + - [ 0.932125343, 1.96266568, -0.244783297, 1.6434987, -0.18440342, 0, 0, 0.932005821, -1.96349541, 0.2448584, 1.6432527, 0.184404231, 0, 0 ] + - [ 0.932125415, 1.96266568, -0.252814221, 1.64330004, -0.190453383, 0, 0, 0.932005821, -1.96349541, 0.252891789, 1.64305311, 0.19045422, 0, 0 ] + - [ 0.932125489, 1.96266568, -0.26094864, 1.64309883, -0.196581313, 0, 0, 0.932005821, -1.96349541, 0.261028704, 1.64285096, 0.196582176, 0, 0 ] + - [ 0.932125564, 1.96266568, -0.269185264, 1.64289509, -0.202786236, 0, 0, 0.932005821, -1.96349541, 0.269267855, 1.64264626, 0.202787127, 0, 0 ] + - [ 0.932125639, 1.96266568, -0.277522803, 1.64268885, -0.209067182, 0, 0, 0.932005821, -1.96349541, 0.277607952, 1.64243905, 0.209068101, 0, 0 ] + - [ 0.932125715, 1.96266568, -0.285959968, 1.64248015, -0.21542318, 0, 0, 0.932005821, -1.96349541, 0.286047705, 1.64222937, 0.215424126, 0, 0 ] + - [ 0.932125793, 1.96266568, -0.294495469, 1.64226901, -0.221853257, 0, 0, 0.932005821, -1.96349541, 0.294585825, 1.64201724, 0.221854232, 0, 0 ] + - [ 0.932125871, 1.96266568, -0.303128015, 1.64205547, -0.228356442, 0, 0, 0.932005821, -1.96349541, 0.30322102, 1.6418027, 0.228357446, 0, 0 ] + - [ 0.93212595, 1.96266568, -0.311856319, 1.64183957, -0.234931764, 0, 0, 0.932005821, -1.96349541, 0.311952001, 1.64158578, 0.234932797, 0, 0 ] + - [ 0.93212603, 1.96266568, -0.320679089, 1.64162133, -0.241578251, 0, 0, 0.932005821, -1.96349541, 0.320777478, 1.64136651, 0.241579313, 0, 0 ] + - [ 0.93212611, 1.96266568, -0.329595036, 1.64140078, -0.248294932, 0, 0, 0.932005821, -1.96349541, 0.329696161, 1.64114493, 0.248296023, 0, 0 ] + - [ 0.932126192, 1.96266568, -0.338602871, 1.64117796, -0.255080834, 0, 0, 0.932005821, -1.96349541, 0.33870676, 1.64092107, 0.255081955, 0, 0 ] + - [ 0.932126274, 1.96266568, -0.347701304, 1.6409529, -0.261934987, 0, 0, 0.932005821, -1.96349541, 0.347807985, 1.64069495, 0.261936138, 0, 0 ] + - [ 0.932126358, 1.96266568, -0.356889046, 1.64072563, -0.268856419, 0, 0, 0.932005821, -1.96349541, 0.356998545, 1.64046661, 0.268857601, 0, 0 ] + - [ 0.932126441, 1.96266568, -0.366164806, 1.64049619, -0.275844159, 0, 0, 0.932005821, -1.96349541, 0.366277151, 1.64023609, 0.275845371, 0, 0 ] + - [ 0.932126526, 1.96266568, -0.375527295, 1.64026459, -0.282897234, 0, 0, 0.932005821, -1.96349541, 0.375642513, 1.64000341, 0.282898477, 0, 0 ] + - [ 0.932126612, 1.96266568, -0.384975224, 1.64003089, -0.290014673, 0, 0, 0.932005821, -1.96349541, 0.38509334, 1.6397686, 0.290015948, 0, 0 ] + - [ 0.932126698, 1.96266568, -0.394507302, 1.6397951, -0.297195506, 0, 0, 0.932005821, -1.96349541, 0.394628343, 1.63953171, 0.297196812, 0, 0 ] + - [ 0.932126785, 1.96266568, -0.40412224, 1.63955726, -0.304438759, 0, 0, 0.932005821, -1.96349541, 0.404246231, 1.63929276, 0.304440097, 0, 0 ] + - [ 0.932126873, 1.96266568, -0.413818749, 1.63931741, -0.311743463, 0, 0, 0.932005821, -1.96349541, 0.413945715, 1.63905178, 0.311744833, 0, 0 ] + - [ 0.932126961, 1.96266568, -0.423595538, 1.63907557, -0.319108644, 0, 0, 0.932005821, -1.96349541, 0.423725504, 1.6388088, 0.319110047, 0, 0 ] + - [ 0.932127051, 1.96266568, -0.433451319, 1.63883177, -0.326533332, 0, 0, 0.932005821, -1.96349541, 0.433584309, 1.63856386, 0.326534767, 0, 0 ] + - [ 0.93212714, 1.96266568, -0.443384801, 1.63858606, -0.334016556, 0, 0, 0.932005821, -1.96349541, 0.443520838, 1.63831699, 0.334018024, 0, 0 ] + - [ 0.932127231, 1.96266568, -0.453394695, 1.63833845, -0.341557343, 0, 0, 0.932005821, -1.96349541, 0.453533803, 1.63806822, 0.341558844, 0, 0 ] + - [ 0.932127322, 1.96266568, -0.463479711, 1.63808899, -0.349154721, 0, 0, 0.932005821, -1.96349541, 0.463621914, 1.63781758, 0.349156256, 0, 0 ] + - [ 0.932127414, 1.96266568, -0.473638559, 1.6378377, -0.356807721, 0, 0, 0.932005821, -1.96349541, 0.473783879, 1.63756511, 0.356809289, 0, 0 ] + - [ 0.932127507, 1.96266568, -0.48386995, 1.63758461, -0.364515369, 0, 0, 0.932005821, -1.96349541, 0.48401841, 1.63731084, 0.364516971, 0, 0 ] + - [ 0.9321276, 1.96266568, -0.494172595, 1.63732976, -0.372276695, 0, 0, 0.932005821, -1.96349541, 0.494324215, 1.63705479, 0.372278331, 0, 0 ] + - [ 0.932127694, 1.96266568, -0.504545203, 1.63707318, -0.380090726, 0, 0, 0.932005821, -1.96349541, 0.504700006, 1.63679701, 0.380092397, 0, 0 ] + - [ 0.932127789, 1.96266568, -0.514986485, 1.63681491, -0.387956492, 0, 0, 0.932005821, -1.96349541, 0.515144491, 1.63653752, 0.387958197, 0, 0 ] + - [ 0.932127884, 1.96266568, -0.525495152, 1.63655496, -0.395873021, 0, 0, 0.932005821, -1.96349541, 0.525656382, 1.63627636, 0.395874761, 0, 0 ] + - [ 0.932127979, 1.96266568, -0.536069912, 1.63629338, -0.403839341, 0, 0, 0.932005821, -1.96349541, 0.536234387, 1.63601355, 0.403841116, 0, 0 ] + - [ 0.932128076, 1.96266568, -0.546709478, 1.6360302, -0.411854481, 0, 0, 0.932005821, -1.96349541, 0.546877218, 1.63574913, 0.411856291, 0, 0 ] + - [ 0.932128173, 1.96266568, -0.557412559, 1.63576545, -0.419917469, 0, 0, 0.932005821, -1.96349541, 0.557583583, 1.63548313, 0.419919314, 0, 0 ] + - [ 0.93212827, 1.96266568, -0.568177866, 1.63549916, -0.428027333, 0, 0, 0.932005821, -1.96349541, 0.568352193, 1.63521559, 0.428029214, 0, 0 ] + - [ 0.932128368, 1.96266568, -0.579004109, 1.63523136, -0.436183103, 0, 0, 0.932005821, -1.96349541, 0.579181757, 1.63494653, 0.43618502, 0, 0 ] + - [ 0.932128467, 1.96266568, -0.589889998, 1.63496208, -0.444383806, 0, 0, 0.932005821, -1.96349541, 0.590070986, 1.63467599, 0.444385759, 0, 0 ] + - [ 0.932128566, 1.96266568, -0.600834244, 1.63469136, -0.452628472, 0, 0, 0.932005821, -1.96349541, 0.60101859, 1.634404, 0.452630461, 0, 0 ] + - [ 0.932128665, 1.96266568, -0.611835557, 1.63441923, -0.460916128, 0, 0, 0.932005821, -1.96349541, 0.612023278, 1.63413059, 0.460918153, 0, 0 ] + - [ 0.932128765, 1.96266568, -0.622892647, 1.63414572, -0.469245803, 0, 0, 0.932005821, -1.96349541, 0.623083761, 1.6338558, 0.469247865, 0, 0 ] + - [ 0.932128866, 1.96266568, -0.634004226, 1.63387086, -0.477616525, 0, 0, 0.932005821, -1.96349541, 0.634198748, 1.63357965, 0.477618624, 0, 0 ] + - [ 0.932128967, 1.96266568, -0.645169002, 1.63359469, -0.486027323, 0, 0, 0.932005821, -1.96349541, 0.64536695, 1.63330218, 0.486029459, 0, 0 ] + - [ 0.932129069, 1.96266568, -0.656385686, 1.63331723, -0.494477226, 0, 0, 0.932005821, -1.96349541, 0.656587076, 1.63302342, 0.494479399, 0, 0 ] + - [ 0.932129171, 1.96266568, -0.66765299, 1.63303852, -0.502965261, 0, 0, 0.932005821, -1.96349541, 0.667857837, 1.6327434, 0.502967471, 0, 0 ] + - [ 0.932129273, 1.96266568, -0.678969622, 1.63275859, -0.511490458, 0, 0, 0.932005821, -1.96349541, 0.679177941, 1.63246216, 0.511492706, 0, 0 ] + - [ 0.932129376, 1.96266568, -0.690334294, 1.63247747, -0.520051844, 0, 0, 0.932005821, -1.96349541, 0.6905461, 1.63217972, 0.52005413, 0, 0 ] + - [ 0.932129479, 1.96266568, -0.701745716, 1.6321952, -0.528648449, 0, 0, 0.932005821, -1.96349541, 0.701961023, 1.63189612, 0.528650772, 0, 0 ] + - [ 0.932129583, 1.96266568, -0.713202598, 1.6319118, -0.5372793, 0, 0, 0.932005821, -1.96349541, 0.713421421, 1.63161139, 0.537281661, 0, 0 ] + - [ 0.932129687, 1.96266568, -0.724703651, 1.63162731, -0.545943427, 0, 0, 0.932005821, -1.96349541, 0.724926002, 1.63132556, 0.545945826, 0, 0 ] + - [ 0.932129791, 1.96266568, -0.736247585, 1.63134176, -0.554639857, 0, 0, 0.932005821, -1.96349541, 0.736473477, 1.63103866, 0.554642294, 0, 0 ] + - [ 0.932129896, 1.96266568, -0.747833109, 1.63105517, -0.563367619, 0, 0, 0.932005821, -1.96349541, 0.748062557, 1.63075074, 0.563370095, 0, 0 ] + - [ 0.932130002, 1.96266568, -0.759458936, 1.6307676, -0.572125742, 0, 0, 0.932005821, -1.96349541, 0.75969195, 1.63046181, 0.572128256, 0, 0 ] + - [ 0.932130107, 1.96266568, -0.771123774, 1.63047905, -0.580913253, 0, 0, 0.932005821, -1.96349541, 0.771360368, 1.63017191, 0.580915806, 0, 0 ] + - [ 0.932130213, 1.96266568, -0.782826335, 1.63018958, -0.589729182, 0, 0, 0.932005821, -1.96349541, 0.783066519, 1.62988107, 0.589731774, 0, 0 ] + - [ 0.932130319, 1.96266568, -0.794565328, 1.6298992, -0.598572557, 0, 0, 0.932005821, -1.96349541, 0.794809114, 1.62958933, 0.598575188, 0, 0 ] + - [ 0.932130426, 1.96266568, -0.806339464, 1.62960795, -0.607442407, 0, 0, 0.932005821, -1.96349541, 0.806586862, 1.62929672, 0.607445076, 0, 0 ] + - [ 0.932130533, 1.96266568, -0.818147454, 1.62931587, -0.616337759, 0, 0, 0.932005821, -1.96349541, 0.818398475, 1.62900326, 0.616340468, 0, 0 ] + - [ 0.93213064, 1.96266568, -0.829988007, 1.62902298, -0.625257643, 0, 0, 0.932005821, -1.96349541, 0.830242661, 1.62870899, 0.625260391, 0, 0 ] + - [ 0.932130747, 1.96266568, -0.841859834, 1.62872931, -0.634201086, 0, 0, 0.932005821, -1.96349541, 0.842118131, 1.62841395, 0.634203873, 0, 0 ] + - [ 0.932130855, 1.96266568, -0.853761646, 1.62843491, -0.643167118, 0, 0, 0.932005821, -1.96349541, 0.854023594, 1.62811816, 0.643169944, 0, 0 ] + - [ 0.932130963, 1.96266568, -0.865692152, 1.62813979, -0.652154766, 0, 0, 0.932005821, -1.96349541, 0.865957761, 1.62782166, 0.652157632, 0, 0 ] + - [ 0.932131071, 1.96266568, -0.877650064, 1.627844, -0.66116306, 0, 0, 0.932005821, -1.96349541, 0.877919341, 1.62752448, 0.661165965, 0, 0 ] + - [ 0.93213118, 1.96266568, -0.889634091, 1.62754756, -0.670191027, 0, 0, 0.932005821, -1.96349541, 0.889907045, 1.62722665, 0.670193972, 0, 0 ] + - [ 0.932131289, 1.96266568, -0.901642943, 1.62725051, -0.679237696, 0, 0, 0.932005821, -1.96349541, 0.901919582, 1.6269282, 0.679240681, 0, 0 ] + - [ 0.932131397, 1.96266568, -0.913675332, 1.62695287, -0.688302096, 0, 0, 0.932005821, -1.96349541, 0.913955663, 1.62662917, 0.68830512, 0, 0 ] + - [ 0.932131507, 1.96266568, -0.925729967, 1.62665469, -0.697383254, 0, 0, 0.932005821, -1.96349541, 0.926013996, 1.62632958, 0.697386319, 0, 0 ] + - [ 0.932131616, 1.96266568, -0.937805559, 1.62635598, -0.7064802, 0, 0, 0.932005821, -1.96349541, 0.938093294, 1.62602948, 0.706483305, 0, 0 ] + - [ 0.932131725, 1.96266568, -0.949900819, 1.62605679, -0.715591963, 0, 0, 0.932005821, -1.96349541, 0.950192264, 1.62572888, 0.715595107, 0, 0 ] + - [ 0.932131835, 1.96266568, -0.962014456, 1.62575715, -0.724717569, 0, 0, 0.932005821, -1.96349541, 0.962309617, 1.62542783, 0.724720754, 0, 0 ] + - [ 0.932131945, 1.96266568, -0.97414518, 1.62545708, -0.733856049, 0, 0, 0.932005821, -1.96349541, 0.974444064, 1.62512635, 0.733859274, 0, 0 ] + - [ 0.932132055, 1.96266568, -0.986291703, 1.62515662, -0.743006429, 0, 0, 0.932005821, -1.96349541, 0.986594314, 1.62482448, 0.743009695, 0, 0 ] + - [ 0.932132165, 1.96266568, -0.998452735, 1.6248558, -0.75216774, 0, 0, 0.932005821, -1.96349541, 0.998759076, 1.62452225, 0.752171045, 0, 0 ] + - [ 0.932132275, 1.96266568, -1.01062699, 1.62455466, -0.761339009, 0, 0, 0.932005821, -1.96349541, 1.01093706, 1.62421969, 0.761342355, 0, 0 ] + - [ 0.932132385, 1.96266568, -1.02281316, 1.62425322, -0.770519264, 0, 0, 0.932005821, -1.96349541, 1.02312698, 1.62391684, 0.77052265, 0, 0 ] + - [ 0.932132496, 1.96266568, -1.03500998, 1.62395152, -0.779707535, 0, 0, 0.932005821, -1.96349541, 1.03532754, 1.62361372, 0.779710961, 0, 0 ] + - [ 0.932132606, 1.96266568, -1.04721615, 1.62364958, -0.788902849, 0, 0, 0.932005821, -1.96349541, 1.04753746, 1.62331037, 0.788906316, 0, 0 ] + - [ 0.932132717, 1.96266568, -1.05943038, 1.62334745, -0.798104236, 0, 0, 0.932005821, -1.96349541, 1.05975543, 1.62300681, 0.798107743, 0, 0 ] + - [ 0.932132827, 1.96266568, -1.07165138, 1.62304515, -0.807310723, 0, 0, 0.932005821, -1.96349541, 1.07198018, 1.62270309, 0.807314271, 0, 0 ] + - [ 0.932132938, 1.96266568, -1.08387786, 1.62274271, -0.816521339, 0, 0, 0.932005821, -1.96349541, 1.08421042, 1.62239924, 0.816524927, 0, 0 ] + - [ 0.932133049, 1.96266568, -1.09610854, 1.62244017, -0.825735112, 0, 0, 0.932005821, -1.96349541, 1.09644484, 1.62209528, 0.825738741, 0, 0 ] + - [ 0.93213316, 1.96266568, -1.10834211, 1.62213756, -0.834951072, 0, 0, 0.932005821, -1.96349541, 1.10868217, 1.62179124, 0.834954741, 0, 0 ] + - [ 0.93213327, 1.96266568, -1.1205773, 1.62183491, -0.844168246, 0, 0, 0.932005821, -1.96349541, 1.12092111, 1.62148717, 0.844171955, 0, 0 ] + - [ 0.932133381, 1.96266568, -1.13281281, 1.62153225, -0.853385662, 0, 0, 0.932005821, -1.96349541, 1.13316037, 1.62118309, 0.853389413, 0, 0 ] + - [ 0.932133492, 1.96266568, -1.14504735, 1.62122962, -0.862602351, 0, 0, 0.932005821, -1.96349541, 1.14539867, 1.62087903, 0.862606141, 0, 0 ] + - [ 0.932133603, 1.96266568, -1.15727963, 1.62092704, -0.871817339, 0, 0, 0.932005821, -1.96349541, 1.15763471, 1.62057503, 0.87182117, 0, 0 ] + - [ 0.932133713, 1.96266568, -1.16950837, 1.62062454, -0.881029655, 0, 0, 0.932005821, -1.96349541, 1.1698672, 1.62027112, 0.881033527, 0, 0 ] + - [ 0.932133824, 1.96266568, -1.18173227, 1.62032217, -0.890238328, 0, 0, 0.932005821, -1.96349541, 1.18209485, 1.61996733, 0.89024224, 0, 0 ] + - [ 0.932133934, 1.96266568, -1.19395005, 1.62001995, -0.899442386, 0, 0, 0.932005821, -1.96349541, 1.19431637, 1.61966369, 0.899446339, 0, 0 ] + - [ 0.932134045, 1.96266568, -1.20616041, 1.61971791, -0.908640858, 0, 0, 0.932005821, -1.96349541, 1.20653048, 1.61936023, 0.908644851, 0, 0 ] + - [ 0.932134155, 1.96266568, -1.21836207, 1.61941609, -0.917832772, 0, 0, 0.932005821, -1.96349541, 1.21873588, 1.61905699, 0.917836805, 0, 0 ] + - [ 0.932134266, 1.96266568, -1.23055373, 1.61911451, -0.927017156, 0, 0, 0.932005821, -1.96349541, 1.23093128, 1.618754, 0.92702123, 0, 0 ] + - [ 0.932134376, 1.96266568, -1.2427341, 1.61881322, -0.93619304, 0, 0, 0.932005821, -1.96349541, 1.24311539, 1.61845129, 0.936197154, 0, 0 ] + - [ 0.932134486, 1.96266568, -1.2549019, 1.61851223, -0.945359451, 0, 0, 0.932005821, -1.96349541, 1.25528693, 1.61814889, 0.945363605, 0, 0 ] + - [ 0.932134596, 1.96266568, -1.26705584, 1.61821159, -0.954515418, 0, 0, 0.932005821, -1.96349541, 1.2674446, 1.61784684, 0.954519613, 0, 0 ] + - [ 0.932134706, 1.96266568, -1.27919463, 1.61791133, -0.96365997, 0, 0, 0.932005821, -1.96349541, 1.27958711, 1.61754516, 0.963664205, 0, 0 ] + - [ 0.932134816, 1.96266568, -1.29131697, 1.61761146, -0.972792134, 0, 0, 0.932005821, -1.96349541, 1.29171317, 1.61724389, 0.972796409, 0, 0 ] + - [ 0.932134925, 1.96266568, -1.30342158, 1.61731204, -0.98191094, 0, 0, 0.932005821, -1.96349541, 1.30382149, 1.61694306, 0.981915255, 0, 0 ] + - [ 0.932135035, 1.96266568, -1.31550717, 1.61701309, -0.991015415, 0, 0, 0.932005821, -1.96349541, 1.31591078, 1.61664271, 0.991019771, 0, 0 ] + - [ 0.932135144, 1.96266568, -1.32757244, 1.61671464, -1.00010459, 0, 0, 0.932005821, -1.96349541, 1.32797976, 1.61634286, 1.00010898, 0, 0 ] + - [ 0.932135253, 1.96266568, -1.33961611, 1.61641673, -1.00917749, 0, 0, 0.932005821, -1.96349541, 1.34002713, 1.61604354, 1.00918192, 0, 0 ] + - [ 0.932135362, 1.96266568, -1.3516369, 1.61611938, -1.01823315, 0, 0, 0.932005821, -1.96349541, 1.3520516, 1.6157448, 1.01823762, 0, 0 ] + - [ 0.93213547, 1.96266568, -1.3636335, 1.61582263, -1.02727059, 0, 0, 0.932005821, -1.96349541, 1.36405188, 1.61544666, 1.0272751, 0, 0 ] + - [ 0.932135579, 1.96266568, -1.37560463, 1.61552651, -1.03628884, 0, 0, 0.932005821, -1.96349541, 1.37602669, 1.61514914, 1.03629339, 0, 0 ] + - [ 0.932135687, 1.96266568, -1.387549, 1.61523105, -1.04528693, 0, 0, 0.932005821, -1.96349541, 1.38797472, 1.6148523, 1.04529152, 0, 0 ] + - [ 0.932135795, 1.96266568, -1.39946532, 1.61493629, -1.05426389, 0, 0, 0.932005821, -1.96349541, 1.3998947, 1.61455615, 1.05426852, 0, 0 ] + - [ 0.932135902, 1.96266568, -1.4113523, 1.61464225, -1.06321875, 0, 0, 0.932005821, -1.96349541, 1.41178532, 1.61426073, 1.06322342, 0, 0 ] + - [ 0.93213601, 1.96266568, -1.42320865, 1.61434897, -1.07215053, 0, 0, 0.932005821, -1.96349541, 1.42364531, 1.61396607, 1.07215525, 0, 0 ] + - [ 0.932136117, 1.96266568, -1.43503308, 1.61405648, -1.08105827, 0, 0, 0.932005821, -1.96349541, 1.43547337, 1.61367221, 1.08106302, 0, 0 ] + - [ 0.932136223, 1.96266568, -1.44682431, 1.61376481, -1.089941, 0, 0, 0.932005821, -1.96349541, 1.44726822, 1.61337917, 1.08994579, 0, 0 ] + - [ 0.93213633, 1.96266568, -1.45858103, 1.61347399, -1.09879773, 0, 0, 0.932005821, -1.96349541, 1.45902855, 1.61308699, 1.09880256, 0, 0 ] + - [ 0.932136436, 1.96266568, -1.47030197, 1.61318406, -1.1076275, 0, 0, 0.932005821, -1.96349541, 1.47075308, 1.61279569, 1.10763237, 0, 0 ] + - [ 0.932136542, 1.96266568, -1.48198583, 1.61289505, -1.11642935, 0, 0, 0.932005821, -1.96349541, 1.48244053, 1.61250532, 1.11643425, 0, 0 ] + - [ 0.932136647, 1.96266568, -1.49363132, 1.61260698, -1.12520228, 0, 0, 0.932005821, -1.96349541, 1.4940896, 1.6122159, 1.12520723, 0, 0 ] + - [ 0.932136752, 1.96266568, -1.50523716, 1.6123199, -1.13394535, 0, 0, 0.932005821, -1.96349541, 1.50569899, 1.61192747, 1.13395033, 0, 0 ] + - [ 0.932136857, 1.96266568, -1.51680205, 1.61203383, -1.14265757, 0, 0, 0.932005821, -1.96349541, 1.51726743, 1.61164006, 1.14266259, 0, 0 ] + - [ 0.932136961, 1.96266568, -1.52832471, 1.6117488, -1.15133797, 0, 0, 0.932005821, -1.96349541, 1.52879362, 1.61135369, 1.15134302, 0, 0 ] + - [ 0.932137065, 1.96266568, -1.53980383, 1.61146485, -1.15998558, 0, 0, 0.932005821, -1.96349541, 1.54027627, 1.61106841, 1.15999067, 0, 0 ] + - [ 0.932137169, 1.96266568, -1.55123815, 1.61118201, -1.16859942, 0, 0, 0.932005821, -1.96349541, 1.55171409, 1.61078424, 1.16860456, 0, 0 ] + - [ 0.932137272, 1.96266568, -1.56262636, 1.61090031, -1.17717854, 0, 0, 0.932005821, -1.96349541, 1.5631058, 1.61050122, 1.17718372, 0, 0 ] + - [ 0.932137374, 1.96266568, -1.57396717, 1.61061978, -1.18572195, 0, 0, 0.932005821, -1.96349541, 1.57445009, 1.61021937, 1.18572717, 0, 0 ] + - [ 0.932137477, 1.96266568, -1.5852593, 1.61034046, -1.19422869, 0, 0, 0.932005821, -1.96349541, 1.58574568, 1.60993874, 1.19423394, 0, 0 ] + - [ 0.932137578, 1.96266568, -1.59650145, 1.61006237, -1.20269778, 0, 0, 0.932005821, -1.96349541, 1.59699129, 1.60965934, 1.20270307, 0, 0 ] + - [ 0.93213768, 1.96266568, -1.60769235, 1.60978555, -1.21112825, 0, 0, 0.932005821, -1.96349541, 1.60818561, 1.60938122, 1.21113358, 0, 0 ] + - [ 0.93213778, 1.96266568, -1.61883068, 1.60951003, -1.21951914, 0, 0, 0.932005821, -1.96349541, 1.61932737, 1.60910441, 1.2195245, 0, 0 ] + - [ 0.932137881, 1.96266568, -1.62991518, 1.60923584, -1.22786946, 0, 0, 0.932005821, -1.96349541, 1.63041526, 1.60882893, 1.22787485, 0, 0 ] + - [ 0.932137981, 1.96266568, -1.64094454, 1.60896302, -1.23617824, 0, 0, 0.932005821, -1.96349541, 1.64144801, 1.60855483, 1.23618368, 0, 0 ] + - [ 0.93213808, 1.96266568, -1.65191748, 1.60869159, -1.24444453, 0, 0, 0.932005821, -1.96349541, 1.65242432, 1.60828212, 1.24444999, 0, 0 ] + - [ 0.932138179, 1.96266568, -1.66283271, 1.60842159, -1.25266733, 0, 0, 0.932005821, -1.96349541, 1.6633429, 1.60801085, 1.25267284, 0, 0 ] + - [ 0.932138277, 1.96266568, -1.67368894, 1.60815305, -1.26084569, 0, 0, 0.932005821, -1.96349541, 1.67420245, 1.60774105, 1.26085123, 0, 0 ] + - [ 0.932138375, 1.96266568, -1.68448487, 1.607886, -1.26897863, 0, 0, 0.932005821, -1.96349541, 1.6850017, 1.60747275, 1.2689842, 0, 0 ] + - [ 0.932138472, 1.96266568, -1.69521923, 1.60762047, -1.27706518, 0, 0, 0.932005821, -1.96349541, 1.69573935, 1.60720597, 1.27707079, 0, 0 ] + - [ 0.932138568, 1.96266568, -1.70589071, 1.6073565, -1.28510436, 0, 0, 0.932005821, -1.96349541, 1.70641411, 1.60694076, 1.28511001, 0, 0 ] + - [ 0.932138665, 1.96266568, -1.71649804, 1.60709411, -1.29309521, 0, 0, 0.932005821, -1.96349541, 1.71702469, 1.60667715, 1.29310089, 0, 0 ] + - [ 0.93213876, 1.96266568, -1.72703991, 1.60683335, -1.30103676, 0, 0, 0.932005821, -1.96349541, 1.7275698, 1.60641515, 1.30104248, 0, 0 ] + - [ 0.932138855, 1.96266568, -1.73751505, 1.60657423, -1.30892803, 0, 0, 0.932005821, -1.96349541, 1.73804815, 1.60615482, 1.30893378, 0, 0 ] + - [ 0.932138949, 1.96266568, -1.74792216, 1.6063168, -1.31676805, 0, 0, 0.932005821, -1.96349541, 1.74845845, 1.60589618, 1.31677383, 0, 0 ] + - [ 0.932139043, 1.96266568, -1.75825994, 1.60606108, -1.32455585, 0, 0, 0.932005821, -1.96349541, 1.75879941, 1.60563926, 1.32456167, 0, 0 ] + - [ 0.932139135, 1.96266568, -1.76852712, 1.60580711, -1.33229046, 0, 0, 0.932005821, -1.96349541, 1.76906974, 1.6053841, 1.33229631, 0, 0 ] + - [ 0.932139228, 1.96266568, -1.7787224, 1.60555492, -1.3399709, 0, 0, 0.932005821, -1.96349541, 1.77926814, 1.60513072, 1.33997679, 0, 0 ] + - [ 0.932139319, 1.96266568, -1.7888445, 1.60530454, -1.34759621, 0, 0, 0.932005821, -1.96349541, 1.78939334, 1.60487917, 1.34760213, 0, 0 ] + - [ 0.93213941, 1.96266568, -1.79889211, 1.605056, -1.35516542, 0, 0, 0.932005821, -1.96349541, 1.79944404, 1.60462946, 1.35517137, 0, 0 ] + - [ 0.932139501, 1.96266568, -1.80886396, 1.60480934, -1.36267754, 0, 0, 0.932005821, -1.96349541, 1.80941895, 1.60438164, 1.36268353, 0, 0 ] + - [ 0.93213959, 1.96266568, -1.81875875, 1.60456458, -1.37013162, 0, 0, 0.932005821, -1.96349541, 1.81931678, 1.60413573, 1.37013764, 0, 0 ] + - [ 0.932139679, 1.96266568, -1.8285752, 1.60432175, -1.37752668, 0, 0, 0.932005821, -1.96349541, 1.82913624, 1.60389177, 1.37753273, 0, 0 ] + - [ 0.932139767, 1.96266568, -1.83831201, 1.6040809, -1.38486174, 0, 0, 0.932005821, -1.96349541, 1.83887604, 1.60364978, 1.38486783, 0, 0 ] + - [ 0.932139855, 1.96266568, -1.8479679, 1.60384205, -1.39213584, 0, 0, 0.932005821, -1.96349541, 1.84853488, 1.60340981, 1.39214196, 0, 0 ] + - [ 0.932139941, 1.96266568, -1.85754157, 1.60360524, -1.399348, 0, 0, 0.932005821, -1.96349541, 1.85811149, 1.60317188, 1.39935415, 0, 0 ] + - [ 0.932140027, 1.96266568, -1.86703173, 1.60337049, -1.40649726, 0, 0, 0.932005821, -1.96349541, 1.86760457, 1.60293603, 1.40650344, 0, 0 ] + - [ 0.932140112, 1.96266568, -1.8764371, 1.60313783, -1.41358264, 0, 0, 0.932005821, -1.96349541, 1.87701282, 1.60270229, 1.41358885, 0, 0 ] + - [ 0.932140197, 1.96266568, -1.88575639, 1.60290731, -1.42060317, 0, 0, 0.932005821, -1.96349541, 1.88633497, 1.60247068, 1.42060941, 0, 0 ] + - [ 0.93214028, 1.96266568, -1.8949883, 1.60267895, -1.42755788, 0, 0, 0.932005821, -1.96349541, 1.89556971, 1.60224124, 1.42756415, 0, 0 ] + - [ 0.932140363, 1.96266568, -1.90413155, 1.60245278, -1.43444579, 0, 0, 0.932005821, -1.96349541, 1.90471576, 1.60201401, 1.43445209, 0, 0 ] + - [ 0.932140445, 1.96266568, -1.91318484, 1.60222884, -1.44126594, 0, 0, 0.932005821, -1.96349541, 1.91377184, 1.60178902, 1.44127227, 0, 0 ] + - [ 0.932140526, 1.96266568, -1.92214689, 1.60200715, -1.44801735, 0, 0, 0.932005821, -1.96349541, 1.92273664, 1.60156629, 1.44802372, 0, 0 ] + - [ 0.932140606, 1.96266568, -1.93101641, 1.60178775, -1.45469906, 0, 0, 0.932005821, -1.96349541, 1.93160888, 1.60134586, 1.45470545, 0, 0 ] + - [ 0.932140686, 1.96266568, -1.93979211, 1.60157067, -1.46131008, 0, 0, 0.932005821, -1.96349541, 1.94038727, 1.60112776, 1.46131651, 0, 0 ] + - [ 0.932140764, 1.96266568, -1.9484727, 1.60135595, -1.46784946, 0, 0, 0.932005821, -1.96349541, 1.94907052, 1.60091203, 1.46785591, 0, 0 ] + - [ 0.932140842, 1.96266568, -1.95705688, 1.60114361, -1.47431621, 0, 0, 0.932005821, -1.96349541, 1.95765734, 1.60069869, 1.47432269, 0, 0 ] + - [ 0.932140919, 1.96266568, -1.96554338, 1.60093369, -1.48070937, 0, 0, 0.932005821, -1.96349541, 1.96614644, 1.60048779, 1.48071588, 0, 0 ] + - [ 0.932140995, 1.96266568, -1.97393089, 1.60072621, -1.48702796, 0, 0, 0.932005821, -1.96349541, 1.97453652, 1.60027934, 1.4870345, 0, 0 ] + - [ 0.93214107, 1.96266568, -1.98221813, 1.60052122, -1.49327102, 0, 0, 0.932005821, -1.96349541, 1.98282631, 1.60007338, 1.49327758, 0, 0 ] + - [ 0.932141144, 1.96266568, -1.99040382, 1.60031873, -1.49943757, 0, 0, 0.932005821, -1.96349541, 1.9910145, 1.59986995, 1.49944416, 0, 0 ] + - [ 0.932141217, 1.96266568, -1.99848665, 1.6001188, -1.50552663, 0, 0, 0.932005821, -1.96349541, 1.99909982, 1.59966907, 1.50553325, 0, 0 ] + - [ 0.932141289, 1.96266568, -2.00646534, 1.59992143, -1.51153725, 0, 0, 0.932005821, -1.96349541, 2.00708096, 1.59947078, 1.51154389, 0, 0 ] + - [ 0.932141361, 1.96266568, -2.01433861, 1.59972668, -1.51746844, 0, 0, 0.932005821, -1.96349541, 2.01495664, 1.59927511, 1.51747511, 0, 0 ] + - [ 0.932141431, 1.96266568, -2.02210515, 1.59953456, -1.52331924, 0, 0, 0.932005821, -1.96349541, 2.02272557, 1.59908209, 1.52332594, 0, 0 ] + - [ 0.9321415, 1.96266568, -2.02976369, 1.59934512, -1.52908867, 0, 0, 0.932005821, -1.96349541, 2.03038646, 1.59889176, 1.52909539, 0, 0 ] + - [ 0.932141568, 1.96266568, -2.03731293, 1.59915838, -1.53477577, 0, 0, 0.932005821, -1.96349541, 2.03793801, 1.59870414, 1.53478251, 0, 0 ] + - [ 0.932141636, 1.96266568, -2.04475158, 1.59897438, -1.54037955, 0, 0, 0.932005821, -1.96349541, 2.04537895, 1.59851928, 1.54038632, 0, 0 ] + - [ 0.932141702, 1.96266568, -2.05207836, 1.59879314, -1.54589906, 0, 0, 0.932005821, -1.96349541, 2.05270797, 1.59833719, 1.54590585, 0, 0 ] + - [ 0.932141767, 1.96266568, -2.05929197, 1.59861471, -1.55133331, 0, 0, 0.932005821, -1.96349541, 2.05992379, 1.59815791, 1.55134013, 0, 0 ] + - [ 0.932141832, 1.96266568, -2.06639112, 1.5984391, -1.55668134, 0, 0, 0.932005821, -1.96349541, 2.06702512, 1.59798148, 1.55668818, 0, 0 ] + - [ 0.932141895, 1.96266568, -2.07337452, 1.59826636, -1.56194217, 0, 0, 0.932005821, -1.96349541, 2.07401067, 1.59780793, 1.56194903, 0, 0 ] + - [ 0.932141957, 1.96266568, -2.08024089, 1.59809651, -1.56711483, 0, 0, 0.932005821, -1.96349541, 2.08087915, 1.59763728, 1.56712172, 0, 0 ] + - [ 0.932142018, 1.96266568, -2.08698894, 1.59792959, -1.57219836, 0, 0, 0.932005821, -1.96349541, 2.08762926, 1.59746958, 1.57220527, 0, 0 ] + - [ 0.932142078, 1.96266568, -2.09361737, 1.59776563, -1.57719178, 0, 0, 0.932005821, -1.96349541, 2.09425972, 1.59730485, 1.57719871, 0, 0 ] + - [ 0.932142137, 1.96266568, -2.10012489, 1.59760466, -1.58209411, 0, 0, 0.932005821, -1.96349541, 2.10076925, 1.59714312, 1.58210107, 0, 0 ] + - [ 0.932142195, 1.96266568, -2.10651022, 1.59744671, -1.5869044, 0, 0, 0.932005821, -1.96349541, 2.10715653, 1.59698443, 1.58691137, 0, 0 ] + - [ 0.932142252, 1.96266568, -2.11277207, 1.59729181, -1.59162165, 0, 0, 0.932005821, -1.96349541, 2.1134203, 1.59682881, 1.59162865, 0, 0 ] + - [ 0.932142307, 1.96266568, -2.11890914, 1.59714001, -1.59624491, 0, 0, 0.932005821, -1.96349541, 2.11955926, 1.59667629, 1.59625193, 0, 0 ] + - [ 0.932142361, 1.96266568, -2.12492015, 1.59699132, -1.60077321, 0, 0, 0.932005821, -1.96349541, 2.12557211, 1.5965269, 1.60078024, 0, 0 ] + - [ 0.932142415, 1.96266568, -2.13080381, 1.59684578, -1.60520556, 0, 0, 0.932005821, -1.96349541, 2.13145757, 1.59638068, 1.60521262, 0, 0 ] + - [ 0.932142467, 1.96266568, -2.13655882, 1.59670342, -1.60954101, 0, 0, 0.932005821, -1.96349541, 2.13721435, 1.59623765, 1.60954808, 0, 0 ] + - [ 0.932142518, 1.96266568, -2.1421839, 1.59656428, -1.61377857, 0, 0, 0.932005821, -1.96349541, 2.14284116, 1.59609786, 1.61378566, 0, 0 ] + - [ 0.932142567, 1.96266568, -2.14767776, 1.59642838, -1.61791727, 0, 0, 0.932005821, -1.96349541, 2.1483367, 1.59596132, 1.61792438, 0, 0 ] + - [ 0.932142616, 1.96266568, -2.15303911, 1.59629576, -1.62195615, 0, 0, 0.932005821, -1.96349541, 2.15369969, 1.59582808, 1.62196328, 0, 0 ] + - [ 0.932142663, 1.96266568, -2.15826665, 1.59616645, -1.62589424, 0, 0, 0.932005821, -1.96349541, 2.15892884, 1.59569816, 1.62590139, 0, 0 ] + - [ 0.932142709, 1.96266568, -2.16335911, 1.59604048, -1.62973056, 0, 0, 0.932005821, -1.96349541, 2.16402286, 1.5955716, 1.62973772, 0, 0 ] + - [ 0.932142754, 1.96266568, -2.16831518, 1.59591789, -1.63346413, 0, 0, 0.932005821, -1.96349541, 2.16898046, 1.59544843, 1.63347131, 0, 0 ] + - [ 0.932142798, 1.96266568, -2.17313359, 1.5957987, -1.637094, 0, 0, 0.932005821, -1.96349541, 2.17380034, 1.59532868, 1.63710119, 0, 0 ] + - [ 0.93214284, 1.96266568, -2.17781303, 1.59568295, -1.64061918, 0, 0, 0.932005821, -1.96349541, 2.17848122, 1.59521239, 1.64062639, 0, 0 ] + - [ 0.932142881, 1.96266568, -2.18235223, 1.59557067, -1.64403871, 0, 0, 0.932005821, -1.96349541, 2.18302181, 1.59509958, 1.64404593, 0, 0 ] + - [ 0.932142921, 1.96266568, -2.18674988, 1.59546189, -1.64735161, 0, 0, 0.932005821, -1.96349541, 2.18742081, 1.59499029, 1.64735885, 0, 0 ] + - [ 0.93214296, 1.96266568, -2.19100471, 1.59535664, -1.65055691, 0, 0, 0.932005821, -1.96349541, 2.19167694, 1.59488454, 1.65056416, 0, 0 ] + - [ 0.932142997, 1.96266568, -2.19511542, 1.59525495, -1.65365364, 0, 0, 0.932005821, -1.96349541, 2.19578891, 1.59478238, 1.65366091, 0, 0 ] + - [ 0.932143033, 1.96266568, -2.19908072, 1.59515687, -1.65664084, 0, 0, 0.932005821, -1.96349541, 2.19975543, 1.59468384, 1.65664812, 0, 0 ] + - [ 0.932143067, 1.96266568, -2.20289932, 1.59506241, -1.65951752, 0, 0, 0.932005821, -1.96349541, 2.2035752, 1.59458893, 1.65952481, 0, 0 ] + - [ 0.932143101, 1.96266568, -2.20656993, 1.59497161, -1.66228271, 0, 0, 0.932005821, -1.96349541, 2.20724695, 1.59449771, 1.66229002, 0, 0 ] + - [ 0.932143132, 1.96266568, -2.21009127, 1.59488451, -1.66493545, 0, 0, 0.932005821, -1.96349541, 2.21076936, 1.5944102, 1.66494277, 0, 0 ] + - [ 0.932143163, 1.96266568, -2.21346204, 1.59480113, -1.66747477, 0, 0, 0.932005821, -1.96349541, 2.21414117, 1.59432643, 1.6674821, 0, 0 ] + - [ 0.932143192, 1.96266568, -2.21668096, 1.5947215, -1.66989968, 0, 0, 0.932005821, -1.96349541, 2.21736107, 1.59424643, 1.66990702, 0, 0 ] + - [ 0.93214322, 1.96266568, -2.21974673, 1.59464567, -1.67220923, 0, 0, 0.932005821, -1.96349541, 2.22042778, 1.59417024, 1.67221658, 0, 0 ] + - [ 0.932143246, 1.96266568, -2.22265806, 1.59457365, -1.67440243, 0, 0, 0.932005821, -1.96349541, 2.22334001, 1.59409788, 1.67440979, 0, 0 ] + - [ 0.932143271, 1.96266568, -2.22541367, 1.59450549, -1.67647833, 0, 0, 0.932005821, -1.96349541, 2.22609646, 1.5940294, 1.67648569, 0, 0 ] + - [ 0.932143295, 1.96266568, -2.22801226, 1.59444121, -1.67843593, 0, 0, 0.932005821, -1.96349541, 2.22869585, 1.59396482, 1.67844331, 0, 0 ] + - [ 0.932143317, 1.96266568, -2.23045255, 1.59438085, -1.68027428, 0, 0, 0.932005821, -1.96349541, 2.23113689, 1.59390417, 1.68028167, 0, 0 ] + - [ 0.932143337, 1.96266568, -2.23273324, 1.59432443, -1.68199241, 0, 0, 0.932005821, -1.96349541, 2.23341828, 1.59384749, 1.6819998, 0, 0 ] + - [ 0.932143357, 1.96266568, -2.23485305, 1.594272, -1.68358933, 0, 0, 0.932005821, -1.96349541, 2.23553874, 1.59379481, 1.68359673, 0, 0 ] + - [ 0.932143374, 1.96266568, -2.23681069, 1.59422357, -1.68506408, 0, 0, 0.932005821, -1.96349541, 2.23749698, 1.59374616, 1.68507149, 0, 0 ] + - [ 0.932143391, 1.96266568, -2.23860486, 1.59417919, -1.68641569, 0, 0, 0.932005821, -1.96349541, 2.2392917, 1.59370157, 1.6864231, 0, 0 ] + - [ 0.932143405, 1.96266568, -2.24023428, 1.59413889, -1.68764319, 0, 0, 0.932005821, -1.96349541, 2.24092162, 1.59366107, 1.6876506, 0, 0 ] + - [ 0.932143419, 1.96266568, -2.24169766, 1.59410269, -1.6887456, 0, 0, 0.932005821, -1.96349541, 2.24238545, 1.59362471, 1.68875302, 0, 0 ] + - [ 0.93214343, 1.96266568, -2.2429937, 1.59407063, -1.68972195, 0, 0, 0.932005821, -1.96349541, 2.24368189, 1.5935925, 1.68972938, 0, 0 ] + - [ 0.93214344, 1.96266568, -2.24412113, 1.59404274, -1.69057128, 0, 0, 0.932005821, -1.96349541, 2.24480966, 1.59356448, 1.69057871, 0, 0 ] + - [ 0.932143449, 1.96266568, -2.24507864, 1.59401905, -1.69129261, 0, 0, 0.932005821, -1.96349541, 2.24576747, 1.59354068, 1.69130004, 0, 0 ] + - [ 0.932143456, 1.96266568, -2.24586495, 1.5939996, -1.69188496, 0, 0, 0.932005821, -1.96349541, 2.24655402, 1.59352114, 1.69189239, 0, 0 ] + - [ 0.932143462, 1.96266568, -2.24647877, 1.59398442, -1.69234737, 0, 0, 0.932005821, -1.96349541, 2.24716803, 1.59350588, 1.69235481, 0, 0 ] + - [ 0.932143466, 1.96266568, -2.24691881, 1.59397354, -1.69267887, 0, 0, 0.932005821, -1.96349541, 2.2476082, 1.59349495, 1.69268631, 0, 0 ] + - [ 0.932143468, 1.96266568, -2.24718378, 1.59396698, -1.69287848, 0, 0, 0.932005821, -1.96349541, 2.24787325, 1.59348836, 1.69288592, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, 0, 0, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, 0, 0 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, -5.13320856e-05, 5.03255728e-05, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, -5.13350043e-05, -5.03513395e-05 ] + - [ 0.932143469, 1.96266568, -2.24727239, 1.59396479, -1.69294523, -0.000204857676, 0.000200840853, 0.932005821, -1.96349541, 2.24796189, 1.59348616, 1.69295267, -0.000204869324, -0.000200943684 ] + - [ 0.932143469, 1.96266568, -2.2472724, 1.59396479, -1.69294524, -0.00045987077, 0.000450853685, 0.932005821, -1.96349541, 2.2479619, 1.59348616, 1.69295268, -0.000459896918, -0.000451084522 ] + - [ 0.932143469, 1.96266568, -2.24727241, 1.59396479, -1.69294524, -0.000815665369, 0.00079967191, 0.932005821, -1.96349541, 2.2479619, 1.59348616, 1.69295268, -0.000815711748, -0.000800081342 ] + - [ 0.932143469, 1.96266568, -2.24727242, 1.59396479, -1.69294525, -0.00127153547, 0.00124660337, 0.932005821, -1.96349541, 2.24796191, 1.59348616, 1.69295268, -0.00127160777, -0.00124724163 ] + - [ 0.932143469, 1.96266568, -2.24727243, 1.59396479, -1.69294526, -0.00182677508, 0.00179095592, 0.932005821, -1.96349541, 2.24796192, 1.59348616, 1.69295269, -0.00182687895, -0.00179187288 ] + - [ 0.932143469, 1.96266568, -2.24727244, 1.59396479, -1.69294527, -0.00248067819, 0.00243203738, 0.932005821, -1.96349541, 2.24796193, 1.59348616, 1.6929527, -0.00248081924, -0.00243328258 ] + - [ 0.932143469, 1.96266568, -2.24727246, 1.59396479, -1.69294528, -0.00323253881, 0.00316915561, 0.932005821, -1.96349541, 2.24796194, 1.59348616, 1.69295271, -0.00323272261, -0.00317077822 ] + - [ 0.932143469, 1.96266568, -2.24727248, 1.59396479, -1.6929453, -0.00408165093, 0.00400161846, 0.932005821, -1.96349541, 2.24796195, 1.59348616, 1.69295272, -0.00408188301, -0.00400366728 ] + - [ 0.932143469, 1.96266568, -2.2472725, 1.59396479, -1.69294531, -0.00502730855, 0.00492873375, 0.932005821, -1.96349541, 2.24796197, 1.59348616, 1.69295273, -0.0050275944, -0.00493125726 ] + - [ 0.932143469, 1.96266568, -2.24727252, 1.59396479, -1.69294533, -0.00606880568, 0.00594980934, 0.932005821, -1.96349541, 2.24796198, 1.59348616, 1.69295274, -0.00606915075, -0.00595285564 ] + - [ 0.932143469, 1.96266568, -2.24727255, 1.59396479, -1.69294535, -0.00720543631, 0.00706415307, 0.932005821, -1.96349541, 2.247962, 1.59348616, 1.69295275, -0.00720584601, -0.00706776991 ] + - [ 0.932143469, 1.96266568, -2.24727258, 1.59396479, -1.69294537, -0.00843649445, 0.00827107278, 0.932005821, -1.96349541, 2.24796202, 1.59348616, 1.69295277, -0.00843697415, -0.00827530757 ] + - [ 0.932143469, 1.96266568, -2.2472726, 1.59396478, -1.69294539, -0.00976127409, 0.00956987632, 0.932005821, -1.96349541, 2.24796204, 1.59348616, 1.69295278, -0.00976182912, -0.00957477609 ] + - [ 0.932143469, 1.96266568, -2.24727264, 1.59396478, -1.69294542, -0.0111790692, 0.0109598715, 0.932005821, -1.96349541, 2.24796206, 1.59348616, 1.6929528, -0.0111797049, -0.010965483 ] + - [ 0.932143469, 1.96266568, -2.24727267, 1.59396478, -1.69294544, -0.0126891739, 0.0124403662, 0.932005821, -1.96349541, 2.24796208, 1.59348616, 1.69295282, -0.0126898954, -0.0124467357 ] + - [ 0.932143469, 1.96266568, -2.2472727, 1.59396478, -1.69294547, -0.014290882, 0.0140106683, 0.932005821, -1.96349541, 2.24796211, 1.59348615, 1.69295283, -0.0142916946, -0.0140178418 ] + - [ 0.932143469, 1.96266568, -2.24727274, 1.59396478, -1.69294549, -0.0159834877, 0.0156700856, 0.932005821, -1.96349541, 2.24796213, 1.59348615, 1.69295285, -0.0159843965, -0.0156781087 ] + - [ 0.932143469, 1.96266568, -2.24727278, 1.59396478, -1.69294552, -0.0177662849, 0.0174179259, 0.932005821, -1.96349541, 2.24796216, 1.59348615, 1.69295287, -0.017767295, -0.0174268439 ] + - [ 0.932143469, 1.96266568, -2.24727282, 1.59396478, -1.69294556, -0.0196385675, 0.0192534971, 0.932005821, -1.96349541, 2.24796219, 1.59348615, 1.6929529, -0.0196396842, -0.0192633549 ] + - [ 0.932143469, 1.96266568, -2.24727287, 1.59396478, -1.69294559, -0.0215996297, 0.021176107, 0.932005821, -1.96349541, 2.24796222, 1.59348615, 1.69295292, -0.0216008578, -0.0211869492 ] + - [ 0.932143469, 1.96266568, -2.24727291, 1.59396478, -1.69294562, -0.0236487654, 0.0231850635, 0.932005821, -1.96349541, 2.24796225, 1.59348615, 1.69295294, -0.02365011, -0.0231969342 ] + - [ 0.932143469, 1.96266568, -2.24727296, 1.59396478, -1.69294566, -0.0257852685, 0.0252796744, 0.932005821, -1.96349541, 2.24796228, 1.59348615, 1.69295297, -0.0257867347, -0.0252926176 ] + - [ 0.932143469, 1.96266568, -2.24727301, 1.59396477, -1.69294569, -0.0280084332, 0.0274592476, 0.932005821, -1.96349541, 2.24796232, 1.59348615, 1.69295299, -0.0280100258, -0.0274733067 ] + - [ 0.932143469, 1.96266568, -2.24727306, 1.59396477, -1.69294573, -0.0303175534, 0.0297230908, 0.932005821, -1.96349541, 2.24796235, 1.59348615, 1.69295302, -0.0303192773, -0.029738309 ] + - [ 0.932143469, 1.96266568, -2.24727311, 1.59396477, -1.69294577, -0.0327119231, 0.032070512, 0.932005821, -1.96349541, 2.24796239, 1.59348615, 1.69295304, -0.0327137831, -0.0320869321 ] + - [ 0.932143469, 1.96266568, -2.24727316, 1.59396477, -1.69294581, -0.0351908363, 0.034500819, 0.932005821, -1.96349541, 2.24796243, 1.59348615, 1.69295307, -0.0351928372, -0.0345184834 ] + - [ 0.932143469, 1.96266568, -2.24727322, 1.59396477, -1.69294586, -0.037753587, 0.0370133196, 0.932005821, -1.96349541, 2.24796246, 1.59348615, 1.6929531, -0.0377557336, -0.0370322704 ] + - [ 0.932143469, 1.96266568, -2.24727328, 1.59396477, -1.6929459, -0.0403994692, 0.0396073217, 0.932005821, -1.96349541, 2.24796251, 1.59348614, 1.69295313, -0.0404017663, -0.0396276007 ] + - [ 0.932143469, 1.96266568, -2.24727334, 1.59396477, -1.69294594, -0.0431277769, 0.0422821331, 0.932005821, -1.96349541, 2.24796255, 1.59348614, 1.69295316, -0.0431302291, -0.0423037816 ] + - [ 0.932143469, 1.96266568, -2.2472734, 1.59396477, -1.69294599, -0.0459378041, 0.0450370617, 0.932005821, -1.96349541, 2.24796259, 1.59348614, 1.6929532, -0.0459404161, -0.0450601206 ] + - [ 0.932143469, 1.96266568, -2.24727346, 1.59396476, -1.69294604, -0.0488288448, 0.0478714153, 0.932005821, -1.96349541, 2.24796263, 1.59348614, 1.69295323, -0.0488316212, -0.0478959254 ] + - [ 0.932143469, 1.96266568, -2.24727353, 1.59396476, -1.69294609, -0.051800193, 0.0507845017, 0.932005821, -1.96349541, 2.24796268, 1.59348614, 1.69295326, -0.0518031384, -0.0508105033 ] + - [ 0.932143469, 1.96266568, -2.2472736, 1.59396476, -1.69294614, -0.0548511427, 0.0537756288, 0.932005821, -1.96349541, 2.24796273, 1.59348614, 1.6929533, -0.0548542616, -0.0538031619 ] + - [ 0.932143469, 1.96266568, -2.24727367, 1.59396476, -1.69294619, -0.0579809879, 0.0568441044, 0.932005821, -1.96349541, 2.24796277, 1.59348614, 1.69295333, -0.0579842847, -0.0568732085 ] + - [ 0.932143469, 1.96266568, -2.24727374, 1.59396476, -1.69294624, -0.0611890227, 0.0599892364, 0.932005821, -1.96349541, 2.24796282, 1.59348614, 1.69295337, -0.0611925019, -0.0600199509 ] + - [ 0.932143469, 1.96266568, -2.24727381, 1.59396476, -1.6929463, -0.0644745409, 0.0632103326, 0.932005821, -1.96349541, 2.24796287, 1.59348614, 1.69295341, -0.0644782069, -0.0632426963 ] + - [ 0.932143469, 1.96266568, -2.24727388, 1.59396475, -1.69294635, -0.0678368366, 0.0665067009, 0.932005821, -1.96349541, 2.24796292, 1.59348613, 1.69295345, -0.0678406938, -0.0665407523 ] + - [ 0.932143469, 1.96266568, -2.24727396, 1.59396475, -1.69294641, -0.0712752039, 0.0698776491, 0.932005821, -1.96349541, 2.24796298, 1.59348613, 1.69295349, -0.0712792566, -0.0699134264 ] + - [ 0.932143469, 1.96266568, -2.24727404, 1.59396475, -1.69294647, -0.0747889366, 0.073322485, 0.932005821, -1.96349541, 2.24796303, 1.59348613, 1.69295353, -0.0747931891, -0.0733600261 ] + - [ 0.932143469, 1.96266568, -2.24727411, 1.59396475, -1.69294653, -0.0783773288, 0.0768405165, 0.932005821, -1.96349541, 2.24796308, 1.59348613, 1.69295357, -0.0783817854, -0.0768798588 ] + - [ 0.932143469, 1.96266568, -2.24727419, 1.59396475, -1.69294659, -0.0820396746, 0.0804310515, 0.932005821, -1.96349541, 2.24796314, 1.59348613, 1.69295361, -0.0820443393, -0.0804722321 ] + - [ 0.932143469, 1.96266568, -2.24727428, 1.59396474, -1.69294665, -0.0857752678, 0.0840933977, 0.932005821, -1.96349541, 2.2479632, 1.59348613, 1.69295365, -0.085780145, -0.0841364535 ] + - [ 0.932143469, 1.96266568, -2.24727436, 1.59396474, -1.69294671, -0.0895834026, 0.0878268631, 0.932005821, -1.96349541, 2.24796325, 1.59348613, 1.6929537, -0.0895884963, -0.0878718304 ] + - [ 0.932143469, 1.96266568, -2.24727445, 1.59396474, -1.69294678, -0.0934633728, 0.0916307554, 0.932005821, -1.96349541, 2.24796331, 1.59348612, 1.69295374, -0.0934686871, -0.0916776703 ] + - [ 0.932143469, 1.96266568, -2.24727453, 1.59396474, -1.69294684, -0.0974144726, 0.0955043825, 0.932005821, -1.96349541, 2.24796337, 1.59348612, 1.69295379, -0.0974200116, -0.0955532807 ] + - [ 0.932143469, 1.96266568, -2.24727462, 1.59396474, -1.69294691, -0.101435996, 0.0994470522, 0.932005821, -1.96349541, 2.24796343, 1.59348612, 1.69295383, -0.101441763, -0.0994979691 ] + - [ 0.932143469, 1.96266568, -2.24727471, 1.59396473, -1.69294698, -0.105527237, 0.103458072, 0.932005821, -1.96349541, 2.2479635, 1.59348612, 1.69295388, -0.105533237, -0.103511043 ] + - [ 0.932143469, 1.96266568, -2.2472748, 1.59396473, -1.69294705, -0.109687489, 0.107536751, 0.932005821, -1.96349541, 2.24796356, 1.59348612, 1.69295393, -0.109693726, -0.10759181 ] + - [ 0.932143469, 1.96266568, -2.2472749, 1.59396473, -1.69294712, -0.113916047, 0.111682396, 0.932005821, -1.96349541, 2.24796362, 1.59348612, 1.69295398, -0.113922524, -0.111739577 ] + - [ 0.932143469, 1.96266568, -2.24727499, 1.59396473, -1.69294719, -0.118212204, 0.115894315, 0.932005821, -1.96349541, 2.24796369, 1.59348612, 1.69295402, -0.118218925, -0.115953652 ] + - [ 0.932143469, 1.96266568, -2.24727509, 1.59396472, -1.69294726, -0.122575255, 0.120171815, 0.932005821, -1.96349541, 2.24796376, 1.59348611, 1.69295407, -0.122582224, -0.120233343 ] + - [ 0.932143469, 1.96266568, -2.24727518, 1.59396472, -1.69294733, -0.127004493, 0.124514206, 0.932005821, -1.96349541, 2.24796382, 1.59348611, 1.69295413, -0.127011714, -0.124577957 ] + - [ 0.932143469, 1.96266568, -2.24727528, 1.59396472, -1.69294741, -0.131499213, 0.128920794, 0.932005821, -1.96349541, 2.24796389, 1.59348611, 1.69295418, -0.13150669, -0.128986801 ] + - [ 0.932143469, 1.96266568, -2.24727538, 1.59396472, -1.69294748, -0.136058708, 0.133390887, 0.932005821, -1.96349541, 2.24796396, 1.59348611, 1.69295423, -0.136066444, -0.133459183 ] + - [ 0.932143469, 1.96266568, -2.24727549, 1.59396471, -1.69294756, -0.140682273, 0.137923793, 0.932005821, -1.96349541, 2.24796403, 1.59348611, 1.69295428, -0.140690272, -0.13799441 ] + - [ 0.932143469, 1.96266568, -2.24727559, 1.59396471, -1.69294764, -0.145369201, 0.142518821, 0.932005821, -1.96349541, 2.2479641, 1.59348611, 1.69295434, -0.145377467, -0.142591791 ] + - [ 0.932143469, 1.96266568, -2.24727569, 1.59396471, -1.69294772, -0.150118787, 0.147175278, 0.932005821, -1.96349541, 2.24796418, 1.5934861, 1.69295439, -0.150127323, -0.147250631 ] + - [ 0.932143469, 1.96266568, -2.2472758, 1.59396471, -1.6929478, -0.154930324, 0.151892471, 0.932005821, -1.96349541, 2.24796425, 1.5934861, 1.69295445, -0.154939133, -0.15197024 ] + - [ 0.932143469, 1.96266568, -2.24727591, 1.5939647, -1.69294788, -0.159803107, 0.156669709, 0.932005821, -1.96349541, 2.24796432, 1.5934861, 1.6929545, -0.159812193, -0.156749924 ] + - [ 0.932143469, 1.96266568, -2.24727601, 1.5939647, -1.69294796, -0.164736429, 0.161506299, 0.932005821, -1.96349541, 2.2479644, 1.5934861, 1.69295456, -0.164745796, -0.16158899 ] + - [ 0.932143469, 1.96266568, -2.24727612, 1.5939647, -1.69294804, -0.169729585, 0.16640155, 0.932005821, -1.96349541, 2.24796447, 1.5934861, 1.69295462, -0.169739236, -0.166486747 ] + - [ 0.932143469, 1.96266568, -2.24727624, 1.5939647, -1.69294813, -0.174781868, 0.171354769, 0.932005821, -1.96349541, 2.24796455, 1.59348609, 1.69295467, -0.174791806, -0.171442502 ] + - [ 0.932143469, 1.96266568, -2.24727635, 1.59396469, -1.69294821, -0.179892573, 0.176365263, 0.932005821, -1.96349541, 2.24796463, 1.59348609, 1.69295473, -0.179902802, -0.176455562 ] + - [ 0.932143469, 1.96266568, -2.24727646, 1.59396469, -1.6929483, -0.185060993, 0.181432342, 0.932005821, -1.96349541, 2.24796471, 1.59348609, 1.69295479, -0.185071516, -0.181525235 ] + - [ 0.932143469, 1.96266568, -2.24727658, 1.59396469, -1.69294838, -0.190286423, 0.186555312, 0.932005821, -1.96349541, 2.24796479, 1.59348609, 1.69295485, -0.190297243, -0.186650828 ] + - [ 0.932143469, 1.96266568, -2.24727669, 1.59396468, -1.69294847, -0.195568157, 0.191733482, 0.932005821, -1.96349541, 2.24796487, 1.59348609, 1.69295491, -0.195579277, -0.191831649 ] + - [ 0.932143469, 1.96266568, -2.24727681, 1.59396468, -1.69294856, -0.200905487, 0.196966159, 0.932005821, -1.96349541, 2.24796495, 1.59348608, 1.69295497, -0.200916911, -0.197067006 ] + - [ 0.932143469, 1.96266568, -2.24727693, 1.59396468, -1.69294865, -0.20629771, 0.202252652, 0.932005821, -1.96349541, 2.24796503, 1.59348608, 1.69295503, -0.20630944, -0.202356205 ] + - [ 0.932143469, 1.96266568, -2.24727705, 1.59396468, -1.69294874, -0.211744118, 0.207592267, 0.932005821, -1.96349541, 2.24796511, 1.59348608, 1.6929551, -0.211756157, -0.207698554 ] + - [ 0.932143469, 1.96266568, -2.24727717, 1.59396467, -1.69294883, -0.217244005, 0.212984313, 0.932005821, -1.96349541, 2.2479652, 1.59348608, 1.69295516, -0.217256357, -0.213093361 ] + - [ 0.932143469, 1.96266568, -2.24727729, 1.59396467, -1.69294892, -0.222796666, 0.218428098, 0.932005821, -1.96349541, 2.24796528, 1.59348608, 1.69295522, -0.222809334, -0.218539933 ] + - [ 0.932143469, 1.96266568, -2.24727741, 1.59396467, -1.69294901, -0.228401394, 0.22392293, 0.932005821, -1.96349541, 2.24796537, 1.59348607, 1.69295529, -0.228414381, -0.224037578 ] + - [ 0.932143469, 1.96266568, -2.24727754, 1.59396466, -1.69294911, -0.234057484, 0.229468116, 0.932005821, -1.96349541, 2.24796545, 1.59348607, 1.69295535, -0.234070792, -0.229585603 ] + - [ 0.932143469, 1.96266568, -2.24727766, 1.59396466, -1.6929492, -0.239764229, 0.235062964, 0.932005821, -1.96349541, 2.24796554, 1.59348607, 1.69295542, -0.239777862, -0.235183316 ] + - [ 0.932143469, 1.96266568, -2.24727779, 1.59396466, -1.6929493, -0.245520924, 0.240706782, 0.932005821, -1.96349541, 2.24796563, 1.59348607, 1.69295548, -0.245534884, -0.240830024 ] + - [ 0.932143469, 1.96266568, -2.24727792, 1.59396465, -1.69294939, -0.251326862, 0.246398878, 0.932005821, -1.96349541, 2.24796572, 1.59348607, 1.69295555, -0.251341153, -0.246525035 ] + - [ 0.932143469, 1.96266568, -2.24727805, 1.59396465, -1.69294949, -0.257181338, 0.252138561, 0.932005821, -1.96349541, 2.24796581, 1.59348606, 1.69295562, -0.257195962, -0.252267655 ] + - [ 0.932143469, 1.96266568, -2.24727818, 1.59396465, -1.69294959, -0.263083646, 0.257925136, 0.932005821, -1.96349541, 2.2479659, 1.59348606, 1.69295568, -0.263098604, -0.258057194 ] + - [ 0.932143469, 1.96266568, -2.24727831, 1.59396464, -1.69294969, -0.269033078, 0.263757913, 0.932005821, -1.96349541, 2.24796599, 1.59348606, 1.69295575, -0.269048376, -0.263892957 ] + - [ 0.932143469, 1.96266568, -2.24727844, 1.59396464, -1.69294979, -0.275028931, 0.2696362, 0.932005821, -1.96349541, 2.24796608, 1.59348606, 1.69295582, -0.275044569, -0.269774253 ] + - [ 0.932143469, 1.96266568, -2.24727857, 1.59396464, -1.69294989, -0.281070497, 0.275559303, 0.932005821, -1.96349541, 2.24796617, 1.59348605, 1.69295589, -0.281086478, -0.27570039 ] + - [ 0.932143469, 1.96266568, -2.24727871, 1.59396463, -1.69294999, -0.28715707, 0.281526532, 0.932005821, -1.96349541, 2.24796626, 1.59348605, 1.69295596, -0.287173398, -0.281670673 ] + - [ 0.932143469, 1.96266568, -2.24727884, 1.59396463, -1.69295009, -0.293287945, 0.287537194, 0.932005821, -1.96349541, 2.24796636, 1.59348605, 1.69295603, -0.293304621, -0.287684412 ] + - [ 0.932143469, 1.96266568, -2.24727898, 1.59396463, -1.69295019, -0.299462415, 0.293590596, 0.932005821, -1.96349541, 2.24796645, 1.59348605, 1.6929561, -0.299479443, -0.293740914 ] + - [ 0.932143469, 1.96266568, -2.24727911, 1.59396462, -1.69295029, -0.305679775, 0.299686046, 0.932005821, -1.96349541, 2.24796654, 1.59348604, 1.69295617, -0.305697156, -0.299839485 ] + - [ 0.932143469, 1.96266568, -2.24727925, 1.59396462, -1.6929504, -0.311939318, 0.305822853, 0.932005821, -1.96349541, 2.24796664, 1.59348604, 1.69295624, -0.311957055, -0.305979435 ] + - [ 0.932143469, 1.96266568, -2.24727939, 1.59396462, -1.6929505, -0.318240339, 0.312000325, 0.932005821, -1.96349541, 2.24796674, 1.59348604, 1.69295632, -0.318258434, -0.312160069 ] + - [ 0.932143469, 1.96266568, -2.24727953, 1.59396461, -1.69295061, -0.324582132, 0.318217768, 0.932005821, -1.96349541, 2.24796683, 1.59348604, 1.69295639, -0.324600587, -0.318380695 ] + - [ 0.932143469, 1.96266568, -2.24727967, 1.59396461, -1.69295071, -0.330963989, 0.324474491, 0.932005821, -1.96349541, 2.24796693, 1.59348604, 1.69295646, -0.330982808, -0.324640622 ] + - [ 0.932143469, 1.96266568, -2.24727981, 1.59396461, -1.69295082, -0.337385207, 0.330769802, 0.932005821, -1.96349541, 2.24796703, 1.59348603, 1.69295654, -0.33740439, -0.330939156 ] + - [ 0.932143469, 1.96266568, -2.24727995, 1.5939646, -1.69295093, -0.343845078, 0.337103009, 0.932005821, -1.96349541, 2.24796713, 1.59348603, 1.69295661, -0.343864629, -0.337275605 ] + - [ 0.932143469, 1.96266568, -2.2472801, 1.5939646, -1.69295103, -0.350342896, 0.343473419, 0.932005821, -1.96349541, 2.24796722, 1.59348603, 1.69295668, -0.350362816, -0.343649277 ] + - [ 0.932143469, 1.96266568, -2.24728024, 1.5939646, -1.69295114, -0.356877956, 0.34988034, 0.932005821, -1.96349541, 2.24796732, 1.59348603, 1.69295676, -0.356898248, -0.350059479 ] + - [ 0.932143469, 1.96266568, -2.24728039, 1.59396459, -1.69295125, -0.363449551, 0.356323081, 0.932005821, -1.96349541, 2.24796742, 1.59348602, 1.69295684, -0.363470217, -0.356505518 ] + - [ 0.932143469, 1.96266568, -2.24728053, 1.59396459, -1.69295136, -0.370056976, 0.362800948, 0.932005821, -1.96349541, 2.24796752, 1.59348602, 1.69295691, -0.370078018, -0.362986702 ] + - [ 0.932143469, 1.96266568, -2.24728068, 1.59396459, -1.69295147, -0.376699525, 0.36931325, 0.932005821, -1.96349541, 2.24796763, 1.59348602, 1.69295699, -0.376720944, -0.369502338 ] + - [ 0.932143469, 1.96266568, -2.24728082, 1.59396458, -1.69295158, -0.38337649, 0.375859295, 0.932005821, -1.96349541, 2.24796773, 1.59348602, 1.69295706, -0.383398289, -0.376051735 ] + - [ 0.932143469, 1.96266568, -2.24728097, 1.59396458, -1.69295169, -0.390087168, 0.38243839, 0.932005821, -1.96349541, 2.24796783, 1.59348601, 1.69295714, -0.390109348, -0.382634198 ] + - [ 0.932143469, 1.96266568, -2.24728112, 1.59396457, -1.6929518, -0.396830851, 0.389049844, 0.932005821, -1.96349541, 2.24796793, 1.59348601, 1.69295722, -0.396853414, -0.389249037 ] + - [ 0.932143469, 1.96266568, -2.24728127, 1.59396457, -1.69295192, -0.403606833, 0.395692964, 0.932005821, -1.96349541, 2.24796804, 1.59348601, 1.6929573, -0.403629782, -0.395895558 ] + - [ 0.932143469, 1.96266568, -2.24728142, 1.59396457, -1.69295203, -0.410414409, 0.402367057, 0.932005821, -1.96349541, 2.24796814, 1.59348601, 1.69295737, -0.410437745, -0.402573069 ] + - [ 0.932143469, 1.96266568, -2.24728157, 1.59396456, -1.69295214, -0.417252872, 0.409071433, 0.932005821, -1.96349541, 2.24796824, 1.593486, 1.69295745, -0.417276597, -0.409280877 ] + - [ 0.932143469, 1.96266568, -2.24728172, 1.59396456, -1.69295226, -0.424121517, 0.415805399, 0.932005821, -1.96349541, 2.24796835, 1.593486, 1.69295753, -0.424145633, -0.416018291 ] + - [ 0.932143469, 1.96266568, -2.24728187, 1.59396456, -1.69295237, -0.431019638, 0.422568261, 0.932005821, -1.96349541, 2.24796845, 1.593486, 1.69295761, -0.431044145, -0.422784616 ] + - [ 0.932143469, 1.96266568, -2.24728202, 1.59396455, -1.69295248, -0.437946527, 0.42935933, 0.932005821, -1.96349541, 2.24796856, 1.59348599, 1.69295769, -0.437971429, -0.429579162 ] + - [ 0.932143469, 1.96266568, -2.24728218, 1.59396455, -1.6929526, -0.444901481, 0.436177911, 0.932005821, -1.96349541, 2.24796866, 1.59348599, 1.69295777, -0.444926778, -0.436401234 ] + - [ 0.932143469, 1.96266568, -2.24728233, 1.59396455, -1.69295272, -0.451883792, 0.443023314, 0.932005821, -1.96349541, 2.24796877, 1.59348599, 1.69295785, -0.451909486, -0.443250142 ] + - [ 0.932143469, 1.96266568, -2.24728249, 1.59396454, -1.69295283, -0.458892754, 0.449894846, 0.932005821, -1.96349541, 2.24796888, 1.59348599, 1.69295793, -0.458918847, -0.450125192 ] + - [ 0.932143469, 1.96266568, -2.24728264, 1.59396454, -1.69295295, -0.465927662, 0.456791814, 0.932005821, -1.96349541, 2.24796898, 1.59348598, 1.69295801, -0.465954155, -0.457025691 ] + - [ 0.932143469, 1.96266568, -2.2472828, 1.59396453, -1.69295307, -0.472987809, 0.463713527, 0.932005821, -1.96349541, 2.24796909, 1.59348598, 1.69295809, -0.473014703, -0.463950948 ] + - [ 0.932143469, 1.96266568, -2.24728295, 1.59396453, -1.69295318, -0.48007249, 0.470659292, 0.932005821, -1.96349541, 2.2479692, 1.59348598, 1.69295817, -0.480099787, -0.47090027 ] + - [ 0.932143469, 1.96266568, -2.24728311, 1.59396453, -1.6929533, -0.487180999, 0.477628418, 0.932005821, -1.96349541, 2.24796931, 1.59348598, 1.69295825, -0.4872087, -0.477872964 ] + - [ 0.932143469, 1.96266568, -2.24728326, 1.59396452, -1.69295342, -0.494312629, 0.484620212, 0.932005821, -1.96349541, 2.24796942, 1.59348597, 1.69295833, -0.494340735, -0.484868337 ] + - [ 0.932143469, 1.96266568, -2.24728342, 1.59396452, -1.69295354, -0.501466674, 0.491633982, 0.932005821, -1.96349541, 2.24796953, 1.59348597, 1.69295842, -0.501495187, -0.491885698 ] + - [ 0.932143469, 1.96266568, -2.24728358, 1.59396451, -1.69295366, -0.508642429, 0.498669035, 0.932005821, -1.96349541, 2.24796964, 1.59348597, 1.6929585, -0.50867135, -0.498924354 ] + - [ 0.932143469, 1.96266568, -2.24728374, 1.59396451, -1.69295378, -0.515839187, 0.505724681, 0.932005821, -1.96349541, 2.24796974, 1.59348597, 1.69295858, -0.515868518, -0.505983611 ] + - [ 0.932143469, 1.96266568, -2.2472839, 1.59396451, -1.69295389, -0.523056243, 0.512800225, 0.932005821, -1.96349541, 2.24796985, 1.59348596, 1.69295866, -0.523085984, -0.513062779 ] + - [ 0.932143469, 1.96266568, -2.24728406, 1.5939645, -1.69295401, -0.530292891, 0.519894978, 0.932005821, -1.96349541, 2.24796996, 1.59348596, 1.69295875, -0.530323043, -0.520161164 ] + - [ 0.932143469, 1.96266568, -2.24728422, 1.5939645, -1.69295413, -0.537548423, 0.527008245, 0.932005821, -1.96349541, 2.24797008, 1.59348596, 1.69295883, -0.537578988, -0.527278073 ] + - [ 0.932143469, 1.96266568, -2.24728438, 1.59396449, -1.69295426, -0.544822136, 0.534139335, 0.932005821, -1.96349541, 2.24797019, 1.59348595, 1.69295891, -0.544853114, -0.534412814 ] + - [ 0.932143469, 1.96266568, -2.24728454, 1.59396449, -1.69295438, -0.552113322, 0.541287557, 0.932005821, -1.96349541, 2.2479703, 1.59348595, 1.692959, -0.552144715, -0.541564696 ] + - [ 0.932143469, 1.96266568, -2.2472847, 1.59396449, -1.6929545, -0.559421275, 0.548452217, 0.932005821, -1.96349541, 2.24797041, 1.59348595, 1.69295908, -0.559453084, -0.548733024 ] + - [ 0.932143469, 1.96266568, -2.24728486, 1.59396448, -1.69295462, -0.56674529, 0.555632623, 0.932005821, -1.96349541, 2.24797052, 1.59348595, 1.69295916, -0.566777515, -0.555917107 ] + - [ 0.932143469, 1.96266568, -2.24728502, 1.59396448, -1.69295474, -0.57408466, 0.562828084, 0.932005821, -1.96349541, 2.24797063, 1.59348594, 1.69295925, -0.574117303, -0.563116252 ] + - [ 0.932143469, 1.96266568, -2.24728518, 1.59396447, -1.69295486, -0.58143868, 0.570037908, 0.932005821, -1.96349541, 2.24797074, 1.59348594, 1.69295933, -0.581471741, -0.570329767 ] + - [ 0.932143469, 1.96266568, -2.24728534, 1.59396447, -1.69295498, -0.588806644, 0.577261401, 0.932005821, -1.96349541, 2.24797086, 1.59348594, 1.69295942, -0.588840123, -0.577556958 ] + - [ 0.932143469, 1.96266568, -2.24728551, 1.59396447, -1.69295511, -0.596187845, 0.584497872, 0.932005821, -1.96349541, 2.24797097, 1.59348593, 1.6929595, -0.596221744, -0.584797135 ] + - [ 0.932143469, 1.96266568, -2.24728567, 1.59396446, -1.69295523, -0.603581577, 0.591746629, 0.932005821, -1.96349541, 2.24797108, 1.59348593, 1.69295959, -0.603615897, -0.592049603 ] + - [ 0.932143469, 1.96266568, -2.24728583, 1.59396446, -1.69295535, -0.610987135, 0.59900698, 0.932005821, -1.96349541, 2.24797119, 1.59348593, 1.69295967, -0.611021876, -0.599313671 ] + - [ 0.932143469, 1.96266568, -2.24728599, 1.59396445, -1.69295547, -0.618403812, 0.606278232, 0.932005821, -1.96349541, 2.24797131, 1.59348593, 1.69295976, -0.618438975, -0.606588646 ] + - [ 0.932143469, 1.96266568, -2.24728616, 1.59396445, -1.6929556, -0.625830903, 0.613559694, 0.932005821, -1.96349541, 2.24797142, 1.59348592, 1.69295984, -0.625866488, -0.613873836 ] + - [ 0.932143469, 1.96266568, -2.24728632, 1.59396445, -1.69295572, -0.633267702, 0.620850672, 0.932005821, -1.96349541, 2.24797153, 1.59348592, 1.69295993, -0.633303709, -0.621168547 ] + - [ 0.932143469, 1.96266568, -2.24728649, 1.59396444, -1.69295584, -0.640713502, 0.628150476, 0.932005821, -1.96349541, 2.24797165, 1.59348592, 1.69296001, -0.640749932, -0.628472089 ] + - [ 0.932143469, 1.96266568, -2.24728665, 1.59396444, -1.69295597, -0.648167597, 0.635458412, 0.932005821, -1.96349541, 2.24797176, 1.59348592, 1.6929601, -0.648204452, -0.635783767 ] + - [ 0.932143469, 1.96266568, -2.24728681, 1.59396443, -1.69295609, -0.655629282, 0.64277379, 0.932005821, -1.96349541, 2.24797187, 1.59348591, 1.69296018, -0.655666561, -0.643102889 ] + - [ 0.932143469, 1.96266568, -2.24728698, 1.59396443, -1.69295621, -0.66309785, 0.650095915, 0.932005821, -1.96349541, 2.24797199, 1.59348591, 1.69296027, -0.663135554, -0.650428764 ] + - [ 0.932143469, 1.96266568, -2.24728714, 1.59396443, -1.69295634, -0.670572596, 0.657424097, 0.932005821, -1.96349541, 2.2479721, 1.59348591, 1.69296035, -0.670610725, -0.657760698 ] + - [ 0.932143469, 1.96266568, -2.24728731, 1.59396442, -1.69295646, -0.678052814, 0.664757644, 0.932005821, -1.96349541, 2.24797221, 1.5934859, 1.69296044, -0.678091368, -0.665097999 ] + - [ 0.932143469, 1.96266568, -2.24728747, 1.59396442, -1.69295659, -0.685537797, 0.672095862, 0.932005821, -1.96349541, 2.24797233, 1.5934859, 1.69296053, -0.685576776, -0.672439975 ] + - [ 0.932143469, 1.96266568, -2.24728764, 1.59396441, -1.69295671, -0.693026839, 0.67943806, 0.932005821, -1.96349541, 2.24797244, 1.5934859, 1.69296061, -0.693066244, -0.679785932 ] + - [ 0.932143469, 1.96266568, -2.2472878, 1.59396441, -1.69295683, -0.700519235, 0.686783546, 0.932005821, -1.96349541, 2.24797256, 1.5934859, 1.6929607, -0.700559066, -0.687135179 ] + - [ 0.932143469, 1.96266568, -2.24728797, 1.59396441, -1.69295696, -0.708014278, 0.694131628, 0.932005821, -1.96349541, 2.24797267, 1.59348589, 1.69296078, -0.708054536, -0.694487023 ] + - [ 0.932143469, 1.96266568, -2.24728813, 1.5939644, -1.69295708, -0.715511263, 0.701481613, 0.932005821, -1.96349541, 2.24797279, 1.59348589, 1.69296087, -0.715551947, -0.701840771 ] + - [ 0.932143469, 1.96266568, -2.2472883, 1.5939644, -1.69295721, -0.723009484, 0.708832809, 0.932005821, -1.96349541, 2.2479729, 1.59348589, 1.69296096, -0.723050594, -0.709195731 ] + - [ 0.932143469, 1.96266568, -2.24728846, 1.59396439, -1.69295733, -0.730508234, 0.716184525, 0.932005821, -1.96349541, 2.24797301, 1.59348588, 1.69296104, -0.73054977, -0.716551211 ] + - [ 0.932143469, 1.96266568, -2.24728863, 1.59396439, -1.69295746, -0.738006807, 0.723536067, 0.932005821, -1.96349541, 2.24797313, 1.59348588, 1.69296113, -0.73804877, -0.723906517 ] + - [ 0.932143469, 1.96266568, -2.24728879, 1.59396439, -1.69295758, -0.745504498, 0.730886744, 0.932005821, -1.96349541, 2.24797324, 1.59348588, 1.69296121, -0.745546887, -0.731260958 ] + - [ 0.932143469, 1.96266568, -2.24728896, 1.59396438, -1.6929577, -0.7530006, 0.738235864, 0.932005821, -1.96349541, 2.24797336, 1.59348588, 1.6929613, -0.753043416, -0.73861384 ] + - [ 0.932143469, 1.96266568, -2.24728912, 1.59396438, -1.69295783, -0.760494408, 0.745582734, 0.932005821, -1.96349541, 2.24797347, 1.59348587, 1.69296139, -0.76053765, -0.745964472 ] + - [ 0.932143469, 1.96266568, -2.24728929, 1.59396437, -1.69295795, -0.767985216, 0.752926663, 0.932005821, -1.96349541, 2.24797358, 1.59348587, 1.69296147, -0.768028883, -0.753312161 ] + - [ 0.932143469, 1.96266568, -2.24728945, 1.59396437, -1.69295808, -0.775472316, 0.760266958, 0.932005821, -1.96349541, 2.2479737, 1.59348587, 1.69296156, -0.77551641, -0.760656214 ] + - [ 0.932143469, 1.96266568, -2.24728962, 1.59396437, -1.6929582, -0.782955005, 0.767602927, 0.932005821, -1.96349541, 2.24797381, 1.59348586, 1.69296164, -0.782999524, -0.767995939 ] + - [ 0.932143469, 1.96266568, -2.24728978, 1.59396436, -1.69295832, -0.790432575, 0.774933877, 0.932005821, -1.96349541, 2.24797393, 1.59348586, 1.69296173, -0.790477519, -0.775330643 ] + - [ 0.932143469, 1.96266568, -2.24728994, 1.59396436, -1.69295845, -0.79790432, 0.782259118, 0.932005821, -1.96349541, 2.24797404, 1.59348586, 1.69296181, -0.797949689, -0.782659634 ] + - [ 0.932143469, 1.96266568, -2.24729011, 1.59396435, -1.69295857, -0.805369535, 0.789577956, 0.932005821, -1.96349541, 2.24797415, 1.59348586, 1.6929619, -0.805415328, -0.789982219 ] + - [ 0.932143469, 1.96266568, -2.24729027, 1.59396435, -1.69295869, -0.812827514, 0.796889699, 0.932005821, -1.96349541, 2.24797427, 1.59348585, 1.69296198, -0.812873731, -0.797297706 ] + - [ 0.932143469, 1.96266568, -2.24729044, 1.59396435, -1.69295882, -0.820277549, 0.804193656, 0.932005821, -1.96349541, 2.24797438, 1.59348585, 1.69296207, -0.82032419, -0.804605402 ] + - [ 0.932143469, 1.96266568, -2.2472906, 1.59396434, -1.69295894, -0.827718937, 0.811489133, 0.932005821, -1.96349541, 2.24797449, 1.59348585, 1.69296216, -0.827766001, -0.811904615 ] + - [ 0.932143469, 1.96266568, -2.24729076, 1.59396434, -1.69295906, -0.83515097, 0.81877544, 0.932005821, -1.96349541, 2.24797461, 1.59348584, 1.69296224, -0.835198456, -0.819194652 ] + - [ 0.932143469, 1.96266568, -2.24729093, 1.59396433, -1.69295919, -0.842572942, 0.826051883, 0.932005821, -1.96349541, 2.24797472, 1.59348584, 1.69296233, -0.842620851, -0.826474821 ] + - [ 0.932143469, 1.96266568, -2.24729109, 1.59396433, -1.69295931, -0.849984148, 0.833317771, 0.932005821, -1.96349541, 2.24797483, 1.59348584, 1.69296241, -0.850032478, -0.833744429 ] + - [ 0.932143469, 1.96266568, -2.24729125, 1.59396433, -1.69295943, -0.857383881, 0.840572412, 0.932005821, -1.96349541, 2.24797495, 1.59348584, 1.6929625, -0.857432632, -0.841002784 ] + - [ 0.932143469, 1.96266568, -2.24729142, 1.59396432, -1.69295956, -0.864771436, 0.847815112, 0.932005821, -1.96349541, 2.24797506, 1.59348583, 1.69296258, -0.864820607, -0.848249193 ] + - [ 0.932143469, 1.96266568, -2.24729158, 1.59396432, -1.69295968, -0.872146107, 0.855045181, 0.932005821, -1.96349541, 2.24797517, 1.59348583, 1.69296266, -0.872195697, -0.855482964 ] + - [ 0.932143469, 1.96266568, -2.24729174, 1.59396431, -1.6929598, -0.879507187, 0.862261926, 0.932005821, -1.96349541, 2.24797528, 1.59348583, 1.69296275, -0.879557195, -0.862703404 ] + - [ 0.932143469, 1.96266568, -2.2472919, 1.59396431, -1.69295992, -0.88685397, 0.869464655, 0.932005821, -1.96349541, 2.24797539, 1.59348583, 1.69296283, -0.886904396, -0.86990982 ] + - [ 0.932143469, 1.96266568, -2.24729206, 1.59396431, -1.69296004, -0.894185751, 0.876652675, 0.932005821, -1.96349541, 2.24797551, 1.59348582, 1.69296292, -0.894236594, -0.877101521 ] + - [ 0.932143469, 1.96266568, -2.24729222, 1.5939643, -1.69296016, -0.901501823, 0.883825295, 0.932005821, -1.96349541, 2.24797562, 1.59348582, 1.692963, -0.901553083, -0.884277813 ] + - [ 0.932143469, 1.96266568, -2.24729238, 1.5939643, -1.69296028, -0.908801481, 0.890981822, 0.932005821, -1.96349541, 2.24797573, 1.59348582, 1.69296308, -0.908853156, -0.891438004 ] + - [ 0.932143469, 1.96266568, -2.24729254, 1.59396429, -1.69296041, -0.916084019, 0.898121564, 0.932005821, -1.96349541, 2.24797584, 1.59348581, 1.69296317, -0.916136107, -0.898581402 ] + - [ 0.932143469, 1.96266568, -2.2472927, 1.59396429, -1.69296053, -0.92334873, 0.90524383, 0.932005821, -1.96349541, 2.24797595, 1.59348581, 1.69296325, -0.923401231, -0.905707314 ] + - [ 0.932143469, 1.96266568, -2.24729286, 1.59396429, -1.69296065, -0.930594908, 0.912347926, 0.932005821, -1.96349541, 2.24797606, 1.59348581, 1.69296333, -0.930647821, -0.912815048 ] + - [ 0.932143469, 1.96266568, -2.24729302, 1.59396428, -1.69296077, -0.937821848, 0.919433161, 0.932005821, -1.96349541, 2.24797617, 1.59348581, 1.69296342, -0.937875172, -0.91990391 ] + - [ 0.932143469, 1.96266568, -2.24729318, 1.59396428, -1.69296088, -0.945028843, 0.926498843, 0.932005821, -1.96349541, 2.24797628, 1.5934858, 1.6929635, -0.945082577, -0.92697321 ] + - [ 0.932143469, 1.96266568, -2.24729334, 1.59396427, -1.692961, -0.952215188, 0.933544279, 0.932005821, -1.96349541, 2.24797639, 1.5934858, 1.69296358, -0.952269331, -0.934022253 ] + - [ 0.932143469, 1.96266568, -2.2472935, 1.59396427, -1.69296112, -0.959380177, 0.940568777, 0.932005821, -1.96349541, 2.2479765, 1.5934858, 1.69296366, -0.959434727, -0.941050348 ] + - [ 0.932143469, 1.96266568, -2.24729365, 1.59396427, -1.69296124, -0.966523102, 0.947571645, 0.932005821, -1.96349541, 2.24797661, 1.5934858, 1.69296375, -0.966578059, -0.948056801 ] + - [ 0.932143469, 1.96266568, -2.24729381, 1.59396426, -1.69296136, -0.97364326, 0.954552192, 0.932005821, -1.96349541, 2.24797672, 1.59348579, 1.69296383, -0.973698621, -0.955040922 ] + - [ 0.932143469, 1.96266568, -2.24729397, 1.59396426, -1.69296148, -0.980739943, 0.961509724, 0.932005821, -1.96349541, 2.24797682, 1.59348579, 1.69296391, -0.980795707, -0.962002016 ] + - [ 0.932143469, 1.96266568, -2.24729412, 1.59396425, -1.69296159, -0.987812445, 0.968443549, 0.932005821, -1.96349541, 2.24797693, 1.59348579, 1.69296399, -0.987868612, -0.968939392 ] + - [ 0.932143469, 1.96266568, -2.24729428, 1.59396425, -1.69296171, -0.994860061, 0.975352977, 0.932005821, -1.96349541, 2.24797704, 1.59348578, 1.69296407, -0.994916629, -0.975852357 ] + - [ 0.932143469, 1.96266568, -2.24729443, 1.59396425, -1.69296183, -1.00188208, 0.982237313, 0.932005821, -1.96349541, 2.24797715, 1.59348578, 1.69296415, -1.00193905, -0.982740218 ] + - [ 0.932143469, 1.96266568, -2.24729459, 1.59396424, -1.69296194, -1.00887781, 0.989095867, 0.932005821, -1.96349541, 2.24797725, 1.59348578, 1.69296423, -1.00893517, -0.989602283 ] + - [ 0.932143469, 1.96266568, -2.24729474, 1.59396424, -1.69296206, -1.01584653, 0.995927945, 0.932005821, -1.96349541, 2.24797736, 1.59348578, 1.69296431, -1.01590429, -0.99643786 ] + - [ 0.932143469, 1.96266568, -2.24729489, 1.59396424, -1.69296217, -1.02278754, 1.00273286, 0.932005821, -1.96349541, 2.24797746, 1.59348577, 1.69296439, -1.0228457, -1.00324626 ] + - [ 0.932143469, 1.96266568, -2.24729504, 1.59396423, -1.69296229, -1.02970013, 1.00950991, 0.932005821, -1.96349541, 2.24797757, 1.59348577, 1.69296447, -1.02975868, -1.01002678 ] + - [ 0.932143469, 1.96266568, -2.24729519, 1.59396423, -1.6929624, -1.0365836, 1.01625841, 0.932005821, -1.96349541, 2.24797767, 1.59348577, 1.69296455, -1.03664254, -1.01677873 ] + - [ 0.932143469, 1.96266568, -2.24729535, 1.59396422, -1.69296251, -1.04343725, 1.02297767, 0.932005821, -1.96349541, 2.24797778, 1.59348577, 1.69296463, -1.04349658, -1.02350143 ] + - [ 0.932143469, 1.96266568, -2.2472955, 1.59396422, -1.69296263, -1.05026035, 1.02966699, 0.932005821, -1.96349541, 2.24797788, 1.59348576, 1.69296471, -1.05032007, -1.03019418 ] + - [ 0.932143469, 1.96266568, -2.24729565, 1.59396422, -1.69296274, -1.05705222, 1.03632568, 0.932005821, -1.96349541, 2.24797799, 1.59348576, 1.69296478, -1.05711233, -1.03685628 ] + - [ 0.932143469, 1.96266568, -2.24729579, 1.59396421, -1.69296285, -1.06381214, 1.04295305, 0.932005821, -1.96349541, 2.24797809, 1.59348576, 1.69296486, -1.06387263, -1.04348705 ] + - [ 0.932143469, 1.96266568, -2.24729594, 1.59396421, -1.69296296, -1.07053941, 1.04954842, 0.932005821, -1.96349541, 2.24797819, 1.59348576, 1.69296494, -1.07060028, -1.05008578 ] + - [ 0.932143469, 1.96266568, -2.24729609, 1.59396421, -1.69296307, -1.07723332, 1.05611107, 0.932005821, -1.96349541, 2.24797829, 1.59348575, 1.69296501, -1.07729457, -1.0566518 ] + - [ 0.932143469, 1.96266568, -2.24729624, 1.5939642, -1.69296318, -1.08389317, 1.06264033, 0.932005821, -1.96349541, 2.24797839, 1.59348575, 1.69296509, -1.0839548, -1.0631844 ] + - [ 0.932143469, 1.96266568, -2.24729638, 1.5939642, -1.69296329, -1.09051824, 1.0691355, 0.932005821, -1.96349541, 2.2479785, 1.59348575, 1.69296517, -1.09058025, -1.0696829 ] + - [ 0.932143469, 1.96266568, -2.24729653, 1.5939642, -1.6929634, -1.09710784, 1.07559589, 0.932005821, -1.96349541, 2.2479786, 1.59348575, 1.69296524, -1.09717022, -1.0761466 ] + - [ 0.932143469, 1.96266568, -2.24729667, 1.59396419, -1.69296351, -1.10366126, 1.08202081, 0.932005821, -1.96349541, 2.2479787, 1.59348574, 1.69296532, -1.10372401, -1.08257481 ] + - [ 0.932143469, 1.96266568, -2.24729681, 1.59396419, -1.69296362, -1.11017778, 1.08840956, 0.932005821, -1.96349541, 2.24797879, 1.59348574, 1.69296539, -1.11024091, -1.08896683 ] + - [ 0.932143469, 1.96266568, -2.24729696, 1.59396418, -1.69296373, -1.11665672, 1.09476146, 0.932005821, -1.96349541, 2.24797889, 1.59348574, 1.69296547, -1.11672021, -1.09532198 ] + - [ 0.932143469, 1.96266568, -2.2472971, 1.59396418, -1.69296383, -1.12309735, 1.1010758, 0.932005821, -1.96349541, 2.24797899, 1.59348574, 1.69296554, -1.12316121, -1.10163955 ] + - [ 0.932143469, 1.96266568, -2.24729724, 1.59396418, -1.69296394, -1.12949897, 1.10735191, 0.932005821, -1.96349541, 2.24797909, 1.59348573, 1.69296561, -1.1295632, -1.10791887 ] + - [ 0.932143469, 1.96266568, -2.24729738, 1.59396417, -1.69296405, -1.13586089, 1.11358908, 0.932005821, -1.96349541, 2.24797919, 1.59348573, 1.69296569, -1.13592547, -1.11415923 ] + - [ 0.932143469, 1.96266568, -2.24729752, 1.59396417, -1.69296415, -1.14218238, 1.11978662, 0.932005821, -1.96349541, 2.24797928, 1.59348573, 1.69296576, -1.14224733, -1.12035995 ] + - [ 0.932143469, 1.96266568, -2.24729766, 1.59396417, -1.69296425, -1.14846275, 1.12594385, 0.932005821, -1.96349541, 2.24797938, 1.59348573, 1.69296583, -1.14852805, -1.12652033 ] + - [ 0.932143469, 1.96266568, -2.24729779, 1.59396416, -1.69296436, -1.15470129, 1.13206006, 0.932005821, -1.96349541, 2.24797947, 1.59348572, 1.6929659, -1.15476695, -1.13263968 ] + - [ 0.932143469, 1.96266568, -2.24729793, 1.59396416, -1.69296446, -1.1608973, 1.13813457, 0.932005821, -1.96349541, 2.24797957, 1.59348572, 1.69296597, -1.1609633, -1.1387173 ] + - [ 0.932143469, 1.96266568, -2.24729807, 1.59396416, -1.69296456, -1.16705006, 1.14416669, 0.932005821, -1.96349541, 2.24797966, 1.59348572, 1.69296604, -1.16711641, -1.14475251 ] + - [ 0.932143469, 1.96266568, -2.2472982, 1.59396415, -1.69296466, -1.17315887, 1.15015572, 0.932005821, -1.96349541, 2.24797975, 1.59348572, 1.69296611, -1.17322557, -1.1507446 ] + - [ 0.932143469, 1.96266568, -2.24729833, 1.59396415, -1.69296476, -1.17922303, 1.15610098, 0.932005821, -1.96349541, 2.24797985, 1.59348571, 1.69296618, -1.17929008, -1.1566929 ] + - [ 0.932143469, 1.96266568, -2.24729847, 1.59396415, -1.69296486, -1.18524182, 1.16200176, 0.932005821, -1.96349541, 2.24797994, 1.59348571, 1.69296625, -1.18530922, -1.1625967 ] + - [ 0.932143469, 1.96266568, -2.2472986, 1.59396414, -1.69296496, -1.19121455, 1.16785738, 0.932005821, -1.96349541, 2.24798003, 1.59348571, 1.69296632, -1.19128229, -1.16845532 ] + - [ 0.932143469, 1.96266568, -2.24729873, 1.59396414, -1.69296506, -1.19714051, 1.17366714, 0.932005821, -1.96349541, 2.24798012, 1.59348571, 1.69296639, -1.19720858, -1.17426806 ] + - [ 0.932143469, 1.96266568, -2.24729886, 1.59396414, -1.69296516, -1.20301899, 1.17943036, 0.932005821, -1.96349541, 2.24798021, 1.59348571, 1.69296646, -1.2030874, -1.18003422 ] + - [ 0.932143469, 1.96266568, -2.24729898, 1.59396413, -1.69296525, -1.20884929, 1.18514633, 0.932005821, -1.96349541, 2.2479803, 1.5934857, 1.69296652, -1.20891802, -1.18575313 ] + - [ 0.932143469, 1.96266568, -2.24729911, 1.59396413, -1.69296535, -1.21463069, 1.19081437, 0.932005821, -1.96349541, 2.24798039, 1.5934857, 1.69296659, -1.21469976, -1.19142407 ] + - [ 0.932143469, 1.96266568, -2.24729924, 1.59396413, -1.69296545, -1.2203625, 1.19643379, 0.932005821, -1.96349541, 2.24798047, 1.5934857, 1.69296666, -1.22043189, -1.19704637 ] + - [ 0.932143469, 1.96266568, -2.24729936, 1.59396413, -1.69296554, -1.22604401, 1.2020039, 0.932005821, -1.96349541, 2.24798056, 1.5934857, 1.69296672, -1.22611372, -1.20261932 ] + - [ 0.932143469, 1.96266568, -2.24729949, 1.59396412, -1.69296563, -1.2316745, 1.20752399, 0.932005821, -1.96349541, 2.24798064, 1.5934857, 1.69296678, -1.23174454, -1.20814225 ] + - [ 0.932143469, 1.96266568, -2.24729961, 1.59396412, -1.69296573, -1.23725329, 1.21299339, 0.932005821, -1.96349541, 2.24798073, 1.59348569, 1.69296685, -1.23732364, -1.21361444 ] + - [ 0.932143469, 1.96266568, -2.24729973, 1.59396412, -1.69296582, -1.24277965, 1.21841139, 0.932005821, -1.96349541, 2.24798081, 1.59348569, 1.69296691, -1.24285031, -1.21903522 ] + - [ 0.932143469, 1.96266568, -2.24729985, 1.59396411, -1.69296591, -1.24825289, 1.22377731, 0.932005821, -1.96349541, 2.2479809, 1.59348569, 1.69296697, -1.24832386, -1.22440388 ] + - [ 0.932143469, 1.96266568, -2.24729997, 1.59396411, -1.692966, -1.25367229, 1.22909045, 0.932005821, -1.96349541, 2.24798098, 1.59348569, 1.69296704, -1.25374357, -1.22971974 ] + - [ 0.932143469, 1.96266568, -2.24730009, 1.59396411, -1.69296609, -1.25903715, 1.23435012, 0.932005821, -1.96349541, 2.24798106, 1.59348568, 1.6929671, -1.25910874, -1.23498211 ] + - [ 0.932143469, 1.96266568, -2.24730021, 1.5939641, -1.69296617, -1.26434677, 1.23955563, 0.932005821, -1.96349541, 2.24798114, 1.59348568, 1.69296716, -1.26441866, -1.24019028 ] + - [ 0.932143469, 1.96266568, -2.24730032, 1.5939641, -1.69296626, -1.26960044, 1.24470629, 0.932005821, -1.96349541, 2.24798122, 1.59348568, 1.69296722, -1.26967263, -1.24534357 ] + - [ 0.932143469, 1.96266568, -2.24730044, 1.5939641, -1.69296635, -1.27479746, 1.2498014, 0.932005821, -1.96349541, 2.2479813, 1.59348568, 1.69296728, -1.27486994, -1.25044129 ] + - [ 0.932143469, 1.96266568, -2.24730055, 1.5939641, -1.69296643, -1.27993711, 1.25484027, 0.932005821, -1.96349541, 2.24798138, 1.59348568, 1.69296734, -1.28000988, -1.25548275 ] + - [ 0.932143469, 1.96266568, -2.24730066, 1.59396409, -1.69296652, -1.28501869, 1.25982221, 0.932005821, -1.96349541, 2.24798146, 1.59348568, 1.6929674, -1.28509176, -1.26046724 ] + - [ 0.932143469, 1.96266568, -2.24730077, 1.59396409, -1.6929666, -1.2900415, 1.26474653, 0.932005821, -1.96349541, 2.24798153, 1.59348567, 1.69296745, -1.29011485, -1.26539408 ] + - [ 0.932143469, 1.96266568, -2.24730088, 1.59396409, -1.69296668, -1.29500483, 1.26961254, 0.932005821, -1.96349541, 2.24798161, 1.59348567, 1.69296751, -1.29507846, -1.27026258 ] + - [ 0.932143469, 1.96266568, -2.24730099, 1.59396409, -1.69296676, -1.29990797, 1.27441954, 0.932005821, -1.96349541, 2.24798168, 1.59348567, 1.69296757, -1.29998188, -1.27507204 ] + - [ 0.932143469, 1.96266568, -2.24730109, 1.59396408, -1.69296684, -1.30475021, 1.27916684, 0.932005821, -1.96349541, 2.24798176, 1.59348567, 1.69296762, -1.3048244, -1.27982178 ] + - [ 0.932143469, 1.96266568, -2.2473012, 1.59396408, -1.69296692, -1.30953086, 1.28385376, 0.932005821, -1.96349541, 2.24798183, 1.59348567, 1.69296768, -1.30960532, -1.28451109 ] + - [ 0.932143469, 1.96266568, -2.2473013, 1.59396408, -1.692967, -1.31424921, 1.28847958, 0.932005821, -1.96349541, 2.2479819, 1.59348566, 1.69296773, -1.31432394, -1.28913929 ] + - [ 0.932143469, 1.96266568, -2.24730141, 1.59396408, -1.69296708, -1.31890454, 1.29304364, 0.932005821, -1.96349541, 2.24798197, 1.59348566, 1.69296778, -1.31897954, -1.29370568 ] + - [ 0.932143469, 1.96266568, -2.24730151, 1.59396407, -1.69296715, -1.32349616, 1.29754522, 0.932005821, -1.96349541, 2.24798204, 1.59348566, 1.69296784, -1.32357142, -1.29820957 ] + - [ 0.932143469, 1.96266568, -2.24730161, 1.59396407, -1.69296723, -1.32802336, 1.30198365, 0.932005821, -1.96349541, 2.24798211, 1.59348566, 1.69296789, -1.32809887, -1.30265027 ] + - [ 0.932143469, 1.96266568, -2.2473017, 1.59396407, -1.6929673, -1.33248543, 1.30635823, 0.932005821, -1.96349541, 2.24798218, 1.59348566, 1.69296794, -1.33256119, -1.30702708 ] + - [ 0.932143469, 1.96266568, -2.2473018, 1.59396407, -1.69296738, -1.33688166, 1.31066826, 0.932005821, -1.96349541, 2.24798225, 1.59348566, 1.69296799, -1.33695767, -1.31133932 ] + - [ 0.932143469, 1.96266568, -2.2473019, 1.59396406, -1.69296745, -1.34121135, 1.31491306, 0.932005821, -1.96349541, 2.24798231, 1.59348565, 1.69296804, -1.34128761, -1.31558629 ] + - [ 0.932143469, 1.96266568, -2.24730199, 1.59396406, -1.69296752, -1.3454738, 1.31909192, 0.932005821, -1.96349541, 2.24798238, 1.59348565, 1.69296809, -1.3455503, -1.3197673 ] + - [ 0.932143469, 1.96266568, -2.24730208, 1.59396406, -1.69296759, -1.34966829, 1.32320417, 0.932005821, -1.96349541, 2.24798244, 1.59348565, 1.69296814, -1.34974503, -1.32388165 ] + - [ 0.932143469, 1.96266568, -2.24730217, 1.59396406, -1.69296766, -1.35379412, 1.32724911, 0.932005821, -1.96349541, 2.2479825, 1.59348565, 1.69296818, -1.3538711, -1.32792866 ] + - [ 0.932143469, 1.96266568, -2.24730226, 1.59396405, -1.69296772, -1.35785059, 1.33122604, 0.932005821, -1.96349541, 2.24798257, 1.59348565, 1.69296823, -1.3579278, -1.33190763 ] + - [ 0.932143469, 1.96266568, -2.24730235, 1.59396405, -1.69296779, -1.36183699, 1.33513427, 0.932005821, -1.96349541, 2.24798263, 1.59348565, 1.69296828, -1.36191443, -1.33581786 ] + - [ 0.932143469, 1.96266568, -2.24730244, 1.59396405, -1.69296785, -1.36575262, 1.33897312, 0.932005821, -1.96349541, 2.24798269, 1.59348564, 1.69296832, -1.36583027, -1.33965867 ] + - [ 0.932143469, 1.96266568, -2.24730252, 1.59396405, -1.69296792, -1.36959676, 1.34274189, 0.932005821, -1.96349541, 2.24798275, 1.59348564, 1.69296837, -1.36967463, -1.34342937 ] + - [ 0.932143469, 1.96266568, -2.2473026, 1.59396405, -1.69296798, -1.37336871, 1.34643988, 0.932005821, -1.96349541, 2.2479828, 1.59348564, 1.69296841, -1.3734468, -1.34712925 ] + - [ 0.932143469, 1.96266568, -2.24730269, 1.59396404, -1.69296804, -1.37706777, 1.35006641, 0.932005821, -1.96349541, 2.24798286, 1.59348564, 1.69296845, -1.37714607, -1.35075764 ] + - [ 0.932143469, 1.96266568, -2.24730277, 1.59396404, -1.6929681, -1.38069323, 1.35362078, 0.932005821, -1.96349541, 2.24798291, 1.59348564, 1.69296849, -1.38077173, -1.35431383 ] + - [ 0.932143469, 1.96266568, -2.24730284, 1.59396404, -1.69296816, -1.38424438, 1.3571023, 0.932005821, -1.96349541, 2.24798297, 1.59348564, 1.69296853, -1.38432308, -1.35779713 ] + - [ 0.932143469, 1.96266568, -2.24730292, 1.59396404, -1.69296822, -1.38772051, 1.36051027, 0.932005821, -1.96349541, 2.24798302, 1.59348564, 1.69296857, -1.38779942, -1.36120685 ] + - [ 0.932143469, 1.96266568, -2.24730299, 1.59396404, -1.69296827, -1.39112093, 1.36384402, 0.932005821, -1.96349541, 2.24798307, 1.59348563, 1.69296861, -1.39120003, -1.36454231 ] + - [ 0.932143469, 1.96266568, -2.24730307, 1.59396403, -1.69296833, -1.39444493, 1.36710284, 0.932005821, -1.96349541, 2.24798312, 1.59348563, 1.69296865, -1.39452422, -1.36780279 ] + - [ 0.932143469, 1.96266568, -2.24730314, 1.59396403, -1.69296838, -1.39769179, 1.37028604, 0.932005821, -1.96349541, 2.24798317, 1.59348563, 1.69296869, -1.39777127, -1.37098762 ] + - [ 0.932143469, 1.96266568, -2.24730321, 1.59396403, -1.69296844, -1.40086082, 1.37339293, 0.932005821, -1.96349541, 2.24798322, 1.59348563, 1.69296872, -1.40094048, -1.37409611 ] + - [ 0.932143469, 1.96266568, -2.24730328, 1.59396403, -1.69296849, -1.40395131, 1.37642282, 0.932005821, -1.96349541, 2.24798327, 1.59348563, 1.69296876, -1.40403114, -1.37712754 ] + - [ 0.932143469, 1.96266568, -2.24730334, 1.59396403, -1.69296854, -1.40696255, 1.37937501, 0.932005821, -1.96349541, 2.24798331, 1.59348563, 1.69296879, -1.40704255, -1.38008125 ] + - [ 0.932143469, 1.96266568, -2.24730341, 1.59396403, -1.69296859, -1.40989383, 1.38224882, 0.932005821, -1.96349541, 2.24798336, 1.59348563, 1.69296883, -1.40997399, -1.38295653 ] + - [ 0.932143469, 1.96266568, -2.24730347, 1.59396402, -1.69296863, -1.41274445, 1.38504354, 0.932005821, -1.96349541, 2.2479834, 1.59348563, 1.69296886, -1.41282478, -1.38575269 ] + - [ 0.932143469, 1.96266568, -2.24730353, 1.59396402, -1.69296868, -1.41551371, 1.3877585, 0.932005821, -1.96349541, 2.24798344, 1.59348563, 1.69296889, -1.41559419, -1.38846903 ] + - [ 0.932143469, 1.96266568, -2.24730359, 1.59396402, -1.69296872, -1.41820089, 1.39039299, 0.932005821, -1.96349541, 2.24798349, 1.59348562, 1.69296892, -1.41828153, -1.39110487 ] + - [ 0.932143469, 1.96266568, -2.24730365, 1.59396402, -1.69296877, -1.42080529, 1.39294633, 0.932005821, -1.96349541, 2.24798352, 1.59348562, 1.69296895, -1.42088608, -1.39365952 ] + - [ 0.932143469, 1.96266568, -2.2473037, 1.59396402, -1.69296881, -1.42332621, 1.39541782, 0.932005821, -1.96349541, 2.24798356, 1.59348562, 1.69296898, -1.42340714, -1.39613227 ] + - [ 0.932143469, 1.96266568, -2.24730376, 1.59396402, -1.69296885, -1.42576294, 1.39780677, 0.932005821, -1.96349541, 2.2479836, 1.59348562, 1.69296901, -1.42584401, -1.39852245 ] + - [ 0.932143469, 1.96266568, -2.24730381, 1.59396402, -1.69296889, -1.42811478, 1.40011249, 0.932005821, -1.96349541, 2.24798364, 1.59348562, 1.69296904, -1.42819598, -1.40082935 ] + - [ 0.932143469, 1.96266568, -2.24730386, 1.59396401, -1.69296892, -1.43038101, 1.40233429, 0.932005821, -1.96349541, 2.24798367, 1.59348562, 1.69296906, -1.43046234, -1.40305228 ] + - [ 0.932143469, 1.96266568, -2.24730391, 1.59396401, -1.69296896, -1.43256093, 1.40447146, 0.932005821, -1.96349541, 2.2479837, 1.59348562, 1.69296909, -1.43264239, -1.40519055 ] + - [ 0.932143469, 1.96266568, -2.24730395, 1.59396401, -1.692969, -1.43465384, 1.40652333, 0.932005821, -1.96349541, 2.24798374, 1.59348562, 1.69296911, -1.43473541, -1.40724347 ] + - [ 0.932143469, 1.96266568, -2.247304, 1.59396401, -1.69296903, -1.43665902, 1.4084892, 0.932005821, -1.96349541, 2.24798377, 1.59348562, 1.69296913, -1.43674071, -1.40921035 ] + - [ 0.932143469, 1.96266568, -2.24730404, 1.59396401, -1.69296906, -1.43857579, 1.41036838, 0.932005821, -1.96349541, 2.2479838, 1.59348562, 1.69296916, -1.43865758, -1.41109049 ] + - [ 0.932143469, 1.96266568, -2.24730408, 1.59396401, -1.69296909, -1.44040341, 1.41216017, 0.932005821, -1.96349541, 2.24798382, 1.59348562, 1.69296918, -1.44048531, -1.4128832 ] + - [ 0.932143469, 1.96266568, -2.24730412, 1.59396401, -1.69296912, -1.4421412, 1.41386389, 0.932005821, -1.96349541, 2.24798385, 1.59348562, 1.6929692, -1.4422232, -1.41458779 ] + - [ 0.932143469, 1.96266568, -2.24730415, 1.59396401, -1.69296915, -1.44378845, 1.41547884, 0.932005821, -1.96349541, 2.24798387, 1.59348562, 1.69296922, -1.44387054, -1.41620356 ] + - [ 0.932143469, 1.96266568, -2.24730419, 1.59396401, -1.69296917, -1.44534444, 1.41700432, 0.932005821, -1.96349541, 2.2479839, 1.59348561, 1.69296923, -1.44542663, -1.41772983 ] + - [ 0.932143469, 1.96266568, -2.24730422, 1.59396401, -1.6929692, -1.44680848, 1.41843965, 0.932005821, -1.96349541, 2.24798392, 1.59348561, 1.69296925, -1.44689075, -1.41916589 ] + - [ 0.932143469, 1.96266568, -2.24730425, 1.593964, -1.69296922, -1.44817986, 1.41978414, 0.932005821, -1.96349541, 2.24798394, 1.59348561, 1.69296927, -1.4482622, -1.42051107 ] + - [ 0.932143469, 1.96266568, -2.24730428, 1.593964, -1.69296924, -1.44945786, 1.42103709, 0.932005821, -1.96349541, 2.24798396, 1.59348561, 1.69296928, -1.44954028, -1.42176466 ] + - [ 0.932143469, 1.96266568, -2.2473043, 1.593964, -1.69296926, -1.4506418, 1.4221978, 0.932005821, -1.96349541, 2.24798398, 1.59348561, 1.69296929, -1.45072428, -1.42292597 ] + - [ 0.932143469, 1.96266568, -2.24730433, 1.593964, -1.69296928, -1.45173095, 1.4232656, 0.932005821, -1.96349541, 2.247984, 1.59348561, 1.69296931, -1.45181349, -1.42399431 ] + - [ 0.932143469, 1.96266568, -2.24730435, 1.593964, -1.69296929, -1.45272461, 1.42423978, 0.932005821, -1.96349541, 2.24798401, 1.59348561, 1.69296932, -1.45280722, -1.42496899 ] + - [ 0.932143469, 1.96266568, -2.24730437, 1.593964, -1.69296931, -1.45362209, 1.42511966, 0.932005821, -1.96349541, 2.24798402, 1.59348561, 1.69296933, -1.45370474, -1.42584932 ] + - [ 0.932143469, 1.96266568, -2.24730439, 1.593964, -1.69296932, -1.45442266, 1.42590453, 0.932005821, -1.96349541, 2.24798404, 1.59348561, 1.69296934, -1.45450536, -1.4266346 ] + - [ 0.932143469, 1.96266568, -2.2473044, 1.593964, -1.69296933, -1.45512563, 1.42659372, 0.932005821, -1.96349541, 2.24798405, 1.59348561, 1.69296935, -1.45520837, -1.42732414 ] + - [ 0.932143469, 1.96266568, -2.24730442, 1.593964, -1.69296934, -1.45573029, 1.42718652, 0.932005821, -1.96349541, 2.24798406, 1.59348561, 1.69296935, -1.45581306, -1.42791724 ] + - [ 0.932143469, 1.96266568, -2.24730443, 1.593964, -1.69296935, -1.45623593, 1.42768225, 0.932005821, -1.96349541, 2.24798406, 1.59348561, 1.69296936, -1.45631874, -1.42841323 ] + - [ 0.932143469, 1.96266568, -2.24730444, 1.593964, -1.69296936, -1.45664186, 1.42808021, 0.932005821, -1.96349541, 2.24798407, 1.59348561, 1.69296936, -1.45672468, -1.42881139 ] + - [ 0.932143469, 1.96266568, -2.24730444, 1.593964, -1.69296936, -1.45694735, 1.42837972, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45703019, -1.42911105 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45715171, 1.42858007, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45723456, -1.4293115 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45725422, 1.42868057, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45733708, -1.42941206 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45722805, 1.42865474, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.4573109, -1.42938621 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45691687, 1.42834827, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45699968, -1.4290796 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45629708, 1.42773788, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45637981, -1.4284689 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45537137, 1.42682619, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45545397, -1.42755677 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45414241, 1.42561585, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45422485, -1.42634585 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.4526129, 1.42410952, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45269514, -1.42483878 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.45078551, 1.42230982, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.45086751, -1.42303821 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.44866294, 1.4202194, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.44874465, -1.42094678 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.44624785, 1.41784091, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.44632924, -1.41856714 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.44354294, 1.41517699, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.44362397, -1.41590192 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.4405509, 1.41223027, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.44063152, -1.41295378 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.43727439, 1.40900341, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.43735458, -1.40972535 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.43371612, 1.40549905, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.43379583, -1.40621929 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.42987875, 1.40171983, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.42995795, -1.40243824 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.42576498, 1.39766838, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.42584363, -1.39838483 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.42137749, 1.39334737, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.42145555, -1.39406172 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.41671895, 1.38875942, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.41679639, -1.38947154 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.41179207, 1.38390718, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.41186885, -1.38461695 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.40659951, 1.3787933, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.40667559, -1.37950059 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.40114396, 1.37342041, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.40121932, -1.3741251 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.39542811, 1.36779116, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.3955027, -1.36849312 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.38945464, 1.3619082, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.38952843, -1.3626073 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.38322623, 1.35577416, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.38329919, -1.35647029 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.37674557, 1.34939169, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.37681766, -1.35008472 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.37001533, 1.34276343, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.37008653, -1.34345325 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.36303821, 1.33589202, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.36310847, -1.33657851 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.35581689, 1.32878011, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.35588618, -1.32946315 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.34835405, 1.32143034, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.34842234, -1.32210982 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.34065237, 1.31384535, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.34071963, -1.31452115 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.33271454, 1.30602779, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.33278074, -1.3066998 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.32454324, 1.2979803, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.32460835, -1.29864841 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.31614115, 1.28970552, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.31620514, -1.29036961 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.30751096, 1.28120609, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.3075738, -1.28186607 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.29865536, 1.27248466, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.29871701, -1.27314041 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.28957702, 1.26354387, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.28963746, -1.26419528 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.28027863, 1.25438637, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.28033782, -1.25503333 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.27076287, 1.24501479, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.27082079, -1.24565721 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.26103243, 1.23543177, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.26108904, -1.23606955 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.25108998, 1.22563997, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.25114527, -1.226273 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.24093822, 1.21564203, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.24099215, -1.21627021 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.23057983, 1.20544058, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.23063237, -1.20606381 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.22001748, 1.19503827, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.22006862, -1.19565646 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.20925387, 1.18443774, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.20930357, -1.18505079 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.19829168, 1.17364164, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.19833991, -1.17424946 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.18713359, 1.16265261, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.18718033, -1.1632551 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.17578228, 1.1514733, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.1758275, -1.15207036 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.16424044, 1.14010633, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.16428412, -1.14069788 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.15251075, 1.12855437, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.15255286, -1.12914032 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.1405959, 1.11682004, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.14063641, -1.1174003 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.12849856, 1.104906, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.12853746, -1.10548048 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.11622143, 1.09281488, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.11625869, -1.0933835 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.10376719, 1.08054934, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.10380278, -1.08111201 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.09113851, 1.068112, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.09117241, -1.06866864 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.07833808, 1.05550552, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.07837027, -1.05605605 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.06536859, 1.04273254, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.06539905, -1.04327688 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.05223272, 1.0297957, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.05226142, -1.03033376 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.03893316, 1.01669764, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.03896008, -1.01722935 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.02547258, 1.00344101, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.0254977, -1.00396629 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -1.01185367, 0.990028451, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -1.01187697, -0.99054723 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.998079119, 0.976462602, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.998100577, -0.976974803 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.984151603, 0.962746109, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.984171198, -0.963251658 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.970073808, 0.948881613, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.97009152, -0.94938044 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.955848417, 0.934871758, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.955864228, -0.935363792 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.941478115, 0.920719188, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.941492004, -0.921204358 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.926965585, 0.906426544, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.926977533, -0.906904784 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.91231351, 0.89199647, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.912323499, -0.892467712 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.897524573, 0.877431608, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.897532585, -0.877895788 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.88260146, 0.862734602, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.882607476, -0.863191655 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.867546852, 0.847908094, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.867550855, -0.848357958 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.852363434, 0.832954728, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.852365407, -0.83339734 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.837053889, 0.817877145, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.837053815, -0.818312447 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.821620901, 0.80267799, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.821618763, -0.803105921 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.806067153, 0.787359904, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.806062935, -0.787780408 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.790395329, 0.771925531, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.790389015, -0.772338551 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.774608112, 0.756377514, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.774599687, -0.756782995 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.758708186, 0.740718496, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.758697635, -0.741116383 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.742698234, 0.724951119, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.742685542, -0.72534136 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.72658094, 0.709078026, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.726566093, -0.709460571 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.710358988, 0.693101861, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.710341972, -0.693476658 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.694035061, 0.677025266, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.694015862, -0.677392268 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.677611843, 0.660850884, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.677590448, -0.661210042 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.661092016, 0.644581357, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.661068412, -0.644932627 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.644478266, 0.62821933, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.64445244, -0.628562665 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.627773274, 0.611767444, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.627745215, -0.612102802 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.610979726, 0.595228343, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.610949421, -0.595555681 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.594100304, 0.578604669, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.594067742, -0.578923946 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.577137692, 0.561899066, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.577102861, -0.562210243 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.560094573, 0.545114176, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.560057464, -0.545417213 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.542973631, 0.528252642, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.542934233, -0.528547503 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.52577755, 0.511317108, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.525735852, -0.511603756 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.508509013, 0.494310215, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.508465006, -0.494588617 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.491170704, 0.477234607, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.491124378, -0.477504729 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.473765306, 0.460092926, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.473716653, -0.460354737 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.456295503, 0.442887817, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.456244514, -0.443141284 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.438763978, 0.425621921, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.438710644, -0.425867016 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.421173415, 0.408297881, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.421117729, -0.408534575 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.403526497, 0.390918341, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.403468452, -0.391146607 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.385825909, 0.373485942, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.385765496, -0.373705756 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.368074333, 0.356003329, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.368011547, -0.356214666 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.350274453, 0.338473144, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.350209286, -0.33867598 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.332428952, 0.32089803, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.3323614, -0.321092343 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.314540515, 0.303280629, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.314470571, -0.3034664 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.296611825, 0.285623585, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.296539483, -0.285800794 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.278645565, 0.267929541, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.27857082, -0.268098169 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.260644418, 0.250201138, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.260567267, -0.250361171 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.242611069, 0.232441022, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.242531506, -0.232592442 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.224548201, 0.214651833, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.224466223, -0.214794627 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.206458498, 0.196836216, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.206374101, -0.196970371 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.188344643, 0.178996812, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.188257823, -0.179122317 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.170209319, 0.161136266, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.170120074, -0.16125311 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.15205521, 0.143257219, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.151963538, -0.143365394 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.133885, 0.125362315, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.133790898, -0.125461812 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.115701372, 0.107454196, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.115604839, -0.10754501 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.0975070105, 0.089535506, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.0974080443, -0.0896176306 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.0793045979, 0.0716088872, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.0792031977, -0.071682319 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.0610968182, 0.0536769825, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.0609929833, -0.0537417191 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.042886355, 0.035742435, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.042780085, -0.035798475 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.0246758918, 0.0178078875, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.0245671867, -0.0178552309 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, -0.00646811208, -0.000124017154, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, -0.00635697226, 8.53690075e-05 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.0117343005, -0.018050636, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.0118478743, 0.0180206806 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.0299286624, -0.0359693262, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.0300446692, 0.0359480596 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.0481122902, -0.0538774448, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.0482307284, 0.053864862 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.0662825001, -0.071772349, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.0664033681, 0.0717684435 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.0844366088, -0.0896513958, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.0845599043, 0.08965616 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.102571933, -0.107511942, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.102697653, 0.107525367 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.120685788, -0.125351346, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.120813931, 0.125373421 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.138775491, -0.143166963, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.138906053, 0.143197677 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.156838359, -0.160956152, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.156971336, 0.160995492 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.174871708, -0.178716268, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.175007097, 0.178764221 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.192872855, -0.196444671, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.19301065, 0.196501219 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.210839115, -0.214138715, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.210979313, 0.214203844 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.228767805, -0.231795759, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.228910401, 0.23186945 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.246656242, -0.24941316, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.24680123, 0.249495393 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.264501743, -0.266988274, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.264649116, 0.26707903 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.282301623, -0.284518459, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.282451377, 0.284617716 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.300053199, -0.302001072, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.300205326, 0.302108806 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.317753787, -0.319433471, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.317908282, 0.319549657 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.335400705, -0.336813011, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.335557559, 0.336937625 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.352991268, -0.354137051, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.353150474, 0.354270066 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.370522793, -0.371402947, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.370684344, 0.371544334 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.387992596, -0.388608056, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.388156483, 0.388757787 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.405397994, -0.405749737, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.405564208, 0.405907779 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.422736303, -0.422825345, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.422904836, 0.422991667 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.44000484, -0.439832238, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.440175682, 0.440006806 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.457200921, -0.456767772, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.457374063, 0.456950553 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.474321863, -0.473629306, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.474497294, 0.473820263 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.491364982, -0.490414196, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.491542691, 0.490613293 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.508327594, -0.507119799, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.508507572, 0.507326996 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.525207016, -0.523743473, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.525389251, 0.523958731 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.542000564, -0.540282574, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.542185045, 0.540505852 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.558705556, -0.55673446, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.55889227, 0.556965715 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.575319306, -0.573096487, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.575508242, 0.573335677 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.591839133, -0.589366014, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.592030278, 0.589613092 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.608262351, -0.605540396, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.608455692, 0.605795318 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.624586278, -0.621616991, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.624781802, 0.621879708 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.64080823, -0.637593156, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.641005923, 0.637863621 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.656925524, -0.653466249, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.657125372, 0.65374441 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.672935476, -0.669233626, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.673137465, 0.669519433 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.688835402, -0.684892644, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.689039517, 0.685186045 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.704622619, -0.700440661, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.704828845, 0.700741601 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.720294443, -0.715875034, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.720502765, 0.716183458 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.735848191, -0.73119312, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.736058593, 0.731508971 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.751281179, -0.746392275, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.751493645, 0.746715497 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.766590724, -0.761469858, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.766805237, 0.76180039 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.781774142, -0.776423224, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.781990685, 0.776761008 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.79682875, -0.791249732, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.797047306, 0.791594705 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.811751863, -0.805946738, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.811972415, 0.806298838 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.8265408, -0.8205116, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.826763329, 0.820870762 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.841192875, -0.834941674, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.841417363, 0.835307834 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.855705405, -0.849234318, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.855931834, 0.849607408 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.870075707, -0.863386888, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.870304058, 0.863766842 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.884301098, -0.877396743, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.88453135, 0.87778349 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.898378893, -0.891261239, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.898611028, 0.891654708 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.912306409, -0.904977732, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.912540407, 0.905377853 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.926080963, -0.918543581, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.926316803, 0.91895028 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.939699871, -0.931956142, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.939937532, 0.932369345 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.953160449, -0.945212773, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.95339991, 0.945632404 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.966460015, -0.95831083, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.966701254, 0.958736812 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.979595884, -0.971247671, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.979838879, 0.971679926 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 0.992565372, -0.984020652, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 0.992810102, 0.984459102 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.0053658, -0.996627132, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.00561224, 0.997071694 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.01799448, -1.00906447, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.01824261, 1.00951506 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.03044872, -1.02133001, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.03069852, 1.02178655 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.04272585, -1.03342113, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.04297729, 1.03388353 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.05482319, -1.04533517, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.05507624, 1.04580335 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.06673804, -1.0570695, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.06699269, 1.05754337 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.07846773, -1.06862146, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.07872395, 1.06910093 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.09000957, -1.07998843, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.09026733, 1.08047341 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.10136088, -1.09116774, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.10162016, 1.09165815 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.11251897, -1.10215677, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.11277974, 1.10265251 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.12348116, -1.11295287, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.1237434, 1.11345384 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.13424477, -1.1235534, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.13450845, 1.12405951 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.14480712, -1.13395571, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.1450722, 1.13446686 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.15516551, -1.14415716, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.15543198, 1.14467326 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.16531727, -1.1541551, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.1655851, 1.15467605 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.17525972, -1.1639469, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.17552887, 1.1644726 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.18499016, -1.17352992, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.18526062, 1.17406026 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.19450592, -1.1829015, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.19477765, 1.18343638 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.20380431, -1.192059, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.20407729, 1.19259833 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.21288265, -1.20099979, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.21315684, 1.20154346 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.22173825, -1.20972122, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.22201363, 1.21026912 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.23036844, -1.21822065, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.23064497, 1.21877266 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.23877053, -1.22649543, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.23904818, 1.22705146 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.24694183, -1.23454292, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.24722057, 1.23510285 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.25487966, -1.24236048, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.25515946, 1.2429242 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.26258134, -1.24994547, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.26286217, 1.25051287 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.27004418, -1.25729524, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.27032601, 1.2578662 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.2772655, -1.26440715, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.2775483, 1.26498156 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.28424262, -1.27127856, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.28452636, 1.2718563 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.29097286, -1.27790682, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.29125749, 1.27848777 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.29745352, -1.28428929, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.29773902, 1.28487334 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.30368193, -1.29042333, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.30396826, 1.29101035 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.3096554, -1.29630629, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.30994253, 1.29689617 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.31537125, -1.30193554, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.31565915, 1.30252815 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.3208268, -1.30730843, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.32111542, 1.30790364 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.32601936, -1.31242231, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.32630868, 1.31302 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.33094624, -1.31727455, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.33123622, 1.31787459 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.33560478, -1.3218625, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.33589538, 1.32246477 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.33999227, -1.32618351, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.34028346, 1.32678788 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.34410604, -1.33023496, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.34439778, 1.33084129 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.34794341, -1.33401418, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.34823566, 1.33462234 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.35150168, -1.33751854, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.35179441, 1.3381284 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.35477819, -1.3407454, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.35507135, 1.34135683 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.35777023, -1.34369212, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.3580638, 1.34430497 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.36047514, -1.34635604, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.36076907, 1.34697019 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.36289023, -1.34873453, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.36318448, 1.34934983 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.3650128, -1.35082495, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.36530734, 1.35144126 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.36684019, -1.35262465, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.36713497, 1.35324183 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.3683697, -1.35413098, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.36866468, 1.3547489 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.36959866, -1.35534132, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.3698938, 1.35595982 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.37052437, -1.35625301, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.37081964, 1.35687195 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.37114416, -1.3568634, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.37143951, 1.35748265 ] + - [ 0.932143469, 1.96266568, -2.24730445, 1.593964, -1.69296937, 1.37145534, -1.35716987, 0.932005821, -1.96349541, 2.24798408, 1.59348561, 1.69296937, 1.37175073, 1.35778926 ] + - [ 0.932144062, 1.96266517, -2.24729972, 1.59396211, -1.6929695, 1.37147347, -1.35720855, 0.932006414, -1.9634949, 2.24797935, 1.59348372, 1.6929695, 1.37176887, 1.35782795 ] + - [ 0.932149298, 1.96266066, -2.24725782, 1.5939453, -1.69297062, 1.37128852, -1.35721073, 0.932011655, -1.96349034, 2.24793738, 1.59346691, 1.69297067, 1.37158394, 1.35783001 ] + - [ 0.932159888, 1.96265151, -2.24717275, 1.59391104, -1.69297285, 1.37091353, -1.35721505, 0.932022253, -1.96348112, 2.2478522, 1.59343264, 1.69297299, 1.371209, 1.3578341 ] + - [ 0.932175762, 1.96263777, -2.24704472, 1.59385926, -1.69297614, 1.37034989, -1.35722139, 0.93203814, -1.96346724, 2.24772398, 1.59338085, 1.69297643, 1.37064543, 1.35784008 ] + - [ 0.932196852, 1.96261945, -2.2468739, 1.59378989, -1.69298046, 1.36959897, -1.35722962, 0.932059248, -1.96344876, 2.24755294, 1.59331148, 1.69298093, 1.36989461, 1.35784785 ] + - [ 0.932223089, 1.9625966, -2.24666051, 1.59370287, -1.69298574, 1.36866216, -1.35723962, 0.932085507, -1.96342571, 2.24733925, 1.59322444, 1.69298644, 1.36895792, 1.35785726 ] + - [ 0.932254405, 1.96256926, -2.24640473, 1.59359812, -1.69299194, 1.36754083, -1.35725126, 0.932116849, -1.96339811, 2.24708312, 1.59311968, 1.69299292, 1.36783673, 1.35786821 ] + - [ 0.932290731, 1.96253744, -2.24610677, 1.59347558, -1.69299901, 1.36623637, -1.35726444, 0.932153207, -1.96336601, 2.24678474, 1.59299713, 1.69300032, 1.36653243, 1.35788057 ] + - [ 0.932331998, 1.96250119, -2.2457668, 1.59333519, -1.69300691, 1.36475014, -1.35727901, 0.93219451, -1.96332943, 2.24644431, 1.59285672, 1.69300859, 1.3650464, 1.35789422 ] + - [ 0.932378139, 1.96246054, -2.24538504, 1.59317687, -1.69301559, 1.36308354, -1.35729486, 0.932240692, -1.96328842, 2.24606202, 1.59269838, 1.69301769, 1.36338001, 1.35790904 ] + - [ 0.932429085, 1.96241553, -2.24496167, 1.59300056, -1.693025, 1.36123794, -1.35731186, 0.932291683, -1.96324299, 2.24563806, 1.59252204, 1.69302756, 1.36153464, 1.35792489 ] + - [ 0.932484766, 1.96236619, -2.24449688, 1.59280618, -1.69303509, 1.35921472, -1.3573299, 0.932347414, -1.9631932, 2.24517264, 1.59232764, 1.69303815, 1.35951168, 1.35794167 ] + - [ 0.932545115, 1.96231254, -2.24399088, 1.59259368, -1.69304581, 1.35701526, -1.35734884, 0.932407818, -1.96313907, 2.24466595, 1.59211511, 1.69304942, 1.3573125, 1.35795926 ] + - [ 0.932610064, 1.96225463, -2.24344386, 1.59236299, -1.69305713, 1.35464094, -1.35736857, 0.932472826, -1.96308064, 2.24411818, 1.59188439, 1.69306132, 1.35493848, 1.35797751 ] + - [ 0.932679542, 1.96219249, -2.24285601, 1.59211402, -1.69306897, 1.35209314, -1.35738896, 0.932542369, -1.96301794, 2.24352953, 1.59163539, 1.6930738, 1.35239101, 1.35799633 ] + - [ 0.932753483, 1.96212616, -2.24222753, 1.59184673, -1.69308131, 1.34937323, -1.35740989, 0.932616379, -1.962951, 2.2429002, 1.59136806, 1.69308682, 1.34967145, 1.35801557 ] + - [ 0.932831817, 1.96205566, -2.24155861, 1.59156104, -1.6930941, 1.34648261, -1.35743124, 0.932694787, -1.96287986, 2.24223037, 1.59108234, 1.69310032, 1.34678119, 1.35803513 ] + - [ 0.932914476, 1.96198102, -2.24084945, 1.59125688, -1.69310727, 1.34342264, -1.35745288, 0.932777525, -1.96280455, 2.24152024, 1.59077814, 1.69311426, 1.34372161, 1.35805488 ] + - [ 0.933001391, 1.9619023, -2.24010024, 1.59093419, -1.6931208, 1.34019471, -1.35747469, 0.932864524, -1.96272511, 2.24077002, 1.5904554, 1.69312859, 1.34049409, 1.35807469 ] + - [ 0.933092495, 1.96181951, -2.23931118, 1.5905929, -1.69313462, 1.33680019, -1.35749654, 0.932955716, -1.96264157, 2.23997989, 1.59011406, 1.69314326, 1.3371, 1.35809445 ] + - [ 0.933187717, 1.96173269, -2.23848246, 1.59023294, -1.6931487, 1.33324047, -1.35751832, 0.933051033, -1.96255396, 2.23915005, 1.58975405, 1.69315822, 1.33354073, 1.35811403 ] + - [ 0.93328699, 1.96164187, -2.23761427, 1.58985424, -1.69316297, 1.32951692, -1.3575399, 0.933150405, -1.96246233, 2.23828069, 1.5893753, 1.69317342, 1.32981766, 1.35813332 ] + - [ 0.933390246, 1.96154709, -2.23670682, 1.58945673, -1.69317741, 1.32563093, -1.35756115, 0.933253765, -1.96236669, 2.23737202, 1.58897775, 1.69318883, 1.32593216, 1.35815218 ] + - [ 0.933497415, 1.96144839, -2.23576029, 1.58904036, -1.69319195, 1.32158387, -1.35758196, 0.933361044, -1.96226709, 2.23642422, 1.58856132, 1.69320438, 1.32188561, 1.35817049 ] + - [ 0.93360843, 1.96134579, -2.23477488, 1.58860504, -1.69320655, 1.31737712, -1.3576022, 0.933472173, -1.96216356, 2.23543749, 1.58812594, 1.69322003, 1.3176794, 1.35818815 ] + - [ 0.933723221, 1.96123932, -2.23375079, 1.58815072, -1.69322117, 1.31301206, -1.35762175, 0.933587084, -1.96205613, 2.23441203, 1.58767156, 1.69323573, 1.3133149, 1.35820501 ] + - [ 0.93384172, 1.96112904, -2.2326882, 1.58767732, -1.69323575, 1.30849008, -1.35764048, 0.933705708, -1.96194484, 2.23334803, 1.5871981, 1.69325143, 1.30879349, 1.35822096 ] + - [ 0.933963859, 1.96101495, -2.23158732, 1.58718478, -1.69325025, 1.30381255, -1.35765828, 0.933827977, -1.96182973, 2.23224568, 1.58670549, 1.69326709, 1.30411655, 1.35823588 ] + - [ 0.934089569, 1.96089711, -2.23044834, 1.58667303, -1.69326461, 1.29898084, -1.35767501, 0.933953822, -1.96171082, 2.23110519, 1.58619367, 1.69328266, 1.29928547, 1.35824965 ] + - [ 0.934218781, 1.96077554, -2.22927146, 1.58614201, -1.6932788, 1.29399635, -1.35769056, 0.934083176, -1.96158815, 2.22992674, 1.58566257, 1.69329809, 1.29430161, 1.35826214 ] + - [ 0.934351427, 1.96065028, -2.22805686, 1.58559163, -1.69329276, 1.28886045, -1.35770479, 0.934215968, -1.96146175, 2.22871054, 1.58511212, 1.69331332, 1.28916635, 1.35827323 ] + - [ 0.934487439, 1.96052136, -2.22680475, 1.58502185, -1.69330644, 1.28357451, -1.3577176, 0.934352132, -1.96133166, 2.22745677, 1.58454226, 1.69332832, 1.28388109, 1.3582828 ] + - [ 0.934626748, 1.96038881, -2.22551532, 1.58443258, -1.69331981, 1.27813992, -1.35772886, 0.934491598, -1.96119791, 2.22616564, 1.58395291, 1.69334304, 1.27844719, 1.35829072 ] + - [ 0.934769285, 1.96025267, -2.22418876, 1.58382377, -1.6933328, 1.27255806, -1.35773843, 0.934634298, -1.96106054, 2.22483733, 1.58334401, 1.69335742, 1.27286604, 1.35829689 ] + - [ 0.934914982, 1.96011297, -2.22282527, 1.58319533, -1.69334537, 1.26683031, -1.35774621, 0.934780163, -1.96091958, 2.22347205, 1.58271549, 1.69337142, 1.26713902, 1.35830116 ] + - [ 0.935063771, 1.95996975, -2.22142504, 1.58254722, -1.69335748, 1.26095804, -1.35775206, 0.934929125, -1.96077506, 2.22206998, 1.58206729, 1.69338499, 1.26126749, 1.35830342 ] + - [ 0.935215582, 1.95982304, -2.21998827, 1.58187936, -1.69336908, 1.25494263, -1.35775586, 0.935081116, -1.96062702, 2.22063133, 1.58139933, 1.69339808, 1.25525286, 1.35830356 ] + - [ 0.935370347, 1.95967287, -2.21851515, 1.58119167, -1.69338011, 1.24878547, -1.3577575, 0.935236066, -1.96047549, 2.21915629, 1.58071155, 1.69341064, 1.24909648, 1.35830144 ] + - [ 0.935527998, 1.95951928, -2.21700588, 1.5804841, -1.69339053, 1.24248794, -1.35775684, 0.935393908, -1.9603205, 2.21764505, 1.58000388, 1.69342263, 1.24279975, 1.35829694 ] + - [ 0.935688467, 1.95936229, -2.21546065, 1.57975658, -1.6934003, 1.23605141, -1.35775377, 0.935554572, -1.96016209, 2.21609781, 1.57927626, 1.693434, 1.23636403, 1.35828994 ] + - [ 0.935851684, 1.95920195, -2.21387965, 1.57900903, -1.69340936, 1.22947726, -1.35774815, 0.935717991, -1.9600003, 2.21451476, 1.57852861, 1.69344469, 1.22979072, 1.35828033 ] + - [ 0.936017581, 1.95903829, -2.21226309, 1.5782414, -1.69341767, 1.22276688, -1.35773988, 0.935884096, -1.95983516, 2.21289611, 1.57776087, 1.69345467, 1.22308119, 1.35826797 ] + - [ 0.93618609, 1.95887134, -2.21061116, 1.57745361, -1.69342518, 1.21592163, -1.35772882, 0.936052819, -1.95966669, 2.21124204, 1.57697296, 1.69346388, 1.21623682, 1.35825275 ] + - [ 0.936357142, 1.95870113, -2.20892404, 1.57664559, -1.69343184, 1.20894291, -1.35771485, 0.93622409, -1.95949494, 2.20955275, 1.57616484, 1.69347228, 1.20925898, 1.35823454 ] + - [ 0.936530668, 1.9585277, -2.20720195, 1.57581728, -1.6934376, 1.20183209, -1.35769784, 0.936397842, -1.95931994, 2.20782843, 1.57533641, 1.69347981, 1.20214906, 1.35821323 ] + - [ 0.936706601, 1.95835108, -2.20544506, 1.57496862, -1.69344242, 1.19459054, -1.35767769, 0.936574005, -1.95914172, 2.20606929, 1.57448762, 1.69348643, 1.19490844, 1.35818868 ] + - [ 0.936884871, 1.95817131, -2.20365358, 1.57409952, -1.69344625, 1.18721966, -1.35765425, 0.936752512, -1.95896032, 2.20427551, 1.57361841, 1.69349209, 1.18753849, 1.35816078 ] + - [ 0.937065409, 1.95798842, -2.20182769, 1.57320993, -1.69344904, 1.17972081, -1.35762741, 0.936933294, -1.95877577, 2.20244729, 1.57272869, 1.69349674, 1.1800406, 1.3581294 ] + - [ 0.937248149, 1.95780243, -2.19996761, 1.57229978, -1.69345074, 1.17209539, -1.35759705, 0.937116283, -1.95858811, 2.20058483, 1.57181841, 1.69350033, 1.17241615, 1.35809443 ] + - [ 0.93743302, 1.9576134, -2.19807351, 1.571369, -1.69345131, 1.16434476, -1.35756304, 0.937301409, -1.95839736, 2.19868832, 1.5708875, 1.69350282, 1.1646665, 1.35805574 ] + - [ 0.937619955, 1.95742135, -2.1961456, 1.57041752, -1.69345069, 1.15647031, -1.35752527, 0.937488605, -1.95820356, 2.19675796, 1.56993588, 1.69350416, 1.15679305, 1.3580132 ] + - [ 0.937808884, 1.95722631, -2.19418406, 1.56944528, -1.69344884, 1.14847341, -1.35748359, 0.937677801, -1.95800676, 2.19479394, 1.5689635, 1.6935043, 1.14879717, 1.3579667 ] + - [ 0.93799974, 1.95702831, -2.1921891, 1.5684522, -1.69344571, 1.14035545, -1.3574379, 0.937868931, -1.95780697, 2.19279645, 1.56797028, 1.69350319, 1.14068024, 1.35791612 ] + - [ 0.938192453, 1.9568274, -2.19016091, 1.56743822, -1.69344126, 1.1321178, -1.35738807, 0.938061924, -1.95760424, 2.1907657, 1.56695616, 1.69350078, 1.13244364, 1.35786133 ] + - [ 0.938386956, 1.9566236, -2.18809969, 1.56640327, -1.69343543, 1.12376185, -1.35733398, 0.938256712, -1.95739859, 2.18870188, 1.56592107, 1.69349702, 1.12408875, 1.3578022 ] + - [ 0.938583179, 1.95641695, -2.18600562, 1.56534729, -1.69342817, 1.11528897, -1.3572755, 0.938453227, -1.95719007, 2.18660518, 1.56486493, 1.69349188, 1.11561695, 1.35773863 ] + - [ 0.938781055, 1.95620749, -2.1838789, 1.56427021, -1.69341945, 1.10670055, -1.35721251, 0.938651401, -1.95697871, 2.1844758, 1.56378769, 1.69348529, 1.10702962, 1.35767048 ] + - [ 0.938980514, 1.95599523, -2.18171973, 1.56317195, -1.69340921, 1.09799795, -1.35714489, 0.938851165, -1.95676453, 2.18231393, 1.56268928, 1.69347721, 1.09832814, 1.35759764 ] + - [ 0.939181489, 1.95578023, -2.17952831, 1.56205246, -1.69339741, 1.08918257, -1.35707251, 0.93905245, -1.95654758, 2.18011977, 1.56156962, 1.69346759, 1.08951388, 1.35751997 ] + - [ 0.939383909, 1.95556251, -2.17730482, 1.56091166, -1.69338399, 1.08025579, -1.35699526, 0.939255189, -1.95632789, 2.17789352, 1.56042866, 1.69345639, 1.08058822, 1.35743737 ] + - [ 0.939587708, 1.95534211, -2.17504946, 1.55974948, -1.69336891, 1.07121897, -1.356913, 0.939459311, -1.95610549, 2.17563536, 1.55926632, 1.69344355, 1.07155255, 1.3573497 ] + - [ 0.939792817, 1.95511905, -2.17276243, 1.55856587, -1.69335212, 1.0620735, -1.35682562, 0.93966475, -1.95588041, 2.1733455, 1.55808253, 1.69342903, 1.06240825, 1.35725685 ] + - [ 0.939999166, 1.95489338, -2.17044393, 1.55736074, -1.69333357, 1.05282076, -1.35673299, 0.939871436, -1.9556527, 2.17102413, 1.55687723, 1.69341278, 1.05315669, 1.35715868 ] + - [ 0.940206688, 1.95466513, -2.16809414, 1.55613404, -1.69331322, 1.04346213, -1.35663498, 0.940079301, -1.95542238, 2.16867144, 1.55565035, 1.69339475, 1.04379925, 1.35705509 ] + - [ 0.940415314, 1.95443433, -2.16571326, 1.5548857, -1.69329101, 1.03399899, -1.35653149, 0.940288277, -1.95518949, 2.16628763, 1.55440182, 1.6933749, 1.03433731, 1.35694595 ] + - [ 0.940624975, 1.95420101, -2.16330148, 1.55361564, -1.69326691, 1.02443271, -1.35642237, 0.940498294, -1.95495406, 2.1638729, 1.55313158, 1.69335316, 1.02477225, 1.35683114 ] + - [ 0.940835603, 1.95396521, -2.16085901, 1.5523238, -1.69324086, 1.01476469, -1.35630752, 0.940709285, -1.95471612, 2.16142744, 1.55183956, 1.69332951, 1.01510545, 1.35671053 ] + - [ 0.94104713, 1.95372697, -2.15838603, 1.55101012, -1.69321281, 1.00499629, -1.3561868, 0.940921181, -1.95447572, 2.15895144, 1.55052568, 1.69330388, 1.00533829, 1.356584 ] + - [ 0.941259486, 1.95348631, -2.15588274, 1.54967452, -1.69318271, 0.995128891, -1.35606009, 0.941133913, -1.95423288, 2.15644511, 1.54918989, 1.69327624, 0.995472154, 1.35645143 ] + - [ 0.941472603, 1.95324326, -2.15334934, 1.54831694, -1.69315053, 0.985163881, -1.35592728, 0.941347414, -1.95398763, 2.15390863, 1.54783211, 1.69324652, 0.985508412, 1.3563127 ] + - [ 0.941686414, 1.95299788, -2.15078602, 1.54693731, -1.6931162, 0.975102636, -1.35578823, 0.941561614, -1.95374002, 2.1513422, 1.54645227, 1.69321469, 0.975448446, 1.35616768 ] + - [ 0.941900848, 1.95275017, -2.14819297, 1.54553556, -1.69307969, 0.964946535, -1.35564282, 0.941776444, -1.95349007, 2.14874602, 1.54505032, 1.6931807, 0.965293637, 1.35601626 ] + - [ 0.942115838, 1.95250019, -2.14557039, 1.54411163, -1.69304094, 0.954696957, -1.35549093, 0.941991838, -1.95323783, 2.14612028, 1.54362617, 1.69314449, 0.955045362, 1.35585831 ] + - [ 0.942331315, 1.95224796, -2.14291848, 1.54266544, -1.69299991, 0.944355282, -1.35533245, 0.942207725, -1.95298331, 2.14346518, 1.54217977, 1.69310603, 0.944705002, 1.3556937 ] + - [ 0.942547211, 1.95199352, -2.14023742, 1.54119694, -1.69295655, 0.933922889, -1.35516723, 0.942424038, -1.95272657, 2.14078092, 1.54071105, 1.69306525, 0.934273936, 1.35552233 ] + - [ 0.942763457, 1.9517369, -2.13752742, 1.53970604, -1.6929108, 0.923401158, -1.35499517, 0.942640708, -1.95246762, 2.13806767, 1.53921994, 1.69302212, 0.923753543, 1.35534406 ] + - [ 0.942979984, 1.95147814, -2.13478867, 1.53819269, -1.69286264, 0.912791467, -1.35481613, 0.942857666, -1.95220651, 2.13532566, 1.53770636, 1.69297658, 0.913145202, 1.35515877 ] + - [ 0.943196724, 1.95121726, -2.13202136, 1.53665682, -1.69281199, 0.902095197, -1.35463, 0.943074845, -1.95194327, 2.13255506, 1.53617026, 1.69292859, 0.902450292, 1.35496634 ] + - [ 0.943413609, 1.9509543, -2.12922569, 1.53509836, -1.69275883, 0.891313726, -1.35443665, 0.943292174, -1.95167793, 2.12975607, 1.53461156, 1.6928781, 0.891670192, 1.35476665 ] + - [ 0.94363057, 1.9506893, -2.12640185, 1.53351723, -1.69270309, 0.880448435, -1.35423596, 0.943509587, -1.95141053, 2.12692889, 1.5330302, 1.69282506, 0.880806283, 1.35455958 ] + - [ 0.943847538, 1.9504223, -2.12355004, 1.53191338, -1.69264474, 0.869500702, -1.35402781, 0.943727015, -1.9511411, 2.12407372, 1.53142612, 1.69276942, 0.869859942, 1.354345 ] + - [ 0.944064445, 1.95015331, -2.12067045, 1.53028674, -1.69258372, 0.858471907, -1.35381207, 0.943944388, -1.95086968, 2.12119075, 1.52979923, 1.69271113, 0.85883255, 1.3541228 ] + - [ 0.944281223, 1.94988238, -2.11776327, 1.52863724, -1.69251999, 0.847363429, -1.35358861, 0.944161639, -1.9505963, 2.11828017, 1.52814948, 1.69265015, 0.847725485, 1.35389284 ] + - [ 0.944497802, 1.94960954, -2.11482871, 1.52696481, -1.6924535, 0.836176648, -1.35335733, 0.944378699, -1.95032098, 2.11534217, 1.5264768, 1.69258643, 0.836540126, 1.35365501 ] + - [ 0.944714115, 1.94933482, -2.11186696, 1.52526938, -1.69238419, 0.824912943, -1.35311808, 0.944595499, -1.95004378, 2.11237697, 1.52478111, 1.69251992, 0.825277853, 1.35340919 ] + - [ 0.944930092, 1.94905826, -2.10887821, 1.52355089, -1.69231203, 0.813573694, -1.35287076, 0.944811972, -1.94976471, 2.10938474, 1.52306236, 1.69245057, 0.813940046, 1.35315525 ] + - [ 0.945145666, 1.94877989, -2.10586265, 1.52180926, -1.69223697, 0.802160279, -1.35261523, 0.945028048, -1.94948382, 2.10636569, 1.52132048, 1.69237833, 0.802528082, 1.35289307 ] + - [ 0.945360767, 1.94849975, -2.10282049, 1.52004444, -1.69215895, 0.790674078, -1.35235138, 0.945243659, -1.94920114, 2.10332001, 1.51955539, 1.69230316, 0.791043343, 1.35262253 ] + - [ 0.945575327, 1.94821787, -2.09975191, 1.51825635, -1.69207793, 0.779116471, -1.35207907, 0.945458736, -1.94891671, 2.1002479, 1.51776702, 1.692225, 0.779487205, 1.35234351 ] + - [ 0.945789278, 1.94793427, -2.09665711, 1.51644492, -1.69199387, 0.767488837, -1.3517982, 0.945673212, -1.94863054, 2.09714954, 1.51595532, 1.69214382, 0.76786105, 1.35205588 ] + - [ 0.946002551, 1.94764901, -2.09353628, 1.51461009, -1.6919067, 0.755792555, -1.35150862, 0.945887017, -1.94834269, 2.09402515, 1.51412022, 1.69205955, 0.756166256, 1.35175953 ] + - [ 0.946215078, 1.9473621, -2.09038963, 1.5127518, -1.6918164, 0.744029005, -1.35121023, 0.946100083, -1.94805319, 2.0908749, 1.51226164, 1.69197216, 0.744404202, 1.35145432 ] + - [ 0.94642679, 1.94707359, -2.08721734, 1.51086996, -1.6917229, 0.732199567, -1.3509029, 0.946312342, -1.94776206, 2.087699, 1.51037952, 1.69188159, 0.732576267, 1.35114015 ] + - [ 0.946637618, 1.9467835, -2.08401961, 1.50896452, -1.69162616, 0.720305618, -1.3505865, 0.946523725, -1.94746934, 2.08449764, 1.50847379, 1.69178779, 0.720683832, 1.35081688 ] + - [ 0.946847494, 1.94649187, -2.08079663, 1.50703541, -1.69152614, 0.70834854, -1.35026091, 0.946734163, -1.94717507, 2.08127102, 1.50654438, 1.69169073, 0.708728274, 1.35048439 ] + - [ 0.94705635, 1.94619874, -2.07754861, 1.50508256, -1.69142278, 0.696329711, -1.34992601, 0.946943588, -1.94687928, 2.07801934, 1.50459123, 1.69159034, 0.696710974, 1.35014257 ] + - [ 0.947264116, 1.94590413, -2.07427572, 1.5031059, -1.69131603, 0.684250511, -1.34958168, 0.947151932, -1.94658201, 2.07474278, 1.50261427, 1.69148659, 0.68463331, 1.34979129 ] + - [ 0.947470725, 1.94560809, -2.07097818, 1.50110536, -1.69120586, 0.672112319, -1.34922779, 0.947359126, -1.94628328, 2.07144154, 1.50061343, 1.69137941, 0.672496661, 1.34943042 ] + - [ 0.947676108, 1.94531064, -2.06765617, 1.49908088, -1.6910922, 0.659916514, -1.34886421, 0.947565102, -1.94598314, 2.06811582, 1.49858864, 1.69126878, 0.660302407, 1.34905985 ] + - [ 0.947880196, 1.94501182, -2.06430989, 1.49703239, -1.69097502, 0.647664476, -1.34849084, 0.94776979, -1.94568161, 2.06476581, 1.49653983, 1.69115463, 0.648051928, 1.34867945 ] + - [ 0.948082921, 1.94471166, -2.06093953, 1.49495982, -1.69085427, 0.635357585, -1.34810753, 0.947973123, -1.94537873, 2.06139172, 1.49446694, 1.69103692, 0.635746601, 1.34828911 ] + - [ 0.948284214, 1.94441019, -2.05754528, 1.49286311, -1.69072989, 0.622997219, -1.34771418, 0.948175033, -1.94507454, 2.05799372, 1.49236991, 1.6909156, 0.623387807, 1.34788869 ] + - [ 0.948484007, 1.94410746, -2.05412735, 1.49074218, -1.69060185, 0.610584758, -1.34731065, 0.94837545, -1.94476906, 2.05457203, 1.49024865, 1.69079062, 0.610976925, 1.34747808 ] + - [ 0.948682231, 1.94380349, -2.05068593, 1.48859697, -1.69047008, 0.598121582, -1.34689683, 0.948574305, -1.94446233, 2.05112683, 1.48810311, 1.69066194, 0.598515334, 1.34705716 ] + - [ 0.948878817, 1.94349831, -2.04722121, 1.48642742, -1.69033455, 0.585609069, -1.34647258, 0.948771532, -1.9441544, 2.04765832, 1.48593322, 1.6905295, 0.586004412, 1.3466258 ] + - [ 0.949073698, 1.94319197, -2.04373339, 1.48423344, -1.69019521, 0.5730486, -1.3460378, 0.94896706, -1.94384528, 2.04416669, 1.48373891, 1.69039326, 0.57344554, 1.34618388 ] + - [ 0.949266804, 1.94288449, -2.04022265, 1.48201499, -1.690052, 0.560441553, -1.34559234, 0.949160823, -1.94353501, 2.04065215, 1.4815201, 1.69025317, 0.560840097, 1.34573127 ] + - [ 0.949458068, 1.94257591, -2.03668921, 1.47977198, -1.68990489, 0.547789308, -1.3451361, 0.94935275, -1.94322363, 2.03711488, 1.47927675, 1.69010919, 0.548189461, 1.34526787 ] + - [ 0.94964742, 1.94226626, -2.03313324, 1.47750435, -1.68975381, 0.535093245, -1.34466895, 0.949542774, -1.94291118, 2.03355507, 1.47700876, 1.68996125, 0.535495013, 1.34479354 ] + - [ 0.949834792, 1.94195557, -2.02955496, 1.47521203, -1.68959874, 0.522354743, -1.34419076, 0.949730825, -1.94259768, 2.02997294, 1.47471609, 1.68980932, 0.52275813, 1.34430816 ] + - [ 0.950020115, 1.94164388, -2.02595454, 1.47289496, -1.68943961, 0.50957518, -1.34370141, 0.949916837, -1.94228317, 2.02636867, 1.47239866, 1.68965335, 0.509980193, 1.34381161 ] + - [ 0.950203321, 1.94133123, -2.02233218, 1.47055307, -1.68927638, 0.496755937, -1.34320078, 0.950100739, -1.94196768, 2.02274245, 1.4700564, 1.68949329, 0.49716258, 1.34330376 ] + - [ 0.950384342, 1.94101764, -2.01868809, 1.46818629, -1.689109, 0.483898394, -1.34268874, 0.950282465, -1.94165125, 2.01909448, 1.46768925, 1.68932909, 0.484306672, 1.34278451 ] + - [ 0.950563109, 1.94070315, -2.01502245, 1.46579455, -1.68893743, 0.471003928, -1.34216518, 0.950461944, -1.94133391, 2.01542496, 1.46529714, 1.6891607, 0.471413846, 1.34225371 ] + - [ 0.950739553, 1.94038779, -2.01133546, 1.46337779, -1.68876161, 0.45807392, -1.34162997, 0.950639109, -1.94101569, 2.01173408, 1.46287999, 1.68898807, 0.458485483, 1.34171126 ] + - [ 0.950913605, 1.9400716, -2.00762732, 1.46093593, -1.6885815, 0.44510975, -1.34108298, 0.950813891, -1.94069664, 2.00802204, 1.46043776, 1.68881116, 0.445522961, 1.34115703 ] + - [ 0.951085198, 1.93975461, -2.00389822, 1.45846891, -1.68839705, 0.432112795, -1.34052409, 0.950986221, -1.94037678, 2.00428903, 1.45797035, 1.68862992, 0.432527659, 1.34059089 ] + - [ 0.951254263, 1.93943686, -2.00014834, 1.45597667, -1.68820821, 0.419084437, -1.33995319, 0.951156032, -1.94005614, 2.00053525, 1.45547771, 1.6884443, 0.419500958, 1.34001273 ] + - [ 0.951420731, 1.93911837, -1.9963779, 1.45345913, -1.68801494, 0.406026054, -1.33937014, 0.951323254, -1.93973477, 1.9967609, 1.45295978, 1.68825425, 0.406444235, 1.33942243 ] + - [ 0.951584534, 1.93879918, -1.99258708, 1.45091623, -1.68781719, 0.392939026, -1.33877482, 0.95148782, -1.93941269, 1.99296616, 1.45041647, 1.68805973, 0.393358871, 1.33881985 ] + - [ 0.951745603, 1.93847933, -1.98877608, 1.44834789, -1.6876149, 0.379824732, -1.33816712, 0.95164966, -1.93908994, 1.98915123, 1.44784773, 1.68786068, 0.380246245, 1.33820488 ] + - [ 0.951903869, 1.93815885, -1.9849451, 1.44575406, -1.68740804, 0.366684551, -1.3375469, 0.951808706, -1.93876656, 1.98531631, 1.44525349, 1.68765705, 0.367107735, 1.3375774 ] + - [ 0.952059264, 1.93783777, -1.98109432, 1.44313467, -1.68719655, 0.353519863, -1.33691404, 0.95196489, -1.93844257, 1.98146159, 1.44263368, 1.68744881, 0.353944721, 1.33693728 ] + - [ 0.952211721, 1.93751612, -1.97722394, 1.44048964, -1.68698038, 0.340332047, -1.33626843, 0.952118143, -1.93811801, 1.97758728, 1.43998823, 1.6872359, 0.340758583, 1.3362844 ] + - [ 0.952361169, 1.93719395, -1.97333416, 1.4378189, -1.68675949, 0.327122483, -1.33560993, 0.952268397, -1.93779292, 1.97369356, 1.43731708, 1.68701827, 0.327550699, 1.33561864 ] + - [ 0.95250754, 1.93687128, -1.96942517, 1.4351224, -1.68653384, 0.31389255, -1.33493843, 0.952415582, -1.93746732, 1.96978062, 1.43462015, 1.68679587, 0.314322448, 1.33493989 ] + - [ 0.952650767, 1.93654814, -1.96549717, 1.43240007, -1.68630336, 0.300643627, -1.3342538, 0.952559632, -1.93714126, 1.96584868, 1.43189738, 1.68656866, 0.30107521, 1.334248 ] + - [ 0.95279078, 1.93622458, -1.96155035, 1.42965183, -1.68606802, 0.287377094, -1.33355592, 0.952700476, -1.93681476, 1.96189791, 1.4291487, 1.68633659, 0.287810365, 1.33354287 ] + - [ 0.95292751, 1.93590062, -1.95758491, 1.42687762, -1.68582776, 0.274094331, -1.33284466, 0.952838047, -1.93648787, 1.95792852, 1.42637404, 1.68609961, 0.27452929, 1.33282437 ] + - [ 0.953060891, 1.9355763, -1.95360104, 1.42407736, -1.68558255, 0.260796715, -1.33211991, 0.952972277, -1.93616061, 1.95394069, 1.42357334, 1.68585767, 0.261233366, 1.33209239 ] + - [ 0.953190852, 1.93525165, -1.94959894, 1.42125101, -1.68533232, 0.247485628, -1.33138153, 0.953103095, -1.93583302, 1.94993464, 1.42074653, 1.68561072, 0.247923972, 1.33134678 ] + - [ 0.953317325, 1.9349267, -1.94557879, 1.41839847, -1.68507704, 0.234162448, -1.33062941, 0.953230436, -1.93550513, 1.94591054, 1.41789354, 1.68535872, 0.234602486, 1.33058745 ] + - [ 0.953440242, 1.93460149, -1.9415408, 1.4155197, -1.68481665, 0.220828555, -1.32986342, 0.953354228, -1.93517697, 1.9418686, 1.41501431, 1.68510162, 0.221270289, 1.32981425 ] + - [ 0.953559535, 1.93427606, -1.93748516, 1.41261462, -1.68455111, 0.207485328, -1.32908344, 0.953474405, -1.93484859, 1.93780901, 1.41210876, 1.68483936, 0.207928759, 1.32902708 ] + - [ 0.953675134, 1.93395043, -1.93341207, 1.40968316, -1.68428037, 0.194134147, -1.32828935, 0.953590898, -1.93452001, 1.93373197, 1.40917683, 1.68457191, 0.194579275, 1.3282258 ] + - [ 0.953786971, 1.93362464, -1.92932172, 1.40672525, -1.68400439, 0.18077639, -1.32748102, 0.953703637, -1.93419127, 1.92963767, 1.40621845, 1.68429921, 0.181223217, 1.3274103 ] + - [ 0.953894978, 1.93329872, -1.9252143, 1.40374083, -1.6837231, 0.167413438, -1.32665833, 0.953812556, -1.9338624, 1.92552631, 1.40323355, 1.68402122, 0.167861964, 1.32658046 ] + - [ 0.953999086, 1.93297271, -1.92109001, 1.40072984, -1.68343647, 0.15404667, -1.32582116, 0.953917584, -1.93353344, 1.92139808, 1.40022206, 1.68373788, 0.154496896, 1.32573615 ] + - [ 0.954099226, 1.93264665, -1.91694904, 1.39769219, -1.68314445, 0.140677464, -1.32496938, 0.954018655, -1.93320442, 1.91725317, 1.39718393, 1.68344915, 0.141129391, 1.32487724 ] + - [ 0.954195331, 1.93232055, -1.9127916, 1.39462783, -1.68284699, 0.127307201, -1.32410288, 0.954115698, -1.93287537, 1.91309179, 1.39411907, 1.68315498, 0.127760828, 1.32400363 ] + - [ 0.954287331, 1.93199446, -1.90861786, 1.39153669, -1.68254405, 0.11393726, -1.32322152, 0.954208646, -1.93254633, 1.90891413, 1.39102742, 1.68285532, 0.114392587, 1.32311518 ] + - [ 0.954375158, 1.93166842, -1.90442804, 1.38841869, -1.68223557, 0.10056902, -1.32232518, 0.95429743, -1.93221733, 1.90472038, 1.38790893, 1.68255012, 0.101026047, 1.32221177 ] + - [ 0.954458744, 1.93134245, -1.90022232, 1.38527378, -1.6819215, 0.0872038609, -1.32141375, 0.954381982, -1.9318884, 1.90051074, 1.3847635, 1.68223934, 0.0876625877, 1.32129329 ] + - [ 0.954538019, 1.93101659, -1.89600089, 1.38210188, -1.6816018, 0.0738431616, -1.32048709, 0.954462233, -1.93155959, 1.8962854, 1.38159109, 1.68192293, 0.0743035875, 1.3203596 ] + - [ 0.954612916, 1.93069087, -1.89176396, 1.37890293, -1.68127643, 0.0604883018, -1.31954509, 0.954538115, -1.93123092, 1.89204456, 1.37839162, 1.68160084, 0.0609504261, 1.31941059 ] + - [ 0.954683366, 1.93036533, -1.88751172, 1.37567686, -1.68094533, 0.0471406608, -1.31858762, 0.954609559, -1.93090243, 1.88778842, 1.37516502, 1.68127302, 0.0476044825, 1.31844614 ] + - [ 0.9547493, 1.93003999, -1.88324436, 1.3724236, -1.68060845, 0.033801618, -1.31761456, 0.954676497, -1.93057415, 1.88351716, 1.37191123, 1.68093942, 0.0342671361, 1.31746612 ] + - [ 0.95481065, 1.9297149, -1.87896207, 1.36914308, -1.68026576, 0.0204725527, -1.31662578, 0.95473886, -1.93024611, 1.87923099, 1.36863018, 1.68059999, 0.020939766, 1.31647041 ] + - [ 0.954867347, 1.92939009, -1.87466506, 1.36583524, -1.67991719, 0.00715484449, -1.31562117, 0.954796579, -1.92991836, 1.8749301, 1.36532179, 1.6802547, 0.00762375135, 1.31545889 ] + - [ 0.954919323, 1.92906559, -1.87035352, 1.36250001, -1.6795627, -0.0061501274, -1.3146006, 0.954849587, -1.92959092, 1.87061468, 1.36198602, 1.67990348, -0.00567952851, 1.31443143 ] + - [ 0.954966509, 1.92874143, -1.86602763, 1.35913732, -1.67920225, -0.0194409835, -1.31356394, 0.954897815, -1.92926382, 1.86628494, 1.35862277, 1.67954629, -0.0189686944, 1.31338792 ] + - [ 0.955008836, 1.92841765, -1.8616876, 1.3557471, -1.67883579, -0.0327163445, -1.31251108, 0.954941193, -1.92893711, 1.86194106, 1.355232, 1.67918308, -0.0322423671, 1.31232823 ] + - [ 0.955046237, 1.92809429, -1.85733363, 1.35232929, -1.67846326, -0.045974831, -1.31144188, 0.954979655, -1.92861081, 1.85758324, 1.35181363, 1.67881381, -0.0454991675, 1.31125224 ] + - [ 0.955078643, 1.92777136, -1.8529659, 1.34888381, -1.67808463, -0.0592150635, -1.31035624, 0.95501313, -1.92828496, 1.85321167, 1.34836759, 1.67843842, -0.0587377162, 1.31015983 ] + - [ 0.955105984, 1.92744892, -1.84858461, 1.34541061, -1.67769984, -0.0724356627, -1.30925401, 0.955041552, -1.9279596, 1.84882656, 1.34489381, 1.67805687, -0.0719566341, 1.30905088 ] + - [ 0.955128193, 1.92712699, -1.84418995, 1.34190961, -1.67730884, -0.0856352493, -1.30813509, 0.95506485, -1.92763475, 1.8444281, 1.34139224, 1.67766911, -0.085154542, 1.30792525 ] + - [ 0.955145201, 1.9268056, -1.83978212, 1.33838075, -1.67691159, -0.0988124437, -1.30699934, 0.955082958, -1.92731045, 1.84001647, 1.33786279, 1.67727509, -0.0983300607, 1.30678284 ] + - [ 0.95515694, 1.9264848, -1.83536132, 1.33482395, -1.67650804, -0.111965867, -1.30584665, 0.955095805, -1.92698674, 1.83559188, 1.33430541, 1.67687477, -0.111481811, 1.30562352 ] + - [ 0.95516334, 1.9261646, -1.83092774, 1.33123915, -1.67609815, -0.125094139, -1.30467689, 0.955103324, -1.92666365, 1.83115453, 1.33072002, 1.67646809, -0.124608413, 1.30444717 ] + - [ 0.955164334, 1.92584506, -1.82648157, 1.32762629, -1.67568185, -0.138195881, -1.30348994, 0.955105447, -1.92634121, 1.8267046, 1.32710655, 1.676055, -0.137708489, 1.30325366 ] + - [ 0.955159853, 1.92552619, -1.82202302, 1.32398529, -1.67525911, -0.151269713, -1.30228567, 0.955102104, -1.92601945, 1.8222423, 1.32346495, 1.67563547, -0.150780659, 1.30204287 ] + - [ 0.955149828, 1.92520804, -1.81755226, 1.32031609, -1.67482989, -0.164314256, -1.30106397, 0.955093227, -1.92569842, 1.81776781, 1.31979514, 1.67520943, -0.163823543, 1.30081468 ] + - [ 0.955134191, 1.92489064, -1.8130695, 1.31661861, -1.67439412, -0.177328131, -1.2998247, 0.955078749, -1.92537814, 1.81328133, 1.31609705, 1.67477685, -0.176835762, 1.29956898 ] + - [ 0.955112874, 1.92457402, -1.80857494, 1.3128928, -1.67395176, -0.190309957, -1.29856775, 0.955058599, -1.92505866, 1.80878307, 1.31237062, 1.67433767, -0.189815938, 1.29830562 ] + - [ 0.955085807, 1.92425822, -1.80406877, 1.30913859, -1.67350277, -0.203258357, -1.29729299, 0.95503271, -1.92473999, 1.80427321, 1.30861578, 1.67389184, -0.202762691, 1.29702451 ] + - [ 0.955052922, 1.92394326, -1.79955118, 1.3053559, -1.6730471, -0.21617195, -1.2960003, 0.955001013, -1.92442218, 1.79975194, 1.30483246, 1.67343933, -0.215674642, 1.2957255 ] + - [ 0.955014151, 1.92362918, -1.79502236, 1.30154467, -1.67258469, -0.229049357, -1.29468956, 0.954963441, -1.92410526, 1.79521947, 1.3010206, 1.67298007, -0.228550412, 1.29440849 ] + - [ 0.954969425, 1.92331603, -1.79048252, 1.29770483, -1.67211551, -0.241889199, -1.29336064, 0.954919923, -1.92378927, 1.79067599, 1.29718012, 1.67251403, -0.24138862, 1.29307334 ] + - [ 0.954918676, 1.92300382, -1.78593185, 1.29383631, -1.6716395, -0.254690096, -1.29201342, 0.954870392, -1.92347423, 1.7861217, 1.29331096, 1.67204114, -0.254187889, 1.29171994 ] + - [ 0.954861835, 1.9226926, -1.78137053, 1.28993905, -1.67115662, -0.267450669, -1.29064778, 0.954814779, -1.92316019, 1.78155678, 1.28941305, 1.67156138, -0.266946839, 1.29034816 ] + - [ 0.954798833, 1.92238239, -1.77679878, 1.28601299, -1.67066681, -0.280169538, -1.28926359, 0.954753017, -1.92284717, 1.77698144, 1.28548632, 1.67107468, -0.279664091, 1.28895788 ] + - [ 0.954729602, 1.92207323, -1.77221677, 1.28205804, -1.67017003, -0.292845324, -1.28786073, 0.954685035, -1.92253521, 1.77239587, 1.28153071, 1.67058099, -0.292338265, 1.28754898 ] + - [ 0.954654074, 1.92176516, -1.76762472, 1.27807414, -1.66966624, -0.305476648, -1.28643907, 0.954610766, -1.92222435, 1.76780026, 1.27754614, 1.67008028, -0.304967983, 1.28612134 ] + - [ 0.95457218, 1.92145821, -1.7630228, 1.27406123, -1.66915538, -0.31806213, -1.28499851, 0.954530142, -1.92191461, 1.76319482, 1.27353256, 1.66957249, -0.317551865, 1.28467484 ] + - [ 0.954483852, 1.9211524, -1.75841122, 1.27001924, -1.66863741, -0.330600391, -1.2835389, 0.954443093, -1.92160604, 1.75857973, 1.26948989, 1.66905758, -0.330088531, 1.28320935 ] + - [ 0.95438902, 1.92084779, -1.75379017, 1.2659481, -1.66811227, -0.343090052, -1.28206013, 0.954349551, -1.92129866, 1.75395519, 1.26541807, 1.66853549, -0.342576604, 1.28172474 ] + - [ 0.954287617, 1.92054439, -1.74915984, 1.26184774, -1.66757993, -0.355529733, -1.28056208, 0.954249449, -1.92099252, 1.7493214, 1.26131702, 1.66800618, -0.355014702, 1.28022091 ] + - [ 0.954179573, 1.92024224, -1.74452044, 1.2577181, -1.66704033, -0.367918054, -1.27904461, 0.954142716, -1.92068764, 1.74467855, 1.25718668, 1.6674696, -0.367401448, 1.27869772 ] + - [ 0.954064821, 1.91994138, -1.73987215, 1.25355911, -1.66649343, -0.380253637, -1.27750762, 0.954029286, -1.92038405, 1.74002684, 1.25302698, 1.6669257, -0.379735463, 1.27715506 ] + - [ 0.953943291, 1.91964185, -1.73521517, 1.24937069, -1.66593917, -0.392535102, -1.27595097, 0.953909088, -1.9200818, 1.73536646, 1.24883786, 1.66637443, -0.392015365, 1.2755928 ] + - [ 0.953814916, 1.91934366, -1.73054969, 1.24515279, -1.66537751, -0.404761069, -1.27437454, 0.953782056, -1.91978091, 1.73069761, 1.24461925, 1.66581575, -0.404239778, 1.27401082 ] + - [ 0.953679627, 1.91904686, -1.72587592, 1.24090534, -1.66480841, -0.41693016, -1.27277822, 0.953648119, -1.91948142, 1.72602047, 1.24037107, 1.6652496, -0.416407321, 1.27240899 ] + - [ 0.953537355, 1.91875148, -1.72119403, 1.23662826, -1.66423181, -0.429040994, -1.27116187, 0.953507211, -1.91918337, 1.72133526, 1.23609327, 1.66467595, -0.428516615, 1.27078721 ] + - [ 0.953388031, 1.91845756, -1.71650424, 1.23232149, -1.66364766, -0.441092193, -1.26952537, 0.953359261, -1.91888678, 1.71664216, 1.23178577, 1.66409473, -0.440566281, 1.26914533 ] + - [ 0.953231588, 1.91816513, -1.71180673, 1.22798496, -1.66305592, -0.453082376, -1.2678686, 0.953204203, -1.9185917, 1.71194137, 1.22744851, 1.66350591, -0.45255494, 1.26748325 ] + - [ 0.953067956, 1.91787421, -1.7071017, 1.22361861, -1.66245655, -0.465010166, -1.26619144, 0.953041967, -1.91829815, 1.70723308, 1.22308141, 1.66290943, -0.464481212, 1.26580084 ] + - [ 0.952897067, 1.91758486, -1.70238934, 1.21922237, -1.66184948, -0.476874181, -1.26449376, 0.952872485, -1.91800617, 1.70251749, 1.21868442, 1.66230524, -0.476343719, 1.26409797 ] + - [ 0.952718853, 1.91729709, -1.69766985, 1.21479616, -1.66123469, -0.488673043, -1.26277544, 0.952695688, -1.9177158, 1.6977948, 1.21425746, 1.66169331, -0.488141081, 1.26237453 ] + - [ 0.952533244, 1.91701094, -1.69294342, 1.21033993, -1.6606121, -0.500405373, -1.26103636, 0.952511507, -1.91742706, 1.69306519, 1.20980046, 1.66107357, -0.499871918, 1.26063039 ] + - [ 0.952340173, 1.91672645, -1.68821024, 1.20585359, -1.65998169, -0.512069791, -1.25927639, 0.952319875, -1.91713999, 1.68832887, 1.20531337, 1.66044599, -0.511534853, 1.25886543 ] + - [ 0.952139572, 1.91644365, -1.68347053, 1.2013371, -1.6593434, -0.523664917, -1.25749542, 0.952120723, -1.91685463, 1.68358602, 1.2007961, 1.65981051, -0.523128505, 1.25707953 ] + - [ 0.95193137, 1.91616258, -1.67872445, 1.19679038, -1.65869718, -0.535189373, -1.25569331, 0.951913983, -1.91657101, 1.67883686, 1.1962486, 1.65916708, -0.534651495, 1.25527257 ] + - [ 0.951715501, 1.91588326, -1.67397222, 1.19221335, -1.65804299, -0.546641779, -1.25386995, 0.951699585, -1.91628916, 1.67408156, 1.19167079, 1.65851566, -0.546102444, 1.25344442 ] + - [ 0.951491894, 1.91560573, -1.66921403, 1.18760596, -1.65738078, -0.558020755, -1.2520252, 0.951477461, -1.91600912, 1.66932033, 1.18706261, 1.6578562, -0.557479973, 1.25159496 ] + - [ 0.951260483, 1.91533003, -1.66445006, 1.18296814, -1.6567105, -0.569324922, -1.25015896, 0.951247543, -1.91573092, 1.66455336, 1.18242399, 1.65718865, -0.568782703, 1.24972408 ] + - [ 0.951021198, 1.91505618, -1.65968053, 1.17829981, -1.65603209, -0.580552901, -1.24827109, 0.951009763, -1.91545459, 1.65978084, 1.17775487, 1.65651297, -0.580009254, 1.24783164 ] + - [ 0.95077397, 1.91478423, -1.65490561, 1.17360092, -1.65534553, -0.591703312, -1.24636148, 0.950764051, -1.91518017, 1.65500298, 1.17305517, 1.6558291, -0.591158247, 1.24591753 ] + - [ 0.950518732, 1.9145142, -1.65012551, 1.16887139, -1.65465075, -0.602774776, -1.24442999, 0.95051034, -1.9149077, 1.65021996, 1.16832482, 1.65513699, -0.602228303, 1.24398162 ] + - [ 0.950255414, 1.91424613, -1.64534042, 1.16411115, -1.65394771, -0.613765914, -1.24247651, 0.95024856, -1.9146372, 1.64543198, 1.16356376, 1.6544366, -0.613218043, 1.24202379 ] + - [ 0.949983949, 1.91398006, -1.64055053, 1.15932014, -1.65323636, -0.624675346, -1.24050091, 0.949978644, -1.91436871, 1.64063924, 1.15877193, 1.65372788, -0.624126087, 1.24004392 ] + - [ 0.949704267, 1.91371601, -1.63575605, 1.15449829, -1.65251665, -0.635501693, -1.23850307, 0.949700523, -1.91410227, 1.63584193, 1.15394925, 1.65301079, -0.634951057, 1.23804189 ] + - [ 0.949416301, 1.91345402, -1.63095716, 1.14964554, -1.65178854, -0.646243575, -1.23648287, 0.949414128, -1.91383791, 1.63104025, 1.14909566, 1.65228526, -0.645691573, 1.23601757 ] + - [ 0.949119981, 1.91319412, -1.62615405, 1.14476181, -1.65105197, -0.656899613, -1.23444018, 0.949119391, -1.91357566, 1.62623439, 1.14421108, 1.65155126, -0.656346256, 1.23397084 ] + - [ 0.948815238, 1.91293635, -1.62134694, 1.13984703, -1.65030691, -0.667468427, -1.23237489, 0.948816243, -1.91331556, 1.62142455, 1.13929546, 1.65080874, -0.666913727, 1.23190159 ] + - [ 0.948502006, 1.91268075, -1.616536, 1.13490115, -1.6495533, -0.677948639, -1.23028686, 0.948504616, -1.91305763, 1.61661093, 1.13434872, 1.65005765, -0.677392606, 1.22980969 ] + - [ 0.948180214, 1.91242733, -1.61172143, 1.12992409, -1.64879109, -0.688338868, -1.22817597, 0.948184442, -1.91280192, 1.61179371, 1.1293708, 1.64929794, -0.687781514, 1.22769501 ] + - [ 0.947849795, 1.91217615, -1.60690343, 1.12491579, -1.64802024, -0.698637736, -1.2260421, 0.947855651, -1.91254846, 1.60697309, 1.12436163, 1.64852956, -0.698079072, 1.22555743 ] + - [ 0.94751068, 1.91192723, -1.6020822, 1.11987617, -1.64724069, -0.708843864, -1.22388513, 0.947518176, -1.91229729, 1.60214927, 1.11932113, 1.64775247, -0.708283901, 1.22339684 ] + - [ 0.9471628, 1.9116806, -1.59725792, 1.11480517, -1.64645241, -0.71895587, -1.22170494, 0.947171947, -1.91204843, 1.59732245, 1.11424925, 1.64696661, -0.718394622, 1.22121311 ] + - [ 0.946806087, 1.9114363, -1.5924308, 1.10970272, -1.64565534, -0.728972377, -1.2195014, 0.946816897, -1.91180191, 1.59249282, 1.10914592, 1.64617194, -0.728409855, 1.21900611 ] + - [ 0.946440472, 1.91119437, -1.58760103, 1.10456876, -1.64484944, -0.738892005, -1.21727438, 0.946452957, -1.91155779, 1.58766057, 1.10401106, 1.64536841, -0.738328221, 1.21677574 ] + - [ 0.946065887, 1.91095483, -1.58276879, 1.09940321, -1.64403465, -0.748713374, -1.21502378, 0.946080058, -1.91131608, 1.58282589, 1.09884461, 1.64455597, -0.748148342, 1.21452185 ] + - [ 0.945682263, 1.91071772, -1.5779343, 1.09420601, -1.64321093, -0.758435106, -1.21274945, 0.945698132, -1.91107682, 1.577989, 1.09364651, 1.64373458, -0.757868837, 1.21224434 ] + - [ 0.945289532, 1.91048308, -1.57309773, 1.08897709, -1.64237823, -0.76805582, -1.21045128, 0.94530711, -1.91084005, 1.57315007, 1.08841668, 1.64290418, -0.767488327, 1.20994307 ] + - [ 0.944887625, 1.91025093, -1.56825929, 1.08371639, -1.64153651, -0.777574137, -1.20812915, 0.944906925, -1.9106058, 1.56830931, 1.08315506, 1.64206473, -0.777005434, 1.20761793 ] + - [ 0.944476474, 1.91002131, -1.56341918, 1.07842383, -1.64068571, -0.786988678, -1.20578293, 0.944497506, -1.91037411, 1.56346691, 1.07786158, 1.64121617, -0.786418778, 1.2052688 ] + - [ 0.94405601, 1.90979426, -1.55857758, 1.07309936, -1.63982579, -0.796298064, -1.2034125, 0.944078787, -1.910145, 1.55862307, 1.07253617, 1.64035847, -0.79572698, 1.20289555 ] + - [ 0.943626164, 1.90956981, -1.55373469, 1.06774289, -1.6389567, -0.805500915, -1.20101774, 0.943650698, -1.90991851, 1.55377798, 1.06717876, 1.63949157, -0.804928661, 1.20049806 ] + - [ 0.943186868, 1.90934799, -1.5488907, 1.06235437, -1.63807839, -0.814595852, -1.19859852, 0.943213171, -1.90969468, 1.54893183, 1.0617893, 1.63861543, -0.814022441, 1.19807621 ] + - [ 0.942738054, 1.90912883, -1.54404582, 1.05693372, -1.63719082, -0.823581495, -1.19615472, 0.942766137, -1.90947354, 1.54408482, 1.0563677, 1.63772999, -0.823006941, 1.19562988 ] + - [ 0.942279653, 1.90891237, -1.53920023, 1.05148088, -1.63629393, -0.832456465, -1.19368622, 0.942309528, -1.90925512, 1.53923716, 1.0509139, 1.63683521, -0.831880783, 1.19315894 ] + - [ 0.941811597, 1.90869865, -1.53435413, 1.04599578, -1.63538769, -0.841219383, -1.19119289, 0.941843276, -1.90903946, 1.53438902, 1.04542784, 1.63593104, -0.840642586, 1.19066327 ] + - [ 0.941333816, 1.90848769, -1.52950772, 1.04047835, -1.63447203, -0.849868869, -1.18867461, 0.941367311, -1.90882659, 1.52954061, 1.03990944, 1.63501743, -0.849290972, 1.18814275 ] + - [ 0.940846243, 1.90827954, -1.52466118, 1.03492853, -1.63354692, -0.858403543, -1.18613126, 0.940881566, -1.90861655, 1.52469212, 1.03435864, 1.63409433, -0.857824561, 1.18559726 ] + - [ 0.940348809, 1.90807421, -1.51981472, 1.02934624, -1.6326123, -0.866822027, -1.18356271, 0.940385972, -1.90840937, 1.51984375, 1.02877537, 1.6331617, -0.866241974, 1.18302668 ] + - [ 0.939841445, 1.90787176, -1.51496853, 1.02373143, -1.63166813, -0.875122941, -1.18096885, 0.93988046, -1.90820508, 1.5149957, 1.02315957, 1.63221949, -0.874541833, 1.18043088 ] + - [ 0.939324082, 1.90767221, -1.51012281, 1.01808402, -1.63071436, -0.883304906, -1.17834954, 0.939364962, -1.90800372, 1.51014815, 1.01751116, 1.63126765, -0.882722757, 1.17780974 ] + - [ 0.938796653, 1.90747559, -1.50527774, 1.01240394, -1.62975094, -0.891366542, -1.17570467, 0.938839409, -1.90780532, 1.5053013, 1.01183008, 1.63030613, -0.890783368, 1.17516314 ] + - [ 0.938259089, 1.90728193, -1.50043352, 1.00669113, -1.62877783, -0.89930647, -1.17303411, 0.938303734, -1.90760991, 1.50045536, 1.00611626, 1.62933488, -0.898722286, 1.17249096 ] + - [ 0.937711321, 1.90709129, -1.49559036, 1.00094552, -1.62779497, -0.90712331, -1.17033774, 0.937757866, -1.90741753, 1.4956105, 1.00036963, 1.62835385, -0.906538132, 1.16979307 ] + - [ 0.937153281, 1.90690367, -1.49074843, 0.995167041, -1.62680232, -0.914815683, -1.16761544, 0.937201739, -1.90722822, 1.49076694, 0.994590132, 1.62736301, -0.914229527, 1.16706936 ] + - [ 0.936584899, 1.90671913, -1.48590794, 0.989355626, -1.62579983, -0.92238221, -1.16486708, 0.936635283, -1.90704201, 1.48592486, 0.988777688, 1.62636229, -0.921795092, 1.16431969 ] + - [ 0.936006109, 1.90653769, -1.48106909, 0.983511209, -1.62478746, -0.929821512, -1.16209253, 0.93605843, -1.90685892, 1.48108446, 0.982932234, 1.62535165, -0.929233447, 1.16154396 ] + - [ 0.93541684, 1.90635938, -1.47623206, 0.97763372, -1.62376515, -0.937132208, -1.15929169, 0.935471112, -1.906679, 1.47624593, 0.977053703, 1.62433104, -0.936543213, 1.15874203 ] + - [ 0.934817025, 1.90618425, -1.47139706, 0.971723093, -1.62273285, -0.94431292, -1.15646441, 0.934873259, -1.90650228, 1.47140948, 0.971142026, 1.62330042, -0.943723012, 1.15591378 ] + - [ 0.934206595, 1.90601232, -1.46656427, 0.96577926, -1.62169053, -0.951362267, -1.15361059, 0.934264804, -1.90632879, 1.46657529, 0.965197136, 1.62225973, -0.950771463, 1.1530591 ] + - [ 0.933585482, 1.90584363, -1.46173389, 0.959802153, -1.62063813, -0.958278872, -1.15073009, 0.933645678, -1.90615857, 1.46174356, 0.959218966, 1.62120893, -0.957687188, 1.15017786 ] + - [ 0.932953616, 1.9056782, -1.45690612, 0.953791705, -1.6195756, -0.965061354, -1.1478228, 0.933015813, -1.90599165, 1.45691448, 0.953207447, 1.62014797, -0.964468808, 1.14726993 ] + - [ 0.93231093, 1.90551609, -1.45208115, 0.947747847, -1.61850289, -0.971708334, -1.14488859, 0.932375139, -1.90582807, 1.45208826, 0.947162513, 1.6190768, -0.971114942, 1.1443352 ] + - [ 0.931657355, 1.90535731, -1.44725918, 0.941670513, -1.61741997, -0.978218432, -1.14192734, 0.931723588, -1.90566785, 1.44726508, 0.941084095, 1.61799537, -0.977624213, 1.14137355 ] + - [ 0.930992822, 1.9052019, -1.4424404, 0.935559635, -1.61632678, -0.98459027, -1.13893892, 0.931061093, -1.90551104, 1.44244515, 0.934972127, 1.61690364, -0.98399524, 1.13838484 ] + - [ 0.930317263, 1.9050499, -1.437625, 0.929415145, -1.61522326, -0.990822467, -1.13592321, 0.930387584, -1.90535766, 1.43762865, 0.928826539, 1.61580155, -0.990226645, 1.13536897 ] + - [ 0.929630609, 1.90490134, -1.43281318, 0.923236975, -1.61410939, -0.996913645, -1.13288009, 0.929702993, -1.90520775, 1.43281578, 0.922647265, 1.61468906, -0.996317048, 1.1323258 ] + - [ 0.928932792, 1.90475625, -1.42800514, 0.917025059, -1.61298509, -1.00286242, -1.12980943, 0.929007252, -1.90506135, 1.42800674, 0.916434238, 1.61356613, -1.00226507, 1.12925522 ] + - [ 0.928223743, 1.90461467, -1.42320106, 0.910779328, -1.61185034, -1.00866742, -1.12671112, 0.928300291, -1.90491849, 1.42320173, 0.910187388, 1.61243269, -1.00806933, 1.1261571 ] + - [ 0.927503394, 1.90447663, -1.41840116, 0.904499714, -1.61070508, -1.01432727, -1.12358503, 0.927582043, -1.90477919, 1.41840093, 0.903906649, 1.61128871, -1.01372846, 1.12303132 ] + - [ 0.926771676, 1.90434217, -1.41360561, 0.898186151, -1.60954926, -1.01984057, -1.12043103, 0.926852439, -1.90464351, 1.41360454, 0.897591954, 1.61013413, -1.01924106, 1.11987776 ] + - [ 0.926028521, 1.90421131, -1.40881461, 0.89183857, -1.60838284, -1.02520596, -1.117249, 0.92611141, -1.90451146, 1.40881276, 0.891243234, 1.60896891, -1.02460577, 1.11669629 ] + - [ 0.92527386, 1.90408409, -1.40402836, 0.885456904, -1.60720577, -1.03042205, -1.11403882, 0.925358889, -1.90438309, 1.40402578, 0.884860422, 1.60779301, -1.0298212, 1.1134868 ] + - [ 0.924507624, 1.90396055, -1.39924706, 0.879041085, -1.60601799, -1.03548747, -1.11080037, 0.924594806, -1.90425843, 1.39924381, 0.87844345, 1.60660636, -1.03488597, 1.11024916 ] + - [ 0.923729745, 1.90384071, -1.39447089, 0.872591046, -1.60481947, -1.04040084, -1.10753352, 0.923819092, -1.90413751, 1.39446702, 0.87199225, 1.60540892, -1.03979871, 1.10698326 ] + - [ 0.922940155, 1.90372462, -1.38970006, 0.866106719, -1.60361015, -1.04516076, -1.10423816, 0.923031681, -1.90402037, 1.38969563, 0.865506756, 1.60420065, -1.04455803, 1.10368896 ] + - [ 0.922138785, 1.9036123, -1.38493476, 0.859588036, -1.60238999, -1.04976588, -1.10091415, 0.922232502, -1.90390703, 1.38492982, 0.858986899, 1.6029815, -1.04916256, 1.10036614 ] + - [ 0.921325566, 1.90350379, -1.38017518, 0.85303493, -1.60115894, -1.0542148, -1.09756137, 0.921421488, -1.90379754, 1.38016978, 0.852432611, 1.60175142, -1.05361092, 1.09701469 ] + - [ 0.920500431, 1.90339913, -1.37542151, 0.846447333, -1.59991694, -1.05850615, -1.0941797, 0.92059857, -1.90369193, 1.37541573, 0.845843826, 1.60051035, -1.05790172, 1.09363448 ] + - [ 0.919663309, 1.90329834, -1.37067396, 0.839825178, -1.59866396, -1.06263855, -1.09076902, 0.919763679, -1.90359023, 1.37066784, 0.839220475, 1.59925826, -1.0620336, 1.09022539 ] + - [ 0.918814134, 1.90320147, -1.36593271, 0.833168397, -1.59739995, -1.06661062, -1.08732921, 0.918916747, -1.90349248, 1.36592632, 0.832562491, 1.59799509, -1.06600516, 1.0867873 ] + - [ 0.917952836, 1.90310853, -1.36119797, 0.826476922, -1.59612485, -1.07042098, -1.08386013, 0.918057706, -1.9033987, 1.36119136, 0.825869806, 1.5967208, -1.06981503, 1.08332008 ] + - [ 0.917079346, 1.90301958, -1.35646992, 0.819750686, -1.59483862, -1.07406824, -1.08036168, 0.917186486, -1.90330894, 1.35646315, 0.819142353, 1.59543534, -1.07346183, 1.07982362 ] + - [ 0.916193597, 1.90293464, -1.35174876, 0.812989621, -1.59354121, -1.07755104, -1.07683372, 0.916303021, -1.90322323, 1.3517419, 0.812380063, 1.59413865, -1.07694419, 1.07629778 ] + - [ 0.915295519, 1.90285374, -1.34703469, 0.80619366, -1.59223258, -1.08086799, -1.07327613, 0.91540724, -1.90314159, 1.34702779, 0.80558287, 1.5928307, -1.08026072, 1.07274246 ] + - [ 0.914385045, 1.90277692, -1.3423279, 0.799362734, -1.59091267, -1.08401771, -1.06968879, 0.914499076, -1.90306408, 1.34232102, 0.798750705, 1.59151143, -1.08341004, 1.06915752 ] + - [ 0.913462106, 1.90270421, -1.33762859, 0.792496777, -1.58958145, -1.08699882, -1.06607157, 0.91357846, -1.90299071, 1.33762179, 0.791883501, 1.59018079, -1.08639077, 1.06554284 ] + - [ 0.912526632, 1.90263565, -1.33293695, 0.78559572, -1.58823885, -1.08980995, -1.06242436, 0.912645323, -1.90292153, 1.33293029, 0.784981191, 1.58883874, -1.08920154, 1.06189831 ] + - [ 0.911578556, 1.90257126, -1.32825317, 0.778659497, -1.58688483, -1.09244971, -1.05874703, 0.911699597, -1.90285656, 1.32824672, 0.778043707, 1.58748523, -1.09184097, 1.0582238 ] + - [ 0.910617809, 1.90251109, -1.32357745, 0.771688038, -1.58551935, -1.09491673, -1.05503945, 0.910741214, -1.90279585, 1.32357127, 0.77107098, 1.58612021, -1.09430767, 1.05451918 ] + - [ 0.909644323, 1.90245517, -1.31890998, 0.764681278, -1.58414235, -1.09720962, -1.05130151, 0.909770105, -1.90273942, 1.31890414, 0.764062944, 1.58474364, -1.09660027, 1.05078434 ] + - [ 0.908658029, 1.90240353, -1.31425097, 0.757639148, -1.5827538, -1.099327, -1.04753307, 0.908786201, -1.90268731, 1.31424552, 0.757019531, 1.58335545, -1.09871738, 1.04701916 ] + - [ 0.907658858, 1.9023562, -1.3096006, 0.75056158, -1.58135363, -1.10126751, -1.04373402, 0.907789435, -1.90263955, 1.30959561, 0.749940673, 1.58195561, -1.10065764, 1.0432235 ] + - [ 0.906646742, 1.90231322, -1.30495906, 0.743448508, -1.57994181, -1.10302975, -1.03990424, 0.906779737, -1.90259618, 1.3049546, 0.742826303, 1.58054408, -1.10241965, 1.03939726 ] + - [ 0.905621613, 1.90227462, -1.30032657, 0.736299863, -1.57851829, -1.10461234, -1.0360436, 0.905757039, -1.90255723, 1.30032269, 0.735676352, 1.57912079, -1.10400205, 1.0355403 ] + - [ 0.904583401, 1.90224044, -1.2957033, 0.729115577, -1.57708301, -1.10601392, -1.03215197, 0.904721272, -1.90252274, 1.29570007, 0.728490754, 1.5776857, -1.10540345, 1.03165251 ] + - [ 0.903532039, 1.9022107, -1.29108945, 0.721895584, -1.57563593, -1.10723309, -1.02822924, 0.903672369, -1.90249274, 1.29108695, 0.72126944, 1.57623876, -1.10662246, 1.02773376 ] + - [ 0.902467458, 1.90218545, -1.28648522, 0.714639815, -1.574177, -1.10826848, -1.02427528, 0.90261026, -1.90246726, 1.2864835, 0.714012344, 1.57477993, -1.10765773, 1.02378393 ] + - [ 0.901389588, 1.90216471, -1.2818908, 0.707348203, -1.57270618, -1.10911872, -1.02028996, 0.901534877, -1.90244633, 1.28188994, 0.706719397, 1.57330916, -1.10850785, 1.0198029 ] + - [ 0.900298363, 1.90214853, -1.27730639, 0.700020681, -1.57122342, -1.10978241, -1.01627318, 0.900446152, -1.90243, 1.27730645, 0.699390532, 1.57182639, -1.10917146, 1.01579054 ] + - [ 0.899193713, 1.90213692, -1.27273219, 0.69265718, -1.56972866, -1.11025819, -1.01222479, 0.899344015, -1.90241829, 1.27273323, 0.69202568, 1.57033159, -1.10964717, 1.01174674 ] + - [ 0.898075569, 1.90212994, -1.26816838, 0.685257633, -1.56822186, -1.11054466, -1.00814468, 0.8982284, -1.90241124, 1.26817047, 0.684624776, 1.5688247, -1.10993361, 1.00767138 ] + - [ 0.896943864, 1.9021276, -1.26361516, 0.677821973, -1.56670298, -1.11064046, -1.00403273, 0.897099236, -1.90240888, 1.26361838, 0.67718775, 1.56730567, -1.1100294, 1.00356432 ] + - [ 0.895789576, 1.90218453, -1.2590332, 0.670118292, -1.56517816, -1.11056146, -0.999803586, 0.895947575, -1.90246544, 1.25903771, 0.669482652, 1.56578062, -1.10995088, 0.999340479 ] + - [ 0.894603883, 1.90235338, -1.25438414, 0.661924844, -1.56365287, -1.11032632, -0.995375322, 0.894764661, -1.9026332, 1.2543902, 0.661287694, 1.56425498, -1.10971717, 0.994918166 ] + - [ 0.893387013, 1.90263125, -1.24966961, 0.653256801, -1.56212607, -1.10993784, -0.990752939, 0.893550719, -1.90290927, 1.24967747, 0.65261805, 1.56272771, -1.10933103, 0.990302366 ] + - [ 0.892139194, 1.90301522, -1.24489124, 0.644129334, -1.56059671, -1.10939882, -0.98594144, 0.892305972, -1.90329076, 1.24490115, 0.643488895, 1.56119776, -1.10879525, 0.985498064 ] + - [ 0.890860654, 1.90350239, -1.24005066, 0.634557615, -1.55906373, -1.10871204, -0.980945827, 0.891030644, -1.90377478, 1.24006286, 0.633915404, 1.55966408, -1.10811259, 0.980510248 ] + - [ 0.889551622, 1.90408985, -1.23514952, 0.624556817, -1.55752607, -1.1078803, -0.975771103, 0.889724959, -1.90435845, 1.23516423, 0.623912751, 1.55812561, -1.10728583, 0.975343901 ] + - [ 0.888212326, 1.9047747, -1.23018944, 0.614142111, -1.55598269, -1.1069064, -0.970422269, 0.888389139, -1.90503887, 1.2302069, 0.613496111, 1.55658131, -1.10631774, 0.97000401 ] + - [ 0.886842994, 1.90555403, -1.22517205, 0.603328669, -1.55443253, -1.10579314, -0.964904329, 0.88702341, -1.90581316, 1.22519248, 0.602680659, 1.55503012, -1.10521109, 0.964495561 ] + - [ 0.885443855, 1.90642494, -1.22009901, 0.592131662, -1.55287454, -1.1045433, -0.959222284, 0.885627994, -1.90667843, 1.22012262, 0.59148157, 1.55347101, -1.10396865, 0.958823538 ] + - [ 0.884015136, 1.9073845, -1.21497193, 0.580566264, -1.55130768, -1.10315968, -0.953381136, 0.884203116, -1.90763179, 1.21499892, 0.579914019, 1.5519029, -1.1025932, 0.952992928 ] + - [ 0.882557067, 1.90842983, -1.20979245, 0.568647646, -1.54973087, -1.10164509, -0.947385889, 0.882748999, -1.90867036, 1.20982303, 0.56799318, 1.55032477, -1.10108751, 0.947008715 ] + - [ 0.881069874, 1.909558, -1.20456221, 0.556390979, -1.54814308, -1.1000023, -0.941241544, 0.881265866, -1.90979124, 1.20459656, 0.555734228, 1.54873555, -1.09945435, 0.940875886 ] + - [ 0.879553787, 1.91076612, -1.19928283, 0.543811436, -1.54654325, -1.09823412, -0.934953103, 0.879753942, -1.91099155, 1.19932115, 0.543152339, 1.54713419, -1.0976965, 0.934599426 ] + - [ 0.878009034, 1.91205128, -1.19395597, 0.530924188, -1.54493033, -1.09634335, -0.92852557, 0.87821345, -1.91226839, 1.19399843, 0.530262685, 1.54551966, -1.09581672, 0.928184321 ] + - [ 0.876435843, 1.91341056, -1.18858324, 0.517744408, -1.54330326, -1.09433278, -0.921963945, 0.876644614, -1.91361889, 1.18863002, 0.517080444, 1.54389088, -1.09381779, 0.921635557 ] + - [ 0.874834442, 1.91484107, -1.18316629, 0.504287267, -1.54166099, -1.09220519, -0.915273233, 0.875047658, -1.91504015, 1.18321755, 0.503620789, 1.54224683, -1.09170248, 0.914958118 ] + - [ 0.873205059, 1.91633989, -1.17770674, 0.490567938, -1.54000248, -1.0899634, -0.908458434, 0.873422805, -1.91652928, 1.17776264, 0.489898894, 1.54058644, -1.08947356, 0.90815699 ] + - [ 0.871547924, 1.91790412, -1.17220624, 0.476601591, -1.53832666, -1.08761019, -0.901524551, 0.87177028, -1.9180834, 1.17226693, 0.475929936, 1.53890866, -1.08713382, 0.90123716 ] + - [ 0.869863263, 1.91953085, -1.16666641, 0.4624034, -1.53663248, -1.08514836, -0.894476586, 0.870090304, -1.91969961, 1.16673205, 0.461729088, 1.53721245, -1.08468601, 0.894203612 ] + - [ 0.868151305, 1.92121718, -1.16108889, 0.447988536, -1.5349189, -1.0825807, -0.887319542, 0.868383104, -1.92137503, 1.16115961, 0.447311526, 1.53549675, -1.08213291, 0.887061332 ] + - [ 0.866412279, 1.9229602, -1.15547532, 0.433372171, -1.53318486, -1.07991, -0.880058422, 0.866648901, -1.92310678, 1.15555125, 0.432692424, 1.53376052, -1.07947729, 0.879815307 ] + - [ 0.864646413, 1.92475699, -1.14982732, 0.418569476, -1.5314293, -1.07713908, -0.872698227, 0.864887921, -1.92489196, 1.1499086, 0.417886957, 1.53200271, -1.07672193, 0.87247052 ] + - [ 0.862853935, 1.92660466, -1.14414654, 0.403595624, -1.52965118, -1.07427071, -0.865243959, 0.863100386, -1.92672768, 1.14423327, 0.402910299, 1.53022225, -1.0738696, 0.865031959 ] + - [ 0.861035073, 1.92850029, -1.13843461, 0.388465787, -1.52784944, -1.07130769, -0.857700621, 0.86128652, -1.92861105, 1.13852691, 0.387777627, 1.52841812, -1.07092307, 0.857504608 ] + - [ 0.859190055, 1.93044099, -1.13269316, 0.373195136, -1.52602303, -1.06825282, -0.850073216, 0.859446547, -1.9305392, 1.13279114, 0.372504113, 1.52658924, -1.06788512, 0.849893453 ] + - [ 0.857319111, 1.93242383, -1.12692382, 0.357798844, -1.5241709, -1.06510889, -0.842366745, 0.857580691, -1.93250922, 1.12702759, 0.357104934, 1.52473459, -1.06475851, 0.842203479 ] + - [ 0.855422467, 1.93444592, -1.12112824, 0.342292082, -1.52229199, -1.06187871, -0.834586211, 0.855689176, -1.93451824, 1.12123787, 0.341595264, 1.52285309, -1.06154601, 0.834439673 ] + - [ 0.853500353, 1.93650435, -1.11530804, 0.326690023, -1.52038525, -1.05856505, -0.826736617, 0.853772225, -1.93656336, 1.11542363, 0.325990277, 1.52094371, -1.05825041, 0.82660702 ] + - [ 0.851552996, 1.93859621, -1.10946486, 0.311007837, -1.51844963, -1.05517073, -0.818822963, 0.851830061, -1.93864169, 1.10958649, 0.310305149, 1.5190054, -1.05487447, 0.818710506 ] + - [ 0.849580625, 1.94071859, -1.10360033, 0.295260698, -1.51648408, -1.05169852, -0.810850254, 0.849862909, -1.94075036, 1.10372807, 0.294555054, 1.51703709, -1.05142097, 0.810755115 ] + - [ 0.847583468, 1.94286859, -1.0977161, 0.279463777, -1.51448754, -1.04815124, -0.802823491, 0.847870992, -1.94288645, 1.09785001, 0.278755167, 1.51503775, -1.04789268, 0.802745834 ] + - [ 0.845561753, 1.94504331, -1.09181378, 0.263632245, -1.51245896, -1.04453167, -0.794747676, 0.845854534, -1.9450471, 1.09195393, 0.262920662, 1.51300633, -1.04429236, 0.794687648 ] + - [ 0.843515709, 1.94723982, -1.08589502, 0.247781276, -1.51039729, -1.0408426, -0.786627812, 0.843813759, -1.94722941, 1.08604146, 0.247066716, 1.51094177, -1.0406228, 0.786585542 ] + - [ 0.841445564, 1.94945523, -1.07996145, 0.23192604, -1.50830148, -1.03708685, -0.778468901, 0.841748891, -1.9494305, 1.08011423, 0.231208502, 1.50884302, -1.03688677, 0.778444503 ] + - [ 0.839351545, 1.95168662, -1.0740147, 0.216081709, -1.50617047, -1.03326718, -0.770275945, 0.839660152, -1.95164747, 1.07417386, 0.215361195, 1.50670903, -1.03308703, 0.770269516 ] + - [ 0.837233882, 1.9539311, -1.06805641, 0.200263457, -1.50400321, -1.02938642, -0.762053947, 0.837547767, -1.95387744, 1.06822198, 0.19953997, 1.50453876, -1.02922636, 0.762065567 ] + - [ 0.835092803, 1.95618576, -1.06208822, 0.184486453, -1.50179865, -1.02544734, -0.753807909, 0.83541196, -1.95611751, 1.06226022, 0.183760001, 1.50233115, -1.02530754, 0.75383764 ] + - [ 0.832928535, 1.95844768, -1.05611176, 0.168765872, -1.49955573, -1.02145274, -0.745542833, 0.833252954, -1.95836481, 1.05629021, 0.168036464, 1.50008516, -1.02133333, 0.745590722 ] + - [ 0.830741308, 1.96071396, -1.05012865, 0.153116883, -1.49727341, -1.01740543, -0.737263722, 0.831070973, -1.96061644, 1.05031358, 0.152384534, 1.49779972, -1.01730651, 0.737329799 ] + - [ 0.828531349, 1.9629817, -1.04414054, 0.137554659, -1.49495063, -1.01330818, -0.728975577, 0.828866241, -1.96286951, 1.04433195, 0.136819384, 1.4954738, -1.01322984, 0.729059855 ] + - [ 0.826298886, 1.96524798, -1.03814907, 0.122094373, -1.49258634, -1.00916381, -0.720683402, 0.82663898, -1.96512114, 1.03834695, 0.121356191, 1.49310634, -1.00910612, 0.720785876 ] + - [ 0.824044148, 1.9675099, -1.03215586, 0.106751196, -1.49017948, -1.0049751, -0.712392198, 0.824389416, -1.96736844, 1.0323602, 0.106010128, 1.4906963, -1.00493809, 0.712512849 ] + - [ 0.821767364, 1.96976456, -1.02616254, 0.0915402993, -1.48772901, -1.00074484, -0.704106968, 0.822117772, -1.96960851, 1.02637334, 0.0907963702, 1.48824262, -1.00072855, 0.704245758 ] + - [ 0.81946876, 1.97200904, -1.02017076, 0.0764768556, -1.48523386, -0.996475845, -0.695832714, 0.819824271, -1.97183848, 1.020388, 0.0757300929, 1.48574424, -0.996480251, 0.695989589 ] + - [ 0.817148567, 1.97424043, -1.01418215, 0.0615760367, -1.48269299, -0.992170895, -0.687574439, 0.817509138, -1.97405545, 1.0144058, 0.0608264705, 1.48320013, -0.992195977, 0.687749328 ] + - [ 0.814807011, 1.97645584, -1.00819834, 0.0468530145, -1.48010535, -0.987832788, -0.679337144, 0.815172595, -1.97625654, 1.00842836, 0.0461006779, 1.48060924, -0.987878499, 0.67952996 ] + - [ 0.812444321, 1.97865235, -1.00222097, 0.0323229607, -1.47746988, -0.98346432, -0.671125832, 0.812814867, -1.97843885, 1.00245732, 0.0315678899, 1.4779705, -0.983530587, 0.671336471 ] + - [ 0.810060726, 1.98082707, -0.996251664, 0.0180010474, -1.47478553, -0.979068286, -0.662945506, 0.810436177, -1.9805995, 0.996494307, 0.0172432812, 1.47528288, -0.979155016, 0.663173846 ] + - [ 0.807656453, 1.98297707, -0.990292066, 0.00390244653, -1.47205125, -0.97464748, -0.654801167, 0.80803675, -1.98273559, 0.990540943, 0.00314202666, 1.47254531, -0.974754557, 0.655047071 ] + - [ 0.805231731, 1.98509945, -0.984343806, -0.00995767011, -1.46926598, -0.970204698, -0.646697818, 0.805616808, -1.98484426, 0.984598858, -0.010720699, 1.46975676, -0.970331982, 0.646961132 ] + - [ 0.802786788, 1.98719131, -0.97840852, -0.0235641306, -1.46642868, -0.965742735, -0.638640461, 0.803176575, -1.98692259, 0.97866968, -0.024329721, 1.46691617, -0.965890065, 0.638921014 ] + - [ 0.800321853, 1.98924974, -0.972487841, -0.0369017629, -1.46353828, -0.961264386, -0.630634099, 0.800716276, -1.98896771, 0.972755036, -0.0376698645, 1.46402249, -0.961431577, 0.630931703 ] + - [ 0.797837153, 1.99127183, -0.966583405, -0.0499553953, -1.46059375, -0.956772445, -0.622683734, 0.798236133, -1.99097673, 0.966856554, -0.0507259548, 1.46107467, -0.956959292, 0.622998185 ] + - [ 0.795332917, 1.99325467, -0.960696844, -0.0627098557, -1.45759401, -0.952269709, -0.614794367, 0.795736371, -1.99294675, 0.960975862, -0.063482817, 1.45807167, -0.952475981, 0.615125444 ] + - [ 0.792809374, 1.99519537, -0.954829794, -0.0751499724, -1.45453803, -0.947758971, -0.606971003, 0.793217214, -1.9948749, 0.955114586, -0.0759252764, 1.45501242, -0.947984416, 0.607318466 ] + - [ 0.79026675, 1.997091, -0.948983889, -0.0872605733, -1.45142475, -0.943243027, -0.599218642, 0.790678884, -1.99675827, 0.949274356, -0.0880381582, 1.45189588, -0.943487372, 0.599582238 ] + - [ 0.787705276, 1.99893867, -0.943160763, -0.0990264865, -1.44825311, -0.938724672, -0.591542287, 0.788121606, -1.99859399, 0.943456798, -0.0998062877, 1.44872101, -0.938987619, 0.591921745 ] + - [ 0.785125178, 2.00073546, -0.93736205, -0.11043254, -1.44502207, -0.9342067, -0.58394694, 0.785545604, -2.00037917, 0.93766354, -0.11121449, 1.44548674, -0.93448793, 0.584341971 ] + - [ 0.782526685, 2.00247848, -0.931589385, -0.121463563, -1.44173057, -0.929691908, -0.576437604, 0.7829511, -2.00211092, 0.93189621, -0.12224759, 1.44219204, -0.929991079, 0.576847904 ] + - [ 0.779910026, 2.00416481, -0.925844402, -0.132104381, -1.43837756, -0.92518309, -0.569019282, 0.78033832, -2.00378634, 0.926156435, -0.132890414, 1.43883585, -0.925499836, 0.569444528 ] + - [ 0.777275428, 2.00579154, -0.920128735, -0.142339825, -1.43496199, -0.92068304, -0.561696974, 0.777707485, -2.00540255, 0.920445844, -0.143127786, 1.43541711, -0.921016976, 0.562136828 ] + - [ 0.774623121, 2.00735577, -0.914444019, -0.152154721, -1.4314828, -0.916194555, -0.554475684, 0.775058822, -2.00695667, 0.914766062, -0.152944532, 1.43193479, -0.916545269, 0.554929792 ] + - [ 0.771953331, 2.00885459, -0.908791887, -0.161533899, -1.42793894, -0.911720429, -0.547360414, 0.772392552, -2.0084458, 0.909118719, -0.162325476, 1.42838782, -0.912087489, 0.547828403 ] + - [ 0.769266288, 2.0102851, -0.903173974, -0.170462185, -1.42432936, -0.907263456, -0.540356166, 0.7697089, -2.00986706, 0.903505442, -0.171255445, 1.42477517, -0.907646408, 0.540837649 ] + - [ 0.76656222, 2.01164438, -0.897591915, -0.178924409, -1.420653, -0.902826433, -0.533467943, 0.767008089, -2.01121756, 0.897927859, -0.179719264, 1.42109577, -0.903224798, 0.533962513 ] + - [ 0.763841355, 2.01292954, -0.892047343, -0.186905397, -1.41690882, -0.898412154, -0.526700746, 0.764290343, -2.0124944, 0.892387596, -0.187701756, 1.41734859, -0.898825433, 0.527207983 ] + - [ 0.76110392, 2.01413766, -0.886541893, -0.194389979, -1.41309576, -0.894023414, -0.520059579, 0.761555886, -2.01369471, 0.886886282, -0.195187749, 1.41353256, -0.894451084, 0.520579042 ] + - [ 0.758350146, 2.01526583, -0.881077199, -0.201362982, -1.40921277, -0.889663008, -0.513549443, 0.758804942, -2.01481559, 0.881425545, -0.202162067, 1.40964664, -0.890104524, 0.514080678 ] + - [ 0.755580259, 2.01631116, -0.875654896, -0.207809235, -1.4052588, -0.885333731, -0.507175341, 0.756037734, -2.01585416, 0.876007012, -0.208609534, 1.40568978, -0.885788525, 0.507717876 ] + - [ 0.752794487, 2.01727072, -0.870276618, -0.213713565, -1.40123279, -0.881038378, -0.500942275, 0.753254485, -2.01680752, 0.87063231, -0.214514978, 1.40166093, -0.88150586, 0.501495621 ] + - [ 0.74999306, 2.01814163, -0.864943998, -0.219060801, -1.39713368, -0.876779745, -0.494855247, 0.750455421, -2.01767279, 0.865303067, -0.219863222, 1.39755904, -0.877259301, 0.495418898 ] + - [ 0.747176206, 2.01892096, -0.859658672, -0.22383577, -1.39296044, -0.872560626, -0.48891926, 0.747640763, -2.01844708, 0.860020912, -0.224639091, 1.39338306, -0.873051621, 0.489492694 ] + - [ 0.744344152, 2.01960581, -0.854422273, -0.228023302, -1.388712, -0.868383816, -0.483139316, 0.744810737, -2.0191275, 0.854787471, -0.228827412, 1.38913194, -0.868885591, 0.483721994 ] + - [ 0.741497127, 2.02019327, -0.849236437, -0.231608223, -1.38438732, -0.86425211, -0.477520417, 0.741965565, -2.01971117, 0.849604372, -0.23241301, 1.38480462, -0.864763986, 0.478111783 ] + - [ 0.73863536, 2.02068044, -0.844102796, -0.234575362, -1.37998533, -0.860168303, -0.472067565, 0.739105472, -2.02019519, 0.844473243, -0.235380708, 1.38040007, -0.860689576, 0.472667048 ] + - [ 0.735759078, 2.02106441, -0.839022986, -0.236909548, -1.375505, -0.856135191, -0.466785764, 0.736230681, -2.02057668, 0.839395711, -0.237715334, 1.37591722, -0.856665135, 0.467392773 ] + - [ 0.732868509, 2.02134228, -0.833998641, -0.238595607, -1.37094526, -0.852155568, -0.461680015, 0.733341416, -2.02085275, 0.834373405, -0.239401711, 1.37135503, -0.852693435, 0.462293944 ] + - [ 0.729963883, 2.02151113, -0.829031395, -0.239618369, -1.36630506, -0.848232229, -0.45675532, 0.730437901, -2.02102051, 0.829407951, -0.240424666, 1.36671244, -0.848777249, 0.457375547 ] + - [ 0.727045427, 2.02156806, -0.824122882, -0.239962661, -1.36158335, -0.84436797, -0.452016682, 0.727520359, -2.02107707, 0.824500977, -0.240769023, 1.36198842, -0.844919348, 0.452642568 ] + - [ 0.724093534, 2.02141153, -0.819229996, -0.23994408, -1.35676346, -0.840507722, -0.447384886, 0.724569235, -2.02092057, 0.819609458, -0.24075038, 1.35716624, -0.841064952, 0.448016002 ] + - [ 0.721088907, 2.02094406, -0.814308903, -0.239888591, -1.35183036, -0.836595049, -0.442777376, 0.721565288, -2.02045322, 0.814689646, -0.240694704, 1.35223083, -0.837157924, 0.44341352 ] + - [ 0.718032243, 2.02016885, -0.80936015, -0.239796573, -1.34678546, -0.832630689, -0.438194147, 0.718509215, -2.0196782, 0.809742087, -0.240602376, 1.34718361, -0.833199007, 0.438835115 ] + - [ 0.714924237, 2.01908909, -0.804384282, -0.239668405, -1.34163017, -0.828615382, -0.433635192, 0.715401711, -2.01859871, 0.804767328, -0.240473778, 1.34202598, -0.829188941, 0.434280784 ] + - [ 0.711765583, 2.017708, -0.799381843, -0.239504467, -1.33636591, -0.824549869, -0.429100504, 0.712243474, -2.01721795, 0.799765915, -0.240309289, 1.33675937, -0.825128469, 0.429750522 ] + - [ 0.708556978, 2.01602876, -0.79435338, -0.239305139, -1.3309941, -0.820434888, -0.424590076, 0.709035199, -2.01553911, 0.794738393, -0.240109291, 1.33138519, -0.821018332, 0.425244322 ] + - [ 0.705299116, 2.01405456, -0.789299437, -0.2390708, -1.32551614, -0.816271179, -0.420103901, 0.705777582, -2.0135654, 0.78968531, -0.239874165, 1.32590485, -0.816859271, 0.420762182 ] + - [ 0.701992693, 2.01178862, -0.78422056, -0.238801829, -1.31993344, -0.812059483, -0.415641973, 0.70247132, -2.0113, 0.78460721, -0.23960429, 1.32031976, -0.812652028, 0.416304095 ] + - [ 0.698638404, 2.00923412, -0.779117295, -0.238498606, -1.31424743, -0.807800539, -0.411204285, 0.699117109, -2.00874612, 0.779504641, -0.239300049, 1.31463134, -0.808397344, 0.411870056 ] + - [ 0.695236945, 2.00639426, -0.773990185, -0.238161512, -1.30845952, -0.803495086, -0.40679083, 0.695715645, -2.00590695, 0.774378149, -0.238961821, 1.308841, -0.804095961, 0.407460062 ] + - [ 0.69178901, 2.00327224, -0.768839778, -0.237790924, -1.30257111, -0.799143864, -0.402401602, 0.692267624, -2.00278569, 0.769228279, -0.238589988, 1.30295015, -0.799748621, 0.403074106 ] + - [ 0.688295296, 1.99987125, -0.763666619, -0.237387223, -1.29658363, -0.794747614, -0.398036594, 0.688773742, -1.99938553, 0.764055578, -0.238184931, 1.29696022, -0.795356064, 0.398712185 ] + - [ 0.684756497, 1.9961945, -0.758471251, -0.236950788, -1.29049848, -0.790307074, -0.393695799, 0.685234697, -1.99570968, 0.758860592, -0.237747029, 1.2908726, -0.790919033, 0.394374292 ] + - [ 0.681173309, 1.99224519, -0.753254222, -0.236481999, -1.28431708, -0.785822985, -0.38937921, 0.681651183, -1.99176132, 0.753643867, -0.237276665, 1.28468873, -0.786438269, 0.390060424 ] + - [ 0.677546427, 1.9880265, -0.748016076, -0.235981235, -1.27804085, -0.781296085, -0.385086821, 0.678023896, -1.98754365, 0.748405949, -0.236774218, 1.27841, -0.781914513, 0.385770575 ] + - [ 0.673876546, 1.98354163, -0.742757358, -0.235448876, -1.27167118, -0.776727116, -0.380818625, 0.674353535, -1.98305988, 0.743147384, -0.23624007, 1.27203783, -0.777348507, 0.381504741 ] + - [ 0.670164362, 1.97879379, -0.737478615, -0.234885302, -1.26520951, -0.772116816, -0.376574616, 0.670640793, -1.97831319, 0.737868719, -0.235674602, 1.26557365, -0.772740992, 0.377262916 ] + - [ 0.666410571, 1.97378617, -0.73218039, -0.234290891, -1.25865724, -0.767465925, -0.372354785, 0.666886368, -1.97330678, 0.7325705, -0.235078193, 1.25901885, -0.76809271, 0.373045096 ] + - [ 0.662615866, 1.96852196, -0.72686323, -0.233666023, -1.25201579, -0.762775183, -0.368159128, 0.663090956, -1.96804386, 0.727253272, -0.234451226, 1.25237486, -0.763404403, 0.368851275 ] + - [ 0.658780945, 1.96300438, -0.721527681, -0.233011078, -1.24528656, -0.75804533, -0.363987636, 0.659255254, -1.96252761, 0.721917583, -0.23379408, 1.24564308, -0.758676812, 0.364681449 ] + - [ 0.654906501, 1.9572366, -0.716174286, -0.232326436, -1.23847098, -0.753277105, -0.359840304, 0.655379956, -1.95676123, 0.716563978, -0.233107137, 1.23882494, -0.753910678, 0.360535613 ] + - [ 0.650993231, 1.95122183, -0.710803592, -0.231612476, -1.23157045, -0.748471248, -0.355717125, 0.65146576, -1.95074793, 0.711193002, -0.232390778, 1.23192184, -0.749106742, 0.356413763 ] + - [ 0.647041829, 1.94496327, -0.705416144, -0.230869577, -1.22458639, -0.743628499, -0.351618091, 0.647513361, -1.94449089, 0.705805204, -0.231645382, 1.2249352, -0.744265748, 0.352315892 ] + - [ 0.643052992, 1.93846411, -0.700012487, -0.230098118, -1.21752021, -0.738749598, -0.347543197, 0.643523456, -1.93799331, 0.700401127, -0.230871332, 1.21786643, -0.739388435, 0.348241996 ] + - [ 0.639027413, 1.93172756, -0.694593166, -0.229298481, -1.21037333, -0.733835283, -0.343492435, 0.639496741, -1.93125839, 0.69498132, -0.230069007, 1.21071695, -0.734475545, 0.344192071 ] + - [ 0.63496579, 1.9247568, -0.689158728, -0.228471043, -1.20314716, -0.728886296, -0.339465799, 0.635433913, -1.92428932, 0.689546327, -0.229238789, 1.20348817, -0.729527821, 0.340166111 ] + - [ 0.630868816, 1.91755504, -0.683709716, -0.227616185, -1.19584311, -0.723903375, -0.335463282, 0.631335666, -1.91708931, 0.684096696, -0.228381059, 1.19618151, -0.724546003, 0.336164111 ] + - [ 0.626737188, 1.91012547, -0.678246678, -0.226734286, -1.1884626, -0.71888726, -0.331484877, 0.627202699, -1.90966155, 0.678632971, -0.227496196, 1.18879837, -0.719530833, 0.332186067 ] + - [ 0.6225716, 1.90247129, -0.672770157, -0.225825726, -1.18100703, -0.713838691, -0.327530578, 0.623035706, -1.90200923, 0.6731557, -0.226584582, 1.18134017, -0.714483052, 0.328231974 ] + - [ 0.618372749, 1.8945957, -0.667280699, -0.224890883, -1.17347783, -0.708758409, -0.323600377, 0.618835384, -1.89413555, 0.667665429, -0.225646599, 1.17380832, -0.709403402, 0.324301827 ] + - [ 0.614141328, 1.8865019, -0.66177885, -0.223930139, -1.16587641, -0.703647151, -0.319694269, 0.61460243, -1.88604371, 0.662162702, -0.224682625, 1.16620424, -0.704292625, 0.32039562 ] + - [ 0.609878034, 1.87819308, -0.656265155, -0.222943871, -1.15820417, -0.698505659, -0.315812246, 0.610337539, -1.87773691, 0.656648068, -0.223693044, 1.15852935, -0.699151462, 0.316513349 ] + - [ 0.605583562, 1.86967243, -0.650740159, -0.22193246, -1.15046254, -0.693334671, -0.311954302, 0.606041407, -1.86921834, 0.651122072, -0.222678234, 1.15078505, -0.693980654, 0.31265501 ] + - [ 0.601258607, 1.86094317, -0.645204408, -0.220896285, -1.14265292, -0.688134928, -0.30812043, 0.601714732, -1.86049119, 0.645585259, -0.221638577, 1.14297276, -0.688780943, 0.308820596 ] + - [ 0.596903865, 1.85200848, -0.639658447, -0.219835726, -1.13477674, -0.682907169, -0.304310623, 0.597358208, -1.85155867, 0.640038177, -0.220574454, 1.13509389, -0.683553071, 0.305010104 ] + - [ 0.592520031, 1.84287155, -0.63410282, -0.218751162, -1.12683539, -0.677652134, -0.300524874, 0.592972533, -1.84242397, 0.634481372, -0.219486246, 1.12714986, -0.678297778, 0.301223528 ] + - [ 0.5881078, 1.8335356, -0.628538075, -0.217642973, -1.1188303, -0.672370563, -0.296763177, 0.588558402, -1.83309028, 0.628915388, -0.218374333, 1.11914208, -0.673015807, 0.297460864 ] + - [ 0.583667867, 1.82400382, -0.622964755, -0.216511538, -1.11076288, -0.667063195, -0.293025526, 0.584116512, -1.82356081, 0.623340774, -0.217239096, 1.11107196, -0.667707899, 0.293722106 ] + - [ 0.579200928, 1.81427939, -0.617383406, -0.215357237, -1.10263455, -0.66173077, -0.289311912, 0.579647558, -1.81383875, 0.617758074, -0.216080916, 1.10294092, -0.662374795, 0.290007249 ] + - [ 0.574707679, 1.80436553, -0.611794574, -0.214180449, -1.09444671, -0.656374028, -0.28562233, 0.575152238, -1.8039273, 0.612167835, -0.214900173, 1.09475037, -0.657017238, 0.28631629 ] + - [ 0.570188814, 1.79426543, -0.606198804, -0.212981554, -1.08620078, -0.650993708, -0.281956774, 0.570631246, -1.79382965, 0.606570603, -0.21369725, 1.08650172, -0.651635967, 0.282649222 ] + - [ 0.565645028, 1.78398228, -0.600596641, -0.211760931, -1.07789817, -0.645590551, -0.278315235, 0.56608528, -1.78354899, 0.600966925, -0.212472525, 1.0781964, -0.646231726, 0.279006041 ] + - [ 0.561077018, 1.77351928, -0.594988631, -0.210518961, -1.0695403, -0.640165295, -0.274697708, 0.561515036, -1.77308854, 0.595357346, -0.211226381, 1.0698358, -0.640805256, 0.275386742 ] + - [ 0.556485479, 1.76287964, -0.589375318, -0.209256021, -1.06112858, -0.634718681, -0.271104185, 0.55692121, -1.76245148, 0.589742412, -0.209959198, 1.06142135, -0.635357297, 0.271791321 ] + - [ 0.551871105, 1.75206654, -0.583757249, -0.207972493, -1.05266442, -0.629251449, -0.267534661, 0.552304497, -1.751641, 0.584122671, -0.208671356, 1.05295446, -0.629888592, 0.268219771 ] + - [ 0.547234592, 1.74108318, -0.578134968, -0.206668755, -1.04414924, -0.623764337, -0.263989127, 0.547665595, -1.74066032, 0.578498667, -0.207363237, 1.04443655, -0.624399882, 0.264672089 ] + - [ 0.542576635, 1.72993277, -0.572509022, -0.205345187, -1.03558445, -0.618258086, -0.260467579, 0.543005199, -1.72951261, 0.572870947, -0.206035221, 1.03586902, -0.618891908, 0.261148269 ] + - [ 0.537897931, 1.71861849, -0.566879954, -0.204002168, -1.02697146, -0.612733436, -0.256970008, 0.538324006, -1.71820108, 0.567240057, -0.20468769, 1.02725329, -0.613365412, 0.257648306 ] + - [ 0.533199173, 1.70714356, -0.561248311, -0.202640078, -1.01831169, -0.607191125, -0.253496408, 0.533622712, -1.70672893, 0.561606543, -0.203321023, 1.01859077, -0.607821136, 0.254172197 ] + - [ 0.528481058, 1.69551115, -0.555614638, -0.201259297, -1.00960655, -0.601631895, -0.250046773, 0.528902012, -1.69509935, 0.555970952, -0.201935602, 1.00988288, -0.602259821, 0.250719934 ] + - [ 0.52374428, 1.68372448, -0.54997948, -0.199860204, -1.00085745, -0.596056484, -0.246621095, 0.524162604, -1.68331554, 0.55033383, -0.200531808, 1.00113103, -0.596682208, 0.247291515 ] + - [ 0.518989535, 1.67178673, -0.544343382, -0.198443179, -0.99206581, -0.590465632, -0.243219368, 0.519405184, -1.67138069, 0.544695722, -0.19911002, 0.992336638, -0.59108904, 0.243886934 ] + - [ 0.514217519, 1.65970111, -0.538706891, -0.197008601, -0.983233038, -0.584860079, -0.239841586, 0.514630447, -1.65929801, 0.539057175, -0.197670621, 0.983501113, -0.585481056, 0.240506185 ] + - [ 0.509428927, 1.64747081, -0.53307055, -0.195556849, -0.974360551, -0.579240565, -0.236487741, 0.509839089, -1.64707068, 0.533418735, -0.196213991, 0.97462587, -0.579859, 0.237149265 ] + - [ 0.504624453, 1.63509903, -0.527434906, -0.194088303, -0.965449759, -0.573607829, -0.233157827, 0.505031808, -1.63470191, 0.527780949, -0.194740511, 0.965712323, -0.574223613, 0.233816167 ] + - [ 0.499804794, 1.62258897, -0.521800504, -0.192603344, -0.956502078, -0.567962611, -0.229851836, 0.500209299, -1.62219488, 0.522144362, -0.193250561, 0.956761886, -0.568575635, 0.230506888 ] + - [ 0.494970644, 1.60994383, -0.51616789, -0.191102349, -0.947518921, -0.562305651, -0.226569764, 0.495372258, -1.60955281, 0.51650952, -0.191744522, 0.947775971, -0.562915809, 0.227221423 ] + - [ 0.4901227, 1.59716679, -0.510537607, -0.189585699, -0.9385017, -0.556637689, -0.223311601, 0.490521382, -1.59677888, 0.51087697, -0.190222776, 0.938755993, -0.557244876, 0.223959765 ] + - [ 0.485261656, 1.58426107, -0.504910203, -0.188053773, -0.92945183, -0.550959464, -0.220077343, 0.485657367, -1.58387629, 0.505247258, -0.188685702, 0.929703366, -0.551563578, 0.220721912 ] + - [ 0.480388207, 1.57122985, -0.499286222, -0.186506951, -0.920370724, -0.545271715, -0.216866982, 0.480780909, -1.57084823, 0.499620929, -0.187133682, 0.920619502, -0.545872656, 0.217507857 ] + - [ 0.475503049, 1.55807633, -0.493666209, -0.184945612, -0.911259794, -0.539575183, -0.213680511, 0.475892704, -1.55769791, 0.493998531, -0.185567097, 0.911505816, -0.540172851, 0.214317595 ] + - [ 0.470606877, 1.54480372, -0.48805071, -0.183370136, -0.902120455, -0.533870608, -0.210517924, 0.470993448, -1.54442852, 0.488380609, -0.183986327, 0.902363722, -0.534464905, 0.211151123 ] + - [ 0.465700388, 1.5314152, -0.482440271, -0.181780903, -0.892954119, -0.528158728, -0.207379214, 0.466083838, -1.53104326, 0.482767709, -0.182391753, 0.893194632, -0.52874956, 0.208008434 ] + - [ 0.460784274, 1.51791398, -0.476835435, -0.180178291, -0.8837622, -0.522440285, -0.204264374, 0.46116457, -1.51754532, 0.477160378, -0.180783756, 0.883999961, -0.523027557, 0.204889525 ] + - [ 0.455859234, 1.50430325, -0.47123675, -0.17856268, -0.874546112, -0.516716016, -0.201173398, 0.45623634, -1.50393789, 0.471559162, -0.179162716, 0.874781123, -0.517299637, 0.201794389 ] + - [ 0.45092596, 1.49058621, -0.46564476, -0.176934451, -0.865307268, -0.510986663, -0.198106278, 0.451299844, -1.49022419, 0.465964606, -0.177529015, 0.86553953, -0.511566543, 0.198723023 ] + - [ 0.44598515, 1.47676606, -0.460060011, -0.175293982, -0.856047081, -0.505252965, -0.195063009, 0.446355779, -1.47640739, 0.460377258, -0.175883033, 0.856276596, -0.505829015, 0.195675421 ] + - [ 0.441037497, 1.462846, -0.454483047, -0.173641652, -0.846766964, -0.499515661, -0.192043583, 0.44140484, -1.46249071, 0.454797662, -0.174225152, 0.846993736, -0.500087795, 0.192651578 ] + - [ 0.436083699, 1.44882922, -0.448914414, -0.171977843, -0.837468332, -0.493775491, -0.189047994, 0.436447724, -1.44847733, 0.449226366, -0.172555751, 0.837692363, -0.494343625, 0.18965149 ] + - [ 0.431124449, 1.43471891, -0.443354658, -0.170302932, -0.828152597, -0.488033196, -0.186076235, 0.431485127, -1.43437045, 0.443663915, -0.170875212, 0.828373891, -0.488597246, 0.186675152 ] + - [ 0.426160443, 1.42051828, -0.437804324, -0.1686173, -0.818821172, -0.482289514, -0.183128299, 0.426517745, -1.42017327, 0.438110856, -0.169183915, 0.819039732, -0.482849399, 0.183722558 ] + - [ 0.421192377, 1.40623053, -0.432263957, -0.166921325, -0.809475471, -0.476545185, -0.180204179, 0.421546275, -1.40588899, 0.432567735, -0.167482242, 0.809691302, -0.477100827, 0.180793704 ] + - [ 0.416220945, 1.39185885, -0.426734103, -0.165215389, -0.800116908, -0.47080095, -0.177303869, 0.416571412, -1.3915208, 0.427035098, -0.165770573, 0.800330013, -0.47135227, 0.177888585 ] + - [ 0.411246844, 1.37740643, -0.421215306, -0.163499869, -0.790746895, -0.465057547, -0.174427362, 0.411593853, -1.37707189, 0.42151349, -0.164049288, 0.790957279, -0.46560447, 0.175007196 ] + - [ 0.406270768, 1.36287648, -0.415708113, -0.161775146, -0.781366847, -0.459315717, -0.171574652, 0.406614294, -1.36254547, 0.416003459, -0.162318769, 0.781574513, -0.459858169, 0.172149532 ] + - [ 0.401293412, 1.3482722, -0.410213068, -0.160041599, -0.771978176, -0.453576199, -0.168745731, 0.401633431, -1.34794474, 0.41050555, -0.160579397, 0.772183131, -0.454114108, 0.169315588 ] + - [ 0.396315473, 1.33359677, -0.404730717, -0.158299607, -0.762582296, -0.447839733, -0.165940593, 0.396651961, -1.33327287, 0.40502031, -0.158831552, 0.762784544, -0.448373029, 0.16650536 ] + - [ 0.391337645, 1.31885341, -0.399261605, -0.156549551, -0.75318062, -0.442107058, -0.163159231, 0.391670579, -1.31853309, 0.399548284, -0.157075615, 0.753380167, -0.442635673, 0.163718842 ] + - [ 0.386360624, 1.30404529, -0.393806278, -0.15479181, -0.743774562, -0.436378915, -0.160401638, 0.386689982, -1.30372857, 0.394090019, -0.155311967, 0.743971413, -0.436902781, 0.160956029 ] + - [ 0.381385105, 1.28917563, -0.388365281, -0.153026762, -0.734365535, -0.430656043, -0.157667809, 0.381710866, -1.28886252, 0.388646061, -0.153540988, 0.734559697, -0.431175095, 0.158216917 ] + - [ 0.376411784, 1.27424762, -0.382939158, -0.151254789, -0.724954952, -0.424939181, -0.154957735, 0.376733927, -1.27393814, 0.383216956, -0.15176306, 0.725146431, -0.425453357, 0.1555015 ] + - [ 0.371441355, 1.25926446, -0.377528456, -0.149476268, -0.715544226, -0.41922907, -0.15227141, 0.371759862, -1.25895861, 0.37780325, -0.149978563, 0.71573303, -0.419738309, 0.152809774 ] + - [ 0.366474514, 1.24422934, -0.37213372, -0.147691581, -0.706134772, -0.41352645, -0.149608828, 0.366789366, -1.24392714, 0.372405489, -0.148187878, 0.706320906, -0.41403069, 0.150141735 ] + - [ 0.361511956, 1.22914546, -0.366755496, -0.145901106, -0.696728002, -0.407832059, -0.146969982, 0.361823136, -1.22884693, 0.367024221, -0.146391386, 0.696911474, -0.408331244, 0.147497376 ] + - [ 0.356554377, 1.21401602, -0.361394327, -0.144105222, -0.68732533, -0.402146637, -0.144354865, 0.356861868, -1.21372116, 0.361659989, -0.144589468, 0.687506148, -0.402640712, 0.144876693 ] + - [ 0.351602472, 1.19884421, -0.356050761, -0.14230431, -0.677928169, -0.396470925, -0.14176347, 0.351906258, -1.19855304, 0.356313342, -0.142782504, 0.67810634, -0.396959835, 0.142279681 ] + - [ 0.346656937, 1.18363324, -0.350725342, -0.140498749, -0.668537932, -0.390805662, -0.139195791, 0.346957003, -1.18334577, 0.350984825, -0.140970876, 0.668713465, -0.391289354, 0.139706335 ] + - [ 0.341718466, 1.1683863, -0.345418615, -0.138688918, -0.659156034, -0.385151587, -0.136651821, 0.342014798, -1.16810253, 0.345674984, -0.139154963, 0.659328937, -0.385630012, 0.137156651 ] + - [ 0.336787755, 1.15310659, -0.340131126, -0.136875197, -0.649783886, -0.379509441, -0.134131553, 0.337080341, -1.15282653, 0.340384365, -0.137335147, 0.649954168, -0.379982549, 0.134630623 ] + - [ 0.331865499, 1.1377973, -0.33486342, -0.135057965, -0.640422904, -0.373879963, -0.131634981, 0.332154326, -1.13752096, 0.335113514, -0.135511809, 0.640590573, -0.374347707, 0.132128247 ] + - [ 0.326952394, 1.12246164, -0.329616043, -0.133237602, -0.631074499, -0.368263893, -0.129162097, 0.32723745, -1.12218902, 0.329862978, -0.133685329, 0.631239565, -0.368726229, 0.129649517 ] + - [ 0.322049134, 1.10710279, -0.324389539, -0.131414488, -0.621740085, -0.36266197, -0.126712896, 0.32233041, -1.1068339, 0.324633303, -0.131856089, 0.621902558, -0.363118854, 0.127194429 ] + - [ 0.317156416, 1.09172396, -0.319184455, -0.129589002, -0.612421077, -0.357074934, -0.124287369, 0.317433901, -1.09145881, 0.319425035, -0.130024468, 0.612580965, -0.357526325, 0.124762978 ] + - [ 0.312274935, 1.07632835, -0.314001335, -0.127761523, -0.603118886, -0.351503526, -0.121885511, 0.31254862, -1.07606693, 0.314238719, -0.128190848, 0.603276201, -0.351949383, 0.122355158 ] + - [ 0.307405385, 1.06091914, -0.308840725, -0.125932431, -0.593834927, -0.345948484, -0.119507316, 0.307675263, -1.06066147, 0.309074903, -0.12635561, 0.593989678, -0.346388769, 0.119970966 ] + - [ 0.302548463, 1.04549955, -0.30370317, -0.124102106, -0.584570612, -0.340410548, -0.117152775, 0.302814527, -1.04524562, 0.303934132, -0.124519134, 0.584722811, -0.340845226, 0.117610396 ] + - [ 0.297704863, 1.03007276, -0.298589216, -0.122270927, -0.575327356, -0.334890458, -0.114821882, 0.297967107, -1.02982258, 0.298816953, -0.122681802, 0.575477013, -0.335319495, 0.115273443 ] + - [ 0.292875281, 1.01464198, -0.293499407, -0.120439274, -0.566106571, -0.329388954, -0.112514632, 0.293133699, -1.01439554, 0.293723911, -0.120843993, 0.566253698, -0.329812317, 0.112960102 ] + - [ 0.288060412, 0.999210392, -0.28843429, -0.118607525, -0.556909671, -0.323906776, -0.110231016, 0.288315, -0.998967708, 0.288655553, -0.11900609, 0.557054279, -0.324324433, 0.110670369 ] + - [ 0.283260951, 0.983781206, -0.283394409, -0.116776061, -0.54773807, -0.318444662, -0.107971029, 0.283511706, -0.983542269, 0.283612425, -0.117168472, 0.547880171, -0.318856586, 0.108404238 ] + - [ 0.278477595, 0.968357615, -0.27838031, -0.114945262, -0.53859318, -0.313003354, -0.105734663, 0.278724514, -0.968122424, 0.278595073, -0.11533152, 0.538732786, -0.313409516, 0.106161704 ] + - [ 0.273711037, 0.952942816, -0.273392538, -0.113115506, -0.529476415, -0.30758359, -0.103521912, 0.273954118, -0.95271137, 0.273604043, -0.113495615, 0.529613538, -0.307983966, 0.103942764 ] + - [ 0.268961974, 0.937540008, -0.268431639, -0.111287173, -0.520389188, -0.30218611, -0.101332769, 0.269201217, -0.937312302, 0.268639882, -0.111661139, 0.520523842, -0.302580676, 0.101747411 ] + - [ 0.264231101, 0.922152387, -0.263498157, -0.109460643, -0.511332913, -0.296811655, -0.0991672272, 0.264466505, -0.921928418, 0.263703135, -0.109828471, 0.51146511, -0.297200389, 0.0995756405 ] + - [ 0.259519113, 0.90678315, -0.258592639, -0.107636296, -0.502309003, -0.291460963, -0.0970252802, 0.259750679, -0.906562914, 0.258794349, -0.107997993, 0.502438757, -0.291843845, 0.0974274484 ] + - [ 0.254826705, 0.891435494, -0.253715629, -0.10581451, -0.493318872, -0.286134774, -0.0949069212, 0.255054436, -0.891218986, 0.25391407, -0.106170085, 0.493446195, -0.286511787, 0.0953028293 ] + - [ 0.250154573, 0.876112618, -0.248867673, -0.103995665, -0.484363932, -0.280833828, -0.0928121433, 0.25037847, -0.875899831, 0.249062843, -0.104345129, 0.48448884, -0.281204955, 0.0932017784 ] + - [ 0.245503412, 0.860817718, -0.244049316, -0.102180141, -0.475445598, -0.275558866, -0.0907409399, 0.24572348, -0.860608646, 0.244241216, -0.102523504, 0.475568103, -0.275924091, 0.0911242907 ] + - [ 0.240873918, 0.845553992, -0.239261103, -0.100368318, -0.466565282, -0.270310625, -0.0886933042, 0.24109016, -0.845348627, 0.239449734, -0.100705592, 0.4666854, -0.270669937, 0.0890703614 ] + - [ 0.236266785, 0.830324636, -0.23450358, -0.0985605744, -0.457724399, -0.265089847, -0.0866692295, 0.236479207, -0.83012297, 0.234688943, -0.0988917738, 0.457842143, -0.265443235, 0.0870399855 ] + - [ 0.231682709, 0.815132849, -0.229777293, -0.0967572902, -0.44892436, -0.259897271, -0.0846687092, 0.231891318, -0.814934873, 0.22995939, -0.09708243, 0.449039746, -0.260244725, 0.0850331581 ] + - [ 0.227122386, 0.799981827, -0.225082786, -0.0949588449, -0.44016658, -0.254733637, -0.0826917364, 0.227327187, -0.79978753, 0.225261621, -0.0952779412, 0.440279624, -0.255075149, 0.0830498743 ] + - [ 0.22258651, 0.784874767, -0.220420604, -0.0931656181, -0.431452472, -0.249599684, -0.0807383045, 0.222787513, -0.78468414, 0.220596182, -0.0934786885, 0.431563189, -0.249935249, 0.0810901293 ] + - [ 0.218075777, 0.769814868, -0.215791294, -0.0913779892, -0.42278345, -0.244496152, -0.0788084068, 0.21827299, -0.769627899, 0.215963618, -0.0916850525, 0.422891855, -0.244825767, 0.079153918 ] + - [ 0.213590883, 0.754805326, -0.211195401, -0.0895963377, -0.414160926, -0.23942378, -0.0769020364, 0.213784315, -0.754622002, 0.211364477, -0.0898974141, 0.414267036, -0.239747443, 0.0772412357 ] + - [ 0.209132522, 0.739849339, -0.206633469, -0.0878210433, -0.405586315, -0.23438331, -0.0750191867, 0.209322185, -0.739669647, 0.206799304, -0.088116154, 0.405690145, -0.234701019, 0.0753520774 ] + - [ 0.20470139, 0.724950104, -0.202106044, -0.0860524854, -0.397061028, -0.229375479, -0.073159851, 0.204887294, -0.724774031, 0.202268646, -0.0863416531, 0.397162597, -0.229687237, 0.0734864382 ] + - [ 0.200298182, 0.710110817, -0.197613672, -0.0842910435, -0.388586481, -0.224401028, -0.0713240225, 0.200480341, -0.709938349, 0.197773048, -0.0845742922, 0.388685804, -0.224706839, 0.0716443132 ] + - [ 0.195923595, 0.695334678, -0.193156897, -0.0825370972, -0.380164086, -0.219460697, -0.0695116946, 0.19610202, -0.695165798, 0.193313057, -0.082814452, 0.380261181, -0.219760565, 0.0698256975 ] + - [ 0.191578322, 0.680624882, -0.188736266, -0.080791026, -0.371795257, -0.214555225, -0.0677228604, 0.191753028, -0.680459574, 0.188889218, -0.0810625133, 0.371890142, -0.214849157, 0.0680305862 ] + - [ 0.187263059, 0.665984627, -0.184352323, -0.0790532094, -0.363481406, -0.209685352, -0.0659575133, 0.187434062, -0.665822875, 0.184502079, -0.079318857, 0.363574098, -0.209973357, 0.0662589743 ] + - [ 0.182978502, 0.65141711, -0.180005614, -0.0773240269, -0.355223948, -0.204851817, -0.0642156466, 0.183145816, -0.651258896, 0.180152185, -0.0775838638, 0.355314466, -0.205133907, 0.0645108571 ] + - [ 0.178725345, 0.636925529, -0.175696684, -0.0756038581, -0.347024296, -0.200055361, -0.0624972535, 0.178888989, -0.636770835, 0.175840083, -0.0758579146, 0.347112657, -0.200331547, 0.0627862295 ] + - [ 0.174504285, 0.622513081, -0.171426079, -0.0738930825, -0.338883862, -0.195296724, -0.0608023273, 0.174664275, -0.622361887, 0.171566318, -0.0741413901, 0.338970086, -0.19556702, 0.0610850867 ] + - [ 0.170316017, 0.608182963, -0.167194343, -0.0721920795, -0.330804061, -0.190576644, -0.0591308612, 0.170472371, -0.60803525, 0.167331436, -0.0724346712, 0.330888167, -0.190841066, 0.0594074238 ] + - [ 0.166161235, 0.593938372, -0.163002022, -0.0705012288, -0.322786306, -0.185895861, -0.0574828487, 0.166313974, -0.593794119, 0.163135985, -0.0707381386, 0.322868313, -0.186154428, 0.0577532358 ] + - [ 0.162040636, 0.579782507, -0.158849662, -0.0688209098, -0.31483201, -0.181255116, -0.0558582829, 0.162189778, -0.579641692, 0.158980509, -0.0690521731, 0.314911937, -0.181507846, 0.056122518 ] + - [ 0.157954914, 0.565718563, -0.154737808, -0.0671515021, -0.306942586, -0.176655148, -0.054257157, 0.158100482, -0.565581164, 0.154865555, -0.0673771556, 0.307020454, -0.176902063, 0.0545152652 ] + - [ 0.153904765, 0.551749739, -0.150667005, -0.0654933852, -0.299119449, -0.172096696, -0.0526794645, 0.15404678, -0.551615732, 0.15079167, -0.0657134668, 0.299195276, -0.172337819, 0.0529314727 ] + - [ 0.149890884, 0.537879231, -0.146637798, -0.0638469385, -0.29136401, -0.167580501, -0.0511251986, 0.150029369, -0.537748594, 0.146759399, -0.0640614875, 0.291437819, -0.167815857, 0.0513711356 ] + - [ 0.145913966, 0.524110238, -0.142650733, -0.0622125417, -0.283677684, -0.163107301, -0.0495943525, 0.146048946, -0.523982944, 0.142769289, -0.0624215986, 0.283749494, -0.163336918, 0.0498342489 ] + - [ 0.141974707, 0.510445955, -0.138706355, -0.0605905743, -0.276061884, -0.158677838, -0.0480869195, 0.142106205, -0.51032198, 0.138821885, -0.0607941807, 0.276131717, -0.158901743, 0.0483208078 ] + - [ 0.138073803, 0.496889582, -0.13480521, -0.0589814157, -0.268518024, -0.15429285, -0.0466028929, 0.138201845, -0.496768899, 0.134917735, -0.0591796148, 0.2685859, -0.154511074, 0.0468308073 ] + - [ 0.134211948, 0.483444313, -0.130947842, -0.0573854456, -0.261047516, -0.149953077, -0.045142266, 0.13433656, -0.483326897, 0.131057383, -0.0575782816, 0.261113458, -0.150165652, 0.0453642425 ] + - [ 0.130389837, 0.470113348, -0.127134798, -0.0558030433, -0.253651774, -0.145659259, -0.0437050321, 0.130511047, -0.469999169, 0.127241376, -0.0559905619, 0.253715803, -0.145866219, 0.0439211086 ] + - [ 0.126608167, 0.456899884, -0.123366622, -0.0542345885, -0.246332212, -0.141412135, -0.0422911844, 0.126726002, -0.456788914, 0.123470261, -0.0544168365, 0.24639435, -0.141613516, 0.0425014006 ] + - [ 0.122867632, 0.443807117, -0.119643859, -0.0526804607, -0.239090243, -0.137212446, -0.0409007161, 0.122982122, -0.443699327, 0.119744583, -0.0528574863, 0.239150512, -0.137408285, 0.0411051136 ] + - [ 0.119168928, 0.430838245, -0.115967056, -0.0511410394, -0.231927279, -0.133060931, -0.0395336207, 0.119280102, -0.430733605, 0.116064889, -0.0513128919, 0.231985703, -0.133251267, 0.0397322427 ] + - [ 0.11551275, 0.417996465, -0.112336758, -0.049616704, -0.224844736, -0.128958329, -0.0381898914, 0.11562064, -0.417894944, 0.112431724, -0.0497834342, 0.224901337, -0.129143205, 0.038382783 ] + - [ 0.111899793, 0.405284975, -0.108753509, -0.0481078342, -0.217844025, -0.124905381, -0.0368695214, 0.11200443, -0.405186541, 0.108845636, -0.0482694941, 0.217898827, -0.125084838, 0.0370567297 ] + - [ 0.108330753, 0.392706972, -0.105217855, -0.0466148095, -0.21092656, -0.120902826, -0.035572504, 0.108432169, -0.392611593, 0.105307169, -0.0467714522, 0.210979586, -0.12107691, 0.0357540777 ] + - [ 0.104806325, 0.380265653, -0.101730342, -0.0451380093, -0.204093755, -0.116951404, -0.0342988325, 0.104904554, -0.380173295, 0.101816871, -0.0452896895, 0.204145029, -0.117120161, 0.0344748223 ] + - [ 0.101327204, 0.367964215, -0.098291514, -0.0436778132, -0.197347023, -0.113051855, -0.0330485001, 0.10142228, -0.367874845, 0.0983752869, -0.0438245866, 0.197396569, -0.113215332, 0.0332189584 ] + - [ 0.0978940862, 0.355805856, -0.0949019176, -0.0422346008, -0.190687778, -0.109204917, -0.0318215003, 0.0979860443, -0.355719439, 0.0949829634, -0.0423765244, 0.19073562, -0.109363166, 0.0319864813 ] + - [ 0.0945076661, 0.343793773, -0.0915620975, -0.0408087515, -0.184117432, -0.105411332, -0.0306178261, 0.0945965424, -0.343710273, 0.0916404465, -0.0409458837, 0.184163596, -0.105564404, 0.0307773859 ] + - [ 0.0911686394, 0.331931163, -0.0882725993, -0.0394006448, -0.177637399, -0.101671838, -0.029437471, 0.0912544707, -0.331850545, 0.0883482825, -0.0395330453, 0.177681909, -0.101819788, 0.0295916674 ] + - [ 0.0878777013, 0.320221224, -0.0850339681, -0.0380106604, -0.171249093, -0.0979871755, -0.0282804281, 0.0879605254, -0.32014345, 0.0851070174, -0.03813839, 0.171291975, -0.0981300577, 0.0284293209 ] + - [ 0.0846355471, 0.308667152, -0.0818467494, -0.0366391776, -0.164953926, -0.0943580841, -0.0271466908, 0.0847154026, -0.308592184, 0.0819171974, -0.0367622986, 0.164995205, -0.0944959563, 0.0272903415 ] + - [ 0.0814428722, 0.297272146, -0.0787114885, -0.0352865761, -0.158753313, -0.0907853035, -0.0260362523, 0.0815197987, -0.297199946, 0.0787793686, -0.0354051519, 0.158793015, -0.0909182247, 0.0261747243 ] + - [ 0.0783003719, 0.286039402, -0.0756287307, -0.0339532353, -0.152648667, -0.0872695734, -0.024949106, 0.0783744098, -0.28596993, 0.0756940772, -0.0340673306, 0.152686817, -0.0873976044, 0.0250824643 ] + - [ 0.0752087415, 0.274972118, -0.0725990212, -0.0326395349, -0.1466414, -0.0838116334, -0.023885245, 0.075279932, -0.274905334, 0.0726618694, -0.0327492156, 0.146678026, -0.0839348371, 0.0240135567 ] + - [ 0.0721686764, 0.264073491, -0.0696229056, -0.0313458542, -0.140732926, -0.0804122233, -0.0228446627, 0.0722370617, -0.264009354, 0.0696832912, -0.0314511877, 0.140768055, -0.0805306642, 0.0229679965 ] + - [ 0.0691808718, 0.253346718, -0.0667009291, -0.0300725728, -0.13492466, -0.0770720828, -0.0218273524, 0.0692464949, -0.253285187, 0.066758889, -0.0301736276, 0.134958317, -0.0771858271, 0.0219457789 ] + - [ 0.0662460231, 0.242794997, -0.0638336369, -0.0288200703, -0.129218013, -0.0737919516, -0.0208333072, 0.066308928, -0.242736028, 0.0638892086, -0.0289169162, 0.129250227, -0.0739010675, 0.0209468989 ] + - [ 0.0633648256, 0.232421525, -0.0610215746, -0.0275887261, -0.1236144, -0.0705725694, -0.0198625206, 0.063425057, -0.232365075, 0.0610747965, -0.0276814343, 0.123645198, -0.0706771267, 0.0199713517 ] + - [ 0.0605379746, 0.222229499, -0.0582652873, -0.0263789199, -0.118115233, -0.0674146759, -0.0189149858, 0.0605955782, -0.222175525, 0.0583161986, -0.0264675627, 0.118144643, -0.0675147464, 0.0190191324 ] + - [ 0.0577661655, 0.212222116, -0.0555653205, -0.025191031, -0.112721927, -0.0643190109, -0.017990696, 0.0578211878, -0.212170573, 0.0556139612, -0.0252756821, 0.112749976, -0.0644146679, 0.018090236 ] + - [ 0.0550500936, 0.202402574, -0.0529222194, -0.0240254391, -0.107435894, -0.0612863139, -0.0170896445, 0.055102582, -0.202353416, 0.0529686304, -0.0241061733, 0.107462612, -0.0613776329, 0.0171846576 ] + - [ 0.0523904541, 0.19277407, -0.0503365295, -0.0228825236, -0.102258547, -0.0583173248, -0.0162118246, 0.052440457, -0.19272725, 0.0503807523, -0.0229594173, 0.102283963, -0.0584043828, 0.0163023923 ] + - [ 0.0497879425, 0.183339802, -0.0478087959, -0.0217626642, -0.0971913016, -0.0554127832, -0.0153572297, 0.049835509, -0.183295273, 0.0478508731, -0.0218357946, 0.0972154433, -0.0554956591, 0.0154434353 ] + - [ 0.047243254, 0.174102966, -0.0453395641, -0.0206662402, -0.0922355694, -0.0525734289, -0.0145258529, 0.0472884341, -0.174060681, 0.0453795389, -0.0207356863, 0.0922584664, -0.0526522033, 0.0146077816 ] + - [ 0.0447570839, 0.16506676, -0.0429293794, -0.0195936312, -0.0873927641, -0.0498000015, -0.0137176875, 0.0447999287, -0.165026669, 0.0429672959, -0.0196594729, 0.087414446, -0.049874757, 0.0137954263 ] + - [ 0.0423301277, 0.156234381, -0.0405787871, -0.0185452168, -0.0826642991, -0.0470932408, -0.0129327268, 0.0423706888, -0.156196436, 0.0406146903, -0.0186075355, 0.0826847959, -0.0471640616, 0.0130063645 ] + - [ 0.0399630805, 0.147609027, -0.0382883326, -0.0175213764, -0.0780515878, -0.0444538864, -0.0121709642, 0.0400014107, -0.147573176, 0.0383222681, -0.0175802546, 0.0780709295, -0.0445208586, 0.0122405914 ] + - [ 0.0376566378, 0.139193895, -0.0360585611, -0.0165224896, -0.0735560436, -0.0418826781, -0.0114323928, 0.0376927907, -0.139160088, 0.0360905756, -0.0165780112, 0.0735742607, -0.0419458895, 0.0114981019 ] + - [ 0.0354114948, 0.130992181, -0.0338900181, -0.015548936, -0.0691790798, -0.0393803555, -0.010717006, 0.0354455248, -0.130960366, 0.0339201589, -0.0156011861, 0.0691962029, -0.0394398959, 0.0107788913 ] + - [ 0.0332283469, 0.123007084, -0.0317832488, -0.014601095, -0.0649221097, -0.0369476585, -0.010024797, 0.0332603093, -0.122977209, 0.0318115641, -0.01465016, 0.06493817, -0.0370036193, 0.0100829545 ] + - [ 0.0311078894, 0.115241801, -0.0297387986, -0.0136793461, -0.0607865469, -0.0345853266, -0.00935575908, 0.0311378403, -0.115213811, 0.0297653373, -0.0137253137, 0.0608015755, -0.0346378011, 0.00941028676 ] + - [ 0.0290508176, 0.107699528, -0.0277572128, -0.0127840689, -0.0567738045, -0.0322940996, -0.00870988556, 0.0290788142, -0.10767337, 0.0277820249, -0.012827028, 0.0567878331, -0.0323431828, 0.0087608831 ] + - [ 0.0270578268, 0.100383464, -0.0258390368, -0.0119156429, -0.0528852961, -0.0300747172, -0.0080871697, 0.0270839271, -0.100359083, 0.0258621728, -0.0119556838, 0.0528983564, -0.030120506, 0.00813473862 ] + - [ 0.0251296124, 0.0932968051, -0.0239848158, -0.0110744476, -0.0491224349, -0.0279279192, -0.00748760477, 0.0251538751, -0.0932741455, 0.0240063272, -0.0111116618, 0.0491345592, -0.0279705121, 0.00753184842 ] + - [ 0.0232668697, 0.0864427491, -0.0221950953, -0.0102608626, -0.0454866343, -0.0258544451, -0.00691118406, 0.0232893545, -0.0864217543, 0.0222150343, -0.0102953428, 0.0454978549, -0.0258939428, 0.0069522076 ] + - [ 0.0214702939, 0.0798244933, -0.0204704205, -0.00947526734, -0.0419793077, -0.0238550348, -0.00635790084, 0.0214910615, -0.0798051058, 0.0204888403, -0.00950710769, 0.0419896574, -0.0238915393, 0.00639581125 ] + - [ 0.0197405805, 0.0734452348, -0.0188113368, -0.00871804137, -0.0386018685, -0.0219304278, -0.00582774839, 0.0197596923, -0.0734273967, 0.0188282912, -0.00874733716, 0.0386113802, -0.0219640434, 0.00586265448 ] + - [ 0.0180784248, 0.067308171, -0.0172183894, -0.00798956421, -0.03535573, -0.0200813641, -0.00532071998, 0.0180959431, -0.0672918235, 0.0172339333, -0.00801641206, 0.035364437, -0.0201121964, 0.00535273237 ] + - [ 0.016484522, 0.0614164991, -0.0156921239, -0.00729021538, -0.0322423055, -0.0183085831, -0.00483680889, 0.0165005101, -0.0614015826, 0.0157063126, -0.00731471316, 0.0322502415, -0.0183367399, 0.00486604002 ] + - [ 0.0149595675, 0.0557734166, -0.0142330854, -0.00662037441, -0.0292630086, -0.0166128247, -0.0043760084, 0.0149740894, -0.0557598705, 0.0142459754, -0.00664262128, 0.0292702073, -0.0166384154, 0.00440257252 ] + - [ 0.0135042566, 0.0503821205, -0.0128418193, -0.00598042081, -0.0264192524, -0.0149948286, -0.00393831179, 0.0135173774, -0.0503698839, 0.0128534678, -0.00600051721, 0.0264257481, -0.0150179644, 0.00396232499 ] + - [ 0.0121192847, 0.0452458083, -0.0115188709, -0.00537073412, -0.0237124504, -0.0134553344, -0.00352371233, 0.0121310701, -0.0452348192, 0.0115293358, -0.00538878174, 0.0237182774, -0.0134761284, 0.0035452925 ] + - [ 0.010805347, 0.0403676772, -0.0102647856, -0.00479169385, -0.021144016, -0.0119950818, -0.00313220331, 0.0108158638, -0.0403578729, 0.0102741258, -0.00480779569, 0.0211492091, -0.0120136488, 0.00315147015 ] + - [ 0.00956313886, 0.0357509245, -0.0090801087, -0.00424367952, -0.0187153624, -0.0106148107, -0.00276377799, 0.00957245471, -0.0357422415, 0.00908838378, -0.00425793983, 0.0187199566, -0.0106312673, 0.00278085305 ] + - [ 0.00839335566, 0.0313987475, -0.00796538554, -0.00372707066, -0.0164279032, -0.00931526057, -0.00241842966, 0.00840153898, -0.0313911215, 0.00797265595, -0.00373959498, 0.0164319337, -0.00932972524, 0.00243343628 ] + - [ 0.00729669267, 0.0273143435, -0.00692116145, -0.00324224679, -0.0142830516, -0.00809717126, -0.00209615159, 0.00730381285, -0.0273077095, 0.00692748844, -0.00325314192, 0.014286554, -0.0081097642, 0.00210921495 ] + - [ 0.00627384523, 0.0235009098, -0.00594798175, -0.00278958743, -0.012282221, -0.00696128245, -0.00179693706, 0.00627997249, -0.023495202, 0.00595342741, -0.00279896146, 0.0122852312, -0.00697212566, 0.00180818415 ] + - [ 0.00532550866, 0.0199616436, -0.00504639179, -0.0023694721, -0.0104268248, -0.00590833382, -0.00152077934, 0.00533071412, -0.0199567954, 0.005051019, -0.00237743439, 0.010429379, -0.00591755114, 0.00153033897 ] + - [ 0.00445237829, 0.0166997423, -0.00421693688, -0.00198228033, -0.00871827635, -0.0049390651, -0.00126767173, 0.00445673393, -0.0166956864, 0.00422080937, -0.00198894152, 0.00872041089, -0.00494678213, 0.00127567451 ] + - [ 0.00365514942, 0.0137184032, -0.00346016238, -0.00162839164, -0.007157989, -0.00405421599, -0.00103760748, 0.00365872812, -0.0137150713, 0.00346334467, -0.00163386363, 0.00715974062, -0.00406056014, 0.00104418587 ] + - [ 0.00293451738, 0.0110208235, -0.0027766136, -0.00130818555, -0.00574737613, -0.0032545262, -0.000830579882, 0.0029373929, -0.0110181468, 0.00277917103, -0.00131258153, 0.00574878184, -0.00325962667, 0.000835868135 ] + - [ 0.00229117751, 0.00861020047, -0.00216683588, -0.00102204158, -0.0044878511, -0.00254073542, -0.000646582211, 0.00229342446, -0.00860810926, 0.00216883462, -0.00102547601, 0.0044889482, -0.00254472322, 0.000650716413 ] + - [ 0.00172582511, 0.00648973148, -0.00163137455, -0.000770339256, -0.00338082728, -0.00191358337, -0.000485607744, 0.001727519, -0.00648815529, 0.00163288159, -0.000772927877, 0.00338165333, -0.00191659131, 0.000488725795 ] + - [ 0.00123915551, 0.00466261381, -0.00117077495, -0.000553458099, -0.00242771803, -0.00137380975, -0.000347649757, 0.00124037272, -0.00466148137, 0.00117185807, -0.00055531792, 0.00242831091, -0.00137597243, 0.000349891377 ] + - [ 0.000831864039, 0.00313204472, -0.000785582406, -0.000371777632, -0.00162993673, -0.000922154278, -0.000232701528, 0.000832681828, -0.00313128402, 0.000786310228, -0.00037302694, 0.00163033458, -0.000923608085, 0.000234208255 ] + - [ 0.00050464601, 0.00190122152, -0.00047634225, -0.000225677376, -0.000988896729, -0.000559356649, -0.000140756335, 0.000505142514, -0.00190075976, 0.000476784205, -0.000226435734, 0.000989137989, -0.000560239782, 0.000141671524 ] + - [ 0.000258196748, 0.00097334149, -0.000243599815, -0.000115536854, -0.000506011404, -0.000286156573, -7.18074536e-05, 0.00025845098, -0.000973105088, 0.000243826153, -0.0001159251, 0.000506134794, -0.000286609023, 7.22762815e-05 ] + - [ 9.32115751e-05, 0.00035160192, -8.79004328e-05, -4.17355883e-05, -0.000182694118, -0.000103293756, -2.58481623e-05, 9.33034279e-05, -0.000351516524, 8.79822212e-05, -4.18758351e-05, 0.000182738645, -0.000103457312, 2.60176223e-05 ] + - [ 1.03858134e-05, 3.92001004e-05, -9.78943694e-06, -4.65310102e-06, -2.03582367e-05, -1.15079051e-05, -2.87173791e-06, 1.03960559e-05, -3.91905796e-05, 9.79855858e-06, -4.66873713e-06, 2.03631961e-05, -1.15261529e-05, 2.89064258e-06 ] + - + type: Vector3Seq + content: ZMP + frame_rate: 500 + num_frames: 3817 + frames: + - [ 5.32951306e-310, 0, 1.18575755e-322 ] + - [ 0, 5.94158829e-313, 6.15378779e-313 ] + - [ 9.76118064e-312, 6.15378781e-313, 9.76118065e-312 ] + - [ 9.7824006e-312, 1.05038792e-311, 1.05250991e-311 ] + - [ 1.57027689e-311, 1.05250991e-311, 1.57027689e-311 ] + - [ 1.57239888e-311, 1.92889417e-311, 1.57239888e-311 ] + - [ 1.92889417e-311, 1.57239888e-311, 1.92889417e-311 ] + - [ 1.93101617e-311, 1.9649681e-311, 1.93101617e-311 ] + - [ 1.9649681e-311, 1.9670901e-311, 1.96921209e-311 ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, 0 ] + - [ 5.32996243e-310, 0, 0 ] + - [ 0, 0, 0 ] + - [ 0, 0, 0 ] + - [ 0, 0, 0 ] + - [ 0, 0, 0 ] + - [ 0, 2.71615461e-312, 1.26480805e-321 ] + - [ 5.32951306e-310, 0, 1.18575755e-322 ] + - [ 1.95223613e-312, 2.54639496e-312, 2.56761491e-312 ] + - [ 1.17134168e-311, 2.56761491e-312, 1.17134168e-311 ] + - [ 1.17346367e-311, 1.24561153e-311, 1.24773353e-311 ] + - [ 1.7655005e-311, 1.24773353e-311, 1.7655005e-311 ] + - [ 1.76762249e-311, 2.12411779e-311, 1.76762249e-311 ] + - [ 2.12411779e-311, 1.76762249e-311, 2.12411779e-311 ] + - [ 2.12623978e-311, 2.16019172e-311, 2.12623978e-311 ] + - [ 2.16019172e-311, 2.16231371e-311, 2.16443571e-311 ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, 0 ] + - [ 1, 4.94065646e-324, 0 ] + - [ 0, 8.48798338e-314, 0 ] + - [ 8.48798338e-314, 1, 1.46135923e-314 ] + - [ 6.95255346e-310, 0, 0 ] + - [ 5.32996158e-310, 5.32996242e-310, 6.78433418e-310 ] + - [ 6.78433416e-310, 6.78433427e-310, 6.78433417e-310 ] + - [ 1.30126049e-313, 0, 1.18575755e-322 ] + - [ 1.95223613e-312, 2.54639496e-312, 2.56761491e-312 ] + - [ 1.17134168e-311, 2.56761491e-312, 1.17134168e-311 ] + - [ 1.17346367e-311, 1.24561153e-311, 1.24773353e-311 ] + - [ 1.7655005e-311, 1.24773353e-311, 1.7655005e-311 ] + - [ 1.76762249e-311, 2.12411779e-311, 1.76762249e-311 ] + - [ 2.12411779e-311, 1.76762249e-311, 2.12411779e-311 ] + - [ 2.12623978e-311, 2.16019172e-311, 2.12623978e-311 ] + - [ 2.16019172e-311, 2.16231371e-311, 2.16443571e-311 ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, -nan ] + - [ 0, -nan, 0 ] + - [ -nan, 0, 0 ] + - [ 1, 4.94065646e-324, 0 ] + - [ 0, 6.36598832e-314, 0 ] + - [ 6.36598832e-314, 1, 1.97626258e-323 ] + - [ 6.95255346e-310, 0, 0 ] + - [ 5.32996298e-310, 5.32996242e-310, 6.78433418e-310 ] + - [ 6.78433416e-310, 6.78433427e-310, 6.78433417e-310 ] + - [ 6.78433315e-310, 6.78433315e-310, 5.32996426e-310 ] + - [ 5.32996426e-310, -3.29587878e-31, -9.5509632e-14 ] + - [ -4.5628758e-15, -5.50923671e-16, -9.55096319e-14 ] + - [ -8.06489576e-17, -3.29588066e-31, -9.55096318e-14 ] + - [ -1.20585209e-20, -2.2095921e-16, -9.55096319e-14 ] + - [ -4.64062135e-16, -3.29588066e-31, -9.55096318e-14 ] + - [ -4.64062135e-16, -3.15398961e-18, -9.5509632e-14 ] + - [ 8.48607005e-21, -5.50923671e-16, -9.5509604e-14 ] + - [ -1.20585209e-20, -3.29588066e-31, -9.55096318e-14 ] + - [ 1.66942553e-35, -7.40314309e-16, -9.55096318e-14 ] + - [ -1.20585209e-20, -7.40314309e-16, -9.55096318e-14 ] + - [ -3.24130183e-18, -2.11675614e-20, -9.55096048e-14 ] + - [ 1.78809017e-17, -3.29588066e-31, -9.55096318e-14 ] + - [ -1.20585209e-20, -3.15398961e-18, -9.55096048e-14 ] + - [ 1.1366146e-18, -3.29588066e-31, -9.55096318e-14 ] + - [ 1.1366146e-18, -2.2095921e-16, -9.55096046e-14 ] + - [ 6.06802589e-17, 1.16651643e-20, -3.7839011e-12 ] + - [ 4.64744011e-17, 1.16651643e-20, -7.04079704e-11 ] + - [ 4.64744011e-17, 2.23432525e-18, -3.7839011e-12 ] + - [ 4.64744011e-17, 2.23432525e-18, -3.7839011e-12 ] + - [ 1.31400369e-17, 2.23432525e-18, -7.04079703e-11 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.78390109e-12, 8.62201056e-19 ] + - [ 4.68771787e-17, -7.04079703e-11, 8.62201056e-19 ] + - [ 1.82267593e-16, -3.78390109e-12, 8.62201056e-19 ] + - [ 1.82267593e-16, -3.78390109e-12, 6.0867156e-21 ] + - [ 1.82267593e-16, -7.04079702e-11, 6.0867156e-21 ] + - [ 4.15067265e-16, -3.78390277e-12, 6.0867156e-21 ] + - [ 4.15067265e-16, -3.78390277e-12, -2.7309825e-39 ] + - [ 4.15067265e-16, -7.04079971e-11, -2.7309825e-39 ] + - [ 5.7198684e-16, -3.78390282e-12, -2.7309825e-39 ] + - [ 5.7198684e-16, -3.78390282e-12, -1.20585177e-20 ] + - [ 5.7198684e-16, -7.0407998e-11, -1.20585177e-20 ] + - [ 4.15067265e-16, -3.78390283e-12, -1.20585177e-20 ] + - [ 4.15067265e-16, -3.78390283e-12, -3.03662343e-18 ] + - [ 4.15067265e-16, -7.04079981e-11, -3.03662343e-18 ] + - [ 1.82267593e-16, -3.78390283e-12, -3.03662343e-18 ] + - [ 1.82267593e-16, -3.78390283e-12, -7.43228656e-17 ] + - [ 1.82267593e-16, -7.04079981e-11, -7.43228656e-17 ] + - [ 4.68771787e-17, -3.78390283e-12, -7.43228656e-17 ] + - [ 4.68771787e-17, -3.78390283e-12, -4.18289272e-16 ] + - [ 4.68771787e-17, -7.04079982e-11, -4.18289272e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.63122895e-15, 2.23432525e-18 ] + - [ -7.04079982e-11, -1.63122895e-15, 1.16651643e-20 ] + - [ -3.78390284e-12, -1.63122895e-15, 1.16651643e-20 ] + - [ -3.78390284e-12, -3.7807188e-15, 1.16651643e-20 ] + - [ -7.04079982e-11, -3.7807188e-15, -4.71376462e-82 ] + - [ -3.78390284e-12, -3.7807188e-15, -4.71376462e-82 ] + - [ -3.78390284e-12, -5.2682457e-15, -4.77101281e-83 ] + - [ -7.04079982e-11, -5.2682457e-15, -1.16651643e-20 ] + - [ -3.78390284e-12, -5.2682457e-15, -1.16651643e-20 ] + - [ -3.78390284e-12, -3.78072049e-15, -1.16651643e-20 ] + - [ -7.04079982e-11, -3.78072049e-15, -2.23432359e-18 ] + - [ -3.78390284e-12, -3.78072049e-15, -2.23432359e-18 ] + - [ -3.78390284e-12, -1.63122938e-15, -2.23432359e-18 ] + - [ -7.04079982e-11, -1.63122938e-15, -4.68772052e-17 ] + - [ -3.78390283e-12, -1.63122938e-15, -4.68772052e-17 ] + - [ -3.78390283e-12, -4.18289378e-16, -4.68772052e-17 ] + - [ -7.04079982e-11, -4.18289378e-16, -1.82267698e-16 ] + - [ -3.78390283e-12, -4.18289378e-16, -1.82267699e-16 ] + - [ -3.78390283e-12, -7.4322892e-17, -1.82267699e-16 ] + - [ -7.04079981e-11, -7.4322892e-17, -4.15067477e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.15067477e-16, -7.04079981e-11 ] + - [ -3.03662426e-18, -5.71987263e-16, -3.78390282e-12 ] + - [ -3.03662426e-18, -5.71987264e-16, -3.78390282e-12 ] + - [ -1.2058521e-20, -5.71987264e-16, -7.0407998e-11 ] + - [ -1.2058521e-20, -4.15067477e-16, -3.78390277e-12 ] + - [ -1.2058521e-20, -4.15067477e-16, -3.78390277e-12 ] + - [ -2.73101823e-39, -4.15067477e-16, -7.04079971e-11 ] + - [ -2.73101823e-39, -1.82267698e-16, -3.78390109e-12 ] + - [ -2.73101823e-39, -1.82267699e-16, -3.78390109e-12 ] + - [ 6.08671721e-21, -1.82267699e-16, -7.04079702e-11 ] + - [ 6.08671721e-21, -4.68772052e-17, -3.78390109e-12 ] + - [ 6.08671721e-21, -4.68772052e-17, -3.78390109e-12 ] + - [ 8.62201263e-19, -4.68772052e-17, -7.04079703e-11 ] + - [ 8.62201263e-19, -2.23432359e-18, -3.7839011e-12 ] + - [ 8.62201263e-19, -2.23432359e-18, -3.7839011e-12 ] + - [ 1.31400402e-17, -2.23432359e-18, -7.04079703e-11 ] + - [ 1.31400402e-17, -1.16651643e-20, -3.7839011e-12 ] + - [ 1.31400402e-17, -1.16651643e-20, -3.7839011e-12 ] + - [ 4.64744144e-17, -1.16651643e-20, -7.04079704e-11 ] + - [ 4.64744144e-17, -4.67602016e-81, -3.7839011e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -7.04079704e-11, 6.0680259e-17 ] + - [ 1.16651643e-20, -3.7839011e-12, -7.4322892e-17 ] + - [ -4.15067477e-16, -7.04079981e-11, -1.20585206e-20 ] + - [ -3.64833079e-82, -7.0407998e-11, -3.03662426e-18 ] + - [ -5.71987264e-16, -7.0407998e-11, -1.20585206e-20 ] + - [ -5.71987264e-16, -7.0407998e-11, -2.73101823e-39 ] + - [ -1.16651643e-20, -7.04079982e-11, -1.63122938e-15 ] + - [ -3.64833079e-82, -7.0407998e-11, -1.20585206e-20 ] + - [ -2.23432359e-18, -7.04079982e-11, -4.18289378e-16 ] + - [ -3.64833079e-82, -7.0407998e-11, -4.18289378e-16 ] + - [ -1.82267699e-16, -7.04079981e-11, -1.63122895e-15 ] + - [ 1.16651643e-20, -7.04079982e-11, -1.20585206e-20 ] + - [ -3.64833079e-82, -7.0407998e-11, -3.7807188e-15 ] + - [ -4.77101281e-83, -7.04079982e-11, -1.20585206e-20 ] + - [ -4.77101281e-83, -7.04079982e-11, -3.78072049e-15 ] + - [ 4.15067265e-16, -7.04079981e-11, -7.43228656e-17 ] + - [ -3.64833079e-82, -7.0407998e-11, -1.20585206e-20 ] + - [ 1.82267593e-16, -7.04079981e-11, -4.18289272e-16 ] + - [ -3.64833079e-82, -7.0407998e-11, -4.18289272e-16 ] + - [ 2.23432525e-18, -7.04079982e-11, 6.0867156e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.7309825e-39, 5.7198684e-16 ] + - [ -7.0407998e-11, -1.20585206e-20, 5.7198684e-16 ] + - [ -7.0407998e-11, -3.03662343e-18, 1.16651643e-20 ] + - [ -7.04079704e-11, 1.31400369e-17, -3.64833079e-82 ] + - [ -7.0407998e-11, -1.20585206e-20, 2.23432525e-18 ] + - [ -7.04079703e-11, 8.62201056e-19, -3.64833079e-82 ] + - [ -7.0407998e-11, 8.62201056e-19, 1.82267593e-16 ] + - [ -7.04079702e-11, 1.31400402e-17, -1.16651643e-20 ] + - [ -7.04079704e-11, -1.20585206e-20, -3.64833079e-82 ] + - [ -7.0407998e-11, 4.64744144e-17, -1.10108141e-81 ] + - [ -7.04079704e-11, -1.20585206e-20, -1.10108141e-81 ] + - [ -7.04079704e-11, 4.64744011e-17, -4.15067477e-16 ] + - [ -7.04079971e-11, 6.08671721e-21, -3.64833079e-82 ] + - [ -7.0407998e-11, -1.20585206e-20, -1.82267699e-16 ] + - [ -7.04079702e-11, 8.62201263e-19, -3.64833079e-82 ] + - [ -7.0407998e-11, 8.62201263e-19, -2.23432359e-18 ] + - [ -7.04079703e-11, -2.79829359e-14, 9.66085743e-27 ] + - [ -2.93571025e-12, -2.79785991e-14, 6.96983134e-26 ] + - [ -3.7867143e-13, -2.79833154e-14, 9.66090673e-27 ] + - [ -1.97294566e-12, -2.79829359e-14, 1.21871105e-26 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.94240634e-24, -2.95101745e-12 ] + - [ -2.793599e-14, 5.94240634e-24, -2.95101745e-12 ] + - [ -2.79057136e-14, 1.92025088e-25, -2.82416828e-13 ] + - [ -2.77243266e-14, 2.01981893e-25, -2.76536983e-13 ] + - [ -2.79036536e-14, 5.94240634e-24, -2.95101745e-12 ] + - [ -2.63209354e-14, 2.01981893e-25, -2.76536983e-13 ] + - [ -2.63209354e-14, 1.18625438e-20, -2.76536983e-13 ] + - [ -2.63209354e-14, 1.18625438e-20, -3.01245095e-12 ] + - [ -2.58679015e-14, 1.18625438e-20, -2.76536983e-13 ] + - [ -2.58679015e-14, 2.50149631e-18, -3.01245095e-12 ] + - [ -2.58679015e-14, 2.50149631e-18, -3.01245095e-12 ] + - [ -1.95306856e-14, 2.50149631e-18, -2.76536983e-13 ] + - [ -1.95306856e-14, 4.62449216e-17, -3.01245095e-12 ] + - [ -1.95306856e-14, 4.62449215e-17, -3.01245095e-12 ] + - [ -1.25441123e-14, -4.64467969e-21, -3.01245095e-12 ] + - [ -2.70595549e-14, -1.77717782e-20, -2.76536983e-13 ] + - [ -2.56704208e-14, -6.75395692e-22, -2.98390434e-12 ] + - [ -2.79823193e-14, -9.5041083e-27, -2.9351135e-12 ] + - [ -2.7984054e-14, -1.77717782e-20, -2.76536983e-13 ] + - [ -2.56704208e-14, -9.14295792e-27, -9.1708736e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.76536983e-13, -2.63163885e-14 ] + - [ -1.77717782e-20, -2.76536983e-13, -2.56704208e-14 ] + - [ -1.77717782e-20, -3.01245095e-12, -2.56704208e-14 ] + - [ -2.03540651e-18, -2.76536983e-13, -2.56704208e-14 ] + - [ -2.03540651e-18, -2.76536983e-13, -1.99077237e-14 ] + - [ -2.03540651e-18, -3.01245095e-12, -1.99077237e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -1.99077237e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -1.25441157e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -1.25441123e-14 ] + - [ -4.6244948e-17, -3.01245095e-12, -1.25441157e-14 ] + - [ 4.62449216e-17, -2.76536983e-13, -1.25441123e-14 ] + - [ -2.81850877e-29, -2.76536983e-13, -2.79647483e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -1.25441157e-14 ] + - [ 4.62737977e-33, -2.76536983e-13, -2.79565356e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -2.79565356e-14 ] + - [ 2.01981893e-25, -2.76536983e-13, -1.99077237e-14 ] + - [ -1.77717782e-20, -2.76536983e-13, -1.25441157e-14 ] + - [ -4.6244948e-17, -2.76536983e-13, -2.56704208e-14 ] + - [ -2.02415569e-25, -2.76536983e-13, -1.25441157e-14 ] + - [ -2.02415569e-25, -2.76536983e-13, -2.79682788e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.25441157e-14, 1.18625438e-20 ] + - [ -2.76536983e-13, -1.95306856e-14, -4.6244948e-17 ] + - [ -2.76536983e-13, -1.95306856e-14, 4.62449215e-17 ] + - [ -2.76536983e-13, -2.70759805e-14, -4.64467969e-21 ] + - [ -3.01245095e-12, -2.56704208e-14, 2.50149631e-18 ] + - [ -3.01245095e-12, -2.58679015e-14, 4.62449216e-17 ] + - [ -3.01245095e-12, -1.25441123e-14, 1.18625438e-20 ] + - [ -3.01245095e-12, -2.63209354e-14, 4.59433477e-21 ] + - [ -3.01245095e-12, -2.67947859e-14, 4.62449216e-17 ] + - [ -3.01245095e-12, -1.25441123e-14, 3.09970736e-22 ] + - [ -3.01245095e-12, -2.71075578e-14, 4.62449216e-17 ] + - [ -3.01245095e-12, -2.71075578e-14, -4.6244948e-17 ] + - [ -3.01245095e-12, -1.25441157e-14, -2.73917972e-29 ] + - [ -3.01245095e-12, -2.70759805e-14, -4.6244948e-17 ] + - [ -3.01245095e-12, -2.70759805e-14, -2.03540651e-18 ] + - [ -3.01245095e-12, -1.99077237e-14, -7.88141928e-26 ] + - [ -3.01245095e-12, -2.56704208e-14, 2.25777657e-17 ] + - [ -3.01245008e-12, 2.53385086e-16, 3.07012846e-17 ] + - [ -1.94561942e-12, 2.53385086e-16, 3.05031319e-17 ] + - [ -2.76536874e-13, 2.53385192e-16, -3.0616449e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.01147937e-17, -6.25429065e-13 ] + - [ 2.53385086e-16, 3.03452661e-17, -9.17707956e-13 ] + - [ 2.53385192e-16, -3.02664656e-17, -9.17690608e-13 ] + - [ 2.53385086e-16, -3.02664656e-17, -9.17690608e-13 ] + - [ 2.53385086e-16, 3.05423601e-17, -1.49720274e-12 ] + - [ 2.53385192e-16, -3.0616449e-17, -1.92985773e-12 ] + - [ 2.53385086e-16, -3.0616449e-17, -1.92985773e-12 ] + - [ 2.53385086e-16, 3.07012846e-17, -1.94561942e-12 ] + - [ 2.53385192e-16, -2.24944123e-17, -3.01245008e-12 ] + - [ 2.53385086e-16, -2.24944123e-17, -3.01245008e-12 ] + - [ 2.53385086e-16, -1.51058265e-21, -2.76536874e-13 ] + - [ 7.35045762e-16, 3.19305608e-20, -2.76536874e-13 ] + - [ 7.94266705e-16, -1.47801432e-19, -2.76536874e-13 ] + - [ 5.30666876e-16, 3.05031318e-17, -2.76536874e-13 ] + - [ 3.16956602e-16, -3.04239872e-17, -2.76536874e-13 ] + - [ 2.53385192e-16, 1.57071505e-17, -2.76536874e-13 ] + - [ 4.64266058e-16, -3.04239872e-17, -2.76536874e-13 ] + - [ 4.64266058e-16, 1.13933106e-18, -2.76536874e-13 ] + - [ 5.41827171e-16, 4.50780021e-20, -2.76536874e-13 ] + - [ 2.53385192e-16, -3.04239872e-17, -2.76536874e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 2.53385192e-16 ] + - [ 3.19305608e-20, -2.76536874e-13, 3.71563228e-16 ] + - [ -7.76861389e-18, -2.76536874e-13, 7.94266705e-16 ] + - [ -1.27992612e-18, -2.76536874e-13, 7.94266705e-16 ] + - [ 1.01761378e-22, -2.76536874e-13, 9.1015531e-16 ] + - [ -1.51058265e-21, -2.76536874e-13, 9.76921411e-16 ] + - [ 3.11223611e-23, -2.76536874e-13, 9.1015531e-16 ] + - [ 3.11223611e-23, -2.76536874e-13, 9.4294565e-16 ] + - [ -7.95405544e-22, -2.76536874e-13, 1.00075353e-15 ] + - [ 2.07963862e-35, -2.76536874e-13, 9.4294565e-16 ] + - [ 2.07963862e-35, -2.76536874e-13, 1.08991603e-15 ] + - [ 2.67052105e-19, -3.01245008e-12, 2.53385192e-16 ] + - [ 1.36305069e-19, -3.01245008e-12, 7.00920287e-16 ] + - [ -2.24944123e-17, -3.01245008e-12, 3.88176933e-16 ] + - [ -4.00022009e-19, -3.01245008e-12, 9.47824134e-16 ] + - [ 3.25696747e-23, -3.01245008e-12, 6.41963405e-16 ] + - [ 2.58362542e-18, -3.01245008e-12, 2.53385192e-16 ] + - [ -2.24944123e-17, -3.01245008e-12, 4.1746892e-16 ] + - [ 8.69225039e-18, -3.01245008e-12, 2.53385192e-16 ] + - [ 8.69225039e-18, -3.01245008e-12, 2.53385086e-16 ] + - [ -3.58633135e-20, -3.01245008e-12, 8.84242144e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 5.32996432e-310 ] + - [ 5.32996432e-310, 8.94422907e-15, 1.6675016e-16 ] + - [ -4.98100367e-16, 1.20264871e-14, 1.66089475e-16 ] + - [ -2.40171584e-16, 3.41372275e-15, 4.4719574e-17 ] + - [ -7.49545062e-16, 1.20264871e-14, 1.66089475e-16 ] + - [ -7.49545062e-16, 1.56846004e-14, 1.66089792e-16 ] + - [ -3.24530348e-16, 7.87303055e-15, 4.33560891e-17 ] + - [ -1.0878912e-15, 8.94422907e-15, 1.6675016e-16 ] + - [ -1.65703281e-16, 3.41372275e-15, 4.4719574e-17 ] + - [ -4.98100367e-16, 7.33238636e-15, 1.67734942e-16 ] + - [ -1.47388099e-16, 3.41372275e-15, 4.4719574e-17 ] + - [ -1.47388099e-16, 2.92865578e-15, 4.51915301e-17 ] + - [ -4.47541393e-16, 5.95971107e-15, 1.69014915e-16 ] + - [ -1.10706901e-16, 2.92865578e-15, 4.51915301e-17 ] + - [ -1.10706901e-16, 1.70296587e-15, 4.68567969e-17 ] + - [ -3.81011352e-16, 3.30563457e-15, 1.73392593e-16 ] + - [ -3.09771646e-16, 9.1762572e-16, 4.97633905e-17 ] + - [ -1.10706901e-16, 1.8902764e-15, 1.80483317e-16 ] + - [ -3.09771646e-16, 1.8902764e-15, 1.80483317e-16 ] + - [ -8.6853871e-17, 6.70350022e-16, 2.05410862e-16 ] + - [ -2.26464897e-16, 1.13887666e-15, 1.90939304e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.90939304e-16, -2.53914693e-16 ] + - [ 9.1762572e-16, 4.97633905e-17, -4.99464687e-17 ] + - [ 7.17049514e-17, 9.713026e-17, -5.03592384e-17 ] + - [ 1.88533148e-16, 2.93563776e-16, -1.77702349e-16 ] + - [ 1.17012545e-16, 8.23898221e-17, -5.03592384e-17 ] + - [ 1.17012545e-16, 8.23898221e-17, -5.41989447e-17 ] + - [ 3.25520953e-16, 2.42703683e-16, -1.87066193e-16 ] + - [ 1.48180181e-16, 7.74469084e-17, -5.41989447e-17 ] + - [ 1.48180181e-16, 7.74469084e-17, -5.69351321e-17 ] + - [ 4.00702327e-16, 2.23271053e-16, -1.9151968e-16 ] + - [ 2.01530127e-16, 6.9625512e-17, -5.69351321e-17 ] + - [ 2.01530127e-16, 6.9625512e-17, -6.25439195e-17 ] + - [ 5.44439845e-16, 2.11864935e-16, -2.00537616e-16 ] + - [ 2.94091372e-16, 6.2231285e-17, -6.25439195e-17 ] + - [ 2.94091372e-16, 6.2231285e-17, -6.66667995e-17 ] + - [ 6.70350022e-16, 2.05410862e-16, -2.12101734e-16 ] + - [ 3.49413846e-16, 5.89456971e-17, -6.66667995e-17 ] + - [ 3.49413846e-16, 5.89456971e-17, -2.26464897e-16 ] + - [ 5.97687749e-17, 4.27378676e-16, -1.71669039e-16 ] + - [ 1.0435373e-16, 3.57206655e-16, -4.73542567e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.77702349e-16, 1.5202624e-16 ] + - [ 3.18051922e-16, -4.90257174e-17, 7.17049514e-17 ] + - [ 9.713026e-17, -4.99464687e-17, 2.31360471e-18 ] + - [ 1.08788908e-15, -1.6609048e-16, 6.84361672e-18 ] + - [ 8.19379751e-16, -4.31543497e-17, 7.32572755e-19 ] + - [ 3.24531089e-16, -1.66089422e-16, 6.84361672e-18 ] + - [ 8.19379751e-16, -1.66089422e-16, 2.19633292e-17 ] + - [ 6.56954831e-16, -4.35943833e-17, 2.31358486e-18 ] + - [ 2.39830759e-16, -1.67639704e-16, 2.19633292e-17 ] + - [ 6.56954831e-16, -1.67639704e-16, 5.43621573e-17 ] + - [ 4.38216251e-16, -4.51032402e-17, 1.53806392e-17 ] + - [ 1.61571401e-16, -1.68175981e-16, 5.43621573e-17 ] + - [ 4.38216251e-16, -1.68175981e-16, 5.97687749e-17 ] + - [ 4.27378676e-16, -4.53326273e-17, 2.05790127e-17 ] + - [ 1.52549335e-16, -1.70216484e-16, 5.97687749e-17 ] + - [ 4.27378676e-16, -1.70216484e-16, 4.22591682e-17 ] + - [ 1.16293149e-16, -3.24530136e-16, 1.20264498e-14 ] + - [ -8.73971632e-17, -2.40642323e-16, 1.20264905e-14 ] + - [ -3.37508057e-16, -1.08787596e-15, 8.07522409e-15 ] + - [ -8.74399384e-17, -2.40642323e-16, 8.07522409e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.28997365e-15, -8.76795428e-17 ] + - [ -1.78829221e-16, 4.28997365e-15, -8.76795428e-17 ] + - [ -1.31144019e-16, 4.5413832e-15, -3.38688398e-16 ] + - [ -5.56930616e-16, 2.10561165e-15, -8.83629925e-17 ] + - [ -1.31144019e-16, 2.10561165e-15, -8.83629925e-17 ] + - [ -1.08154685e-16, 2.98682069e-15, -3.40074779e-16 ] + - [ -4.08549664e-16, 2.27181646e-15, -3.41511982e-16 ] + - [ -4.08549664e-16, 1.26046527e-15, -8.94020373e-17 ] + - [ -9.98414272e-17, 2.27181646e-15, -3.41511982e-16 ] + - [ -3.45118542e-16, 1.06764923e-15, -8.9808666e-17 ] + - [ -9.98414272e-17, 1.06764923e-15, -8.9808666e-17 ] + - [ -8.13854793e-17, 1.16504108e-15, -3.47356086e-16 ] + - [ -3.2816899e-16, 5.3577745e-16, -9.25201244e-17 ] + - [ -8.13854793e-17, 5.3577745e-16, -9.25201244e-17 ] + - [ -7.35137374e-17, 8.24005398e-16, -3.51704541e-16 ] + - [ -2.57266191e-16, 4.06408682e-16, -9.40033849e-17 ] + - [ -7.35137374e-17, 4.06408682e-16, -9.40033849e-17 ] + - [ -6.58896467e-17, 6.10840663e-16, -3.57758497e-16 ] + - [ -2.33765262e-16, 3.17244488e-16, -9.59375317e-17 ] + - [ -6.58896467e-17, 3.17244488e-16, -9.59375317e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.66958969e-16, -5.80886321e-17 ] + - [ 3.17244488e-16, -9.59375317e-17, -1.97954484e-16 ] + - [ 4.05851546e-16, -3.66958969e-16, -1.97954484e-16 ] + - [ 3.18792652e-16, -3.75362383e-16, -4.71781532e-17 ] + - [ 5.30849507e-17, -1.2735794e-16, -4.52878139e-17 ] + - [ 6.78818947e-17, -4.81368289e-16, -1.7318597e-16 ] + - [ 3.83192871e-17, -1.43210585e-16, -4.52878139e-17 ] + - [ 3.83192871e-17, -1.43210585e-16, -4.46530421e-17 ] + - [ 3.18792653e-16, -3.75362383e-16, -1.97954484e-16 ] + - [ 1.85026802e-16, -3.97243997e-16, -5.02237131e-17 ] + - [ 1.83968329e-16, -1.00844764e-16, -1.84201951e-16 ] + - [ 1.85026802e-16, -3.97243997e-16, -1.84201951e-16 ] + - [ 1.48550387e-16, -4.09132528e-16, -4.87880188e-17 ] + - [ 1.0479252e-16, -1.07568512e-16, -1.79040979e-16 ] + - [ 1.48550387e-16, -4.09132528e-16, -1.79040979e-16 ] + - [ 1.05664646e-16, -4.27484555e-16, -4.71781532e-17 ] + - [ 8.34113968e-17, -1.12419985e-16, -1.76119351e-16 ] + - [ 1.05664646e-16, -4.27484555e-16, -1.76119351e-16 ] + - [ 5.30849507e-17, -1.2735794e-16, -1.66089422e-16 ] + - [ 3.34642325e-18, -9.664271e-16, -4.31931014e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.38552165e-17, 3.83192871e-17 ] + - [ -1.43210585e-16, -1.66852281e-16, 3.79697272e-17 ] + - [ -5.93359597e-16, -1.66852281e-16, 2.28999161e-17 ] + - [ -6.77629211e-16, -4.33761664e-17, 1.36350913e-17 ] + - [ -1.75072471e-16, -1.66295568e-16, 2.28999161e-17 ] + - [ -6.77629211e-16, -1.66295568e-16, 1.33275124e-17 ] + - [ -7.39524449e-16, -4.31931014e-17, 6.9306113e-18 ] + - [ -1.94762916e-16, -1.66109962e-16, 1.33275124e-17 ] + - [ -7.39524449e-16, -1.66109962e-16, 2.31356584e-18 ] + - [ -2.4259611e-16, -1.66089422e-16, 8.34081258e-19 ] + - [ -3.12475904e-16, -4.30348121e-17, 3.34642325e-18 ] + - [ -9.664271e-16, -1.66089422e-16, 7.32594469e-19 ] + - [ -3.2452283e-16, -4.30348121e-17, 7.32594469e-19 ] + - [ -3.2452283e-16, -4.30326416e-17, 1.20265108e-14 ] + - [ -8.73968721e-17, 4.7724938e-16, 8.88767776e-15 ] + - [ -8.74456823e-17, 8.19545135e-16, 1.13260959e-14 ] + - [ -1.7178773e-16, 4.00767337e-16, 8.88767776e-15 ] + - [ -8.74456823e-17, 4.00767337e-16, 5.67788796e-15 ] + - [ -8.77892601e-17, 6.75401303e-16, 8.87491806e-15 ] + - [ -1.71931937e-16, 2.99182464e-16, 5.67788796e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.73063036e-15, -1.73641673e-16 ] + - [ 4.56485214e-16, 1.53314889e-15, -9.06121562e-17 ] + - [ 2.99182464e-16, 1.34618839e-15, -1.79578421e-16 ] + - [ 4.56485214e-16, 1.34618839e-15, -1.79578421e-16 ] + - [ 4.29067343e-16, 4.3408506e-16, -1.92616905e-16 ] + - [ 3.95705468e-16, 1.34618839e-15, -1.79578421e-16 ] + - [ 2.22704706e-16, 5.53507544e-16, -9.60738246e-17 ] + - [ 4.11684956e-16, 1.34618839e-15, -1.79578421e-16 ] + - [ 4.11684956e-16, 1.08947134e-15, -9.2069794e-17 ] + - [ 1.81414683e-16, 1.46156778e-16, -1.09389288e-16 ] + - [ 1.96863717e-16, 4.3408506e-16, -1.92616905e-16 ] + - [ 3.56012657e-16, 2.69863371e-16, -1.02191838e-16 ] + - [ 1.96863717e-16, 2.69863371e-16, -1.02191838e-16 ] + - [ 3.95705468e-16, 3.66673876e-17, -1.54536104e-16 ] + - [ 3.42707251e-16, 4.81795977e-17, -2.85636712e-16 ] + - [ 1.74205691e-16, 5.21222978e-17, -1.39206396e-16 ] + - [ 3.44762577e-16, 4.81795977e-17, -2.85636712e-16 ] + - [ 3.44762577e-16, 1.47939994e-16, -2.16620655e-16 ] + - [ 1.81414683e-16, 6.65293948e-17, -1.3122544e-16 ] + - [ 3.54275604e-16, 1.47939994e-16, -2.16620655e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.88910819e-16, 1.7202617e-16 ] + - [ 1.04197542e-17, -3.85110144e-16, 3.37864975e-16 ] + - [ 1.34422854e-17, -1.81889974e-16, 1.7202617e-16 ] + - [ 1.34422854e-17, -1.81889974e-16, 1.74205691e-16 ] + - [ 4.81795977e-17, -2.85636712e-16, 3.3809071e-16 ] + - [ 3.39793815e-17, -1.57401299e-16, 1.74205691e-16 ] + - [ 3.39793815e-17, -1.57401299e-16, 3.40127824e-16 ] + - [ 5.80947055e-18, -2.05400115e-16, 1.7202617e-16 ] + - [ 2.92510377e-18, -2.29691669e-16, 3.37509222e-16 ] + - [ 1.04197542e-17, -3.85110144e-16, 1.71775554e-16 ] + - [ 2.92510377e-18, -2.29691669e-16, 1.71775554e-16 ] + - [ 2.31358569e-18, -2.4522837e-16, 3.37507951e-16 ] + - [ 1.58139127e-18, -5.64658521e-16, 1.7177386e-16 ] + - [ 2.31358569e-18, -2.4522837e-16, 1.7177386e-16 ] + - [ 7.32606049e-19, -3.24521877e-16, 8.778926e-17 ] + - [ 1.84441522e-17, -7.18680027e-16, 1.19296251e-16 ] + - [ 1.32291243e-17, -5.18225022e-16, 8.76296472e-17 ] + - [ 7.63328051e-18, -8.19623908e-16, 1.19296251e-16 ] + - [ 7.63328051e-18, -8.19623908e-16, 1.18935521e-16 ] + - [ 2.12645096e-18, -7.5620274e-16, 8.74455234e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.18933403e-16, 2.6465713e-17 ] + - [ -6.75529204e-16, 1.19296251e-16, 5.21347651e-17 ] + - [ -5.54896466e-16, 8.87359782e-17, 1.32291243e-17 ] + - [ -5.18225022e-16, 1.21915383e-16, 5.21347651e-17 ] + - [ -5.54896466e-16, 1.21915383e-16, 6.38752171e-17 ] + - [ -5.24172464e-16, 9.60356023e-17, 1.99805409e-16 ] + - [ -4.11750813e-16, 1.29944408e-16, 1.70684628e-16 ] + - [ -3.10151328e-16, 9.38053116e-17, 1.47055691e-16 ] + - [ -4.29220444e-16, 1.29944408e-16, 1.47055691e-16 ] + - [ -4.29220444e-16, 1.21915383e-16, 5.38137697e-17 ] + - [ -3.82772545e-16, 9.20666176e-17, 1.01393589e-16 ] + - [ -4.56649962e-16, 1.21915383e-16, 1.01393589e-16 ] + - [ -4.56649962e-16, 8.91686532e-17, 2.88206716e-16 ] + - [ -3.96040257e-16, 1.29944408e-16, 3.95379678e-16 ] + - [ -3.83150533e-16, 9.86290583e-17, 1.70684628e-16 ] + - [ -3.10151328e-16, 1.46503479e-16, 3.95379678e-16 ] + - [ -3.83150533e-16, 1.46503479e-16, 5.90223881e-16 ] + - [ -3.71018269e-16, 1.02138792e-16, 5.15614678e-16 ] + - [ -2.64425102e-16, 1.10561529e-16, 1.21028704e-15 ] + - [ -3.54427434e-16, 1.46503479e-16, 1.52774228e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.45127922e-15, -2.30000624e-16 ] + - [ 1.39173891e-16, 1.52774228e-15, -2.40406212e-16 ] + - [ 1.73091526e-16, 2.97158426e-15, -3.4273965e-16 ] + - [ 1.3113089e-16, 1.52774228e-15, -2.40406212e-16 ] + - [ 1.3113089e-16, 1.71719645e-15, -3.482316e-16 ] + - [ 2.29379537e-16, 1.03435512e-14, -3.3753675e-16 ] + - [ 3.04795539e-16, 9.59368311e-15, -2.27347081e-16 ] + - [ 2.13322626e-16, 8.08748235e-15, -3.37872599e-16 ] + - [ 3.04795539e-16, 8.08748235e-15, -3.37872599e-16 ] + - [ 2.12150968e-16, 4.45127922e-15, -2.30000624e-16 ] + - [ 1.88774235e-16, 4.70342738e-15, -3.39819504e-16 ] + - [ 2.12150968e-16, 4.70342738e-15, -3.39819504e-16 ] + - [ 1.39173891e-16, 1.42016575e-14, -2.27183181e-16 ] + - [ 3.24521878e-16, 9.59368312e-15, -2.27347081e-16 ] + - [ 3.04795539e-16, 1.56842684e-14, -3.37505834e-16 ] + - [ 2.45228794e-16, 9.59368312e-15, -2.27347081e-16 ] + - [ 2.45228794e-16, 1.13874753e-14, -3.37509434e-16 ] + - [ 1.18933403e-16, 1.31096608e-18, -5.96495101e-16 ] + - [ 1.18935521e-16, 2.12645096e-18, -7.5620274e-16 ] + - [ 1.7177386e-16, 1.58139127e-18, -5.64658521e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -5.18225022e-16, 1.71775554e-16 ] + - [ 1.04197542e-17, -3.85110144e-16, 1.19296251e-16 ] + - [ 1.04197542e-17, -3.85110144e-16, 1.21915383e-16 ] + - [ 5.38137697e-17, -3.82772545e-16, 1.7202617e-16 ] + - [ 4.81795977e-17, -2.85636712e-16, 1.21915383e-16 ] + - [ 4.81795977e-17, -2.85636712e-16, 1.29944408e-16 ] + - [ 1.70684628e-16, -3.10151328e-16, 1.74205691e-16 ] + - [ 1.47939994e-16, -2.16620655e-16, 1.29944408e-16 ] + - [ 1.47939994e-16, -2.16620655e-16, 1.46503479e-16 ] + - [ 5.15614678e-16, -2.64425102e-16, 1.81414683e-16 ] + - [ 4.3408506e-16, -1.92616905e-16, 1.46503479e-16 ] + - [ 4.3408506e-16, -1.92616905e-16, 1.73091526e-16 ] + - [ 1.52774228e-15, -2.40406212e-16, 1.96863717e-16 ] + - [ 1.34618839e-15, -1.79578421e-16, 1.73091526e-16 ] + - [ 1.34618839e-15, -1.79578421e-16, 2.12150968e-16 ] + - [ 4.45127922e-15, -2.30000624e-16, 2.22704706e-16 ] + - [ 3.73063036e-15, -1.73641673e-16, 2.12150968e-16 ] + - [ 3.73063036e-15, -1.73641673e-16, 3.04795539e-16 ] + - [ 9.59368311e-15, -2.27347081e-16, 2.99182464e-16 ] + - [ 8.87491806e-15, -1.71931937e-16, 3.04795539e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.00767337e-16, 1.13260959e-14 ] + - [ -1.7178773e-16, 4.24512e-16, 1.13260959e-14 ] + - [ -1.7178773e-16, 5.96493408e-16, 1.34870599e-14 ] + - [ -1.71773648e-16, 4.7724938e-16, 1.20265108e-14 ] + - [ -8.73968721e-17, 3.37505622e-16, 2.31362457e-18 ] + - [ 1.08787595e-15, 3.37507951e-16, 2.31358486e-18 ] + - [ 2.40607594e-16, 8.73971367e-17, 1.08847191e-17 ] + - [ 7.61096896e-16, 3.37507951e-16, 1.0884719e-17 ] + - [ 7.61096896e-16, 3.37623995e-16, 1.01665145e-17 ] + - [ 1.79061625e-16, 8.74280534e-17, 3.75452181e-17 ] + - [ 5.54566547e-16, 3.37623995e-16, 3.75452181e-17 ] + - [ 5.54566547e-16, 3.37728815e-16, 1.35374674e-17 ] + - [ 1.67543566e-16, 8.76318178e-17, 5.33867195e-17 ] + - [ 4.49691586e-16, 3.37728815e-16, 5.33867195e-17 ] + - [ 4.49691586e-16, 3.38493262e-16, 3.49608412e-17 ] + - [ 1.31557688e-16, 8.79073153e-17, 5.18206085e-17 ] + - [ 1.08078981e-16, 3.39775882e-16, 5.33867195e-17 ] + - [ 4.49691586e-16, 8.82621691e-17, 5.18206085e-17 ] + - [ 1.08078981e-16, 8.82621691e-17, 6.94556554e-17 ] + - [ 1.00105649e-16, 8.82621691e-17, 1.25837357e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.50916203e-16, 3.26378362e-16 ] + - [ 3.41043679e-16, 1.50916203e-16, 3.26378362e-16 ] + - [ 3.46467019e-16, 1.34361579e-16, 8.16760645e-17 ] + - [ 8.96437858e-17, 2.86547273e-16, 2.59652918e-16 ] + - [ 3.46467019e-16, 2.86547273e-16, 2.59652918e-16 ] + - [ 3.47036437e-16, 1.42295102e-16, 8.03945036e-17 ] + - [ 9.20683646e-17, 1.87607447e-16, 7.33468719e-17 ] + - [ 3.50839403e-16, 2.86547273e-16, 2.59652918e-16 ] + - [ 9.2887022e-17, 1.87607447e-16, 7.33468719e-17 ] + - [ 9.2887022e-17, 2.52685437e-16, 6.61750968e-17 ] + - [ 3.56279472e-16, 3.37043142e-16, 2.45032917e-16 ] + - [ 9.38719625e-17, 2.52685437e-16, 6.61750968e-17 ] + - [ 9.38719625e-17, 3.08871673e-16, 6.24073884e-17 ] + - [ 3.60039663e-16, 3.90486897e-16, 2.30344096e-16 ] + - [ 9.53161537e-17, 3.08871673e-16, 6.24073884e-17 ] + - [ 9.53161537e-17, 4.66753794e-16, 5.45539838e-17 ] + - [ 3.72676971e-16, 4.72636438e-16, 2.17473299e-16 ] + - [ 1.00034286e-16, 4.66753794e-16, 5.45539838e-17 ] + - [ 1.00034286e-16, 5.16669869e-16, 5.3878978e-17 ] + - [ 3.75296421e-16, 8.13544329e-16, 1.98748895e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.98820677e-17, 9.88985707e-16 ] + - [ 7.57291661e-15, 4.31619465e-17, 2.42496054e-16 ] + - [ 8.56001432e-16, 4.98820677e-17, 1.06553634e-16 ] + - [ 1.07293938e-15, 4.86731399e-17, 4.0763868e-16 ] + - [ 1.41850256e-15, 1.84786192e-16, 1.1162785e-16 ] + - [ 1.07293938e-15, 4.86731399e-17, 1.1162785e-16 ] + - [ 1.49782296e-15, 4.69316667e-17, 4.28036292e-16 ] + - [ 1.85390311e-15, 1.78755847e-16, 1.1740038e-16 ] + - [ 1.49782296e-15, 4.69316667e-17, 1.1740038e-16 ] + - [ 2.41080864e-15, 4.51334951e-17, 4.82646674e-16 ] + - [ 2.2810686e-15, 1.76120304e-16, 1.41712237e-16 ] + - [ 2.41080864e-15, 4.51334951e-17, 1.41712237e-16 ] + - [ 4.317365e-15, 4.37686604e-17, 5.96706013e-16 ] + - [ 4.04912661e-15, 1.69745534e-16, 1.73562582e-16 ] + - [ 4.317365e-15, 4.37686604e-17, 1.73562582e-16 ] + - [ 6.08687443e-15, 4.3354276e-17, 6.74607633e-16 ] + - [ 7.24100844e-15, 1.66857998e-16, 1.93994711e-16 ] + - [ 6.08687443e-15, 4.3354276e-17, 1.93994711e-16 ] + - [ 7.57291661e-15, 4.31619465e-17, 7.46077732e-16 ] + - [ 9.02196636e-15, 1.6628858e-16, 2.14346901e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.42496054e-16, 1.48327156e-14 ] + - [ 1.66089422e-16, 9.88985707e-16, 1.11681107e-14 ] + - [ 4.30331975e-17, 3.12180184e-16, 1.56843564e-14 ] + - [ 1.6608921e-16, 9.88985707e-16, 1.56843564e-14 ] + - [ 1.6608921e-16, 1.08787426e-15, 1.20264735e-14 ] + - [ 4.30326946e-17, 3.2452336e-16, 1.57972761e-14 ] + - [ 4.30313976e-17, 1.40707185e-15, 1.56843564e-14 ] + - [ 1.6608921e-16, 4.12450462e-16, 3.38028281e-14 ] + - [ 1.66089422e-16, 1.6773787e-15, 2.2419732e-14 ] + - [ 1.66089422e-16, 4.12450462e-16, 2.18564755e-14 ] + - [ 4.30330917e-17, 1.50574187e-15, 2.2419732e-14 ] + - [ 1.66089422e-16, 1.50574187e-15, 1.57972761e-14 ] + - [ 4.30313976e-17, 2.54541573e-15, 4.19471379e-14 ] + - [ 4.302883e-17, 6.66775543e-16, 5.17717715e-14 ] + - [ 1.66089422e-16, 2.4131024e-15, 4.00927728e-14 ] + - [ 4.3028883e-17, 6.66775543e-16, 4.00927728e-14 ] + - [ 4.3028883e-17, 5.51454125e-16, 3.38028281e-14 ] + - [ 1.66089422e-16, 2.37003586e-15, 2.80120333e-14 ] + - [ 4.30315564e-17, 5.51454125e-16, 2.80120333e-14 ] + - [ 4.30315564e-17, 1.6773787e-15, 8.58364072e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.24875236e-14, 4.30330387e-17 ] + - [ 2.70113257e-15, 8.33383512e-14, 1.66089422e-16 ] + - [ 2.70113257e-15, 5.17717715e-14, 1.66089422e-16 ] + - [ 6.66775543e-16, 5.99774807e-14, 4.30322446e-17 ] + - [ 2.62106085e-15, 5.17717715e-14, 1.66089422e-16 ] + - [ 2.62106085e-15, 4.8364639e-14, 4.30297829e-17 ] + - [ 2.81073355e-15, 8.33383512e-14, 1.66089422e-16 ] + - [ 2.81946646e-15, 1.11570108e-13, 4.30302329e-17 ] + - [ 7.24326774e-16, 1.26668992e-13, 1.66089422e-16 ] + - [ 2.81946646e-15, 1.26668992e-13, 1.66089422e-16 ] + - [ 2.79050979e-15, 1.32793108e-13, 4.30291741e-17 ] + - [ 7.23104505e-16, 1.60624361e-13, 4.30294653e-17 ] + - [ 2.72902028e-15, 1.26668992e-13, 1.66089422e-16 ] + - [ 6.63137961e-16, 1.60624361e-13, 4.30294653e-17 ] + - [ 6.63137961e-16, 2.11452192e-13, 4.3032324e-17 ] + - [ 2.54029795e-15, 1.99713644e-13, 1.66089422e-16 ] + - [ 2.25344347e-15, 2.96403578e-13, 4.30328534e-17 ] + - [ 6.63137961e-16, 3.15050121e-13, 1.66089422e-16 ] + - [ 2.25344347e-15, 3.15050121e-13, 1.66089422e-16 ] + - [ 2.17644818e-15, 4.53010293e-13, 1.66089422e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30287506e-17, 2.09482469e-15 ] + - [ 3.15050121e-13, 1.66089422e-16, 2.09482469e-15 ] + - [ 3.18668971e-13, 4.30324299e-17, 1.45775407e-15 ] + - [ 6.09983087e-13, 4.3030127e-17, 4.09459801e-16 ] + - [ 4.53010294e-13, 1.66089422e-16, 1.47458631e-15 ] + - [ 5.93560893e-13, 4.30298094e-17, 4.09459801e-16 ] + - [ 5.93560894e-13, 4.30298094e-17, 1.71982013e-15 ] + - [ 6.21391496e-13, 4.30303388e-17, 4.09459801e-16 ] + - [ 8.10705338e-13, 4.30332769e-17, 1.15042595e-15 ] + - [ 4.53010293e-13, 1.66089422e-16, 2.98550366e-16 ] + - [ 8.10705338e-13, 4.30332769e-17, 2.98550366e-16 ] + - [ 8.99812012e-13, 4.30332505e-17, 1.92459464e-16 ] + - [ 1.1230411e-12, 4.30315035e-17, 2.98550366e-16 ] + - [ 7.14032668e-13, 1.66089422e-16, 8.20716159e-16 ] + - [ 1.07962531e-12, 4.30319535e-17, 2.98550366e-16 ] + - [ 1.07962531e-12, 4.30319535e-17, 9.86725824e-16 ] + - [ 1.9309055e-12, 4.30313446e-17, 4.00453088e-16 ] + - [ 1.43512479e-12, 1.66089422e-16, 1.22674325e-16 ] + - [ 1.87869553e-12, 4.30306564e-17, 5.50384323e-16 ] + - [ 1.43512479e-12, 1.66089422e-16, 5.50384323e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.45243543e-16, 1.01841212e-12 ] + - [ 1.66089422e-16, 6.45243543e-16, 1.1230411e-12 ] + - [ 4.30315035e-17, 3.81732813e-16, 1.43512479e-12 ] + - [ 1.66089422e-16, 2.56994506e-16, 2.25381733e-12 ] + - [ 4.30334093e-17, 1.22674325e-16, 1.88253794e-12 ] + - [ 1.66089422e-16, 2.56994506e-16, 1.88253794e-12 ] + - [ 1.66089422e-16, 1.8558378e-16, 3.11555683e-12 ] + - [ 4.30313182e-17, 8.90687035e-17, 2.29247912e-12 ] + - [ 1.66089422e-16, 3.77399299e-17, 2.9728793e-12 ] + - [ 4.30294653e-17, 1.06234038e-16, 2.29247912e-12 ] + - [ 1.66089422e-16, 1.06234038e-16, 1.88253794e-12 ] + - [ 1.66089422e-16, 7.12401423e-17, 2.84635551e-12 ] + - [ 4.30284594e-17, 1.72671398e-16, 1.88253794e-12 ] + - [ 1.66089422e-16, 1.72671398e-16, 2.50296006e-12 ] + - [ 4.30315829e-17, 1.17283242e-17, 3.38801077e-12 ] + - [ 4.30331181e-17, 5.32778229e-17, 2.65868965e-12 ] + - [ 1.66089422e-16, 5.32778229e-17, 2.29247912e-12 ] + - [ 1.66089422e-16, 3.77399299e-17, 3.22894357e-12 ] + - [ 4.30325622e-17, 6.08598064e-17, 2.29247912e-12 ] + - [ 1.66089422e-16, 6.08598064e-17, 3.11555683e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.47205118e-12, 4.30326681e-17 ] + - [ 1.17283242e-17, 2.9761666e-12, 1.66089422e-16 ] + - [ 3.27724258e-17, 2.9761666e-12, 1.66089422e-16 ] + - [ 1.36392504e-17, 3.71013025e-12, 4.30300476e-17 ] + - [ 2.61055098e-18, 3.74642066e-12, 4.30298094e-17 ] + - [ 1.27065414e-17, 2.9761666e-12, 1.66089422e-16 ] + - [ 2.08221087e-18, 3.74642066e-12, 4.30298094e-17 ] + - [ 2.08221087e-18, 4.14114311e-12, 4.30298358e-17 ] + - [ 4.3387484e-18, 3.01492379e-12, 1.66089422e-16 ] + - [ 4.06979115e-19, 4.14114311e-12, 4.30298358e-17 ] + - [ 4.06979115e-19, 4.49029091e-12, 4.30326151e-17 ] + - [ 8.26629111e-20, 4.91302914e-12, 4.30314769e-17 ] + - [ 5.23195419e-20, 3.47198353e-12, 1.66089421e-16 ] + - [ 2.57652335e-19, 4.7935171e-12, 4.30326151e-17 ] + - [ 5.23195419e-20, 4.7935171e-12, 4.30326151e-17 ] + - [ 4.06979115e-19, 3.27152409e-12, 1.66089422e-16 ] + - [ 4.21874156e-19, 4.52040223e-12, 4.3032774e-17 ] + - [ 4.06979115e-19, 4.52040224e-12, 4.3032774e-17 ] + - [ 1.40642562e-18, 5.10987515e-12, 4.3029174e-17 ] + - [ 5.23195419e-20, 5.14918399e-12, 4.30289887e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30289887e-17, 1.6928439e-21 ] + - [ 5.31524906e-12, 4.30307622e-17, 6.8988047e-24 ] + - [ 5.46890393e-12, 4.3033065e-17, 1.6928439e-21 ] + - [ 3.61472005e-12, 1.66089421e-16, 3.38740203e-22 ] + - [ 5.33427551e-12, 4.30311328e-17, 1.6928439e-21 ] + - [ 5.33427551e-12, 4.30311328e-17, 6.00105072e-21 ] + - [ 5.58793718e-12, 4.3032242e-17, 3.3965547e-31 ] + - [ 3.81842209e-12, 1.6608947e-16, -2.53067008e-68 ] + - [ 5.58721554e-12, 4.30314502e-17, 2.36744611e-24 ] + - [ 3.81842209e-12, 1.6608947e-16, 2.36744611e-24 ] + - [ 3.76151623e-12, 1.66089421e-16, 6.8988047e-24 ] + - [ 5.55327741e-12, 4.3031768e-17, 2.57378586e-23 ] + - [ 3.76151623e-12, 1.66089421e-16, 2.57378586e-23 ] + - [ 5.46890393e-12, 4.3033065e-17, -2.5076262e-15 ] + - [ 5.04765835e-14, 4.30303256e-17, -6.7527679e-16 ] + - [ 4.95574497e-12, 4.30309608e-17, -1.85779517e-19 ] + - [ 3.47198353e-12, 1.66089474e-16, 1.07486042e-137 ] + - [ 3.81842209e-12, 1.6608947e-16, -6.54960145e-25 ] + - [ 5.56202042e-12, 4.30314636e-17, -2.53067008e-68 ] + - [ 3.76152317e-12, 1.66089474e-16, -6.54960145e-25 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.11725625e-21, 3.76152316e-12 ] + - [ 1.66089474e-16, -6.89804109e-24, 5.41769142e-12 ] + - [ 4.30326283e-17, -1.59202707e-22, 3.76152316e-12 ] + - [ 1.66089474e-16, -1.59202707e-22, 5.51827763e-12 ] + - [ 4.30327342e-17, -1.85779517e-19, 5.02998073e-12 ] + - [ 4.30300078e-17, -5.23192834e-20, 3.47198353e-12 ] + - [ 1.66089474e-16, -1.48876612e-19, 5.18162678e-12 ] + - [ 4.30290285e-17, -5.23192834e-20, 5.18162678e-12 ] + - [ 4.30290285e-17, -1.6928342e-21, 3.61472178e-12 ] + - [ 1.66089474e-16, -3.61071896e-20, 5.35813143e-12 ] + - [ 4.30316225e-17, -1.6928342e-21, 5.35813143e-12 ] + - [ 4.30316225e-17, -1.11725625e-21, 4.95574497e-12 ] + - [ 4.30309608e-17, -5.23192834e-20, 4.83981687e-12 ] + - [ 4.30322578e-17, -3.59966305e-19, 3.47198353e-12 ] + - [ 1.66089474e-16, -4.06961124e-19, 4.83981687e-12 ] + - [ 4.30322578e-17, -4.06961124e-19, 4.54096565e-12 ] + - [ 4.30328931e-17, -1.1070398e-17, 3.94212176e-12 ] + - [ 4.3029055e-17, -2.08215793e-18, 3.01492553e-12 ] + - [ 1.66089475e-16, -7.46926385e-18, 4.19700121e-12 ] + - [ 4.30302726e-17, -2.08215793e-18, 4.19700121e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.42556143e-12, 4.30322049e-17 ] + - [ -4.06961124e-19, 4.42556143e-12, 4.30322049e-17 ] + - [ -1.18080549e-18, 3.80901642e-12, 4.3029452e-17 ] + - [ -2.08215793e-18, 3.62635484e-12, 4.3030749e-17 ] + - [ -1.81988105e-17, 3.01492553e-12, 1.66089475e-16 ] + - [ -9.74079446e-18, 3.62635484e-12, 4.3030749e-17 ] + - [ -9.74079446e-18, 3.50786455e-12, 4.30323372e-17 ] + - [ -3.40786829e-17, 3.03215306e-12, 4.30302197e-17 ] + - [ -6.71040804e-17, 3.12464852e-12, 4.30314373e-17 ] + - [ -6.19229387e-17, 2.34457807e-12, 1.66089475e-16 ] + - [ -3.40786829e-17, 3.15889196e-12, 4.30318608e-17 ] + - [ -4.99353515e-17, 2.34457807e-12, 1.66089475e-16 ] + - [ -4.99353515e-17, 2.70448982e-12, 1.66089475e-16 ] + - [ -9.74079446e-18, 3.27078683e-12, 4.30328931e-17 ] + - [ -3.56588494e-17, 2.70448982e-12, 1.66089475e-16 ] + - [ -3.56588494e-17, 3.50786455e-12, 4.30323372e-17 ] + - [ -8.06776246e-17, 2.34457807e-12, 1.66089475e-16 ] + - [ -1.00444568e-16, 2.88984329e-12, 4.30286844e-17 ] + - [ -3.40786829e-17, 1.94021923e-12, 1.66089475e-16 ] + - [ -1.00444568e-16, 1.94021923e-12, 1.66089475e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.66089475e-16, -6.46375204e-17 ] + - [ 2.30110069e-12, 4.30332902e-17, -1.78193735e-16 ] + - [ 1.94021923e-12, 1.66089475e-16, -1.78193735e-16 ] + - [ 2.60372494e-12, 4.30303255e-17, -4.0421942e-16 ] + - [ 1.9823973e-12, 4.30319402e-17, -1.11060444e-16 ] + - [ 1.49744213e-12, 1.66089475e-16, -3.62890565e-16 ] + - [ 2.05432067e-12, 4.30326549e-17, -1.11060444e-16 ] + - [ 2.05432067e-12, 4.30326549e-17, -2.37349271e-16 ] + - [ 1.86806167e-12, 4.30305373e-17, -1.11060444e-16 ] + - [ 1.64791378e-12, 4.30279962e-17, -5.13443099e-16 ] + - [ 1.49744213e-12, 1.66089475e-16, -1.84946281e-16 ] + - [ 1.64791378e-12, 4.30279962e-17, -1.84946281e-16 ] + - [ 1.49469693e-12, 4.30276521e-17, -6.09861706e-16 ] + - [ 1.067255e-12, 1.66089475e-16, -8.13693832e-16 ] + - [ 1.13636031e-12, 4.30313579e-17, -1.84946281e-16 ] + - [ 7.39866604e-13, 1.66089475e-16, -8.13693832e-16 ] + - [ 7.39866604e-13, 1.66089475e-16, -9.27942585e-16 ] + - [ 9.50942655e-13, 4.30329725e-17, -2.85967691e-16 ] + - [ 8.38928856e-13, 4.30333961e-17, -1.09993771e-15 ] + - [ 7.39866604e-13, 1.66089475e-16, -3.99319334e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.02988776e-15, 3.82077667e-13 ] + - [ 4.30305109e-17, -5.31142699e-16, 3.29313451e-13 ] + - [ 1.66089475e-16, -1.92938899e-15, 4.57438443e-13 ] + - [ 4.30285786e-17, -5.31142699e-16, 4.57438443e-13 ] + - [ 4.30285786e-17, -3.99319334e-16, 4.78586891e-13 ] + - [ 1.66089475e-16, -1.6819891e-15, 6.28407151e-13 ] + - [ 4.30304844e-17, -3.99319334e-16, 6.28407151e-13 ] + - [ 4.30304844e-17, -1.41417084e-15, 2.07059872e-13 ] + - [ 1.66089475e-16, -2.50175287e-15, 3.13232564e-13 ] + - [ 4.30325755e-17, -6.53818057e-16, 3.13232564e-13 ] + - [ 4.30325755e-17, -5.31142699e-16, 3.29313451e-13 ] + - [ 1.66089475e-16, -2.1957114e-15, 3.34657266e-13 ] + - [ 4.30320461e-17, -5.31142699e-16, 3.34657267e-13 ] + - [ 4.30320461e-17, -2.02988776e-15, 2.19399936e-13 ] + - [ 4.30326814e-17, -6.53818057e-16, 1.74269262e-13 ] + - [ 4.30301668e-17, -2.68810351e-15, 2.07059872e-13 ] + - [ 1.66089475e-16, -7.19679951e-16, 1.74269262e-13 ] + - [ 4.30301668e-17, -7.19679951e-16, 1.6835147e-13 ] + - [ 4.30298491e-17, -7.26893707e-16, 1.17209762e-13 ] + - [ 4.30297962e-17, -7.19679951e-16, 1.3413058e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.4121931e-13, 4.3029055e-17 ] + - [ -2.70672299e-15, 5.04765835e-14, 4.30303256e-17 ] + - [ -2.6536191e-15, 5.36196856e-14, 1.66089475e-16 ] + - [ -6.7527679e-16, 5.48884732e-14, 4.30314638e-17 ] + - [ -2.72634027e-15, 5.36196856e-14, 1.66089475e-16 ] + - [ -2.72634027e-15, 8.70793366e-14, 1.66089475e-16 ] + - [ -7.26893707e-16, 6.42659882e-14, 4.30326284e-17 ] + - [ -2.81867872e-15, 8.70793366e-14, 1.66089475e-16 ] + - [ -2.81867872e-15, 1.17209761e-13, 4.30297962e-17 ] + - [ -2.5076262e-15, 5.36196856e-14, 1.66089475e-16 ] + - [ -2.41619916e-15, 4.20841811e-14, 4.30288433e-17 ] + - [ -6.7527679e-16, 3.56045281e-14, 1.66089475e-16 ] + - [ -2.41619916e-15, 3.56045281e-14, 1.66089475e-16 ] + - [ -2.08191591e-15, 2.95060264e-14, 4.30310932e-17 ] + - [ -5.6574103e-16, 2.42077847e-14, 4.30329461e-17 ] + - [ -1.76826449e-15, 3.56045281e-14, 1.66089475e-16 ] + - [ -4.22322843e-16, 2.42077847e-14, 4.30329461e-17 ] + - [ -4.22322843e-16, 2.27922233e-14, 4.30331314e-17 ] + - [ -1.0878912e-15, 1.25167836e-14, 4.30314373e-17 ] + - [ -3.24530348e-16, 1.56846004e-14, 1.66089792e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30317549e-17, -4.22322843e-16 ] + - [ 2.32855217e-14, 1.66089475e-16, -1.45278707e-15 ] + - [ 1.88970643e-14, 4.30325226e-17, -4.22322843e-16 ] + - [ 1.88970643e-14, 4.30325226e-17, -1.71446519e-15 ] + - [ 3.74641719e-12, -8.73919221e-17, -2.61055098e-18 ] + - [ 3.01492466e-12, -3.37508057e-16, -1.08787596e-15 ] + - [ 1.56846885e-14, -3.37505728e-16, -1.40707016e-15 ] + - [ 1.57972422e-14, -8.73950986e-17, -3.24530136e-16 ] + - [ 2.24197388e-14, -3.37508057e-16, -1.40707016e-15 ] + - [ 2.24197388e-14, -3.37508057e-16, -1.50574187e-15 ] + - [ 1.78747633e-14, -8.73966339e-17, -4.12450462e-16 ] + - [ 2.18564416e-14, -8.73984867e-17, -1.67737701e-15 ] + - [ 2.24197388e-14, -3.37508057e-16, -5.51454125e-16 ] + - [ 2.18564416e-14, -8.73984867e-17, -5.51454125e-16 ] + - [ 2.42077915e-14, -8.73981691e-17, -2.62106085e-15 ] + - [ 4.63986688e-14, -8.73910223e-17, -6.66775543e-16 ] + - [ 5.1771785e-14, -3.37508057e-16, -2.5076262e-15 ] + - [ 4.0092705e-14, -8.73900694e-17, -6.66775543e-16 ] + - [ 4.0092705e-14, -8.73900694e-17, -5.51454125e-16 ] + - [ 3.38028416e-14, -3.37508057e-16, -2.37003417e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.76826449e-15, 5.27506027e-14 ] + - [ -8.73940928e-17, -6.66775543e-16, 5.99773452e-14 ] + - [ -8.73967927e-17, -2.70113088e-15, 5.1771785e-14 ] + - [ -3.37508057e-16, -7.24326774e-16, 5.99773452e-14 ] + - [ -8.73967927e-17, -7.24326774e-16, 8.58362717e-14 ] + - [ -8.73980632e-17, -2.72902198e-15, 1.32793162e-13 ] + - [ -8.73905988e-17, -7.23104505e-16, 1.26669046e-13 ] + - [ -3.37508057e-16, -2.79050979e-15, 1.11569919e-13 ] + - [ -8.73927163e-17, -7.23104505e-16, 1.11569919e-13 ] + - [ -8.73927163e-17, -7.24326774e-16, 8.33383784e-14 ] + - [ -3.37508057e-16, -2.81946646e-15, 8.98715638e-14 ] + - [ -8.73975338e-17, -7.24326774e-16, 8.98715638e-14 ] + - [ -8.73975338e-17, -2.81073355e-15, 1.6062409e-13 ] + - [ -8.7391234e-17, -7.23104505e-16, 1.74269316e-13 ] + - [ -8.73926105e-17, -2.68810351e-15, 1.26669046e-13 ] + - [ -3.37508057e-16, -6.63137961e-16, 1.74269316e-13 ] + - [ -8.73926105e-17, -6.63137961e-16, 2.11451921e-13 ] + - [ -8.73969515e-17, -2.54029965e-15, 1.99713698e-13 ] + - [ -3.37508057e-16, -2.25344686e-15, 2.96403036e-13 ] + - [ -8.73980103e-17, -6.63137961e-16, 3.15050229e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.40824967e-13, -8.73959986e-17 ] + - [ -5.46108501e-16, 4.40751762e-13, -8.73898047e-17 ] + - [ -1.71982183e-15, 3.15050229e-13, -3.37508057e-16 ] + - [ -4.09459801e-16, 4.40751762e-13, -8.73898047e-17 ] + - [ -4.09459801e-16, 5.9356111e-13, -8.73919222e-17 ] + - [ -8.43342526e-16, 8.99812229e-13, -8.73987514e-17 ] + - [ -2.98550366e-16, 7.14032885e-13, -3.37508057e-16 ] + - [ -9.86725824e-16, 8.10704254e-13, -8.73988044e-17 ] + - [ -2.98550366e-16, 8.10704254e-13, -8.73988044e-17 ] + - [ -4.09459801e-16, 4.53010402e-13, -3.37508057e-16 ] + - [ -1.15042765e-15, 6.21390412e-13, -8.7392981e-17 ] + - [ -4.09459801e-16, 6.21390412e-13, -8.7392981e-17 ] + - [ -1.49848619e-15, 1.07962314e-12, -8.73961574e-17 ] + - [ -2.98550366e-16, 1.1346e-12, -8.73950457e-17 ] + - [ -8.14624298e-16, 7.14032885e-13, -3.37508057e-16 ] + - [ -1.92459464e-16, 1.1346e-12, -8.73950457e-17 ] + - [ -1.92459464e-16, 1.43606111e-12, -8.73883223e-17 ] + - [ -6.45244813e-16, 1.01841256e-12, -3.37508057e-16 ] + - [ -5.50386017e-16, 1.59029624e-12, -8.73875282e-17 ] + - [ -1.92459464e-16, 1.43512523e-12, -3.37508057e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.73940398e-17, -1.8558378e-16 ] + - [ 1.88253881e-12, -3.37508057e-16, -7.12401952e-17 ] + - [ 2.50296092e-12, -8.73954691e-17, -2.56995353e-16 ] + - [ 1.88253881e-12, -3.37508057e-16, -2.56995353e-16 ] + - [ 1.43512523e-12, -3.37508057e-16, -1.22674325e-16 ] + - [ 2.25381647e-12, -8.7399122e-17, -3.8173366e-16 ] + - [ 1.43512523e-12, -3.37508057e-16, -3.8173366e-16 ] + - [ 1.86806254e-12, -8.73933516e-17, -1.72671927e-16 ] + - [ 1.88253881e-12, -3.37508057e-16, -1.06234303e-16 ] + - [ 2.84635464e-12, -8.73892223e-17, -7.12401952e-17 ] + - [ 2.29247999e-12, -3.37508057e-16, -1.06234303e-16 ] + - [ 2.29247998e-12, -3.37508057e-16, -8.90687564e-17 ] + - [ 2.65869052e-12, -3.37508057e-16, -5.32779552e-17 ] + - [ 2.29247998e-12, -3.37508057e-16, -3.77399564e-17 ] + - [ 3.2289427e-12, -8.73974279e-17, -6.84656329e-17 ] + - [ 2.29247998e-12, -3.37508057e-16, -6.84656329e-17 ] + - [ 2.97288017e-12, -8.7391234e-17, -1.27066141e-17 ] + - [ 3.6263557e-12, -8.7393775e-17, -2.61055098e-18 ] + - [ 2.97616573e-12, -3.37508057e-16, -1.81988105e-17 ] + - [ 3.47205032e-12, -8.73976396e-17, -2.61055098e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.27725581e-17, 3.38801164e-12 ] + - [ -8.73985396e-17, -1.17283242e-17, 3.38801164e-12 ] + - [ -8.73985396e-17, -5.32779552e-17, 3.27152495e-12 ] + - [ -3.37508057e-16, -1.68619547e-18, 3.01492466e-12 ] + - [ -3.37508057e-16, -2.08221087e-18, 4.42556317e-12 ] + - [ -8.73966337e-17, -4.3387881e-18, 3.01492466e-12 ] + - [ -3.37508057e-16, -4.3387881e-18, 3.74641893e-12 ] + - [ -8.73919221e-17, -1.48876612e-19, 4.91303087e-12 ] + - [ -8.73952573e-17, -5.23195419e-20, 3.4719844e-12 ] + - [ -3.37508057e-16, -2.57654816e-19, 4.79351536e-12 ] + - [ -8.73975337e-17, -5.23195419e-20, 4.79351537e-12 ] + - [ -8.73975337e-17, -4.06979115e-19, 3.27152496e-12 ] + - [ -3.37508057e-16, -4.21876638e-19, 4.49029264e-12 ] + - [ -8.73975337e-17, -4.06979115e-19, 4.49029264e-12 ] + - [ -8.73975337e-17, -1.68619547e-18, 5.02998246e-12 ] + - [ -8.73922926e-17, -5.23195419e-20, 5.14918572e-12 ] + - [ -8.73902809e-17, -5.10683795e-20, 3.4719844e-12 ] + - [ -3.37508057e-16, -1.69284309e-21, 5.14918572e-12 ] + - [ -8.73902809e-17, -1.69284309e-21, 5.33427725e-12 ] + - [ -8.7394569e-17, -4.59852075e-21, 3.61472091e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.76151796e-12, -3.37508056e-16 ] + - [ -1.11725625e-21, 3.76151796e-12, -3.37508056e-16 ] + - [ -3.387503e-22, 3.81842383e-12, -3.37507942e-16 ] + - [ 4.2994417e-137, 5.58721727e-12, -8.73952038e-17 ] + - [ -3.39732771e-31, 5.58208596e-12, -8.73940393e-17 ] + - [ 2.53072491e-68, 3.81842383e-12, -3.37507942e-16 ] + - [ -1.50513061e-27, 5.55327914e-12, -8.73958394e-17 ] + - [ 2.53072491e-68, 5.55327915e-12, -8.73958394e-17 ] + - [ -6.8988047e-24, 3.76151796e-12, -3.37508056e-16 ] + - [ -2.36752657e-24, 5.51827936e-12, -8.73977453e-17 ] + - [ -6.8988047e-24, 5.51827937e-12, -8.73977453e-17 ] + - [ -3.387503e-22, 5.58793892e-12, -8.7396761e-17 ] + - [ 2.53072491e-68, 5.56202215e-12, -8.73951247e-17 ] + - [ 6.54960145e-25, 3.81842383e-12, -3.37507942e-16 ] + - [ 6.89804109e-24, 5.56202215e-12, -8.73951247e-17 ] + - [ 6.89804109e-24, 5.51827937e-12, -8.73977188e-17 ] + - [ 1.6928342e-21, 5.46787871e-12, -8.7398407e-17 ] + - [ 6.89804109e-24, 3.7615249e-12, -3.3750795e-16 ] + - [ 3.52913951e-22, 5.48510798e-12, -8.7398407e-17 ] + - [ 6.89804109e-24, 5.48510798e-12, -8.7398407e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.37507951e-16, 5.23192834e-20 ] + - [ 5.10987689e-12, -8.7390625e-17, 3.61071896e-20 ] + - [ 3.4719844e-12, -3.37507951e-16, 3.61071896e-20 ] + - [ 3.61472265e-12, -3.3750795e-16, 1.6928342e-21 ] + - [ 5.18162852e-12, -8.73903074e-17, 3.07458226e-21 ] + - [ 3.61472265e-12, -3.3750795e-16, 3.07458226e-21 ] + - [ 5.46787871e-12, -8.7398407e-17, 4.06961124e-19 ] + - [ 4.83981861e-12, -8.7396766e-17, 5.23192834e-20 ] + - [ 3.4719844e-12, -3.37507951e-16, 3.59966305e-19 ] + - [ 4.9557467e-12, -8.7394172e-17, 5.23192834e-20 ] + - [ 4.95574671e-12, -8.7394172e-17, 1.85779517e-19 ] + - [ 3.71013198e-12, -8.73923721e-17, 1.1070398e-17 ] + - [ 2.97615706e-12, -3.37507951e-16, 2.61065851e-18 ] + - [ 3.80901816e-12, -8.73911545e-17, 3.49274115e-18 ] + - [ 2.97615706e-12, -3.37507951e-16, 3.49274115e-18 ] + - [ 3.01492639e-12, -3.37507951e-16, 2.08215793e-18 ] + - [ 4.19700294e-12, -8.73927956e-17, 1.27308741e-18 ] + - [ 3.01492639e-12, -3.37507951e-16, 1.27308741e-18 ] + - [ 3.27153189e-12, -3.37507951e-16, 4.06961124e-19 ] + - [ 4.52040397e-12, -8.73978249e-17, 1.18080549e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.36392504e-17, 2.97615706e-12 ] + - [ -3.37507951e-16, 2.95098137e-17, 3.50786542e-12 ] + - [ -8.73969249e-17, 2.61065851e-18, 2.65867664e-12 ] + - [ -3.37507951e-16, 2.95098137e-17, 2.65867664e-12 ] + - [ -3.37507951e-16, 4.01715762e-17, 2.29246784e-12 ] + - [ -3.37507951e-16, 6.19229387e-17, 2.65867664e-12 ] + - [ -3.37507951e-16, 1.1729019e-17, 3.15889283e-12 ] + - [ -8.73959721e-17, 4.99353515e-17, 2.65867664e-12 ] + - [ -3.37507951e-16, 4.99353515e-17, 3.38799602e-12 ] + - [ -8.73985131e-17, 1.71564325e-16, 2.60372581e-12 ] + - [ -8.73928486e-17, 7.12420481e-17, 1.88251973e-12 ] + - [ -3.37507951e-16, 1.62154636e-16, 2.88984416e-12 ] + - [ -8.73896193e-17, 7.12420481e-17, 2.88984416e-12 ] + - [ -8.73896193e-17, 3.77406181e-17, 2.29246784e-12 ] + - [ -3.37507951e-16, 1.00444568e-16, 2.97286629e-12 ] + - [ -8.73912075e-17, 3.77406181e-17, 2.97286629e-12 ] + - [ -8.73912075e-17, 6.19229387e-17, 2.56376298e-12 ] + - [ -8.73939074e-17, 7.12420481e-17, 2.30110156e-12 ] + - [ -8.73988308e-17, 2.37349271e-16, 1.88251972e-12 ] + - [ -3.37507951e-16, 1.22675595e-16, 2.30110156e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.64791422e-12, -8.738819e-17 ] + - [ 1.22675595e-16, 1.43511569e-12, -3.37507951e-16 ] + - [ 5.13443099e-16, 1.87869639e-12, -8.73935898e-17 ] + - [ 1.22675595e-16, 1.87869639e-12, -8.73935898e-17 ] + - [ 3.62890565e-16, 7.14027681e-13, -3.37507951e-16 ] + - [ 8.13693832e-16, 1.0184247e-12, -3.37507951e-16 ] + - [ 1.92457664e-16, 1.13636074e-12, -8.73949662e-17 ] + - [ 6.09861706e-16, 1.0184247e-12, -3.37507951e-16 ] + - [ 6.09861706e-16, 1.64791422e-12, -8.738819e-17 ] + - [ 1.47458631e-15, 6.50359426e-13, -8.73941192e-17 ] + - [ 4.09461918e-16, 4.53008017e-13, -3.37507951e-16 ] + - [ 1.41417084e-15, 8.38929072e-13, -8.73990426e-17 ] + - [ 4.09461918e-16, 8.38929073e-13, -8.73990426e-17 ] + - [ 2.98553754e-16, 7.14027681e-13, -3.37507951e-16 ] + - [ 1.09993771e-15, 8.99803989e-13, -8.7398725e-17 ] + - [ 2.98553754e-16, 8.99803989e-13, -8.7398725e-17 ] + - [ 8.13693832e-16, 6.09983304e-13, -8.7392531e-17 ] + - [ 4.09461918e-16, 4.5743866e-13, -8.73893547e-17 ] + - [ 1.6819891e-15, 4.53008017e-13, -3.37507951e-16 ] + - [ 5.46106807e-16, 4.5743866e-13, -8.73893547e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.73974015e-17, 5.46106807e-16 ] + - [ 3.1505088e-13, -3.37507951e-16, 2.1957114e-15 ] + - [ 3.18669079e-13, -8.73971368e-17, 5.46106807e-16 ] + - [ 3.18669079e-13, -8.73971368e-17, 2.02988776e-15 ] + - [ 1.32793379e-13, -8.73905723e-17, 2.72288946e-15 ] + - [ 1.26670347e-13, -3.37507951e-16, 7.23103235e-16 ] + - [ 1.62829791e-13, -8.73914193e-17, 2.70672299e-15 ] + - [ 1.26670347e-13, -3.37507951e-16, 2.70672299e-15 ] + - [ 1.99716083e-13, -3.37507951e-16, 6.63134573e-16 ] + - [ 1.68351524e-13, -8.73919487e-17, 2.50175287e-15 ] + - [ 1.99716083e-13, -3.37507951e-16, 2.50175287e-15 ] + - [ 3.13232673e-13, -8.73974015e-17, 2.79050979e-15 ] + - [ 1.26670347e-13, -3.37507951e-16, 2.81212607e-15 ] + - [ 1.17209816e-13, -8.73918428e-17, 7.23103235e-16 ] + - [ 8.33387036e-14, -3.37507951e-16, 2.81212607e-15 ] + - [ 8.33387036e-14, -3.37507951e-16, 2.81867872e-15 ] + - [ 4.83648152e-14, -8.73918428e-17, 2.6536191e-15 ] + - [ 5.17718392e-14, -3.37507951e-16, 6.6677512e-16 ] + - [ 5.48884868e-14, -8.7395178e-17, 2.72634027e-15 ] + - [ 5.17718392e-14, -3.37507951e-16, 2.72634027e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.80225306e-15, 8.33387036e-14 ] + - [ -3.37507951e-16, 2.80225306e-15, 8.98558429e-14 ] + - [ -8.73975074e-17, 2.54541911e-15, 5.17718392e-14 ] + - [ -3.37507951e-16, 2.41619916e-15, 4.20841947e-14 ] + - [ -8.7389937e-17, 6.6677512e-16, 3.38027603e-14 ] + - [ -3.37507951e-16, 2.41619916e-15, 3.38027603e-14 ] + - [ -3.37507951e-16, 2.08191591e-15, 2.950604e-14 ] + - [ -8.73944369e-17, 5.51453278e-16, 2.279223e-14 ] + - [ -8.73984603e-17, 1.71446519e-15, 3.38027603e-14 ] + - [ -3.37507951e-16, 4.12452156e-16, 2.279223e-14 ] + - [ -8.73984603e-17, 4.12452156e-16, 1.78748717e-14 ] + - [ -8.73966074e-17, 5.96493408e-16, 1.20265108e-14 ] + - [ -8.73968721e-17, 1.14426209e-15, 1.2516787e-14 ] + - [ -8.73951251e-17, 1.45278707e-15, 1.34870599e-14 ] + - [ -1.71773648e-16, 5.96493408e-16, 1.67431815e-14 ] + - [ -8.73957604e-17, 1.50574611e-15, 1.34870599e-14 ] + - [ -1.71773648e-16, 1.50574611e-15, 1.42016575e-14 ] + - [ -2.27183181e-16, 4.24512e-16, 1.78748717e-14 ] + - [ -8.73966074e-17, 4.12452156e-16, 1.42016575e-14 ] + - [ -2.27183181e-16, 4.12452156e-16, 1.56842684e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.31362456e-18, 1.08787595e-15 ] + - [ 3.37505622e-16, 7.18815087e-19, 1.40707016e-15 ] + - [ 8.7395072e-17, 7.32554558e-19, 3.24530136e-16 ] + - [ 3.37507951e-16, 7.18815087e-19, 1.40707016e-15 ] + - [ 3.37507951e-16, 4.65198203e-19, 1.50574611e-15 ] + - [ 8.73966072e-17, 1.94444544e-19, 4.12449403e-16 ] + - [ 8.73984601e-17, 2.11632116e-19, 1.677377e-15 ] + - [ 3.37507951e-16, 1.14751163e-20, 5.51452007e-16 ] + - [ 8.73984601e-17, 1.14751163e-20, 5.51452007e-16 ] + - [ 8.73981425e-17, 1.82118699e-22, 2.62106085e-15 ] + - [ 8.73909955e-17, 2.69160096e-22, 6.66775966e-16 ] + - [ 3.3750795e-16, 9.72344539e-22, 2.50762619e-15 ] + - [ 8.73900426e-17, 2.69160096e-22, 6.66775966e-16 ] + - [ 8.73900426e-17, 1.14751163e-20, 5.51452007e-16 ] + - [ 3.37507951e-16, 3.25754103e-21, 2.37003416e-15 ] + - [ 8.73953896e-17, 1.14751163e-20, 5.51452007e-16 ] + - [ 8.73953896e-17, 1.39874612e-19, 1.76826449e-15 ] + - [ 8.7394066e-17, 2.69160096e-22, 6.66775966e-16 ] + - [ 8.73967659e-17, 2.03008651e-23, 2.70113087e-15 ] + - [ 3.3750795e-16, 2.47733785e-26, 7.24326773e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.72902197e-15, 8.73905983e-17 ] + - [ -4.71100149e-26, 7.23103657e-16, 3.37508056e-16 ] + - [ -1.59832808e-25, 2.79050979e-15, 8.73927158e-17 ] + - [ -4.71100149e-26, 7.23103657e-16, 8.73927158e-17 ] + - [ 2.47733785e-26, 7.24326773e-16, 3.3750795e-16 ] + - [ -3.94307624e-28, 2.81946646e-15, 8.73975068e-17 ] + - [ 2.47733785e-26, 7.24326773e-16, 8.73975068e-17 ] + - [ 9.76136014e-27, 2.81073355e-15, 8.73912337e-17 ] + - [ -4.71100149e-26, 7.23103657e-16, 8.73926101e-17 ] + - [ -2.93871321e-23, 2.6881035e-15, 3.37508056e-16 ] + - [ -3.58166022e-22, 6.63135842e-16, 8.73926101e-17 ] + - [ -3.58166022e-22, 6.63135842e-16, 8.73969512e-17 ] + - [ -7.07950378e-22, 2.54029964e-15, 3.37508056e-16 ] + - [ -8.27211785e-21, 2.25344685e-15, 8.73980101e-17 ] + - [ -3.58166022e-22, 6.63135842e-16, 3.37508056e-16 ] + - [ -8.27211785e-21, 2.25344685e-15, 3.37508056e-16 ] + - [ -2.41737361e-20, 2.09482638e-15, 8.73959984e-17 ] + - [ -1.27179035e-20, 5.46107653e-16, 8.73898045e-17 ] + - [ -1.78869974e-19, 1.71982183e-15, 3.37508056e-16 ] + - [ -2.02249407e-19, 4.09460859e-16, 8.73898045e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.73987513e-17, -1.02058887e-18 ] + - [ 2.98553541e-16, 3.37508057e-16, -3.1411559e-18 ] + - [ 9.86741915e-16, 8.73988043e-17, -1.02058887e-18 ] + - [ 2.98553541e-16, 8.73988043e-17, -2.02249407e-19 ] + - [ 4.09460859e-16, 3.37508057e-16, -1.78160847e-18 ] + - [ 1.15042764e-15, 8.73929809e-17, -2.02249407e-19 ] + - [ 4.09460859e-16, 8.73929809e-17, -4.84416917e-19 ] + - [ 1.49849127e-15, 8.73961573e-17, -1.02058887e-18 ] + - [ 2.98553541e-16, 8.73950456e-17, -6.54344942e-18 ] + - [ 8.14624296e-16, 3.37508057e-16, -4.77068887e-18 ] + - [ 1.92458087e-16, 8.73950456e-17, -4.77068887e-18 ] + - [ 1.92458087e-16, 8.73883223e-17, -1.68179482e-17 ] + - [ 6.45245236e-16, 3.37508057e-16, -2.62317135e-17 ] + - [ 5.50386016e-16, 8.73875282e-17, -4.77068887e-18 ] + - [ 1.92458087e-16, 3.37508057e-16, -2.62317135e-17 ] + - [ 5.50386016e-16, 3.37508057e-16, -4.3185187e-17 ] + - [ 4.04219419e-16, 8.73940398e-17, -1.08360196e-16 ] + - [ 1.85586214e-16, 3.37508057e-16, -4.40673718e-17 ] + - [ 7.12424185e-17, 8.73954691e-17, -7.79483254e-17 ] + - [ 2.56995352e-16, 3.37508057e-16, -7.79483254e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.70207639e-17, 3.81733659e-16 ] + - [ 3.37508057e-16, -4.70207639e-17, 3.81733659e-16 ] + - [ 8.73933515e-17, -1.19385719e-16, 1.72671927e-16 ] + - [ 3.37508057e-16, -1.89536988e-16, 1.06234302e-16 ] + - [ 8.73892223e-17, -4.40673718e-17, 7.12424185e-17 ] + - [ 3.37508057e-16, -1.89536988e-16, 1.06234302e-16 ] + - [ 3.37508057e-16, -2.20422774e-16, 8.90711915e-17 ] + - [ 3.37508057e-16, -3.43839946e-16, 5.32779551e-17 ] + - [ 3.37508057e-16, -8.26662989e-17, 3.77408298e-17 ] + - [ 8.73974279e-17, -2.88475331e-16, 6.84656327e-17 ] + - [ 3.37508057e-16, -2.88475331e-16, 6.84656327e-17 ] + - [ 8.7391234e-17, -6.95989285e-16, 1.27066141e-17 ] + - [ 8.73937751e-17, -2.21226608e-16, 2.61067836e-18 ] + - [ 3.37508057e-16, -6.31691014e-16, 1.81988104e-17 ] + - [ 8.73976397e-17, -2.21226608e-16, 2.61067836e-18 ] + - [ 8.73976397e-17, -1.43716317e-16, 1.1729105e-17 ] + - [ 3.37508057e-16, -4.81000465e-16, 3.2772558e-17 ] + - [ 8.73985397e-17, -1.43716317e-16, 1.1729105e-17 ] + - [ 8.73985397e-17, -3.43839946e-16, 5.32779551e-17 ] + - [ 3.37508057e-16, -1.16702695e-15, 1.68619547e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.33878809e-18, 3.37508057e-16 ] + - [ -8.8927468e-16, 4.33878809e-18, 8.73919222e-17 ] + - [ -1.75728016e-15, 1.48876715e-19, 8.73952574e-17 ] + - [ -4.80936089e-16, 5.23190506e-20, 3.37508057e-16 ] + - [ -1.64306963e-15, 2.57654816e-19, 8.73975338e-17 ] + - [ -4.8093609e-16, 5.23190506e-20, 8.73975338e-17 ] + - [ -3.64635452e-16, 4.06960089e-19, 3.37508057e-16 ] + - [ -1.52635526e-15, 4.21876637e-19, 8.73975338e-17 ] + - [ -3.64635452e-16, 4.06960089e-19, 8.73975338e-17 ] + - [ -1.16702695e-15, 1.68619547e-18, 8.73922928e-17 ] + - [ -4.80936089e-16, 5.23190506e-20, 8.73902811e-17 ] + - [ -1.97102235e-15, 5.10684052e-20, 3.37508057e-16 ] + - [ -6.20328913e-16, 1.69282855e-21, 8.73902811e-17 ] + - [ -6.20328913e-16, 1.69282855e-21, 8.73945692e-17 ] + - [ -2.33252923e-15, 4.59852397e-21, 3.37508057e-16 ] + - [ -2.49545094e-15, 1.11725624e-21, 8.73975338e-17 ] + - [ -6.20328913e-16, 1.69282855e-21, 3.37508057e-16 ] + - [ -2.49545093e-15, 1.11725624e-21, 3.37508057e-16 ] + - [ -2.59547536e-15, 3.38750703e-22, 8.73967927e-17 ] + - [ -2.82655257e-15, 3.39735027e-31, 3.37508057e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.37508057e-16, -2.76026725e-15 ] + - [ 2.36752814e-24, 3.37508057e-16, -7.03365246e-16 ] + - [ 6.8980032e-24, 8.73958398e-17, -2.69190837e-15 ] + - [ 2.57377828e-23, 3.37508057e-16, -2.69190837e-15 ] + - [ 2.57377828e-23, 8.73984338e-17, -7.49379176e-27 ] + - [ -2.81212607e-15, 8.73905983e-17, -4.71021386e-26 ] + - [ -7.23104504e-16, 8.73967927e-17, -7.31147889e-16 ] + - [ 2.53064354e-68, 8.73951516e-17, -2.77734434e-15 ] + - [ -6.54960143e-25, 3.37508057e-16, -7.03363536e-16 ] + - [ -6.89884255e-24, 8.73951516e-17, -7.03363763e-16 ] + - [ -6.89884255e-24, 8.73977456e-17, -6.2032743e-16 ] + - [ -1.69284793e-21, 8.73984338e-17, -7.03363764e-16 ] + - [ -6.89884255e-24, 3.37508057e-16, -2.59347043e-15 ] + - [ -3.5291395e-22, 8.73984338e-17, -7.03363764e-16 ] + - [ -6.89884255e-24, 8.73984338e-17, -2.69190922e-15 ] + - [ -2.57379595e-23, 8.73935104e-17, -1.89424813e-15 ] + - [ -8.26629109e-20, 3.37508057e-16, -4.80936301e-16 ] + - [ -5.23197486e-20, 8.73906517e-17, -2.03438804e-15 ] + - [ -3.61071895e-20, 3.37508057e-16, -2.03438804e-15 ] + - [ -3.61071895e-20, 3.37508057e-16, -6.2032743e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.37912367e-15, -3.07458225e-21 ] + - [ 8.73984338e-17, -3.64632169e-16, -4.06980148e-19 ] + - [ 8.73967927e-17, -4.80936301e-16, -5.23197486e-20 ] + - [ 3.37508057e-16, -1.57157369e-15, -3.59966304e-19 ] + - [ 8.73941986e-17, -4.80936301e-16, -5.23197486e-20 ] + - [ 8.73941986e-17, -1.71099871e-15, -1.85782929e-19 ] + - [ 8.73923987e-17, -7.26555528e-16, -1.10703979e-17 ] + - [ 3.37508057e-16, -2.21230049e-16, -2.61052947e-18 ] + - [ 8.73911811e-17, -9.43824026e-16, -3.49274114e-18 ] + - [ 3.37508057e-16, -9.43824025e-16, -3.49274114e-18 ] + - [ 3.37508057e-16, -2.39339056e-16, -2.08222244e-18 ] + - [ 8.73928222e-17, -1.25964534e-15, -1.27308741e-18 ] + - [ 3.37508057e-16, -1.25964534e-15, -1.27308741e-18 ] + - [ 3.37508057e-16, -3.64632169e-16, -4.06980148e-19 ] + - [ 8.73978515e-17, -1.2797268e-15, -1.18080548e-18 ] + - [ 3.37508057e-16, -1.2797268e-15, -1.18080548e-18 ] + - [ 8.73967927e-17, -6.78271261e-16, -1.36392503e-17 ] + - [ 3.37508057e-16, -5.15976361e-16, -2.95098136e-17 ] + - [ 8.73969515e-17, -2.21230049e-16, -2.61052947e-18 ] + - [ 3.37508057e-16, -5.15976361e-16, -2.95098136e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -6.19229385e-17, 3.37508057e-16 ] + - [ -1.43721029e-16, -1.17282381e-17, 8.73959985e-17 ] + - [ -3.64273028e-16, -4.99353514e-17, 3.37508057e-16 ] + - [ -3.64273028e-16, -4.99353514e-17, 8.73985397e-17 ] + - [ -1.20544937e-16, -1.71564325e-16, 8.73928751e-17 ] + - [ -4.40689732e-17, -7.12397715e-17, 3.37508057e-16 ] + - [ -1.30301486e-16, -1.62154636e-16, 8.73896458e-17 ] + - [ -4.40689732e-17, -7.12397715e-17, 8.73896458e-17 ] + - [ -8.26682312e-17, -3.77397445e-17, 3.37508057e-16 ] + - [ -2.00154599e-16, -1.00444568e-16, 8.7391234e-17 ] + - [ -8.26682312e-17, -3.77397445e-17, 8.7391234e-17 ] + - [ -3.09636014e-16, -6.19229385e-17, 8.73936162e-17 ] + - [ -5.01636929e-17, -3.62890564e-16, 3.37508057e-16 ] + - [ -1.67610448e-17, -1.22673689e-16, 8.73961573e-17 ] + - [ -8.37204579e-17, -2.3734927e-16, 3.37508057e-16 ] + - [ -8.37204579e-17, -2.3734927e-16, 3.37508057e-16 ] + - [ -4.40689732e-17, -7.12397715e-17, 8.73988573e-17 ] + - [ -1.08361917e-16, -1.85583038e-16, 3.37508057e-16 ] + - [ -1.08361917e-16, -1.85583038e-16, 8.73939339e-17 ] + - [ -4.38342392e-17, -4.00453087e-16, 3.37508057e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.37508057e-16, -2.97484519e-17 ] + - [ -5.13443097e-16, 3.37508057e-16, -2.03968278e-17 ] + - [ -6.09861705e-16, 8.73875811e-17, -4.77058464e-18 ] + - [ -1.92459251e-16, 8.73949926e-17, -6.5703179e-18 ] + - [ -8.13693831e-16, 3.37508057e-16, -1.02062899e-18 ] + - [ -2.98550153e-16, 8.73949926e-17, -1.02062899e-18 ] + - [ -2.98550153e-16, 8.73987513e-17, -3.14128908e-18 ] + - [ -9.86725821e-16, 3.37508057e-16, -2.21228584e-18 ] + - [ -1.0999377e-15, 8.7399069e-17, -1.02062899e-18 ] + - [ -2.98550153e-16, 3.37508057e-16, -2.21228584e-18 ] + - [ -1.0999377e-15, 3.37508057e-16, -7.01097085e-19 ] + - [ -1.41417083e-15, 3.37508056e-16, -2.08131126e-19 ] + - [ -1.6819891e-15, 3.37508057e-16, -2.02251526e-19 ] + - [ -4.094598e-16, 8.7389381e-17, -5.47074401e-19 ] + - [ -1.47458631e-15, 3.37508057e-16, -5.47074401e-19 ] + - [ -1.47458631e-15, 8.73941456e-17, -1.36089918e-20 ] + - [ -2.17644817e-15, 3.37508056e-16, -1.22846191e-20 ] + - [ -2.19571139e-15, 8.73974277e-17, -1.27177516e-20 ] + - [ -5.46109347e-16, 3.37508056e-16, -1.36089918e-20 ] + - [ -2.17644817e-15, 8.73949396e-17, -1.27177516e-20 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.27177516e-20, -5.46109347e-16 ] + - [ 8.73944102e-17, -2.08131126e-19, -1.6819891e-15 ] + - [ 8.73905983e-17, -9.92778759e-24, -2.72288945e-15 ] + - [ 3.37508056e-16, -4.71021386e-26, -7.23104504e-16 ] + - [ 8.73914454e-17, -1.6905715e-23, -2.70672298e-15 ] + - [ 3.37508056e-16, -1.6905715e-23, -2.70672298e-15 ] + - [ 3.37508056e-16, -3.58114424e-22, -6.63138383e-16 ] + - [ 8.73919748e-17, -1.04261006e-21, -2.50175287e-15 ] + - [ 3.37508056e-16, -1.04261006e-21, -2.50175287e-15 ] + - [ 8.73974277e-17, -7.49379488e-27, -2.81212607e-15 ] + - [ 3.37508056e-16, 6.03971144e-28, -2.81867872e-15 ] + - [ 8.73975068e-17, -4.71021386e-26, -7.23104504e-16 ] + - [ 3.3750795e-16, 6.03971144e-28, -2.81867872e-15 ] + - [ 3.3750795e-16, 4.93298325e-26, -2.79965266e-15 ] + - [ 8.73984069e-17, 2.47722013e-26, -7.24326773e-16 ] + - [ 8.7397507e-17, 8.77961001e-24, -2.72634027e-15 ] + - [ 3.3750795e-16, 2.69163428e-22, -6.66775543e-16 ] + - [ 8.7397507e-17, 2.69163428e-22, -6.66775543e-16 ] + - [ 8.73951777e-17, 1.14745508e-20, -5.51454548e-16 ] + - [ 8.73899368e-17, 2.69163428e-22, -6.66775543e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -6.66775543e-16, 8.73918426e-17 ] + - [ 8.02850243e-23, -2.6536191e-15, 3.37507951e-16 ] + - [ 1.83074171e-19, -1.71446519e-15, 3.37507951e-16 ] + - [ 1.14745508e-20, -5.51454548e-16, 8.73984601e-17 ] + - [ 2.57876753e-20, -2.08191591e-15, 3.37507951e-16 ] + - [ 2.57876753e-20, -2.08191591e-15, 8.73899368e-17 ] + - [ 7.3260605e-19, -3.24521877e-16, 8.73966072e-17 ] + - [ 1.94441701e-19, -4.12450462e-16, 3.37507951e-16 ] + - [ 4.65216608e-19, -1.50573933e-15, 8.73984601e-17 ] + - [ 1.94441701e-19, -4.12450462e-16, 8.73984601e-17 ] + - [ 1.83074171e-19, -1.71446519e-15, 1.18933403e-16 ] + - [ 2.31356584e-18, -1.08788188e-15, 8.7395125e-17 ] + - [ 7.32606049e-19, -3.24521877e-16, 1.7177386e-16 ] + - [ 4.65216608e-19, -1.50573933e-15, 8.73966072e-17 ] + - [ 1.31096608e-18, -5.96495101e-16, 1.18933403e-16 ] + - [ 4.65216608e-19, -1.50573933e-15, 1.18933403e-16 ] + - [ 6.03344189e-19, -1.45278707e-15, 8.73957602e-17 ] + - [ 1.6598874e-18, -7.88054143e-16, 8.7395125e-17 ] + - [ -2.82796305e-15, 1.76105215e-133, -1.66089475e-16 ] + - [ -2.77734428e-15, 6.54961918e-25, -4.3034746e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.30335019e-17, -7.02375912e-16 ] + - [ 8.10530433e-24, -1.66089475e-16, -2.62712051e-15 ] + - [ 1.59202959e-22, -4.30337666e-17, -7.02375911e-16 ] + - [ 8.10530433e-24, -4.30337666e-17, -2.7773435e-15 ] + - [ 6.54961918e-25, -4.30350372e-17, -1.75728016e-15 ] + - [ 1.48876767e-19, -1.66089475e-16, -4.73514387e-16 ] + - [ 6.21109623e-20, -4.30359372e-17, -2.03438719e-15 ] + - [ 3.61072283e-20, -1.66089475e-16, -2.03438719e-15 ] + - [ 3.61072283e-20, -1.66089475e-16, -6.1635294e-16 ] + - [ 1.99220915e-21, -4.3036943e-17, -2.37912282e-15 ] + - [ 3.07458629e-21, -1.66089475e-16, -2.37912282e-15 ] + - [ 3.07458629e-21, -4.30335019e-17, -1.6847843e-15 ] + - [ 2.0600279e-19, -1.66089475e-16, -1.57157327e-15 ] + - [ 3.59967855e-19, -4.30338196e-17, -4.73514387e-16 ] + - [ 6.21109623e-20, -1.66089475e-16, -1.57157327e-15 ] + - [ 3.59967855e-19, -1.66089475e-16, -1.27972299e-15 ] + - [ 1.18081169e-18, -4.30365195e-17, -7.80626511e-16 ] + - [ 8.0865821e-18, -1.66089475e-16, -2.34665022e-16 ] + - [ 2.21471941e-18, -4.3036943e-17, -9.43820214e-16 ] + - [ 3.49276926e-18, -1.66089475e-16, -9.43820213e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.16702695e-15, 1.68619588e-18 ] + - [ -1.66089475e-16, -1.16702695e-15, 1.68619588e-18 ] + - [ -4.30332902e-17, -7.26555316e-16, 1.10704476e-17 ] + - [ -1.66089475e-16, -6.31691014e-16, 1.8198817e-17 ] + - [ -4.30352489e-17, -2.34665022e-16, 2.21471941e-18 ] + - [ -1.66089475e-16, -6.31691014e-16, 1.8198817e-17 ] + - [ -1.66089475e-16, -5.15976149e-16, 2.95099062e-17 ] + - [ -4.30341637e-17, -3.09634215e-16, 6.19232826e-17 ] + - [ -1.66089475e-16, -8.85148496e-17, 3.43799486e-17 ] + - [ -4.30338196e-17, -3.64272075e-16, 4.99354705e-17 ] + - [ -1.66089475e-16, -3.64272075e-16, 4.99354705e-17 ] + - [ -1.66089475e-16, -1.53088736e-16, 1.00684738e-17 ] + - [ -4.30329725e-17, -4.38694931e-16, 3.71148327e-17 ] + - [ -1.66089475e-16, -4.3869493e-16, 3.71148327e-17 ] + - [ -4.30336608e-17, -1.13572108e-16, 1.78193787e-16 ] + - [ -4.3035196e-17, -4.74643974e-17, 6.48788982e-17 ] + - [ -1.66089475e-16, -1.30301009e-16, 1.62155324e-16 ] + - [ -4.30365195e-17, -4.74643974e-17, 6.48788982e-17 ] + - [ -4.30365195e-17, -8.85148496e-17, 3.43799486e-17 ] + - [ -1.66089475e-16, -2.00154122e-16, 1.00444912e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.71041067e-17, -4.30344813e-17 ] + - [ -4.74643974e-17, 6.48788982e-17, -4.30326814e-17 ] + - [ -8.37200079e-17, 2.37350434e-16, -1.66089475e-16 ] + - [ -2.04797775e-17, 1.11328795e-16, -4.30326814e-17 ] + - [ -2.04797775e-17, 1.11328795e-16, -4.3033449e-17 ] + - [ -4.77094033e-18, 1.92460893e-16, -4.30362283e-17 ] + - [ -2.04797775e-17, 1.11328795e-16, -1.66089475e-16 ] + - [ -2.97482269e-17, 5.1344585e-16, -4.30344284e-17 ] + - [ -2.04797775e-17, 1.11328795e-16, -4.30344284e-17 ] + - [ -5.01635738e-17, 3.6289194e-16, -1.66089475e-16 ] + - [ -6.5702633e-18, 8.13695736e-16, -1.66089475e-16 ] + - [ -4.77094033e-18, 1.92460893e-16, -4.30337401e-17 ] + - [ -2.03966095e-17, 6.0986361e-16, -1.66089475e-16 ] + - [ -2.03966094e-17, 6.0986361e-16, -4.30362283e-17 ] + - [ -6.17356422e-19, 1.44731057e-15, -4.30343489e-17 ] + - [ -1.92843536e-19, 4.1305302e-16, -1.66089474e-16 ] + - [ -7.01090261e-19, 1.4141738e-15, -4.30322843e-17 ] + - [ -1.92843536e-19, 4.1305302e-16, -4.30322843e-17 ] + - [ -9.8415322e-19, 3.00852071e-16, -1.66089475e-16 ] + - [ -2.21225854e-18, 1.09994067e-15, -4.30323902e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.3034693e-17, -1.92843536e-19 ] + - [ 4.1305302e-16, -4.30362282e-17, -2.0812942e-19 ] + - [ 1.68199206e-15, -1.66089474e-16, -1.12479001e-20 ] + - [ 5.52397931e-16, -4.30362282e-17, -1.12479001e-20 ] + - [ 5.52397931e-16, -4.30336342e-17, -2.71748266e-22 ] + - [ 6.66655052e-16, -4.30325225e-17, -1.12479001e-20 ] + - [ 5.52397931e-16, -1.66089474e-16, -1.22844091e-20 ] + - [ 2.19571393e-15, -4.30329989e-17, -1.12479001e-20 ] + - [ 5.52397931e-16, -4.30329989e-17, -3.71896329e-20 ] + - [ 2.02989199e-15, -4.30357252e-17, -1.69049009e-23 ] + - [ 2.70672552e-15, -1.66089474e-16, -2.92407377e-26 ] + - [ 7.24102521e-16, -4.30352488e-17, -2.93871321e-23 ] + - [ 2.68810435e-15, -1.66089474e-16, -2.93871321e-23 ] + - [ 2.68810435e-15, -1.66089474e-16, -2.71748266e-22 ] + - [ 6.66655052e-16, -4.30349311e-17, -1.04258381e-21 ] + - [ 2.50175541e-15, -1.66089474e-16, -1.04258381e-21 ] + - [ 2.50175541e-15, -4.30325225e-17, 8.78001075e-24 ] + - [ 2.72633942e-15, -4.30318209e-17, 3.51445234e-26 ] + - [ 7.23712886e-16, -1.66089421e-16, 1.01002557e-25 ] + - [ 2.79396484e-15, -4.30323502e-17, 3.51445234e-26 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.04069559e-28, 2.81867787e-15 ] + - [ -4.30351693e-17, -2.92407377e-26, 7.24102521e-16 ] + - [ -4.30351693e-17, -8.73222301e-26, 2.79545392e-15 ] + - [ -4.3032165e-17, 3.51445234e-26, 7.23712886e-16 ] + - [ -4.30331444e-17, 8.02882302e-23, 2.65361825e-15 ] + - [ -1.66089421e-16, 2.92977081e-22, 6.65822419e-16 ] + - [ -4.30331444e-17, 2.92977081e-22, 6.65822419e-16 ] + - [ -4.30349709e-17, 9.7234454e-22, 2.50762704e-15 ] + - [ -1.66089421e-16, 2.30798939e-21, 2.41619661e-15 ] + - [ -4.30354473e-17, 2.92977081e-22, 6.65822419e-16 ] + - [ -1.66089421e-16, 2.30798939e-21, 2.41619661e-15 ] + - [ -1.66089421e-16, 2.57881858e-20, 2.08191336e-15 ] + - [ -4.30326151e-17, 5.01751314e-19, 1.49191702e-15 ] + - [ -1.66089422e-16, 1.95443365e-19, 4.1207025e-16 ] + - [ -4.30324034e-17, 1.83076187e-19, 1.71446307e-15 ] + - [ -1.66089422e-16, 1.83076187e-19, 1.71446307e-15 ] + - [ -1.66089421e-16, 1.16418966e-20, 5.50744099e-16 ] + - [ -4.30317681e-17, 1.39874612e-19, 1.76826491e-15 ] + - [ -1.66089421e-16, 1.39874612e-19, 1.76826491e-15 ] + - [ -4.30335415e-17, 6.03352255e-19, 1.4527841e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.1207025e-16, -1.6609048e-16 ] + - [ 1.83482596e-18, 1.14425659e-15, -1.6609048e-16 ] + - [ 2.31360471e-18, 1.08788908e-15, -4.30326416e-17 ] + - [ 7.32594469e-19, -3.2452283e-16, -4.30328534e-17 ] + - [ 7.18810331e-19, -1.40707227e-15, -1.66089104e-16 ] + - [ 1.95445484e-19, -4.12069403e-16, -1.66089421e-16 ] + - [ 2.11630927e-19, -1.67737912e-15, -1.66089422e-16 ] + - [ 1.95445484e-19, -4.12069403e-16, -4.30317416e-17 ] + - [ 5.01736632e-19, -1.49192211e-15, -1.66089422e-16 ] + - [ 5.01736632e-19, -1.49192211e-15, -4.30328534e-17 ] + - [ 7.94083992e-22, -2.52656839e-15, -4.30353944e-17 ] + - [ 2.92957795e-22, -6.65822842e-16, -1.66089421e-16 ] + - [ 2.37327284e-21, -2.41310325e-15, -4.30353415e-17 ] + - [ 2.92957795e-22, -6.65822842e-16, -4.30353415e-17 ] + - [ 1.16417964e-20, -5.50744099e-16, -1.66089421e-16 ] + - [ 3.25750307e-21, -2.3700367e-15, -4.3033118e-17 ] + - [ 1.16417964e-20, -5.50744099e-16, -4.3033118e-17 ] + - [ 2.11630927e-19, -1.67737912e-15, -4.30320856e-17 ] + - [ 3.60769693e-26, -2.8022539e-15, -1.66089421e-16 ] + - [ 3.5142958e-26, -7.23713309e-16, -4.30319268e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.66089421e-16, 2.92957795e-22 ] + - [ -6.65822842e-16, -4.30324827e-17, 1.82112287e-22 ] + - [ -2.62106169e-15, -1.66089421e-16, 1.82112287e-22 ] + - [ -2.62106169e-15, -4.30347591e-17, 9.76017993e-27 ] + - [ -2.81073609e-15, -1.66089421e-16, -3.94381676e-28 ] + - [ -2.8194673e-15, -4.30347193e-17, 3.5142958e-26 ] + - [ -7.23713309e-16, -1.66089474e-16, -3.94381676e-28 ] + - [ -2.8194673e-15, -1.66089474e-16, -8.73632755e-26 ] + - [ -2.79545053e-15, -4.30356722e-17, -2.92415389e-26 ] + - [ -7.24102521e-16, -4.30355135e-17, -7.8741744e-24 ] + - [ -2.72902112e-15, -1.66089474e-16, -2.71745136e-22 ] + - [ -6.66654629e-16, -4.30355135e-17, -2.71745136e-22 ] + - [ -6.66654629e-16, -4.30328401e-17, -7.07969967e-22 ] + - [ -2.5402971e-15, -1.66089474e-16, -8.27243128e-21 ] + - [ -2.25344262e-15, -4.30322578e-17, -2.71745136e-22 ] + - [ -6.66654629e-16, -1.66089474e-16, -8.27243128e-21 ] + - [ -2.25344262e-15, -1.66089474e-16, -1.36089918e-20 ] + - [ -2.17644902e-15, -1.66089474e-16, -1.78873334e-19 ] + - [ -1.71981801e-15, -1.66089474e-16, -1.12491441e-20 ] + - [ -5.52392002e-16, -4.30359635e-17, -2.41745697e-20 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -5.90602299e-19, -1.4577511e-15 ] + - [ -4.30349577e-17, -1.92851032e-19, -4.13050267e-16 ] + - [ -1.66089474e-16, -5.47074401e-19, -1.47458673e-15 ] + - [ -4.30351695e-17, -1.92851032e-19, -4.13050267e-16 ] + - [ -4.30351695e-17, -1.78873334e-19, -1.71981801e-15 ] + - [ -4.30347724e-17, -1.92851032e-19, -4.13050267e-16 ] + - [ -4.30324166e-17, -1.78166223e-18, -1.15042214e-15 ] + - [ -1.66089474e-16, -9.84143707e-19, -3.00853765e-16 ] + - [ -4.30324166e-17, -9.84143707e-19, -3.00853765e-16 ] + - [ -4.30323902e-17, -4.77082287e-18, -1.92461951e-16 ] + - [ -4.30336078e-17, -9.84143707e-19, -3.00853765e-16 ] + - [ -1.66089475e-16, -6.36708293e-18, -8.20716369e-16 ] + - [ -4.30332901e-17, -9.84143707e-19, -3.00853765e-16 ] + - [ -4.30332901e-17, -3.20531286e-18, -9.78704843e-16 ] + - [ -4.30338725e-17, -4.38342392e-17, -4.00453193e-16 ] + - [ -1.66089475e-16, -2.04803135e-17, -1.11326677e-16 ] + - [ -4.30343225e-17, -2.62320907e-17, -5.50382416e-16 ] + - [ -1.66089475e-16, -2.62320907e-17, -5.50382416e-16 ] + - [ -1.66089475e-16, -4.77082287e-18, -1.92461951e-16 ] + - [ -4.30364665e-17, -1.68184313e-17, -6.45241212e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -6.48788982e-17, -4.3032549e-17 ] + - [ -2.04803135e-17, -1.11326677e-16, -1.66089475e-16 ] + - [ -7.79489871e-17, -2.56993129e-16, -4.30330784e-17 ] + - [ -2.04803135e-17, -1.11326677e-16, -4.30330784e-17 ] + - [ -4.70210948e-17, -3.81731647e-16, -1.66089475e-16 ] + - [ -1.89538311e-16, -1.06233641e-16, -1.66089475e-16 ] + - [ -4.74643048e-17, -6.48788982e-17, -4.30367048e-17 ] + - [ -1.19387043e-16, -1.72670709e-16, -1.66089475e-16 ] + - [ -1.19387043e-16, -1.72670709e-16, -4.3032549e-17 ] + - [ -3.1303177e-16, -6.08598327e-17, -1.66089475e-16 ] + - [ -3.43842593e-16, -5.32776243e-17, -4.30332108e-17 ] + - [ -8.85136056e-17, -3.43808486e-17, -1.66089475e-16 ] + - [ -3.13031769e-16, -6.08598327e-17, -4.30342696e-17 ] + - [ -8.85136056e-17, -3.43808486e-17, -1.66089475e-16 ] + - [ -2.88477978e-16, -6.8464918e-17, -4.30354342e-17 ] + - [ -8.85136056e-17, -3.43808486e-17, -4.30354342e-17 ] + - [ -1.89538311e-16, -1.06233641e-16, -4.30368901e-17 ] + - [ -6.95992885e-16, -1.27064255e-17, -1.66089475e-16 ] + - [ -2.34664281e-16, -2.21477235e-18, -4.30361224e-17 ] + - [ -6.78271262e-16, -1.36392536e-17, -1.66089475e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.30358842e-17, -4.81004064e-16 ] + - [ -3.27722007e-17, -1.66089475e-16, -4.81004064e-16 ] + - [ -3.27722007e-17, -4.30332108e-17, -7.80631805e-16 ] + - [ -8.08632402e-18, -1.66089475e-16, -8.8928188e-16 ] + - [ -4.33868717e-18, -4.30362019e-17, -2.34664281e-16 ] + - [ -2.21477235e-18, -1.66089475e-16, -8.89281879e-16 ] + - [ -4.33868717e-18, -1.66089475e-16, -1.23024652e-15 ] + - [ -1.40640948e-18, -4.30367048e-17, -1.64307344e-15 ] + - [ -2.57648302e-19, -1.66089475e-16, -4.73526457e-16 ] + - [ -6.20918338e-20, -4.30345078e-17, -1.52636246e-15 ] + - [ -4.21869916e-19, -1.66089475e-16, -1.52636246e-15 ] + - [ -4.21869916e-19, -1.66089475e-16, -3.59994664e-16 ] + - [ -4.28279946e-19, -4.30334755e-17, -1.25964534e-15 ] + - [ -1.27308782e-18, -1.66089475e-16, -1.25964534e-15 ] + - [ -1.27308782e-18, -4.30335549e-17, -1.89424813e-15 ] + - [ -8.26629367e-20, -1.66089475e-16, -1.97102997e-15 ] + - [ -5.10666862e-20, -4.30369165e-17, -4.73526457e-16 ] + - [ -6.20918338e-20, -1.66089475e-16, -1.97102997e-15 ] + - [ -5.10666862e-20, -1.66089475e-16, -2.29809311e-15 ] + - [ -5.90019445e-21, -1.66089475e-16, -2.59548298e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.33253685e-15, -4.59830264e-21 ] + - [ -1.66089475e-16, -2.33253685e-15, -4.59830264e-21 ] + - [ -4.30354607e-17, -2.82796304e-15, 1.76105215e-133 ] + - [ -4.30348254e-17, -7.31180323e-16, -2.52985206e-68 ] + - [ -1.66089475e-16, -2.82655351e-15, -3.39451874e-31 ] + - [ -4.30344813e-17, -7.31180325e-16, -2.52985206e-68 ] + - [ -4.30344813e-17, -7.02379511e-16, -8.10271686e-24 ] + - [ -1.66089475e-16, -2.76026816e-15, -2.36728123e-24 ] + - [ -4.30337666e-17, -7.02379511e-16, -8.10271686e-24 ] + - [ -4.30337666e-17, -2.59548298e-15, -3.38721724e-22 ] + - [ 8.74280534e-17, 2.31362457e-18, 1.08787595e-15 ] + - [ -4.30327475e-17, 2.31360471e-18, 1.08788908e-15 ] + - [ -4.31543497e-17, 1.08847191e-17, 7.61096896e-16 ] + - [ 8.74280534e-17, 6.84361672e-18, 8.19379751e-16 ] + - [ -4.35943833e-17, 1.08847191e-17, 7.61096896e-16 ] + - [ -4.35943833e-17, 3.75452181e-17, 5.54566547e-16 ] + - [ 8.76318178e-17, 2.19633292e-17, 6.56954831e-16 ] + - [ -4.51032402e-17, 1.50916203e-16, 3.26378362e-16 ] + - [ 8.92372099e-17, 5.97687749e-17, 4.27378676e-16 ] + - [ -4.53326273e-17, 1.25837357e-16, 3.44060386e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.38216251e-16, -4.51032402e-17 ] + - [ 7.63835909e-17, 4.06972488e-16, 8.79073153e-17 ] + - [ 5.43621573e-17, 4.38216251e-16, 8.79073153e-17 ] + - [ 3.75452181e-17, 5.54566547e-16, 9.20683646e-17 ] + - [ 1.88533148e-16, 2.93563776e-16, 9.2887022e-17 ] + - [ 3.37043142e-16, 2.45032917e-16, -5.03592384e-17 ] + - [ 3.90486898e-16, 2.30344096e-16, -4.53326273e-17 ] + - [ 1.04353731e-16, 3.57206655e-16, 8.96437858e-17 ] + - [ 1.50916203e-16, 3.26378362e-16, -4.73542567e-17 ] + - [ 1.5202624e-16, 3.18051922e-16, 8.96437858e-17 ] + - [ 1.5202624e-16, 3.18051922e-16, 9.20683646e-17 ] + - [ 2.86547273e-16, 2.59652918e-16, -4.90257174e-17 ] + - [ 1.77744066e-16, 3.00639889e-16, 9.20683646e-17 ] + - [ 1.77744066e-16, 3.00639889e-16, -5.03592384e-17 ] + - [ 1.88533148e-16, 2.93563776e-16, -5.41989447e-17 ] + - [ 3.90486898e-16, 2.30344096e-16, 9.38719625e-17 ] + - [ 3.25520953e-16, 2.42703683e-16, -5.69351321e-17 ] + - [ 3.90486898e-16, 2.30344096e-16, -5.69351321e-17 ] + - [ 4.72636438e-16, 2.17473299e-16, -5.69351321e-17 ] + - [ 5.44439845e-16, 2.11864935e-16, 9.53161537e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 9.53161537e-17, 6.70350022e-16 ] + - [ 2.05410862e-16, 1.00034286e-16, 8.1354433e-16 ] + - [ 1.98748895e-16, -6.66667995e-17, 1.13887666e-15 ] + - [ 1.90939304e-16, 1.00034286e-16, 1.13887666e-15 ] + - [ 1.90939304e-16, 1.06553634e-16, 1.41850256e-15 ] + - [ 1.84786192e-16, -7.92997136e-17, 1.50599683e-15 ] + - [ 1.84931617e-16, 1.06553634e-16, 1.50599683e-15 ] + - [ 1.84931617e-16, -9.40193992e-17, 7.24100845e-15 ] + - [ 1.66857998e-16, 1.41712237e-16, 3.30563457e-15 ] + - [ 1.73392593e-16, -1.10706901e-16, 4.04912661e-15 ] + - [ 1.69745534e-16, 1.1740038e-16, 3.30563457e-15 ] + - [ 1.73392593e-16, 1.1740038e-16, 1.8902764e-15 ] + - [ 1.80483317e-16, -9.40193992e-17, 2.2810686e-15 ] + - [ 1.76120304e-16, 1.1162785e-16, 1.8902764e-15 ] + - [ 1.80483317e-16, 1.1162785e-16, 1.41850256e-15 ] + - [ 1.84786192e-16, 1.93994711e-16, 1.20264871e-14 ] + - [ 1.66089475e-16, 2.14346901e-16, 1.06625743e-14 ] + - [ 1.66111551e-16, -2.40171584e-16, 1.20264803e-14 ] + - [ 1.66089422e-16, -1.10706901e-16, 5.95971107e-15 ] + - [ 1.69014915e-16, 1.73562582e-16, 7.24100844e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 7.33238636e-15, 1.67734942e-16 ] + - [ 1.93994711e-16, 9.02196637e-15, 1.6628858e-16 ] + - [ -1.65703281e-16, 8.94422907e-15, 1.6675016e-16 ] + - [ 1.93994711e-16, 8.94422907e-15, 1.6675016e-16 ] + - [ -2.40171584e-16, 3.34642243e-18, -9.664271e-16 ] + - [ -4.30326416e-17, 2.31356584e-18, -1.08788188e-15 ] + - [ 1.3113089e-16, 2.97158426e-15, -3.4273965e-16 ] + - [ -9.98414272e-17, 1.20264905e-14, -3.37507951e-16 ] + - [ -2.40642323e-16, 1.13874753e-14, -3.37509434e-16 ] + - [ 2.29379537e-16, 1.20264905e-14, -3.37508057e-16 ] + - [ 2.13322626e-16, 1.03435512e-14, -3.3753675e-16 ] + - [ -2.40642323e-16, 8.08748235e-15, -3.37872599e-16 ] + - [ 1.88774235e-16, 1.20264905e-14, -3.37508057e-16 ] + - [ -1.78829221e-16, 8.08748235e-15, -3.37872599e-16 ] + - [ -1.78829221e-16, 4.70342738e-15, -3.39819504e-16 ] + - [ 1.57285256e-16, 8.21604162e-15, -3.3766984e-16 ] + - [ -1.31144019e-16, 4.70342738e-15, -3.39819504e-16 ] + - [ -1.31144019e-16, 2.97158426e-15, -3.4273965e-16 ] + - [ 1.39173891e-16, 4.5413832e-15, -3.38688398e-16 ] + - [ -1.08154685e-16, 2.97158426e-15, -3.4273965e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.71018269e-16, -8.13854793e-17 ] + - [ 1.16504108e-15, -3.47356086e-16, 1.02138792e-16 ] + - [ 1.21028704e-15, -3.54427434e-16, -8.13854793e-17 ] + - [ 1.21028704e-15, -3.54427434e-16, -9.98414272e-17 ] + - [ 2.27181646e-15, -3.41511982e-16, 1.10561529e-16 ] + - [ 1.71719645e-15, -3.482316e-16, -9.98414272e-17 ] + - [ 1.71719645e-15, -3.482316e-16, 1.3113089e-16 ] + - [ 8.24005398e-16, -3.51704541e-16, -6.58896467e-17 ] + - [ 5.90223881e-16, -3.71018269e-16, 1.02138792e-16 ] + - [ 6.10840663e-16, -3.57758497e-16, -6.34820615e-17 ] + - [ 5.90223881e-16, -3.71018269e-16, -6.34820615e-17 ] + - [ 3.95379678e-16, -3.83150533e-16, -6.34820615e-17 ] + - [ 4.05851546e-16, -3.66958969e-16, 9.86290583e-17 ] + - [ 3.95379678e-16, -3.83150533e-16, -5.80886321e-17 ] + - [ 3.18792653e-16, -3.75362383e-16, 9.86290583e-17 ] + - [ 3.18792653e-16, -3.75362383e-16, -5.02237131e-17 ] + - [ 1.47055691e-16, -4.29220444e-16, 9.38053116e-17 ] + - [ 1.85026802e-16, -3.97243997e-16, -5.02237131e-17 ] + - [ 1.99805409e-16, -4.11750813e-16, 9.60356023e-17 ] + - [ 1.85026802e-16, -3.97243997e-16, 9.60356023e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 9.20666176e-17, 1.47055691e-16 ] + - [ -4.29220444e-16, -4.87880188e-17, 1.05664646e-16 ] + - [ -4.27484555e-16, 9.20666176e-17, 1.05664646e-16 ] + - [ -4.27484555e-16, 9.06135326e-17, 1.01393589e-16 ] + - [ -4.56649962e-16, -4.71781532e-17, 6.78818947e-17 ] + - [ -4.81368289e-16, 9.06135326e-17, 6.78818947e-17 ] + - [ -4.81368289e-16, 8.91686532e-17, 6.38752171e-17 ] + - [ -5.24172464e-16, -4.52878139e-17, 5.21347651e-17 ] + - [ -5.54896466e-16, -4.30348121e-17, 2.31356584e-18 ] + - [ -1.08788188e-15, -4.31931014e-17, 6.78818947e-17 ] + - [ -4.81368289e-16, -4.46530421e-17, 5.21347651e-17 ] + - [ -5.54896466e-16, 8.87359782e-17, 5.3008109e-17 ] + - [ -5.1934374e-16, -4.38552165e-17, 5.21347651e-17 ] + - [ -5.54896466e-16, -4.38552165e-17, 2.6465713e-17 ] + - [ -6.75529204e-16, 8.778926e-17, 3.79697272e-17 ] + - [ -5.93359597e-16, -4.33761664e-17, 2.6465713e-17 ] + - [ -6.75529204e-16, -4.33761664e-17, 1.84441522e-17 ] + - [ -7.18680027e-16, 8.76296472e-17, 2.28999161e-17 ] + - [ -6.77629211e-16, -4.31931014e-17, 1.84441522e-17 ] + - [ -7.18680027e-16, -4.31931014e-17, 7.63328051e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.20264905e-14, -3.37508057e-16 ] + - [ 2.45228794e-16, 1.56846885e-14, -3.37505728e-16 ] + - [ -3.24530136e-16, 1.20264905e-14, -3.37507951e-16 ] + - [ 3.24521878e-16, 1.56846885e-14, -3.37505728e-16 ] + - [ 3.24521878e-16, 2.24197388e-14, -3.37508057e-16 ] + - [ -5.46108501e-16, 1.56842684e-14, -3.37505834e-16 ] + - [ -4.09459801e-16, 4.53010402e-13, -3.37508057e-16 ] + - [ 3.24521878e-16, 2.24198879e-14, -3.37507951e-16 ] + - [ -1.22674325e-16, 1.01841256e-12, -3.37508057e-16 ] + - [ 2.08215793e-18, 4.53008017e-13, -3.37507951e-16 ] + - [ 2.98553754e-16, 4.53010402e-13, -3.37508057e-16 ] + - [ -6.8988047e-24, 3.01492639e-12, -3.37507951e-16 ] + - [ 2.53072491e-68, 3.81842383e-12, -3.37507942e-16 ] + - [ 2.08215793e-18, 3.7615249e-12, -3.3750795e-16 ] + - [ -1.92459464e-16, 7.14032885e-13, -3.37508057e-16 ] + - [ 2.08215793e-18, 3.01492639e-12, -3.37507951e-16 ] + - [ -2.98550366e-16, 4.53010402e-13, -3.37508057e-16 ] + - [ 2.08215793e-18, 4.53010402e-13, -3.37508057e-16 ] + - [ 2.61065851e-18, 4.53008017e-13, -3.37507951e-16 ] + - [ -4.09459801e-16, 3.1505088e-13, -3.37507951e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.37508057e-16, 1.92457664e-16 ] + - [ 1.43511569e-12, -3.37507951e-16, -4.09459801e-16 ] + - [ 1.43511569e-12, -3.37507951e-16, 7.12420481e-17 ] + - [ 3.27153189e-12, -3.37507951e-16, 5.23192834e-20 ] + - [ 3.01492639e-12, -3.37507951e-16, 2.08215793e-18 ] + - [ 3.4719844e-12, -3.37507951e-16, 1.6928342e-21 ] + - [ 3.01492639e-12, -3.37507951e-16, 1.6928342e-21 ] + - [ 3.7615249e-12, -3.3750795e-16, -6.8988047e-24 ] + - [ 3.61472091e-12, -3.37508056e-16, 2.08215793e-18 ] + - [ 3.01492639e-12, -3.37507951e-16, -1.69284309e-21 ] + - [ 3.4719844e-12, -3.37508057e-16, 2.08215793e-18 ] + - [ 3.4719844e-12, -3.37508057e-16, -4.06979115e-19 ] + - [ 3.15050229e-13, -3.37508057e-16, -6.63137961e-16 ] + - [ 1.56842684e-14, -3.37505834e-16, 3.24521878e-16 ] + - [ 1.99713698e-13, -3.37508057e-16, -7.23104505e-16 ] + - [ 1.56842684e-14, -3.37505834e-16, -7.23104505e-16 ] + - [ 8.33383784e-14, -3.37508057e-16, -7.24326774e-16 ] + - [ 5.1771785e-14, -3.37508057e-16, 3.24521878e-16 ] + - [ 1.56842684e-14, -3.37505834e-16, -6.66775543e-16 ] + - [ 3.38028416e-14, -3.37508057e-16, 3.24521878e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.08221087e-18, 3.01492639e-12 ] + - [ -3.37507951e-16, 2.08215793e-18, 3.01492466e-12 ] + - [ -3.37508057e-16, -2.61055098e-18, 3.01492639e-12 ] + - [ -3.37507951e-16, -2.61055098e-18, 2.65869052e-12 ] + - [ -3.37508057e-16, 7.12420481e-17, 2.29246784e-12 ] + - [ -3.37507951e-16, -4.09459801e-16, 4.53010402e-13 ] + - [ -3.37508057e-16, 3.77406181e-17, 2.65867664e-12 ] + - [ -3.37507951e-16, -4.09459801e-16, 2.65867664e-12 ] + - [ -3.37507951e-16, 2.61065851e-18, 2.65869052e-12 ] + - [ -3.37508057e-16, -3.77399564e-17, 3.01492639e-12 ] + - [ -3.37507951e-16, 2.08215793e-18, 2.29247999e-12 ] + - [ -3.37508057e-16, -7.12401952e-17, 3.01492639e-12 ] + - [ -3.37507951e-16, -7.12401952e-17, 1.43512523e-12 ] + - [ -3.37508057e-16, 4.12452156e-16, 3.38027603e-14 ] + - [ -3.37507951e-16, -4.09459801e-16, 4.53010402e-13 ] + - [ -3.37508057e-16, 5.51453278e-16, 5.17718392e-14 ] + - [ -3.37507951e-16, -4.09459801e-16, 5.17718392e-14 ] + - [ -3.37507951e-16, 7.24327197e-16, 8.33387036e-14 ] + - [ -3.37507951e-16, 7.23103235e-16, 4.53010402e-13 ] + - [ -3.37508057e-16, -4.09459801e-16, 1.26670347e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.1505088e-13, -3.37507951e-16 ] + - [ 4.12450462e-16, 1.56843564e-14, 1.6608921e-16 ] + - [ -3.99319334e-16, 4.78586891e-13, 1.66089475e-16 ] + - [ 3.2452336e-16, 1.48327156e-14, 1.66089422e-16 ] + - [ -3.99319334e-16, 1.48327156e-14, 1.66089422e-16 ] + - [ -5.31142699e-16, 1.20264803e-14, 1.66089422e-16 ] + - [ -2.40171584e-16, 1.48327156e-14, 1.66089422e-16 ] + - [ 3.12180184e-16, 1.20264871e-14, 1.66089475e-16 ] + - [ -3.24530348e-16, 1.48327156e-14, 1.66089422e-16 ] + - [ -3.24530348e-16, 2.32855217e-14, 1.66089475e-16 ] + - [ 1.22674325e-16, 1.01841212e-12, 1.66089422e-16 ] + - [ -3.99319334e-16, 3.61472178e-12, 1.66089474e-16 ] + - [ -6.89804109e-24, 1.49744213e-12, 1.66089475e-16 ] + - [ -1.11060444e-16, 3.76152317e-12, 1.66089474e-16 ] + - [ -2.53067008e-68, 3.8184221e-12, 1.6608947e-16 ] + - [ 6.8988047e-24, 1.49744213e-12, 1.66089475e-16 ] + - [ -1.11060444e-16, 3.76151623e-12, 1.66089421e-16 ] + - [ 1.6928439e-21, 1.49744213e-12, 1.66089475e-16 ] + - [ 1.6928439e-21, 3.47198353e-12, 1.66089421e-16 ] + - [ -4.22322843e-16, 3.56045281e-14, 1.66089475e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.66089475e-16, 3.12180184e-16 ] + - [ 5.36196856e-14, 1.66089475e-16, -7.26893707e-16 ] + - [ 8.70793366e-14, 1.66089475e-16, -7.19679951e-16 ] + - [ 1.48327156e-14, 1.66089422e-16, 3.12180184e-16 ] + - [ 1.3413058e-13, 1.66089475e-16, -6.53818057e-16 ] + - [ 1.48327156e-14, 1.66089422e-16, -6.53818057e-16 ] + - [ 3.29313451e-13, 1.66089475e-16, -2.85967691e-16 ] + - [ 1.067255e-12, 1.66089475e-16, 2.08221087e-18 ] + - [ 3.01492379e-12, 1.66089422e-16, -1.84946281e-16 ] + - [ 1.49744213e-12, 1.66089475e-16, 2.08221087e-18 ] + - [ 1.49744213e-12, 1.66089475e-16, 4.06979115e-19 ] + - [ 3.27152409e-12, 1.66089422e-16, -1.11060444e-16 ] + - [ 3.47198353e-12, 1.66089421e-16, -2.85967691e-16 ] + - [ 3.01492379e-12, 1.66089422e-16, -3.99319334e-16 ] + - [ 4.78586891e-13, 1.66089475e-16, 2.08221087e-18 ] + - [ 2.9761666e-12, 1.66089422e-16, -3.99319334e-16 ] + - [ 2.9761666e-12, 1.66089422e-16, 1.17283242e-17 ] + - [ 1.01841212e-12, 1.66089422e-16, 2.98550366e-16 ] + - [ 4.78586891e-13, 1.66089475e-16, -3.99319334e-16 ] + - [ 7.14032668e-13, 1.66089422e-16, 4.09459801e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.17283242e-17, 2.29247912e-12 ] + - [ 1.66089422e-16, -3.99319334e-16, 4.78586891e-13 ] + - [ 1.66089475e-16, 3.77399299e-17, 1.88253794e-12 ] + - [ 1.66089422e-16, -3.99319334e-16, 1.88253794e-12 ] + - [ 1.66089422e-16, 1.22674325e-16, 1.94021923e-12 ] + - [ 1.66089475e-16, -4.06961124e-19, 1.49744213e-12 ] + - [ 1.66089475e-16, -1.11060444e-16, 3.27153103e-12 ] + - [ 1.66089474e-16, -5.23192834e-20, 1.49744213e-12 ] + - [ 1.66089475e-16, -5.23192834e-20, 3.61472178e-12 ] + - [ 1.66089474e-16, -6.46375204e-17, 2.34457807e-12 ] + - [ 1.66089475e-16, -4.06961124e-19, 3.27153103e-12 ] + - [ 1.66089474e-16, -3.40786829e-17, 2.70448982e-12 ] + - [ 1.66089475e-16, -4.06961124e-19, 2.70448982e-12 ] + - [ 1.66089475e-16, -2.08215793e-18, 3.15050121e-13 ] + - [ 1.66089422e-16, 6.63137961e-16, 4.78586891e-13 ] + - [ 1.66089475e-16, -3.99319334e-16, 1.99713644e-13 ] + - [ 1.66089422e-16, 7.23104505e-16, 4.78586891e-13 ] + - [ 1.66089475e-16, 7.23104505e-16, 8.33383512e-14 ] + - [ 1.66089422e-16, 7.24326774e-16, 5.17717715e-14 ] + - [ 1.66089422e-16, -3.99319334e-16, 4.78586891e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.38028281e-14, 1.66089422e-16 ] + - [ 4.12450462e-16, -2.8279622e-15, 1.76105215e-133 ] + - [ 8.73967927e-17, -2.82655257e-15, -3.39451874e-31 ] + - [ -4.30348254e-17, -2.82796302e-15, 8.80525656e-134 ] + - [ 8.73951516e-17, -2.82655357e-15, -3.39451874e-31 ] + - [ 8.73951516e-17, -2.76026816e-15, -2.36728123e-24 ] + - [ -4.30344813e-17, -2.77734434e-15, -6.54960143e-25 ] + - [ -4.30337666e-17, -2.77734435e-15, -6.54960143e-25 ] + - [ 8.73977456e-17, -2.69525669e-15, -2.37877249e-23 ] + - [ -4.30337666e-17, -2.69190921e-15, -2.57379595e-23 ] + - [ 8.73984338e-17, -2.69525669e-15, -2.37877249e-23 ] + - [ 8.73984338e-17, -2.59548299e-15, -3.38721724e-22 ] + - [ -4.30335019e-17, -2.62712136e-15, -1.59202706e-22 ] + - [ 8.73984338e-17, -2.59548299e-15, -3.38721724e-22 ] + - [ 8.73984338e-17, -2.33253685e-15, -4.59830264e-21 ] + - [ -4.30351695e-17, -2.59347044e-15, -3.5291395e-22 ] + - [ 8.73954692e-17, -2.33253686e-15, -4.59830264e-21 ] + - [ 8.73954692e-17, -2.29809311e-15, -5.90019445e-21 ] + - [ -4.30354607e-17, -2.37912367e-15, -3.07458225e-21 ] + - [ 8.73903341e-17, -2.29809311e-15, -5.90019445e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.61071895e-20, -4.30367048e-17 ] + - [ -1.89424813e-15, -8.26629367e-20, 8.73903341e-17 ] + - [ -1.89424813e-15, -8.26629109e-20, -4.30367048e-17 ] + - [ -1.89424813e-15, -8.26629109e-20, -4.30345078e-17 ] + - [ -1.89424813e-15, -8.26629109e-20, 8.73935104e-17 ] + - [ -1.64307344e-15, -2.57648302e-19, -4.30345078e-17 ] + - [ -1.71099871e-15, -1.85782929e-19, 8.73941986e-17 ] + - [ -1.64307344e-15, -2.57648302e-19, 8.73941986e-17 ] + - [ -1.52636246e-15, -4.21869916e-19, 8.73941986e-17 ] + - [ -1.57157369e-15, -3.59966304e-19, -4.30334755e-17 ] + - [ -1.52636246e-15, -4.21869916e-19, 8.73967927e-17 ] + - [ -1.2797268e-15, -1.18080548e-18, -4.30334755e-17 ] + - [ -1.2797268e-15, -1.18080548e-18, -4.30333961e-17 ] + - [ -1.25964534e-15, -1.27308782e-18, 8.73980103e-17 ] + - [ -1.25964534e-15, -1.27308741e-18, -4.30333961e-17 ] + - [ -1.25964534e-15, -1.27308741e-18, -4.30335549e-17 ] + - [ -1.23024652e-15, -1.40640948e-18, 8.73978515e-17 ] + - [ -8.89281879e-16, -4.33868717e-18, -4.30362019e-17 ] + - [ -1.25964534e-15, -1.27308741e-18, 8.73928222e-17 ] + - [ -8.8928188e-16, -4.33868717e-18, 8.73928222e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.73911811e-17, -7.80631805e-16 ] + - [ -8.08632402e-18, 8.73911811e-17, -6.95992885e-16 ] + - [ -1.27064255e-17, 8.73959985e-17, -3.1303177e-16 ] + - [ -6.08598327e-17, 8.73980632e-17, -3.64273028e-16 ] + - [ -4.99353514e-17, -4.30337402e-17, -3.43842593e-16 ] + - [ -5.32776243e-17, 8.73980632e-17, -3.43842593e-16 ] + - [ -5.32776243e-17, 8.73985397e-17, -4.21512126e-16 ] + - [ -4.0169882e-17, -4.30332108e-17, -4.81004065e-16 ] + - [ -3.27722007e-17, -4.30361224e-17, -7.26555528e-16 ] + - [ -1.10703979e-17, -4.30358842e-17, -6.78271262e-16 ] + - [ -1.36392536e-17, 8.73911811e-17, -6.78271262e-16 ] + - [ -1.36392503e-17, -4.30358842e-17, -6.78271262e-16 ] + - [ -1.36392503e-17, -4.30333166e-17, -4.81004065e-16 ] + - [ -3.27722007e-17, 8.73923987e-17, -5.15976361e-16 ] + - [ -2.95098136e-17, -4.30333166e-17, -5.15976361e-16 ] + - [ -2.95098136e-17, 8.73985397e-17, -1.30301486e-16 ] + - [ -1.62154636e-16, -4.30347195e-17, -2.00154599e-16 ] + - [ -1.00444568e-16, 8.73896458e-17, -1.19387043e-16 ] + - [ -1.72670709e-16, -4.30367048e-17, -2.00154599e-16 ] + - [ -1.00444568e-16, -4.30367048e-17, -2.20427909e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.20427909e-16, -8.90682269e-17 ] + - [ -4.30354342e-17, -3.09636014e-16, -6.19229385e-17 ] + - [ 8.73959985e-17, -2.37729694e-16, -8.36096554e-17 ] + - [ -4.30342696e-17, -3.09636014e-16, -6.19229385e-17 ] + - [ -4.30342696e-17, -3.1303177e-16, -6.08598327e-17 ] + - [ 8.73936162e-17, -4.70210948e-17, -3.81731647e-16 ] + - [ 8.73961573e-17, -5.01636929e-17, -3.62890564e-16 ] + - [ -4.30338725e-17, -5.35224962e-17, -3.42327675e-16 ] + - [ 8.73961573e-17, -5.35224962e-17, -3.42327675e-16 ] + - [ 8.73988573e-17, -8.37204579e-17, -2.3734927e-16 ] + - [ -4.30330784e-17, -7.79489872e-17, -2.56993129e-16 ] + - [ 8.73988573e-17, -7.79489871e-17, -2.56993129e-16 ] + - [ 8.73954691e-17, -1.08361917e-16, -1.85583038e-16 ] + - [ -4.3032549e-17, -1.19387043e-16, -1.72670709e-16 ] + - [ 8.73954691e-17, -1.19387043e-16, -1.72670709e-16 ] + - [ 8.73939339e-17, -1.20544937e-16, -1.71564325e-16 ] + - [ -4.30347195e-17, -1.30301486e-16, -1.62154636e-16 ] + - [ 8.73949926e-17, -6.36708293e-18, -8.20716369e-16 ] + - [ 8.73875811e-17, -2.03968278e-17, -6.09861705e-16 ] + - [ -4.30336078e-17, -1.68184313e-17, -6.45241212e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -5.13443097e-16, -4.30361753e-17 ] + - [ -2.62320907e-17, -5.50382416e-16, 8.73882164e-17 ] + - [ -2.62320907e-17, -5.50382416e-16, 8.73936162e-17 ] + - [ -4.38342392e-17, -4.00453087e-16, -4.30364665e-17 ] + - [ -4.38342392e-17, -4.00453193e-16, 8.73936162e-17 ] + - [ -4.38342392e-17, -4.00453193e-16, -4.30338725e-17 ] + - [ -2.41745697e-20, -2.09482045e-15, -4.30359635e-17 ] + - [ -2.08131126e-19, -1.6819891e-15, 8.7389381e-17 ] + - [ -1.78873334e-19, -1.71981801e-15, -4.30351695e-17 ] + - [ -2.08131126e-19, -1.6819891e-15, -4.30351695e-17 ] + - [ -5.47074401e-19, -1.47458631e-15, 8.73925574e-17 ] + - [ -4.89734241e-19, -1.49647745e-15, -4.30349577e-17 ] + - [ -5.47074401e-19, -1.47458631e-15, -4.30349577e-17 ] + - [ -7.01097086e-19, -1.41417083e-15, 8.73941456e-17 ] + - [ -5.47074401e-19, -1.47458673e-15, -4.30347724e-17 ] + - [ -7.01097086e-19, -1.41417083e-15, -4.30347724e-17 ] + - [ -2.21228584e-18, -1.0999377e-15, 8.7399069e-17 ] + - [ -5.90602299e-19, -1.4577511e-15, -4.30324166e-17 ] + - [ -2.21228584e-18, -1.0999377e-15, -4.30324166e-17 ] + - [ -3.14128908e-18, -9.86725821e-16, 8.73987513e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.30323902e-17, -6.5703179e-18 ] + - [ -8.13693831e-16, 8.73949926e-17, -3.20531286e-18 ] + - [ -9.78704843e-16, -4.30332901e-17, -6.5703179e-18 ] + - [ -8.13693831e-16, -4.30332901e-17, -6.36708293e-18 ] + - [ -8.20716369e-16, 8.7389381e-17, -4.50540655e-20 ] + - [ -1.99680265e-15, -4.30331577e-17, -2.41745697e-20 ] + - [ -2.09482045e-15, 8.73944102e-17, -3.7190473e-20 ] + - [ -2.02988775e-15, -4.30331577e-17, -3.7190473e-20 ] + - [ -2.02988775e-15, -4.30326283e-17, -1.36089918e-20 ] + - [ -2.17644902e-15, 8.73949396e-17, -1.36089918e-20 ] + - [ -2.17644817e-15, -4.30326283e-17, -1.36089918e-20 ] + - [ -2.17644817e-15, -4.30322578e-17, -8.27243128e-21 ] + - [ -2.25344262e-15, 8.7397163e-17, -1.22846191e-20 ] + - [ -2.19571139e-15, -4.30322578e-17, -1.22846191e-20 ] + - [ -2.19571139e-15, -4.30328401e-17, -7.07969967e-22 ] + - [ -2.5402971e-15, 8.73974277e-17, -1.04261006e-21 ] + - [ -2.50175287e-15, -4.30328401e-17, -1.04261006e-21 ] + - [ -2.50175287e-15, -4.30355135e-17, -1.04261006e-21 ] + - [ -2.50175287e-15, 8.73919748e-17, -7.8741744e-24 ] + - [ -2.72902112e-15, -4.30355135e-17, -1.6905715e-23 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.73632755e-26, -2.79545053e-15 ] + - [ -4.30356722e-17, -9.92778759e-24, -2.72288945e-15 ] + - [ 8.73905983e-17, -8.73632755e-26, -2.79545053e-15 ] + - [ 8.73905983e-17, -3.94381676e-28, -2.8194673e-15 ] + - [ -4.30347193e-17, -1.59848634e-25, -2.79050979e-15 ] + - [ 8.73918688e-17, -3.94381676e-28, -2.8194673e-15 ] + - [ 8.73918688e-17, 9.76017993e-27, -2.81073609e-15 ] + - [ -4.30320856e-17, -7.49379488e-27, -2.81212607e-15 ] + - [ 8.73975068e-17, 9.76017993e-27, -2.81073609e-15 ] + - [ 8.73975068e-17, 3.60769693e-26, -2.8022539e-15 ] + - [ -4.30319268e-17, 6.03971144e-28, -2.81867872e-15 ] + - [ 8.73984069e-17, 3.60769693e-26, -2.8022539e-15 ] + - [ 8.73984069e-17, 2.02998617e-23, -2.70113341e-15 ] + - [ -4.30324827e-17, 4.93298325e-26, -2.79965266e-15 ] + - [ 8.7397507e-17, 2.02998617e-23, -2.70113341e-15 ] + - [ 8.7397507e-17, 1.82112287e-22, -2.62106169e-15 ] + - [ -4.30335944e-17, 8.77961001e-24, -2.72634027e-15 ] + - [ 8.73951777e-17, 1.82112287e-22, -2.62106169e-15 ] + - [ 8.73951777e-17, 7.94083993e-22, -2.52656839e-15 ] + - [ -4.30347591e-17, 8.02850243e-23, -2.6536191e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.41310325e-15, -4.30353944e-17 ] + - [ 6.75328645e-22, -2.54541572e-15, 8.73899368e-17 ] + - [ 2.37327284e-21, -2.41310325e-15, 8.73899368e-17 ] + - [ 3.25750307e-21, -2.3700367e-15, -4.30353415e-17 ] + - [ 2.30792557e-21, -2.41619915e-15, 8.73944367e-17 ] + - [ 3.25750307e-21, -2.3700367e-15, 8.73944367e-17 ] + - [ 3.89941403e-20, -2.02236187e-15, -4.3033118e-17 ] + - [ 2.57876753e-20, -2.08191591e-15, 8.73984601e-17 ] + - [ 3.89941403e-20, -2.02236187e-15, 8.73984601e-17 ] + - [ 2.11630927e-19, -1.67737912e-15, 8.73984601e-17 ] + - [ 2.18441182e-19, -1.66941828e-15, -4.30317416e-17 ] + - [ 2.11630927e-19, -1.67737912e-15, 8.73984601e-17 ] + - [ 4.65216608e-19, -1.50573933e-15, -4.30317416e-17 ] + - [ 4.65216608e-19, -1.50573933e-15, -4.30324034e-17 ] + - [ 5.01736632e-19, -1.49192211e-15, 8.73966072e-17 ] + - [ 6.0334419e-19, -1.45278707e-15, -4.30324034e-17 ] + - [ 6.0334419e-19, -1.45278707e-15, -4.30328534e-17 ] + - [ 7.18810331e-19, -1.40707227e-15, 8.73957602e-17 ] + - [ 1.83478046e-18, -1.14426209e-15, -4.30328534e-17 ] + - [ 1.83478046e-18, -1.14426209e-15, -4.30326416e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.30338196e-17, -2.92915478e-16 ] + - [ 6.71041067e-17, 8.73949398e-17, 2.31360471e-18 ] + - [ 1.08788908e-15, 8.73971367e-17, 1.83482596e-18 ] + - [ 1.14425659e-15, -4.30328269e-17, 2.31362457e-18 ] + - [ 1.08787595e-15, 8.7395072e-17, 1.83482596e-18 ] + - [ 1.14425659e-15, 8.7395072e-17, 6.03352255e-19 ] + - [ 1.4527841e-15, -4.30326151e-17, 7.18815088e-19 ] + - [ 1.40707016e-15, -4.30324034e-17, 5.01751314e-19 ] + - [ 1.49191702e-15, 8.7395072e-17, 4.65198203e-19 ] + - [ 1.50574611e-15, -4.30324034e-17, 4.65198203e-19 ] + - [ 1.50574611e-15, -4.30317681e-17, 1.83076187e-19 ] + - [ 1.71446307e-15, 8.73966072e-17, 2.11632116e-19 ] + - [ 1.677377e-15, -4.30317681e-17, 2.11632116e-19 ] + - [ 1.677377e-15, -4.30319269e-17, 1.39874612e-19 ] + - [ 1.76826491e-15, 8.73984601e-17, 1.39874612e-19 ] + - [ 1.76826449e-15, -4.30319269e-17, 1.39874612e-19 ] + - [ 1.76826449e-15, -4.30335415e-17, 2.57881859e-20 ] + - [ 2.08191336e-15, 8.73981425e-17, 3.89947478e-20 ] + - [ 2.02235933e-15, -4.30335415e-17, 3.89947478e-20 ] + - [ 2.02235933e-15, -4.30354473e-17, 2.30798939e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.25754103e-21, 2.37003416e-15 ] + - [ -4.30349709e-17, 9.7234454e-22, 2.50762704e-15 ] + - [ 8.73900426e-17, 9.7234454e-22, 2.50762619e-15 ] + - [ -4.30349709e-17, 9.7234454e-22, 2.50762619e-15 ] + - [ -4.30331444e-17, 8.02882302e-23, 2.65361825e-15 ] + - [ 8.73909955e-17, 1.82118699e-22, 2.62106085e-15 ] + - [ -4.30331444e-17, 1.82118699e-22, 2.62106085e-15 ] + - [ -4.3032165e-17, 8.78001075e-24, 2.72633942e-15 ] + - [ 8.7394066e-17, 2.03008651e-23, 2.70113087e-15 ] + - [ -4.3032165e-17, 2.03008651e-23, 2.70113087e-15 ] + - [ -4.30318209e-17, 1.01002557e-25, 2.79396484e-15 ] + - [ 8.73967659e-17, 9.76136014e-27, 2.81073355e-15 ] + - [ -4.30318209e-17, 9.76136014e-27, 2.81073355e-15 ] + - [ -4.30323502e-17, 6.04069559e-28, 2.81867787e-15 ] + - [ 8.73980363e-17, 5.968219e-28, 2.81870413e-15 ] + - [ -4.30323502e-17, 5.968219e-28, 2.81870413e-15 ] + - [ -4.30351693e-17, -7.49300294e-27, 2.81212692e-15 ] + - [ 8.73975068e-17, -3.94307624e-28, 2.81946646e-15 ] + - [ -4.30351693e-17, -3.94307624e-28, 2.81946646e-15 ] + - [ -4.30357252e-17, -8.73222301e-26, 2.79545392e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.79050979e-15, -4.30352488e-17 ] + - [ -1.69049009e-23, 2.70672552e-15, 8.73905983e-17 ] + - [ -7.8735654e-24, 2.72902197e-15, -4.30352488e-17 ] + - [ -7.8735654e-24, 2.72902197e-15, -4.30349311e-17 ] + - [ -2.93871321e-23, 2.68810435e-15, 8.73912337e-17 ] + - [ -2.93871321e-23, 2.6881035e-15, -4.30349311e-17 ] + - [ -2.93871321e-23, 2.6881035e-15, -4.30325224e-17 ] + - [ -1.04258381e-21, 2.50175541e-15, 8.73926101e-17 ] + - [ -7.07950378e-22, 2.54029964e-15, -4.30325224e-17 ] + - [ -7.07950378e-22, 2.54029964e-15, -4.30325225e-17 ] + - [ -1.22844091e-20, 2.19571393e-15, 8.73969512e-17 ] + - [ -8.27211786e-21, 2.25344685e-15, -4.30325225e-17 ] + - [ -8.27211786e-21, 2.25344685e-15, -4.30329989e-17 ] + - [ -2.12327988e-20, 2.11805287e-15, 8.73980101e-17 ] + - [ -2.41737361e-20, 2.09482638e-15, -4.30329989e-17 ] + - [ -2.41737361e-20, 2.09482638e-15, -4.30336342e-17 ] + - [ -3.71896329e-20, 2.02989199e-15, 8.73959984e-17 ] + - [ -1.78869974e-19, 1.71982183e-15, -4.30336342e-17 ] + - [ -1.78869974e-19, 1.71982183e-15, -4.30362282e-17 ] + - [ -2.0812942e-19, 1.68199206e-15, 8.73898045e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.73919221e-17, -6.17356422e-19 ] + - [ 1.44731057e-15, 8.73919221e-17, -5.90588858e-19 ] + - [ 1.45775576e-15, -4.30323902e-17, -2.21225855e-18 ] + - [ 1.09994067e-15, 8.73988043e-17, -1.78160847e-18 ] + - [ 1.15042764e-15, -4.30322843e-17, -5.90588858e-19 ] + - [ 1.45775576e-15, 8.73929809e-17, -2.21225855e-18 ] + - [ 1.09994067e-15, -4.30343489e-17, -5.90588858e-19 ] + - [ 1.45775576e-15, -4.30343489e-17, -6.17356422e-19 ] + - [ 1.44731057e-15, 8.73988043e-17, -3.1411559e-18 ] + - [ 9.86741915e-16, -4.30323902e-17, -3.20526571e-18 ] + - [ 9.78710772e-16, 8.73987513e-17, -5.70456916e-18 ] + - [ 8.43342525e-16, -4.30323902e-17, -5.70456916e-18 ] + - [ 8.43342525e-16, -4.30337401e-17, -6.5702633e-18 ] + - [ 8.13695736e-16, 8.73961573e-17, -6.54344942e-18 ] + - [ 8.14624296e-16, -4.30337401e-17, -6.54344942e-18 ] + - [ 8.14624296e-16, -4.303644e-17, -2.03966095e-17 ] + - [ 6.0986361e-16, 8.73950456e-17, -1.68179482e-17 ] + - [ 6.45245236e-16, -4.303644e-17, -1.68179482e-17 ] + - [ 6.45245236e-16, -4.30362283e-17, -2.97482269e-17 ] + - [ 5.1344585e-16, 8.73883223e-17, -2.62317135e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.3185187e-17, 4.04219525e-16 ] + - [ 8.73875282e-17, -4.3185187e-17, 4.04219419e-16 ] + - [ -4.30344284e-17, -4.3185187e-17, 4.04219419e-16 ] + - [ -4.3033449e-17, -5.01635738e-17, 3.6289194e-16 ] + - [ 8.73933515e-17, -4.70207639e-17, 3.81733659e-16 ] + - [ -4.3033449e-17, -4.70207639e-17, 3.81733659e-16 ] + - [ -4.30326814e-17, -4.70207639e-17, 3.81733659e-16 ] + - [ 8.7399122e-17, -8.37200079e-17, 2.37350434e-16 ] + - [ -4.30326814e-17, -7.79483254e-17, 2.56995352e-16 ] + - [ 8.73954691e-17, -8.37200079e-17, 2.37350434e-16 ] + - [ 8.73954691e-17, -1.13572108e-16, 1.78193787e-16 ] + - [ -4.30344813e-17, -1.08360196e-16, 1.85586214e-16 ] + - [ 8.73940398e-17, -1.13572108e-16, 1.78193787e-16 ] + - [ 8.73940398e-17, -1.30301009e-16, 1.62155324e-16 ] + - [ -4.3035196e-17, -1.19385719e-16, 1.72671927e-16 ] + - [ 8.73892223e-17, -2.88475332e-16, 6.84656327e-17 ] + - [ -4.30341637e-17, -2.20422774e-16, 8.90711915e-17 ] + - [ 8.7391234e-17, -2.92915478e-16, 6.71041067e-17 ] + - [ -4.30354607e-17, -2.20422774e-16, 8.90711915e-17 ] + - [ -4.30354607e-17, -1.89536988e-16, 1.06234302e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.06234302e-16, -4.30365195e-17 ] + - [ -1.30301009e-16, 1.62155324e-16, -4.30338196e-17 ] + - [ -2.88475331e-16, 6.84656327e-17, -4.30329725e-17 ] + - [ -3.64272075e-16, 4.99354705e-17, 8.73949398e-17 ] + - [ -3.43839946e-16, 5.32779551e-17, -4.30329725e-17 ] + - [ -3.43839946e-16, 5.32779551e-17, -4.30329725e-17 ] + - [ -4.38694931e-16, 3.71148327e-17, 8.73974279e-17 ] + - [ -4.21501009e-16, 4.01718673e-17, -4.30329725e-17 ] + - [ -4.21501009e-16, 4.01718673e-17, -4.30336608e-17 ] + - [ -5.15976149e-16, 2.95099062e-17, 8.73985397e-17 ] + - [ -4.81000465e-16, 3.2772558e-17, -4.30336608e-17 ] + - [ -4.81000465e-16, 3.2772558e-17, -4.30352489e-17 ] + - [ -6.31691014e-16, 1.8198817e-17, 8.73976397e-17 ] + - [ -6.31691014e-16, 1.81988104e-17, -4.30352489e-17 ] + - [ -6.31691014e-16, 1.81988104e-17, -4.30365195e-17 ] + - [ -7.26555316e-16, 1.10704476e-17, 8.73937751e-17 ] + - [ -6.95989285e-16, 1.27066141e-17, -4.30365195e-17 ] + - [ -6.95989285e-16, 1.27066141e-17, -4.3036943e-17 ] + - [ -7.80626511e-16, 8.0865821e-18, 8.73919222e-17 ] + - [ -8.8927468e-16, 4.33878809e-18, -4.3036943e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.73919752e-17, -1.16702695e-15 ] + - [ 1.68619588e-18, -4.30339784e-17, -8.8927468e-16 ] + - [ 4.33878809e-18, 8.73966338e-17, -1.16702695e-15 ] + - [ 1.68619588e-18, 8.73966338e-17, -1.27972299e-15 ] + - [ 1.18081169e-18, -4.30332902e-17, -1.16702695e-15 ] + - [ 1.68619547e-18, 8.73975338e-17, -1.27972299e-15 ] + - [ 1.18081169e-18, 8.73975338e-17, -1.57157327e-15 ] + - [ 3.59967855e-19, -4.30338196e-17, -1.23023932e-15 ] + - [ 1.40643554e-18, 8.73975338e-17, -1.57157327e-15 ] + - [ 3.59967855e-19, 8.73975338e-17, -1.68478431e-15 ] + - [ 2.0600279e-19, -4.30350372e-17, -1.52635526e-15 ] + - [ 4.21876637e-19, 8.73952574e-17, -1.68478431e-15 ] + - [ 2.0600279e-19, 8.73952574e-17, -1.75728016e-15 ] + - [ 1.48876767e-19, -4.30359372e-17, -1.64306963e-15 ] + - [ 2.57654816e-19, 8.73922928e-17, -1.75728016e-15 ] + - [ 1.48876767e-19, 8.73922928e-17, -2.03438719e-15 ] + - [ 3.61072283e-20, -4.3036943e-17, -1.75728016e-15 ] + - [ 1.48876715e-19, 8.73902811e-17, -2.03438719e-15 ] + - [ 3.61072283e-20, 8.73902811e-17, -2.37912282e-15 ] + - [ 3.07458629e-21, 8.73902811e-17, -2.33252923e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.49545094e-15, 1.11725624e-21 ] + - [ -4.30347725e-17, -2.49545094e-15, 1.11725624e-21 ] + - [ -4.30335019e-17, -2.62712051e-15, 1.59202959e-22 ] + - [ 8.73975338e-17, -2.59547536e-15, 3.38750703e-22 ] + - [ -4.30335019e-17, -2.59547536e-15, 3.38750703e-22 ] + - [ -4.30337666e-17, -2.69524229e-15, 2.37945407e-23 ] + - [ 8.73984338e-17, -2.69190837e-15, 2.57377828e-23 ] + - [ -4.30337666e-17, -2.69190837e-15, 2.57377828e-23 ] + - [ -4.3034746e-17, -2.7773435e-15, 6.54961918e-25 ] + - [ 8.73977456e-17, -2.76026731e-15, 2.36752814e-24 ] + - [ -4.3034746e-17, -2.76026731e-15, 2.36752814e-24 ] + - [ -4.30342431e-17, -2.82796204e-15, 1.76105215e-133 ] + - [ 8.73958398e-17, -2.82655272e-15, 3.39735027e-31 ] + - [ -4.30342431e-17, -2.82655257e-15, 3.39735027e-31 ] + - [ 8.73967927e-17, 2.92510279e-18, -2.29691669e-16 ] + - [ 3.37507951e-16, 2.31358569e-18, 2.40607594e-16 ] + - [ 6.74607633e-16, 7.57291661e-15, 4.31619465e-17 ] + - [ 6.75401303e-16, 5.67788796e-15, -8.77892601e-17 ] + - [ 7.46077732e-16, 8.88767437e-15, -8.74456823e-17 ] + - [ 8.19545135e-16, 7.57292e-15, 4.31619465e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30331975e-17, 1.08788273e-15 ] + - [ 1.11681141e-14, 4.30331975e-17, 1.08787426e-15 ] + - [ 6.08687443e-15, 4.3354276e-17, 6.75401303e-16 ] + - [ 4.3173667e-15, 4.37686604e-17, 5.96706013e-16 ] + - [ 5.67788626e-15, -8.77892601e-17, 5.54724096e-16 ] + - [ 4.3173667e-15, 4.37686604e-17, 5.54724096e-16 ] + - [ 2.41080948e-15, 4.51334951e-17, 4.82646674e-16 ] + - [ 2.97295221e-15, -8.87364017e-17, 4.56485214e-16 ] + - [ 2.41080948e-15, 4.51334951e-17, 4.56485214e-16 ] + - [ 1.49782338e-15, 4.69316667e-17, 4.28036292e-16 ] + - [ 1.53314847e-15, -9.06121562e-17, 4.29067343e-16 ] + - [ 1.49782338e-15, 4.69316667e-17, 4.29067343e-16 ] + - [ 1.0729398e-15, 4.86731399e-17, 3.95705468e-16 ] + - [ 5.16670081e-16, 5.3878978e-17, 3.97405675e-16 ] + - [ 1.07293938e-15, 4.86731399e-17, 4.29067343e-16 ] + - [ 8.56001644e-16, 4.98820677e-17, 3.97405675e-16 ] + - [ 1.08947092e-15, -9.2069794e-17, 4.11684956e-16 ] + - [ 8.56001644e-16, 4.98820677e-17, 4.11684956e-16 ] + - [ 5.53507544e-16, -9.60738246e-17, 3.75296421e-16 ] + - [ 5.53507332e-16, -9.60738246e-17, 3.72676971e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.72676971e-16, 2.69863265e-16 ] + - [ -1.02191838e-16, 3.60039663e-16, 3.08871673e-16 ] + - [ 6.24073884e-17, 3.707811e-16, 2.52685543e-16 ] + - [ 6.61750968e-17, 3.56279472e-16, 2.69863265e-16 ] + - [ -1.02191838e-16, 3.56012657e-16, 2.52685543e-16 ] + - [ 6.61750968e-17, 3.56012657e-16, 1.876075e-16 ] + - [ 7.33468719e-17, 3.39775882e-16, 6.94556554e-17 ] + - [ 1.00105649e-16, 3.54275604e-16, 1.31200293e-16 ] + - [ -1.10632839e-16, 3.41043679e-16, 1.34361579e-16 ] + - [ 8.16760645e-17, 3.54275604e-16, 1.34361632e-16 ] + - [ 8.16760645e-17, 3.56012657e-16, 1.46156778e-16 ] + - [ -1.09389288e-16, 3.46467019e-16, 1.42295102e-16 ] + - [ 8.03945036e-17, 3.56012657e-16, 1.42295155e-16 ] + - [ 8.03945036e-17, 3.50839403e-16, 1.31200241e-16 ] + - [ -1.10632839e-16, 3.44762577e-16, 5.18206217e-17 ] + - [ 1.08078981e-16, 3.39775882e-16, 6.65293683e-17 ] + - [ -1.3122544e-16, 3.42707251e-16, 5.18206217e-17 ] + - [ 1.08078981e-16, 3.42707251e-16, 3.49608544e-17 ] + - [ 1.31557688e-16, 3.42707251e-16, 3.66673876e-17 ] + - [ -1.54536104e-16, 3.38493262e-16, 3.49608412e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.39793682e-17, -1.57401299e-16 ] + - [ 3.37728815e-16, 1.35374674e-17, 1.67543566e-16 ] + - [ 3.39791976e-16, 1.34422854e-17, -1.81889974e-16 ] + - [ 3.37728815e-16, 1.34422821e-17, -1.81889974e-16 ] + - [ 3.37623995e-16, 1.01665145e-17, 1.79061625e-16 ] + - [ 3.3809071e-16, 1.07111335e-17, -1.88910819e-16 ] + - [ 3.37623995e-16, 1.07111302e-17, -1.88910819e-16 ] + - [ 3.37507951e-16, 2.31358486e-18, 2.40607594e-16 ] + - [ 3.37864975e-16, 5.80947055e-18, -2.05400115e-16 ] + - [ 3.37507951e-16, 5.8094689e-18, -2.05400115e-16 ] + - [ 3.37509222e-16, 2.05790193e-17, 1.52549335e-16 ] + - [ -1.67639704e-16, 3.83192739e-17, -1.43210585e-16 ] + - [ -1.08787596e-15, 1.20265108e-14, 4.30326549e-17 ] + - [ -7.49545062e-16, 3.49413846e-16, 5.89456971e-17 ] + - [ -2.16471047e-16, 3.95338173e-16, 5.63841106e-17 ] + - [ -2.26464897e-16, 3.17244382e-16, -9.59375317e-17 ] + - [ -2.33765262e-16, 3.95338173e-16, 5.63841106e-17 ] + - [ -2.33765262e-16, 5.4790188e-16, 5.34028528e-17 ] + - [ -2.53914693e-16, 4.06408576e-16, -9.40033849e-17 ] + - [ -2.57266191e-16, 5.4790188e-16, 5.34028528e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -9.25201244e-17, -3.2816899e-16 ] + - [ 9.17626144e-16, 4.97633905e-17, -3.2816899e-16 ] + - [ 1.70296629e-15, 4.68567969e-17, -3.81011352e-16 ] + - [ 1.06764881e-15, -8.9808666e-17, -3.45118542e-16 ] + - [ 1.70296629e-15, 4.68567969e-17, -3.45118542e-16 ] + - [ 2.92865663e-15, 4.51915301e-17, -4.47541393e-16 ] + - [ 1.26046485e-15, -8.94020373e-17, -4.08549664e-16 ] + - [ 2.92865663e-15, 4.51915301e-17, -4.08549664e-16 ] + - [ 3.4137236e-15, 4.4719574e-17, -4.98100367e-16 ] + - [ 2.10561081e-15, -8.83629925e-17, -5.56930616e-16 ] + - [ 3.4137236e-15, 4.4719574e-17, -5.56930616e-16 ] + - [ 7.87303394e-15, 4.33560891e-17, -7.49545062e-16 ] + - [ 4.28997196e-15, -8.76795428e-17, -7.62388199e-16 ] + - [ 7.87303394e-15, 4.33560891e-17, -7.62388199e-16 ] + - [ 1.20264498e-14, -8.73971632e-17, -2.18533149e-16 ] + - [ 2.94091372e-16, 6.2231285e-17, -2.16471047e-16 ] + - [ 3.17244488e-16, -9.59375317e-17, -2.12101734e-16 ] + - [ 2.01530127e-16, 6.9625512e-17, -2.16471047e-16 ] + - [ 2.0153018e-16, 6.9625512e-17, -1.97954484e-16 ] + - [ 1.83968328e-16, -1.00844764e-16, -2.00537616e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.84201951e-16, 1.48180234e-16 ] + - [ 7.74469084e-17, -1.87066193e-16, 1.04792494e-16 ] + - [ -1.07568512e-16, -1.84201951e-16, 1.17012597e-16 ] + - [ 8.23898221e-17, -1.77702349e-16, 1.04792494e-16 ] + - [ -1.07568512e-16, -1.77702349e-16, 8.34113703e-17 ] + - [ -1.12419985e-16, -1.79040979e-16, 7.17049779e-17 ] + - [ 9.713026e-17, -1.71669039e-16, 8.34113703e-17 ] + - [ -1.12419985e-16, -1.71669039e-16, 6.86880318e-17 ] + - [ -1.18793802e-16, -1.76119351e-16, 4.22591815e-17 ] + - [ 1.16293149e-16, -1.7318597e-16, 5.30849507e-17 ] + - [ -1.2735794e-16, -1.71669039e-16, 3.83192739e-17 ] + - [ -1.43210585e-16, -1.69740769e-16, 4.22591815e-17 ] + - [ 1.16293149e-16, -1.70216484e-16, 3.83192739e-17 ] + - [ -1.43210585e-16, -1.70216484e-16, 2.05790127e-17 ] + - [ 1.52549335e-16, -1.66089422e-16, 3.62661371e-18 ] + - [ -2.15726876e-16, -1.66089422e-16, 2.31358486e-18 ] + - [ 2.39830759e-16, -1.66109962e-16, 6.9306113e-18 ] + - [ -1.94762916e-16, -1.66089422e-16, 6.93060965e-18 ] + - [ -1.94762916e-16, -1.67639704e-16, 1.53806392e-17 ] + - [ 1.61571401e-16, -1.66295568e-16, 1.36350913e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.50296092e-12, 4.30315829e-17 ] + - [ 1.72671398e-16, 2.56376211e-12, -8.73939074e-17 ] + - [ 3.3965547e-31, 5.58793718e-12, 4.3032242e-17 ] + - [ 4.2994417e-137, 5.58721727e-12, 4.30314502e-17 ] + - [ 4.2994417e-137, 5.55327914e-12, 4.3031768e-17 ] + - [ 2.36744611e-24, 5.58793718e-12, -8.7396761e-17 ] + - [ 6.54960145e-25, 5.55327914e-12, 4.3031768e-17 ] + - [ 6.54960145e-25, 5.51827936e-12, 4.30327209e-17 ] + - [ 2.57378586e-23, 5.56202042e-12, -8.73951247e-17 ] + - [ 2.57378838e-23, 5.51827936e-12, 4.30327209e-17 ] + - [ 2.57378838e-23, 5.46890566e-12, 4.3033065e-17 ] + - [ 2.57378838e-23, 5.48510798e-12, -8.7398407e-17 ] + - [ 3.38740203e-22, 5.46890393e-12, 4.3033065e-17 ] + - [ 1.59202707e-22, 5.46787871e-12, -8.7398407e-17 ] + - [ 3.38740203e-22, 5.46787697e-12, -8.7398407e-17 ] + - [ 4.59843997e-21, 5.33427551e-12, 4.30311328e-17 ] + - [ 3.52913951e-22, 5.35813316e-12, -8.73954425e-17 ] + - [ 4.59843997e-21, 5.35813143e-12, -8.73954425e-17 ] + - [ 6.00105072e-21, 5.31524906e-12, 4.30307622e-17 ] + - [ 3.07458226e-21, 5.14918572e-12, 4.30289887e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30289887e-17, 3.61071896e-20 ] + - [ 5.10987689e-12, 4.3029174e-17, 8.26629111e-20 ] + - [ 5.18162678e-12, -8.73903074e-17, 8.26629111e-20 ] + - [ 5.10987689e-12, 4.3029174e-17, 8.26629111e-20 ] + - [ 4.91303087e-12, 4.30314769e-17, 8.26629111e-20 ] + - [ 4.98259328e-12, -8.73934838e-17, 2.57652335e-19 ] + - [ 4.91302914e-12, 4.30314769e-17, 1.85779517e-19 ] + - [ 4.9557467e-12, -8.7394172e-17, 2.57652335e-19 ] + - [ 4.95574497e-12, -8.7394172e-17, 4.21874156e-19 ] + - [ 4.7935171e-12, 4.30326151e-17, 2.06002636e-19 ] + - [ 4.8398186e-12, -8.7396766e-17, 4.21874156e-19 ] + - [ 4.83981687e-12, -8.7396766e-17, 1.27308741e-18 ] + - [ 4.83981687e-12, -8.7396766e-17, 1.18080549e-18 ] + - [ 4.52040397e-12, 4.3032774e-17, 1.27308741e-18 ] + - [ 4.54096565e-12, -8.73979837e-17, 1.27308741e-18 ] + - [ 4.52040397e-12, 4.3032774e-17, 1.27308741e-18 ] + - [ 4.49029264e-12, 4.30326151e-17, 1.40642562e-18 ] + - [ 4.52040223e-12, -8.73978249e-17, 3.49274115e-18 ] + - [ 2.56376298e-12, -8.73939074e-17, 1.72671398e-16 ] + - [ 2.60372494e-12, -8.73928486e-17, 1.62154636e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.72671398e-16, 2.84635551e-12 ] + - [ 4.30284594e-17, 1.00444568e-16, 2.84635637e-12 ] + - [ 4.30284594e-17, 8.90706093e-17, 2.84635637e-12 ] + - [ 4.30284594e-17, 8.90687035e-17, 2.97286542e-12 ] + - [ -8.73912075e-17, 8.90706093e-17, 2.97288017e-12 ] + - [ 4.30294653e-17, 6.84653682e-17, 2.97286542e-12 ] + - [ -8.73912075e-17, 6.84653682e-17, 3.15889196e-12 ] + - [ -8.73959721e-17, 6.19229387e-17, 3.1155577e-12 ] + - [ 4.30313182e-17, 6.08598064e-17, 3.15889196e-12 ] + - [ -8.73959721e-17, 6.08598064e-17, 3.27078683e-12 ] + - [ -8.73980367e-17, 4.99353515e-17, 3.16584734e-12 ] + - [ 4.3031927e-17, 5.32778229e-17, 3.27078683e-12 ] + - [ -8.73980367e-17, 5.32778229e-17, 3.38799516e-12 ] + - [ -8.73985131e-17, 4.01715762e-17, 3.22894443e-12 ] + - [ 4.30325622e-17, 4.01701204e-17, 3.38799516e-12 ] + - [ -8.73985131e-17, 4.01701204e-17, 3.50786455e-12 ] + - [ -8.73969249e-17, 2.95098137e-17, 3.38801164e-12 ] + - [ 4.30331181e-17, 3.27724258e-17, 3.50786455e-12 ] + - [ -8.73969249e-17, 3.27724258e-17, 3.71013025e-12 ] + - [ -8.73923721e-17, 1.36392504e-17, 3.47205205e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.80901642e-12, -8.73911545e-17 ] + - [ 1.1070398e-17, 3.71013198e-12, 4.30300476e-17 ] + - [ 1.27065414e-17, 3.80901642e-12, -8.73911545e-17 ] + - [ 1.27065414e-17, 4.19700121e-12, -8.73927956e-17 ] + - [ 3.49274115e-18, 3.7464224e-12, 4.30298094e-17 ] + - [ 4.3387484e-18, 4.19700121e-12, -8.73927956e-17 ] + - [ 4.3387484e-18, 4.4902909e-12, 4.30326151e-17 ] + - [ 1.8558378e-16, 2.56376211e-12, -8.73939074e-17 ] + - [ 2.56994506e-16, 2.25381733e-12, 4.30334093e-17 ] + - [ 1.71564325e-16, 2.30110156e-12, -8.73988308e-17 ] + - [ 2.56994506e-16, 2.30110069e-12, -8.73988308e-17 ] + - [ 3.81732813e-16, 1.9309055e-12, 4.30313446e-17 ] + - [ 2.37349271e-16, 1.98239816e-12, -8.73961309e-17 ] + - [ 3.81732813e-16, 1.9823973e-12, -8.73961309e-17 ] + - [ 4.00453088e-16, 1.87869553e-12, 4.30306564e-17 ] + - [ 3.62890565e-16, 1.87869639e-12, -8.73935898e-17 ] + - [ 4.00453088e-16, 1.87869553e-12, -8.73935898e-17 ] + - [ 5.50384323e-16, 1.59029754e-12, 4.30276389e-17 ] + - [ 4.00453088e-16, 1.64791422e-12, -8.738819e-17 ] + - [ 5.50384323e-16, 1.64791378e-12, -8.738819e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.73875547e-17, 6.45243543e-16 ] + - [ 1.49469693e-12, -8.73875547e-17, 8.20716159e-16 ] + - [ 1.1230411e-12, 4.30315035e-17, 6.09861706e-16 ] + - [ 1.13636074e-12, -8.73949662e-17, 8.20716159e-16 ] + - [ 1.13636031e-12, -8.73949662e-17, 8.43341256e-16 ] + - [ 1.07962531e-12, 4.30319535e-17, 8.13693832e-16 ] + - [ 8.99812229e-13, 4.30332505e-17, 9.86725824e-16 ] + - [ 1.13636031e-12, -8.73949662e-17, 9.86741918e-16 ] + - [ 8.99812229e-13, 4.30332505e-17, 9.86741918e-16 ] + - [ 8.10705555e-13, 4.30332769e-17, 1.15042595e-15 ] + - [ 8.99803772e-13, -8.7398725e-17, 1.09993771e-15 ] + - [ 8.10705555e-13, 4.30332769e-17, 1.09993771e-15 ] + - [ 6.21391713e-13, 4.30303388e-17, 1.09993771e-15 ] + - [ 6.50359426e-13, -8.73941192e-17, 1.45775407e-15 ] + - [ 6.21391496e-13, 4.30303388e-17, 1.41417084e-15 ] + - [ 6.09983304e-13, -8.7392531e-17, 1.45775407e-15 ] + - [ 6.09983087e-13, -8.7392531e-17, 1.47458631e-15 ] + - [ 6.09983087e-13, 4.3030127e-17, 1.47458631e-15 ] + - [ 5.9356111e-13, 4.30298094e-17, 1.49848619e-15 ] + - [ 6.09983087e-13, -8.7392531e-17, 1.71982013e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.71982013e-15, 4.57438443e-13 ] + - [ -8.73893547e-17, 2.09482469e-15, 3.40825509e-13 ] + - [ 4.30318476e-17, 1.6819891e-15, 3.57547702e-13 ] + - [ -8.73949133e-17, 2.09482469e-15, 3.57547593e-13 ] + - [ -8.73949133e-17, 2.17644818e-15, 3.57547593e-13 ] + - [ -8.73949133e-17, 2.17644818e-15, 3.18669079e-13 ] + - [ 4.30324299e-17, 2.17644818e-15, 3.18668971e-13 ] + - [ -8.73971368e-17, 2.1957114e-15, 3.18669079e-13 ] + - [ 4.30324299e-17, 2.1957114e-15, 2.96403686e-13 ] + - [ 4.30328534e-17, 2.25344347e-15, 3.13232564e-13 ] + - [ -8.73974015e-17, 2.50175287e-15, 2.96403686e-13 ] + - [ 4.30328534e-17, 2.50175287e-15, 2.11452246e-13 ] + - [ 4.3032324e-17, 2.54029795e-15, 2.19399936e-13 ] + - [ -8.73975603e-17, 2.72902028e-15, 2.19399936e-13 ] + - [ -8.73975603e-17, 2.70672299e-15, 1.60624415e-13 ] + - [ 4.30294653e-17, 2.72902028e-15, 1.6835147e-13 ] + - [ -8.73919487e-17, 2.72288946e-15, 1.60624415e-13 ] + - [ 4.30294653e-17, 2.72288946e-15, 1.32793162e-13 ] + - [ 4.30291741e-17, 2.79050979e-15, 1.62829736e-13 ] + - [ -8.73914193e-17, 2.79050979e-15, 1.32793162e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.32793325e-13, -8.73905723e-17 ] + - [ 2.81212607e-15, 1.11570136e-13, 4.30302329e-17 ] + - [ 2.81212607e-15, 8.58364344e-14, 4.30328799e-17 ] + - [ 2.81073355e-15, 1.17209761e-13, -8.73918428e-17 ] + - [ 2.81867872e-15, 8.58364344e-14, 4.30328799e-17 ] + - [ 2.81867872e-15, 8.24875507e-14, 4.30330387e-17 ] + - [ 2.80225306e-15, 8.98558157e-14, -8.73975074e-17 ] + - [ 2.80225306e-15, 8.24875507e-14, 4.30330387e-17 ] + - [ 2.80225306e-15, 5.99775078e-14, 4.30322446e-17 ] + - [ 2.70113257e-15, 8.24875236e-14, -8.73983544e-17 ] + - [ 2.72634027e-15, 5.99775078e-14, 4.30322446e-17 ] + - [ 2.72634027e-15, 5.2750684e-14, 4.30308947e-17 ] + - [ 2.62106085e-15, 6.42659882e-14, -8.73975074e-17 ] + - [ 2.6536191e-15, 5.2750684e-14, 4.30308947e-17 ] + - [ 2.6536191e-15, 4.83646526e-14, 4.30297829e-17 ] + - [ 2.54541573e-15, 5.48884732e-14, -8.7395178e-17 ] + - [ 2.54541911e-15, 4.83646526e-14, 4.30297829e-17 ] + - [ 2.54541911e-15, 4.19471515e-14, 4.302883e-17 ] + - [ 2.4131024e-15, 4.83648017e-14, -8.73918428e-17 ] + - [ 2.41619916e-15, 4.19471515e-14, 4.302883e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.7389937e-17, 2.02236102e-15 ] + - [ 2.80120333e-14, 4.30315564e-17, 2.41619916e-15 ] + - [ 2.950604e-14, -8.73944369e-17, 2.02236102e-15 ] + - [ 2.95060264e-14, -8.73944369e-17, 1.6773787e-15 ] + - [ 2.18564755e-14, 4.30330917e-17, 2.08191591e-15 ] + - [ 2.279223e-14, -8.73984603e-17, 1.6773787e-15 ] + - [ 2.27922232e-14, -8.73984603e-17, 1.50574187e-15 ] + - [ 1.78747565e-14, 4.30321652e-17, 1.71446519e-15 ] + - [ 1.78748717e-14, -8.73966074e-17, 1.50574187e-15 ] + - [ 1.7874865e-14, -8.73966074e-17, 1.40707185e-15 ] + - [ 1.57972761e-14, 4.30313976e-17, 1.50574611e-15 ] + - [ 1.67431815e-14, -8.73957604e-17, 1.40707185e-15 ] + - [ 1.67431747e-14, -8.73957604e-17, 1.08787426e-15 ] + - [ 1.20264735e-14, 4.30326946e-17, 1.45278707e-15 ] + - [ 1.2516787e-14, -8.73951251e-17, 1.08787426e-15 ] + - [ 1.25167836e-14, -8.73951251e-17, 1.08788273e-15 ] + - [ 5.27506027e-14, -8.73940928e-17, -2.70113088e-15 ] + - [ 6.42660153e-14, 4.30326284e-17, -2.72634027e-15 ] + - [ 5.99773181e-14, -8.73967927e-17, -2.81867872e-15 ] + - [ 6.42659882e-14, 4.30326284e-17, -2.6536191e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.58333062e-15, 5.27505892e-14 ] + - [ -8.73940928e-17, -2.58333062e-15, 4.63986552e-14 ] + - [ -8.73910223e-17, -2.5076262e-15, 5.04765971e-14 ] + - [ 4.30303256e-17, -2.5076262e-15, 4.63986552e-14 ] + - [ -8.73910223e-17, -2.5076262e-15, 4.00926914e-14 ] + - [ -8.73900694e-17, -2.37003417e-15, 4.63986688e-14 ] + - [ 4.30293727e-17, -2.41619916e-15, 4.00926914e-14 ] + - [ -8.73900694e-17, -2.41619916e-15, 2.80119926e-14 ] + - [ -8.73954163e-17, -2.02235933e-15, 4.20841947e-14 ] + - [ 4.30288433e-17, -2.08191591e-15, 2.80119926e-14 ] + - [ -8.73954163e-17, -2.08191591e-15, 2.42077847e-14 ] + - [ -8.73981691e-17, -1.76826449e-15, 2.950604e-14 ] + - [ 4.30310932e-17, -1.76826449e-15, 2.42077847e-14 ] + - [ -8.73981691e-17, -1.76826449e-15, 2.18564348e-14 ] + - [ -8.73984867e-17, -1.67737701e-15, 2.42077915e-14 ] + - [ 4.30329461e-17, -1.71446519e-15, 2.18564348e-14 ] + - [ -8.73984867e-17, -1.71446519e-15, 1.78747565e-14 ] + - [ -8.73966339e-17, -1.50574187e-15, 2.279223e-14 ] + - [ 4.30331314e-17, -1.55197547e-15, 1.78747565e-14 ] + - [ -8.73966339e-17, -1.55197547e-15, 1.57972354e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.57972354e-14, -8.73950986e-17 ] + - [ -1.45278707e-15, 1.20264464e-14, -8.73971632e-17 ] + - [ -1.08787596e-15, 1.67431815e-14, 4.30317549e-17 ] + - [ -1.14426209e-15, 1.20264464e-14, -8.73971632e-17 ] + - [ -1.14426209e-15, 1.20265074e-14, 4.30326549e-17 ] + - [ -1.92938899e-15, 3.40824859e-13, -8.73959986e-17 ] + - [ -1.6819891e-15, 4.57438443e-13, 4.30285786e-17 ] + - [ -2.09482639e-15, 4.40751762e-13, -8.73898047e-17 ] + - [ -1.6819891e-15, 4.40751653e-13, -8.73898047e-17 ] + - [ -1.44731015e-15, 6.28407151e-13, 4.30304844e-17 ] + - [ -1.71982183e-15, 5.9356111e-13, -8.73919222e-17 ] + - [ -1.44731015e-15, 5.93560893e-13, -8.73919222e-17 ] + - [ -1.45775576e-15, 5.99773452e-14, -8.73967927e-17 ] + - [ -2.81073355e-15, 8.98558429e-14, 4.30326284e-17 ] + - [ -2.81867872e-15, 8.58362446e-14, -8.73980632e-17 ] + - [ -2.81870413e-15, 8.98558429e-14, 4.30326284e-17 ] + - [ -2.81870413e-15, 1.17209816e-13, 4.30297962e-17 ] + - [ -2.81212607e-15, 8.98715367e-14, -8.73975338e-17 ] + - [ -2.81946646e-15, 1.17209816e-13, 4.30297962e-17 ] + - [ -2.81946646e-15, 1.41219364e-13, 4.3029055e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.3029055e-17, -2.79050979e-15 ] + - [ 1.68351524e-13, 4.30298491e-17, -2.70672299e-15 ] + - [ 1.32793108e-13, -8.73905988e-17, -2.72902198e-15 ] + - [ 1.68351524e-13, 4.30298491e-17, -2.72902198e-15 ] + - [ 1.74269316e-13, 4.30301668e-17, -2.68810351e-15 ] + - [ 1.60624035e-13, -8.7391234e-17, -2.68810351e-15 ] + - [ 1.74269316e-13, 4.30301668e-17, -2.68810351e-15 ] + - [ 2.1939999e-13, 4.30326814e-17, -2.50175287e-15 ] + - [ 1.74269262e-13, -8.73926105e-17, -2.54029965e-15 ] + - [ 2.1939999e-13, 4.30326814e-17, -2.54029965e-15 ] + - [ 3.13232673e-13, 4.30325755e-17, -2.1957114e-15 ] + - [ 2.11451867e-13, -8.73969515e-17, -2.25344686e-15 ] + - [ 3.13232673e-13, 4.30325755e-17, -2.25344686e-15 ] + - [ 3.34657375e-13, 4.30320461e-17, -2.11805203e-15 ] + - [ 2.96402927e-13, -8.73980103e-17, -2.09482639e-15 ] + - [ 3.34657375e-13, 4.30320461e-17, -2.09482639e-15 ] + - [ 3.57547702e-13, 4.30313579e-17, -2.02988776e-15 ] + - [ 3.40824859e-13, -8.73959986e-17, -1.92938899e-15 ] + - [ 1.13636031e-12, 4.30313579e-17, -9.27942585e-16 ] + - [ 8.99812012e-13, -8.73987514e-17, -9.86725824e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -9.27942585e-16, 8.38928855e-13 ] + - [ 4.30333961e-17, -1.15042765e-15, 8.38929072e-13 ] + - [ 4.30333961e-17, -1.45775576e-15, 6.21390412e-13 ] + - [ -8.7392981e-17, -1.09993771e-15, 6.50359209e-13 ] + - [ 4.30309344e-17, -1.45775576e-15, 6.50359426e-13 ] + - [ 4.30309344e-17, -1.44731015e-15, 2.50296006e-12 ] + - [ -8.73954691e-17, -1.72671927e-16, 2.53520249e-12 ] + - [ 4.30311991e-17, -1.8558378e-16, 2.53520249e-12 ] + - [ 4.30311991e-17, -2.56995353e-16, 2.25381647e-12 ] + - [ -8.7399122e-17, -1.78193735e-16, 2.30110069e-12 ] + - [ 4.30332902e-17, -2.56995353e-16, 2.30110156e-12 ] + - [ 4.30332902e-17, -3.8173366e-16, 8.99812229e-13 ] + - [ -8.73987514e-17, -8.43342526e-16, 1.13636074e-12 ] + - [ 4.30313579e-17, -8.13693832e-16, 1.07962271e-12 ] + - [ -8.73961574e-17, -8.14624298e-16, 1.13636074e-12 ] + - [ 4.30313579e-17, -8.14624298e-16, 1.49469737e-12 ] + - [ 4.30276521e-17, -6.09861706e-16, 1.13459956e-12 ] + - [ -8.73950457e-17, -6.45244813e-16, 1.49469737e-12 ] + - [ 4.30276521e-17, -6.45244813e-16, 1.64791422e-12 ] + - [ 4.30279962e-17, -5.13443099e-16, 1.43606068e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.86806254e-12, 4.30305373e-17 ] + - [ -4.0421942e-16, 1.59029581e-12, -8.73875282e-17 ] + - [ -4.0421942e-16, 1.86806254e-12, 4.30305373e-17 ] + - [ -4.0421942e-16, 1.98239816e-12, 4.30319402e-17 ] + - [ -3.62890565e-16, 1.86806167e-12, -8.73933516e-17 ] + - [ -3.8173366e-16, 1.98239816e-12, 4.30319402e-17 ] + - [ -3.8173366e-16, 2.05432153e-12, 4.30326549e-17 ] + - [ -3.35926118e-16, 1.93090376e-12, -8.73949398e-17 ] + - [ -2.37349271e-16, 3.27078683e-12, 4.30328931e-17 ] + - [ -6.19229387e-17, 3.1155551e-12, -8.73949397e-17 ] + - [ -6.84656329e-17, 3.15889283e-12, 4.30318608e-17 ] + - [ -6.71040804e-17, 3.1155551e-12, -8.73949397e-17 ] + - [ -6.71040804e-17, 2.9728793e-12, -8.7391234e-17 ] + - [ -8.90687564e-17, 3.12464939e-12, 4.30314373e-17 ] + - [ -8.06776246e-17, 2.9728793e-12, -8.7391234e-17 ] + - [ -8.06776246e-17, 2.84635377e-12, -8.73892223e-17 ] + - [ -1.06234303e-16, 3.03215393e-12, 4.30302197e-17 ] + - [ -1.00444568e-16, 2.84635377e-12, -8.73892223e-17 ] + - [ -1.00444568e-16, 2.55901417e-12, -8.73940398e-17 ] + - [ -1.72671927e-16, 2.88984416e-12, 4.30286844e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.30311991e-17, -6.84656329e-17 ] + - [ 3.2289427e-12, -8.73974279e-17, -4.99353515e-17 ] + - [ 3.27078683e-12, 4.30328931e-17, -5.32779552e-17 ] + - [ 3.38801164e-12, -8.73985396e-17, -4.99353515e-17 ] + - [ 3.38801077e-12, -8.73985396e-17, -3.56588494e-17 ] + - [ 3.43973328e-12, 4.30329196e-17, -4.01701468e-17 ] + - [ 3.47205032e-12, -8.73976396e-17, -3.56588494e-17 ] + - [ 3.47204945e-12, -8.73976396e-17, -2.95098137e-17 ] + - [ 3.50786455e-12, 4.30323372e-17, -3.27725581e-17 ] + - [ 3.6263557e-12, 4.3030749e-17, -1.81988105e-17 ] + - [ 3.47204945e-12, -8.73976396e-17, -1.81988105e-17 ] + - [ 3.6263557e-12, 4.3030749e-17, -1.81988105e-17 ] + - [ 3.80901816e-12, 4.3029452e-17, -1.1070398e-17 ] + - [ 3.62635484e-12, -8.7393775e-17, -1.27066141e-17 ] + - [ 3.80901816e-12, 4.3029452e-17, -1.27066141e-17 ] + - [ 3.94212349e-12, 4.3029055e-17, -7.46926385e-18 ] + - [ 3.74641719e-12, -8.73919221e-17, -3.49274115e-18 ] + - [ 4.19700121e-12, 4.30302726e-17, -1.27066141e-17 ] + - [ 4.14114485e-12, -8.73919751e-17, -3.49274115e-18 ] + - [ 4.14114311e-12, -8.73919751e-17, -1.68619547e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.68619547e-18, 4.42556143e-12 ] + - [ -8.73966337e-17, -1.18080549e-18, 4.54096565e-12 ] + - [ 4.30328931e-17, -1.68619547e-18, 4.49029264e-12 ] + - [ -8.73975337e-17, -1.18080549e-18, 4.4902909e-12 ] + - [ -8.73975337e-17, -3.59966305e-19, 4.83981687e-12 ] + - [ 4.30322578e-17, -1.40643471e-18, 4.79351536e-12 ] + - [ -8.73975337e-17, -3.59966305e-19, 4.79351363e-12 ] + - [ -8.73975337e-17, -2.06002636e-19, 4.95574497e-12 ] + - [ 4.30309608e-17, -4.21876638e-19, 4.91303087e-12 ] + - [ -8.73952573e-17, -2.06002636e-19, 4.91302914e-12 ] + - [ -8.73952573e-17, -1.85779517e-19, 4.98259155e-12 ] + - [ 4.30306167e-17, -2.57654816e-19, 5.02998246e-12 ] + - [ -8.73922926e-17, -1.85779517e-19, 5.02998073e-12 ] + - [ -8.73922926e-17, -1.48876612e-19, 5.02998073e-12 ] + - [ 4.30300078e-17, -1.48876612e-19, 5.18162852e-12 ] + - [ 4.30290285e-17, -3.61071896e-20, 5.02998073e-12 ] + - [ -8.73922926e-17, -5.10683795e-20, 5.18162852e-12 ] + - [ 4.30290285e-17, -5.10683795e-20, 5.35813316e-12 ] + - [ 4.30316225e-17, -3.07458226e-21, 5.14918398e-12 ] + - [ -8.73902809e-17, -4.59852075e-21, 5.35813316e-12 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.33427551e-12, -8.7394569e-17 ] + - [ -1.11725625e-21, 5.41769316e-12, 4.30326283e-17 ] + - [ -1.11725625e-21, 5.48510798e-12, 4.30330783e-17 ] + - [ -1.59202707e-22, 5.41769142e-12, -8.73975336e-17 ] + - [ -3.387503e-22, 5.48510798e-12, 4.30330783e-17 ] + - [ -3.387503e-22, 5.51827936e-12, 4.30327342e-17 ] + - [ -2.57378838e-23, 5.46890393e-12, -8.73984335e-17 ] + - [ -2.57378586e-23, 5.51827936e-12, 4.30327342e-17 ] + - [ -2.57378586e-23, 5.56202215e-12, 4.30314636e-17 ] + - [ -2.57378586e-23, 5.55327914e-12, -8.73958394e-17 ] + - [ -6.54960145e-25, 5.56202042e-12, 4.30314636e-17 ] + - [ -2.36752657e-24, 5.58208596e-12, -8.73940393e-17 ] + - [ -6.54960145e-25, 5.58208423e-12, -8.73940393e-17 ] + - [ 1.07486042e-137, 5.58793718e-12, 4.3032242e-17 ] + - [ -1.50513061e-27, 5.58721727e-12, -8.73952038e-17 ] + - [ 1.07486042e-137, 5.58721554e-12, -8.73952038e-17 ] + - [ 4.2994417e-137, 2.31358569e-18, 2.40607594e-16 ] + - [ 3.37507951e-16, 7.32554764e-19, 3.24530136e-16 ] + - [ 3.37505622e-16, 2.31358486e-18, -2.4522837e-16 ] + - [ 3.37505833e-16, 7.32554764e-19, 3.24530136e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.92458087e-16, 3.37505833e-16 ] + - [ -2.39339056e-16, -2.08222244e-18, 3.37505833e-16 ] + - [ -2.21230049e-16, -2.61052947e-18, 3.37508057e-16 ] + - [ 7.32606049e-19, -3.24521877e-16, 3.37507951e-16 ] + - [ -4.77069052e-18, 1.92458087e-16, 3.37508057e-16 ] + - [ 7.32605842e-19, -3.24521877e-16, 3.37505833e-16 ] + - [ -1.02058928e-18, 2.98553541e-16, 3.37508057e-16 ] + - [ 7.32605843e-19, -3.24521877e-16, 3.37508057e-16 ] + - [ -1.27179035e-20, 5.46107653e-16, 3.37508057e-16 ] + - [ -7.03363764e-16, -6.89884255e-24, 3.37505833e-16 ] + - [ 7.32606049e-19, -3.24521877e-16, 3.37508057e-16 ] + - [ -7.31148138e-16, 2.53064354e-68, 3.37508057e-16 ] + - [ -1.02062899e-18, -2.98550153e-16, 3.37507951e-16 ] + - [ -2.39339056e-16, -2.08222244e-18, 3.37508057e-16 ] + - [ 7.32606048e-19, -3.24521877e-16, 3.37505833e-16 ] + - [ -3.6463217e-16, -4.06980148e-19, 3.37508057e-16 ] + - [ 7.32606048e-19, -3.24521877e-16, 3.37508057e-16 ] + - [ -6.20327431e-16, -1.69284793e-21, 3.37508057e-16 ] + - [ -7.03365231e-16, 6.8980032e-24, 3.37505833e-16 ] + - [ 7.32606049e-19, -3.24521877e-16, 3.37508057e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.37508057e-16, 7.32605841e-19 ] + - [ -3.24521877e-16, 3.37508057e-16, -1.43716317e-16 ] + - [ 1.1729105e-17, 3.37508056e-16, -3.58166022e-22 ] + - [ 6.63135842e-16, 3.37505833e-16, 7.32606049e-19 ] + - [ -3.24521877e-16, 3.37508056e-16, -4.71100149e-26 ] + - [ 7.23103657e-16, 3.37505833e-16, -4.71100272e-26 ] + - [ 7.23103657e-16, 3.3750795e-16, 2.47733785e-26 ] + - [ 7.24326773e-16, 3.3750795e-16, 7.32605843e-19 ] + - [ -3.24521877e-16, 3.37505833e-16, 2.69160197e-22 ] + - [ 6.66775966e-16, 3.37507951e-16, 7.32605843e-19 ] + - [ -3.24521877e-16, 3.37507951e-16, 1.94444544e-19 ] + - [ 4.12449403e-16, 3.37508057e-16, -4.77058464e-18 ] + - [ -1.92459251e-16, 3.37507951e-16, 1.94441701e-19 ] + - [ -4.12450462e-16, 3.37508057e-16, -1.67610448e-17 ] + - [ -1.22673689e-16, 3.37507951e-16, -1.67610448e-17 ] + - [ -1.22673689e-16, 3.37508057e-16, -4.80936302e-16 ] + - [ 5.23190506e-20, 3.37508057e-16, 7.32605842e-19 ] + - [ -3.24521877e-16, 3.37505833e-16, -3.64635558e-16 ] + - [ 4.06960089e-19, 3.37508057e-16, 7.32605842e-19 ] + - [ -3.24521877e-16, 3.37508057e-16, -2.21226608e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 7.32606049e-19, -3.24521877e-16 ] + - [ 3.37508057e-16, -4.40673718e-17, 7.12424185e-17 ] + - [ 3.37505833e-16, -4.4067385e-17, 7.12424185e-17 ] + - [ 3.37508057e-16, -4.406896e-17, -7.12397715e-17 ] + - [ 3.37508057e-16, 1.944417e-19, -4.12450462e-16 ] + - [ 3.37507951e-16, -8.26682312e-17, -3.77397445e-17 ] + - [ 3.37508057e-16, 1.944417e-19, -4.12450462e-16 ] + - [ 3.37508057e-16, -2.21230049e-16, -2.61052947e-18 ] + - [ 3.3750795e-16, -4.71021386e-26, -7.23104504e-16 ] + - [ 3.37508056e-16, -2.02251526e-19, -4.094598e-16 ] + - [ 3.37507951e-16, -1.27177516e-20, -5.46109347e-16 ] + - [ 3.37508056e-16, 1.94441701e-19, -4.12450462e-16 ] + - [ 3.37507951e-16, -1.27177516e-20, -5.46109347e-16 ] + - [ 3.37507951e-16, -3.58114424e-22, -6.63138383e-16 ] + - [ 3.37508056e-16, 1.14745508e-20, -5.51454548e-16 ] + - [ 3.3750795e-16, -3.58114424e-22, -6.63138383e-16 ] + - [ 3.3750795e-16, 2.47722013e-26, -7.24326773e-16 ] + - [ -1.66089422e-16, 2.31358569e-18, 2.39830759e-16 ] + - [ -1.66089422e-16, 8.34081258e-19, -3.12475904e-16 ] + - [ -1.66089422e-16, 7.32572755e-19, 3.24531089e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -8.10271686e-24, -1.66089422e-16 ] + - [ -7.31180328e-16, -2.52985206e-68, -1.66089475e-16 ] + - [ 1.9544548e-19, -4.12069403e-16, -1.66089475e-16 ] + - [ 1.95443364e-19, 4.1207025e-16, -1.66089421e-16 ] + - [ 8.34081051e-19, -3.12475904e-16, -1.66089422e-16 ] + - [ 1.16418998e-20, 5.50744099e-16, -1.66089421e-16 ] + - [ 8.34081051e-19, -3.12475904e-16, -1.66089421e-16 ] + - [ 3.51445234e-26, 7.23712886e-16, -1.66089421e-16 ] + - [ -2.92407377e-26, 7.24102521e-16, -1.66089422e-16 ] + - [ 8.34081258e-19, -3.12475904e-16, -1.66089474e-16 ] + - [ -2.71748266e-22, 6.66655052e-16, -1.66089422e-16 ] + - [ -2.71748367e-22, 6.66655052e-16, -1.66089474e-16 ] + - [ -2.04797775e-17, 1.11328795e-16, -1.66089422e-16 ] + - [ -4.77094198e-18, 1.92460893e-16, -1.66089475e-16 ] + - [ 1.95445432e-19, -4.12069403e-16, -1.66089475e-16 ] + - [ 1.95445432e-19, -4.12069403e-16, -1.66089104e-16 ] + - [ -9.84153633e-19, 3.00852071e-16, -1.66089475e-16 ] + - [ 7.32594262e-19, -3.2452283e-16, -1.66089422e-16 ] + - [ -9.84153633e-19, 3.00852071e-16, -1.66089422e-16 ] + - [ -1.92843588e-19, 4.1305302e-16, -1.66089474e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.66089475e-16, 1.95445484e-19 ] + - [ -4.12069403e-16, -1.66089422e-16, -6.16358236e-16 ] + - [ -1.99190865e-21, -1.66089475e-16, 1.95445484e-19 ] + - [ -4.12069403e-16, -1.66089475e-16, -3.59994664e-16 ] + - [ -4.28279946e-19, -1.66089475e-16, -2.34664281e-16 ] + - [ -2.21477235e-18, -1.66089422e-16, 1.95445484e-19 ] + - [ -4.12069403e-16, -1.66089475e-16, -1.53086672e-16 ] + - [ -1.00689039e-17, -1.66089422e-16, -1.53086672e-16 ] + - [ -1.00689039e-17, -1.66089475e-16, -2.04803135e-17 ] + - [ -1.11326677e-16, -1.66089421e-16, 2.92957795e-22 ] + - [ -6.65822842e-16, -1.66089475e-16, 1.95445432e-19 ] + - [ -4.12069403e-16, -1.66089475e-16, -2.34665022e-16 ] + - [ 2.21471941e-18, -1.66089422e-16, -1.5308879e-16 ] + - [ 1.00684738e-17, -1.66089475e-16, -4.73514387e-16 ] + - [ 6.21109623e-20, -1.66089422e-16, 1.95445484e-19 ] + - [ -4.12069403e-16, -1.66089475e-16, -6.16352941e-16 ] + - [ 1.99220915e-21, -1.66089422e-16, -6.16353154e-16 ] + - [ 1.99220915e-21, -1.66089475e-16, 2.92957693e-22 ] + - [ -6.65822842e-16, -1.66089421e-16, -2.04803135e-17 ] + - [ -1.11326677e-16, -1.66089475e-16, 1.16417964e-20 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.74643048e-17, -6.48788982e-17 ] + - [ -1.66089475e-16, 1.95445484e-19, -4.12069403e-16 ] + - [ -1.66089475e-16, -2.71745136e-22, -6.66654629e-16 ] + - [ -1.66089475e-16, -1.12491441e-20, -5.52392002e-16 ] + - [ -1.66089474e-16, -9.84143707e-19, -3.00853765e-16 ] + - [ -1.66089474e-16, -2.04803135e-17, -1.11326677e-16 ] + - [ -1.66089475e-16, 3.5142958e-26, -7.23713309e-16 ] + - [ -1.66089421e-16, -4.77082287e-18, -1.92461951e-16 ] + - [ -1.66089475e-16, 3.5142958e-26, -7.23713309e-16 ] + - [ -1.66089475e-16, -2.92415389e-26, -7.24102521e-16 ] + - [ -1.66089474e-16, -9.84143707e-19, -3.00853765e-16 ] + - [ -1.66089474e-16, -2.04797841e-17, 1.11328795e-16 ] + - [ -1.66089475e-16, 1.95445432e-19, -4.12069403e-16 ] + - [ -1.66089422e-16, -4.74644107e-17, 6.48788982e-17 ] + - [ -1.66089475e-16, 1.95445432e-19, -4.12069403e-16 ] + - [ -1.66089475e-16, -1.53088737e-16, 1.00684738e-17 ] + - [ 5.4391687e-320, 6.78433315e-310, 6.78433315e-310 ] + - [ 5.32996432e-310, 5.32996432e-310, 5.4587234e-10 ] + - [ 7.87613163e-22, -1.15751619e-13, 5.52354266e-10 ] + - [ 4.56331366e-22, -1.19425546e-13, 5.4587234e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.57563876e-10, 6.84450654e-22 ] + - [ -1.23096763e-13, 5.46997662e-10, 1.02751805e-21 ] + - [ -1.23096763e-13, 5.48066584e-10, 1.33898144e-21 ] + - [ -1.22804354e-13, 5.58832639e-10, 8.36970561e-22 ] + - [ -1.26492484e-13, 5.48066584e-10, 1.33898144e-21 ] + - [ -1.26492484e-13, 5.49070226e-10, 1.66282669e-21 ] + - [ -1.25964911e-13, 5.60045003e-10, 1.14682593e-21 ] + - [ -1.29601434e-13, 5.49070226e-10, 1.66282669e-21 ] + - [ -1.29601434e-13, 5.56105043e-10, 2.13366996e-21 ] + - [ -1.30885455e-13, 5.611872e-10, 1.48147865e-21 ] + - [ -1.32414397e-13, 5.56105043e-10, 2.13366996e-21 ] + - [ -1.32414397e-13, 5.63229122e-10, 2.69224952e-21 ] + - [ -1.34920747e-13, 5.62249462e-10, 1.96685413e-21 ] + - [ -1.33391696e-13, 5.63229122e-10, 2.69224952e-21 ] + - [ -1.33391696e-13, 5.64127959e-10, 3.49905393e-21 ] + - [ -1.37104872e-13, 5.68421858e-10, 1.80717596e-21 ] + - [ -1.37987738e-13, 5.64127959e-10, 3.49905393e-21 ] + - [ -1.37987738e-13, 5.64950412e-10, 5.04931964e-21 ] + - [ -1.38953654e-13, 5.70392282e-10, 3.30883674e-21 ] + - [ -1.41252162e-13, 5.64950412e-10, 5.04931964e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.42525704e-21, -1.41609515e-13 ] + - [ 5.65699147e-10, 6.64152923e-21, -1.41609515e-13 ] + - [ 5.59374428e-10, 6.94894231e-21, -1.39099587e-13 ] + - [ 5.66377715e-10, 9.76156965e-21, -1.40283102e-13 ] + - [ 5.59374428e-10, 6.94894231e-21, -1.40283102e-13 ] + - [ 5.53078132e-10, 7.39574262e-21, -1.37209172e-13 ] + - [ 5.60029016e-10, 1.01450389e-20, -1.38415998e-13 ] + - [ 5.53078132e-10, 7.39574262e-21, -1.38415998e-13 ] + - [ 5.41249371e-10, 1.12928425e-20, -1.33185915e-13 ] + - [ 5.53708294e-10, 1.05295616e-20, -1.34038423e-13 ] + - [ 5.41249371e-10, 1.12928425e-20, -1.34038423e-13 ] + - [ 5.29673298e-10, 1.63568858e-20, -1.27041199e-13 ] + - [ 5.41792048e-10, 1.51425071e-20, -1.34532819e-13 ] + - [ 5.29673298e-10, 1.63568858e-20, -1.34532819e-13 ] + - [ 5.30552595e-10, 2.92094984e-20, -1.27684239e-13 ] + - [ 5.42283211e-10, 2.13210939e-20, -1.34672681e-13 ] + - [ 5.30552595e-10, 2.92094984e-20, -1.34672681e-13 ] + - [ 5.31248038e-10, 5.27860071e-20, -1.2693408e-13 ] + - [ 5.42719307e-10, 2.79634284e-20, -1.33856711e-13 ] + - [ 5.31248039e-10, 5.27860071e-20, -1.33856711e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.3154053e-13, 5.31827575e-10 ] + - [ 9.73052745e-20, -1.3154053e-13, 5.32248572e-10 ] + - [ 1.41294312e-19, -1.21003602e-13, 5.43993843e-10 ] + - [ 9.95291496e-20, -1.27816187e-13, 5.32248572e-10 ] + - [ 1.41294312e-19, -1.27816187e-13, 5.31860438e-10 ] + - [ 1.6786325e-19, -1.17687353e-13, 5.44314031e-10 ] + - [ 1.45783422e-19, -1.22865286e-13, 5.31860438e-10 ] + - [ 1.6786325e-19, -1.22865286e-13, 5.3409021e-10 ] + - [ 1.84925815e-19, -1.17050059e-13, 5.44313143e-10 ] + - [ 1.89550375e-19, -1.15809407e-13, 5.85434916e-10 ] + - [ 3.62992648e-19, -1.13625268e-13, 5.79380204e-10 ] + - [ 3.60751609e-19, -1.17929889e-13, 5.78593722e-10 ] + - [ 3.96968058e-19, -1.13716463e-13, 5.79380204e-10 ] + - [ 3.60751609e-19, -1.13716463e-13, 5.73276198e-10 ] + - [ 3.57165161e-19, -1.18022263e-13, 5.72558105e-10 ] + - [ 3.93453781e-19, -1.13495869e-13, 5.73276198e-10 ] + - [ 3.57165161e-19, -1.13495869e-13, 5.67158869e-10 ] + - [ 3.52222963e-19, -1.17524831e-13, 5.66502505e-10 ] + - [ 3.88646828e-19, -1.13002936e-13, 5.67158869e-10 ] + - [ 3.52222963e-19, -1.13002936e-13, 5.61064632e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.61064632e-10, 3.45959759e-19 ] + - [ -1.12249307e-13, 5.55032125e-10, 3.38495074e-19 ] + - [ -1.14766729e-13, 5.54763007e-10, 3.75811053e-19 ] + - [ -1.12296524e-13, 5.55032125e-10, 3.38495074e-19 ] + - [ -1.12296524e-13, 5.54164374e-10, 3.71520467e-19 ] + - [ -1.25605824e-13, 5.74455698e-10, 2.76899277e-19 ] + - [ -1.31824265e-13, 5.75243513e-10, 2.02136962e-19 ] + - [ -1.2560062e-13, 5.68977414e-10, 2.00414772e-19 ] + - [ -1.31824265e-13, 5.68977414e-10, 2.00414772e-19 ] + - [ -1.36074771e-13, 5.69285612e-10, 1.52690793e-19 ] + - [ -1.31148482e-13, 5.62975104e-10, 1.51368338e-19 ] + - [ -1.36074771e-13, 5.62975104e-10, 1.51368338e-19 ] + - [ -1.3846869e-13, 5.62834328e-10, 1.01767035e-19 ] + - [ -1.34801701e-13, 5.56499839e-10, 1.01201967e-19 ] + - [ -1.3846869e-13, 5.56499839e-10, 1.01201967e-19 ] + - [ -1.38981626e-13, 5.83608821e-10, 4.32836677e-19 ] + - [ -1.12653986e-13, 5.89428166e-10, 4.34376834e-19 ] + - [ -1.10301213e-13, 5.90479325e-10, 4.00331374e-19 ] + - [ -1.11774372e-13, 5.89428166e-10, 4.34376834e-19 ] + - [ -1.11774372e-13, 5.95144483e-10, 4.34745343e-19 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.34745343e-19, -1.10641327e-13 ] + - [ 6.00729792e-10, 4.33355733e-19, -1.08330133e-13 ] + - [ 6.01915955e-10, 3.9903725e-19, -1.09259511e-13 ] + - [ 6.00729792e-10, 4.33355733e-19, -1.09259511e-13 ] + - [ 6.06151234e-10, 4.31353749e-19, -1.09259511e-13 ] + - [ 6.1262339e-10, 3.9273372e-19, -1.06985235e-13 ] + - [ 6.06151234e-10, 4.31353749e-19, -1.07630714e-13 ] + - [ 6.11367505e-10, 4.28023727e-19, -1.06985235e-13 ] + - [ 6.11367505e-10, 4.28023727e-19, -1.04574403e-13 ] + - [ 6.0476834e-10, 4.93272093e-19, -1.0540192e-13 ] + - [ 6.099442e-10, 4.87593912e-19, -1.04574403e-13 ] + - [ 6.099442e-10, 4.87593912e-19, -1.03227498e-13 ] + - [ 5.99105758e-10, 5.52001917e-19, -1.03037004e-13 ] + - [ 6.08618149e-10, 5.4596598e-19, -1.21951954e-13 ] + - [ 5.62072715e-10, 2.66574615e-19, -1.16435533e-13 ] + - [ 5.61064632e-10, 3.45959759e-19, -1.23752814e-13 ] + - [ 5.67744178e-10, 3.13433983e-19, -1.16435533e-13 ] + - [ 5.67744178e-10, 3.13433983e-19, -1.17524831e-13 ] + - [ 5.67158869e-10, 3.52222963e-19, -1.21419177e-13 ] + - [ 5.73910801e-10, 3.18299046e-19, -1.17524831e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.21987949e-13, 5.8006721e-10 ] + - [ 3.21804017e-19, -1.18022263e-13, 5.8006721e-10 ] + - [ 3.21804017e-19, -1.17929889e-13, 5.79380204e-10 ] + - [ 3.60751609e-19, -1.21949243e-13, 5.86176101e-10 ] + - [ 3.23918497e-19, -1.17929889e-13, 5.86176101e-10 ] + - [ 3.23918497e-19, -1.1725725e-13, 5.85434916e-10 ] + - [ 3.62992648e-19, -1.21307721e-13, 5.92197506e-10 ] + - [ 3.24648691e-19, -1.1725725e-13, 5.92197506e-10 ] + - [ 3.24648691e-19, -1.16019308e-13, 5.91405251e-10 ] + - [ 3.63920952e-19, -1.20075851e-13, 5.98091903e-10 ] + - [ 3.24015484e-19, -1.16019308e-13, 5.98091903e-10 ] + - [ 3.24015484e-19, -1.14233302e-13, 5.97254794e-10 ] + - [ 3.635694e-19, -1.18270979e-13, 6.03817545e-10 ] + - [ 3.22037075e-19, -1.14233302e-13, 6.03817545e-10 ] + - [ 3.22037075e-19, -1.12801546e-13, 6.02947574e-10 ] + - [ 3.61948746e-19, -1.15912189e-13, 6.09333577e-10 ] + - [ 3.18707053e-19, -1.12801546e-13, 6.09333577e-10 ] + - [ 3.18707053e-19, -1.11384493e-13, 6.08443622e-10 ] + - [ 3.5902487e-19, -1.13351995e-13, 6.14596478e-10 ] + - [ 3.139762e-19, -1.11384493e-13, 6.14596478e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.8679827e-10, 2.8204496e-19 ] + - [ -1.24993575e-13, 5.87301867e-10, 2.37605923e-19 ] + - [ -1.27111781e-13, 5.8679827e-10, 2.8204496e-19 ] + - [ -1.27111781e-13, 5.92855203e-10, 2.82537753e-19 ] + - [ -1.23772546e-13, 5.93382781e-10, 2.37798656e-19 ] + - [ -1.25293465e-13, 5.92855203e-10, 2.82537753e-19 ] + - [ -1.25293465e-13, 5.98779797e-10, 2.81639849e-19 ] + - [ -1.21958351e-13, 5.99326471e-10, 2.3662592e-19 ] + - [ -1.22885235e-13, 5.98779797e-10, 2.81639849e-19 ] + - [ -1.22885235e-13, 6.04528087e-10, 2.79364688e-19 ] + - [ -1.19569853e-13, 6.0508764e-10, 2.34095161e-19 ] + - [ -1.19908016e-13, 6.04528087e-10, 2.79364688e-19 ] + - [ -1.19908016e-13, 6.1005611e-10, 2.75721785e-19 ] + - [ -1.16627437e-13, 6.10623656e-10, 2.30222922e-19 ] + - [ -1.163836e-13, 6.1005611e-10, 2.75721785e-19 ] + - [ -1.163836e-13, 6.15322564e-10, 2.70701212e-19 ] + - [ -1.28031509e-13, 5.62729079e-10, 1.98198238e-19 ] + - [ -1.23752814e-13, 5.62072715e-10, 2.66574615e-19 ] + - [ -1.29872593e-13, 5.68250884e-10, 2.72331999e-19 ] + - [ -1.23752814e-13, 5.68250884e-10, 2.72331999e-19 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.76899277e-19, -1.21419177e-13 ] + - [ 5.74455698e-10, 2.76899277e-19, -1.21987949e-13 ] + - [ 5.73910801e-10, 3.18299046e-19, -1.2560062e-13 ] + - [ 5.80651187e-10, 2.80157955e-19, -1.21987949e-13 ] + - [ 5.80651187e-10, 2.80157955e-19, -1.21949243e-13 ] + - [ 5.8006721e-10, 3.21804017e-19, -1.25605824e-13 ] + - [ 5.8679827e-10, 2.8204496e-19, -1.21949243e-13 ] + - [ 5.8679827e-10, 2.8204496e-19, -1.21307721e-13 ] + - [ 5.86176101e-10, 3.23918497e-19, -1.24993575e-13 ] + - [ 5.92855203e-10, 2.82537753e-19, -1.21307721e-13 ] + - [ 5.92855203e-10, 2.82537753e-19, -1.20075851e-13 ] + - [ 5.92197506e-10, 3.24648691e-19, -1.23772546e-13 ] + - [ 5.98779797e-10, 2.81639849e-19, -1.20075851e-13 ] + - [ 5.98779797e-10, 2.81639849e-19, -1.18270979e-13 ] + - [ 5.98091903e-10, 3.24015484e-19, -1.21958351e-13 ] + - [ 6.04528087e-10, 2.79364688e-19, -1.18270979e-13 ] + - [ 6.04528087e-10, 2.79364688e-19, -1.15912189e-13 ] + - [ 6.03817545e-10, 3.22037075e-19, -1.19569853e-13 ] + - [ 6.1005611e-10, 2.75721785e-19, -1.15912189e-13 ] + - [ 6.1005611e-10, 2.75721785e-19, -1.13351995e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.13351995e-13, 6.15322564e-10 ] + - [ 2.70701212e-19, -1.11643238e-13, 5.59962847e-10 ] + - [ 4.08079989e-19, -1.13002936e-13, 5.6026838e-10 ] + - [ 4.09717806e-19, -1.11342101e-13, 5.60462447e-10 ] + - [ 3.8251349e-19, -1.13495869e-13, 5.6026838e-10 ] + - [ 4.09717806e-19, -1.13495869e-13, 5.65779084e-10 ] + - [ 4.22795945e-19, -1.11237692e-13, 5.66502505e-10 ] + - [ 3.88646828e-19, -1.13716463e-13, 5.65779084e-10 ] + - [ 4.22795945e-19, -1.13716463e-13, 5.71759189e-10 ] + - [ 4.27300564e-19, -1.11396365e-13, 5.72558105e-10 ] + - [ 3.93453781e-19, -1.13625268e-13, 5.71759189e-10 ] + - [ 4.27300564e-19, -1.13625268e-13, 5.77711316e-10 ] + - [ 4.30615491e-19, -1.11287891e-13, 5.78593722e-10 ] + - [ 3.96968058e-19, -1.1725725e-13, 5.77711316e-10 ] + - [ 4.30615491e-19, -1.1725725e-13, 5.83608821e-10 ] + - [ 4.32836677e-19, -1.10920455e-13, 5.85434916e-10 ] + - [ 3.62992648e-19, -1.16019308e-13, 5.83608821e-10 ] + - [ 4.32836677e-19, -1.16019308e-13, 5.90479325e-10 ] + - [ 4.00331374e-19, -1.12653986e-13, 5.91405251e-10 ] + - [ 3.63920952e-19, -1.14233302e-13, 5.90479325e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.97254794e-10, 3.635694e-19 ] + - [ -1.12801546e-13, 5.96269805e-10, 4.00265613e-19 ] + - [ -1.12801546e-13, 6.01915955e-10, 3.9903725e-19 ] + - [ -1.10641327e-13, 6.02947574e-10, 3.61948746e-19 ] + - [ -1.11384493e-13, 6.01915955e-10, 3.9903725e-19 ] + - [ -1.11384493e-13, 6.07381361e-10, 3.96577008e-19 ] + - [ -1.09259511e-13, 6.08443622e-10, 3.5902487e-19 ] + - [ -1.09713087e-13, 6.07381361e-10, 3.96577008e-19 ] + - [ -1.09713087e-13, 6.1262339e-10, 3.9273372e-19 ] + - [ -1.13927232e-13, 6.34825185e-10, 1.05986483e-19 ] + - [ -1.17383668e-13, 6.26526046e-10, 1.1343549e-19 ] + - [ -1.10208459e-13, 6.26427459e-10, 1.39668592e-19 ] + - [ -1.17383668e-13, 6.26427459e-10, 1.39668592e-19 ] + - [ -1.20061973e-13, 6.217774e-10, 1.43173357e-19 ] + - [ -1.15425165e-13, 6.2128535e-10, 1.93752763e-19 ] + - [ -1.20061973e-13, 6.2128535e-10, 1.93752763e-19 ] + - [ -1.24193867e-13, 6.16799604e-10, 1.4625295e-19 ] + - [ -1.15213095e-13, 6.16319988e-10, 1.96992829e-19 ] + - [ -1.24193867e-13, 6.16319988e-10, 1.96992829e-19 ] + - [ -1.27786913e-13, 6.11520716e-10, 1.48862705e-19 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.99632466e-19, -1.30811946e-13 ] + - [ 6.05974042e-10, 1.50969741e-19, -1.22859865e-13 ] + - [ 6.05508636e-10, 2.01650476e-19, -1.30811946e-13 ] + - [ 6.05508636e-10, 2.01650476e-19, -1.33244028e-13 ] + - [ 6.00195997e-10, 1.52552137e-19, -1.25861153e-13 ] + - [ 5.99739473e-10, 2.03030731e-19, -1.33244028e-13 ] + - [ 5.99739473e-10, 2.03030731e-19, -1.35063645e-13 ] + - [ 5.94227882e-10, 1.53599865e-19, -1.28282394e-13 ] + - [ 5.93784237e-10, 2.03763613e-19, -1.35063645e-13 ] + - [ 5.93784237e-10, 2.03763613e-19, -1.36257676e-13 ] + - [ 5.88111886e-10, 1.54115405e-19, -1.30102335e-13 ] + - [ 5.87687336e-10, 2.03848295e-19, -1.36257676e-13 ] + - [ 5.87687336e-10, 2.03848295e-19, -1.36820703e-13 ] + - [ 5.81889308e-10, 1.54114164e-19, -1.31304716e-13 ] + - [ 5.8149318e-10, 2.03296979e-19, -1.36820703e-13 ] + - [ 5.8149318e-10, 2.03296979e-19, -1.36755542e-13 ] + - [ 6.39363777e-10, 5.03578748e-21, -1.06886572e-13 ] + - [ 6.33322831e-10, 1.00014003e-20, -1.12936529e-13 ] + - [ 6.40517965e-10, 9.77519874e-21, -1.12891697e-13 ] + - [ 6.33322831e-10, 1.00014003e-20, -1.12891697e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.17612218e-13, 6.29208345e-10 ] + - [ 1.01463637e-20, -1.17612218e-13, 6.24755906e-10 ] + - [ 1.03147725e-20, -1.22699403e-13, 6.30094303e-10 ] + - [ 2.05509112e-20, -1.22692247e-13, 6.24755906e-10 ] + - [ 1.03147725e-20, -1.22692247e-13, 6.20925637e-10 ] + - [ 2.15646986e-20, -1.27295444e-13, 6.25672507e-10 ] + - [ 2.10518078e-20, -1.26105316e-13, 6.20925637e-10 ] + - [ 2.15646986e-20, -1.26105316e-13, 6.16527378e-10 ] + - [ 4.54589704e-20, -1.30228753e-13, 6.21553135e-10 ] + - [ 4.42338126e-20, -1.27832992e-13, 6.16527378e-10 ] + - [ 4.54589704e-20, -1.27832992e-13, 6.1121385e-10 ] + - [ 4.66070196e-20, -1.33807163e-13, 6.16848898e-10 ] + - [ 9.24921173e-20, -1.31429833e-13, 6.1121385e-10 ] + - [ 4.66070196e-20, -1.31429833e-13, 6.05641419e-10 ] + - [ 4.76653455e-20, -1.36811487e-13, 6.11555355e-10 ] + - [ 9.49711776e-20, -1.34454106e-13, 6.05641419e-10 ] + - [ 4.76653455e-20, -1.34454106e-13, 5.9984339e-10 ] + - [ 4.86244356e-20, -1.392195e-13, 6.05998022e-10 ] + - [ 9.71005473e-20, -1.36881635e-13, 5.9984339e-10 ] + - [ 4.86244356e-20, -1.36881635e-13, 5.93854847e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.93854847e-10, 4.94780084e-20 ] + - [ -1.38695288e-13, 5.87713538e-10, 5.02229879e-20 ] + - [ -1.42192165e-13, 5.94234099e-10, 1.00236906e-19 ] + - [ -1.39884766e-13, 5.87713538e-10, 5.02229879e-20 ] + - [ -1.39884766e-13, 5.81457209e-10, 5.08592966e-20 ] + - [ -1.42747168e-13, 5.88104336e-10, 1.01234124e-19 ] + - [ -1.40447359e-13, 5.81457209e-10, 5.08592966e-20 ] + - [ -1.40447359e-13, 5.75123608e-10, 5.13898296e-20 ] + - [ -1.42686887e-13, 5.81862218e-10, 1.0186123e-19 ] + - [ -1.4038827e-13, 5.75123608e-10, 5.13898296e-20 ] + - [ -1.4038827e-13, 5.68748708e-10, 5.18202478e-20 ] + - [ -1.42024331e-13, 5.75545937e-10, 1.02138232e-19 ] + - [ -1.39721269e-13, 5.68748708e-10, 5.18202478e-20 ] + - [ -1.39721269e-13, 5.62364925e-10, 5.21589008e-20 ] + - [ -1.04427331e-13, 6.33690981e-10, 7.80481557e-22 ] + - [ -1.03688664e-13, 6.36001133e-10, 1.41711851e-21 ] + - [ -1.01513375e-13, 6.41906631e-10, 1.47937839e-21 ] + - [ -1.03688664e-13, 6.41906631e-10, 1.47937839e-21 ] + - [ -1.05317244e-13, 6.37866308e-10, 2.64021146e-21 ] + - [ -9.7241347e-14, 6.43738943e-10, 2.71926699e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.03578748e-21, -9.87645969e-14 ] + - [ 6.45226198e-10, 5.08159261e-21, -1.06386701e-13 ] + - [ 6.45226198e-10, 5.08159261e-21, -1.06886572e-13 ] + - [ 6.40517965e-10, 9.77519874e-21, -9.9765695e-14 ] + - [ 6.47139335e-10, 1.83067573e-20, -1.06886572e-13 ] + - [ 6.47139335e-10, 1.83067573e-20, -1.0681057e-13 ] + - [ 6.41324431e-10, 1.91475864e-20, -1.00126897e-13 ] + - [ 6.4176852e-10, 3.74728518e-20, -1.0681057e-13 ] + - [ 6.4176852e-10, 3.74728518e-20, -1.12255379e-13 ] + - [ 6.34700396e-10, 4.02415546e-20, -1.0615853e-13 ] + - [ 6.34874035e-10, 7.98128861e-20, -1.12255379e-13 ] + - [ 6.34874035e-10, 7.98128861e-20, -1.16362892e-13 ] + - [ 6.30653411e-10, 4.16094528e-20, -1.11034513e-13 ] + - [ 6.3087368e-10, 8.33067419e-20, -1.16362892e-13 ] + - [ 6.3087368e-10, 8.33067419e-20, -1.21470677e-13 ] + - [ 6.26267586e-10, 4.29455305e-20, -1.13927232e-13 ] + - [ 6.26528711e-10, 8.66177908e-20, -1.21470677e-13 ] + - [ 6.26528711e-10, 8.66177908e-20, -1.23693183e-13 ] + - [ 6.21848011e-10, 8.9694851e-20, -1.19044991e-13 ] + - [ 6.217774e-10, 1.43173357e-19, -1.23693183e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.20061973e-13, 6.16799604e-10 ] + - [ 1.4625295e-19, -1.27832992e-13, 6.16799604e-10 ] + - [ 1.4625295e-19, -1.31429833e-13, 6.11555355e-10 ] + - [ 9.49711776e-20, -1.24193867e-13, 6.11520716e-10 ] + - [ 1.48862705e-19, -1.31429833e-13, 6.11520716e-10 ] + - [ 1.48862705e-19, -1.34454106e-13, 6.05998023e-10 ] + - [ 9.71005473e-20, -1.27786913e-13, 6.05974042e-10 ] + - [ 1.50969741e-19, -1.34454106e-13, 6.05974042e-10 ] + - [ 1.50969741e-19, -1.36881635e-13, 6.00211984e-10 ] + - [ 9.8859185e-20, -1.30811946e-13, 6.00195997e-10 ] + - [ 1.52552137e-19, -1.36881635e-13, 6.00195997e-10 ] + - [ 1.52552137e-19, -1.38695288e-13, 5.94234099e-10 ] + - [ 1.00236906e-19, -1.33244028e-13, 5.94227882e-10 ] + - [ 1.53599865e-19, -1.38695288e-13, 5.94227882e-10 ] + - [ 1.53599865e-19, -1.39884766e-13, 5.88104336e-10 ] + - [ 1.01234124e-19, -1.35063645e-13, 5.88111886e-10 ] + - [ 1.54115405e-19, -1.39884766e-13, 5.88111886e-10 ] + - [ 1.54115405e-19, -1.40447359e-13, 5.81862218e-10 ] + - [ 1.0186123e-19, -1.36257676e-13, 5.81889308e-10 ] + - [ 1.54114164e-19, -1.40447359e-13, 5.81889308e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.75601448e-10, 1.53625094e-19 ] + - [ -1.4038827e-13, 5.75601448e-10, 1.53625094e-19 ] + - [ -1.39721269e-13, 6.13423194e-10, 5.35565838e-19 ] + - [ -9.99269158e-14, 6.14886468e-10, 4.79010259e-19 ] + - [ -1.01270947e-13, 6.10717803e-10, 5.421138e-19 ] + - [ -1.03037004e-13, 6.14886468e-10, 4.79010259e-19 ] + - [ -1.03037004e-13, 6.16327982e-10, 4.23135503e-19 ] + - [ -1.03579376e-13, 6.099442e-10, 4.87593912e-19 ] + - [ -1.0540192e-13, 6.16327982e-10, 4.23135503e-19 ] + - [ -1.0540192e-13, 6.1759186e-10, 3.87304314e-19 ] + - [ -1.05754936e-13, 6.11367505e-10, 4.28023727e-19 ] + - [ -1.07630714e-13, 6.1759186e-10, 3.87304314e-19 ] + - [ -1.07630714e-13, 6.18668332e-10, 3.48817461e-19 ] + - [ -1.07789279e-13, 6.1262339e-10, 3.9273372e-19 ] + - [ -1.09713087e-13, 6.18668332e-10, 3.48817461e-19 ] + - [ -1.09713087e-13, 6.19562284e-10, 3.07759731e-19 ] + - [ -1.09678122e-13, 6.13699418e-10, 3.54697474e-19 ] + - [ -1.11643238e-13, 6.19562284e-10, 3.07759731e-19 ] + - [ -1.11643238e-13, 6.20286593e-10, 2.6427526e-19 ] + - [ -1.11419025e-13, 6.14596478e-10, 3.139762e-19 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.93752763e-19, -1.15213095e-13 ] + - [ 6.15322564e-10, 2.70701212e-19, -1.163836e-13 ] + - [ 6.2128535e-10, 1.93752763e-19, -1.163836e-13 ] + - [ 6.16319988e-10, 1.96992829e-19, -1.19302164e-13 ] + - [ 6.1589233e-10, 2.25025333e-19, -1.19908016e-13 ] + - [ 6.16319988e-10, 1.96992829e-19, -1.19908016e-13 ] + - [ 6.11049093e-10, 1.99632466e-19, -1.22859865e-13 ] + - [ 6.10623656e-10, 2.30222922e-19, -1.22885235e-13 ] + - [ 6.11049093e-10, 1.99632466e-19, -1.22885235e-13 ] + - [ 6.05508636e-10, 2.01650476e-19, -1.25861153e-13 ] + - [ 6.0508764e-10, 2.34095161e-19, -1.25293465e-13 ] + - [ 6.05508636e-10, 2.01650476e-19, -1.25293465e-13 ] + - [ 5.99739473e-10, 2.03030731e-19, -1.28282394e-13 ] + - [ 5.9932647e-10, 2.3662592e-19, -1.27111781e-13 ] + - [ 5.99739473e-10, 2.03030731e-19, -1.27111781e-13 ] + - [ 5.93784237e-10, 2.03763613e-19, -1.30102335e-13 ] + - [ 5.93382781e-10, 2.37798656e-19, -1.28322184e-13 ] + - [ 5.93784237e-10, 2.03763613e-19, -1.28322184e-13 ] + - [ 5.87687336e-10, 2.03848295e-19, -1.31304716e-13 ] + - [ 5.87301867e-10, 2.37605923e-19, -1.25605824e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.31879234e-13, 5.80651187e-10 ] + - [ 2.80157955e-19, -1.31824265e-13, 5.8149318e-10 ] + - [ 2.03296979e-19, -1.31824265e-13, 5.75601449e-10 ] + - [ 1.53625094e-19, -1.36755542e-13, 5.75243513e-10 ] + - [ 2.02136962e-19, -1.36074771e-13, 5.75601448e-10 ] + - [ 1.53625094e-19, -1.36074771e-13, 5.69192353e-10 ] + - [ 1.02094237e-19, -1.39721269e-13, 5.69285612e-10 ] + - [ 1.52690793e-19, -1.3846869e-13, 5.69192353e-10 ] + - [ 1.02094237e-19, -1.3846869e-13, 5.62364925e-10 ] + - [ 5.21589008e-20, -1.407801e-13, 5.62834328e-10 ] + - [ 1.01767035e-19, -1.38981626e-13, 6.32248136e-10 ] + - [ 2.04931143e-22, -9.13166701e-14, 6.32406675e-10 ] + - [ 3.26358242e-22, -9.4353954e-14, 6.35422485e-10 ] + - [ 3.46749577e-22, -9.583698e-14, 6.32406675e-10 ] + - [ 3.26358242e-22, -9.583698e-14, 6.30783085e-10 ] + - [ 4.57601622e-22, -9.88009177e-14, 6.34048028e-10 ] + - [ 4.76569826e-22, -1.00223716e-13, 6.30783085e-10 ] + - [ 4.57601622e-22, -1.00223716e-13, 6.28746936e-10 ] + - [ 5.99259129e-22, -1.03084058e-13, 6.32320077e-10 ] + - [ 6.15136715e-22, -1.04427331e-13, 6.28746936e-10 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.30157363e-10, 7.65142769e-22 ] + - [ -1.0668464e-13, 6.26252043e-10, 7.53689468e-22 ] + - [ -1.0668464e-13, 6.28674549e-10, 1.37463987e-21 ] + - [ -1.09497223e-13, 6.32521694e-10, 1.3926464e-21 ] + - [ -1.08369327e-13, 6.28674549e-10, 1.37463987e-21 ] + - [ -1.08369327e-13, 6.30601896e-10, 2.59316072e-21 ] + - [ -1.11240511e-13, 6.34413514e-10, 2.61154287e-21 ] + - [ -1.06386701e-13, 6.30601897e-10, 2.59316072e-21 ] + - [ -1.06386701e-13, 6.32135337e-10, 5.03876986e-21 ] + - [ -1.12386676e-13, 6.39363777e-10, 5.03578748e-21 ] + - [ -1.12936529e-13, 6.32135337e-10, 5.03876986e-21 ] + - [ -1.12936529e-13, 6.27995093e-10, 5.0655983e-21 ] + - [ -1.1650579e-13, 6.33322831e-10, 1.00014003e-20 ] + - [ -1.17662959e-13, 6.27995093e-10, 5.0655983e-21 ] + - [ -1.17662959e-13, 6.23512457e-10, 5.11208843e-21 ] + - [ -1.21480001e-13, 6.29208345e-10, 1.01463637e-20 ] + - [ -1.22699403e-13, 6.23512457e-10, 5.11208843e-21 ] + - [ -1.22699403e-13, 6.19977951e-10, 1.05073376e-20 ] + - [ -1.27254678e-13, 6.24755906e-10, 1.03147725e-20 ] + - [ -1.27295444e-13, 6.19977951e-10, 1.05073376e-20 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.15646986e-20, -1.30228753e-13 ] + - [ 6.15871458e-10, 2.20857578e-20, -1.30228753e-13 ] + - [ 6.10534394e-10, 2.26105005e-20, -1.34926385e-13 ] + - [ 6.16527378e-10, 4.54589704e-20, -1.33807163e-13 ] + - [ 6.10534394e-10, 2.26105005e-20, -1.33807163e-13 ] + - [ 6.04943311e-10, 2.31341058e-20, -1.37893195e-13 ] + - [ 6.1121385e-10, 4.66070196e-20, -1.36811487e-13 ] + - [ 6.04943311e-10, 2.31341058e-20, -1.36811487e-13 ] + - [ 5.99130627e-10, 2.36519209e-20, -1.40263912e-13 ] + - [ 6.05641419e-10, 4.76653455e-20, -1.392195e-13 ] + - [ 5.99130627e-10, 2.36519209e-20, -1.392195e-13 ] + - [ 5.9313187e-10, 2.41596288e-20, -1.42024656e-13 ] + - [ 5.9984339e-10, 4.86244356e-20, -1.41015806e-13 ] + - [ 5.9313187e-10, 2.41596288e-20, -1.41015806e-13 ] + - [ 5.86982567e-10, 2.46533781e-20, -1.43168273e-13 ] + - [ 5.93854847e-10, 4.94780084e-20, -1.42192165e-13 ] + - [ 5.86982567e-10, 2.46533781e-20, -1.42192165e-13 ] + - [ 5.80720909e-10, 2.512986e-20, -1.43694761e-13 ] + - [ 5.87713537e-10, 5.02229879e-20, -1.42747168e-13 ] + - [ 5.80720909e-10, 2.512986e-20, -1.42747168e-13 ] + - [ 6.78433315e-310, 6.78433315e-310, 5.81457209e-10 ] + - [ 5.08592966e-20, -1.42686887e-13, 5.74383312e-10 ] + - [ 2.55864766e-20, -1.42686887e-13, 5.68005746e-10 ] + - [ 2.60213668e-20, -1.42927254e-13, 5.75123608e-10 ] + - [ 5.13898296e-20, -1.42024331e-13, 5.68005746e-10 ] + - [ 2.60213668e-20, -1.42024331e-13, 5.6162152e-10 ] + - [ 2.64336e-20, -1.41664918e-13, 5.68748708e-10 ] + - [ 5.18202478e-20, -1.407801e-13, 5.6162152e-10 ] + - [ 2.64336e-20, -1.407801e-13, 5.55261274e-10 ] + - [ 2.68231116e-20, -1.39848012e-13, 5.62364925e-10 ] + - [ 5.21589008e-20, -1.38981626e-13, 5.55261274e-10 ] + - [ 2.68231116e-20, -1.38981626e-13, 5.49687955e-10 ] + - [ 5.26018301e-20, -1.36661759e-13, 5.56002903e-10 ] + - [ 5.2416309e-20, -1.36662192e-13, 5.49687955e-10 ] + - [ 5.26018301e-20, -1.36662192e-13, 5.50212868e-10 ] + - [ 1.00443908e-19, -1.34339072e-13, 5.56499839e-10 ] + - [ 1.01201967e-19, -1.32970918e-13, 5.50212868e-10 ] + - [ 1.00443908e-19, -1.32970918e-13, 5.50470884e-10 ] + - [ 1.47845996e-19, -1.30626113e-13, 5.56696571e-10 ] + - [ 1.49728866e-19, -1.28031509e-13, 5.50470884e-10 ] + - [ 1.47845996e-19, -1.28031509e-13, 5.50383399e-10 ] + - [ 6.78433315e-310, 5.32996404e-310, 5.32996404e-310 ] + - [ 5.32996404e-310, -1.7461781e-15, 1.80102411e-14 ] + - [ 9.29732306e-18, -1.33836647e-15, 1.88599846e-14 ] + - [ 2.06116822e-18, -1.2953643e-15, 1.80102411e-14 ] + - [ 9.29732306e-18, -1.2953643e-15, 1.80098617e-14 ] + - [ 3.28119848e-17, -8.51923817e-16, 1.88597407e-14 ] + - [ 8.94561248e-18, -8.31346845e-16, 1.80098617e-14 ] + - [ 3.28119848e-17, -8.31346845e-16, 1.80095093e-14 ] + - [ 6.36532415e-17, -5.57112729e-16, 1.88594967e-14 ] + - [ 3.20072241e-17, -5.37579725e-16, 1.80095093e-14 ] + - [ 6.36532415e-17, -5.37579725e-16, 1.80092925e-14 ] + - [ 1.17437067e-16, -3.37303605e-16, 1.8859307e-14 ] + - [ 6.18505437e-17, -3.28116897e-16, 1.80092925e-14 ] + - [ 1.17437067e-16, -3.28116897e-16, 1.80091569e-14 ] + - [ 2.12033389e-16, -1.90499323e-16, 1.88592528e-14 ] + - [ 1.13466071e-16, -1.86224666e-16, 1.8009157e-14 ] + - [ 2.12033389e-16, -1.86224666e-16, 1.80089401e-14 ] + - [ 3.76904407e-16, -1.02661676e-16, 1.88593341e-14 ] + - [ 2.07719556e-16, -1.0069656e-16, 1.80089401e-14 ] + - [ 3.76904407e-16, -1.0069656e-16, 1.80085606e-14 ] + - [ 6.29023496e-16, -5.34361386e-17, 1.88592528e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.80082083e-14, 9.44131499e-16 ] + - [ -2.63413911e-17, 1.88589817e-14, 6.09340568e-16 ] + - [ -2.55479859e-17, 1.80082083e-14, 9.44131499e-16 ] + - [ -2.55479859e-17, 1.80079643e-14, 1.45062671e-15 ] + - [ -6.42845477e-18, 1.88586836e-14, 9.02684483e-16 ] + - [ -6.25562696e-18, 1.80079643e-14, 1.45062671e-15 ] + - [ -6.25562696e-18, 1.80079914e-14, 1.99550076e-15 ] + - [ -1.49712845e-18, 1.8858548e-14, 1.40734925e-15 ] + - [ -1.46057699e-18, 1.80079914e-14, 1.99550076e-15 ] + - [ -1.46057699e-18, 1.80079643e-14, 2.7182367e-15 ] + - [ -3.31796048e-19, 1.88587649e-14, 1.90582029e-15 ] + - [ -3.24367966e-19, 1.80079643e-14, 2.7182367e-15 ] + - [ -3.24367966e-19, 1.88585752e-14, 3.19549402e-15 ] + - [ -4.0789678e-20, 1.88588733e-14, 2.62592197e-15 ] + - [ -3.89604198e-20, 1.88585752e-14, 3.19549402e-15 ] + - [ -3.89604198e-20, 1.96740036e-14, 3.48750524e-15 ] + - [ -1.5984201e-21, 1.96743289e-14, 3.07365172e-15 ] + - [ -1.55225066e-21, 1.96740036e-14, 3.48750524e-15 ] + - [ -1.55225066e-21, 1.96740307e-14, 3.93837364e-15 ] + - [ -1.03075989e-23, 2.04106106e-14, 3.34111762e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.13982178e-15, -4.84440684e-31 ] + - [ 2.04106919e-14, 3.64280658e-15, -4.6329608e-31 ] + - [ 1.96742476e-14, 4.13982178e-15, -4.6329608e-31 ] + - [ 2.04111527e-14, 3.72869741e-15, 1.60072676e-24 ] + - [ 2.04109629e-14, 3.8431739e-15, 1.53336514e-24 ] + - [ 2.04111527e-14, 3.72869741e-15, 1.53336514e-24 ] + - [ 2.09702757e-14, 3.28381838e-15, 6.51315568e-22 ] + - [ 2.09696794e-14, 3.49685733e-15, 1.06818471e-23 ] + - [ 2.09702757e-14, 3.28381838e-15, 1.06818471e-23 ] + - [ 2.12759123e-14, 3.16487463e-15, -4.72758307e-15 ] + - [ 1.76438075e-14, 3.11548358e-52, -4.70521801e-15 ] + - [ 1.71697946e-14, 1.57133908e-27, -4.65893274e-15 ] + - [ 1.80126802e-14, 1.55435392e-27, -4.70521801e-15 ] + - [ 1.80126805e-14, 1.55435392e-27, -4.42491109e-15 ] + - [ 1.71686562e-14, 4.91591544e-23, -4.57100394e-15 ] + - [ 1.80117589e-14, 4.8403514e-23, -4.42491109e-15 ] + - [ 1.8011759e-14, 4.8403514e-23, -3.82749536e-15 ] + - [ 1.71681413e-14, 3.64472172e-21, -4.29140853e-15 ] + - [ 1.80113524e-14, 3.55713105e-21, -3.82749536e-15 ] + - [ 1.80113524e-14, 3.55713105e-21, -3.2352834e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.2352834e-15, 1.80111898e-14 ] + - [ 8.78615602e-20, -2.62679018e-15, 1.71676805e-14 ] + - [ 4.65991263e-19, -3.17018045e-15, 1.80110543e-14 ] + - [ 4.55474075e-19, -2.62679018e-15, 1.80110543e-14 ] + - [ 4.55474075e-19, -1.86708294e-15, 1.71672197e-14 ] + - [ 2.18745057e-18, -2.56308483e-15, 1.80107019e-14 ] + - [ 2.13590895e-18, -1.86708294e-15, 1.80107019e-14 ] + - [ 2.13590895e-18, -1.36819473e-15, 1.71667047e-14 ] + - [ 9.5401502e-18, -1.80521566e-15, 1.80102411e-14 ] + - [ 9.29732306e-18, -1.36819473e-15, 1.80102411e-14 ] + - [ 9.29732306e-18, -8.66200133e-16, 1.7166244e-14 ] + - [ 3.33681149e-17, -1.33836647e-15, 1.80098617e-14 ] + - [ 3.28119848e-17, -8.66200133e-16, 1.80098617e-14 ] + - [ 3.28119848e-17, -5.70669491e-16, 1.71658645e-14 ] + - [ 6.49000211e-17, -8.51923817e-16, 1.80095093e-14 ] + - [ 6.36532415e-17, -5.70669491e-16, 1.80095093e-14 ] + - [ 6.36532415e-17, -3.43681128e-16, 1.71655392e-14 ] + - [ 1.20185054e-16, -5.57112729e-16, 1.80092925e-14 ] + - [ 1.17437067e-16, -3.43681128e-16, 1.80092925e-14 ] + - [ 1.17437067e-16, -1.93467856e-16, 1.71652953e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.8009157e-14, 2.12033389e-16 ] + - [ -1.0402667e-16, 1.71649971e-14, 3.83319199e-16 ] + - [ -1.90499323e-16, 1.80089401e-14, 3.76904407e-16 ] + - [ -1.0402667e-16, 1.80089401e-14, 3.76904407e-16 ] + - [ -5.40549226e-17, 1.71646177e-14, 6.42661573e-16 ] + - [ -1.02661676e-16, 1.80085606e-14, 6.29023496e-16 ] + - [ -5.40549226e-17, 1.80085606e-14, 6.29023496e-16 ] + - [ -2.68926507e-17, 1.71642653e-14, 9.72861162e-16 ] + - [ -5.34361386e-17, 1.80082083e-14, 9.44131499e-16 ] + - [ -2.68926507e-17, 1.80082083e-14, 9.44131499e-16 ] + - [ -6.54854485e-18, 1.71639943e-14, 1.480632e-15 ] + - [ -2.63413911e-17, 1.80079643e-14, 1.45062671e-15 ] + - [ -6.54854485e-18, 1.80079643e-14, 1.45062671e-15 ] + - [ -1.52252869e-18, 1.71638858e-14, 2.05768822e-15 ] + - [ -6.42845477e-18, 1.80079914e-14, 1.99550076e-15 ] + - [ -1.52252869e-18, 1.80079914e-14, 1.99550076e-15 ] + - [ -3.36959723e-19, 1.71637774e-14, 2.78225884e-15 ] + - [ -1.49712845e-18, 1.80079643e-14, 2.7182367e-15 ] + - [ -3.36959723e-19, 1.80079643e-14, 2.7182367e-15 ] + - [ -4.22098438e-20, 1.80077204e-14, 3.28994497e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 3.19549402e-15, -1.63750923e-21 ] + - [ 1.8858277e-14, 3.66994552e-15, -4.0789678e-20 ] + - [ 1.96740036e-14, 3.48750524e-15, -1.63750923e-21 ] + - [ 1.96740036e-14, 3.48750524e-15, -1.06295551e-23 ] + - [ 1.8858277e-14, 4.1883805e-15, -1.5984201e-21 ] + - [ 1.96740307e-14, 3.93837364e-15, -1.06295551e-23 ] + - [ 1.96740307e-14, 3.93837364e-15, -5.02267573e-31 ] + - [ 1.88584125e-14, 4.39073326e-15, -1.03075989e-23 ] + - [ 1.96742476e-14, 4.13982178e-15, -5.02267573e-31 ] + - [ 1.96742476e-14, 4.13982178e-15, 1.6697649e-24 ] + - [ 1.96744373e-14, 4.02488789e-15, -4.84440684e-31 ] + - [ 2.04111527e-14, 3.72869741e-15, 1.6697649e-24 ] + - [ 2.04111527e-14, 3.72869741e-15, 6.69551911e-22 ] + - [ 2.04116677e-14, 3.42670437e-15, 1.60072676e-24 ] + - [ 2.09702757e-14, 3.28381838e-15, 6.69551911e-22 ] + - [ 2.09702757e-14, 3.28381838e-15, 1.43874657e-20 ] + - [ 2.09716852e-14, 2.91607734e-15, 6.51315568e-22 ] + - [ 2.12764544e-14, 3.03745716e-15, 1.43874657e-20 ] + - [ 2.12764544e-14, 3.03745716e-15, 1.37971818e-20 ] + - [ 1.71638587e-14, 5.61930228e-16, 6.63490563e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.46895599e-17, 1.71639672e-14 ] + - [ 5.7621925e-16, 6.46895599e-17, 1.62987196e-14 ] + - [ 7.36578257e-16, 4.68408224e-17, 1.62986383e-14 ] + - [ 5.84833999e-16, 4.69449545e-17, 1.62987196e-14 ] + - [ 7.36578257e-16, 4.69449545e-17, 1.62986925e-14 ] + - [ 1.14142707e-15, 1.92834494e-17, 1.54832641e-14 ] + - [ 7.39188813e-16, 2.26278795e-17, 1.62986925e-14 ] + - [ 1.14142707e-15, 2.26278795e-17, 1.54832641e-14 ] + - [ 1.1471996e-15, 6.52802066e-17, 1.76143989e-14 ] + - [ 5.5514507e-16, 6.28055998e-17, 1.80080999e-14 ] + - [ 5.62117846e-16, 6.57838206e-17, 1.71639672e-14 ] + - [ 5.7621925e-16, 6.28055998e-17, 1.71639672e-14 ] + - [ 5.7621925e-16, 4.65006063e-17, 1.7164184e-14 ] + - [ 7.2778182e-16, 6.39738171e-17, 1.62987196e-14 ] + - [ 7.36578257e-16, 4.65006063e-17, 1.62987196e-14 ] + - [ 7.36578257e-16, 1.89848041e-17, 1.7164184e-14 ] + - [ 1.12313285e-15, 4.68408224e-17, 1.62986925e-14 ] + - [ 1.14142707e-15, 1.89848041e-17, 1.62986925e-14 ] + - [ 1.14142707e-15, 4.49388446e-18, 1.71640485e-14 ] + - [ 1.61028014e-15, 1.92834494e-17, 1.62986112e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.71640214e-14, 2.2753579e-15 ] + - [ 4.55821264e-18, 1.62985841e-14, 2.31425535e-15 ] + - [ 9.93112414e-19, 1.62985841e-14, 2.31425535e-15 ] + - [ 2.09203101e-19, 1.71642924e-14, 2.95755823e-15 ] + - [ 1.00653425e-18, 1.62986925e-14, 2.99735354e-15 ] + - [ 2.09203101e-19, 1.62986925e-14, 2.99735354e-15 ] + - [ 1.81784086e-20, 1.62985841e-14, 3.52781978e-15 ] + - [ 2.10528451e-19, 1.54832641e-14, 3.5406879e-15 ] + - [ 1.81784086e-20, 1.54832641e-14, 3.5406879e-15 ] + - [ 3.73613326e-21, 1.87281456e-14, 5.31191402e-16 ] + - [ 6.51792509e-17, 1.88589004e-14, 5.41792866e-16 ] + - [ 6.11240806e-17, 1.80081812e-14, 5.47889386e-16 ] + - [ 6.28055998e-17, 1.88589004e-14, 5.41792866e-16 ] + - [ 6.28055998e-17, 1.80084522e-14, 7.13369554e-16 ] + - [ 4.59470174e-17, 1.80080999e-14, 5.62117846e-16 ] + - [ 4.65006063e-17, 1.80084522e-14, 7.13369554e-16 ] + - [ 4.65006063e-17, 1.80085878e-14, 1.09317923e-15 ] + - [ 1.84968337e-17, 1.7164184e-14, 7.2778182e-16 ] + - [ 1.89848041e-17, 1.80085878e-14, 1.09317923e-15 ] + - [ 1.89848041e-17, 1.80084251e-14, 1.57932023e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.57932023e-15, 4.49388446e-18 ] + - [ 1.80084251e-14, 2.21170507e-15, 9.71127607e-19 ] + - [ 1.71640485e-14, 1.61028014e-15, 9.93112414e-19 ] + - [ 1.80084251e-14, 2.21170507e-15, 9.93112414e-19 ] + - [ 1.8008913e-14, 2.89248069e-15, 2.07013967e-19 ] + - [ 1.71640214e-14, 2.2753579e-15, 2.09203101e-19 ] + - [ 1.8008913e-14, 2.89248069e-15, 2.09203101e-19 ] + - [ 1.71641027e-14, 3.48731635e-15, 1.79376215e-20 ] + - [ 1.71642924e-14, 2.95755823e-15, 1.81784086e-20 ] + - [ 1.71641027e-14, 3.48731635e-15, 1.81784086e-20 ] + - [ 1.62983944e-14, 4.25290578e-15, 7.29023289e-22 ] + - [ 1.62985841e-14, 3.52781978e-15, 3.73613326e-21 ] + - [ 1.62983944e-14, 4.25290578e-15, 3.73613326e-21 ] + - [ 1.54832641e-14, 4.27875045e-15, 1.49059783e-24 ] + - [ 1.62982588e-14, 4.68697628e-15, 7.29023289e-22 ] + - [ 1.62983944e-14, 4.25290578e-15, 1.82063613e-24 ] + - [ 1.7163669e-14, 4.17094349e-15, 7.29023289e-22 ] + - [ 1.7163669e-14, 4.17094349e-15, 1.79376215e-20 ] + - [ 1.71641027e-14, 3.48731635e-15, 7.2419955e-22 ] + - [ 1.80085878e-14, 3.4211004e-15, 1.79376215e-20 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.7533492e-20, 1.88602828e-14 ] + - [ 2.79871076e-15, 2.07013967e-19, 1.88602828e-14 ] + - [ 2.79871076e-15, 9.71127607e-19, 1.80084251e-14 ] + - [ 2.21170507e-15, 2.03845865e-19, 1.88596051e-14 ] + - [ 2.11996462e-15, 9.71127607e-19, 1.88596051e-14 ] + - [ 2.11996462e-15, 4.3886737e-18, 1.80084251e-14 ] + - [ 1.57932023e-15, 9.39430046e-19, 1.88595238e-14 ] + - [ 1.53469261e-15, 4.3886737e-18, 1.88595238e-14 ] + - [ 1.53469261e-15, 1.84968337e-17, 1.80085878e-14 ] + - [ 1.09317923e-15, 4.23707797e-18, 1.88596594e-14 ] + - [ 1.04999664e-15, 1.84968337e-17, 1.88596594e-14 ] + - [ 1.04999664e-15, 4.59470174e-17, 1.80084522e-14 ] + - [ 7.13369554e-16, 1.77940875e-17, 1.88593341e-14 ] + - [ 6.92587601e-16, 4.59470174e-17, 1.88593341e-14 ] + - [ 6.92587601e-16, 6.11240806e-17, 1.88589004e-14 ] + - [ 5.41792866e-16, 4.51512829e-17, 1.96744644e-14 ] + - [ 5.1557635e-16, 6.11240806e-17, 1.96744644e-14 ] + - [ 5.1557635e-16, 6.19930835e-17, 1.9442662e-14 ] + - [ 5.09662789e-16, 5.89569998e-17, 1.98027255e-14 ] + - [ 4.96632034e-16, 5.87320596e-17, 2.0120207e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.96744644e-14, 5.1557635e-16 ] + - [ 5.63963662e-17, 1.96744644e-14, 5.1557635e-16 ] + - [ 4.41265053e-17, 1.96750336e-14, 6.65773926e-16 ] + - [ 5.89569998e-17, 1.88593341e-14, 6.92587601e-16 ] + - [ 4.41265053e-17, 1.88593341e-14, 6.92587601e-16 ] + - [ 1.68880667e-17, 1.96755757e-14, 9.94287284e-16 ] + - [ 4.51512829e-17, 1.88596594e-14, 1.04999664e-15 ] + - [ 1.68880667e-17, 1.88596594e-14, 1.04999664e-15 ] + - [ 4.04157218e-18, 1.96754944e-14, 1.47712232e-15 ] + - [ 1.77940875e-17, 1.88595238e-14, 1.53469261e-15 ] + - [ 4.04157218e-18, 1.88595238e-14, 1.53469261e-15 ] + - [ 8.98534237e-19, 1.96756028e-14, 2.00162565e-15 ] + - [ 4.23707797e-18, 1.88596051e-14, 2.11996462e-15 ] + - [ 8.98534237e-19, 1.88596051e-14, 2.11996462e-15 ] + - [ 1.9974946e-19, 1.96765515e-14, 2.6777697e-15 ] + - [ 9.39430046e-19, 1.88602828e-14, 2.79871076e-15 ] + - [ 1.9974946e-19, 1.88602828e-14, 2.79871076e-15 ] + - [ 1.69446041e-20, 1.88598491e-14, 3.32571263e-15 ] + - [ 2.03845865e-19, 1.80085878e-14, 3.4211004e-15 ] + - [ 1.69446041e-20, 1.80085878e-14, 3.4211004e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.17094349e-15, 7.15981866e-22 ] + - [ 1.7163669e-14, 4.17094349e-15, 1.8027558e-24 ] + - [ 1.71634522e-14, 4.60455659e-15, 7.2419955e-22 ] + - [ 1.62982588e-14, 4.68697628e-15, 1.8027558e-24 ] + - [ 1.62982588e-14, 4.68697628e-15, -5.31144485e-31 ] + - [ 1.62982046e-14, 4.80271654e-15, 1.82063613e-24 ] + - [ 1.54832641e-14, 4.71877051e-15, -5.31144485e-31 ] + - [ 1.54832641e-14, 4.71877051e-15, 9.63697468e-92 ] + - [ 2.06573208e-14, 4.58147939e-16, 5.87320596e-17 ] + - [ 2.09690831e-14, 4.54468852e-16, 5.4710632e-17 ] + - [ 2.04106919e-14, 4.70543843e-16, 5.63963662e-17 ] + - [ 2.09690831e-14, 4.54468852e-16, 5.63963662e-17 ] + - [ 2.04115592e-14, 6.34063977e-16, 4.29162541e-17 ] + - [ 2.04108545e-14, 4.84580026e-16, 4.41265053e-17 ] + - [ 2.04115592e-14, 6.34063977e-16, 4.41265053e-17 ] + - [ 2.04122911e-14, 9.28410991e-16, 1.58172052e-17 ] + - [ 1.96750336e-14, 6.65773926e-16, 1.68880667e-17 ] + - [ 2.04122911e-14, 9.28410991e-16, 1.68880667e-17 ] + - [ 2.0412264e-14, 1.40904713e-15, 3.81045129e-18 ] + - [ 1.96755757e-14, 9.94287284e-16, 4.04157218e-18 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 8.58767844e-19, 1.96754944e-14 ] + - [ 1.47712232e-15, 8.98534237e-19, 2.04124537e-14 ] + - [ 1.8616975e-15, 8.98534237e-19, 2.04135921e-14 ] + - [ 2.53477699e-15, 1.94897839e-19, 1.96756028e-14 ] + - [ 2.00162565e-15, 1.9974946e-19, 2.04135921e-14 ] + - [ 2.53477699e-15, 1.9974946e-19, 1.96759823e-14 ] + - [ 3.2027099e-15, 1.61800953e-20, 1.96765515e-14 ] + - [ 2.6777697e-15, 1.69446041e-20, 1.96759823e-14 ] + - [ 3.2027099e-15, 1.69446041e-20, 1.88589546e-14 ] + - [ 3.84387018e-15, 7.03933625e-22, 1.88598491e-14 ] + - [ 3.32571263e-15, 7.15981866e-22, 1.88589546e-14 ] + - [ 3.84387018e-15, 7.15981866e-22, 1.8007612e-14 ] + - [ 4.46972249e-15, 1.77234364e-24, 1.80079372e-14 ] + - [ 4.03692932e-15, 1.8027558e-24, 1.8007612e-14 ] + - [ 4.46972249e-15, 1.8027558e-24, 1.71633437e-14 ] + - [ 4.72024263e-15, -5.25481047e-31, 1.71634522e-14 ] + - [ 4.60455659e-15, -5.31144485e-31, 1.71633437e-14 ] + - [ 4.72024263e-15, -5.31144485e-31, 1.71633166e-14 ] + - [ 4.5167108e-15, -1.10519743e-23, 1.62982046e-14 ] + - [ 4.80271654e-15, -1.11573535e-23, 1.71633166e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.62982317e-14, 4.59889333e-15 ] + - [ -1.70976656e-21, 1.7163398e-14, 3.99518584e-15 ] + - [ -1.70976656e-21, 1.62983944e-14, 3.39549375e-15 ] + - [ -4.38045446e-20, 1.62982859e-14, 4.0765891e-15 ] + - [ -6.42426992e-21, 1.62983944e-14, 3.39549375e-15 ] + - [ -6.42426992e-21, 1.54786833e-14, 3.40810776e-15 ] + - [ -1.86279134e-19, 1.62985028e-14, 2.8213528e-15 ] + - [ -4.38045446e-20, 1.62983944e-14, 3.39549375e-15 ] + - [ -3.40129066e-19, 1.71635877e-14, 3.35546975e-15 ] + - [ -4.38045446e-20, 1.71635877e-14, 3.35546975e-15 ] + - [ -1.68895922e-21, 1.7163398e-14, 3.99518584e-15 ] + - [ -4.31976008e-20, 1.80074765e-14, 3.86195434e-15 ] + - [ -1.68895922e-21, 1.80074765e-14, 3.86195434e-15 ] + - [ -1.10519743e-23, 1.71633166e-14, 4.5167108e-15 ] + - [ -1.66785642e-21, 1.80074222e-14, 4.38221552e-15 ] + - [ -1.10519743e-23, 1.80074222e-14, 4.38221552e-15 ] + - [ -5.25481047e-31, 1.71633437e-14, 4.72024263e-15 ] + - [ -1.08790497e-23, 1.80075036e-14, 4.58525946e-15 ] + - [ -5.25481047e-31, 1.80075036e-14, 4.58525946e-15 ] + - [ 1.77234364e-24, 1.8007612e-14, 4.46972249e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.27544024e-15, 7.03933625e-22 ] + - [ 1.88589546e-14, 3.84387018e-15, 1.7277872e-24 ] + - [ 1.9674871e-14, 3.59493398e-15, 7.03933625e-22 ] + - [ 1.9674871e-14, 3.59493398e-15, 1.61800953e-20 ] + - [ 1.96759823e-14, 3.2027099e-15, 6.88236176e-22 ] + - [ 2.04129687e-14, 3.05730822e-15, 1.61800953e-20 ] + - [ 2.04129687e-14, 3.05730822e-15, 1.94897839e-19 ] + - [ 2.04135921e-14, 2.53477699e-15, 1.5272187e-20 ] + - [ 2.09723357e-14, 2.39586019e-15, 1.94897839e-19 ] + - [ 2.09723357e-14, 2.39586019e-15, 8.58767844e-19 ] + - [ 2.04124537e-14, 1.8616975e-15, 1.90178877e-19 ] + - [ 2.09710347e-14, 1.75105362e-15, 8.58767844e-19 ] + - [ 2.09710347e-14, 1.75105362e-15, 3.81045129e-18 ] + - [ 2.0412264e-14, 1.40904713e-15, 8.3527426e-19 ] + - [ 2.09708178e-14, 1.34290741e-15, 3.81045129e-18 ] + - [ 2.09708178e-14, 1.34290741e-15, 1.58172052e-17 ] + - [ 2.04122911e-14, 9.28410991e-16, 3.58594455e-18 ] + - [ 2.09708178e-14, 8.76292953e-16, 1.58172052e-17 ] + - [ 2.09708178e-14, 8.76292953e-16, 4.29162541e-17 ] + - [ 2.04115592e-14, 6.34063977e-16, 1.47771944e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.4710632e-17, 2.09690831e-14 ] + - [ 4.54468852e-16, 4.17415253e-17, 2.12747739e-14 ] + - [ 5.06704527e-16, 5.4710632e-17, 2.12747739e-14 ] + - [ 5.06704527e-16, 5.50376661e-17, 1.65574645e-14 ] + - [ 1.6497645e-55, -4.72758307e-15, 1.63034355e-14 ] + - [ 1.57852511e-27, -4.78707527e-15, 1.71703909e-14 ] + - [ 2.77689808e-53, -4.70521801e-15, 1.63034358e-14 ] + - [ 1.57852511e-27, -4.70521801e-15, 1.63023516e-14 ] + - [ 4.95942522e-23, -4.50636517e-15, 1.71697947e-14 ] + - [ 1.57133908e-27, -4.42491109e-15, 1.63023516e-14 ] + - [ 4.95942522e-23, -4.42491109e-15, 1.63018908e-14 ] + - [ 3.69658207e-21, -3.90819727e-15, 1.71686563e-14 ] + - [ 4.91591544e-23, -3.82749536e-15, 1.63018908e-14 ] + - [ 3.69658207e-21, -3.82749536e-15, 1.63017282e-14 ] + - [ 9.10927344e-20, -3.27504821e-15, 1.71681413e-14 ] + - [ 3.64472172e-21, -3.2352834e-15, 1.63017282e-14 ] + - [ 9.10927344e-20, -3.2352834e-15, 1.63015656e-14 ] + - [ 4.72322089e-19, -2.66572659e-15, 1.71678974e-14 ] + - [ 8.98828794e-20, -2.62679018e-15, 1.63015656e-14 ] + - [ 4.72322089e-19, -2.62679018e-15, 1.63012132e-14 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.63012132e-14, 2.21857572e-18 ] + - [ -1.86708294e-15, 1.63007796e-14, 9.68713689e-18 ] + - [ -1.38644152e-15, 1.71672197e-14, 2.18745057e-18 ] + - [ -1.36819473e-15, 1.63007796e-14, 9.68713689e-18 ] + - [ -1.36819473e-15, 1.63004543e-14, 3.37053928e-17 ] + - [ -8.74936855e-16, 1.71667047e-14, 9.5401502e-18 ] + - [ -8.66200133e-16, 1.63004543e-14, 3.37053928e-17 ] + - [ -8.66200133e-16, 1.63001562e-14, 6.56572685e-17 ] + - [ -5.7896872e-16, 1.7166244e-14, 3.33681149e-17 ] + - [ -5.70669491e-16, 1.63001562e-14, 6.56572685e-17 ] + - [ -5.70669491e-16, 1.62999122e-14, 1.21856144e-16 ] + - [ -3.4758722e-16, 1.71658645e-14, 6.49000211e-17 ] + - [ -3.43681128e-16, 1.62999122e-14, 1.21856144e-16 ] + - [ -3.43681128e-16, 1.62996954e-14, 2.16837336e-16 ] + - [ -1.95287177e-16, 1.71655392e-14, 1.20185054e-16 ] + - [ -1.93467856e-16, 1.62996954e-14, 2.16837336e-16 ] + - [ -1.93467856e-16, 1.62994514e-14, 3.87226138e-16 ] + - [ -1.04863644e-16, 1.71652953e-14, 2.15019815e-16 ] + - [ -1.0402667e-16, 1.62994514e-14, 3.87226138e-16 ] + - [ -1.0402667e-16, 1.62991804e-14, 6.50973931e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 6.50973931e-16, -5.40549226e-17 ] + - [ 1.62989364e-14, 9.90383733e-16, -2.72307227e-17 ] + - [ 1.71646177e-14, 6.42661573e-16, -2.68926507e-17 ] + - [ 1.62989365e-14, 9.90383733e-16, -2.68926507e-17 ] + - [ 1.62987196e-14, 1.49894401e-15, -6.62218709e-18 ] + - [ 1.71642653e-14, 9.72861162e-16, -6.54854485e-18 ] + - [ 1.62987196e-14, 1.49894401e-15, -6.54854485e-18 ] + - [ 1.62986112e-14, 2.09565054e-15, -1.5381078e-18 ] + - [ 1.71639943e-14, 1.480632e-15, -1.52252869e-18 ] + - [ 1.62986112e-14, 2.09565054e-15, -1.52252869e-18 ] + - [ 1.62985028e-14, 2.8213528e-15, -3.40129066e-19 ] + - [ 1.71638858e-14, 2.05768822e-15, -3.36959723e-19 ] + - [ 1.62985028e-14, 2.8213528e-15, -3.36959723e-19 ] + - [ 1.71635877e-14, 3.35546975e-15, -4.31976008e-20 ] + - [ 1.71637774e-14, 2.78225884e-15, -4.22098438e-20 ] + - [ 1.71635877e-14, 3.35546975e-15, -4.22098438e-20 ] + - [ 1.80074765e-14, 3.86195434e-15, -1.66785642e-21 ] + - [ 1.80077204e-14, 3.28994497e-15, -1.63750923e-21 ] + - [ 1.80074765e-14, 3.86195434e-15, -1.63750923e-21 ] + - [ 1.80074222e-14, 4.38221552e-15, -1.08790497e-23 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.06295551e-23, 1.80075036e-14 ] + - [ 4.58525946e-15, -5.16019916e-31, 1.8858277e-14 ] + - [ 4.1883805e-15, -5.02267573e-31, 1.80075036e-14 ] + - [ 4.58525946e-15, -5.02267573e-31, 1.88585752e-14 ] + - [ 4.27544024e-15, 1.7277872e-24, 1.88584125e-14 ] + - [ 4.39073326e-15, 1.6697649e-24, 1.88585752e-14 ] + - [ 4.27544024e-15, 1.6697649e-24, 1.9674871e-14 ] + - [ 3.59493398e-15, 6.88236176e-22, 1.96744373e-14 ] + - [ 4.02488789e-15, 6.69551911e-22, 1.9674871e-14 ] + - [ 3.59493398e-15, 6.69551911e-22, 2.04129687e-14 ] + - [ 3.05730822e-15, 1.5272187e-20, 2.04116677e-14 ] + - [ 3.42670437e-15, 1.43874657e-20, 2.04129687e-14 ] + - [ 3.05730822e-15, 1.43874657e-20, 2.09723357e-14 ] + - [ 2.39586019e-15, 1.90178877e-19, 2.09716852e-14 ] + - [ 2.91607734e-15, 4.63548975e-20, 2.09723357e-14 ] + - [ 2.39586019e-15, 4.63548975e-20, 2.12779723e-14 ] + - [ 2.50647592e-15, 4.39650132e-17, 3.90386418e-16 ] + - [ -3.69488104e-16, 4.38601929e-17, 1.13932008e-15 ] + - [ -2.71877933e-16, 5.87338065e-17, 1.15679945e-15 ] + - [ -2.47329859e-16, 9.26194655e-17, 2.37842741e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.93051671e-15, -5.22899971e-17 ] + - [ 1.13785455e-16, 2.37344686e-15, -4.72978761e-17 ] + - [ 1.0739082e-16, 2.77615343e-15, -8.62264843e-17 ] + - [ 1.02270029e-16, 2.67502447e-15, -7.70820224e-17 ] + - [ 1.03477846e-16, 2.81252163e-15, -8.09184464e-17 ] + - [ 1.05184617e-16, 2.67502447e-15, -7.70820224e-17 ] + - [ 1.05184617e-16, 2.35437845e-15, -6.59987022e-17 ] + - [ 1.0739082e-16, 2.86391282e-15, -7.15781082e-17 ] + - [ 1.05432374e-16, 2.35437845e-15, -6.59987022e-17 ] + - [ 1.05432374e-16, 2.93051671e-15, -5.22899971e-17 ] + - [ 9.06954831e-17, 2.73639709e-15, -9.12672303e-17 ] + - [ 9.12040734e-17, 2.18375891e-15, -1.08958943e-16 ] + - [ 9.91063085e-17, 2.77615343e-15, -8.62264843e-17 ] + - [ 9.12040734e-17, 2.77615343e-15, -8.62264843e-17 ] + - [ 9.19721206e-17, 2.0930383e-15, -1.06036838e-16 ] + - [ 1.00646426e-16, 2.15451256e-15, -1.00565217e-16 ] + - [ 9.26194655e-17, 2.54662783e-15, -1.09325655e-16 ] + - [ 9.06954831e-17, 2.28210283e-15, -1.13129745e-16 ] + - [ 9.33543724e-17, 2.62723148e-15, -1.02544468e-16 ] + - [ 9.06954831e-17, 2.62723148e-15, -1.02544468e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.12636529e-16, 9.0613268e-17 ] + - [ 2.37842741e-15, -1.19566349e-16, 8.87644597e-17 ] + - [ 1.42597297e-15, -2.27533217e-16, 7.25193736e-17 ] + - [ 1.39736697e-15, -2.1968522e-16, 6.44012511e-17 ] + - [ 1.65370286e-15, -2.01440448e-16, 8.01853395e-17 ] + - [ 1.39736697e-15, -2.1968522e-16, 8.01853395e-17 ] + - [ 1.35215235e-15, -2.12636529e-16, 5.6867793e-17 ] + - [ 1.15679945e-15, -2.47329859e-16, 5.3975778e-17 ] + - [ 9.6249348e-16, -2.93502049e-16, 5.75986765e-17 ] + - [ 1.11121891e-15, -2.33352757e-16, 5.3975778e-17 ] + - [ 1.11121891e-15, -2.33352757e-16, 5.34965955e-17 ] + - [ 8.25004897e-16, -3.13990293e-16, 5.22352841e-17 ] + - [ 9.1417872e-16, -2.78216704e-16, 5.34965955e-17 ] + - [ 8.4925545e-16, -3.09386881e-16, 5.3975778e-17 ] + - [ 9.1417872e-16, -2.78216704e-16, 5.3975778e-17 ] + - [ 9.6249348e-16, -2.93502049e-16, 5.02867112e-17 ] + - [ 7.14621257e-16, -3.08530742e-16, 4.85365029e-17 ] + - [ 6.61768096e-16, -3.40126554e-16, 4.96153053e-17 ] + - [ 6.48161358e-16, -3.21831277e-16, 4.83801724e-17 ] + - [ 6.32708089e-16, -3.2870262e-16, 4.73606359e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.73606359e-17, 4.85334521e-16 ] + - [ -3.48528697e-16, 4.60034774e-17, 4.70728285e-16 ] + - [ -3.50371205e-16, 4.58020953e-17, 6.40117934e-16 ] + - [ -3.23341113e-16, 4.82386914e-17, 4.85334521e-16 ] + - [ -3.48528697e-16, 4.80841609e-17, 6.40117934e-16 ] + - [ -3.23341113e-16, 4.80841609e-17, 6.48161358e-16 ] + - [ -3.21831277e-16, 4.83808871e-17, 6.32708089e-16 ] + - [ -3.2870262e-16, 4.83801724e-17, 6.48161358e-16 ] + - [ -3.21831277e-16, 4.83801724e-17, 6.61768096e-16 ] + - [ -3.40126554e-16, 4.26779466e-17, 3.52199632e-16 ] + - [ -3.78027255e-16, 4.33968658e-17, 3.62133634e-16 ] + - [ -3.71281696e-16, 4.31328033e-17, 3.87588668e-16 ] + - [ -3.73427019e-16, 4.33968658e-17, 3.87588668e-16 ] + - [ -3.73427019e-16, 4.39106972e-17, 3.87283737e-16 ] + - [ -3.66555676e-16, 4.38601929e-17, 3.90386418e-16 ] + - [ -3.69488104e-16, 4.39106972e-17, 3.90386418e-16 ] + - [ -3.69488104e-16, 4.41193055e-17, 3.96911113e-16 ] + - [ -3.64606865e-16, 4.39475167e-17, 3.92362546e-16 ] + - [ -3.72749392e-16, 4.41193055e-17, 3.92362546e-16 ] + - [ -3.72749392e-16, 4.49105931e-17, 4.30761938e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 4.18735764e-16, -3.68746315e-16 ] + - [ 4.56020367e-17, 4.70728285e-16, -3.50371205e-16 ] + - [ 4.45742681e-17, 4.55232664e-16, -3.63455747e-16 ] + - [ 4.56020367e-17, 4.55232664e-16, -3.63455747e-16 ] + - [ 4.58020953e-17, 4.85334521e-16, -3.48528697e-16 ] + - [ 4.53562913e-17, 4.88150058e-16, -3.60354971e-16 ] + - [ 4.58020953e-17, 4.88150058e-16, -3.60354971e-16 ] + - [ 4.60034774e-17, 2.28338851e-16, -3.88853818e-16 ] + - [ 4.13966505e-17, 2.47705412e-16, -3.86963876e-16 ] + - [ 4.14996708e-17, 2.42601192e-16, -3.87996197e-16 ] + - [ 4.15808007e-17, 2.47705412e-16, -3.86963876e-16 ] + - [ 4.15808007e-17, 2.57371752e-16, -3.85973694e-16 ] + - [ 4.1638796e-17, 2.56838969e-16, -3.87042226e-16 ] + - [ 4.16641541e-17, 2.57371752e-16, -3.85973694e-16 ] + - [ 4.16641541e-17, 2.62318425e-16, -3.8544451e-16 ] + - [ 4.1711085e-17, 2.63008757e-16, -3.86598381e-16 ] + - [ 4.17761742e-17, 2.62318425e-16, -3.8544451e-16 ] + - [ 4.17761742e-17, 2.7252009e-16, -3.84304404e-16 ] + - [ 4.18628097e-17, 2.71053029e-16, -3.85991694e-16 ] + - [ 4.19833531e-17, 2.7252009e-16, -3.84304404e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -3.8484354e-16, 4.22026288e-17 ] + - [ 2.87633699e-16, -3.82493236e-16, 4.22026288e-17 ] + - [ 3.02710038e-16, -3.80537437e-16, 4.23356394e-17 ] + - [ 2.99407456e-16, -3.83596496e-16, 4.23284661e-17 ] + - [ 3.02710038e-16, -3.80537437e-16, 4.23284661e-17 ] + - [ 3.04783575e-16, -3.80256434e-16, 4.23695737e-17 ] + - [ 3.07188301e-16, -3.82868048e-16, 4.26779466e-17 ] + - [ 3.04783575e-16, -3.80256434e-16, 4.26779466e-17 ] + - [ 3.3274752e-16, -3.7617797e-16, 4.28478032e-17 ] + - [ 3.27657699e-16, -3.80801287e-16, 4.33968658e-17 ] + - [ 8.43002653e-16, -2.78145129e-16, 5.15777747e-17 ] + - [ 7.78843296e-16, -3.09973663e-16, 5.0782649e-17 ] + - [ 8.09870112e-16, -2.86636846e-16, 5.05103015e-17 ] + - [ 7.78843296e-16, -3.09973663e-16, 5.05103015e-17 ] + - [ 7.48517822e-16, -3.01144192e-16, 4.85365029e-17 ] + - [ 6.7571534e-16, -3.38188119e-16, 5.02867112e-17 ] + - [ 7.48517822e-16, -3.01144192e-16, 4.87841807e-17 ] + - [ 7.42697012e-16, -3.28152472e-16, 5.02867112e-17 ] + - [ 7.42697012e-16, -3.28152472e-16, 5.0782649e-17 ] + - [ 7.78843296e-16, -3.09973663e-16, 5.00339513e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.23181874e-17, 8.43002653e-16 ] + - [ -2.78145129e-16, 5.10475056e-17, 8.25004897e-16 ] + - [ -3.13990293e-16, 5.23181874e-17, 8.25004897e-16 ] + - [ -3.13990293e-16, 5.32487325e-17, 8.82704781e-16 ] + - [ -2.67308825e-16, 5.17106001e-17, 9.1417872e-16 ] + - [ -2.78216704e-16, 5.32487325e-17, 9.1417872e-16 ] + - [ -2.78216704e-16, 5.52787793e-17, 1.03687991e-15 ] + - [ -2.43108035e-16, 5.34965955e-17, 1.11121891e-15 ] + - [ -2.33352757e-16, 5.52787793e-17, 1.11121891e-15 ] + - [ -2.33352757e-16, 6.24995033e-17, 1.2894177e-15 ] + - [ -2.09513942e-16, 5.69893422e-17, 1.15679945e-15 ] + - [ -2.47329859e-16, 8.01853395e-17, 2.28648707e-15 ] + - [ -1.41465962e-16, 6.36621089e-17, 1.35215235e-15 ] + - [ -2.12636529e-16, 8.71750553e-17, 2.35772593e-15 ] + - [ -1.33320364e-16, 6.36621089e-17, 2.35772593e-15 ] + - [ -1.33320364e-16, 7.07359458e-17, 1.52175207e-15 ] + - [ -1.826054e-16, 8.87644597e-17, 2.37842741e-15 ] + - [ -1.19566349e-16, 7.07359458e-17, 2.37842741e-15 ] + - [ -1.19566349e-16, 7.61458923e-17, 1.65141248e-15 ] + - [ -1.63780939e-16, 9.05118887e-17, 1.71098939e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 2.37842741e-15, -1.19566349e-16 ] + - [ 9.06954831e-17, 1.83036999e-15, -1.35655316e-16 ] + - [ 9.05118887e-17, 1.83036999e-15, -1.35655316e-16 ] + - [ 7.89072726e-17, 2.18375891e-15, -1.08958943e-16 ] + - [ 9.19721206e-17, 2.06833204e-15, -1.08018948e-16 ] + - [ 9.12040734e-17, 2.06833204e-15, -1.08018948e-16 ] + - [ 9.06954831e-17, 2.28210283e-15, -1.13129745e-16 ] + - [ 9.10728363e-17, 1.93960336e-15, -1.22952257e-16 ] + - [ 9.06954831e-17, 1.93960336e-15, -1.22952257e-16 ] + - [ 8.3659551e-17, 2.35437845e-15, -6.59987022e-17 ] + - [ 1.04513979e-16, 2.67502447e-15, -7.70820224e-17 ] + - [ 1.03477846e-16, 2.33244369e-15, -7.44962955e-17 ] + - [ 1.01229608e-16, 2.67502447e-15, -7.70820224e-17 ] + - [ 1.01229608e-16, 2.77615343e-15, -8.62264843e-17 ] + - [ 1.00646426e-16, 2.2900175e-15, -8.35515013e-17 ] + - [ 9.8090663e-17, 2.77615343e-15, -8.62264843e-17 ] + - [ 9.8090663e-17, 2.15451256e-15, -1.00565217e-16 ] + - [ 6.87657471e-17, 1.2894177e-15, -2.09513942e-16 ] + - [ 6.36621089e-17, 1.35215235e-15, -2.12636529e-16 ] + - [ 6.24995033e-17, 1.15679945e-15, -2.47329859e-16 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -2.1968522e-16, 5.75986765e-17 ] + - [ 1.20539204e-15, -2.51299691e-16, 6.44012511e-17 ] + - [ 1.20539204e-15, -2.51299691e-16, 6.50441491e-17 ] + - [ 1.42597297e-15, -2.27533217e-16, 5.87338065e-17 ] + - [ 1.13932008e-15, -2.71877933e-16, 6.74782041e-17 ] + - [ 1.72905655e-16, -3.93782067e-16, 6.89510356e-17 ] + - [ 2.08873215e-16, -3.90081169e-16, 5.72366228e-17 ] + - [ 2.25837563e-16, -3.89119151e-16, 6.89510356e-17 ] + - [ 2.25837563e-16, -3.89119151e-16, 6.96617491e-17 ] + - [ 1.72905655e-16, -3.93782067e-16, 5.10802487e-17 ] + - [ 2.25837563e-16, -3.89119151e-16, 5.24316898e-17 ] + - [ 1.72951395e-16, -3.93874817e-16, 4.03541647e-17 ] + - [ 2.25837563e-16, -3.89119151e-16, 4.03541647e-17 ] + - [ 2.25796058e-16, -3.89006496e-16, 4.0085867e-17 ] + - [ 1.72847633e-16, -3.93225778e-16, 5.0819442e-17 ] + - [ 1.2161908e-16, -3.93968415e-16, 4.03541647e-17 ] + - [ 1.72951395e-16, -3.93874817e-16, 5.0819442e-17 ] + - [ 1.72951395e-16, -3.93874817e-16, 5.67165975e-17 ] + - [ 1.21617386e-16, -3.93968626e-16, 5.10802487e-17 ] + - [ 1.72905655e-16, -3.93782067e-16, 5.67165975e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 5.72366228e-17, 1.53973621e-16 ] + - [ -3.93652895e-16, -4.00856937e-17, 3.30291096e-19 ] + - [ -3.93968309e-16, -4.00857337e-17, 8.17028167e-61 ] + - [ -5.12257039e-16, -4.00857875e-17, 3.30291096e-19 ] + - [ -5.12270592e-16, -1.9933642e-18, 1.57116151e-21 ] + - [ -1.68408254e-15, -9.73474268e-18, -2.78908245e-35 ] + - [ -1.61147572e-15, -7.72471041e-18, 1.57116151e-21 ] + - [ -1.05478026e-15, -9.73474268e-18, 1.57116151e-21 ] + - [ -1.05478026e-15, -3.55665884e-17, -6.66611172e-37 ] + - [ -1.05343602e-15, -3.56420938e-17, 1.57116151e-21 ] + - [ -8.69959053e-16, -3.55665884e-17, 1.57116151e-21 ] + - [ -8.69959053e-16, -6.72846551e-17, 1.27654902e-62 ] + - [ -6.8567433e-16, -4.52602853e-17, 1.57116151e-21 ] + - [ -6.85606991e-16, -1.6436957e-21, 1.5711607e-21 ] + - [ -4.18378959e-15, -4.95461728e-20, -4.21950967e-33 ] + - [ -4.08030588e-15, -4.1332205e-20, 1.57116151e-21 ] + - [ -3.20856035e-15, -4.95461728e-20, 1.57116151e-21 ] + - [ -3.20856035e-15, -3.93309848e-19, -1.51604736e-33 ] + - [ -3.19539746e-15, -3.9575055e-19, 1.57116151e-21 ] + - [ -2.91177526e-15, -3.93309848e-19, 1.57116151e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.57116151e-21, -2.4128881e-15 ] + - [ -1.9933642e-18, 1.57116151e-21, -2.4128881e-15 ] + - [ -7.72471041e-18, -1.21012955e-32, -5.50849998e-15 ] + - [ 2.18247503e-59, -1.45067374e-32, -5.68806918e-15 ] + - [ -7.08540549e-59, 1.5711607e-21, -5.73062242e-15 ] + - [ -6.58519385e-24, -1.45067374e-32, -5.68806918e-15 ] + - [ -6.58519385e-24, -1.22096291e-32, -5.50902684e-15 ] + - [ -6.54940004e-24, 1.5711607e-21, -5.5499758e-15 ] + - [ -1.72450016e-22, -1.22096291e-32, -5.50902684e-15 ] + - [ -1.72450016e-22, -8.49318612e-33, -4.97221463e-15 ] + - [ -1.6436957e-21, 1.5711607e-21, -5.34254421e-15 ] + - [ -1.65435414e-21, -8.49318612e-33, -4.97221463e-15 ] + - [ -1.65435414e-21, 1.5711607e-21, -4.18378959e-15 ] + - [ 4.95621736e-20, 1.5711607e-21, -5.00894368e-15 ] + - [ 1.64363431e-21, -8.27952827e-33, -4.97121005e-15 ] + - [ 1.65944567e-21, 1.5711607e-21, -5.34250525e-15 ] + - [ 1.64363431e-21, 1.5711607e-21, -5.34250525e-15 ] + - [ 6.54708395e-24, -1.21012955e-32, -5.50849998e-15 ] + - [ 1.72527665e-22, 1.5711607e-21, -5.54953365e-15 ] + - [ 6.54708395e-24, 1.5711607e-21, -5.54953365e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.18370997e-15, 3.96375899e-19 ] + - [ -1.47692691e-33, -3.19427514e-15, 7.65262931e-19 ] + - [ 1.57116151e-21, -2.91171681e-15, 3.93468874e-19 ] + - [ -4.41110404e-34, -2.40199949e-15, 7.65262931e-19 ] + - [ -4.41110404e-34, -2.40199949e-15, 2.01813414e-18 ] + - [ 1.57116151e-21, -2.41181491e-15, 1.99567203e-18 ] + - [ -2.61510928e-35, -1.61046394e-15, 2.01813414e-18 ] + - [ -2.61510928e-35, -1.61046394e-15, 7.72584861e-18 ] + - [ 1.57116151e-21, -1.684044e-15, 9.75082307e-18 ] + - [ -6.31346342e-37, -1.05220232e-15, 7.72584861e-18 ] + - [ -6.31346342e-37, -1.05220232e-15, 3.56775633e-17 ] + - [ 1.57116151e-21, -1.05405308e-15, 3.56120635e-17 ] + - [ 1.57116151e-21, -8.69935548e-16, 4.52624293e-17 ] + - [ -6.31346342e-37, -1.05220232e-15, 6.72882019e-17 ] + - [ 1.57116151e-21, -8.69935548e-16, 6.72882019e-17 ] + - [ 1.57116151e-21, -6.85597462e-16, 5.21166596e-17 ] + - [ -1.80375026e-22, -6.85677506e-16, 3.47252203e-17 ] + - [ -1.57048458e-21, -8.75862237e-16, 5.70117618e-17 ] + - [ -2.40194941e-22, -1.03177866e-15, 3.47252203e-17 ] + - [ -2.40194941e-22, -1.03177866e-15, 2.7181522e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, 1.41541817e-17, -2.40194941e-22 ] + - [ -1.03177866e-15, 7.56015109e-18, -1.57029071e-21 ] + - [ -1.26427734e-15, 7.56015109e-18, -1.57029071e-21 ] + - [ -1.62618318e-15, 5.17283925e-18, -2.52066275e-22 ] + - [ -1.56967422e-15, 1.63126281e-18, -1.57029071e-21 ] + - [ -1.62618318e-15, 1.63126281e-18, -1.57032948e-21 ] + - [ -2.12065919e-15, 1.66448735e-18, -2.62625753e-22 ] + - [ -2.28504287e-15, 5.6687793e-19, -1.5703424e-21 ] + - [ -2.68481193e-15, 1.63126281e-18, -2.71543794e-22 ] + - [ -3.04782823e-15, 5.6687793e-19, -2.71543794e-22 ] + - [ -3.04782823e-15, 3.13720393e-19, -2.78658839e-22 ] + - [ -3.73958349e-15, 2.65262312e-20, -2.71543794e-22 ] + - [ -3.04782823e-15, 3.45793494e-19, -1.57035614e-21 ] + - [ -3.57795605e-15, 1.79783853e-19, -2.71543794e-22 ] + - [ -3.04782823e-15, 1.79783853e-19, -1.5703424e-21 ] + - [ -2.94804605e-15, 1.45380606e-21, -1.57038199e-21 ] + - [ -4.20058286e-15, 4.05034605e-20, -2.78658839e-22 ] + - [ -3.73958349e-15, 2.6523542e-21, -1.57036906e-21 ] + - [ -3.83308915e-15, 4.05034605e-20, -1.57036906e-21 ] + - [ -3.83308915e-15, 2.65262312e-20, -1.57031736e-21 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -1.57033029e-21, -4.92454869e-15 ] + - [ 1.35601351e-22, -2.87014656e-22, -5.11601202e-15 ] + - [ 1.35601351e-22, -2.83854568e-22, -4.59883065e-15 ] + - [ 1.45380606e-21, -1.57036906e-21, -4.64984236e-15 ] + - [ 1.32871357e-21, -2.83854568e-22, -4.59883065e-15 ] + - [ 1.32871357e-21, -1.57038199e-21, -4.20058286e-15 ] + - [ 3.16536289e-26, -2.87014656e-22, -5.11601202e-15 ] + - [ 8.16209431e-35, -1.57029151e-21, -5.02344823e-15 ] + - [ 5.81408073e-24, -2.88106793e-22, -5.2889693e-15 ] + - [ 8.16209431e-35, -2.88106793e-22, -5.2889693e-15 ] + - [ -2.10065126e-25, -1.57027859e-21, -4.94646143e-15 ] + - [ 1.1961573e-48, -2.87150365e-22, -5.11686075e-15 ] + - [ -2.10065126e-25, -2.87150365e-22, -5.11686075e-15 ] + - [ -5.23258612e-24, -2.84158298e-22, -4.60038072e-15 ] + - [ -2.71180891e-22, -2.87150365e-22, -5.11686075e-15 ] + - [ -5.76385554e-24, -1.57031736e-21, -4.59536967e-15 ] + - [ -7.48012164e-23, -2.87150365e-22, -5.11686075e-15 ] + - [ -7.48012164e-23, -1.57029151e-21, -4.85594411e-15 ] + - [ -4.02981387e-20, -1.57026566e-21, -3.66379607e-15 ] + - [ -1.44751416e-21, -2.84158298e-22, -4.60038072e-15 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.26569429e-15, -2.71180891e-22 ] + - [ -2.63194439e-22, -2.2868479e-15, -4.77028745e-19 ] + - [ -2.72022007e-22, -3.04940286e-15, -3.44971483e-19 ] + - [ -1.57016146e-21, -2.75058319e-15, -1.57073712e-19 ] + - [ -2.72022007e-22, -3.04940286e-15, -1.57073712e-19 ] + - [ -2.7907243e-22, -3.74195688e-15, -4.02981387e-20 ] + - [ -1.57016146e-21, -3.22181981e-15, -3.40476001e-20 ] + - [ -2.7907243e-22, -3.74195688e-15, -3.40476001e-20 ] + - [ -1.57026566e-21, -3.66379607e-15, -7.53357544e-18 ] + - [ -1.57010976e-21, -1.66803974e-15, -1.62810133e-18 ] + - [ -2.63194439e-22, -2.2868479e-15, -4.50890439e-18 ] + - [ -1.57018731e-21, -2.19585285e-15, -1.62810133e-18 ] + - [ -1.57018731e-21, -2.19585285e-15, -4.77028745e-19 ] + - [ -1.5703424e-21, -9.15979512e-16, -1.27333916e-17 ] + - [ -2.5260265e-22, -1.57076054e-15, -7.53357544e-18 ] + - [ -1.56999344e-21, -1.31072566e-15, -6.4688526e-18 ] + - [ -2.5260265e-22, -1.57076054e-15, -6.4688526e-18 ] + - [ -1.57010976e-21, -1.66803974e-15, -7.53357544e-18 ] + - [ -2.40718391e-22, -1.03301744e-15, -3.21795687e-17 ] + - [ -1.5703424e-21, -9.15979512e-16, -3.06003287e-17 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -5.2042756e-17, -1.48071995e-26 ] + - [ -6.85746963e-16, 6.72882019e-17, -3.74067669e-26 ] + - [ -1.04860751e-15, 3.50252817e-17, 1.23496189e-64 ] + - [ -6.85674118e-16, 3.56120635e-17, -3.74067669e-26 ] + - [ -1.04860751e-15, 3.56120635e-17, -4.45759348e-26 ] + - [ -1.60334378e-15, 9.47343968e-18, -6.31346342e-37 ] + - [ -1.05220232e-15, 9.75082307e-18, -4.45759348e-26 ] + - [ -1.60334378e-15, 9.75082307e-18, -5.09104879e-26 ] + - [ -2.38145386e-15, 1.93310741e-18, -2.61510928e-35 ] + - [ -1.61046394e-15, 1.99567203e-18, -5.09104879e-26 ] + - [ -2.38145386e-15, 1.99567203e-18, -6.07844315e-26 ] + - [ -3.16825937e-15, 3.86832819e-19, -4.41110404e-34 ] + - [ -2.40199949e-15, 3.93468874e-19, -6.07844315e-26 ] + - [ -3.16825937e-15, 3.93468874e-19, -4.07807419e-33 ] + - [ -4.07871177e-15, 4.95621736e-20, -1.47692691e-33 ] + - [ -3.19427514e-15, 4.13419502e-20, -4.07807419e-33 ] + - [ -4.07871177e-15, 4.13419502e-20, 1.5711607e-21 ] + - [ -5.00894368e-15, -6.60458974e-17, -8.18463849e-24 ] + - [ -6.85664589e-16, -3.49757832e-17, -3.74919639e-26 ] + - [ -1.04996996e-15, -6.23354697e-17, -8.02913823e-24 ] + - [ 6.78433315e-310, 6.78433315e-310, 0 ] + - [ 0, -4.47005749e-26, -1.6045038e-15 ] + - [ -3.33151222e-17, -8.73191864e-24, -1.59145949e-15 ] + - [ -9.45509613e-18, -8.73191864e-24, -1.59145949e-15 ] + - [ -1.77301818e-18, -1.80375026e-22, -6.85677506e-16 ] + - [ 6.28848764e-17, -2.40194941e-22, -1.03177866e-15 ] + - [ 3.06569475e-17, -5.47788716e-24, -6.85657177e-16 ] + - [ 3.33721381e-17, -2.40194941e-22, -1.03177866e-15 ] + - [ 3.33721381e-17, -2.52066275e-22, -1.56967422e-15 ] + - [ 7.56015109e-18, -8.01742523e-24, -1.04197863e-15 ] + - [ 8.74412448e-18, -2.52066275e-22, -1.56967422e-15 ] + - [ 8.74412448e-18, -2.62625753e-22, -2.28504287e-15 ] + - [ 1.63126281e-18, -8.71636861e-24, -1.59021223e-15 ] + - [ 1.77759746e-18, -2.62625753e-22, -2.28504287e-15 ] + - [ 1.77759746e-18, -2.71543794e-22, -3.04782823e-15 ] + - [ 3.45793494e-19, -9.33473459e-24, -2.3438439e-15 ] diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_ankle_swing_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_ankle_swing_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..759aedfd096df85d03eb252931daf83cf145f61d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_ankle_swing_example.cpp @@ -0,0 +1,371 @@ +#include +#include +#include +#include + +#include "gamepad.hpp" + +// DDS +#include +#include + +// IDL +#include +#include +#include +#include + +static const std::string HG_CMD_TOPIC = "rt/lowcmd"; +static const std::string HG_IMU_TORSO = "rt/secondary_imu"; +static const std::string HG_STATE_TOPIC = "rt/lowstate"; + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree_hg::msg::dds_; + +template +class DataBuffer { + public: + void SetData(const T &newData) { + std::unique_lock lock(mutex); + data = std::make_shared(newData); + } + + std::shared_ptr GetData() { + std::shared_lock lock(mutex); + return data ? data : nullptr; + } + + void Clear() { + std::unique_lock lock(mutex); + data = nullptr; + } + + private: + std::shared_ptr data; + std::shared_mutex mutex; +}; + +const int G1_NUM_MOTOR = 29; +struct ImuState { + std::array rpy = {}; + std::array omega = {}; +}; +struct MotorCommand { + std::array q_target = {}; + std::array dq_target = {}; + std::array kp = {}; + std::array kd = {}; + std::array tau_ff = {}; +}; +struct MotorState { + std::array q = {}; + std::array dq = {}; +}; + +// Stiffness for all G1 Joints +std::array Kp{ + 60, 60, 60, 100, 40, 40, // legs + 60, 60, 60, 100, 40, 40, // legs + 60, 40, 40, // waist + 40, 40, 40, 40, 40, 40, 40, // arms + 40, 40, 40, 40, 40, 40, 40 // arms +}; + +// Damping for all G1 Joints +std::array Kd{ + 1, 1, 1, 2, 1, 1, // legs + 1, 1, 1, 2, 1, 1, // legs + 1, 1, 1, // waist + 1, 1, 1, 1, 1, 1, 1, // arms + 1, 1, 1, 1, 1, 1, 1 // arms +}; + +enum class Mode { + PR = 0, // Series Control for Ptich/Roll Joints + AB = 1 // Parallel Control for A/B Joints +}; + +enum G1JointIndex { + LeftHipPitch = 0, + LeftHipRoll = 1, + LeftHipYaw = 2, + LeftKnee = 3, + LeftAnklePitch = 4, + LeftAnkleB = 4, + LeftAnkleRoll = 5, + LeftAnkleA = 5, + RightHipPitch = 6, + RightHipRoll = 7, + RightHipYaw = 8, + RightKnee = 9, + RightAnklePitch = 10, + RightAnkleB = 10, + RightAnkleRoll = 11, + RightAnkleA = 11, + WaistYaw = 12, + WaistRoll = 13, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistA = 13, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistPitch = 14, // NOTE INVALID for g1 23dof/29dof with waist locked + WaistB = 14, // NOTE INVALID for g1 23dof/29dof with waist locked + LeftShoulderPitch = 15, + LeftShoulderRoll = 16, + LeftShoulderYaw = 17, + LeftElbow = 18, + LeftWristRoll = 19, + LeftWristPitch = 20, // NOTE INVALID for g1 23dof + LeftWristYaw = 21, // NOTE INVALID for g1 23dof + RightShoulderPitch = 22, + RightShoulderRoll = 23, + RightShoulderYaw = 24, + RightElbow = 25, + RightWristRoll = 26, + RightWristPitch = 27, // NOTE INVALID for g1 23dof + RightWristYaw = 28 // NOTE INVALID for g1 23dof +}; + +inline uint32_t Crc32Core(uint32_t *ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else + CRC32 <<= 1; + if (data & xbit) CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +}; + +class G1Example { + private: + double time_; + double control_dt_; // [2ms] + double duration_; // [3 s] + int counter_; + Mode mode_pr_; + uint8_t mode_machine_; + + Gamepad gamepad_; + REMOTE_DATA_RX rx_; + + DataBuffer motor_state_buffer_; + DataBuffer motor_command_buffer_; + DataBuffer imu_state_buffer_; + + ChannelPublisherPtr lowcmd_publisher_; + ChannelSubscriberPtr lowstate_subscriber_; + ChannelSubscriberPtr imutorso_subscriber_; + ThreadPtr command_writer_ptr_, control_thread_ptr_; + + std::shared_ptr msc_; + + public: + G1Example(std::string networkInterface) + : time_(0.0), + control_dt_(0.002), + duration_(3.0), + counter_(0), + mode_pr_(Mode::PR), + mode_machine_(0) { + ChannelFactory::Instance()->Init(0, networkInterface); + + // try to shutdown motion control-related service + msc_ = std::make_shared(); + msc_->SetTimeout(5.0f); + msc_->Init(); + std::string form, name; + while (msc_->CheckMode(form, name), !name.empty()) { + if (msc_->ReleaseMode()) + std::cout << "Failed to switch to Release Mode\n"; + sleep(5); + } + + // create publisher + lowcmd_publisher_.reset(new ChannelPublisher(HG_CMD_TOPIC)); + lowcmd_publisher_->InitChannel(); + // create subscriber + lowstate_subscriber_.reset(new ChannelSubscriber(HG_STATE_TOPIC)); + lowstate_subscriber_->InitChannel(std::bind(&G1Example::LowStateHandler, this, std::placeholders::_1), 1); + imutorso_subscriber_.reset(new ChannelSubscriber(HG_IMU_TORSO)); + imutorso_subscriber_->InitChannel(std::bind(&G1Example::imuTorsoHandler, this, std::placeholders::_1), 1); + // create threads + command_writer_ptr_ = CreateRecurrentThreadEx("command_writer", UT_CPU_ID_NONE, 2000, &G1Example::LowCommandWriter, this); + control_thread_ptr_ = CreateRecurrentThreadEx("control", UT_CPU_ID_NONE, 2000, &G1Example::Control, this); + } + + void imuTorsoHandler(const void *message) { + IMUState_ imu_torso = *(const IMUState_ *)message; + auto &rpy = imu_torso.rpy(); + if (counter_ % 500 == 0) + printf("IMU.torso.rpy: %.2f %.2f %.2f\n", rpy[0], rpy[1], rpy[2]); + } + + void LowStateHandler(const void *message) { + LowState_ low_state = *(const LowState_ *)message; + if (low_state.crc() != Crc32Core((uint32_t *)&low_state, (sizeof(LowState_) >> 2) - 1)) { + std::cout << "[ERROR] CRC Error" << std::endl; + return; + } + + // get motor state + MotorState ms_tmp; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + ms_tmp.q.at(i) = low_state.motor_state()[i].q(); + ms_tmp.dq.at(i) = low_state.motor_state()[i].dq(); + if (low_state.motor_state()[i].motorstate() && i <= RightAnkleRoll) + std::cout << "[ERROR] motor " << i << " with code " << low_state.motor_state()[i].motorstate() << "\n"; + } + motor_state_buffer_.SetData(ms_tmp); + + // get imu state + ImuState imu_tmp; + imu_tmp.omega = low_state.imu_state().gyroscope(); + imu_tmp.rpy = low_state.imu_state().rpy(); + imu_state_buffer_.SetData(imu_tmp); + + // update gamepad + memcpy(rx_.buff, &low_state.wireless_remote()[0], 40); + gamepad_.update(rx_.RF_RX); + + // update mode machine + if (mode_machine_ != low_state.mode_machine()) { + if (mode_machine_ == 0) std::cout << "G1 type: " << unsigned(low_state.mode_machine()) << std::endl; + mode_machine_ = low_state.mode_machine(); + } + + // report robot status every second + if (++counter_ % 500 == 0) { + counter_ = 0; + // IMU + auto &rpy = low_state.imu_state().rpy(); + printf("IMU.pelvis.rpy: %.2f %.2f %.2f\n", rpy[0], rpy[1], rpy[2]); + + // RC + printf("gamepad_.A.pressed: %d\n", static_cast(gamepad_.A.pressed)); + printf("gamepad_.B.pressed: %d\n", static_cast(gamepad_.B.pressed)); + printf("gamepad_.X.pressed: %d\n", static_cast(gamepad_.X.pressed)); + printf("gamepad_.Y.pressed: %d\n", static_cast(gamepad_.Y.pressed)); + + // Motor + auto &ms = low_state.motor_state(); + printf("All %d Motors:", G1_NUM_MOTOR); + printf("\nmode: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%u,", ms[i].mode()); + printf("\npos: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%.2f,", ms[i].q()); + printf("\nvel: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%.2f,", ms[i].dq()); + printf("\ntau_est: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%.2f,", ms[i].tau_est()); + printf("\ntemperature: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%d,%d;", ms[i].temperature()[0], ms[i].temperature()[1]); + printf("\nvol: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%.2f,", ms[i].vol()); + printf("\nsensor: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%u,%u;", ms[i].sensor()[0], ms[i].sensor()[1]); + printf("\nmotorstate: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%u,", ms[i].motorstate()); + printf("\nreserve: "); + for (int i = 0; i < G1_NUM_MOTOR; ++i) printf("%u,%u,%u,%u;", ms[i].reserve()[0], ms[i].reserve()[1], ms[i].reserve()[2], ms[i].reserve()[3]); + printf("\n"); + } + } + + void LowCommandWriter() { + LowCmd_ dds_low_command; + dds_low_command.mode_pr() = static_cast(mode_pr_); + dds_low_command.mode_machine() = mode_machine_; + + const std::shared_ptr mc = motor_command_buffer_.GetData(); + if (mc) { + for (size_t i = 0; i < G1_NUM_MOTOR; i++) { + dds_low_command.motor_cmd().at(i).mode() = 1; // 1:Enable, 0:Disable + dds_low_command.motor_cmd().at(i).tau() = mc->tau_ff.at(i); + dds_low_command.motor_cmd().at(i).q() = mc->q_target.at(i); + dds_low_command.motor_cmd().at(i).dq() = mc->dq_target.at(i); + dds_low_command.motor_cmd().at(i).kp() = mc->kp.at(i); + dds_low_command.motor_cmd().at(i).kd() = mc->kd.at(i); + } + + dds_low_command.crc() = Crc32Core((uint32_t *)&dds_low_command, (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } + } + + void Control() { + MotorCommand motor_command_tmp; + const std::shared_ptr ms = motor_state_buffer_.GetData(); + + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = 0.0; + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = Kp[i]; + motor_command_tmp.kd.at(i) = Kd[i]; + } + + if (ms) { + time_ += control_dt_; + if (time_ < duration_) { + // [Stage 1]: set robot to zero posture + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + double ratio = std::clamp(time_ / duration_, 0.0, 1.0); + motor_command_tmp.q_target.at(i) = (1.0 - ratio) * ms->q.at(i); + } + } else if (time_ < duration_ * 2) { + // [Stage 2]: swing ankle using PR mode + mode_pr_ = Mode::PR; + double max_P = M_PI * 30.0 / 180.0; + double max_R = M_PI * 10.0 / 180.0; + double t = time_ - duration_; + double L_P_des = max_P * std::sin(2.0 * M_PI * t); + double L_R_des = max_R * std::sin(2.0 * M_PI * t); + double R_P_des = max_P * std::sin(2.0 * M_PI * t); + double R_R_des = -max_R * std::sin(2.0 * M_PI * t); + + motor_command_tmp.q_target.at(LeftAnklePitch) = L_P_des; + motor_command_tmp.q_target.at(LeftAnkleRoll) = L_R_des; + motor_command_tmp.q_target.at(RightAnklePitch) = R_P_des; + motor_command_tmp.q_target.at(RightAnkleRoll) = R_R_des; + } else { + // [Stage 3]: swing ankle using AB mode + mode_pr_ = Mode::AB; + double max_A = M_PI * 30.0 / 180.0; + double max_B = M_PI * 10.0 / 180.0; + double t = time_ - duration_ * 2; + double L_A_des = +max_A * std::sin(M_PI * t); + double L_B_des = +max_B * std::sin(M_PI * t + M_PI); + double R_A_des = -max_A * std::sin(M_PI * t); + double R_B_des = -max_B * std::sin(M_PI * t + M_PI); + + motor_command_tmp.q_target.at(LeftAnkleA) = L_A_des; + motor_command_tmp.q_target.at(LeftAnkleB) = L_B_des; + motor_command_tmp.q_target.at(RightAnkleA) = R_A_des; + motor_command_tmp.q_target.at(RightAnkleB) = R_B_des; + } + + motor_command_buffer_.SetData(motor_command_tmp); + } + } +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: g1_ankle_swing_example network_interface" << std::endl; + exit(0); + } + std::string networkInterface = argv[1]; + G1Example custom(networkInterface); + while (true) sleep(10); + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_dual_arm_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_dual_arm_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7cce96c7a760e43d360f1aa073d32dc9b8265dd5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/g1_dual_arm_example.cpp @@ -0,0 +1,407 @@ +#include + +#include +#include +#include +#include + +// DDS +#include +#include + +// IDL +#include +#include + +#include +using namespace unitree::robot::b2; + +static const std::string HG_CMD_TOPIC = "rt/lowcmd"; +static const std::string HG_STATE_TOPIC = "rt/lowstate"; + +using namespace unitree::common; +using namespace unitree::robot; + +const int G1_NUM_MOTOR = 29; + +template +class DataBuffer { + public: + void SetData(const T &newData) { + std::unique_lock lock(mutex); + data = std::make_shared(newData); + } + + std::shared_ptr GetData() { + std::shared_lock lock(mutex); + return data ? data : nullptr; + } + + void Clear() { + std::unique_lock lock(mutex); + data = nullptr; + } + + private: + std::shared_ptr data; + std::shared_mutex mutex; +}; + +struct ImuState { + std::array rpy = {}; + std::array omega = {}; +}; + +struct MotorCommand { + std::array q_target = {}; + std::array dq_target = {}; + std::array kp = {}; + std::array kd = {}; + std::array tau_ff = {}; +}; + +struct MotorState { + std::array q = {}; + std::array dq = {}; +}; + +enum MotorType { GearboxS = 0, GearboxM = 1, GearboxL = 2 }; + +std::array G1MotorType{ + // clang-format off + // legs + GearboxM, GearboxM, GearboxM, GearboxL, GearboxS, GearboxS, + GearboxM, GearboxM, GearboxM, GearboxL, GearboxS, GearboxS, + // waist + GearboxM, GearboxS, GearboxS, + // arms + GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, + GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS + // clang-format on +}; + +enum PRorAB { PR = 0, AB = 1 }; + +enum G1JointValidIndex { + LeftShoulderPitch = 15, + LeftShoulderRoll = 16, + LeftShoulderYaw = 17, + LeftElbow = 18, + LeftWristRoll = 19, + LeftWristPitch = 20, + LeftWristYaw = 21, + RightShoulderPitch = 22, + RightShoulderRoll = 23, + RightShoulderYaw = 24, + RightElbow = 25, + RightWristRoll = 26, + RightWristPitch = 27, + RightWristYaw = 28 +}; + +inline uint32_t Crc32Core(uint32_t *ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else + CRC32 <<= 1; + if (data & xbit) CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +}; + +float GetMotorKp(MotorType type) { + switch (type) { + case GearboxS: + return 40; + case GearboxM: + return 40; + case GearboxL: + return 100; + default: + return 0; + } +} + +float GetMotorKd(MotorType type) { + switch (type) { + case GearboxS: + return 1; + case GearboxM: + return 1; + case GearboxL: + return 1; + default: + return 0; + } +} + +class G1Example { + private: + double time_; + double control_dt_; // [2ms] + double duration_; // [3 s] + PRorAB mode_; + uint8_t mode_machine_; + std::vector> frames_data_; + + DataBuffer motor_state_buffer_; + DataBuffer motor_command_buffer_; + DataBuffer imu_state_buffer_; + + ChannelPublisherPtr lowcmd_publisher_; + ChannelSubscriberPtr lowstate_subscriber_; + ThreadPtr command_writer_ptr_, control_thread_ptr_; + + std::shared_ptr msc; + + public: + G1Example(std::string networkInterface) + : time_(0.0), + control_dt_(0.002), + duration_(3.0), + mode_(PR), + mode_machine_(0) { + ChannelFactory::Instance()->Init(0, networkInterface); + + msc.reset(new MotionSwitcherClient()); + msc->SetTimeout(5.0F); + msc->Init(); + + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc->ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } + + loadBehaviorLibrary("motion"); + + // create publisher + lowcmd_publisher_.reset( + new ChannelPublisher(HG_CMD_TOPIC)); + lowcmd_publisher_->InitChannel(); + + // create subscriber + lowstate_subscriber_.reset( + new ChannelSubscriber( + HG_STATE_TOPIC)); + lowstate_subscriber_->InitChannel( + std::bind(&G1Example::LowStateHandler, this, std::placeholders::_1), 1); + + // create threads + command_writer_ptr_ = + CreateRecurrentThreadEx("command_writer", UT_CPU_ID_NONE, 2000, + &G1Example::LowCommandWriter, this); + control_thread_ptr_ = CreateRecurrentThreadEx( + "control", UT_CPU_ID_NONE, 2000, &G1Example::Control, this); + } + + void loadBehaviorLibrary(std::string behavior_name) { + std::string resource_dir = BLIB_DIR; + YAML::Node motion = YAML::LoadFile(resource_dir + behavior_name + ".seq"); + + std::string content = motion["components"][1]["content"].as(); + int num_parts = motion["components"][1]["num_parts"].as(); + std::cout << "BehaviorName: " << behavior_name + ".seq\n"; + std::cout << content << " with " << num_parts << "\n"; + + auto frames = motion["components"][1]["frames"]; + + for (const auto &frame : frames) { + std::vector frame_data; + for (const auto &element : frame) { + frame_data.push_back(element.as()); + } + frames_data_.push_back(frame_data); + } + + std::cout << frames_data_.size() << " knots with " << frames_data_[0].size() + << " DOF\n"; + } + + void ReportRPY() { + const std::shared_ptr imu_tmp_ptr = + imu_state_buffer_.GetData(); + if (imu_tmp_ptr) { + std::cout << "rpy: [" << imu_tmp_ptr->rpy.at(0) << ", " + << imu_tmp_ptr->rpy.at(1) << ", " << imu_tmp_ptr->rpy.at(2) + << "]" << std::endl; + } + } + + void LowStateHandler(const void *message) { + unitree_hg::msg::dds_::LowState_ low_state = + *(const unitree_hg::msg::dds_::LowState_ *)message; + + if (low_state.crc() != + Crc32Core((uint32_t *)&low_state, + (sizeof(unitree_hg::msg::dds_::LowState_) >> 2) - 1)) { + std::cout << "low_state CRC Error" << std::endl; + return; + } + + // get motor state + MotorState ms_tmp; + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + ms_tmp.q.at(i) = low_state.motor_state()[i].q(); + ms_tmp.dq.at(i) = low_state.motor_state()[i].dq(); + } + motor_state_buffer_.SetData(ms_tmp); + + // get imu state + ImuState imu_tmp; + imu_tmp.omega = low_state.imu_state().gyroscope(); + imu_tmp.rpy = low_state.imu_state().rpy(); + imu_state_buffer_.SetData(imu_tmp); + + // update mode machine + if (mode_machine_ != low_state.mode_machine()) { + if (mode_machine_ == 0) + std::cout << "G1 type: " << unsigned(low_state.mode_machine()) + << std::endl; + mode_machine_ = low_state.mode_machine(); + } + } + + void LowCommandWriter() { + unitree_hg::msg::dds_::LowCmd_ dds_low_command; + dds_low_command.mode_pr() = mode_; + dds_low_command.mode_machine() = mode_machine_; + + const std::shared_ptr mc = + motor_command_buffer_.GetData(); + if (mc) { + for (size_t i = 0; i < G1_NUM_MOTOR; i++) { + dds_low_command.motor_cmd().at(i).mode() = 1; // 1:Enable, 0:Disable + dds_low_command.motor_cmd().at(i).tau() = mc->tau_ff.at(i); + dds_low_command.motor_cmd().at(i).q() = mc->q_target.at(i); + dds_low_command.motor_cmd().at(i).dq() = mc->dq_target.at(i); + dds_low_command.motor_cmd().at(i).kp() = mc->kp.at(i); + dds_low_command.motor_cmd().at(i).kd() = mc->kd.at(i); + } + + dds_low_command.crc() = Crc32Core((uint32_t *)&dds_low_command, + (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } + } + + void Control() { + MotorCommand motor_command_tmp; + const std::shared_ptr ms = motor_state_buffer_.GetData(); + + if (ms) { + time_ += control_dt_; + if (time_ < duration_) { + // [Stage 1]: set robot to zero posture + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + double ratio = std::clamp(time_ / duration_, 0.0, 1.0); + + double q_des = 0; + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = + (q_des - ms->q.at(i)) * ratio + ms->q.at(i); + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = GetMotorKp(G1MotorType[i]); + motor_command_tmp.kd.at(i) = GetMotorKd(G1MotorType[i]); + } + } else { + // [Stage 2]: tracking the offline trajectory + size_t frame_index = (size_t)((time_ - duration_) / control_dt_); + if (frame_index >= frames_data_.size()) { + frame_index = frames_data_.size() - 1; + time_ = 0.0; // RESET + } + + if (frame_index % 100 == 0) + std::cout << "Frame Index: " << frame_index << std::endl; + + for (int i = 0; i < G1_NUM_MOTOR; ++i) { + size_t index_in_frame = i - LeftShoulderPitch; + motor_command_tmp.q_target.at(i) = + (i >= LeftShoulderPitch) + ? frames_data_[frame_index][index_in_frame] + : 0.0; + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.kp.at(i) = GetMotorKp(G1MotorType[i]); + motor_command_tmp.kd.at(i) = GetMotorKd(G1MotorType[i]); + } + } + + motor_command_buffer_.SetData(motor_command_tmp); + } + } + + std::string queryServiceName(std::string form,std::string name) + { + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; + } + + int queryMotionStatus() + { + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc->CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; + } +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: g1_dual_arm_example network_interface_name" + << std::endl; + exit(0); + } + std::string networkInterface = argv[1]; + G1Example custom(networkInterface); + + while (true) sleep(10); + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/gamepad.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/gamepad.hpp new file mode 100644 index 0000000000000000000000000000000000000000..41910b7c86fccf087360733a9aa638eb23e6984d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/gamepad.hpp @@ -0,0 +1,128 @@ +#pragma once + +#include + +namespace unitree::common +{ + + // bytecode mapping for raw joystick data + // 16b + typedef union + { + struct + { + uint8_t R1 : 1; + uint8_t L1 : 1; + uint8_t start : 1; + uint8_t select : 1; + uint8_t R2 : 1; + uint8_t L2 : 1; + uint8_t F1 : 1; + uint8_t F2 : 1; + uint8_t A : 1; + uint8_t B : 1; + uint8_t X : 1; + uint8_t Y : 1; + uint8_t up : 1; + uint8_t right : 1; + uint8_t down : 1; + uint8_t left : 1; + } components; + uint16_t value; + } xKeySwitchUnion; + + // 40 Byte (now used 24B) + typedef struct + { + uint8_t head[2]; + xKeySwitchUnion btn; + float lx; + float rx; + float ry; + float L2; + float ly; + + uint8_t idle[16]; + } xRockerBtnDataStruct; + + typedef union + { + xRockerBtnDataStruct RF_RX; + uint8_t buff[40]; + } REMOTE_DATA_RX; + + class Button + { + public: + Button() {} + + void update(bool state) + { + on_press = state ? state != pressed : false; + on_release = state ? false : state != pressed; + pressed = state; + } + + bool pressed = false; + bool on_press = false; + bool on_release = false; + }; + + class Gamepad + { + public: + Gamepad() {} + + void update(xRockerBtnDataStruct &key_data) + { + lx = lx * (1 - smooth) + (std::fabs(key_data.lx) < dead_zone ? 0.0 : key_data.lx) * smooth; + rx = rx * (1 - smooth) + (std::fabs(key_data.rx) < dead_zone ? 0.0 : key_data.rx) * smooth; + ry = ry * (1 - smooth) + (std::fabs(key_data.ry) < dead_zone ? 0.0 : key_data.ry) * smooth; + l2 = l2 * (1 - smooth) + (std::fabs(key_data.L2) < dead_zone ? 0.0 : key_data.L2) * smooth; + ly = ly * (1 - smooth) + (std::fabs(key_data.ly) < dead_zone ? 0.0 : key_data.ly) * smooth; + + R1.update(key_data.btn.components.R1); + L1.update(key_data.btn.components.L1); + start.update(key_data.btn.components.start); + select.update(key_data.btn.components.select); + R2.update(key_data.btn.components.R2); + L2.update(key_data.btn.components.L2); + F1.update(key_data.btn.components.F1); + F2.update(key_data.btn.components.F2); + A.update(key_data.btn.components.A); + B.update(key_data.btn.components.B); + X.update(key_data.btn.components.X); + Y.update(key_data.btn.components.Y); + up.update(key_data.btn.components.up); + right.update(key_data.btn.components.right); + down.update(key_data.btn.components.down); + left.update(key_data.btn.components.left); + } + + float lx = 0.; + float rx = 0.; + float ry = 0.; + float l2 = 0.; + float ly = 0.; + + float smooth = 0.03; + float dead_zone = 0.01; + + Button R1; + Button L1; + Button start; + Button select; + Button R2; + Button L2; + Button F1; + Button F2; + Button A; + Button B; + Button X; + Button Y; + Button up; + Button right; + Button down; + Button left; + }; +} // namespace unitree::common \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/terminations.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/terminations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f20f938cdf5d43770ec61863ce1c2e474ffa452 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/g1/low_level/terminations.cpp @@ -0,0 +1,46 @@ +#include +#include +#include + +namespace po = boost::program_options; + +using namespace unitree::robot; +using namespace unitree_hg::msg::dds_; + +int main(int argc, char** argv) +{ + // Parse command line arguments + po::options_description desc("Unitree G1 termination functions testing."); + desc.add_options() + ("network,n", po::value()->default_value(""), "dds network interface") + ; + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, desc), vm); + po::notify(vm); + std::cout << desc << std::endl; + + // DDS Init + ChannelFactory::Instance()->Init(0, vm["network"].as()); + + auto lowstate_subscriber = std::make_shared>("rt/lowstate"); + LowState_ lowstate; + lowstate_subscriber->InitChannel([&lowstate](const void* message) { + lowstate = *(const LowState_*)message; + }); + + std::cout << "Checking terminations..." << std::endl; + + while (true) + { + if (g1::bad_orientation(lowstate, 1.0f)) { // Tip the robot over to test bad orientation + std::cout << "Bad orientation detected!" << std::endl; + } + if (g1::lost_connection(lowstate_subscriber, 1000)) { // Unplug the network cable to test lost connection + std::cout << "Lost connection!" << std::endl; + } + + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..bff084650fa791eaf4b8343615d402f139ead416 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/CMakeLists.txt @@ -0,0 +1,21 @@ +# add_executable(go2_trajectory_follow go2_trajectory_follow.cpp) +# target_link_libraries(go2_trajectory_follow unitree_sdk2) + +add_executable(go2_sport_client go2_sport_client.cpp) +target_link_libraries(go2_sport_client unitree_sdk2) + +add_executable(go2_low_level go2_low_level.cpp) +target_link_libraries(go2_low_level unitree_sdk2) + +add_executable(go2_stand_example go2_stand_example.cpp) +target_link_libraries(go2_stand_example unitree_sdk2) + + +add_executable(go2_robot_state_client go2_robot_state_client.cpp) +target_link_libraries(go2_robot_state_client unitree_sdk2) + +add_executable(go2_video_client go2_video_client.cpp) +target_link_libraries(go2_video_client unitree_sdk2) + +add_executable(go2_vui_client go2_vui_client.cpp) +target_link_libraries(go2_vui_client unitree_sdk2) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_low_level.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_low_level.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a728036a4cbb3ca8c730a06bf9c8269d203aebe --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_low_level.cpp @@ -0,0 +1,215 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +class Custom +{ +public: + explicit Custom() + {} + + ~Custom() + {} + + void Init(); + +private: + void InitLowCmd(); + void LowStateMessageHandler(const void* messages); + void LowCmdWrite(); + +private: + float qInit[3] = {0}; + float qDes[3] = {0}; + float sin_mid_q[3] = {0.0, 1.2, -2.0}; + float Kp[3] = {0}; + float Kd[3] = {0}; + double time_consume = 0; + int rate_count = 0; + int sin_count = 0; + int motiontime = 0; + float dt = 0.002; // 0.001~0.01 + + unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init + unitree_go::msg::dds_::LowState_ low_state{}; // default init + + /*publisher*/ + ChannelPublisherPtr lowcmd_publisher; + /*subscriber*/ + ChannelSubscriberPtr lowstate_subscriber; + + /*LowCmd write thread*/ + ThreadPtr lowCmdWriteThreadPtr; +}; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len) +{ + unsigned int xbit = 0; + unsigned int data = 0; + unsigned int CRC32 = 0xFFFFFFFF; + const unsigned int dwPolynomial = 0x04c11db7; + + for (unsigned int i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (unsigned int bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + { + CRC32 <<= 1; + } + + if (data & xbit) + CRC32 ^= dwPolynomial; + xbit >>= 1; + } + } + + return CRC32; +} + +void Custom::Init() +{ + InitLowCmd(); + + /*create publisher*/ + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowcmd_publisher->InitChannel(); + + /*create subscriber*/ + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1); + + /*loop publishing thread*/ + lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &Custom::LowCmdWrite, this); +} + +void Custom::InitLowCmd() +{ + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x01); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } +} + +void Custom::LowStateMessageHandler(const void* message) +{ + low_state = *(unitree_go::msg::dds_::LowState_*)message; +} + +double jointLinearInterpolation(double initPos, double targetPos, double rate) +{ + double p; + rate = std::min(std::max(rate, 0.0), 1.0); + p = initPos * (1 - rate) + targetPos * rate; + return p; +} + +void Custom::LowCmdWrite() +{ + motiontime++; + + if (motiontime >= 0) + { + // first, get record initial position + if (motiontime >= 0 && motiontime < 20) + { + qInit[0] = low_state.motor_state()[0].q(); + qInit[1] = low_state.motor_state()[1].q(); + qInit[2] = low_state.motor_state()[2].q(); + } + // second, move to the origin point of a sine movement with Kp Kd + if (motiontime >= 10 && motiontime < 400) + { + rate_count++; + + double rate = rate_count / 200.0; // needs count to 200 + Kp[0] = 5.0; Kp[1] = 5.0; Kp[2] = 5.0; + Kd[0] = 1.0; Kd[1] = 1.0; Kd[2] = 1.0; + + qDes[0] = jointLinearInterpolation(qInit[0], sin_mid_q[0], rate); + qDes[1] = jointLinearInterpolation(qInit[1], sin_mid_q[1], rate); + qDes[2] = jointLinearInterpolation(qInit[2], sin_mid_q[2], rate); + } + + double sin_joint1, sin_joint2; + // last, do sine wave + float freq_Hz = 1; + // float freq_Hz = 5; + float freq_rad = freq_Hz * 2 * M_PI; + float t = dt * sin_count; + + if (motiontime >= 400) + { + sin_count++; + sin_joint1 = 0.6 * sin(t * freq_rad); + sin_joint2 = -0.9 * sin(t * freq_rad); + qDes[0] = sin_mid_q[0]; + qDes[1] = sin_mid_q[1] + sin_joint1; + qDes[2] = sin_mid_q[2] + sin_joint2; + } + + low_cmd.motor_cmd()[2].q() = qDes[2]; + low_cmd.motor_cmd()[2].dq() = 0; + low_cmd.motor_cmd()[2].kp() = Kp[2]; + low_cmd.motor_cmd()[2].kd() = Kd[2]; + low_cmd.motor_cmd()[2].tau() = 0; + } + + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + + lowcmd_publisher->Write(low_cmd); +} + +int main(int argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + ChannelFactory::Instance()->Init(0, argv[1]); + + Custom custom; + custom.Init(); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_robot_state_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_robot_state_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5b3464551207ff64de2886d3a1209bcc04c73104 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_robot_state_client.cpp @@ -0,0 +1,82 @@ +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree::robot::go2; + +int main(int32_t argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: robot_state_client_example [NetWorkInterface(eth0)] [ServiceName(sport_mode)]" << std::endl; + exit(0); + } + + std::string networkInterface = "eth0", serviceName = "sport_mode"; + + if (argc > 1) + { + networkInterface = argv[1]; + } + + if (argc > 2) + { + serviceName = argv[2]; + } + + std::cout << "NetWorkInterface:" << networkInterface << std::endl; + std::cout << "Switch ServiceName:" << serviceName << std::endl; + + ChannelFactory::Instance()->Init(0, networkInterface); + + RobotStateClient rsc; + rsc.SetTimeout(10.0f); + rsc.Init(); + + std::string clientApiVersion = rsc.GetApiVersion(); + std::string serverApiVersion = rsc.GetServerApiVersion(); + + if (clientApiVersion != serverApiVersion) + { + std::cout << "client and server api versions are not equal." << std::endl; + } + + Timer timer; + + int32_t status; + int32_t ret = rsc.SetReportFreq(3, 30); + std::cout << "Call SetReportFreq[3,30] ret:" << ret << ", cost:" << timer.Stop() << " (us)" << std::endl; + + sleep(5); + timer.Restart(); + + ret = rsc.ServiceSwitch(serviceName, 0, status); + std::cout << "Call ServiceSwitch[" << serviceName << ",0] ret:" << ret << ", cost:" << timer.Stop() << " (us)" << std::endl; + + sleep(5); + timer.Restart(); + + ret = rsc.ServiceSwitch(serviceName, 1, status); + std::cout << "Call ServiceSwitch[" << serviceName << ",1] ret:" << ret << ", cost:" << timer.Stop() << " (us)" << std::endl; + + sleep(5); + timer.Restart(); + + std::vector serviceStateList; + ret = rsc.ServiceList(serviceStateList); + std::cout << "Call ServiceList ret:" << ret << ", cost:" << timer.Stop() << " (us)" << std::endl; + + size_t i, count=serviceStateList.size(); + std::cout << "serviceStateList size:" << count << std::endl; + + for (i=0; iRelease(); + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_sport_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_sport_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2aafa33dca45facc2e356bdee239f8fc8de0f949 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_sport_client.cpp @@ -0,0 +1,162 @@ +/********************************************************************** + Copyright (c) 2020-2023, Unitree Robotics.Co.Ltd. All rights reserved. +***********************************************************************/ + +#include + +#include +#include +#include + +#define TOPIC_HIGHSTATE "rt/sportmodestate" + +using namespace unitree::common; + +enum test_mode +{ + /*---Basic motion---*/ + normal_stand, + balance_stand, + velocity_move, + stand_down, + stand_up, + damp, + recovery_stand, + /*---Special motion ---*/ + sit, + rise_sit, + stop_move = 99 +}; + +const int TEST_MODE = stand_down; + +class Custom +{ +public: + Custom() + { + sport_client.SetTimeout(10.0f); + sport_client.Init(); + + suber.reset(new unitree::robot::ChannelSubscriber(TOPIC_HIGHSTATE)); + suber->InitChannel(std::bind(&Custom::HighStateHandler, this, std::placeholders::_1), 1); + }; + + void RobotControl() + { + ct += dt; + double px_local, py_local, yaw_local; + double vx_local, vy_local, vyaw_local; + double px_err, py_err, yaw_err; + double time_seg, time_temp; + + unitree::robot::go2::PathPoint path_point_tmp; + std::vector path; + + switch (TEST_MODE) + { + case normal_stand: // 0. idle, default stand + // sport_client.SwitchGait(0); // 0:idle; 1:tort; 2:tort running; 3:climb stair; 4:tort obstacle + sport_client.StandUp(); + break; + + case balance_stand: // 1. Balance stand (controlled by dBodyHeight + rpy) + // sport_client.Euler(0.1, 0.2, 0.3); // roll, pitch, yaw + // sport_client.BodyHeight(0.0); // relative height [-0.18~0.03] + sport_client.BalanceStand(); + break; + + case velocity_move: // 2. target velocity walking (controlled by velocity + yawSpeed) + sport_client.Move(0.3, 0, 0.3); + break; + + case stand_down: // 4. position stand down. + sport_client.StandDown(); + break; + + case stand_up: // 5. position stand up + sport_client.StandUp(); + break; + + case damp: // 6. damping mode + sport_client.Damp(); + break; + + case recovery_stand: // 7. recovery stand + sport_client.RecoveryStand(); + break; + + case sit: + if (flag == 0) + { + sport_client.Sit(); + flag = 1; + } + break; + + case rise_sit: + if (flag == 0) + { + sport_client.RiseSit(); + flag = 1; + } + break; + + case stop_move: // stop move + sport_client.StopMove(); + break; + + default: + sport_client.StopMove(); + } + }; + + // Get initial position + void GetInitState() + { + px0 = state.position()[0]; + py0 = state.position()[1]; + yaw0 = state.imu_state().rpy()[2]; + std::cout << "initial position: x0: " << px0 << ", y0: " << py0 << ", yaw0: " << yaw0 << std::endl; + }; + + void HighStateHandler(const void *message) + { + state = *(unitree_go::msg::dds_::SportModeState_ *)message; + + // std::cout << "Position: " << state.position()[0] << ", " << state.position()[1] << ", " << state.position()[2] << std::endl; + // std::cout << "IMU rpy: " << state.imu_state().rpy()[0] << ", " << state.imu_state().rpy()[1] << ", " << state.imu_state().rpy()[2] << std::endl; + }; + + unitree_go::msg::dds_::SportModeState_ state; + unitree::robot::go2::SportClient sport_client; + unitree::robot::ChannelSubscriberPtr suber; + + double px0, py0, yaw0; // 初始状态的位置和偏航 + double ct = 0; // 运行时间 + int flag = 0; // 特殊动作执行标志 + float dt = 0.005; // 控制步长0.001~0.01 +}; + +int main(int argc, char **argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + Custom custom; + + sleep(1); // Wait for 1 second to obtain a stable state + + custom.GetInitState(); // Get initial position + unitree::common::ThreadPtr threadPtr = unitree::common::CreateRecurrentThread(custom.dt * 1000000, std::bind(&Custom::RobotControl, &custom)); + + while (1) + { + sleep(10); + } + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_stand_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_stand_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..36743c5012e94d05a5963a5ea5c1e0695c3e4842 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_stand_example.cpp @@ -0,0 +1,330 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree::robot::b2; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +class Custom +{ +public: + explicit Custom(){} + ~Custom(){} + + void Init(); + void Start(); + +private: + void InitLowCmd(); + void LowStateMessageHandler(const void* messages); + void LowCmdWrite(); + int queryMotionStatus(); + std::string queryServiceName(std::string form,std::string name); + +private: + float Kp = 60.0; + float Kd = 5.0; + double time_consume = 0; + int rate_count = 0; + int sin_count = 0; + int motiontime = 0; + float dt = 0.002; // 0.001~0.01 + + MotionSwitcherClient msc; + + unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init + unitree_go::msg::dds_::LowState_ low_state{}; // default init + + /*publisher*/ + ChannelPublisherPtr lowcmd_publisher; + /*subscriber*/ + ChannelSubscriberPtr lowstate_subscriber; + + /*LowCmd write thread*/ + ThreadPtr lowCmdWriteThreadPtr; + + float _targetPos_1[12] = {0.0, 1.36, -2.65, 0.0, 1.36, -2.65, + -0.2, 1.36, -2.65, 0.2, 1.36, -2.65}; + + float _targetPos_2[12] = {0.0, 0.67, -1.3, 0.0, 0.67, -1.3, + 0.0, 0.67, -1.3, 0.0, 0.67, -1.3}; + + float _targetPos_3[12] = {-0.35, 1.36, -2.65, 0.35, 1.36, -2.65, + -0.5, 1.36, -2.65, 0.5, 1.36, -2.65}; + + float _startPos[12]; + float _duration_1 = 500; + float _duration_2 = 500; + float _duration_3 = 1000; + float _duration_4 = 900; + float _percent_1 = 0; + float _percent_2 = 0; + float _percent_3 = 0; + float _percent_4 = 0; + + bool firstRun = true; + bool done = false; +}; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len) +{ + unsigned int xbit = 0; + unsigned int data = 0; + unsigned int CRC32 = 0xFFFFFFFF; + const unsigned int dwPolynomial = 0x04c11db7; + + for (unsigned int i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (unsigned int bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + { + CRC32 <<= 1; + } + + if (data & xbit) + CRC32 ^= dwPolynomial; + xbit >>= 1; + } + } + + return CRC32; +} + +void Custom::Init() +{ + InitLowCmd(); + + /*create publisher*/ + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowcmd_publisher->InitChannel(); + + /*create subscriber*/ + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1); + + /*init MotionSwitcherClient*/ + msc.SetTimeout(10.0f); + msc.Init(); + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc.ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } +} + +void Custom::InitLowCmd() +{ + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x01); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } +} + +int Custom::queryMotionStatus() +{ + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc.CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; +} + +std::string Custom::queryServiceName(std::string form,std::string name) +{ + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; +} + +void Custom::Start() +{ + /*loop publishing thread*/ + lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &Custom::LowCmdWrite, this); +} + +void Custom::LowStateMessageHandler(const void* message) +{ + low_state = *(unitree_go::msg::dds_::LowState_*)message; +} + +void Custom::LowCmdWrite() +{ + if(_percent_4<1) + { + std::cout<<"Read sensor data example: "<=500) + { + if(firstRun) + { + for(int i = 0; i < 12; i++) + { + _startPos[i] = low_state.motor_state()[i].q(); + } + firstRun = false; + } + + _percent_1 += (float)1 / _duration_1; + _percent_1 = _percent_1 > 1 ? 1 : _percent_1; + if (_percent_1 < 1) + { + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_1) * _startPos[j] + _percent_1 * _targetPos_1[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + if ((_percent_1 == 1)&&(_percent_2 < 1)) + { + _percent_2 += (float)1 / _duration_2; + _percent_2 = _percent_2 > 1 ? 1 : _percent_2; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_2) * _targetPos_1[j] + _percent_2 * _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3<1)) + { + _percent_3 += (float)1 / _duration_3; + _percent_3 = _percent_3 > 1 ? 1 : _percent_3; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3==1)&&((_percent_4<=1))) + { + _percent_4 += (float)1 / _duration_4; + _percent_4 = _percent_4 > 1 ? 1 : _percent_4; + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_4) * _targetPos_2[j] + _percent_4 * _targetPos_3[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + + lowcmd_publisher->Write(low_cmd); + } + +} + +int main(int argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + std::cout << "WARNING: Make sure the robot is hung up or lying on the ground." << std::endl + << "Press Enter to continue..." << std::endl; + std::cin.ignore(); + + ChannelFactory::Instance()->Init(0, argv[1]); + + Custom custom; + custom.Init(); + custom.Start(); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_trajectory_follow.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_trajectory_follow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..65377054feb95d90e4368e5558e5b3b813d90cc8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_trajectory_follow.cpp @@ -0,0 +1,65 @@ +#include +#include +#include + +class Custom +{ +public: + Custom() {} + void control(); + + unitree::robot::go2::SportClient tc; + + int c = 0; + float dt = 0.002; // 0.001~0.01 +}; + +void Custom::control() +{ + c++; + + int32_t ret; + + float vx = 0.3; + float delta = 0.06; + static float count = 0; + count += dt; + std::vector path; + for (int i=0; i<30; i++) { + unitree::robot::go2::PathPoint p; + float var = (count + i * delta); + p.timeFromStart = i * delta; + p.x = vx * var; + p.y = 0.6 * sin(M_PI * vx * var); + p.yaw = 2*0.6 * vx * M_PI * cos(M_PI * vx * var); + p.vx = vx; + p.vy = M_PI * vx * (0.6 * cos(M_PI * vx * var)); + p.vyaw = - M_PI * vx*2*0.6 * vx * M_PI * sin(M_PI * vx * var); + path.push_back(p); + } + + ret = tc.TrajectoryFollow(path); + if(ret != 0){ + std::cout << "Call TrajectoryFollow: " << ret << std::endl; + } + + std::cout << c << std::endl; +} + +int main(int argc, char** argv) +{ + unitree::robot::ChannelFactory::Instance()->Init(0); + + Custom custom; + custom.tc.SetTimeout(10.0f); + custom.tc.Init(); + + unitree::common::ThreadPtr threadPtr = unitree::common::CreateRecurrentThread(custom.dt * 1000000, std::bind(&Custom::control, &custom)); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_video_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_video_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..43200d4384375d9414b0bd1a42d986dd139f38f5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_video_client.cpp @@ -0,0 +1,55 @@ +#include +#include +#include +#include + + +int main() +{ + /* + * Initilaize ChannelFactory + */ + unitree::robot::ChannelFactory::Instance()->Init(0); + unitree::robot::go2::VideoClient video_client; + + /* + * Set request timeout 1.0s + */ + video_client.SetTimeout(1.0f); + video_client.Init(); + + //Test Api + + std::vector image_sample; + int ret; + + while (true) + { + ret = video_client.GetImageSample(image_sample); + + if (ret == 0) { + time_t rawtime; + struct tm *timeinfo; + char buffer[80]; + + time(&rawtime); + timeinfo = localtime(&rawtime); + + strftime(buffer, sizeof(buffer), "%Y%m%d%H%M%S.jpg", timeinfo); + std::string image_name(buffer); + + std::ofstream image_file(image_name, std::ios::binary); + if (image_file.is_open()) { + image_file.write(reinterpret_cast(image_sample.data()), image_sample.size()); + image_file.close(); + std::cout << "Image saved successfully as " << image_name << std::endl; + } else { + std::cerr << "Error: Failed to save image." << std::endl; + } + } + + sleep(3); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_vui_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_vui_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..69da4ac9c40a07b3b0c47510b7eae9e820784bcc --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2/go2_vui_client.cpp @@ -0,0 +1,40 @@ +#include + +int main(int32_t argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: vui_client_example network_interface_name" << std::endl; + exit(0); + } + /* + * Initilaize ChannelFactory + */ + std::string networkInterface = argv[1]; + unitree::robot::ChannelFactory::Instance()->Init(0, networkInterface); + unitree::robot::go2::VuiClient vc; + + /* + * Set request timeout 1.0s + */ + vc.SetTimeout(1.0f); + vc.Init(); + + //Test Api + + int level = 0, value = 0; + int ret; + + while (true) + { + ret = vc.SetBrightness(level); + std::cout << "SetBrightness level=" << level << ", api return:" << ret << std::endl; + ++level %= 11; + sleep(1); + ret = vc.GetBrightness(value); + std::cout << "GetBrightness value=" << value << ", api return:" << ret << std::endl; + sleep(1); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4646cb550e199b45982e8a9be9cfb0773a905b5d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/CMakeLists.txt @@ -0,0 +1,5 @@ +add_executable(go2w_sport_client go2w_sport_client.cpp) +target_link_libraries(go2w_sport_client unitree_sdk2) + +add_executable(go2w_stand_example go2w_stand_example.cpp) +target_link_libraries(go2w_stand_example unitree_sdk2) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_sport_client.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_sport_client.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2c65512320fd67b05bd501db634ab405ac82ffcb --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_sport_client.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TOPIC_HIGHSTATE "rt/lf/sportmodestate" + +using namespace std; + +// 测试选项 +struct TestOption +{ + std::string name; // 名称 + int id; // id +}; + +const vector option_list = + {{"damp", 0}, // 阻尼 + {"stand_up", 1}, // 站立锁定 + {"stand_down", 2}, // 趴下 + {"move", 3}, // 速度控制 + {"stop_move", 4}, // 停止运动 + {"speed_level", 5}, // 速度档位 + {"switch_gait", 6}, // 步态切换 + {"get_state", 7}, // 获取状态 + {"recovery", 8}, // 恢复站立 + {"balance", 9}}; // 平衡站立 + +int ConvertToInt(const std::string &str) +{ + try + { + std::stoi(str); // 尝试转换字符串为整数 + return std::stoi(str); + } + catch (const std::invalid_argument &) + { + return -1; // 字符串包含非数字字符 + } + catch (const std::out_of_range &) + { + return -1; // 字符串表示的数字超出int范围 + } +} + +class UserInterface +{ +public: + UserInterface(){}; + ~UserInterface(){}; + + void terminalHandle() + { + std::string input; + std::getline(std::cin, input); + + // 如果输入的是 list 则输出所有的测试选项名称和id + if (input.compare("list") == 0) + { + for (TestOption option : option_list) + { + std::cout << option.name << ", id: " << option.id << std::endl; + } + } + + // 如果输入的名名称或id在枚举的测试选项中,则记录测试选项名称和id + for (TestOption option : option_list) + { + if (input.compare(option.name) == 0 || ConvertToInt(input) == option.id) + { + test_option_->id = option.id; + test_option_->name = option.name; + std::cout << "Test: " << test_option_->name << ", test_id: " << test_option_->id << std::endl; + } + } + }; + + // 待测试的功能的指针 + TestOption *test_option_; +}; + +void HighStateHandler(const void *message) +{ + unitree_go::msg::dds_::SportModeState_ hs = *(unitree_go::msg::dds_::SportModeState_ *)message; + + // std::cout << "mode: " << (int)hs.mode() << ", " + // << "gait: " << (int)hs.gait_type() << ", " + // << "progress: " << hs.progress() << std::endl; +} + +int main(int argc, char **argv) +{ + // 初始化 dds + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + unitree::robot::ChannelSubscriber suber(TOPIC_HIGHSTATE); + suber.InitChannel(HighStateHandler); + + // 待测试的选项 + TestOption test_option; + test_option.id = 1; + + // 初始化sportclient + unitree::robot::go2::SportClient sport_client; + sport_client.SetTimeout(20.0f); + sport_client.Init(); + + // 初始化用户终端 + UserInterface user_interface; + // 将user_interface.test_option_ 指向 test_option,用于传递终端输入的结果 + user_interface.test_option_ = &test_option; + + std::cout << "Input \"list \" to list all test option ..." << std::endl; + long res_count = 0; + while (1) + { + auto time_start_trick = std::chrono::high_resolution_clock::now(); + static const constexpr auto dt = std::chrono::microseconds(20000); // 50Hz + + // 等待终端输入,并解析 + user_interface.terminalHandle(); + + int res = 1; + if (test_option.id == 0) + { + res = sport_client.Damp(); + } + else if (test_option.id == 1) + { + res = sport_client.StandUp(); + } + else if (test_option.id == 2) + { + res = sport_client.StandDown(); + } + else if (test_option.id == 3) + { + // 此处为调用一次 Move 指令,机器人会移动1s后停下 + // 如果循环调用 Move 则可以持续移动,1s 中内无Move请求,机器人会自动停下。 + res = sport_client.Move(0.5, 0, 0); + } + else if (test_option.id == 4) + { + res = sport_client.StopMove(); + } + else if (test_option.id == 5) + { + res = sport_client.SpeedLevel(1); + } + else if (test_option.id == 6) + { + // res = sport_client.SwitchGait(1); + } + else if (test_option.id == 7) + { + // std::map state_map; + // std::vector state_name = {"speedLevel", "gait "}; + // res = sport_client.GetState(state_name, state_map); + // std::cout << "Speed level: " << state_map["speedLevel"] << ", Gait: " << state_map["gait"] << std::endl; + } + else if (test_option.id == 8) + { + res = sport_client.RecoveryStand(); + } + else if (test_option.id == 9) + { + res = sport_client.BalanceStand(); + } + + if (res < 0) + { + res_count += 1; + std::cout << "Request error for: " << option_list[test_option.id].name << ", code: " << res << ", count: " << res_count << std::endl; + } + else + { + res_count = 0; + std::cout << "Request successed: " << option_list[test_option.id].name << ", code: " << res << std::endl; + } + std::this_thread::sleep_until(time_start_trick + dt); + } + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_stand_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_stand_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ec875c189df2548f02fcae007b536c292bbae09a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/go2w/go2w_stand_example.cpp @@ -0,0 +1,370 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace unitree::common; +using namespace unitree::robot; +using namespace unitree::robot::b2; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +class Custom +{ +public: + explicit Custom(){} + ~Custom(){} + + void Init(); + void Start(); + +private: + void InitLowCmd(); + void LowStateMessageHandler(const void* messages); + void LowCmdWrite(); + int queryMotionStatus(); + std::string queryServiceName(std::string form,std::string name); + +private: + float Kp = 70.0; + float Kd = 5.0; + double time_consume = 0; + int rate_count = 0; + int sin_count = 0; + int motiontime = 0; + float dt = 0.002; // 0.001~0.01 + + MotionSwitcherClient msc; + + unitree_go::msg::dds_::LowCmd_ low_cmd{}; // default init + unitree_go::msg::dds_::LowState_ low_state{}; // default init + + /*publisher*/ + ChannelPublisherPtr lowcmd_publisher; + /*subscriber*/ + ChannelSubscriberPtr lowstate_subscriber; + + /*LowCmd write thread*/ + ThreadPtr lowCmdWriteThreadPtr; + + float _targetPos_1[12] = {0.0, 1.36, -2.65, 0.0, 1.36, -2.65, + -0.2, 1.36, -2.65, 0.2, 1.36, -2.65}; + + float _targetPos_2[12] = {0.0, 0.67, -1.3, 0.0, 0.67, -1.3, + 0.0, 0.67, -1.3, 0.0, 0.67, -1.3}; + + float _targetPos_3[12] = {-0.35, 1.36, -2.65, 0.35, 1.36, -2.65, + -0.5, 1.36, -2.65, 0.5, 1.36, -2.65}; + + float _startPos[12]; + float _duration_1 = 500; + float _duration_2 = 500; + float _duration_3 = 2000; + float _duration_4 = 900; + float _percent_1 = 0; + float _percent_2 = 0; + float _percent_3 = 0; + float _percent_4 = 0; + + bool firstRun = true; + bool done = false; +}; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len) +{ + unsigned int xbit = 0; + unsigned int data = 0; + unsigned int CRC32 = 0xFFFFFFFF; + const unsigned int dwPolynomial = 0x04c11db7; + + for (unsigned int i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (unsigned int bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + { + CRC32 <<= 1; + } + + if (data & xbit) + CRC32 ^= dwPolynomial; + xbit >>= 1; + } + } + + return CRC32; +} + +void Custom::Init() +{ + InitLowCmd(); + + /*create publisher*/ + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowcmd_publisher->InitChannel(); + + /*create subscriber*/ + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + lowstate_subscriber->InitChannel(std::bind(&Custom::LowStateMessageHandler, this, std::placeholders::_1), 1); + + /*init MotionSwitcherClient*/ + msc.SetTimeout(10.0f); + msc.Init(); + + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc.ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } +} + +void Custom::InitLowCmd() +{ + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x01); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } +} + +int Custom::queryMotionStatus() +{ + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc.CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; +} + +std::string Custom::queryServiceName(std::string form,std::string name) +{ + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; +} + +void Custom::Start() +{ + /*loop publishing thread*/ + lowCmdWriteThreadPtr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &Custom::LowCmdWrite, this); +} + +void Custom::LowStateMessageHandler(const void* message) +{ + low_state = *(unitree_go::msg::dds_::LowState_*)message; +} + +void Custom::LowCmdWrite() +{ + if(_percent_4<1) + { + std::cout<<"Read sensor data example: "<=500) + { + if(firstRun) + { + for(int i = 0; i < 12; i++) + { + _startPos[i] = low_state.motor_state()[i].q(); + } + firstRun = false; + } + + _percent_1 += (float)1 / _duration_1; + _percent_1 = _percent_1 > 1 ? 1 : _percent_1; + if (_percent_1 < 1) + { + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_1) * _startPos[j] + _percent_1 * _targetPos_1[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + if ((_percent_1 == 1)&&(_percent_2 < 1)) + { + _percent_2 += (float)1 / _duration_2; + _percent_2 = _percent_2 > 1 ? 1 : _percent_2; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_2) * _targetPos_1[j] + _percent_2 * _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3<1)) + { + _percent_3 += (float)1 / _duration_3; + _percent_3 = _percent_3 > 1 ? 1 : _percent_3; + + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = _targetPos_2[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + if(_percent_3<0.4) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = 3; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + else if((_percent_3>=0.4)&&(_percent_3<0.8)) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = -3; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + + } + else if(_percent_3>=0.8) + { + for (int j = 12; j < 16; j++) + { + low_cmd.motor_cmd()[j].q() = 0; + low_cmd.motor_cmd()[j].kp() = 0; + low_cmd.motor_cmd()[j].dq() = 0; + + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + + } + if ((_percent_1 == 1)&&(_percent_2 == 1)&&(_percent_3==1)&&((_percent_4<=1))) + { + _percent_4 += (float)1 / _duration_4; + _percent_4 = _percent_4 > 1 ? 1 : _percent_4; + for (int j = 0; j < 12; j++) + { + low_cmd.motor_cmd()[j].q() = (1 - _percent_4) * _targetPos_2[j] + _percent_4 * _targetPos_3[j]; + low_cmd.motor_cmd()[j].dq() = 0; + low_cmd.motor_cmd()[j].kp() = Kp; + low_cmd.motor_cmd()[j].kd() = Kd; + low_cmd.motor_cmd()[j].tau() = 0; + } + } + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + + lowcmd_publisher->Write(low_cmd); + } + +} + +int main(int argc, const char** argv) +{ + if (argc < 2) + { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + std::cout << "WARNING: Make sure the robot is hung up or lying on the ground." << std::endl + << "Press Enter to continue..." << std::endl; + std::cin.ignore(); + + ChannelFactory::Instance()->Init(0, argv[1]); + + Custom custom; + custom.Init(); + custom.Start(); + + while (1) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..d2b8fa1b256809f571ccad8226ac96d4a19699b9 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/CMakeLists.txt @@ -0,0 +1,18 @@ +add_executable(h1_loco_client high_level/h1_loco_client_example.cpp) +target_link_libraries(h1_loco_client unitree_sdk2) + +add_executable(h1_low_level_example low_level/humanoid.cpp) +target_link_libraries(h1_low_level_example unitree_sdk2) + +add_executable(h1_27dof_example low_level/h1_27dof_example.cpp) +target_link_libraries(h1_27dof_example unitree_sdk2) + +add_executable(h1_2_ankle_track low_level/h1_2_ankle_track.cpp) +target_link_libraries(h1_2_ankle_track unitree_sdk2) + +add_executable(h1_arm_sdk_dds_example high_level/h1_arm_sdk_dds_example.cpp) +target_link_libraries(h1_arm_sdk_dds_example unitree_sdk2) + +add_executable(h1_2_arm_sdk_dds_example high_level/h1_2_arm_sdk_dds_example.cpp) +target_link_libraries(h1_2_arm_sdk_dds_example unitree_sdk2) + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README.md b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3d0f98360d869d8e5ac7f865c6417ea7f57bac3c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README.md @@ -0,0 +1,111 @@ +# Unitree H1_2 Parallel Mechanism Control + +English | [简体中文](README_zh.md) + +## Parallel Mechanism Control Interface + +The Unitree H1_2 robot's parallel mechanism involves the ankle joints of its left and right legs. Since the left and right ankle joints are symmetrical, the following explanation will use the H1_2 left ankle joint as an example: + +

+ +On the hardware side, the H1_2 left ankle joint uses a parallel mechanism consisting of four joints: + +* Parallel joints: Joint A, Joint B +* Serial joints: Pitch joint (P joint), Roll joint (R joint) + +Only the A and B joints can be directly driven by motors, while the P and R joints cannot be directly controlled. The robot's URDF model and motion control algorithms typically only consider the serial P and R joints. To control these joints, we control the A and B joints indirectly, which allows us to achieve control over the P and R joints. On the software side, we provide an equivalent serial joint control interface, called `PR Mode`, enabling users to directly control the P and R joints. Similar to the typical joint control method, in `PR Mode`, each serial joint receives the following commands: + +| Command Name | Variable | +| ----------------------- | -------- | +| Feedforward Torque | `tau` | +| Target Angle | `q` | +| Target Angular Velocity | `dq` | +| Joint Stiffness | `kp` | +| Joint Damping | `kd` | + +The total torque applied to the serial joint is calculated as `T = kp * (q - q_m) + kd * (dq - dq_m) + tau`. To improve the control precision of the serial joints, the H1_2 robot internally converts the feedforward torque, target angle, target angular velocity, joint stiffness, and joint damping commands for the P and R joints into actual commands for the A and B joints based on kinematic and dynamic relationships. + +## Serial Joint Tracking Experiment + +To test the performance of the H1_2 ankle in `PR Mode`, we have the P and R joints track a sinusoidal curve. You can refer to the [example](https://github.com/unitreerobotics/unitree_sdk2/blob/main/example/h1/low_level/h1_2_ankle_track.cpp). The core code is as follows: + +**Enabling PR Mode and Generating Sinusoidal Curve** + +```c++ +// [Stage 2]: swing ankle's PR +mode_ = PR; // Enable PR mode +// generate sin/cos trajectory +double max_P = 0.25; // [rad] +double max_R = 0.25; // [rad] +double t = time_ - duration_; +double L_P_des = max_P * std::cos(2.0 * M_PI * t); +double L_R_des = max_R * std::sin(2.0 * M_PI * t); +double R_P_des = max_P * std::cos(2.0 * M_PI * t); +double R_R_des = -max_R * std::sin(2.0 * M_PI * t); +``` + +**Setting Ankle Joint Commands** + +```c++ +// update ankle joint position targets +float Kp_Pitch = 80; +float Kd_Pitch = 1; +float Kp_Roll = 80; +float Kd_Roll = 1; +dds_low_command.motor_cmd().at(4).q() = L_P_des; // 4: LeftAnklePitch +dds_low_command.motor_cmd().at(4).dq() = 0; +dds_low_command.motor_cmd().at(4).kp() = Kp_Pitch; +dds_low_command.motor_cmd().at(4).kd() = Kd_Pitch; +dds_low_command.motor_cmd().at(4).tau() = 0; +dds_low_command.motor_cmd().at(5).q() = L_R_des; // 5: LeftAnkleRoll +dds_low_command.motor_cmd().at(5).dq() = 0; +dds_low_command.motor_cmd().at(5).kp() = Kp_Roll; +dds_low_command.motor_cmd().at(5).kd() = Kd_Roll; +dds_low_command.motor_cmd().at(5).tau() = 0; +dds_low_command.motor_cmd().at(10).q() = R_P_des; // 10: RightAnklePitch +dds_low_command.motor_cmd().at(10).dq() = 0; +dds_low_command.motor_cmd().at(10).kp() = Kp_Pitch; +dds_low_command.motor_cmd().at(10).kd() = Kd_Pitch; +dds_low_command.motor_cmd().at(10).tau() = 0; +dds_low_command.motor_cmd().at(11).q() = R_R_des; // 11: RightAnkleRoll +dds_low_command.motor_cmd().at(11).dq() = 0; +dds_low_command.motor_cmd().at(11).kp() = Kp_Roll; +dds_low_command.motor_cmd().at(11).kd() = Kd_Roll; +dds_low_command.motor_cmd().at(11).tau() = 0; +``` + +**Printing Desired and Measured Values to Terminal** + +```c++ +float L_P_m = low_state_.motor_state().at(4).q(); +float L_R_m = low_state_.motor_state().at(5).q(); +float R_P_m = low_state_.motor_state().at(10).q(); +float R_R_m = low_state_.motor_state().at(11).q(); +printf("%f,%f,%f,%f,%f,%f,%f,%f\n", L_P_des, L_P_m, L_R_des, L_R_m, R_P_des, R_P_m, R_R_des, R_R_m); +``` + +| L_P_des | L_P_m | L_R_des | L_R_m | R_P_des | R_P_m | R_R_des | R_R_m | +| ------------------ | ------------------- | ----------------- | ------------------ | ------------------- | -------------------- | ------------------ | ------------------- | +| Left Pitch Desired | Left Pitch Measured | Left Roll Desired | Left Roll Measured | Right Pitch Desired | Right Pitch Measured | Right Roll Desired | Right Roll Measured | + +To install and compile [unitree_sdk2](https://github.com/unitreerobotics/unitree_sdk2), ensure that the robot is **suspended first**, then run the test routine in the terminal: + +```bash +h1_2_ankle_track network_interface +``` + +Once started, the robot will first reset to the zero position, then periodically swing its ankles while printing the desired and measured values for both ankle joints. The position tracking results are shown below: + +

+ + +

+ +Definitions of the symbols in the figures: + +* `L_Pitch_d`: Desired value of the left ankle's P joint +* `L_Pitch_m`: Measured value of the left ankle's P joint +* `L_Roll_d`: Desired value of the left ankle's R joint +* `L_Roll_m`: Measured value of the left ankle's R joint + +The left graph shows that the serial Pitch and Roll joints can accurately track the sinusoidal target position commands, while the right graph illustrates the tracking performance of the serial joints in phase space. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README_zh.md b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..1f4487743695c6b55e2ca2be6d0d338b0f5f3fdb --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/README_zh.md @@ -0,0 +1,111 @@ +# Unitree H1_2 并联机构控制 + +[English](README.md) | 简体中文 + +## 并联机构控制接口 + +Unitree H1_2 机器人并联机构涉及机器人的左右腿的脚踝。因左右脚踝对称,故下面以 H1_2 左脚踝关节为例: + +

+ +硬件上,H1_2 左脚踝关节采用并联机构,包括四个关节: + +* 并联关节:A 关节、B 关节 +* 串联关节:Pitch 关节 (简称 P 关节)、Roll 关节 (简称 R 关) + +其中只有 A、B 关节是可被电机直接驱动的关节,P、R 关节不能被直接控制。而机器人 URDF 模型和运动控制算法通常只考虑 P、R 串联关节。为了实现对 P、R 关节的控制,我们通过控制 A、B 关节从而间接实现对 P、R 关节的控制。具体到软件上,我们为用户提供了等价的串联关节控制接口,即 `PR 模式`,让用户能直接控制 P、R 关节。与普通关节控制方法一样,`PR 模式` 下每个串联关节接收以下指令: + +| 指令名称 | 变量 | +| ---------- | ----- | +| 前馈力矩 | `tau` | +| 目标角度 | `q` | +| 目标角速度 | `dq` | +| 关节刚度 | `kp` | +| 关节阻尼 | `kd` | + +最终串联关节执行总的力矩为 `T = kp * (q - q_m) + kd * (dq - dq_m) + tau`。为了提高串联关节控制精度,H1_2 机器人内部根据运动学和动力学关系,把 P、R 关节的前馈力矩、目标角度、目标角速度、关节刚度和关节阻尼指令转换为 A、B 实际关节执行单元。 + +## 串联关节跟踪实验 + +为测试 H1_2 脚踝 `PR 模式` 控制效果,我们让脚踝 P、R 关节跟踪正弦曲线,参考[测试例程](https://github.com/unitreerobotics/unitree_sdk2/blob/main/example/h1/low_level/h1_2_ankle_track.cpp)。核心代码段如下: + +**启用 PR 模式并生成正弦曲线** + +```c++ +// [Stage 2]: swing ankle's PR +mode_ = PR; // Enable PR mode +// generate sin/cos trajectory +double max_P = 0.25; // [rad] +double max_R = 0.25; // [rad] +double t = time_ - duration_; +double L_P_des = max_P * std::cos(2.0 * M_PI * t); +double L_R_des = max_R * std::sin(2.0 * M_PI * t); +double R_P_des = max_P * std::cos(2.0 * M_PI * t); +double R_R_des = -max_R * std::sin(2.0 * M_PI * t); +``` + +**设置踝关节指令** + +```c++ +// update ankle joint position targets +float Kp_Pitch = 80; +float Kd_Pitch = 1; +float Kp_Roll = 80; +float Kd_Roll = 1; +dds_low_command.motor_cmd().at(4).q() = L_P_des; // 4: LeftAnklePitch +dds_low_command.motor_cmd().at(4).dq() = 0; +dds_low_command.motor_cmd().at(4).kp() = Kp_Pitch; +dds_low_command.motor_cmd().at(4).kd() = Kd_Pitch; +dds_low_command.motor_cmd().at(4).tau() = 0; +dds_low_command.motor_cmd().at(5).q() = L_R_des; // 5: LeftAnkleRoll +dds_low_command.motor_cmd().at(5).dq() = 0; +dds_low_command.motor_cmd().at(5).kp() = Kp_Roll; +dds_low_command.motor_cmd().at(5).kd() = Kd_Roll; +dds_low_command.motor_cmd().at(5).tau() = 0; +dds_low_command.motor_cmd().at(10).q() = R_P_des; // 10: RightAnklePitch +dds_low_command.motor_cmd().at(10).dq() = 0; +dds_low_command.motor_cmd().at(10).kp() = Kp_Pitch; +dds_low_command.motor_cmd().at(10).kd() = Kd_Pitch; +dds_low_command.motor_cmd().at(10).tau() = 0; +dds_low_command.motor_cmd().at(11).q() = R_R_des; // 11: RightAnkleRoll +dds_low_command.motor_cmd().at(11).dq() = 0; +dds_low_command.motor_cmd().at(11).kp() = Kp_Roll; +dds_low_command.motor_cmd().at(11).kd() = Kd_Roll; +dds_low_command.motor_cmd().at(11).tau() = 0; +``` + +**打印期望值和测量值到终端** + +```c++ +float L_P_m = low_state_.motor_state().at(4).q(); +float L_R_m = low_state_.motor_state().at(5).q(); +float R_P_m = low_state_.motor_state().at(10).q(); +float R_R_m = low_state_.motor_state().at(11).q(); +printf("%f,%f,%f,%f,%f,%f,%f,%f\n", L_P_des, L_P_m, L_R_des, L_R_m, R_P_des, R_P_m, R_R_des, R_R_m); +``` + +| L_P_des | L_P_m | L_R_des | L_R_m | R_P_des | R_P_m | R_R_des | R_R_m | +| ----------------- | ----------------- | ---------------- | ---------------- | ----------------- | ----------------- | ---------------- | ---------------- | +| 左脚 Pitch 期望值 | 左脚 Pitch 测量值 | 左脚 Roll 期望值 | 左脚 Roll 测量值 | 右脚 Pitch 期望值 | 右脚 Pitch 测量值 | 右脚 Roll 期望值 | 右脚 Roll 测量值 | + +安装并编译 [unitree_sdk2](https://github.com/unitreerobotics/unitree_sdk2),务必先把机器人**悬挂起来**,然后终端运行测试例程: + +```bash +h1_2_ankle_track network_interface +``` + +启动后,机器人会先恢复到零位,然后周期性摆动脚踝,并打印左右踝关节期望值和测量值,其位置跟踪效果如图: + +

+ + +

+ +图中符号定义: + +* `L_Pitch_d`:左脚踝 P 关节期望值 +* `L_Pitch_m`:左脚踝 P 关节测量值 +* `L_Roll_d`:左脚踝 R 关节期望值 +* `L_Roll_m`:左脚踝 R 关节测量值 + +左图表示串联 Pitch、Roll 关节能较准确地跟踪正弦曲线目标位置指令;右图表示串联关节在相空间中的跟踪效果。 diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_2_arm_sdk_dds_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_2_arm_sdk_dds_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75f425c1df9fa9634bc9388162480e9e086cded7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_2_arm_sdk_dds_example.cpp @@ -0,0 +1,259 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + +static const std::string kTopicArmSDK = "rt/arm_sdk"; +static const std::string kTopicState = "rt/lowstate"; +constexpr float kPi = 3.141592654; +constexpr float kPi_2 = 1.57079632; + +enum JointIndex { + // Left leg + kLeftHipYaw = 0, + kLeftHipPitch = 1, + kLeftHipRoll = 2, + kLeftKnee = 3, + kLeftAnkle = 4, + kLeftAnkleRoll = 5, + // Right leg + kRightHipYaw = 6, + kRightHipPitch = 7, + kRightHipRoll = 8, + kRightKnee = 9, + kRightAnkle = 10, + kRightAnkleRoll = 11, + + kWaistYaw = 12, + + // Left arm + kLeftShoulderPitch = 13, + kLeftShoulderRoll = 14, + kLeftShoulderYaw = 15, + kLeftElbow = 16, + kLeftWristRoll = 17, + kLeftWristPitch = 18, + kLeftWristYaw = 19, + // Right arm + kRightShoulderPitch = 20, + kRightShoulderRoll = 21, + kRightShoulderYaw = 22, + kRightElbow = 23, + kRightWristRoll = 24, + kRightWristPitch = 25, + kRightWristYaw = 26, + + kNotUsedJoint = 27, + kNotUsedJoint1 = 28, + kNotUsedJoint2 = 29, + kNotUsedJoint3 = 30, + kNotUsedJoint4 = 31, + kNotUsedJoint5 = 32, + kNotUsedJoint6 = 33, + kNotUsedJoint7 = 34 +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + unitree::robot::ChannelPublisherPtr + arm_sdk_publisher; + unitree_hg::msg::dds_::LowCmd_ msg; + + arm_sdk_publisher.reset( + new unitree::robot::ChannelPublisher( + kTopicArmSDK)); + arm_sdk_publisher->InitChannel(); + + unitree::robot::ChannelSubscriberPtr + low_state_subscriber; + + // create subscriber + unitree_hg::msg::dds_::LowState_ state_msg; + low_state_subscriber.reset( + new unitree::robot::ChannelSubscriber( + kTopicState)); + low_state_subscriber->InitChannel([&](const void *msg) { + auto s = ( const unitree_hg::msg::dds_::LowState_* )msg; + memcpy( &state_msg, s, sizeof( unitree_hg::msg::dds_::LowState_ ) ); + }, 1); + + std::array arm_joints = { + JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, + JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbow, + JointIndex::kLeftWristRoll, JointIndex::kLeftWristPitch, JointIndex::kLeftWristYaw, + JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, + JointIndex::kRightShoulderYaw, JointIndex::kRightElbow, + JointIndex::kRightWristRoll, JointIndex::kRightWristPitch, JointIndex::kRightWristYaw, + JointIndex::kWaistYaw}; + + float weight = 0.f; + float weight_rate = 0.2f; + + std::array kp_array = { 120, 120, 80, 50, 50, 50, 50, + 120, 120, 80, 50, 50, 50, 50, + 200 }; + std::array kd_array = { 2.0, 2.0, 1.5, 1.0, 1.0, 1.0, 1.0, + 2.0, 2.0, 1.5, 1.0, 1.0, 1.0, 1.0, + 2.0 }; + float dq = 0.f; + float tau_ff = 0.f; + + float control_dt = 0.02f; + float max_joint_velocity = 0.5f; + + float delta_weight = weight_rate * control_dt; + float max_joint_delta = max_joint_velocity * control_dt; + auto sleep_time = + std::chrono::milliseconds(static_cast(control_dt / 0.001f)); + + // modify the initial position to avoid collision + std::array init_pos{0.f, 0.3, 0.f, 0, 0, 0, 0, + 0.f, -0.3, 0.f, 0, 0, 0, 0, + 0.f}; + + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, 0, 0, 0, + 0.f, -kPi_2, 0.f, kPi_2, 0, 0, 0, + 0.f}; + + // wait for init + std::cout << "Press ENTER to init arms ..."; + std::cin.get(); + + + // get current joint position + std::array current_jpos{}; + std::cout<<"Current joint position: "; + for (int i = 0; i < arm_joints.size(); ++i) { + current_jpos.at(i) = state_msg.motor_state().at(arm_joints.at(i)).q(); + std::cout << current_jpos.at(i) << " "; + } + std::cout << std::endl; + + // set init pos + std::cout << "Initailizing arms ..."; + float init_time = 2.0f; + int init_time_steps = static_cast(init_time / control_dt); + + for (int i = 0; i < init_time_steps; ++i) { + // set weight + weight = 1.0; + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + float phase = 1.0 * i / init_time_steps; + std::cout << "Phase: " << phase << std::endl; + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(init_pos.at(j) * phase + current_jpos.at(j) * (1 - phase)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + // wait for control + std::cout << "Press ENTER to start arm ctrl ..." << std::endl; + std::cin.get(); + + // start control + std::cout << "Start arm ctrl!" << std::endl; + float period = 5.f; + int num_time_steps = static_cast(period / control_dt); + + std::array current_jpos_des{0.f, 0.3, 0.f, 0, 0, 0, 0, + 0.f, -0.3, 0.f, 0, 0, 0, 0, + 0.f}; + + // lift arms up + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(target_pos.at(j) - current_jpos_des.at(j), + -max_joint_delta, max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // put arms down + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(init_pos.at(j) - current_jpos_des.at(j), -max_joint_delta, + max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd_array.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // stop control + std::cout << "Stoping arm ctrl ..."; + float stop_time = 2.0f; + int stop_time_steps = static_cast(stop_time / control_dt); + + for (int i = 0; i < stop_time_steps; ++i) { + // increase weight + weight -= delta_weight; + weight = std::clamp(weight, 0.f, 1.f); + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_arm_sdk_dds_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_arm_sdk_dds_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1a4c9601e74884f2239f1329a065ed10a2bc3c58 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_arm_sdk_dds_example.cpp @@ -0,0 +1,234 @@ +#include +#include +#include +#include + +#include +#include +#include +#include + +static const std::string kTopicArmSDK = "rt/arm_sdk"; +static const std::string kTopicState = "rt/lowstate"; +constexpr float kPi = 3.141592654; +constexpr float kPi_2 = 1.57079632; + +enum JointIndex { + // Right leg + kRightHipYaw = 8, + kRightHipRoll = 0, + kRightHipPitch = 1, + kRightKnee = 2, + kRightAnkle = 11, + // Left leg + kLeftHipYaw = 7, + kLeftHipRoll = 3, + kLeftHipPitch = 4, + kLeftKnee = 5, + kLeftAnkle = 10, + + kWaistYaw = 6, + + kNotUsedJoint = 9, + + // Right arm + kRightShoulderPitch = 12, + kRightShoulderRoll = 13, + kRightShoulderYaw = 14, + kRightElbow = 15, + // Left arm + kLeftShoulderPitch = 16, + kLeftShoulderRoll = 17, + kLeftShoulderYaw = 18, + kLeftElbow = 19, + +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + unitree::robot::ChannelFactory::Instance()->Init(0, argv[1]); + + unitree::robot::ChannelPublisherPtr + arm_sdk_publisher; + unitree_go::msg::dds_::LowCmd_ msg; + + arm_sdk_publisher.reset( + new unitree::robot::ChannelPublisher( + kTopicArmSDK)); + arm_sdk_publisher->InitChannel(); + + unitree::robot::ChannelSubscriberPtr + low_state_subscriber; + + // create subscriber + unitree_hg::msg::dds_::LowState_ state_msg; + low_state_subscriber.reset( + new unitree::robot::ChannelSubscriber( + kTopicState)); + low_state_subscriber->InitChannel([&](const void *msg) { + auto s = ( const unitree_hg::msg::dds_::LowState_* )msg; + memcpy( &state_msg, s, sizeof( unitree_hg::msg::dds_::LowState_ ) ); + }, 1); + + std::array arm_joints = { + JointIndex::kLeftShoulderPitch, JointIndex::kLeftShoulderRoll, + JointIndex::kLeftShoulderYaw, JointIndex::kLeftElbow, + JointIndex::kRightShoulderPitch, JointIndex::kRightShoulderRoll, + JointIndex::kRightShoulderYaw, JointIndex::kRightElbow, JointIndex::kWaistYaw}; + + float weight = 0.f; + float weight_rate = 0.2f; + + float kp = 60.f; + float kd = 1.5f; + float dq = 0.f; + float tau_ff = 0.f; + + float control_dt = 0.02f; + float max_joint_velocity = 0.5f; + + float delta_weight = weight_rate * control_dt; + float max_joint_delta = max_joint_velocity * control_dt; + auto sleep_time = + std::chrono::milliseconds(static_cast(control_dt / 0.001f)); + + std::array init_pos{0, 0, 0, 0, + 0, 0, 0, 0, + 0}; + + std::array target_pos = {0.f, kPi_2, 0.f, kPi_2, + 0.f, -kPi_2, 0.f, kPi_2, + 0.f}; + + // wait for init + std::cout << "Press ENTER to init arms ..."; + std::cin.get(); + + // get current joint position + std::array current_jpos{}; + std::cout<<"Current joint position: "; + for (int i = 0; i < arm_joints.size(); ++i) { + current_jpos.at(i) = state_msg.motor_state().at(arm_joints.at(i)).q(); + std::cout << current_jpos.at(i) << " "; + } + std::cout << std::endl; + + // set init pos + std::cout << "Initailizing arms ..."; + float init_time = 2.0f; + int init_time_steps = static_cast(init_time / control_dt); + + for (int i = 0; i < init_time_steps; ++i) { + // set weight + weight = 1.0; + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + float phase = 1.0 * i / init_time_steps; + std::cout << "Phase: " << phase << std::endl; + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(init_pos.at(j) * phase + current_jpos.at(j) * (1 - phase)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + // wait for control + std::cout << "Press ENTER to start arm ctrl ..." << std::endl; + std::cin.get(); + + // start control + std::cout << "Start arm ctrl!" << std::endl; + float period = 5.f; + int num_time_steps = static_cast(period / control_dt); + + std::array current_jpos_des{}; + + // lift arms up + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(target_pos.at(j) - current_jpos_des.at(j), + -max_joint_delta, max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // put arms down + for (int i = 0; i < num_time_steps; ++i) { + // update jpos des + for (int j = 0; j < init_pos.size(); ++j) { + current_jpos_des.at(j) += + std::clamp(init_pos.at(j) - current_jpos_des.at(j), -max_joint_delta, + max_joint_delta); + } + + // set control joints + for (int j = 0; j < init_pos.size(); ++j) { + msg.motor_cmd().at(arm_joints.at(j)).q(current_jpos_des.at(j)); + msg.motor_cmd().at(arm_joints.at(j)).dq(dq); + msg.motor_cmd().at(arm_joints.at(j)).kp(kp); + msg.motor_cmd().at(arm_joints.at(j)).kd(kd); + msg.motor_cmd().at(arm_joints.at(j)).tau(tau_ff); + } + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + // stop control + std::cout << "Stoping arm ctrl ..."; + float stop_time = 2.0f; + int stop_time_steps = static_cast(stop_time / control_dt); + + for (int i = 0; i < stop_time_steps; ++i) { + // increase weight + weight -= delta_weight; + weight = std::clamp(weight, 0.f, 1.f); + + // set weight + msg.motor_cmd().at(JointIndex::kNotUsedJoint).q(weight); + + // send dds msg + arm_sdk_publisher->Write(msg); + + // sleep + std::this_thread::sleep_for(sleep_time); + } + + std::cout << "Done!" << std::endl; + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_loco_client_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_loco_client_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e6029e180172ce0c5ed2c6b651a5223167b2a98d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/high_level/h1_loco_client_example.cpp @@ -0,0 +1,300 @@ +#include +#include +#include + +#include +#include + +std::vector stringToFloatVector(const std::string &str) { + std::vector result; + std::stringstream ss(str); + float num; + while (ss >> num) { + result.push_back(num); + // ignore any trailing whitespace + ss.ignore(); + } + return result; +} + +int main(int argc, char const *argv[]) { + std::map args = {{"network_interface", "lo"}}; + + std::map values; + for (int i = 1; i < argc; ++i) { + std::string arg = argv[i]; + if (arg.substr(0, 2) == "--") { + size_t pos = arg.find("="); + std::string key, value; + if (pos != std::string::npos) { + key = arg.substr(2, pos - 2); + value = arg.substr(pos + 1); + + if (value.front() == '"' && value.back() == '"') { + value = value.substr(1, value.length() - 2); + } + } else { + key = arg.substr(2); + value = ""; + } + if (args.find(key) != args.end()) { + args[key] = value; + } else { + args.insert({{key, value}}); + } + } + } + + unitree::robot::ChannelFactory::Instance()->Init(0, args["network_interface"]); + + unitree::robot::h1::LocoClient client; + + client.Init(); + client.SetTimeout(10.f); + + for (const auto &arg_pair : args) { + std::cout << "Processing command: [" << arg_pair.first << "] with param: [" << arg_pair.second << "] ..." + << std::endl; + if (arg_pair.first == "network_interface") { + continue; + } + + if (arg_pair.first == "get_fsm_id") { + int fsm_id; + client.GetFsmId(fsm_id); + std::cout << "current fsm_id: " << fsm_id << std::endl; + } + + if (arg_pair.first == "get_fsm_mode") { + int fsm_mode; + client.GetFsmMode(fsm_mode); + std::cout << "current fsm_mode: " << fsm_mode << std::endl; + } + + if (arg_pair.first == "get_balance_mode") { + int balance_mode; + client.GetBalanceMode(balance_mode); + std::cout << "current balance_mode: " << balance_mode << std::endl; + } + + if (arg_pair.first == "get_swing_height") { + float swing_height; + client.GetSwingHeight(swing_height); + std::cout << "current swing_height: " << swing_height << std::endl; + } + + if (arg_pair.first == "get_stand_height") { + float stand_height; + client.GetStandHeight(stand_height); + std::cout << "current stand_height: " << stand_height << std::endl; + } + + if (arg_pair.first == "get_phase") { + std::vector phase; + client.GetPhase(phase); + std::cout << "current phase: ("; + for (const auto &p : phase) { + std::cout << p << ", "; + } + std::cout << ")" << std::endl; + } + + if (arg_pair.first == "enable_odom") { + float x, y, yaw; + client.EnableOdom(); + std::cout << "Send enable odom signal" << std::endl; + } + + if (arg_pair.first == "disable_odom") { + float x, y, yaw; + client.DisableOdom(); + std::cout << "Send disable odom signal" << std::endl; + } + + if (arg_pair.first == "get_odom") { + float x, y, yaw; + client.GetOdom(x, y, yaw); + std::cout << "Get Odom: (" << x << ", " << y << ", " << yaw << ")" << std::endl; + } + + if (arg_pair.first == "set_fsm_id") { + int fsm_id = std::stoi(arg_pair.second); + client.SetFsmId(fsm_id); + std::cout << "set fsm_id to " << fsm_id << std::endl; + } + + if (arg_pair.first == "set_balance_mode") { + int balance_mode = std::stoi(arg_pair.second); + client.SetBalanceMode(balance_mode); + std::cout << "set balance_mode to " << balance_mode << std::endl; + } + + if (arg_pair.first == "set_swing_height") { + float swing_height = std::stof(arg_pair.second); + client.SetSwingHeight(swing_height); + std::cout << "set swing_height to " << swing_height << std::endl; + } + + if (arg_pair.first == "set_stand_height") { + float stand_height = std::stof(arg_pair.second); + client.SetStandHeight(stand_height); + std::cout << "set stand_height to " << stand_height << std::endl; + } + + if (arg_pair.first == "set_velocity") { + std::vector param = stringToFloatVector(arg_pair.second); + auto param_size = param.size(); + float vx, vy, omega, duration; + if (param_size == 3) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + duration = 1.f; + } else if (param_size == 4) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + duration = param.at(3); + } else { + std::cerr << "Invalid param size for method SetVelocity: " << param_size << std::endl; + return 1; + } + + client.SetVelocity(vx, vy, omega, duration); + std::cout << "set velocity to " << arg_pair.second << std::endl; + } + + if (arg_pair.first == "set_phase") { + std::vector param = stringToFloatVector(arg_pair.second); + auto param_size = param.size(); + if (param_size == 2) { + client.SetPhase(param); + std::cout << "set phase to " << arg_pair.second << std::endl; + } else { + std::cerr << "Invalid param size for method SetPhase: " << param_size << std::endl; + return 1; + } + } + + if (arg_pair.first == "set_target_pos") { + std::vector param = stringToFloatVector(arg_pair.second); + client.SetTargetPos(param.at(0), param.at(1), param.at(2), false); + std::cout << "set_target_pos: " << arg_pair.second << std::endl; + } + + if (arg_pair.first == "set_target_pos_relative") { + std::vector param = stringToFloatVector(arg_pair.second); + client.SetTargetPos(param.at(0), param.at(1), param.at(2)); + std::cout << "set_target_pos: " << arg_pair.second << std::endl; + } + + if (arg_pair.first == "damp") { + client.Damp(); + } + + if (arg_pair.first == "start") { + client.Start(); + } + + if (arg_pair.first == "stand_up") { + client.StandUp(); + } + + if (arg_pair.first == "zero_torque") { + client.ZeroTorque(); + } + + if (arg_pair.first == "stop_move") { + client.StopMove(); + } + + if (arg_pair.first == "high_stand") { + client.HighStand(); + } + + if (arg_pair.first == "low_stand") { + client.LowStand(); + } + + if (arg_pair.first == "balance_stand") { + client.BalanceStand(); + } + + if (arg_pair.first == "continous_gait") { + bool flag; + if (arg_pair.second == "true") { + flag = true; + } else if (arg_pair.second == "false") { + flag = false; + } else { + std::cerr << "invalid argument: " << arg_pair.second << std::endl; + return 1; + } + client.ContinuousGait(flag); + } + + if (arg_pair.first == "switch_move_mode") { + bool flag; + if (arg_pair.second == "true") { + flag = true; + } else if (arg_pair.second == "false") { + flag = false; + } else { + std::cerr << "invalid argument: " << arg_pair.second << std::endl; + return 1; + } + client.SwitchMoveMode(flag); + } + + if (arg_pair.first == "move") { + std::vector param = stringToFloatVector(arg_pair.second); + auto param_size = param.size(); + float vx, vy, omega; + if (param_size == 3) { + vx = param.at(0); + vy = param.at(1); + omega = param.at(2); + } else { + std::cerr << "Invalid param size for method SetVelocity: " << param_size << std::endl; + return 1; + } + client.Move(vx, vy, omega); + } + + if (arg_pair.first == "set_next_foot") { + bool flag; + if (arg_pair.second == "0") { + flag = true; + } else if (arg_pair.second == "1") { + flag = false; + } else { + std::cerr << "invalid argument: " << arg_pair.second << std::endl; + return 1; + } + client.SetNextFoot(flag); + } + + if (arg_pair.first == "set_task_id") { + int task_id = std::stoi(arg_pair.second); + client.SetTaskId(task_id); + std::cout << "set task_id to " << task_id << std::endl; + } + + if (arg_pair.first == "shake_hand") { + client.ShakeHand(0); + std::cout << "Shake hand starts! Waiting for 10 s for ending" << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(10)); + std::cout << "Shake hand ends!" << std::endl; + client.ShakeHand(1); + } + + if (arg_pair.first == "wave_hand") { + client.WaveHand(); + std::cout << "wave hand" << std::endl; + } + + std::cout << "Done!" << std::endl; + } + + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/base_state.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/base_state.h new file mode 100644 index 0000000000000000000000000000000000000000..685a13382d2f328a1e59abaccb1c04aedbbf5fee --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/base_state.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +struct BaseState { + std::array rpy = {}; + std::array omega = {}; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/data_buffer.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/data_buffer.hpp new file mode 100644 index 0000000000000000000000000000000000000000..74042174b82dd607837fbf0547227d6f3e9afb65 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/data_buffer.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include +#include +#include +#include + +template class DataBuffer { +public: + void SetData(const T &newData) { + std::unique_lock lock(mutex); + data = std::make_shared(newData); + } + + std::shared_ptr GetData() { + std::shared_lock lock(mutex); + return data ? data : nullptr; + } + + void Clear() { + std::unique_lock lock(mutex); + data = nullptr; + } + +private: + std::shared_ptr data; + std::shared_mutex mutex; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_27dof_example.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_27dof_example.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28c80e8bf3106b98a1051c23ff840e3b8619b69d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_27dof_example.cpp @@ -0,0 +1,367 @@ +#include +#include +#include +#include +#include + +// DDS +#include +#include + +// IDL +#include +#include + +static const std::string HG_CMD_TOPIC = "rt/lowcmd"; +static const std::string HG_STATE_TOPIC = "rt/lowstate"; + +using namespace unitree::common; +using namespace unitree::robot; + +const int H1_NUM_MOTOR = 27; + +template +class DataBuffer { + public: + void SetData(const T &newData) { + std::unique_lock lock(mutex); + data = std::make_shared(newData); + } + + std::shared_ptr GetData() { + std::shared_lock lock(mutex); + return data ? data : nullptr; + } + + void Clear() { + std::unique_lock lock(mutex); + data = nullptr; + } + + private: + std::shared_ptr data; + std::shared_mutex mutex; +}; + +struct ImuState { + std::array rpy = {}; + std::array omega = {}; +}; + +struct MotorCommand { + std::array q_target = {}; + std::array dq_target = {}; + std::array kp = {}; + std::array kd = {}; + std::array tau_ff = {}; +}; + +struct MotorState { + std::array q = {}; + std::array dq = {}; +}; + +enum MotorType { GearboxS = 0, GearboxM = 1, GearboxL = 2 }; + +std::array H1MotorType{ + // clang-format off + // legs + GearboxM, GearboxM, GearboxM, GearboxL, GearboxS, GearboxS, + GearboxM, GearboxM, GearboxM, GearboxL, GearboxS, GearboxS, + // waist + GearboxM, + // arms + GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, + GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS, GearboxS + // clang-format on +}; + +enum PRorAB { PR = 0, AB = 1 }; + +enum H1JointIndex { + // legs + LeftHipYaw = 0, + LeftHipPitch = 1, + LeftHipRoll = 2, + LeftKnee = 3, + LeftAnklePitch = 4, + LeftAnkleB = 4, + LeftAnkleRoll = 5, + LeftAnkleA = 5, + RightHipYaw = 6, + RightHipPitch = 7, + RightHipRoll = 8, + RightKnee = 9, + RightAnklePitch = 10, + RightAnkleB = 10, + RightAnkleRoll = 11, + RightAnkleA = 11, + // torso + WaistYaw = 12, + // arms + LeftShoulderPitch = 13, + LeftShoulderRoll = 14, + LeftShoulderYaw = 15, + LeftElbow = 16, + LeftWristRoll = 17, + LeftWristPitch = 18, + LeftWristYaw = 19, + RightShoulderPitch = 20, + RightShoulderRoll = 21, + RightShoulderYaw = 22, + RightElbow = 23, + RightWristRoll = 24, + RightWristPitch = 25, + RightWristYaw = 26 +}; + +inline uint32_t Crc32Core(uint32_t *ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else + CRC32 <<= 1; + if (data & xbit) CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +}; + +float GetMotorKp(MotorType type) { + switch (type) { + case GearboxS: + return 80; + case GearboxM: + return 100; + case GearboxL: + return 200; + default: + return 0; + } +} + +float GetMotorKd(MotorType type) { + switch (type) { + case GearboxS: + return 2; + case GearboxM: + return 3; + case GearboxL: + return 5; + default: + return 0; + } +} + +class H1Example { + private: + double time_; + double control_dt_; // [2ms] + double duration_; // [3 s] + PRorAB mode_; + uint8_t mode_machine_; + + DataBuffer motor_state_buffer_; + DataBuffer motor_command_buffer_; + DataBuffer imu_state_buffer_; + + ChannelPublisherPtr lowcmd_publisher_; + ChannelSubscriberPtr lowstate_subscriber_; + ThreadPtr command_writer_ptr_, control_thread_ptr_; + + public: + H1Example(std::string networkInterface) + : time_(0.0), + control_dt_(0.002), + duration_(3.0), + mode_(PR), + mode_machine_(0) { + ChannelFactory::Instance()->Init(0, networkInterface); + + // create publisher + lowcmd_publisher_.reset( + new ChannelPublisher(HG_CMD_TOPIC)); + lowcmd_publisher_->InitChannel(); + + // create subscriber + lowstate_subscriber_.reset( + new ChannelSubscriber( + HG_STATE_TOPIC)); + lowstate_subscriber_->InitChannel( + std::bind(&H1Example::LowStateHandler, this, std::placeholders::_1), 1); + + // create threads + command_writer_ptr_ = + CreateRecurrentThreadEx("command_writer", UT_CPU_ID_NONE, 2000, + &H1Example::LowCommandWriter, this); + control_thread_ptr_ = CreateRecurrentThreadEx( + "control", UT_CPU_ID_NONE, 2000, &H1Example::Control, this); + } + + void ReportRPY() { + const std::shared_ptr imu_tmp_ptr = + imu_state_buffer_.GetData(); + if (imu_tmp_ptr) { + std::cout << "rpy: [" << imu_tmp_ptr->rpy.at(0) << ", " + << imu_tmp_ptr->rpy.at(1) << ", " << imu_tmp_ptr->rpy.at(2) + << "]" << std::endl; + } + } + + void LowStateHandler(const void *message) { + unitree_hg::msg::dds_::LowState_ low_state = + *(const unitree_hg::msg::dds_::LowState_ *)message; + + if (low_state.crc() != + Crc32Core((uint32_t *)&low_state, + (sizeof(unitree_hg::msg::dds_::LowState_) >> 2) - 1)) { + std::cout << "low_state CRC Error" << std::endl; + return; + } + + // get motor state + MotorState ms_tmp; + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + ms_tmp.q.at(i) = low_state.motor_state()[i].q(); + ms_tmp.dq.at(i) = low_state.motor_state()[i].dq(); + + if (low_state.motor_state()[i].motorstate()) + std::cout << "[ERROR] motor " << i << " with code " + << low_state.motor_state()[i].motorstate() << "\n"; + } + motor_state_buffer_.SetData(ms_tmp); + + // get imu state + ImuState imu_tmp; + imu_tmp.omega = low_state.imu_state().gyroscope(); + imu_tmp.rpy = low_state.imu_state().rpy(); + imu_state_buffer_.SetData(imu_tmp); + + // update mode machine + if (mode_machine_ != low_state.mode_machine()) { + if (mode_machine_ == 0) + std::cout << "G1 type: " << unsigned(low_state.mode_machine()) + << std::endl; + mode_machine_ = low_state.mode_machine(); + } + } + + void LowCommandWriter() { + unitree_hg::msg::dds_::LowCmd_ dds_low_command; + dds_low_command.mode_pr() = mode_; + dds_low_command.mode_machine() = mode_machine_; + + const std::shared_ptr mc = + motor_command_buffer_.GetData(); + if (mc) { + for (size_t i = 0; i < H1_NUM_MOTOR; i++) { + dds_low_command.motor_cmd().at(i).mode() = 1; // 1:Enable, 0:Disable + dds_low_command.motor_cmd().at(i).tau() = mc->tau_ff.at(i); + dds_low_command.motor_cmd().at(i).q() = mc->q_target.at(i); + dds_low_command.motor_cmd().at(i).dq() = mc->dq_target.at(i); + dds_low_command.motor_cmd().at(i).kp() = mc->kp.at(i); + dds_low_command.motor_cmd().at(i).kd() = mc->kd.at(i); + } + + dds_low_command.crc() = Crc32Core((uint32_t *)&dds_low_command, + (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } + } + + void Control() { + ReportRPY(); + + MotorCommand motor_command_tmp; + const std::shared_ptr ms = motor_state_buffer_.GetData(); + + if (ms) { + time_ += control_dt_; + if (time_ < duration_ * 1) { + // [Stage 1]: set robot to zero posture + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + double ratio = std::clamp(time_ / duration_, 0.0, 1.0); + + double q_des = 0; + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = + (q_des - ms->q.at(i)) * ratio + ms->q.at(i); + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = GetMotorKp(H1MotorType[i]); + motor_command_tmp.kd.at(i) = GetMotorKd(H1MotorType[i]); + } + } else if (time_ < duration_ * 2) { + // [Stage 2]: swing ankle's PR + mode_ = PR; + double max_P = M_PI * 30.0 / 180.0; + double max_R = M_PI * 10.0 / 180.0; + double t = time_ - duration_ * 1; + double L_P_des = +max_P * std::sin(2.0 * M_PI * t); + double L_R_des = +max_R * std::sin(2.0 * M_PI * t); + double R_P_des = +max_P * std::sin(2.0 * M_PI * t); + double R_R_des = -max_R * std::sin(2.0 * M_PI * t); + + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = 0.0; + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = GetMotorKp(H1MotorType[i]); + motor_command_tmp.kd.at(i) = GetMotorKd(H1MotorType[i]); + } + + motor_command_tmp.q_target.at(LeftAnklePitch) = L_P_des; + motor_command_tmp.q_target.at(LeftAnkleRoll) = L_R_des; + motor_command_tmp.q_target.at(RightAnklePitch) = R_P_des; + motor_command_tmp.q_target.at(RightAnkleRoll) = R_R_des; + } else { + // [Stage 3]: swing ankle's AB + mode_ = AB; + double max_A = M_PI * 30.0 / 180.0; + double max_B = M_PI * 10.0 / 180.0; + double t = time_ - duration_ * 2; + double L_A_des = +max_A * std::sin(M_PI * t); + double L_B_des = +max_B * std::sin(M_PI * t + M_PI); + double R_A_des = -max_A * std::sin(M_PI * t); + double R_B_des = -max_B * std::sin(M_PI * t + M_PI); + + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + motor_command_tmp.tau_ff.at(i) = 0.0; + motor_command_tmp.q_target.at(i) = 0.0; + motor_command_tmp.dq_target.at(i) = 0.0; + motor_command_tmp.kp.at(i) = GetMotorKp(H1MotorType[i]); + motor_command_tmp.kd.at(i) = GetMotorKd(H1MotorType[i]); + } + + motor_command_tmp.q_target.at(LeftAnkleA) = L_A_des; + motor_command_tmp.q_target.at(LeftAnkleB) = L_B_des; + motor_command_tmp.q_target.at(RightAnkleA) = R_A_des; + motor_command_tmp.q_target.at(RightAnkleB) = R_B_des; + } + + motor_command_buffer_.SetData(motor_command_tmp); + } + } +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: h1_27dof_example network_interface_name" << std::endl; + exit(0); + } + std::string networkInterface = argv[1]; + H1Example custom(networkInterface); + + while (true) sleep(10); + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_2_ankle_track.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_2_ankle_track.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72d0c93dcf7bf1cc7474a19238a48a4ce2d52359 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/h1_2_ankle_track.cpp @@ -0,0 +1,175 @@ +#include + +// DDS +#include +#include + +// IDL +#include +#include + +static const std::string HG_CMD_TOPIC = "rt/lowcmd"; +static const std::string HG_STATE_TOPIC = "rt/lowstate"; + +using namespace unitree::common; +using namespace unitree::robot; + +const int H1_NUM_MOTOR = 27; + +enum PRorAB { PR = 0, AB = 1 }; + +inline uint32_t Crc32Core(uint32_t *ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else + CRC32 <<= 1; + if (data & xbit) CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +}; + +class H1Example { + private: + double time_; + double control_dt_; // [2ms] + double duration_; // [3 s] + PRorAB mode_; + + unitree_hg::msg::dds_::LowState_ low_state_; + + ChannelPublisherPtr lowcmd_publisher_; + ChannelSubscriberPtr lowstate_subscriber_; + ThreadPtr command_writer_ptr_, control_thread_ptr_; + + public: + H1Example(std::string networkInterface) + : time_(0.0), control_dt_(0.002), duration_(3.0), mode_(PR) { + ChannelFactory::Instance()->Init(0, networkInterface); + + // create publisher + lowcmd_publisher_.reset( + new ChannelPublisher(HG_CMD_TOPIC)); + lowcmd_publisher_->InitChannel(); + + // create subscriber + lowstate_subscriber_.reset( + new ChannelSubscriber( + HG_STATE_TOPIC)); + lowstate_subscriber_->InitChannel( + std::bind(&H1Example::LowStateHandler, this, std::placeholders::_1), 1); + + // create threads + control_thread_ptr_ = CreateRecurrentThreadEx( + "control", UT_CPU_ID_NONE, 2000, &H1Example::Control, this); + } + + void LowStateHandler(const void *message) { + low_state_ = *(const unitree_hg::msg::dds_::LowState_ *)message; + + if (low_state_.crc() != + Crc32Core((uint32_t *)&low_state_, + (sizeof(unitree_hg::msg::dds_::LowState_) >> 2) - 1)) { + std::cout << "low_state CRC Error" << std::endl; + return; + } + } + + void Control() { + unitree_hg::msg::dds_::LowCmd_ dds_low_command; + dds_low_command.mode_pr() = mode_; + dds_low_command.mode_machine() = low_state_.mode_machine(); + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + dds_low_command.motor_cmd().at(i).mode() = 1; // 1:Enable, 0:Disable + dds_low_command.motor_cmd().at(i).tau() = 0.0; + dds_low_command.motor_cmd().at(i).q() = 0.0; + dds_low_command.motor_cmd().at(i).dq() = 0.0; + dds_low_command.motor_cmd().at(i).kp() = (i < 13) ? 100.0 : 50.0; + dds_low_command.motor_cmd().at(i).kd() = 1.0; + } + + time_ += control_dt_; + if (time_ < duration_) { + // [Stage 1]: set robot to zero posture + for (int i = 0; i < H1_NUM_MOTOR; ++i) { + double ratio = std::clamp(time_ / duration_, 0.0, 1.0); + dds_low_command.motor_cmd().at(i).q() = + (1. - ratio) * low_state_.motor_state().at(i).q(); + } + } else { + // [Stage 2]: swing ankle's PR + mode_ = PR; // Enable PR mode + + // generate sin/cos trajectory + double max_P = 0.25; // [rad] + double max_R = 0.25; // [rad] + double t = time_ - duration_; + double L_P_des = max_P * std::cos(2.0 * M_PI * t); + double L_R_des = max_R * std::sin(2.0 * M_PI * t); + double R_P_des = max_P * std::cos(2.0 * M_PI * t); + double R_R_des = -max_R * std::sin(2.0 * M_PI * t); + + // update ankle joint position targets + float Kp_Pitch = 80; + float Kd_Pitch = 1; + float Kp_Roll = 80; + float Kd_Roll = 1; + dds_low_command.motor_cmd().at(4).q() = L_P_des; // 4: LeftAnklePitch + dds_low_command.motor_cmd().at(4).dq() = 0; + dds_low_command.motor_cmd().at(4).kp() = Kp_Pitch; + dds_low_command.motor_cmd().at(4).kd() = Kd_Pitch; + dds_low_command.motor_cmd().at(4).tau() = 0; + dds_low_command.motor_cmd().at(5).q() = L_R_des; // 5: LeftAnkleRoll + dds_low_command.motor_cmd().at(5).dq() = 0; + dds_low_command.motor_cmd().at(5).kp() = Kp_Roll; + dds_low_command.motor_cmd().at(5).kd() = Kd_Roll; + dds_low_command.motor_cmd().at(5).tau() = 0; + dds_low_command.motor_cmd().at(10).q() = R_P_des; // 10: RightAnklePitch + dds_low_command.motor_cmd().at(10).dq() = 0; + dds_low_command.motor_cmd().at(10).kp() = Kp_Pitch; + dds_low_command.motor_cmd().at(10).kd() = Kd_Pitch; + dds_low_command.motor_cmd().at(10).tau() = 0; + dds_low_command.motor_cmd().at(11).q() = R_R_des; // 11: RightAnkleRoll + dds_low_command.motor_cmd().at(11).dq() = 0; + dds_low_command.motor_cmd().at(11).kp() = Kp_Roll; + dds_low_command.motor_cmd().at(11).kd() = Kd_Roll; + dds_low_command.motor_cmd().at(11).tau() = 0; + + float L_P_m = low_state_.motor_state().at(4).q(); + float L_R_m = low_state_.motor_state().at(5).q(); + float R_P_m = low_state_.motor_state().at(10).q(); + float R_R_m = low_state_.motor_state().at(11).q(); + // clang-format off + printf("%f,%f,%f,%f,%f,%f,%f,%f\n", + L_P_des, L_P_m, L_R_des, L_R_m, + R_P_des, R_P_m, R_R_des, R_R_m); + // clang-format on + } + + dds_low_command.crc() = Crc32Core((uint32_t *)&dds_low_command, + (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } +}; + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: h1_2_ankle_track network_interface_name" << std::endl; + exit(0); + } + std::string networkInterface = argv[1]; + H1Example custom(networkInterface); + while (true) sleep(10); + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a15e8cebe0be8650bbc4f89cf15718abc39f3dd8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.cpp @@ -0,0 +1,14 @@ +#include "humanoid.hpp" + +int main(int argc, char const *argv[]) { + if (argc < 2) { + std::cout << "Usage: " << argv[0] << " networkInterface" << std::endl; + exit(-1); + } + + HumanoidExample example(argv[1]); + while (1) { + sleep(10); + } + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8fd61785f1dad3e184d87ffade1586071ee6b0c6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/humanoid.hpp @@ -0,0 +1,263 @@ +#pragma once + +#include +#include +#include + +#include "unitree/robot/channel/channel_publisher.hpp" +#include "unitree/robot/channel/channel_subscriber.hpp" +#include +#include +#include + +#include "base_state.h" +#include "data_buffer.hpp" +#include "motors.hpp" + +#include +using namespace unitree::robot::b2; + +static const std::string kTopicLowCommand = "rt/lowcmd"; +static const std::string kTopicLowState = "rt/lowstate"; + +class HumanoidExample { +public: + HumanoidExample(const std::string &networkInterface = "") { + unitree::robot::ChannelFactory::Instance()->Init(0, networkInterface); + std::cout << "Initialize channel factory." << std::endl; + + msc.reset(new MotionSwitcherClient()); + msc->SetTimeout(5.0F); + msc->Init(); + + /*Shut down motion control-related service*/ + while(queryMotionStatus()) + { + std::cout << "Try to deactivate the motion control-related service." << std::endl; + int32_t ret = msc->ReleaseMode(); + if (ret == 0) { + std::cout << "ReleaseMode succeeded." << std::endl; + } else { + std::cout << "ReleaseMode failed. Error code: " << ret << std::endl; + } + sleep(5); + } + + lowcmd_publisher_.reset( + new unitree::robot::ChannelPublisher( + kTopicLowCommand)); + lowcmd_publisher_->InitChannel(); + command_writer_ptr_ = unitree::common::CreateRecurrentThreadEx( + "command_writer", UT_CPU_ID_NONE, 2000, + &HumanoidExample::LowCommandWriter, this); + + lowstate_subscriber_.reset( + new unitree::robot::ChannelSubscriber( + kTopicLowState)); + lowstate_subscriber_->InitChannel( + std::bind(&HumanoidExample::LowStateHandler, this, + std::placeholders::_1), + 1); + int control_period_us = control_dt_ * 1e6; + control_thread_ptr_ = unitree::common::CreateRecurrentThreadEx( + "control", UT_CPU_ID_NONE, control_period_us, &HumanoidExample::Control, + this); + + int report_period_us = report_dt_ * 1e6; + report_rpy_ptr_ = unitree::common::CreateRecurrentThreadEx( + "report_rpy", UT_CPU_ID_NONE, report_period_us, + &HumanoidExample::ReportRPY, this); + } + + ~HumanoidExample() = default; + + void LowCommandWriter() { + unitree_go::msg::dds_::LowCmd_ dds_low_command{}; + dds_low_command.head()[0] = 0xFE; + dds_low_command.head()[1] = 0xEF; + dds_low_command.level_flag() = 0xFF; + dds_low_command.gpio() = 0; + + const std::shared_ptr mc_tmp_ptr = + motor_command_buffer_.GetData(); + if (mc_tmp_ptr) { + for (int i = 0; i < kNumMotors; ++i) { + if (IsWeakMotor(i)) { + dds_low_command.motor_cmd().at(i).mode() = (0x01); + } else { + dds_low_command.motor_cmd().at(i).mode() = (0x0A); + } + dds_low_command.motor_cmd().at(i).tau() = mc_tmp_ptr->tau_ff.at(i); + dds_low_command.motor_cmd().at(i).q() = mc_tmp_ptr->q_ref.at(i); + dds_low_command.motor_cmd().at(i).dq() = mc_tmp_ptr->dq_ref.at(i); + dds_low_command.motor_cmd().at(i).kp() = mc_tmp_ptr->kp.at(i); + dds_low_command.motor_cmd().at(i).kd() = mc_tmp_ptr->kd.at(i); + } + dds_low_command.crc() = Crc32Core((uint32_t *)&dds_low_command, + (sizeof(dds_low_command) >> 2) - 1); + lowcmd_publisher_->Write(dds_low_command); + } + } + + void LowStateHandler(const void *message) { + unitree_go::msg::dds_::LowState_ low_state = + *(unitree_go::msg::dds_::LowState_ *)message; + + RecordMotorState(low_state); + RecordBaseState(low_state); + } + + void Control() { + MotorCommand motor_command_tmp; + const std::shared_ptr ms_tmp_ptr = + motor_state_buffer_.GetData(); + + if (ms_tmp_ptr) { + time_ += control_dt_; + time_ = std::clamp(time_, 0.f, init_duration_); + float ratio = time_ / init_duration_; + for (int i = 0; i < kNumMotors; ++i) { + motor_command_tmp.kp.at(i) = IsWeakMotor(i) ? kp_low_ : kp_high_; + motor_command_tmp.kd.at(i) = IsWeakMotor(i) ? kd_low_ : kd_high_; + motor_command_tmp.dq_ref.at(i) = 0.f; + motor_command_tmp.tau_ff.at(i) = 0.f; + + float q_des = 0.f; + if (i == JointIndex::kLeftHipPitch || i == JointIndex::kRightHipPitch) { + q_des = hip_pitch_init_pos_; + } + if (i == JointIndex::kLeftKnee || i == JointIndex::kRightKnee) { + q_des = knee_init_pos_; + } + if (i == JointIndex::kLeftAnkle || i == JointIndex::kRightAnkle) { + q_des = ankle_init_pos_; + } + if (i == JointIndex::kLeftShoulderPitch || + i == JointIndex::kRightShoulderPitch) { + q_des = shoulder_pitch_init_pos_; + } + + q_des = (q_des - ms_tmp_ptr->q.at(i)) * ratio + ms_tmp_ptr->q.at(i); + motor_command_tmp.q_ref.at(i) = q_des; + } + + motor_command_buffer_.SetData(motor_command_tmp); + } + } + + void ReportRPY() { + const std::shared_ptr bs_tmp_ptr = + base_state_buffer_.GetData(); + if (bs_tmp_ptr) { + std::cout << "rpy: [" << bs_tmp_ptr->rpy.at(0) << ", " + << bs_tmp_ptr->rpy.at(1) << ", " << bs_tmp_ptr->rpy.at(2) << "]" + << std::endl; + } + } + +private: + void RecordMotorState(const unitree_go::msg::dds_::LowState_ &msg) { + MotorState ms_tmp; + for (int i = 0; i < kNumMotors; ++i) { + ms_tmp.q.at(i) = msg.motor_state()[i].q(); + ms_tmp.dq.at(i) = msg.motor_state()[i].dq(); + } + + motor_state_buffer_.SetData(ms_tmp); + } + + void RecordBaseState(const unitree_go::msg::dds_::LowState_ &msg) { + BaseState bs_tmp; + bs_tmp.omega = msg.imu_state().gyroscope(); + bs_tmp.rpy = msg.imu_state().rpy(); + + base_state_buffer_.SetData(bs_tmp); + } + + inline bool IsWeakMotor(int motor_index) { + return motor_index == JointIndex::kLeftAnkle || + motor_index == JointIndex::kRightAnkle || + motor_index == JointIndex::kRightShoulderPitch || + motor_index == JointIndex::kRightShoulderRoll || + motor_index == JointIndex::kRightShoulderYaw || + motor_index == JointIndex::kRightElbow || + motor_index == JointIndex::kLeftShoulderPitch || + motor_index == JointIndex::kLeftShoulderRoll || + motor_index == JointIndex::kLeftShoulderYaw || + motor_index == JointIndex::kLeftElbow; + } + + std::string queryServiceName(std::string form,std::string name) + { + if(form == "0") + { + if(name == "normal" ) return "sport_mode"; + if(name == "ai" ) return "ai_sport"; + if(name == "advanced" ) return "advanced_sport"; + } + else + { + if(name == "ai-w" ) return "wheeled_sport(go2W)"; + if(name == "normal-w" ) return "wheeled_sport(b2W)"; + } + return ""; + } + + int queryMotionStatus() + { + std::string robotForm,motionName; + int motionStatus; + int32_t ret = msc->CheckMode(robotForm,motionName); + if (ret == 0) { + std::cout << "CheckMode succeeded." << std::endl; + } else { + std::cout << "CheckMode failed. Error code: " << ret << std::endl; + } + if(motionName.empty()) + { + std::cout << "The motion control-related service is deactivated." << std::endl; + motionStatus = 0; + } + else + { + std::string serviceName = queryServiceName(robotForm,motionName); + std::cout << "Service: "<< serviceName<< " is activate" << std::endl; + motionStatus = 1; + } + return motionStatus; + } + + unitree::robot::ChannelPublisherPtr + lowcmd_publisher_; + unitree::robot::ChannelSubscriberPtr + lowstate_subscriber_; + + DataBuffer motor_state_buffer_; + DataBuffer motor_command_buffer_; + DataBuffer base_state_buffer_; + + std::shared_ptr msc; + + // control params + float kp_low_ = 60.f; + float kp_high_ = 200.f; + float kd_low_ = 1.5f; + float kd_high_ = 5.f; + + float control_dt_ = 0.01f; + + float hip_pitch_init_pos_ = -0.5f; + float knee_init_pos_ = 1.f; + float ankle_init_pos_ = -0.5f; + float shoulder_pitch_init_pos_ = 0.4f; + + float time_ = 0.f; + float init_duration_ = 10.f; + + float report_dt_ = 0.1f; + + // multithreading + unitree::common::ThreadPtr command_writer_ptr_; + unitree::common::ThreadPtr control_thread_ptr_; + unitree::common::ThreadPtr report_rpy_ptr_; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/motors.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/motors.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8245b8251789d6531361b21ad53d42462d5f574e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/h1/low_level/motors.hpp @@ -0,0 +1,75 @@ +#pragma once + +#include +#include + +#include + +constexpr int kNumMotors = 20; + +struct MotorCommand { + std::array q_ref = {}; + std::array dq_ref = {}; + std::array kp = {}; + std::array kd = {}; + std::array tau_ff = {}; +}; + +struct MotorState { + std::array q = {}; + std::array dq = {}; +}; + +enum JointIndex { + // Right leg + kRightHipYaw = 8, + kRightHipRoll = 0, + kRightHipPitch = 1, + kRightKnee = 2, + kRightAnkle = 11, + // Left leg + kLeftHipYaw = 7, + kLeftHipRoll = 3, + kLeftHipPitch = 4, + kLeftKnee = 5, + kLeftAnkle = 10, + + kWaistYaw = 6, + + kNotUsedJoint = 9, + + // Right arm + kRightShoulderPitch = 12, + kRightShoulderRoll = 13, + kRightShoulderYaw = 14, + kRightElbow = 15, + // Left arm + kLeftShoulderPitch = 16, + kLeftShoulderRoll = 17, + kLeftShoulderYaw = 18, + kLeftElbow = 19, + +}; + +uint32_t Crc32Core(uint32_t *ptr, uint32_t len) { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) { + if (CRC32 & 0x80000000) { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } else + CRC32 <<= 1; + if (data & xbit) + CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..95d5e831eaf445ec64112fe665eec63ac140bc1a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/CMakeLists.txt @@ -0,0 +1,11 @@ +add_executable(test_publisher + publisher.cpp + HelloWorldData.cpp +) +target_link_libraries(test_publisher unitree_sdk2) + +add_executable(test_subscriber + subscriber.cpp + HelloWorldData.cpp +) +target_link_libraries(test_subscriber unitree_sdk2) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01e8b09c8e0cee9ace4f97b613f67e15bc4e4fac --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.cpp @@ -0,0 +1,54 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: HelloWorldData.idl + Source: HelloWorldData.cpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#include "HelloWorldData.hpp" + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::HelloWorldData::Msg>() { + static thread_local std::mutex mtx; + static thread_local propvec props; + static thread_local entity_properties_t *props_end = nullptr; + static thread_local std::atomic_bool initialized {false}; + key_endpoint keylist; + if (initialized.load(std::memory_order_relaxed)) { + auto ptr = props.data(); + while (ptr < props_end) + (ptr++)->is_present = false; + return props; + } + std::lock_guard lock(mtx); + if (initialized.load(std::memory_order_relaxed)) { + auto ptr = props.data(); + while (ptr < props_end) + (ptr++)->is_present = false; + return props; + } + props.clear(); + + props.push_back(entity_properties_t(0, 0, false, bb_unset, extensibility::ext_final)); //root + props.push_back(entity_properties_t(1, 0, false, get_bit_bound(), extensibility::ext_final, false)); //::userID + props.push_back(entity_properties_t(1, 1, false, bb_unset, extensibility::ext_final, false)); //::message + + entity_properties_t::finish(props, keylist); + props_end = props.data() + props.size(); + initialized.store(true, std::memory_order_release); + return props; +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.hpp new file mode 100644 index 0000000000000000000000000000000000000000..14c46d6f0444e04336fb9a849e076ebb5f0666c2 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/HelloWorldData.hpp @@ -0,0 +1,300 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: HelloWorldData.idl + Source: HelloWorldData.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_HELLOWORLDDATA_HPP +#define DDSCXX_HELLOWORLDDATA_HPP + +#include +#include + +namespace HelloWorldData +{ +class Msg +{ +private: + int64_t userID_ = 0; + std::string message_; + +public: + Msg() = default; + + explicit Msg( + int64_t userID, + const std::string& message) : + userID_(userID), + message_(message) { } + + int64_t userID() const { return this->userID_; } + int64_t& userID() { return this->userID_; } + void userID(int64_t _val_) { this->userID_ = _val_; } + const std::string& message() const { return this->message_; } + std::string& message() { return this->message_; } + void message(const std::string& _val_) { this->message_ = _val_; } + void message(std::string&& _val_) { this->message_ = _val_; } + + bool operator==(const Msg& _other) const + { + (void) _other; + return userID_ == _other.userID_ && + message_ == _other.message_; + } + + bool operator!=(const Msg& _other) const + { + return !(*this == _other); + } + +}; + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::HelloWorldData::Msg>::getTypeName() +{ + return "HelloWorldData::Msg"; +} + +template <> constexpr bool TopicTraits<::HelloWorldData::Msg>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::HelloWorldData::Msg>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::HelloWorldData::Msg>::type_map_blob_sz() { return 246; } +template<> constexpr unsigned int TopicTraits<::HelloWorldData::Msg>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::HelloWorldData::Msg>::type_map_blob() { + static const uint8_t blob[] = { + 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xc6, 0x4e, 0xc8, 0x69, 0x45, 0x24, 0x37, + 0x97, 0x71, 0x0e, 0x16, 0xea, 0x09, 0x7f, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x58, 0x5c, 0x95, 0x70, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x78, 0xe7, 0x31, 0x02, + 0x7a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x70, 0xc8, 0x44, 0xb4, 0xff, 0x08, 0x3b, + 0x24, 0x1e, 0x92, 0xa7, 0x08, 0x93, 0x7e, 0x00, 0x62, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x4d, 0x73, 0x67, 0x00, + 0x3a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x70, 0xc8, 0x44, 0xb4, 0xff, 0x08, 0x3b, + 0x24, 0x1e, 0x92, 0xa7, 0x08, 0x93, 0x7e, 0xf1, 0xc6, 0x4e, 0xc8, 0x69, 0x45, 0x24, 0x37, 0x97, + 0x71, 0x0e, 0x16, 0xea, 0x09, 0x7f, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::HelloWorldData::Msg>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc6, 0x4e, 0xc8, 0x69, 0x45, 0x24, 0x37, 0x97, 0x71, 0x0e, 0x16, + 0xea, 0x09, 0x7f, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x70, 0xc8, 0x44, 0xb4, 0xff, 0x08, 0x3b, 0x24, 0x1e, 0x92, 0xa7, + 0x08, 0x93, 0x7e, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::HelloWorldData::Msg> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::HelloWorldData::Msg>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::HelloWorldData::Msg) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::HelloWorldData::Msg>(); + +template::value, bool> = true > +bool write(T& streamer, const ::HelloWorldData::Msg& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.userID())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.message(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::HelloWorldData::Msg& instance, bool as_key) { + auto &props = get_type_props<::HelloWorldData::Msg>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::HelloWorldData::Msg& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.userID())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.message(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::HelloWorldData::Msg& instance, bool as_key) { + auto &props = get_type_props<::HelloWorldData::Msg>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::HelloWorldData::Msg& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.userID())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.message(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::HelloWorldData::Msg& instance, bool as_key) { + auto &props = get_type_props<::HelloWorldData::Msg>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::HelloWorldData::Msg& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.userID())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.message(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::HelloWorldData::Msg& instance, bool as_key) { + auto &props = get_type_props<::HelloWorldData::Msg>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_HELLOWORLDDATA_HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/publisher.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/publisher.cpp new file mode 100644 index 0000000000000000000000000000000000000000..184f65f18b32a7417018d986757904fa9eb3429d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/publisher.cpp @@ -0,0 +1,25 @@ +#include +#include +#include "HelloWorldData.hpp" + +#define TOPIC "TopicHelloWorld" + +using namespace unitree::robot; +using namespace unitree::common; + +int main() +{ + ChannelFactory::Instance()->Init(0); + ChannelPublisher publisher(TOPIC); + + publisher.InitChannel(); + + while (true) + { + HelloWorldData::Msg msg(unitree::common::GetCurrentTimeMillisecond(), "HelloWorld."); + publisher.Write(msg); + sleep(1); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/subscriber.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/subscriber.cpp new file mode 100644 index 0000000000000000000000000000000000000000..75b6e3e8416d2446340d970a1da40c565d7cfcc5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/helloworld/subscriber.cpp @@ -0,0 +1,45 @@ +#include +#include +#include "HelloWorldData.hpp" + +#define TOPIC "TopicHelloWorld" + +using namespace unitree::robot; +using namespace unitree::common; + +void Handler(const void* msg) +{ + const HelloWorldData::Msg* pm = (const HelloWorldData::Msg*)msg; + + std::cout << "userID:" << pm->userID() << ", message:" << pm->message() << std::endl; +} + +int main() +{ + ChannelFactory::Instance()->Init(0); + ChannelSubscriber subscriber(TOPIC); + subscriber.InitChannel(Handler); + + sleep(5); + subscriber.CloseChannel(); + + std::cout << "reseted. sleep 3" << std::endl; + + sleep(3); + subscriber.InitChannel(); + + sleep(5); + subscriber.CloseChannel(); + + std::cout << "reseted. sleep 3" << std::endl; + + sleep(3); + subscriber.InitChannel(); + + while (true) + { + sleep(10); + } + + return 0; +} diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..d12f978ec99cd5a95a47e86e7ac6456f5d074b92 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(test_jsonize test_jsonize.cpp) +target_link_libraries(test_jsonize unitree_sdk2) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/test_jsonize.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/test_jsonize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20ef16fcc832cbcb5f213946533f7590bd367a7f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/jsonize/test_jsonize.cpp @@ -0,0 +1,86 @@ +#include + +namespace unitree +{ +namespace common +{ +class Test : public Jsonize +{ +public: + Test() : x(0), y(0), z(0) + {} + + void fromJson(JsonMap& json) + { + FromJson(json["x"], x); + FromJson(json["y"], y); + FromJson(json["z"], z); + } + + void toJson(JsonMap& json) const + { + ToJson(x, json["x"]); + ToJson(y, json["y"]); + ToJson(z, json["z"]); + } + +public: + int x; + int y; + int z; +}; +} +} + +using namespace unitree::common; + +int main() +{ + std::vector vec; + + Test t1; + t1.x = 1; + t1.y = 2; + t1.z = 3; + + vec.push_back(t1); + + Test t2; + t2.x = 10; + t2.y = 20; + t2.z = 30; + + vec.push_back(t2); + + Test t3; + t3.x = 100; + t3.y = 200; + t3.z = 300; + + vec.push_back(t3); + + std::string s = ToJsonString(vec); + + std::cout << "s=" << s << std::endl; + + std::vector vec2; + FromJsonString(s, vec2); + + size_t i, size = vec2.size(); + for (i=0; i +#include + +namespace unitree::common +{ + class ExampleCfg : public Jsonize + { + public: + ExampleCfg() : kp(0), kd(0), dt(0) + { + } + + void fromJson(JsonMap &json) + { + FromJson(json["kp"], kp); + FromJson(json["kd"], kd); + FromJson(json["dt"], dt); + FromAny(json["init_pos"], init_pos); + } + + void toJson(JsonMap &json) const + { + ToJson(kp, json["kp"]); + ToJson(kd, json["kd"]); + ToJson(dt, json["dt"]); + ToAny(init_pos, json["init_pos"]); + } + + float kp; + float kd; + float dt; + + std::vector init_pos; + }; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/comm.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/comm.h new file mode 100644 index 0000000000000000000000000000000000000000..20fc287c537907d811e4f8f286065560396f55b0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/comm.h @@ -0,0 +1,233 @@ +/***************************************************************** + Copyright (c) 2020, Unitree Robotics.Co.Ltd. All rights reserved. +******************************************************************/ + +#ifndef _UNITREE_LEGGED_COMM_H_ +#define _UNITREE_LEGGED_COMM_H_ + +#include +#include + +namespace UNITREE_LEGGED_SDK +{ + + constexpr int HIGHLEVEL = 0xee; + constexpr int LOWLEVEL = 0xff; + constexpr int TRIGERLEVEL = 0xf0; + constexpr double PosStopF = (2.146E+9f); + constexpr double VelStopF = (16000.0f); + extern const int HIGH_CMD_LENGTH; // sizeof(HighCmd) + extern const int HIGH_STATE_LENGTH; // sizeof(HighState) + extern const int LOW_CMD_LENGTH; // shorter than sizeof(LowCmd), bytes compressed LowCmd length + extern const int LOW_STATE_LENGTH; // shorter than sizeof(LowState), bytes compressed LowState length + +#pragma pack(1) + + typedef struct + { + uint8_t off; // off 0xA5 + std::array reserve; + } BmsCmd; + + typedef struct + { + uint8_t version_h; + uint8_t version_l; + uint8_t bms_status; + uint8_t SOC; // SOC 0-100% + int32_t current; // mA + uint16_t cycle; + std::array BQ_NTC; // x1 degrees centigrade + std::array MCU_NTC; // x1 degrees centigrade + std::array cell_vol; // cell voltage mV + // std::array BQ_NTC; // x1 degrees centigrade + // std::array MCU_NTC; // x1 degrees centigrade + // std::array cell_vol; // cell voltage mV + } BmsState; + + typedef struct + { + float x; + float y; + float z; + } Cartesian; + + typedef struct + { + std::array quaternion; // quaternion, normalized, (w,x,y,z) + std::array gyroscope; // angular velocity (unit: rad/s) (raw data) + std::array accelerometer; // m/(s2) (raw data) + std::array rpy; // euler angle(unit: rad) + int8_t temperature; + } IMU; // when under accelerated motion, the attitude of the robot calculated by IMU will drift. + + typedef struct + { + uint8_t r; + uint8_t g; + uint8_t b; + } LED; // foot led brightness: 0~255 + + typedef struct + { + uint8_t mode; // motor working mode + float q; // current angle (unit: radian) + float dq; // current velocity (unit: radian/second) + float ddq; // current acc (unit: radian/second*second) + float tauEst; // current estimated output torque (unit: N.m) + float q_raw; // current angle (unit: radian) + float dq_raw; // current velocity (unit: radian/second) + float ddq_raw; + int8_t temperature; // current temperature (temperature conduction is slow that leads to lag) + uint32_t lost; + std::array reserve; + } MotorState; // motor feedback + + typedef struct + { + uint8_t mode; // desired working mode + float q; // desired angle (unit: radian) + float dq; // desired velocity (unit: radian/second) + float tau; // desired output torque (unit: N.m) + float Kp; // desired position stiffness (unit: N.m/rad ) + float Kd; // desired velocity stiffness (unit: N.m/(rad/s) ) + std::array reserve; + } MotorCmd; // motor control + + typedef struct + { + std::array head; + uint8_t levelFlag; + uint8_t frameReserve; + + std::array SN; + std::array version; + uint16_t bandWidth; + IMU imu; + std::array motorState; + BmsState bms; + std::array footForce; // force sensors + std::array footForceEst; // force sensors + uint32_t tick; // reference real-time from motion controller (unit: us) + std::array wirelessRemote; // wireless commands + uint8_t bitFlag; + float adcReel; // add for Go2 + int8_t temperatureNTC1; // add for Go2 + int8_t temperatureNTC2; // add for Go2 + float powerV; + float powerA; + std::array fanFrequency; // add for Go2 + uint32_t reserve; + + uint32_t crc; + } LowState; // low level feedback + + typedef struct + { + std::array head; + uint8_t levelFlag; + uint8_t frameReserve; + + std::array SN; + std::array version; + uint16_t bandWidth; + std::array motorCmd; + BmsCmd bms; + std::array wirelessRemote; + std::array led; + std::array fan; + uint8_t gpio; + uint32_t reserve; + + uint32_t crc; + } LowCmd; // low level control + + + typedef struct + { + std::array head; + uint8_t levelFlag; + uint8_t frameReserve; + + std::array SN; + std::array version; + uint16_t bandWidth; + IMU imu; + std::array motorState; + BmsState bms; + std::array footForce; + std::array footForceEst; + uint8_t mode; + float progress; + uint8_t gaitType; // 0.idle 1.trot 2.trot running 3.climb stair 4.trot obstacle + float footRaiseHeight; // (unit: m, default: 0.08m), foot up height while walking + std::array position; // (unit: m), from own odometry in inertial frame, usually drift + float bodyHeight; // (unit: m, default: 0.28m), + std::array velocity; // (unit: m/s), forwardSpeed, sideSpeed, rotateSpeed in body frame + float yawSpeed; // (unit: rad/s), rotateSpeed in body frame + std::array rangeObstacle; + std::array footPosition2Body; // foot position relative to body + std::array footSpeed2Body; // foot speed relative to body + std::array wirelessRemote; + uint32_t reserve; + + uint32_t crc; + } HighState; // high level feedback + + typedef struct + { + std::array head; + uint8_t levelFlag; + uint8_t frameReserve; + + std::array SN; + std::array version; + uint16_t bandWidth; + uint8_t mode; // 0. idle, default stand 1. force stand (controlled by dBodyHeight + ypr) + // 2. target velocity walking (controlled by velocity + yawSpeed) + // 3. target position walking (controlled by position + ypr[0]) + // 4. path mode walking (reserve for future release) + // 5. position stand down. + // 6. position stand up + // 7. damping mode + // 8. recovery stand + // 9. backflip + // 10. jumpYaw + // 11. straightHand + // 12. dance1 + // 13. dance2 + + uint8_t gaitType; // 0.idle 1.trot 2.trot running 3.climb stair 4.trot obstacle + uint8_t speedLevel; // 0. default low speed. 1. medium speed 2. high speed. during walking, only respond MODE 3 + float footRaiseHeight; // (unit: m, default: 0.08m), foot up height while walking, delta value + float bodyHeight; // (unit: m, default: 0.28m), delta value + std::array position; // (unit: m), desired position in inertial frame + std::array euler; // (unit: rad), roll pitch yaw in stand mode + std::array velocity; // (unit: m/s), forwardSpeed, sideSpeed in body frame + float yawSpeed; // (unit: rad/s), rotateSpeed in body frame + std::array dComXy; + std::array dstandFootXy; + BmsCmd bms; + std::array led; + std::array wirelessRemote; + uint32_t reserve; + + uint32_t crc; + } HighCmd; // high level control + +#pragma pack() + + typedef struct + { + unsigned long long TotalCount; // total loop count + unsigned long long SendCount; // total send count + unsigned long long RecvCount; // total receive count + unsigned long long SendError; // total send error + unsigned long long FlagError; // total flag error + unsigned long long RecvCRCError; // total reveive CRC error + unsigned long long RecvLoseError; // total lose package count + } UDPState; // UDP communication state + +} + +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/conversion.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/conversion.hpp new file mode 100644 index 0000000000000000000000000000000000000000..29ba8424f00989e1d603ff783d4e9b3c8b497be3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/conversion.hpp @@ -0,0 +1,89 @@ +#pragma once + +#include + +#include "comm.h" +#include "unitree/idl/go2/LowCmd_.hpp" + +namespace unitree::common +{ + + void motorCmd2Dds(UNITREE_LEGGED_SDK::MotorCmd *raw, std::array &dds) + { + for (int i = 0; i < 20; i++) + { + dds[i].mode(raw[i].mode); + dds[i].q(raw[i].q); + dds[i].dq(raw[i].dq); + dds[i].tau(raw[i].tau); + dds[i].kp(raw[i].Kp); + dds[i].kd(raw[i].Kd); + + memcpy(&dds[i].reserve()[0], &raw[i].reserve[0], 12); + } + }; + + void bmsCmd2Dds(UNITREE_LEGGED_SDK::BmsCmd &raw, unitree_go::msg::dds_::BmsCmd_ &dds) + { + dds.off(raw.off); + + memcpy(&dds.reserve()[0], &raw.reserve[0], 3); + }; + + uint32_t crc32_core(uint32_t *ptr, uint32_t len) + { + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + CRC32 <<= 1; + if (data & xbit) + CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; + }; + + void lowCmd2Dds(UNITREE_LEGGED_SDK::LowCmd &raw, unitree_go::msg::dds_::LowCmd_ &dds) + { + // with crc + memcpy(&dds.head()[0], &raw.head[0], 2); + + dds.level_flag(raw.levelFlag); + dds.frame_reserve(raw.frameReserve); + + memcpy(&dds.sn()[0], &raw.SN[0], 8); + memcpy(&dds.version()[0], &raw.version[0], 8); + + dds.bandwidth(raw.bandWidth); + + motorCmd2Dds(&raw.motorCmd[0], dds.motor_cmd()); + bmsCmd2Dds(raw.bms, dds.bms_cmd()); + + memcpy(&dds.wireless_remote()[0], &raw.wirelessRemote[0], 40); + + memcpy(&dds.led()[0], &raw.led[0], 12); // go2 + memcpy(&dds.fan()[0], &raw.fan[0], 2); + dds.gpio(raw.gpio); // go2 + + dds.reserve(raw.reserve); + + raw.crc = crc32_core((uint32_t *)&raw, (sizeof(raw) >> 2) - 1); + + dds.crc(raw.crc); + }; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/gamepad.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/gamepad.hpp new file mode 100644 index 0000000000000000000000000000000000000000..41910b7c86fccf087360733a9aa638eb23e6984d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/gamepad.hpp @@ -0,0 +1,128 @@ +#pragma once + +#include + +namespace unitree::common +{ + + // bytecode mapping for raw joystick data + // 16b + typedef union + { + struct + { + uint8_t R1 : 1; + uint8_t L1 : 1; + uint8_t start : 1; + uint8_t select : 1; + uint8_t R2 : 1; + uint8_t L2 : 1; + uint8_t F1 : 1; + uint8_t F2 : 1; + uint8_t A : 1; + uint8_t B : 1; + uint8_t X : 1; + uint8_t Y : 1; + uint8_t up : 1; + uint8_t right : 1; + uint8_t down : 1; + uint8_t left : 1; + } components; + uint16_t value; + } xKeySwitchUnion; + + // 40 Byte (now used 24B) + typedef struct + { + uint8_t head[2]; + xKeySwitchUnion btn; + float lx; + float rx; + float ry; + float L2; + float ly; + + uint8_t idle[16]; + } xRockerBtnDataStruct; + + typedef union + { + xRockerBtnDataStruct RF_RX; + uint8_t buff[40]; + } REMOTE_DATA_RX; + + class Button + { + public: + Button() {} + + void update(bool state) + { + on_press = state ? state != pressed : false; + on_release = state ? false : state != pressed; + pressed = state; + } + + bool pressed = false; + bool on_press = false; + bool on_release = false; + }; + + class Gamepad + { + public: + Gamepad() {} + + void update(xRockerBtnDataStruct &key_data) + { + lx = lx * (1 - smooth) + (std::fabs(key_data.lx) < dead_zone ? 0.0 : key_data.lx) * smooth; + rx = rx * (1 - smooth) + (std::fabs(key_data.rx) < dead_zone ? 0.0 : key_data.rx) * smooth; + ry = ry * (1 - smooth) + (std::fabs(key_data.ry) < dead_zone ? 0.0 : key_data.ry) * smooth; + l2 = l2 * (1 - smooth) + (std::fabs(key_data.L2) < dead_zone ? 0.0 : key_data.L2) * smooth; + ly = ly * (1 - smooth) + (std::fabs(key_data.ly) < dead_zone ? 0.0 : key_data.ly) * smooth; + + R1.update(key_data.btn.components.R1); + L1.update(key_data.btn.components.L1); + start.update(key_data.btn.components.start); + select.update(key_data.btn.components.select); + R2.update(key_data.btn.components.R2); + L2.update(key_data.btn.components.L2); + F1.update(key_data.btn.components.F1); + F2.update(key_data.btn.components.F2); + A.update(key_data.btn.components.A); + B.update(key_data.btn.components.B); + X.update(key_data.btn.components.X); + Y.update(key_data.btn.components.Y); + up.update(key_data.btn.components.up); + right.update(key_data.btn.components.right); + down.update(key_data.btn.components.down); + left.update(key_data.btn.components.left); + } + + float lx = 0.; + float rx = 0.; + float ry = 0.; + float l2 = 0.; + float ly = 0.; + + float smooth = 0.03; + float dead_zone = 0.01; + + Button R1; + Button L1; + Button start; + Button select; + Button R2; + Button L2; + Button F1; + Button F2; + Button A; + Button B; + Button X; + Button Y; + Button up; + Button right; + Button down; + Button left; + }; +} // namespace unitree::common \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/main.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1d1a823fa0e871f6a702386a4115ab45b6357e7c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/main.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "robot_controller.hpp" +#include "user_controller.hpp" +#include "robot_interface.hpp" + +using namespace unitree::common; +using namespace unitree::robot; + +namespace fs = std::filesystem; + +int main(int argc, char const *argv[]) +{ + std::string param_folder; + + // parse command line params + for (int i = 1; i < argc; ++i) + { + std::string arg = argv[i]; + + if (arg == "--param" && i + 1 < argc) + { + param_folder = argv[i + 1]; + } + } + fs::path param = fs::current_path() / param_folder; + + // log + auto now = std::chrono::system_clock::now(); + auto time = std::chrono::system_clock::to_time_t(now); + std::stringstream ss; + ss << std::put_time(std::localtime(&time), "%Y_%m_%d_%H_%M_%S"); + + fs::path log_folder = fs::current_path() / "logs" / ss.str(); + fs::create_directories(log_folder); + + std::ofstream cfg_file(log_folder / "cfg.txt"); + cfg_file << "param_folder: " << param << std::endl; + cfg_file.close(); + + fs::path log_file_name = log_folder / "log.txt"; + + RobotController robot_controller(log_file_name); + robot_controller.LoadParam(param); + + robot_controller.InitDdsModel(); + + robot_controller.StartControl(); + + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/params/params.json b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/params/params.json new file mode 100644 index 0000000000000000000000000000000000000000..5afb30f23c3f4ad072c00da0f5815a8c1830a682 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/params/params.json @@ -0,0 +1,19 @@ +{ + "dt": 0.01, + "kp": 40.0, + "kd": 1.0, + "init_pos": [ + 0.0, + 0.9, + -1.8, + 0.0, + 0.9, + -1.8, + 0.0, + 0.9, + -1.8, + 0.0, + 0.9, + -1.8 + ] +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_controller.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_controller.hpp new file mode 100644 index 0000000000000000000000000000000000000000..47983b133be7348323762a2353b3552e3683317d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_controller.hpp @@ -0,0 +1,318 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "unitree/idl/go2/LowState_.hpp" +#include "unitree/idl/go2/LowCmd_.hpp" +#include "unitree/common/thread/thread.hpp" + +#include "unitree/robot/channel/channel_publisher.hpp" +#include "unitree/robot/channel/channel_subscriber.hpp" +#include "unitree/common/time/time_tool.hpp" + +#include "state_machine.hpp" +#include "gamepad.hpp" +#include "robot_interface.hpp" + +using namespace unitree::common; +using namespace unitree::robot; +namespace fs = std::filesystem; + +#define TOPIC_LOWCMD "rt/lowcmd" +#define TOPIC_LOWSTATE "rt/lowstate" + +template +class RobotController +{ +public: + RobotController() {} + + RobotController(fs::path &log_file_name) + { + // set log file + log_file = std::ofstream(log_file_name, std::ios::binary); + } + + void LoadParam(fs::path ¶m_folder) + { + ctrl.LoadParam(param_folder); + } + + void InitDdsModel(const std::string &networkInterface = "") + { + // init dds + ChannelFactory::Instance()->Init(0, networkInterface); + lowcmd_publisher.reset(new ChannelPublisher(TOPIC_LOWCMD)); + lowstate_subscriber.reset(new ChannelSubscriber(TOPIC_LOWSTATE)); + + lowcmd_publisher->InitChannel(); + lowstate_subscriber->InitChannel(std::bind(&RobotController::LowStateMessageHandler, this, std::placeholders::_1), 1); + } + + void StartControl() + { + // waiting for gamepad command to start the control thread + std::chrono::milliseconds duration(100); + // listen to gamepad command + while (true) + { + std::cout << "Press R2 to start!" << std::endl; + std::this_thread::sleep_for(duration); + + InteprateGamePad(); + if (gamepad.R2.on_press) + { + break; + } + } + + // prepare for start + std::cout << "Start!" << std::endl; + Damping(); + ctrl_dt_micro_sec = static_cast(ctrl.dt * 1000000); + + // Start the control thread + control_thread_ptr = CreateRecurrentThreadEx("ctrl", UT_CPU_ID_NONE, ctrl_dt_micro_sec, &RobotController::ControlStep, this); + + // Start the lowlevel command thread + std::this_thread::sleep_for(duration); + StartSendCmd(); + + // keep the main thread alive + while (true) + { + std::this_thread::sleep_for(duration); + } + } + +protected: + ChannelPublisherPtr lowcmd_publisher; + ChannelSubscriberPtr lowstate_subscriber; + ThreadPtr low_cmd_write_thread_ptr, control_thread_ptr; + unitree_go::msg::dds_::LowCmd_ cmd; + unitree_go::msg::dds_::LowState_ state; + + Gamepad gamepad; + REMOTE_DATA_RX rx; + + SimpleStateMachine state_machine; + USER_CTRL ctrl; + RobotInterface robot_interface; + + std::mutex state_mutex, cmd_mutex; + + std::ofstream log_file; + + uint64_t ctrl_dt_micro_sec = 2000; + + std::vector compute_time; + +private: + + void LowStateMessageHandler(const void *message) + { + state = *(unitree_go::msg::dds_::LowState_ *)message; + { + std::lock_guard lock(state_mutex); + robot_interface.GetState(state); + } + } + + void InteprateGamePad() + { + // update gamepad + memcpy(rx.buff, &state.wireless_remote()[0], 40); + gamepad.update(rx.RF_RX); + } + + void LowCmdwriteHandler() + { + // write low-level command + { + std::lock_guard lock(cmd_mutex); + lowcmd_publisher->Write(cmd); + } + } + + void StartSendCmd() + { + low_cmd_write_thread_ptr = CreateRecurrentThreadEx("writebasiccmd", UT_CPU_ID_NONE, 2000, &RobotController::LowCmdwriteHandler, this); + } + + void UpdateStateMachine() + { + // R2 -> Stand + // A -> Ctrl + // L2 + B -> Stop + if (gamepad.R2.on_press) + { + if (state_machine.Stand()) + { + StandCallback(); + } + } + if (gamepad.A.on_press) + { + if (state_machine.Ctrl()) + { + CtrlCallback(); + } + } + if (gamepad.L2.pressed && gamepad.B.pressed) + { + state_machine.Stop(); + } + } + + void ControlStep() + { + // main loop + + // update state + InteprateGamePad(); + UpdateStateMachine(); + + // select control modes according to the state machine + auto start = std::chrono::high_resolution_clock::now(); + if (state_machine.state == STATES::STAND) + { + Standing(); + } + if (state_machine.state == STATES::DAMPING) + { + Damping(); + } + if (state_machine.state == STATES::CTRL) + { + UserControlStep(true); + if (CheckTermination()) + { + state_machine.Stop(); + } + } + + // update low-level command + { + std::lock_guard lock(cmd_mutex); + robot_interface.SetCommand(cmd); + } + + auto stop = std::chrono::high_resolution_clock::now(); + auto duration = std::chrono::duration_cast(stop - start); + compute_time.push_back(duration.count() / 1000.); + + // write log + WriteLog(); + + if (compute_time.size() == 100) + { + float sum = 0; + for (auto &t : compute_time) + { + sum += t; + } + std::cout << "Performance: mean: " << sum / 100 + << " ms; max: " << *std::max_element(compute_time.begin(), compute_time.end()) + << " ms; min: " << *std::min_element(compute_time.begin(), compute_time.end()) + << "ms." << std::endl; + + compute_time.clear(); + + std::cout << "Current State: " << static_cast(state_machine.state) << std::endl; + } + } + + void WriteLog() + { + if (log_file.is_open()) + { + auto log = ctrl.GetLog(); + for (const auto &v : log) + { + log_file << v << " "; + } + log_file << std::endl; + } + } + + void StandCallback() + { + robot_interface.jpos_des = ctrl.init_pos; + robot_interface.jvel_des.fill(0.); + robot_interface.kp.fill(ctrl.kp * state_machine.pd_ratio); + robot_interface.kd.fill(ctrl.kd * state_machine.pd_ratio); + robot_interface.tau_ff.fill(0.); + } + + void CtrlCallback() + { + ctrl.Reset(robot_interface, gamepad); + + robot_interface.jpos_des = ctrl.init_pos; + robot_interface.jvel_des.fill(0.); + robot_interface.kp.fill(ctrl.kp); + robot_interface.kd.fill(ctrl.kd); + robot_interface.tau_ff.fill(0.); + } + + void Damping(float kd = 2.0) + { + robot_interface.jpos_des = ctrl.init_pos; + robot_interface.jvel_des.fill(0.); + robot_interface.kp.fill(0.); + robot_interface.kd.fill(kd); + robot_interface.tau_ff.fill(0.); + } + + void Standing(float kp = 40.0, float kd = 1.0) + { + if (gamepad.R2.pressed) + { + state_machine.Standing(true); + } + if (gamepad.R1.pressed) + { + state_machine.Standing(false); + } + + UserControlStep(false); + + robot_interface.kp.fill(kp * state_machine.pd_ratio); + robot_interface.kd.fill(kd * state_machine.pd_ratio); + } + + void UserControlStep(bool send = true) + { + { + std::lock_guard lock(state_mutex); + ctrl.GetInput(robot_interface, gamepad); + } + ctrl.Calculate(); + + if (send) + { + robot_interface.jpos_des = ctrl.jpos_des; + } + } + + bool CheckTermination() + { + if (robot_interface.projected_gravity.at(2) > 0) + { + return true; + } + return false; + } +}; diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_interface.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_interface.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b19ff62b54f6d84dc9ac426ed08944aabeb0d50f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/robot_interface.hpp @@ -0,0 +1,130 @@ +#pragma once + +#include +#include + +#include "comm.h" +#include "unitree/idl/go2/LowState_.hpp" +#include "unitree/idl/go2/LowCmd_.hpp" +#include "conversion.hpp" + +namespace unitree::common +{ + + constexpr double PosStopF = (2.146E+9f); + constexpr double VelStopF = (16000.0f); + + class BasicRobotInterface + { + public: + BasicRobotInterface() + { + jpos_des.fill(0.); + jvel_des.fill(0.); + kp.fill(0.); + kd.fill(0.); + tau_ff.fill(0.); + projected_gravity.fill(0.); + projected_gravity.at(2) = -1.0; + } + + void GetState(unitree_go::msg::dds_::LowState_ &state) + { + // imu + const unitree_go::msg::dds_::IMUState_ &imu = state.imu_state(); + quat = imu.quaternion(); + rpy = imu.rpy(); + gyro = imu.gyroscope(); + UpdateProjectedGravity(); + + // motor + const std::array &motor = state.motor_state(); + for (size_t i = 0; i < 12; ++i) + { + const unitree_go::msg::dds_::MotorState_ &m = motor.at(i); + jpos.at(i) = m.q(); + jvel.at(i) = m.dq(); + tau.at(i) = m.tau_est(); + } + } + + virtual void SetCommand(unitree_go::msg::dds_::LowCmd_ &cmd) = 0; + + std::array jpos, jvel, tau; + std::array quat; + std::array rpy, gyro, projected_gravity; + std::array jpos_des, jvel_des, kp, kd, tau_ff; + + private: + inline void UpdateProjectedGravity() + { + // inverse quat + float w = quat.at(0); + float x = -quat.at(1); + float y = -quat.at(2); + float z = -quat.at(3); + + float x2 = x * x; + float y2 = y * y; + float z2 = z * z; + float w2 = w * w; + float xy = x * y; + float xz = x * z; + float yz = y * z; + float wx = w * x; + float wy = w * y; + float wz = w * z; + + projected_gravity.at(0) = -2 * (xz + wy); + projected_gravity.at(1) = -2 * (yz - wx); + projected_gravity.at(2) = -(w2 - x2 - y2 + z2); + } + }; + + class RobotInterface : public BasicRobotInterface + { + public: + RobotInterface() : BasicRobotInterface() + { + InitLowCmd(); + } + + void SetCommand(unitree_go::msg::dds_::LowCmd_ &cmd) + { + + for (int i = 0; i < 12; ++i) + { + low_cmd.motor_cmd()[i].q() = jpos_des.at(i); + low_cmd.motor_cmd()[i].dq() = jvel_des.at(i); + low_cmd.motor_cmd()[i].kp() = kp.at(i); + low_cmd.motor_cmd()[i].kd() = kd.at(i); + low_cmd.motor_cmd()[i].tau() = tau_ff.at(i); + } + + low_cmd.crc() = crc32_core((uint32_t *)&low_cmd, (sizeof(unitree_go::msg::dds_::LowCmd_)>>2)-1); + // lowCmd2Dds(low_cmd_raw, cmd); + cmd = low_cmd; + } + + private: + void InitLowCmd() + { + low_cmd.head()[0] = 0xFE; + low_cmd.head()[1] = 0xEF; + low_cmd.level_flag() = 0xFF; + low_cmd.gpio() = 0; + + for(int i=0; i<20; i++) + { + low_cmd.motor_cmd()[i].mode() = (0x01); // motor switch to servo (PMSM) mode + low_cmd.motor_cmd()[i].q() = (PosStopF); + low_cmd.motor_cmd()[i].kp() = (0); + low_cmd.motor_cmd()[i].dq() = (VelStopF); + low_cmd.motor_cmd()[i].kd() = (0); + low_cmd.motor_cmd()[i].tau() = (0); + } + } + + unitree_go::msg::dds_::LowCmd_ low_cmd; + }; +} // namespace unitree::common \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/state_machine.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/state_machine.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e716c30f79057269806a7bfd2d37079993757b63 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/state_machine.hpp @@ -0,0 +1,72 @@ +#pragma once + +#include + +namespace unitree::common +{ + enum class STATES + { + DAMPING = 0, + STAND = 1, + CTRL = 2 + }; + + class SimpleStateMachine + { + public: + SimpleStateMachine(double pd_ratio_init = 0.1, double delta_pd = 0.005) : state(STATES::STAND), pd_ratio(pd_ratio_init), delta_pd(delta_pd) {} + + bool Stop() + { + state = STATES::DAMPING; + pd_ratio = 0.0; + return true; + } + + bool Stand() + { + if (state == STATES::DAMPING || state == STATES::CTRL) + { + state = STATES::STAND; + return true; + } + else + { + return false; + } + } + + bool Ctrl() + { + if (state == STATES::STAND && pd_ratio > 0.95) + { + state = STATES::CTRL; + return true; + } + else + { + return false; + } + } + + void Standing(bool up = true) + { + if (state == STATES::STAND) + { + if (up) + { + pd_ratio += delta_pd; + } + else + { + pd_ratio -= delta_pd; + } + pd_ratio = std::max(0.0, std::min(1.0, pd_ratio)); + } + } + + STATES state; + double pd_ratio; + double delta_pd; + }; +} // namespace unitree diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/user_controller.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/user_controller.hpp new file mode 100644 index 0000000000000000000000000000000000000000..eaf420be3c462b6126771f9da2f1b53ccd98f178 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/state_machine/user_controller.hpp @@ -0,0 +1,122 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include "robot_interface.hpp" +#include "gamepad.hpp" +#include "cfg.hpp" + +namespace fs = std::filesystem; + +namespace unitree::common +{ + class BasicUserController + { + public: + BasicUserController() {} + + virtual void LoadParam(fs::path ¶m_folder) = 0; + + virtual void Reset(RobotInterface &robot_interface, Gamepad &gamepad) = 0; + + virtual void GetInput(RobotInterface &robot_interface, Gamepad &gamepad) = 0; + + virtual void Calculate() = 0; + + virtual std::vector GetLog() = 0; + + float dt, kp, kd; + std::array init_pos; + std::array jpos_des; + }; + + class ExampleUserController : public BasicUserController + { + public: + ExampleUserController() {} + + void LoadParam(fs::path ¶m_folder) + { + // load param file + std::ifstream cfg_file(param_folder / "params.json"); + std::cout << "Read params from: " << param_folder / "params.json" << std::endl; + std::stringstream ss; + ss << cfg_file.rdbuf(); + FromJsonString(ss.str(), cfg); + + // get data from json + dt = cfg.dt; + kp = cfg.kp; + kd = cfg.kd; + for (int i = 0; i < 12; ++i) + { + init_pos.at(i) = cfg.init_pos.at(i); + } + } + + void GetInput(RobotInterface &robot_interface, Gamepad &gamepad) + { + // save necessary data from input + + // record command + cmd.at(0) = gamepad.ly; + cmd.at(1) = -gamepad.lx; + cmd.at(2) = -gamepad.rx; + + // record robot state + for (int i = 0; i < 12; ++i) + { + jpos_processed.at(i) = robot_interface.jpos.at(i) - init_pos.at(i); + jvel_processed.at(i) = robot_interface.jvel.at(i) / 2.0; + } + } + + void Reset(RobotInterface &robot_interface, Gamepad &gamepad) + { + GetInput(robot_interface, gamepad); + Calculate(); + } + + void Calculate() + { + // calculate jpos_des + jpos_des = init_pos; + } + + std::vector GetLog() + { + // record input, output and other info into a vector + std::vector log; + for (int i = 0; i < 3; ++i) + { + log.push_back(cmd.at(i)); + } + for (int i = 0; i < 12; ++i) + { + log.push_back(jpos_processed.at(i)); + } + for (int i = 0; i < 12; ++i) + { + log.push_back(jvel_processed.at(i)); + } + for (int i = 0; i < 12; ++i) + { + log.push_back(jpos_des.at(i)); + } + + return log; + } + + // cfg + ExampleCfg cfg; + + // state + std::array cmd; + std::array jpos_processed; + std::array jvel_processed; + }; +} // namespace unitree::common diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..2ff15c9e924e86d4c00f9b6a8653ed1f23c9c7d0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/CMakeLists.txt @@ -0,0 +1,2 @@ +add_executable(advanced_gamepad main.cpp) +target_link_libraries(advanced_gamepad unitree_sdk2) \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/advanced_gamepad.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/advanced_gamepad.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1757f93ac8881ccca0ff8e4f0c0f09ebdfb01456 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/advanced_gamepad.hpp @@ -0,0 +1,116 @@ +#pragma once + +#include +#include +#include "unitree/idl/go2/WirelessController_.hpp" +// #include + +namespace unitree::common +{ + // union for keys + typedef union + { + struct + { + uint8_t R1 : 1; + uint8_t L1 : 1; + uint8_t start : 1; + uint8_t select : 1; + uint8_t R2 : 1; + uint8_t L2 : 1; + uint8_t F1 : 1; + uint8_t F2 : 1; + uint8_t A : 1; + uint8_t B : 1; + uint8_t X : 1; + uint8_t Y : 1; + uint8_t up : 1; + uint8_t right : 1; + uint8_t down : 1; + uint8_t left : 1; + } components; + uint16_t value; + } xKeySwitchUnion; + + // single button class + class Button + { + public: + Button() {} + + void update(bool state) + { + on_press = state ? state != pressed : false; + on_release = state ? false : state != pressed; + pressed = state; + } + + bool pressed = false; + bool on_press = false; + bool on_release = false; + }; + + // full gamepad + class Gamepad + { + public: + Gamepad() {} + + void Update(unitree_go::msg::dds_::WirelessController_ &key_msg) + { + // update stick values with smooth and deadzone + lx = lx * (1 - smooth) + (std::fabs(key_msg.lx()) < dead_zone ? 0.0 : key_msg.lx()) * smooth; + rx = rx * (1 - smooth) + (std::fabs(key_msg.rx()) < dead_zone ? 0.0 : key_msg.rx()) * smooth; + ry = ry * (1 - smooth) + (std::fabs(key_msg.ry()) < dead_zone ? 0.0 : key_msg.ry()) * smooth; + ly = ly * (1 - smooth) + (std::fabs(key_msg.ly()) < dead_zone ? 0.0 : key_msg.ly()) * smooth; + + // update button states + key.value = key_msg.keys(); + + R1.update(key.components.R1); + L1.update(key.components.L1); + start.update(key.components.start); + select.update(key.components.select); + R2.update(key.components.R2); + L2.update(key.components.L2); + F1.update(key.components.F1); + F2.update(key.components.F2); + A.update(key.components.A); + B.update(key.components.B); + X.update(key.components.X); + Y.update(key.components.Y); + up.update(key.components.up); + right.update(key.components.right); + down.update(key.components.down); + left.update(key.components.left); + } + + float smooth = 0.03; + float dead_zone = 0.01; + + float lx = 0.; + float rx = 0.; + float ry = 0.; + float ly = 0.; + + Button R1; + Button L1; + Button start; + Button select; + Button R2; + Button L2; + Button F1; + Button F2; + Button A; + Button B; + Button X; + Button Y; + Button up; + Button right; + Button down; + Button left; + + private: + xKeySwitchUnion key; + }; +} // namespace unitree::common \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/main.cpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0302a13011808da7fe6ea2c9e9c1e13c01b0cf59 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/example/wireless_controller/main.cpp @@ -0,0 +1,108 @@ +#include + +// #include +#include "unitree/idl/go2/WirelessController_.hpp" +#include "unitree/common/thread/thread.hpp" +#include "unitree/robot/channel/channel_subscriber.hpp" + +#include "advanced_gamepad.hpp" + +#define TOPIC_JOYSTICK "rt/wirelesscontroller" + +using namespace unitree::common; +using namespace unitree::robot; + +class GamepadExample +{ +public: + GamepadExample() {} + + // setup dds model + void InitDdsModel(const std::string &networkInterface = "") + { + ChannelFactory::Instance()->Init(0, networkInterface); + joystick_subscriber.reset(new ChannelSubscriber(TOPIC_JOYSTICK)); + + joystick_subscriber->InitChannel(std::bind(&GamepadExample::MessageHandler, this, std::placeholders::_1), 1); + } + + // set gamepad dead_zone parameter + void SetGamepadDeadZone(float deadzone) + { + gamepad.dead_zone = deadzone; + } + + // set gamepad smooth parameter + void setGamepadSmooth(float smooth) + { + gamepad.smooth = smooth; + } + + // callback function to save joystick message + void MessageHandler(const void *message) + { + std::lock_guard lock(joystick_mutex); + joystick_msg = *(unitree_go::msg::dds_::WirelessController_ *)message; + } + + // work thread + void Step() + { + { + std::lock_guard lock(joystick_mutex); + gamepad.Update(joystick_msg); + } + + // some operations + if (gamepad.A.on_press) + { + press_count += 1; + } + + // print gamepad state + std::cout << "lx: " << gamepad.lx << std::endl + << "A: pressed: " << gamepad.A.pressed + << "; on_press: " << gamepad.A.on_press + << "; on_release: " << gamepad.A.on_release + << std::endl << "press count: " << press_count + << std::endl << "===========================" << std::endl; + } + + // start the work thread + void Start() + { + control_thread_ptr = CreateRecurrentThreadEx("nn_ctrl", UT_CPU_ID_NONE, 40000, &GamepadExample::Step, this); + } + +protected: + ChannelSubscriberPtr joystick_subscriber; + unitree_go::msg::dds_::WirelessController_ joystick_msg; + + Gamepad gamepad; + + ThreadPtr control_thread_ptr; + + std::mutex joystick_mutex; + + int press_count = 0; +}; + +int main() +{ + // create example object + GamepadExample example; + + // set gamepad params + example.setGamepadSmooth(0.2); + example.SetGamepadDeadZone(0.5); + + // start program + example.InitDdsModel(); + example.Start(); + + while (1) + { + usleep(20000); + } + return 0; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/any.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/any.hpp new file mode 100644 index 0000000000000000000000000000000000000000..38772520725040707619f0ae8b195cbf538f3187 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/any.hpp @@ -0,0 +1,390 @@ +#ifndef __UT_ANY_HPP__ +#define __UT_ANY_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class Any +{ +public: + Any() + : mContent(0) + {} + + template + Any(const ValueType& value) + : mContent(new Holder(value)) + {} + + Any(const char* s) + : Any(std::string(s)) + {} + + Any(const char* s, size_t len) + : Any(std::string(s, len)) + {} + + Any(const Any& other) + : mContent(other.mContent ? other.mContent->Clone() : 0) + {} + + ~Any() + { + delete mContent; + mContent = 0; + } + + Any& Swap(Any& other) + { + std::swap(mContent, other.mContent); + return *this; + } + + bool Empty() const + { + return mContent == 0; + } + + const std::type_info& GetTypeInfo() const + { + return mContent ? mContent->GetTypeInfo() : typeid(void); + } + + template + Any& operator=(const ValueType& other) + { + Any(other).Swap(*this); + return *this; + } + + Any& operator=(Any other) + { + other.Swap(*this); + return *this; + } + +public: + class PlaceHolder + { + public: + virtual ~PlaceHolder() + {} + + public: + virtual const std::type_info& GetTypeInfo() const = 0; + virtual PlaceHolder* Clone() const = 0; + }; + + template + class Holder : public PlaceHolder + { + public: + explicit Holder(const ValueType& value) + : mValue(value) + {} + + virtual const std::type_info& GetTypeInfo() const + { + return typeid(ValueType); + } + + virtual PlaceHolder* Clone() const + { + return new Holder(mValue); + } + + public: + ValueType mValue; + }; + +public: + PlaceHolder* mContent; +}; + +/* + * static const Any + */ +static const Any UT_EMPTY_ANY = Any(); + +static inline bool IsBool(const Any& any) +{ + return any.GetTypeInfo() == typeid(bool); +} + +static inline bool IsString(const Any& any) +{ + return any.GetTypeInfo() == typeid(std::string); +} + +static inline bool IsInt8(const Any& any) +{ + return any.GetTypeInfo() == typeid(int8_t); +} + +static inline bool IsUint8(const Any& any) +{ + return any.GetTypeInfo() == typeid(uint8_t); +} + +static inline bool IsInt16(const Any& any) +{ + return any.GetTypeInfo() == typeid(int16_t); +} + +static inline bool IsUint16(const Any& any) +{ + return any.GetTypeInfo() == typeid(uint16_t); +} + +static inline bool IsInt(const Any& any) +{ + return any.GetTypeInfo() == typeid(int32_t); +} + +static inline bool IsUint(const Any& any) +{ + return any.GetTypeInfo() == typeid(uint32_t); +} + +static inline bool IsInt64(const Any& any) +{ + return any.GetTypeInfo() == typeid(int64_t); +} + +static inline bool IsUint64(const Any& any) +{ + return any.GetTypeInfo() == typeid(uint64_t); +} + +static inline bool IsFloat(const Any& any) +{ + return any.GetTypeInfo() == typeid(float); +} + +static inline bool IsDouble(const Any& any) +{ + return any.GetTypeInfo() == typeid(double); +} + +static inline bool IsLongDouble(const Any& any) +{ + return any.GetTypeInfo() == typeid(long double); +} + +static inline bool IsInteger(const Any& any) +{ + return IsInt(any) || IsUint(any) || IsInt64(any) || IsUint64(any) + || IsInt16(any) || IsUint16(any) || IsInt8(any) || IsUint8(any); +} + +static inline bool IsNumber(const Any& any) +{ + return IsBool(any) || IsInteger(any) || IsFloat(any) || IsDouble(any) + || IsLongDouble(any); +} + +static inline bool IsBoolType(const std::type_info& t) +{ + return t == typeid(bool); +} + +static inline bool IsInt8Type(const std::type_info& t) +{ + return t == typeid(int8_t); +} + +static inline bool IsUint8Type(const std::type_info& t) +{ + return t == typeid(uint8_t); +} + +static inline bool IsInt16Type(const std::type_info& t) +{ + return t == typeid(int16_t); +} + +static inline bool IsUint16Type(const std::type_info& t) +{ + return t == typeid(uint16_t); +} + +static inline bool IsIntType(const std::type_info& t) +{ + return t == typeid(int32_t); +} + +static inline bool IsUintType(const std::type_info& t) +{ + return t == typeid(uint32_t); +} + +static inline bool IsInt64Type(const std::type_info& t) +{ + return t == typeid(int64_t); +} + +static inline bool IsUint64Type(const std::type_info& t) +{ + return t == typeid(uint64_t); +} + +static inline bool IsIntegerType(const std::type_info& t) +{ + return IsIntType(t) || IsUintType(t) || IsInt64Type(t) || IsUint64Type(t) || + IsInt8Type(t) || IsUint8Type(t) || IsInt16Type(t) || IsUint16Type(t); +} + +static inline bool IsFloatType(const std::type_info& t) +{ + return t == typeid(float); +} + +static inline bool IsDoubleType(const std::type_info& t) +{ + return t == typeid(double); +} + +static inline bool IsLongDoubleType(const std::type_info& t) +{ + return t == typeid(long double); +} + +static inline bool IsNumberType(const std::type_info& t) +{ + return IsBoolType(t) || IsIntegerType(t) || IsFloatType(t) + || IsDoubleType(t) || IsLongDoubleType(t); +} + +static inline bool IsTypeEqual(const std::type_info& t1, const std::type_info& t2) +{ + return t1 == t2; +} + +template +const ValueType& AnyCast(const Any* operand) +{ + const std::type_info& t1 = typeid(ValueType); + const std::type_info& t2 = operand->GetTypeInfo(); + + if (IsTypeEqual(t1, t2)) + { + return ((Any::Holder*)(operand->mContent))->mValue; + } + + UT_THROW(BadCastException, std::string("AnyCast error. target type is ") + + t1.name() + ", but source type is " + t2.name()); +} + +template +const ValueType& AnyCast(const Any& operand) +{ + return AnyCast(&operand); +} + +template +ValueType AnyNumberCast(const Any* operand) +{ + const std::type_info& t1 = typeid(ValueType); + const std::type_info& t2 = operand->GetTypeInfo(); + + if (IsNumberType(t1) && IsNumberType(t2)) + { + if (IsTypeEqual(t1, t2)) + { + return ((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsFloatType(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsDoubleType(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsLongDoubleType(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsInt8Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsUint8Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsInt16Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsUint16Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsIntType(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsUintType(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsInt64Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else if (IsUint64Type(t2)) + { + return (ValueType)((Any::Holder*)(operand->mContent))->mValue; + } + else + { + UT_THROW(BadCastException, std::string("AnyNumberCast error. unknown number type:", t2.name())); + } + } + + UT_THROW(BadCastException, std::string("AnyNumberCast error. not number type")); +} + +template +ValueType AnyNumberCast(const Any& operand) +{ + return AnyNumberCast(&operand); +} + +static inline const std::string& ToString(const Any& operand) +{ + if (operand.Empty()) + { + return UT_EMPTY_STR; + } + + return AnyCast(operand); +} + +static inline void StringTo(const std::string& s, Any& value) +{ + value = s; +} + +static inline void StringTo(const char* s, Any& value) +{ + value = std::string(s); +} + +static inline void StringTo(const char* s, size_t len, Any& value) +{ + value = std::string(s, len); +} + +static inline void StringTo(const char* s, size_t pos, size_t len, Any& value) +{ + value = std::string(s, pos, len); +} + +} +} +#endif//__UT_ANY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/assert.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/assert.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4c0b8f87e59906eafcb5561865c4e49776856e53 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/assert.hpp @@ -0,0 +1,149 @@ +#ifndef __UT_ASSERT_HPP__ +#define __UT_ASSERT_HPP__ + +#include + +/* + * Declare assert output + */ +#define UT_ASSERT_OUT(debug, file, func, line, r) \ + if (debug) \ + { \ + std::cout << "[" << ::time(NULL) \ + << "] [" << ::syscall(SYS_gettid) \ + << "] UT_ASSERT DEBUG at __FILE__:" << file \ + << ", __FUNCTION__:" << func \ + << ", __LINE__:" << line \ + << ", r:" << r \ + << ", errno:" << errno \ + << std::endl; \ + } \ + else \ + { \ + std::cout << "[" << ::time(NULL) \ + << "] [" << ::syscall(SYS_gettid) \ + << "] UT_ASSERT ABORT at __FILE__:" << file \ + << ", __FUNCTION__:" << func \ + << ", __LINE__:" << line \ + << ", r:" << r \ + << ", errno:" << errno \ + << std::endl; \ + } + +#define UT_ASSERT_ABORT(debug, file, func, line, r) \ + if (debug) \ + { \ + UT_ASSERT_OUT(1, file, func, line, r); \ + } \ + else \ + { \ + UT_ASSERT_OUT(0, file, func, line, r); \ + abort(); \ + } + +/* + * Declare assert return value + */ +#define UT_ASSERT_EQ(x, r) \ + unitree::common::AssertEqual(x, r, 0, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_EQ_DEBUG(x, r) \ + unitree::common::AssertEqual(x, r, 1, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_NOT_EQ(x, r) \ + unitree::common::AssertNotEqual(x, r, 0, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_NOT_EQ_DEBUG(x, r) \ + unitree::common::AssertNotEqual(x, r, 1, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +/* + * Declare assert return value and errno + */ +#define UT_ASSERT_ENO_EQ(x, r, eno) \ + unitree::common::AssertEqual(x, r, eno, 0, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_ENO_EQ_DEBUG(x, r, eno) \ + unitree::common::AssertEqual(x, r, eno, 1, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_ENO_EQ_EX(x, r, eno) \ + unitree::common::AssertEqualEx(x, r, eno, 0, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +#define UT_ASSERT_ENO_EQ_EX_DEBUG(x, r, eno) \ + unitree::common::AssertEqualEx(x, r, eno, 1, __FILE__, \ + __PRETTY_FUNCTION__, __LINE__) + +/* + * Declare assert wrapper + */ +#define UT_ASSERT_0(x) \ + UT_ASSERT_EQ(x, 0) + +#define UT_ASSERT_DEBUG_0(x) \ + UT_ASSERT_EQ_DEBUG(x, 0) + +#define UT_ASSERT_ENO_0(x, eno) \ + UT_ASSERT_ENO_EQ(x, 0, eno) + +#define UT_ASSERT_ENO_DEBUG_0(x, eno) \ + UT_ASSERT_ENO_EQ_DEBUG(x, 0, eno) + + +//Declare assert function +namespace unitree +{ +namespace common +{ +inline int AssertEqual(int r, int expectRet, bool debug, + const char* file, const char* func, int line) +{ + if (UT_UNLIKELY(r != expectRet)) + { + UT_ASSERT_ABORT(debug, file, func, line, r); + } + + return r; +} + +inline int AssertNotEqual(int r, int expectRet, bool debug, + const char* file, const char* func, int line) +{ + if (UT_UNLIKELY(r == expectRet)) + { + UT_ASSERT_ABORT(debug, file, func, line, r); + } + + return r; +} + +inline int AssertEqual(int r, int expectRet, int expectErrno, bool debug, + const char* file, const char* func, int line) +{ + if (UT_UNLIKELY(r != expectRet) && UT_UNLIKELY(errno != expectErrno)) + { + UT_ASSERT_ABORT(debug, file, func, line, r); + } + + return r; +} + +inline int AssertEqualEx(int r, int expectRet, int expectErrno, bool debug, + const char* file, const char* func, int line) +{ + if (UT_UNLIKELY(r != 0) && UT_UNLIKELY(r != expectRet) && + UT_UNLIKELY(errno != expectErrno)) + { + UT_ASSERT_ABORT(debug, file, func, line, r); + } + + return r; +} +} +} +#endif//__UT_ASSERT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/block_queue.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/block_queue.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2effd627ce90889fabbfb348f9614fe9a77d256f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/block_queue.hpp @@ -0,0 +1,137 @@ +#ifndef __UT_BLOCK_QUEUE_HPP__ +#define __UT_BLOCK_QUEUE_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +template +class BlockQueue +{ +public: + BlockQueue(uint64_t maxSize = UT_QUEUE_MAX_LEN) : + mMaxSize(maxSize), mCurSize(0) + { + if (mMaxSize == 0) + { + mMaxSize = UT_QUEUE_MAX_LEN; + } + } + + bool Put(const T& t, bool replace = false, bool putfront = false) + { + /* + * if queue is full or full-replaced occured return false + */ + bool noneReplaced = true; + + LockGuard guard(mMutexCond); + if (mCurSize >= mMaxSize) + { + if (!replace) + { + return false; + } + + noneReplaced = false; + + mQueue.pop_front(); + mCurSize --; + } + + if (putfront) + { + mQueue.emplace_front(t); + } + else + { + mQueue.emplace_back(t); + } + + mCurSize ++; + mMutexCond.Notify(); + + return noneReplaced; + } + + bool Get(T& t, uint64_t microsec = 0) + { + LockGuard guard(mMutexCond); + return GetTimeout(t, microsec); + } + + T Get(uint64_t microsec = 0) + { + LockGuard guard(mMutexCond); + T t; + if (GetTimeout(t, microsec)) + { + return std::move(t); + } + + UT_THROW(TimeoutException, "block queue get timeout or interrupted"); + } + + bool Empty() + { + return mCurSize == 0; + } + + uint64_t Size() + { + return mCurSize; + } + + void Interrupt(bool all = false) + { + LockGuard guard(mMutexCond); + if (all) + { + mMutexCond.NotifyAll(); + } + else + { + mMutexCond.Notify(); + } + } + +private: + bool GetTimeout(T& t, uint64_t microsec = 0) + { + if (mQueue.empty()) + { + if (!mMutexCond.Wait(microsec)) + { + return false; + } + + if (mQueue.empty()) + { + return false; + } + } + + t = mQueue.front(); + mQueue.pop_front(); + + mCurSize--; + + return true; + } + +private: + uint64_t mMaxSize; + uint64_t mCurSize; + std::list mQueue; + MutexCond mMutexCond; +}; + +template +using BlockQueuePtr = std::shared_ptr>; + +} +} +#endif//__UT_BLOCK_QUEUE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_callback.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_callback.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9baa10311de85d107cfafde32578e6fb41b7036a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_callback.hpp @@ -0,0 +1,35 @@ +#ifndef __UT_DDS_CALLBACK_HPP__ +#define __UT_DDS_CALLBACK_HPP__ + +#include + +using DdsMessageHandler = std::function; + +namespace unitree +{ +namespace common +{ +class DdsReaderCallback +{ +public: + DdsReaderCallback(); + DdsReaderCallback(const DdsMessageHandler& handler); + DdsReaderCallback(const DdsReaderCallback& cb); + DdsReaderCallback& operator=(const DdsReaderCallback& cb); + + ~DdsReaderCallback(); + +public: + bool HasMessageHandler() const; + void OnDataAvailable(const void* message); + +private: + DdsMessageHandler mMessageHandler; +}; + +using DdsReaderCallbackPtr = std::shared_ptr; + +} +} + +#endif//__UT_DDS_CALLBACK_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_easy_model.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_easy_model.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bbc8acdfc6557f3124a8b31ee3bb757738822259 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_easy_model.hpp @@ -0,0 +1,148 @@ +#ifndef __DDS_EASY_MODEL_HPP__ +#define __DDS_EASY_MODEL_HPP__ + +#include +#include +#include +#include + +#define UT_DDS_PARAMETER_CONFIG_FILENAME "dds_parameter.json" + +namespace unitree +{ +namespace common +{ +class DdsEasyModel +{ +public: + explicit DdsEasyModel(); + ~DdsEasyModel(); + + void Init(uint32_t domainId); + void Init(const std::string& ddsParameterFileName = ""); + void Init(const JsonMap& param); + + template + void SetTopic(const std::string& topic) + { + DdsTopicChannelPtr channel = GetChannel(topic); + if (!channel) + { + channel = DdsTopicChannelPtr(new DdsTopicChannel()); + mChannelMap[topic] = std::static_pointer_cast(channel); + + DdsTopicQos topicQos; + GetTopicQos(topic, topicQos); + channel->SetTopic(mParticipant, topic, topicQos); + } + + DdsWriterPtr writer = channel->GetWriter(); + if (!writer) + { + DdsWriterQos writerQos; + GetWriterQos(topic, writerQos); + channel->SetWriter(GetPublisher(topic), writerQos); + } + else + { + UT_THROW(CommonException, std::string("topic reader is already exist. topic:") + topic); + } + } + + template + void SetTopic(const std::string& topic, const DdsMessageHandler& handler, int32_t queuelen = 0) + { + DdsReaderCallback cb(handler); + SetTopic(topic, cb, queuelen); + } + + template + void SetTopic(const std::string& topic, const DdsReaderCallback& rcb, int32_t queuelen = 0) + { + DdsTopicChannelPtr channel = GetChannel(topic); + if (!channel) + { + channel = DdsTopicChannelPtr(new DdsTopicChannel()); + mChannelMap[topic] = std::static_pointer_cast(channel); + + DdsTopicQos topicQos; + GetTopicQos(topic, topicQos); + channel->SetTopic(mParticipant, topic, topicQos); + } + + DdsReaderPtr reader = channel->GetReader(); + if (!reader) + { + DdsReaderQos readerQos; + GetReaderQos(topic, readerQos); + channel->SetReader(GetSubscriber(topic), readerQos, rcb, queuelen); + } + else + { + UT_THROW(CommonException, std::string("topic reader is already exist. topic:") + topic); + } + } + + template + bool WriteMessage(const std::string topic, const MSG& message, int64_t waitMicrosec = 0) + { + DdsTopicChannelPtr channel = GetChannel(topic); + if (channel == NULL) + { + return false; + } + + return channel->Write(message, waitMicrosec); + } + + bool WriteMessage(const std::string topic, const void* message, int64_t waitMicrosec = 0); + + int64_t GetLastDataAvailableTime(const std::string topic); + +private: + void GetTopicQos(const std::string& topic, DdsTopicQos& qos); + void GetWriterQos(const std::string& topic, DdsWriterQos& qos); + void GetReaderQos(const std::string& topic, DdsReaderQos& qos); + + DdsTopicChannelAbstractPtr GetChannel(const std::string& topic); + + template + DdsTopicChannelPtr GetChannel(const std::string& topic) + { + DdsTopicChannelPtr channel; + + DdsTopicChannelAbstractPtr channelAbstract = GetChannel(topic); + if (channelAbstract) + { + channel = std::static_pointer_cast>(channelAbstract); + } + + return channel; + } + + DdsSubscriberPtr GetSubscriber(const std::string& topic); + DdsSubscriberPtr GetSubscriberDefault(); + + DdsPublisherPtr GetPublisher(const std::string& topic); + DdsPublisherPtr GetPublisherDefault(); + +private: + DdsParameter mDdsParameter; + + DdsParticipantPtr mParticipant; + std::vector mPublisherList; + std::vector mSubscriberList; + DdsPublisherPtr mPublisherDefault; + DdsSubscriberPtr mSubscriberDefault; + + std::map mChannelMap; + + Logger *mLogger; +}; + +using DdsEasyModelPtr = std::shared_ptr; + +} +} + +#endif//__DDS_EASY_MODEL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_entity.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_entity.hpp new file mode 100644 index 0000000000000000000000000000000000000000..609edb535055f2a337a0e6e95a4965e471e46563 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_entity.hpp @@ -0,0 +1,411 @@ +#ifndef __UT_DDS_ENTITY_HPP__ +#define __UT_DDS_ENTITY_HPP__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define __UT_DDS_NULL__ ::dds::core::null + +/* + * dds wait sub/pub matched default time slice. + * default 10000 us + */ +#define __UT_DDS_WAIT_MATCHED_TIME_SLICE 10000 +#define __UT_DDS_WAIT_MATCHED_TIME_MAX 1000000 + +using namespace org::eclipse::cyclonedds; + +namespace unitree +{ +namespace common +{ +class DdsLogger +{ +public: + DdsLogger(); + virtual ~DdsLogger(); + +protected: + Logger* mLogger; +}; + +/* + * @brief: DdsParticipant + */ +class DdsParticipant : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::domain::DomainParticipant; + + explicit DdsParticipant(uint32_t domainId, const DdsParticipantQos& qos, const std::string& config = ""); + ~DdsParticipant(); + + const NATIVE_TYPE& GetNative() const; + +private: + NATIVE_TYPE mNative; +}; + +using DdsParticipantPtr = std::shared_ptr; + + +/* + * @brief: DdsPublisher + */ +class DdsPublisher : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::pub::Publisher; + + explicit DdsPublisher(const DdsParticipantPtr& participant, const DdsPublisherQos& qos); + ~DdsPublisher(); + + const NATIVE_TYPE& GetNative() const; + +private: + NATIVE_TYPE mNative; +}; + +using DdsPublisherPtr = std::shared_ptr; + + +/* + * @brief: DdsSubscriber + */ +class DdsSubscriber : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::sub::Subscriber; + + explicit DdsSubscriber(const DdsParticipantPtr& participant, const DdsSubscriberQos& qos); + ~DdsSubscriber(); + + const NATIVE_TYPE& GetNative() const; + +private: + NATIVE_TYPE mNative; +}; + +using DdsSubscriberPtr = std::shared_ptr; + + +/* + * @brief: DdsTopic + */ +template +class DdsTopic : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::topic::Topic; + + explicit DdsTopic(const DdsParticipantPtr& participant, const std::string& name, const DdsTopicQos& qos) : + mNative(__UT_DDS_NULL__) + { + UT_DDS_EXCEPTION_TRY + + auto topicQos = participant->GetNative().default_topic_qos(); + qos.CopyToNativeQos(topicQos); + + mNative = NATIVE_TYPE(participant->GetNative(), name, topicQos); + + UT_DDS_EXCEPTION_CATCH(mLogger, true) + } + + ~DdsTopic() + { + mNative = __UT_DDS_NULL__; + } + + const NATIVE_TYPE& GetNative() const + { + return mNative; + } + +private: + NATIVE_TYPE mNative; +}; + +template +using DdsTopicPtr = std::shared_ptr>; + + +/* + * @brief: DdsWriter + */ +template +class DdsWriter : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::pub::DataWriter; + + explicit DdsWriter(const DdsPublisherPtr publisher, const DdsTopicPtr& topic, const DdsWriterQos& qos) : + mNative(__UT_DDS_NULL__) + { + UT_DDS_EXCEPTION_TRY + + auto writerQos = publisher->GetNative().default_datawriter_qos(); + qos.CopyToNativeQos(writerQos); + + mNative = NATIVE_TYPE(publisher->GetNative(), topic->GetNative(), writerQos); + + UT_DDS_EXCEPTION_CATCH(mLogger, true) + } + + ~DdsWriter() + { + mNative = __UT_DDS_NULL__; + } + + const NATIVE_TYPE& GetNative() const + { + return mNative; + } + + bool Write(const MSG& message, int64_t waitMicrosec) + { + if (waitMicrosec > 0) + { + WaitReader(waitMicrosec); + } + + UT_DDS_EXCEPTION_TRY + { + mNative.write(message); + return true; + } + UT_DDS_EXCEPTION_CATCH(mLogger, false) + + return false; + } + +private: + void WaitReader(int64_t waitMicrosec) + { + if (waitMicrosec < __UT_DDS_WAIT_MATCHED_TIME_SLICE) + { + return; + } + + int64_t waitTime = (waitMicrosec / 2); + if (waitTime > __UT_DDS_WAIT_MATCHED_TIME_MAX) + { + waitTime = __UT_DDS_WAIT_MATCHED_TIME_MAX; + } + + while (waitTime > 0 && mNative.publication_matched_status().current_count() == 0) + { + MicroSleep(__UT_DDS_WAIT_MATCHED_TIME_SLICE); + waitTime -=__UT_DDS_WAIT_MATCHED_TIME_SLICE; + } + } + +private: + NATIVE_TYPE mNative; +}; + +template +using DdsWriterPtr = std::shared_ptr>; + + +/* + * @brief: DdsReaderListener + */ +template +class DdsReaderListener : public ::dds::sub::NoOpDataReaderListener, DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::sub::DataReaderListener; + using MSG_PTR = std::shared_ptr; + + explicit DdsReaderListener() : + mHasQueue(false), mQuit(false), mMask(::dds::core::status::StatusMask::none()), mLastDataAvailableTime(0) + {} + + ~DdsReaderListener() + { + if (mHasQueue) + { + mQuit = true; + mDataQueuePtr->Interrupt(false); + mDataQueueThreadPtr->Wait(); + } + } + + void SetCallback(const DdsReaderCallback& cb) + { + if (cb.HasMessageHandler()) + { + mMask |= ::dds::core::status::StatusMask::data_available(); + } + + mCallbackPtr.reset(new DdsReaderCallback(cb)); + } + + void SetQueue(int32_t len) + { + if (len <= 0) + { + return; + } + + mHasQueue = true; + mDataQueuePtr.reset(new BlockQueue(len)); + + auto queueThreadFunc = [this]() { + while (true) + { + if (mCallbackPtr && mCallbackPtr->HasMessageHandler()) + { + break; + } + else + { + MicroSleep(__UT_DDS_WAIT_MATCHED_TIME_SLICE); + } + } + while (!mQuit) + { + MSG_PTR dataPtr; + if (mDataQueuePtr->Get(dataPtr)) + { + if (dataPtr) + { + mCallbackPtr->OnDataAvailable(dataPtr.get()); + } + } + } + return 0; + }; + + mDataQueueThreadPtr = CreateThreadEx("rlsnr", UT_CPU_ID_NONE, queueThreadFunc); + } + + int64_t GetLastDataAvailableTime() const + { + return mLastDataAvailableTime; + } + + NATIVE_TYPE* GetNative() const + { + return (NATIVE_TYPE*)this; + } + + const ::dds::core::status::StatusMask& GetStatusMask() const + { + return mMask; + } + +private: + void on_data_available(::dds::sub::DataReader& reader) + { + ::dds::sub::LoanedSamples samples; + samples = reader.take(); + + if (samples.length() <= 0) + { + return; + } + + typename ::dds::sub::LoanedSamples::const_iterator iter; + for (iter=samples.begin(); iterdata(); + if (iter->info().valid()) + { + mLastDataAvailableTime = GetCurrentMonotonicTimeNanosecond(); + + if (mHasQueue) + { + if (!mDataQueuePtr->Put(MSG_PTR(new MSG(m)), true)) + { + LOG_WARNING(mLogger, "earliest mesage was evicted. type:", DdsGetTypeName(MSG)); + } + } + else + { + mCallbackPtr->OnDataAvailable((const void*)&m); + } + } + } + } + +private: + bool mHasQueue; + volatile bool mQuit; + + ::dds::core::status::StatusMask mMask; + int64_t mLastDataAvailableTime; + + DdsReaderCallbackPtr mCallbackPtr; + BlockQueuePtr mDataQueuePtr; + ThreadPtr mDataQueueThreadPtr; +}; + +template +using DdsReaderListenerPtr = std::shared_ptr>; + + +/* + * @brief: DdsReader + */ +template +class DdsReader : public DdsLogger +{ +public: + using NATIVE_TYPE = ::dds::sub::DataReader; + + explicit DdsReader(const DdsSubscriberPtr& subscriber, const DdsTopicPtr& topic, const DdsReaderQos& qos) : + mNative(__UT_DDS_NULL__) + { + UT_DDS_EXCEPTION_TRY + + auto readerQos = subscriber->GetNative().default_datareader_qos(); + qos.CopyToNativeQos(readerQos); + + mNative = NATIVE_TYPE(subscriber->GetNative(), topic->GetNative(), readerQos); + + UT_DDS_EXCEPTION_CATCH(mLogger, true) + } + + ~DdsReader() + { + mNative = __UT_DDS_NULL__; + } + + const NATIVE_TYPE& GetNative() const + { + return mNative; + } + + void SetListener(const DdsReaderCallback& cb, int32_t qlen) + { + mListener.SetCallback(cb); + mListener.SetQueue(qlen); + mNative.listener(mListener.GetNative(), mListener.GetStatusMask()); + } + + int64_t GetLastDataAvailableTime() const + { + return mListener.GetLastDataAvailableTime(); + } + +private: + NATIVE_TYPE mNative; + DdsReaderListener mListener; +}; + +template +using DdsReaderPtr = std::shared_ptr>; + +} +} + +#endif//__UT_DDS_ENTITY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..95fc42f13549a09bf3562c506bfdc39666ecbb04 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_DDS_ERROR_HPP__ +#define __UT_DDS_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +/* + * dds error. + */ +UT_DECL_ERR(UT_ERR_DDS, 2001, "dds error") + +} +} +#endif//__UT_DDS_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_exception.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_exception.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a4cb710a724194dd2dc8edf3684171c3c404b48a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_exception.hpp @@ -0,0 +1,58 @@ +#ifndef __UT_DDS_EXCEPTION_HPP__ +#define __UT_DDS_EXCEPTION_HPP__ + +#include +#include + +#define __UT_DDS_EXCEPTION_MESSAGE(e, d) \ + std::string("Catch dds::core exception. Class:") + __UT_STR(d) + ", Message:" + e.what(); + +#define __UT_DDS_EXCEPTION_CATCH(except, l, t) \ +catch (const except & e) \ +{ \ + if (l || t) \ + { \ + std::string __t9b78e5r = __UT_DDS_EXCEPTION_MESSAGE(e, except); \ + if (l) \ + { \ + LOG_ERROR(l, __t9b78e5r); \ + } \ + if (t) \ + { \ + UT_THROW(DdsException, __t9b78e5r); \ + } \ + } \ +} + +#define UT_DDS_EXCEPTION_TRY \ +try \ +{ + +#define UT_DDS_EXCEPTION_CATCH(l, t) \ +} \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::Error, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::InvalidArgumentError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::TimeoutError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::UnsupportedError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::AlreadyClosedError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::IllegalOperationError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::NotEnabledError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::PreconditionNotMetError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::ImmutablePolicyError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::InconsistentPolicyError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::OutOfResourcesError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::InvalidDowncastError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::NullReferenceError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::InvalidDataError, l, t) \ +__UT_DDS_EXCEPTION_CATCH(::dds::core::Exception, l, t) \ +__UT_DDS_EXCEPTION_CATCH(std::exception, l, t) + +namespace unitree +{ +namespace common +{ +UT_DECL_EXCEPTION(DdsException, UT_ERR_DDS, UT_DESC_ERR(UT_ERR_DDS)) +} +} + +#endif//__UT_DDS_EXCEPTION_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_factory_model.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_factory_model.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1bb071897b6c2d11ccf4976c831661db0273f2a7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_factory_model.hpp @@ -0,0 +1,62 @@ +#ifndef __UT_DDS_FACTORY_MODEL_HPP__ +#define __UT_DDS_FACTORY_MODEL_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +class DdsFactoryModel +{ +public: + explicit DdsFactoryModel(); + ~DdsFactoryModel(); + + void Init(uint32_t domainId, const std::string& ddsConfig = ""); + void Init(const std::string& ddsParameterFileName = ""); + void Init(const JsonMap& param); + + template + DdsTopicChannelPtr CreateTopicChannel(const std::string& topic) + { + DdsTopicChannelPtr channel = DdsTopicChannelPtr(new DdsTopicChannel()); + channel->SetTopic(mParticipant, topic, mTopicQos); + return channel; + } + + template + void SetWriter(DdsTopicChannelPtr& channelPtr) + { + channelPtr->SetWriter(mPublisher, mWriterQos); + } + + template + void SetReader(DdsTopicChannelPtr& channelPtr, const std::function& handler, int32_t queuelen = 0) + { + DdsReaderCallback cb(handler); + channelPtr->SetReader(mSubscriber, mReaderQos, cb, queuelen); + } + +private: + DdsParticipantPtr mParticipant; + DdsPublisherPtr mPublisher; + DdsSubscriberPtr mSubscriber; + + DdsParticipantQos mParticipantQos; + DdsTopicQos mTopicQos; + DdsPublisherQos mPublisherQos; + DdsSubscriberQos mSubscriberQos; + DdsWriterQos mWriterQos; + DdsReaderQos mReaderQos; + + Logger *mLogger; +}; + +using DdsFactoryModelPtr = std::shared_ptr; + +} +} + +#endif//__UT_DDS_FACTORY_MODEL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_native.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_native.hpp new file mode 100644 index 0000000000000000000000000000000000000000..59e34290b20c5c0d19b7f6f1ef9afe6e26ae4282 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_native.hpp @@ -0,0 +1,37 @@ +#ifndef __UT_DDS_NATIVE_HPP__ +#define __UT_DDS_NATIVE_HPP__ + +namespace unitree +{ +namespace common +{ +template +class DdsNative +{ +public: + using NativeType = NATIVE; + + explicit DdsNative() + {} + + virtual ~DdsNative() + {} + + void SetNative(const NATIVE& native) + { + mNative = native; + } + + const NATIVE& GetNative() const + { + return mNative; + } + +protected: + NATIVE mNative; +}; + +} +} + +#endif// diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_parameter.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_parameter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..941f49867d08dc5062d08f43be2c3f2ac932dc5c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_parameter.hpp @@ -0,0 +1,214 @@ +#ifndef __UT_DDS_PARAMETER_HPP__ +#define __UT_DDS_PARAMETER_HPP__ + +#include +#include + +#define UT_DDS_PARAM_KEY_PARTICIPANT "Participant" +#define UT_DDS_PARAM_KEY_DOMAINID "DomainId" +#define UT_DDS_PARAM_KEY_CONFIG "Config" +#define UT_DDS_PARAM_KEY_NAME "Name" +#define UT_DDS_PARAM_KEY_TOPIC "Topic" +#define UT_DDS_PARAM_KEY_TOPICNAME "TopicName" +#define UT_DDS_PARAM_KEY_PUBLISHER "Publisher" +#define UT_DDS_PARAM_KEY_SUBSCRIBER "Subscriber" +#define UT_DDS_PARAM_KEY_WRITER "Writer" +#define UT_DDS_PARAM_KEY_READER "Reader" +#define UT_DDS_PARAM_KEY_QOS "Qos" + +namespace unitree +{ +namespace common +{ +class DdsQosParameterHolder +{ +public: + DdsQosParameterHolder(); + + virtual ~DdsQosParameterHolder(); + + void SetQos(const DdsQosParameter& qos); + const DdsQosParameter& GetQos() const; + +protected: + DdsQosParameter mQos; +}; + +class DdsParticipantParameter : public DdsQosParameterHolder +{ +public: + DdsParticipantParameter(); + DdsParticipantParameter(uint32_t domainId, const std::string& config = ""); + + ~DdsParticipantParameter(); + + void SetDomainId(int32_t domainId); + uint32_t GetDomainId() const; + + void SetConfig(const std::string& config); + const std::string& GetConfig() const; + +private: + uint32_t mDomainId; + std::string mConfig; +}; + +class DdsTopicParameter : public DdsQosParameterHolder +{ +public: + DdsTopicParameter(); + DdsTopicParameter(const std::string& name); + + ~DdsTopicParameter(); + + void SetName(const std::string& name); + const std::string& GetName() const; + +private: + std::string mName; +}; + +class DdsTopicParameterHolder +{ +public: + DdsTopicParameterHolder(); + DdsTopicParameterHolder(const std::string& topicName); + + virtual ~DdsTopicParameterHolder(); + + void SetTopicName(const std::string& topicName); + const std::string& GetTopicName() const; + +private: + std::string mTopicName; +}; + +class DdsWriterParameter : public DdsTopicParameterHolder, public DdsQosParameterHolder +{ +public: + DdsWriterParameter(); + DdsWriterParameter(const std::string& topicName); + + ~DdsWriterParameter(); +}; + +class DdsWriterParameterHolder +{ +public: + DdsWriterParameterHolder(); + + virtual ~DdsWriterParameterHolder(); + + void SetWriter(const DdsWriterParameter& writer); + const DdsWriterParameter& GetWriter() const; + +private: + DdsWriterParameter mWriter; +}; + +class DdsReaderParameter : public DdsTopicParameterHolder, public DdsQosParameterHolder +{ +public: + DdsReaderParameter(); + DdsReaderParameter(const std::string& topicName); + + virtual ~DdsReaderParameter(); +}; + +class DdsReaderParameterHolder +{ +public: + DdsReaderParameterHolder(); + + virtual ~DdsReaderParameterHolder(); + + void SetReader(const DdsReaderParameter& reader); + const DdsReaderParameter& GetReader() const; + +private: + DdsReaderParameter mReader; +}; + +class DdsPublisherParameter : public DdsQosParameterHolder +{ +public: + DdsPublisherParameter(); + + ~DdsPublisherParameter(); + + void AppendWriter(const DdsWriterParameter& writer); + void SetWriter(const std::vector& writer); + const std::vector& GetWriter() const; + +private: + std::vector mWriter; +}; + +class DdsSubscriberParameter : public DdsQosParameterHolder +{ +public: + DdsSubscriberParameter(); + ~DdsSubscriberParameter(); + + void AppendReader(const DdsReaderParameter& reader); + void SetReader(const std::vector& reader); + const std::vector& GetReader() const; + +private: + std::vector mReader; +}; + +class DdsParameter +{ +public: + DdsParameter(); + DdsParameter(const JsonMap& param); + + ~DdsParameter(); + + void Init(const JsonMap& param); + + uint32_t GetDomainId(); + const std::string& GetConfig() const; + + const DdsParticipantParameter& GetParticipant(); + + void AppendTopic(const DdsTopicParameter& topic); + const std::map& GetTopic() const; + + void AppendPublisher(const DdsPublisherParameter& publisher); + void SetPublisher(const std::vector& publisher); + const std::vector& GetPublisher() const; + + void AppendSubscriber(const DdsSubscriberParameter& subscriber); + void SetSubscriber(const std::vector& subscriber); + const std::vector& GetSubscriber() const; + + const DdsQosParameter& GetParticipantQos() const; + const DdsQosParameter& GetTopicQos() const; + const DdsQosParameter& GetPublisherQos() const; + const DdsQosParameter& GetSubscriberQos() const; + const DdsQosParameter& GetWriterQos() const; + const DdsQosParameter& GetReaderQos() const; + +private: + uint32_t mDomainId; + std::string mConfig; + + DdsQosParameter mParticipantQos; + DdsQosParameter mTopicQos; + DdsQosParameter mPublisherQos; + DdsQosParameter mSubscriberQos; + DdsQosParameter mWriterQos; + DdsQosParameter mReaderQos; + + DdsParticipantParameter mParticipant; + std::map mTopic; + std::vector mPublisher; + std::vector mSubscriber; + +}; + +} +} +#endif//__UT_DDS_PARAMETER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bd7e683751f0e45a0fdc6f47987d554fdfc2bd46 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos.hpp @@ -0,0 +1,71 @@ +#ifndef __UT_DDS_QOS_HPP__ +#define __UT_DDS_QOS_HPP__ + +#include + +using namespace org::eclipse::cyclonedds; + +namespace unitree +{ +namespace common +{ +#define UT_DECL_DDS_QOS(QosType, QosNative) \ +class QosType: public QosNative \ +{ \ +public: \ + using NativeQosType = QosNative::NativeType; \ + explicit QosType() \ + { \ + InitPolicyDefault(); \ + } \ + template \ + void SetPolicy(const POLICY& policy) \ + { \ + mNative.policy(policy.GetNative()); \ + mPolicyNameSet.insert(policy.GetName()); \ + } \ + bool HasPolicy(const std::string& name) const \ + { \ + return mPolicyNameSet.find(name) != mPolicyNameSet.end(); \ + } \ + void CopyToNativeQos(NativeQosType& qos) const; \ +private: \ + void InitPolicyDefault(); \ +private: \ + std::set mPolicyNameSet; \ +}; + +/* + * DdsParticipantQos + */ +UT_DECL_DDS_QOS(DdsParticipantQos, DdsNative<::dds::domain::qos::DomainParticipantQos>) + +/* + * DdsTopicQos + */ +UT_DECL_DDS_QOS(DdsTopicQos, DdsNative<::dds::topic::qos::TopicQos>) + +/* + * DdsPublisherQos + */ +UT_DECL_DDS_QOS(DdsPublisherQos, DdsNative<::dds::pub::qos::PublisherQos>) + +/* + * DdsSubscriberQos + */ +UT_DECL_DDS_QOS(DdsSubscriberQos, DdsNative<::dds::sub::qos::SubscriberQos>) + +/* + * DdsWriterQos + */ +UT_DECL_DDS_QOS(DdsWriterQos, DdsNative<::dds::pub::qos::DataWriterQos>) + +/* + * DdsReaderQos + */ +UT_DECL_DDS_QOS(DdsReaderQos, DdsNative<::dds::sub::qos::DataReaderQos>) + +} +} + +#endif//__UT_DDS_QOS_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_parameter.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_parameter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..571aec9b5951578cddb69c2c10d846a2da964476 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_parameter.hpp @@ -0,0 +1,81 @@ +#ifndef __UT_DDS_QOS_PARAMETER_HPP__ +#define __UT_DDS_QOS_PARAMETER_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class DdsQosParameter +{ +public: + DdsQosParameter(); + ~DdsQosParameter(); + + void Init(const JsonMap& data); + +#define __GET_POLICY(POLICY) \ + const DdsQos##POLICY##PolicyParameter& Get##POLICY() const \ + { \ + return m##POLICY; \ + } + + __GET_POLICY(Deadline) + __GET_POLICY(DestinationOrder) + __GET_POLICY(Durability) + __GET_POLICY(DurabilityService) + __GET_POLICY(EntityFactory) + __GET_POLICY(GroupData) + __GET_POLICY(History) + __GET_POLICY(LatencyBudget) + __GET_POLICY(Lifespan) + __GET_POLICY(Liveliness) + __GET_POLICY(Ownership) + __GET_POLICY(OwnershipStrength) + __GET_POLICY(Partition) + __GET_POLICY(Presentation) + __GET_POLICY(ReaderDataLifecycle) + __GET_POLICY(Reliability) + __GET_POLICY(ResourceLimits) + __GET_POLICY(TimeBasedFilter) + __GET_POLICY(TopicData) + __GET_POLICY(TransportPriority) + __GET_POLICY(WriterDataLifecycle) + __GET_POLICY(UserData) + +#undef __GET_POLICY + + bool Default() const; + +private: + bool mDefault; + + DdsQosDeadlinePolicyParameter mDeadline; + DdsQosDestinationOrderPolicyParameter mDestinationOrder; + DdsQosDurabilityPolicyParameter mDurability; + DdsQosDurabilityServicePolicyParameter mDurabilityService; + DdsQosEntityFactoryPolicyParameter mEntityFactory; + DdsQosGroupDataPolicyParameter mGroupData; + DdsQosHistoryPolicyParameter mHistory; + DdsQosLatencyBudgetPolicyParameter mLatencyBudget; + DdsQosLifespanPolicyParameter mLifespan; + DdsQosLivelinessPolicyParameter mLiveliness; + DdsQosOwnershipPolicyParameter mOwnership; + DdsQosOwnershipStrengthPolicyParameter mOwnershipStrength; + DdsQosPartitionPolicyParameter mPartition; + DdsQosPresentationPolicyParameter mPresentation; + DdsQosReaderDataLifecyclePolicyParameter mReaderDataLifecycle; + DdsQosReliabilityPolicyParameter mReliability; + DdsQosResourceLimitsPolicyParameter mResourceLimits; + DdsQosTimeBasedFilterPolicyParameter mTimeBasedFilter; + DdsQosTopicDataPolicyParameter mTopicData; + DdsQosTransportPriorityPolicyParameter mTransportPriority; + DdsQosWriterDataLifecyclePolicyParameter mWriterDataLifecycle; + DdsQosUserDataPolicyParameter mUserData; +}; + +} +} + +#endif//__UT_DDS_QOS_PARAMETER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy.hpp new file mode 100644 index 0000000000000000000000000000000000000000..efc6420cdc222e8e31018445f0a9b91690be4879 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy.hpp @@ -0,0 +1,195 @@ +#ifndef __UT_DDS_QOS_POLICY_HPP__ +#define __UT_DDS_QOS_POLICY_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +class DdsQosPolicyName +{ +public: + explicit DdsQosPolicyName(const std::string& name) : + mName(name) + {} + + virtual ~DdsQosPolicyName() + {} + + const std::string& GetName() const + { + return mName; + } + +protected: + std::string mName; +}; + +class DdsDuration : public DdsNative<::dds::core::Duration> +{ +public: + explicit DdsDuration(int64_t nanoSecond); + ~DdsDuration(); +}; + +class DdsQosDeadlinePolicy : public DdsNative<::dds::core::policy::Deadline>, public DdsQosPolicyName +{ +public: + explicit DdsQosDeadlinePolicy(int64_t period); + ~DdsQosDeadlinePolicy(); +}; + +class DdsQosDestinationOrderPolicy : public DdsNative<::dds::core::policy::DestinationOrder>, public DdsQosPolicyName +{ +public: + explicit DdsQosDestinationOrderPolicy(int32_t kind); + ~DdsQosDestinationOrderPolicy(); +}; + +class DdsQosDurabilityPolicy : public DdsNative<::dds::core::policy::Durability>, public DdsQosPolicyName +{ +public: + explicit DdsQosDurabilityPolicy(int32_t kind); + ~DdsQosDurabilityPolicy(); +}; + +class DdsQosDurabilityServicePolicy : public DdsNative<::dds::core::policy::DurabilityService>, public DdsQosPolicyName +{ +public: + explicit DdsQosDurabilityServicePolicy(int64_t cleanupDelay, int32_t historyKind, int32_t historyDepth, + int32_t maxSamples, int32_t maxInstances, int32_t maxSamplesPerInstance); + ~DdsQosDurabilityServicePolicy(); +}; + +class DdsQosEntityFactoryPolicy : public DdsNative<::dds::core::policy::EntityFactory>, public DdsQosPolicyName +{ +public: + explicit DdsQosEntityFactoryPolicy(bool autoEnable); + ~DdsQosEntityFactoryPolicy(); +}; + +class DdsQosGroupDataPolicy : public DdsNative<::dds::core::policy::GroupData>, public DdsQosPolicyName +{ +public: + explicit DdsQosGroupDataPolicy(const std::vector& value); + ~DdsQosGroupDataPolicy(); +}; + +class DdsQosHistoryPolicy : public DdsNative<::dds::core::policy::History>, public DdsQosPolicyName +{ +public: + explicit DdsQosHistoryPolicy(int32_t kind, int32_t depth); + ~DdsQosHistoryPolicy(); +}; + +class DdsQosLatencyBudgetPolicy : public DdsNative<::dds::core::policy::LatencyBudget>, public DdsQosPolicyName +{ +public: + explicit DdsQosLatencyBudgetPolicy(int64_t duration); + ~DdsQosLatencyBudgetPolicy(); +}; + +class DdsQosLifespanPolicy : public DdsNative<::dds::core::policy::Lifespan>, public DdsQosPolicyName +{ +public: + explicit DdsQosLifespanPolicy(int64_t duration); + ~DdsQosLifespanPolicy(); +}; + +class DdsQosLivelinessPolicy : public DdsNative<::dds::core::policy::Liveliness>, public DdsQosPolicyName +{ +public: + explicit DdsQosLivelinessPolicy(int32_t kind, int64_t leaseDuration); + ~DdsQosLivelinessPolicy(); +}; + +class DdsQosOwnershipPolicy : public DdsNative<::dds::core::policy::Ownership>, public DdsQosPolicyName +{ +public: + explicit DdsQosOwnershipPolicy(int32_t kind); + ~DdsQosOwnershipPolicy(); +}; + +class DdsQosOwnershipStrengthPolicy : public DdsNative<::dds::core::policy::OwnershipStrength>, public DdsQosPolicyName +{ +public: + explicit DdsQosOwnershipStrengthPolicy(int32_t strength); + ~DdsQosOwnershipStrengthPolicy(); +}; + +class DdsQosPartitionPolicy : public DdsNative<::dds::core::policy::Partition>, public DdsQosPolicyName +{ +public: + explicit DdsQosPartitionPolicy(const std::string& name); + ~DdsQosPartitionPolicy(); +}; + +class DdsQosPresentationPolicy : public DdsNative<::dds::core::policy::Presentation>, public DdsQosPolicyName +{ +public: + explicit DdsQosPresentationPolicy(int32_t accessScopeKind, bool coherentAccess, bool orderedAccess); + ~DdsQosPresentationPolicy(); +}; + +class DdsQosReaderDataLifecyclePolicy : public DdsNative<::dds::core::policy::ReaderDataLifecycle>, public DdsQosPolicyName +{ +public: + explicit DdsQosReaderDataLifecyclePolicy(int64_t autopurgeNowriterSamplesDelay, int64_t autopurgeDisposedSamplesDelay); + ~DdsQosReaderDataLifecyclePolicy(); +}; + +class DdsQosReliabilityPolicy : public DdsNative<::dds::core::policy::Reliability>, public DdsQosPolicyName +{ +public: + explicit DdsQosReliabilityPolicy(int32_t kind, int64_t maxBlockingTime); + ~DdsQosReliabilityPolicy(); +}; + +class DdsQosResourceLimitsPolicy : public DdsNative<::dds::core::policy::ResourceLimits>, public DdsQosPolicyName +{ +public: + explicit DdsQosResourceLimitsPolicy(int32_t maxSamples, int32_t maxInstances, int32_t maxSamplesPerInstance); + ~DdsQosResourceLimitsPolicy(); +}; + +class DdsQosTimeBasedFilterPolicy : public DdsNative<::dds::core::policy::TimeBasedFilter>, public DdsQosPolicyName +{ +public: + explicit DdsQosTimeBasedFilterPolicy(int64_t minSep); + ~DdsQosTimeBasedFilterPolicy(); +}; + +class DdsQosTopicDataPolicy : public DdsNative<::dds::core::policy::TopicData>, public DdsQosPolicyName +{ +public: + explicit DdsQosTopicDataPolicy(const std::vector& value); + ~DdsQosTopicDataPolicy(); +}; + +class DdsQosTransportPriorityPolicy : public DdsNative<::dds::core::policy::TransportPriority>, public DdsQosPolicyName +{ +public: + explicit DdsQosTransportPriorityPolicy(int32_t value); + ~DdsQosTransportPriorityPolicy(); +}; + +class DdsQosWriterDataLifecyclePolicy : public DdsNative<::dds::core::policy::WriterDataLifecycle>, public DdsQosPolicyName +{ +public: + explicit DdsQosWriterDataLifecyclePolicy(bool autodisposeUnregisteredInstances); + ~DdsQosWriterDataLifecyclePolicy(); +}; + +class DdsQosUserDataPolicy : public DdsNative<::dds::core::policy::UserData>, public DdsQosPolicyName +{ +public: + explicit DdsQosUserDataPolicy(const std::vector& value); + ~DdsQosUserDataPolicy(); +}; + +} +} + +#endif//__UT_DDS_QOS_POLICY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy_parameter.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy_parameter.hpp new file mode 100644 index 0000000000000000000000000000000000000000..414a864cc5ac21689c642ef14914129108d5d92b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_policy_parameter.hpp @@ -0,0 +1,607 @@ +#ifndef __UT_DDS_QOS_POLICY_PARAMETER_HPP__ +#define __UT_DDS_QOS_POLICY_PARAMETER_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +/* + *---------------------------- + * Supported Qos policy: + * 1. Deadline + * IDL: + * struct DeadlineQosPolicy { + * Duration_t period; + * }; + * + * 2. DestinationOrder + * IDL: + * enum DestinationOrderQosPolicyKind { + * BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, + * BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS + * }; + * struct DestinationOrderQosPolicy { + * DestinationOrderQosPolicyKind kind; + * }; + * + * 3. Durability + * IDL: + * enum DurabilityQosPolicyKind { + * VOLATILE_DURABILITY_QOS, // Least Durability + * TRANSIENT_LOCAL_DURABILITY_QOS, + * TRANSIENT_DURABILITY_QOS, + * PERSISTENT_DURABILITY_QOS // Greatest Durability + * }; + * struct DurabilityQosPolicy { + * DurabilityQosPolicyKind kind; + * }; + * + * 4. DurabilityService + * IDL: + * struct DurabilityServiceQosPolicy { + * Duration_t service_cleanup_delay; + * HistoryQosPolicyKind history_kind; + * long history_depth; + * long max_samples; + * long max_instances; + * long max_samples_per_instance; + * }; + * + * 5. EntityFactory + * IDL: + * struct EntityFactoryQosPolicy { + * boolean autoenable_created_entities; + * }; + * + * 6. GroupData + * IDL: + * struct GroupDataQosPolicy { + * sequence value; + * }; + * + * 7. History + * IDL: + * enum HistoryQosPolicyKind { + * KEEP_LAST_HISTORY_QOS, + * KEEP_ALL_HISTORY_QOS + * }; + * struct HistoryQosPolicy { + * HistoryQosPolicyKind kind; + * long depth; + * }; + * 8. LatencyBudget + * IDL: + * struct LatencyBudgetQosPolicy { + * Duration_t duration; + * }; + * + * 9. Lifespan + * IDL: + * struct LifespanQosPolicy { + * Duration_t duration; + * } + * + * 10.Liveliness + * IDL: + * enum LivelinessQosPolicyKind { + * AUTOMATIC_LIVELINESS_QOS, + * MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, + * MANUAL_BY_TOPIC_LIVELINESS_QOS + * }; + * struct LivelinessQosPolicy { + * LivelinessQosPolicyKind kind; + * Duration_t lease_duration; + * }; + * + * 11.Ownership + * IDL: + * enum OwnershipQosPolicyKind { + * SHARED_OWNERSHIP_QOS, + * EXCLUSIVE_OWNERSHIP_QOS + * }; + * struct OwnershipQosPolicy { + * OwnershipQosPolicyKind kind; + * }; + * + * 12.OwnershipStrength + * IDL: + * struct OwnershipStrengthQosPolicy { + * long value; + * }; + * + * 13.Partition + * IDL: + * struct PartitionQosPolicy { + * StringSeq name; + * }; + * + * 14.Presentation + * IDL: + * enum PresentationQosPolicyAccessScopeKind { + * INSTANCE_PRESENTATION_QOS, + * TOPIC_PRESENTATION_QOS, + * GROUP_PRESENTATION_QOS + * }; + * struct PresentationQosPolicy { + * PresentationQosPolicyAccessScopeKind access_scope; + * boolean coherent_access; + * boolean ordered_access; + * }; + * + * 15.ReaderDataLifecycle + * IDL: + * struct ReaderDataLifecycleQosPolicy { + * Duration_t autopurge_nowriter_samples_delay; + * Duration_t autopurge_disposed_samples_delay; + * }; + * + * 16.Reliability + * IDL: + * enum ReliabilityQosPolicyKind { + * BEST_EFFORT_RELIABILITY_QOS, + * RELIABLE_RELIABILITY_QOS + * }; + * struct ReliabilityQosPolicy { + * ReliabilityQosPolicyKind kind; + * Duration_t max_blocking_time; + * }; + * 17.ResourceLimits + * IDL: + * struct ResourceLimitsQosPolicy { + * long max_samples; + * long max_instances; + * long max_samples_per_instance; + * }; + * + * 18.TimeBasedFilter + * IDL: + * struct TimeBasedFilterQosPolicy { + * Duration_t minimum_separation; + * }; + * + * 19.TopicData + * IDL: + * struct TopicDataQosPolicy { + * sequence value; + * }; + * + * 20.TransportPriority + * IDL: + * struct TransportPriorityQosPolicy { + * long value; + * }; + * + * 21.UserData + * IDL: + * struct UserDataQosPolicy { + * sequence value; + * }; + * + * 22.WriterDataLifecycle + * IDL: + * struct WriterDataLifecycleQosPolicy { + * boolean autodispose_unregistered_instances; + * }; + * + *------------------------------------------------------------------------------------------------- + * QoS policis corresponding to entity: + * DomainParticipant: [2] { EntityFactory, UserData } + * Topic: [13] { Deadline, DestinationOrder, Durability, DurabilityService, History, + * LatencyBudget, Lifespan, Liveliness, Ownership, Reliability, + * ResourceLimits, TopicData, TransportPriority } + * Publisher: [4] { EntityFactory, GroupData, Partition, Presentation } + * Subscriber: [4] { EntityFactory, GroupData, Partition, Presentation } + * DataWriter: [14] { Deadline, DestinationOrder, Durability, History, LatencyBudget, + * Lifespan, Liveliness, Ownership, OwnershipStrength, Reliability, + * ResourceLimits, TransportPriority, UserData, WriterDataLifecycle } + * DataReader: [12] { Deadline, DestinationOrder, Durability, History, LatencyBudget + * Liveliness, Ownership, Reliability, ReaderDataLifecycle, ResourceLimits, + * TimeBasedFilter, UserData } + *------------------------------------------------------------------------------------------------- + */ + +/* + * Qos policy name + */ +#define UT_DDS_QOS_POLICY_NAME_DEADLINE "Deadline" +#define UT_DDS_QOS_POLICY_NAME_DESTINATION_ORDER "DestinationOrder" +#define UT_DDS_QOS_POLICY_NAME_DURABILITY "Durability" +#define UT_DDS_QOS_POLICY_NAME_DURABILITY_SERVICE "DurabilityService" +#define UT_DDS_QOS_POLICY_NAME_ENTITY_FACTORY "EntityFactory" +#define UT_DDS_QOS_POLICY_NAME_GROUP_DATA "GroupData" +#define UT_DDS_QOS_POLICY_NAME_HISTORY "History" +#define UT_DDS_QOS_POLICY_NAME_LATENCY_BUDGET "LatencyBudget" +#define UT_DDS_QOS_POLICY_NAME_LIFESPAN "Lifespan" +#define UT_DDS_QOS_POLICY_NAME_LIVELINESS "Liveliness" +#define UT_DDS_QOS_POLICY_NAME_OWNERSHIP "Ownership" +#define UT_DDS_QOS_POLICY_NAME_OWNERSHIP_STRENGTH "OwnershipStrength" +#define UT_DDS_QOS_POLICY_NAME_PARTITION "Partition" +#define UT_DDS_QOS_POLICY_NAME_PRESENTATION "Presentation" +#define UT_DDS_QOS_POLICY_NAME_READER_DATA_LIFECYCLE "ReaderDataLifecycle" +#define UT_DDS_QOS_POLICY_NAME_RELIABILITY "Reliability" +#define UT_DDS_QOS_POLICY_NAME_RESOURCE_LIMITS "ResourceLimits" +#define UT_DDS_QOS_POLICY_NAME_TIME_BASED_FILTER "TimeBasedFilter" +#define UT_DDS_QOS_POLICY_NAME_TOPIC_DATA "TopicData" +#define UT_DDS_QOS_POLICY_NAME_TRANSPORT_PRIORITY "TransportPriority" +#define UT_DDS_QOS_POLICY_NAME_WRITER_DATA_LIFECYCLE "WriterDataLifecycle" +#define UT_DDS_QOS_POLICY_NAME_USER_DATA "UserData" + +/* + * Qos Policy Member Name + */ +#define UT_DDS_QOS_POLICY_MEMBER_NAME_KIND "kind" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_PEROID "peroid" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_CLEANUP_DELAY "service_cleanup_delay" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_HISTORY_KIND "history_kind" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_HISTORY_DEPTH "history_depth" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_MAX_SAMPLES "max_samples" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_MAX_INSTANCES "max_instances" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_MAX_SAMPLES_PER_INSTANCE "max_samples_per_instance" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_AUTO_ENABLE "autoenable_created_entities" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_VALUE "value" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_DEPTH "depth" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_DURATION "duration" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_LEASE_DURATION "lease_duration" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_NAME "name" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_ACCESS_SCOPE "access_scope" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_COHERENT_ACCESS "coherent_access" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_ORDERED_ACCESS "ordered_access" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_MAX_BLOCKING_TIME "max_blocking_time" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_AUTODISPOSE_UNREGISETED_INSTANCES "autodispose_unregistered_instances" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_AUTOPURGE_NOWRITER_SAMPLES_DELAY "autopurge_nowriter_samples_delay" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_AUTOPURGE_DISPOSED_SAMPLES_DELAY "autopurge_disposed_samples_delay" +#define UT_DDS_QOS_POLICY_MEMBER_NAME_MIN_SEP "minimum_separation" + +class DdsQosPolicyParameter +{ +public: + DdsQosPolicyParameter(); + virtual ~DdsQosPolicyParameter(); + + virtual void Init(const JsonMap& data) = 0; + + void Update(); + bool Default() const; + +protected: + bool mDefault; +}; + +class DdsQosDeadlinePolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosDeadlinePolicyParameter(); + ~DdsQosDeadlinePolicyParameter(); + + void Init(const JsonMap& data); + int64_t GetPeriod() const; + +private: + int64_t mPeriod; +}; + +class DdsQosDestinationOrderPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosDestinationOrderPolicyParameter(); + ~DdsQosDestinationOrderPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + +private: + int32_t mKind; +}; + +class DdsQosDurabilityPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosDurabilityPolicyParameter(); + ~DdsQosDurabilityPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + +private: + int32_t mKind; +}; + +class DdsQosDurabilityServicePolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosDurabilityServicePolicyParameter(); + ~DdsQosDurabilityServicePolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetCleanupDelay() const; + int32_t GetHistoryKind() const; + int32_t GetHistoryDepth() const; + int32_t GetMaxSamples() const; + int32_t GetMaxInstances() const; + int32_t GetMaxSamplesPerInstance() const; + +private: + int64_t mCleanupDelay; + int32_t mHistoryKind; + int32_t mHistoryDepth; + int32_t mMaxSamples; + int32_t mMaxInstances; + int32_t mMaxSamplesPerInstance; +}; + +class DdsQosEntityFactoryPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosEntityFactoryPolicyParameter(); + ~DdsQosEntityFactoryPolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetAutoEnable() const; + +private: + bool mAutoEnable; +}; + +class DdsQosGroupDataPolicyParameter: public DdsQosPolicyParameter +{ +public: + DdsQosGroupDataPolicyParameter(); + ~DdsQosGroupDataPolicyParameter(); + + void Init(const JsonMap& data); + const std::vector& GetValue() const; + +private: + std::vector mValue; +}; + +class DdsQosHistoryPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosHistoryPolicyParameter(); + ~DdsQosHistoryPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + int32_t GetDepth() const; + +private: + int32_t mKind; + int32_t mDepth; +}; + +class DdsQosLatencyBudgetPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosLatencyBudgetPolicyParameter(); + ~DdsQosLatencyBudgetPolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetDuration() const; + +private: + int64_t mDuration; +}; + +class DdsQosLifespanPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosLifespanPolicyParameter(); + ~DdsQosLifespanPolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetDuration() const; + +private: + int64_t mDuration; +}; + +class DdsQosLivelinessPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosLivelinessPolicyParameter(); + ~DdsQosLivelinessPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + int64_t GetLeaseDuration() const; + +private: + int32_t mKind; + int64_t mLeaseDuration; +}; + +class DdsQosOwnershipPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosOwnershipPolicyParameter(); + ~DdsQosOwnershipPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + +private: + int32_t mKind; +}; + +class DdsQosOwnershipStrengthPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosOwnershipStrengthPolicyParameter(); + ~DdsQosOwnershipStrengthPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetValue() const; + +private: + int32_t mValue; +}; + +class DdsQosPartitionPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosPartitionPolicyParameter(); + ~DdsQosPartitionPolicyParameter(); + + void Init(const JsonMap& data); + + const std::string& GetName() const; + +private: + std::string mName; +}; + +class DdsQosPresentationPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosPresentationPolicyParameter(); + ~DdsQosPresentationPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetAccessScopeKind() const; + bool GetCoherentAccess() const; + bool GetOrderedAccess() const; + +private: + int32_t mAccessScopeKind; + bool mCoherentAccess; + bool mOrderedAccess; +}; + +class DdsQosReaderDataLifecyclePolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosReaderDataLifecyclePolicyParameter(); + ~DdsQosReaderDataLifecyclePolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetAutopurgeNowriterSamplesDelay() const; + int64_t GetAutopurgeDisposedSamplesDelay() const; + +private: + int64_t mAutopurgeNowriterSamplesDelay; + int64_t mAutopurgeDisposedSamplesDelay; +}; + +class DdsQosReliabilityPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosReliabilityPolicyParameter(); + ~DdsQosReliabilityPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetKind() const; + int64_t GetMaxBlockingTime() const; + +private: + int32_t mKind; + int64_t mMaxBlockingTime; +}; + +class DdsQosResourceLimitsPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosResourceLimitsPolicyParameter(); + ~DdsQosResourceLimitsPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetMaxSamples() const; + int32_t GetMaxInstances() const; + int32_t GetMaxSamplesPerInstance() const; + +private: + int32_t mMaxSamples; + int32_t mMaxInstances; + int32_t mMaxSamplesPerInstance; +}; + +class DdsQosTimeBasedFilterPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosTimeBasedFilterPolicyParameter(); + ~DdsQosTimeBasedFilterPolicyParameter(); + + void Init(const JsonMap& data); + + int64_t GetMinSep() const; + +private: + int64_t mMinSep; +}; + +class DdsQosTopicDataPolicyParameter: public DdsQosPolicyParameter +{ +public: + DdsQosTopicDataPolicyParameter(); + ~DdsQosTopicDataPolicyParameter(); + + void Init(const JsonMap& data); + + const std::vector& GetValue() const; + +private: + std::vector mValue; +}; + +class DdsQosTransportPriorityPolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosTransportPriorityPolicyParameter(); + ~DdsQosTransportPriorityPolicyParameter(); + + void Init(const JsonMap& data); + + int32_t GetValue() const; + +private: + int32_t mValue; +}; + +class DdsQosWriterDataLifecyclePolicyParameter : public DdsQosPolicyParameter +{ +public: + DdsQosWriterDataLifecyclePolicyParameter(); + ~DdsQosWriterDataLifecyclePolicyParameter(); + + void Init(const JsonMap& data); + + bool GetAutodisposeUnregisteredInstances() const; + +private: + bool mAutodisposeUnregisteredInstances; +}; + +class DdsQosUserDataPolicyParameter: public DdsQosPolicyParameter +{ +public: + DdsQosUserDataPolicyParameter(); + ~DdsQosUserDataPolicyParameter(); + + void Init(const JsonMap& data); + + const std::vector& GetValue() const; + +private: + std::vector mValue; +}; + +} +} + +#endif//__UT_DDS_QOS_POLICY_PARAMETER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_realize.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_realize.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1ef292992e41e976496985541ca21a87e234bf56 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_qos_realize.hpp @@ -0,0 +1,26 @@ +#ifndef __UT_DDS_QOS_REALIZE_HPP__ +#define __UT_DDS_QOS_REALIZE_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +void Realize(const DdsQosParameter& parameter, DdsParticipantQos& qos); + +void Realize(const DdsQosParameter& parameter, DdsTopicQos& qos); + +void Realize(const DdsQosParameter& parameter, DdsPublisherQos& qos); + +void Realize(const DdsQosParameter& parameter, DdsSubscriberQos& qos); + +void Realize(const DdsQosParameter& parameter, DdsWriterQos& qos); + +void Realize(const DdsQosParameter& parameter, DdsReaderQos& qos); + +} +} + +#endif//__UT_DDS_QOS_REALIZE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_topic_channel.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_topic_channel.hpp new file mode 100644 index 0000000000000000000000000000000000000000..7aa03d071372a8076d8612becf7123f5fad596af --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_topic_channel.hpp @@ -0,0 +1,96 @@ +#ifndef __UT_DDS_TOPIC_CHANNEL_HPP__ +#define __UT_DDS_TOPIC_CHANNEL_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +/* + * @brief: DdsTopicChannelAbstract + */ +class DdsTopicChannelAbstract +{ +public: + virtual bool Write(const void* message, int64_t waitMicrosec) = 0; + virtual int64_t GetLastDataAvailableTime() const = 0; +}; + +using DdsTopicChannelAbstractPtr = std::shared_ptr; + +#define UT_DDS_WAIT_MATCHED_TIME_MICRO_SEC 100000 + +/* + * @brief: DdsTopicChannel + */ +template +class DdsTopicChannel : public DdsTopicChannelAbstract +{ +public: + explicit DdsTopicChannel() + {} + + ~DdsTopicChannel() + {} + + void SetTopic(const DdsParticipantPtr& participant, const std::string& name, const DdsTopicQos& qos) + { + mTopic = DdsTopicPtr(new DdsTopic(participant, name, qos)); + } + + void SetWriter(const DdsPublisherPtr& publisher, const DdsWriterQos& qos) + { + mWriter = DdsWriterPtr(new DdsWriter(publisher, mTopic, qos)); + MicroSleep(UT_DDS_WAIT_MATCHED_TIME_MICRO_SEC); + } + + void SetReader(const DdsSubscriberPtr& subscriber, const DdsReaderQos& qos, const DdsReaderCallback& cb, int32_t queuelen) + { + mReader = DdsReaderPtr(new DdsReader(subscriber, mTopic, qos)); + mReader->SetListener(cb, queuelen); + } + + DdsWriterPtr GetWriter() const + { + return mWriter; + } + + DdsReaderPtr GetReader() const + { + return mReader; + } + + bool Write(const void* message, int64_t waitMicrosec) + { + return Write(*(const MSG*)message, waitMicrosec); + } + + bool Write(const MSG& message, int64_t waitMicrosec) + { + return mWriter->Write(message, waitMicrosec); + } + + int64_t GetLastDataAvailableTime() const + { + if (mReader) + { + return mReader->GetLastDataAvailableTime(); + } + + return 0; + } + +private: + DdsTopicPtr mTopic; + DdsWriterPtr mWriter; + DdsReaderPtr mReader; +}; + +template +using DdsTopicChannelPtr = std::shared_ptr>; + +} +} + +#endif//__UT_DDS_TOPIC_CHANNEL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_traits.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_traits.hpp new file mode 100644 index 0000000000000000000000000000000000000000..418886a13da6bd48c08c412e78a4ced39867c830 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/dds/dds_traits.hpp @@ -0,0 +1,18 @@ +#ifndef __UT_DDS_TRAINTS_HPP__ +#define __UT_DDS_TRAINTS_HPP__ + +namespace unitree +{ +namespace common +{ +#include + +#define DdsGetTypeName(TYPE) \ + org::eclipse::cyclonedds::topic::TopicTraits::getTypeName() + +#define DdsIsKeyless(TYPE) \ + org::eclipse::cyclonedds::topic::TopicTraits::isKeyless() + +} +} +#endif//__UT_DDS_TRAINTS_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/decl.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/decl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5b5aae71458560499a720155672dc12731932902 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/decl.hpp @@ -0,0 +1,92 @@ +#ifndef __UT_DECL_HPP__ +#define __UT_DECL_HPP__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __GLIBC__ +#define UT_UNLIKELY(x) __builtin_expect(!!(x), 0) +#define UT_LIKELY(x) __builtin_expect(!!(x), 1) +#else +#define UT_UNLIKELY(x) (x) +#define UT_LIKELY(x) (x) +#endif//__GLIBC__ + +#define __UT_CAT(x, y) x##y +#define UT_CAT(x, y) __UT_CAT(x, y) + +#define __UT_STR(x) #x +#define UT_STR(x) __UT_STR(x) + +#define UT_QUEUE_MAX_LEN INT_MAX +#define UT_PATH_MAX_LEN 1024 +#define UT_THREAD_NAME_MAX_LEN 16 + +#define UT_DECL_ERR(name, code, desc) \ + const int32_t name = code; const std::string name##_DESC = desc; + +#define UT_DESC_ERR(name) name##_DESC + +#ifndef SYS_gettid +#define SYS_gettid __NR_gettid +#endif//SYS_gettid + +#define UT_SAFE_DEL(x) \ + if ((x) != NULL) { delete (x); (x) = NULL; } + +namespace unitree +{ +namespace common +{ +static const std::string UT_EMPTY_STR = ""; +} +} + +#endif//__UT_DECL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ad9530042dbac78a7bd40448ba76900deee401e6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/error.hpp @@ -0,0 +1,25 @@ +#ifndef __UT_ERROR_HPP__ +#define __UT_ERROR_HPP__ + +#include + +namespace unitree +{ +//Declare error +UT_DECL_ERR(UT_OK, 0, "Success") +UT_DECL_ERR(UT_ERR_COMMON, 1001, "common error") +UT_DECL_ERR(UT_ERR_BADCAST, 1002, "Bad cast error") +UT_DECL_ERR(UT_ERR_FUTURE, 1003, "Future error") +UT_DECL_ERR(UT_ERR_FUTURE_FAULT,1004, "Future fault error") +UT_DECL_ERR(UT_ERR_JSON, 1005, "Json data error") +UT_DECL_ERR(UT_ERR_SYSTEM, 1006, "System error") +UT_DECL_ERR(UT_ERR_FILE, 1007, "File operation error") +UT_DECL_ERR(UT_ERR_SOCKET, 1008, "Socket operaton error") +UT_DECL_ERR(UT_ERR_IO, 1009, "IO operaton error") +UT_DECL_ERR(UT_ERR_LOCK, 1010, "Lock operation error") +UT_DECL_ERR(UT_ERR_NETWORK, 1011, "Network error") +UT_DECL_ERR(UT_ERR_TIMEOUT, 1012, "Timeout error") +UT_DECL_ERR(UT_ERR_UNKNOWN, -1, "Unknown error") +} + +#endif//__UT_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/exception.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/exception.hpp new file mode 100644 index 0000000000000000000000000000000000000000..72558eb8ccf1725258d26a00727c962b9a95bbac --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/exception.hpp @@ -0,0 +1,203 @@ +#ifndef __UT_EXCEPTION_HPP__ +#define __UT_EXCEPTION_HPP__ + +#include + +#define UT_MAX_TRACE_ADDR_NUMBER 64 + +namespace unitree +{ +namespace common +{ +class Exception : public std::exception +{ +public: + Exception() throw() + : Exception(UT_ERR_UNKNOWN, UT_DESC_ERR(UT_ERR_UNKNOWN)) + {} + + Exception(int32_t code, const std::string& message) throw() + : mCode(code), mMessage(message), mLine(0) + {} + + virtual ~Exception() + {} + + int32_t GetCode() const + { + return mCode; + } + + const std::string& GetMessage() const + { + return mMessage; + } + + virtual const char* what() const noexcept + { + return mMessage.c_str(); + } + + virtual std::string GetClassName() const + { + return "Exception"; + } + + void Init(const char* file, const char* func, int32_t line) + { + mFile = file; + mFunc = func; + mLine = line; + } + + std::string ToString() const + { + std::ostringstream os; + AddDetail(os); + + return os.str(); + } + + std::string StackTrace() const + { + std::ostringstream os; + AddDetail(os); + AddBackTrace(os); + + return os.str(); + } + +protected: + void AddDetail(std::ostringstream& os) const + { + os << "Catch " << GetClassName() << " code:" << mCode + << ", message:" << mMessage << std::endl; + + if (!mFile.empty() && !mFunc.empty() && mLine > 0) + { + os << " at __FILE__:" << mFile << ", __LINE__:" + << mLine << ", __FUNCTION__:" << mFunc << std::endl; + } + } + + void AddBackTrace(std::ostringstream& os) const + { + os << "Stack:" << std::endl; + + void* addr[UT_MAX_TRACE_ADDR_NUMBER]; + int32_t number = backtrace(addr, UT_MAX_TRACE_ADDR_NUMBER); + + char **info = backtrace_symbols(addr, number); + if(info == NULL) + { + return; + } + + for(int32_t i=0; i + +namespace unitree +{ +namespace common +{ +typedef std::pair DIRENT_INFO; +typedef std::pair SYMLNK_INFO; + +class Directory +{ +public: + Directory(); + Directory(const std::string& dirName); + + ~Directory(); + + void Open(); + void Open(const std::string& dirName); + + bool IsOpen(); + + void ListFile(std::vector& fileNameList, const std::string& regExpress); + void ListFile(std::vector& fileNameList, bool recurse = true, bool absolute = true); + + void ListDir(std::vector& dirNameList, bool recurse = true, bool absolute = true); + + void List(std::list& fileNameList, std::list& dirNameList, + std::list& symlinkList); + + void Cleanup(); + bool CopyTo(const std::string& dirName, bool deeply = false); + + void Close(); + +private: + void CheckOpen(); + void OpenInner(); + +private: + DIR *mDIR; + std::string mDirName; +}; + +typedef std::shared_ptr DirectoryPtr; + +bool ExistDirectory(const std::string& dirName); + +void CreateDirectory(const std::string& dirName, bool recurse = true, + uint32_t mode = UT_OPEN_MODE_RWX); + +void ListDirectory(const std::string& dirName, std::vector& fileNameList, + const std::string& regExpress); + +void ListDirectory(const std::string& dirName, std::vector& fileNameList, bool recurse = true, bool absolute = true); + +void ListChildDirectory(const std::string& dirName, std::vector& dirNameList, bool recurse = true, bool absolute = true); + +void RemoveDirectory(const std::string& dirName, bool recurse = true); + +void CopyDirectory(const std::string& dirName, const std::string& destDirName, bool deeply); + +} +} +#endif//__UT_DIRECTORY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/file.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/file.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b250dffd7fd83d065eeb6895b06d2545480c0515 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/file.hpp @@ -0,0 +1,127 @@ +#ifndef __UT_FILE_HPP__ +#define __UT_FILE_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class File +{ +public: + File(); + File(const std::string& fileName); + File(const std::string& fileName, int32_t flag); + File(const std::string& fileName, int32_t flag, uint32_t mode); + + virtual ~File(); + + int32_t GetFd() const; + bool IsOpen() const; + + void Open(); + void Open(int32_t flag, uint32_t mode = UT_OPEN_MODE_NONE); + void Open(const std::string& fileName, int32_t flag = UT_OPEN_FLAG_R, + uint32_t mode = UT_OPEN_MODE_NONE); + + void Append(const char* s, int64_t len); + int64_t Write(const char* s, int64_t len); + int64_t Write(const std::string& s); + + int64_t Read(char* s, int64_t len); + int64_t Read(std::string& s, int64_t len); + int64_t ReadAll(std::string& s); + + void SeekBegin(); + void SeekEnd(); + void Seek(int64_t offset, int64_t whence); + + void Sync(); + void Truncate(int64_t len); + + void Close(); + + int64_t Size() const; + +private: + void CheckOpen(); + void OpenInner(); + +private: + std::string mFileName; + int32_t mFd; + int32_t mFlag; + uint32_t mMode; +}; + +typedef std::shared_ptr FilePtr; + +class MMReadFile +{ +public: + MMReadFile(); + MMReadFile(const std::string& fileName); + + virtual ~MMReadFile(); + + int32_t GetFd() const; + bool IsOpen() const; + + void Open(); + void Open(const std::string& fileName); + + int64_t Size() const; + int64_t Read(char* s, int64_t len); + int64_t Read(std::string& s, int64_t len); + int64_t ReadAll(std::string& s); + + void Seek(int64_t offset); + + void Close(); + +public: + void* MMRead(int64_t len, int64_t& canreadlen); + void MMClose(void* ptr, int64_t len); + +private: + void Init(); + +private: + std::string mFileName; + int32_t mFd; + int64_t mOffset; + int64_t mSize; +}; + +typedef std::shared_ptr MMReadFilePtr; + +//Functions +bool ExistFile(const std::string& fileName); + +std::string LoadFile(const std::string& fileName); +std::string LoadFileEx(const std::string& fileName); + +void SaveFile(const std::string& fileName, const char* s, int64_t len, + uint32_t mode = UT_OPEN_MODE_RW); + +void SaveFile(const std::string& fileName, const std::string& s, + uint32_t mode = UT_OPEN_MODE_RW); + +void AppendFile(const std::string& fileName, const char* s, int64_t len, + uint32_t mode = UT_OPEN_MODE_RW); + +void AppendFile(const std::string& fileName, const std::string& s, + uint32_t mode = UT_OPEN_MODE_RW); + +int64_t GetFileSize(const std::string& fileName); + +void RemoveFile(const std::string& fileName); + +int64_t MMLoadFile(const std::string& fileName, std::string& s); + +bool CopyFile(const std::string& fileName, const std::string& destFileName, bool deeply = false); +} +} + +#endif//__UT_FILE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/filesystem.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/filesystem.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3f1573fc580cb4dc77904765706751e1e5a30b64 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/filesystem/filesystem.hpp @@ -0,0 +1,284 @@ +#ifndef __UT_FILE_SYSTEM_HPP__ +#define __UT_FILE_SYSTEM_HPP__ + +#include + +#define UT_FILE_READ_SIZE 65536 //64K +#define UT_FILE_READ_BIGGER_SIZE 262144 //256K + +#define UT_FD_INVALID -1 +#define UT_FD_STDIN STDIN_FILENO +#define UT_FD_STDOUT STDOUT_FILENO +#define UT_FD_STDERR STDERR_FILENO + +#define UT_PATH_DELIM_CHAR '/' +#define UT_PATH_DELIM_STR "/" +#define UT_PATH_TRIM_DELIM_STR " \t\r\n" + +#define NOT_FLAG(f, flag) \ + (((f) & (flag)) != (flag)) + +#define HAS_FLAG(f, flag) \ + (((f) & (flag)) == (flag)) + +#define SET_FLAG(f, flag) \ + (f) |= (flag) + +#define IS_RDONLY_FLAG(f) \ + ((f & O_ACCMODE) == O_RDONLY) + +namespace unitree +{ +namespace common +{ +enum +{ + UT_OPEN_FLAG_R = O_RDONLY, + UT_OPEN_FLAG_W = O_WRONLY, + UT_OPEN_FLAG_RW = O_RDWR, + UT_OPEN_FLAG_T = O_TRUNC, + UT_OPEN_FLAG_A = O_APPEND, + UT_OPEN_FLAG_S = O_SYNC, + UT_OPEN_FLAG_C = O_CREAT, + UT_OPEN_FLAG_CW = O_CREAT | O_WRONLY, + UT_OPEN_FLAG_CWT = O_CREAT | O_WRONLY | O_TRUNC, + UT_OPEN_FLAG_CA = O_CREAT | O_RDWR | O_APPEND, + UT_OPEN_FLAG_CS = O_CREAT | O_RDWR | O_SYNC, + UT_OPEN_FLAG_CAS = O_CREAT | O_RDWR | O_APPEND | O_SYNC, + UT_OPEN_FLAG_CTS = O_CREAT | O_RDWR | O_TRUNC | O_SYNC +}; + +enum +{ + UT_OPEN_MODE_NONE = 0, + UT_OPEN_MODE_RW = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, + UT_OPEN_MODE_RWX = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH +}; + +enum +{ + UT_OPEN_MASK_000 = 0, + UT_OPEN_MASK_022 = 0022 +}; + +typedef struct dirent DIRENT; + +/* + * FileSystemHelper + */ +class FileSystemHelper +{ +public: + static FileSystemHelper* Instance() + { + static FileSystemHelper inst; + return &inst; + } + + /* + * File Functions + */ + int32_t Open(const std::string& fileName, int32_t flag, uint32_t mode = 0); + + int64_t Write(int32_t fd, const char* s, int64_t len); + int64_t Write(int32_t fd, const std::string& s); + + int64_t Read(int32_t fd, char* s, int64_t len); + int64_t Read(int32_t fd, std::string& s, int64_t len); + int64_t ReadAll(int32_t fd, std::string& s); + + int64_t Seek(int32_t fd, int64_t offset, int64_t whence); + + bool Stat(int32_t fd, struct stat& statbuf); + void Truncate(int32_t fd, int64_t len); + void Sync(int32_t fd); + void Close(int32_t fd); + + /* + * Directory Functions + */ + DIR* Opendir(const std::string& dirName); + DIRENT* Readdir(DIR* dir); + void Closedir(DIR* dir); + + void Makedir(const std::string& dirName, uint32_t mode = UT_OPEN_MODE_RWX, + bool ignoreExist = true); + void MakedirRecurse(const std::string& dirName, uint32_t mode = UT_OPEN_MODE_RWX); + + /* + * stat Function + */ + bool Stat(const std::string& name, struct stat& statbuf); + bool StatL(const std::string& name, struct stat& statbuf); + bool IsFile(const struct stat& statbuf); + bool IsDirectory(const struct stat& statbuf); + bool IsSymlink(const struct stat& statbuf); + bool ExistFile(const std::string& name); + bool ExistDirectory(const std::string& name); + bool Exist(const std::string& name); + + int64_t GetFileSize(const std::string& fileName); + + /* + * Symlink Function + */ + std::string GetSymlink(const std::string& symlinkName); + bool Symlink(const std::string& targetFileName, const std::string& symlinkName); + + /* + * Remove and Rename Function + */ + void RemoveFile(const std::string& fileName, bool ignoreNoExist = true); + void RemoveDirectory(const std::string& dirName, bool ignoreNoExist = true); + + void Remove(const std::string& name, bool ignoreNoExist = true); + void Rename(const std::string& oldName, const std::string& newName); + + /* + * Path proccess Function + */ + std::string& NormalizePath(std::string& s, bool withEndDelim = true); + std::string GetFatherDirectory(const std::string& s, bool withEndDelim = true); + std::string GetFileName(const std::string& s); + std::string GetLastName(const std::string& s); + + /* + * Realpath + */ + std::string GetRealName(const std::string& name); + + bool IsSame(const std::string& name1, const std::string& name2); + + /* + * MMap Function + */ + void* MmapRead(int32_t fd, int64_t offset, int64_t len); + void Munmap(void *addr, int64_t len); + + /* + * Mode and Owner + */ + bool Chmod(const std::string& name, mode_t mode); + bool Chown(const std::string& name, uid_t uid, gid_t gid); + + bool ChmodL(const std::string& name, mode_t mode); + bool ChownL(const std::string& name, uid_t uid, gid_t gid); + + bool UTime(const std::string& name, struct utimbuf& times); + bool UTime(const std::string& name, struct timeval times[2]); + + bool Chattr(const std::string& name, const struct stat& statbuf); + + /* + * ParseModeString + * @param s: like "0755", "0666", "766" + * return mode + */ + uint32_t ParseModeString(const std::string& s); + +private: + FileSystemHelper(); + ~FileSystemHelper(); + +private: + int32_t mOldMask; +}; + +/* + * FDCloser + */ +class FDCloser +{ +public: + explicit FDCloser() : + mFd(UT_FD_INVALID) + {} + + explicit FDCloser(int32_t fd) : + mFd(fd) + {} + + ~FDCloser() + { + Close(); + } + + void SetFd(int32_t fd) + { + //close old fd + Close(); + //set new fd + mFd = fd; + } + +private: + void Close() + { + if (mFd > 0) + { + FileSystemHelper::Instance()->Close(mFd); + mFd = UT_FD_INVALID; + } + } + +private: + int32_t mFd; +}; + +/* + * DIRCloser + */ +class DIRCloser +{ +public: + explicit DIRCloser() : + mDIR(NULL) + {} + + explicit DIRCloser(DIR* dir) : + mDIR(dir) + {} + + ~DIRCloser() + { + Close(); + } + + void SetDir(DIR* dir) + { + //close old dir + Close(); + //set new dir + mDIR = dir; + } + +private: + void Close() + { + if (mDIR != NULL) + { + FileSystemHelper::Instance()->Closedir(mDIR); + mDIR = NULL; + } + } + +private: + DIR* mDIR; +}; + +//Function +void Remove(const std::string& name); +void Rename(const std::string& oldName, const std::string& newName); + +std::string NormalizePath(const std::string& s, bool withEndDelim = false); +std::string GetFatherDirectory(const std::string& s, bool withEndDelim = false); +std::string GetFileName(const std::string& s); +std::string GetLastName(const std::string& s); + +void Chattr(const std::string& name, const struct stat& statbuf); +void Copyattr(const std::string& name, const std::string& templateName); +} + +} + +#endif//__UT_FILE_SYSTEM_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c3183f21d91b2175835082a73d5ceefc149bf69a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json.hpp @@ -0,0 +1,39 @@ +#ifndef __UT_JSON_HPP__ +#define __UT_JSON_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +typedef std::map JsonMap; +typedef std::vector JsonArray; + +Any FromJsonString(const std::string& s); + +std::string ToJsonString(const Any& a, bool pretty = false); + +static inline bool IsNull(const Any& a) +{ + return a.Empty(); +} + +static inline bool IsJsonArray(const Any& a) +{ + return a.GetTypeInfo() == typeid(JsonArray); +} + +static inline bool IsJsonMap(const Any& a) +{ + return a.GetTypeInfo() == typeid(JsonMap); +} + +static inline bool IsJsonObject(const Any& a) +{ + return IsJsonMap(a); +} + +} +} +#endif//__UT_JSON_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json_config.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json_config.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bb1a3a8ca62c888701910fee3b54d070be04d5c5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/json_config.hpp @@ -0,0 +1,194 @@ +#ifndef __UT_JSON_CONFIG_HPP__ +#define __UT_JSON_CONFIG_HPP__ + +#include + +#define UT_JSON_CONF_KEY_PARAMETER "Parameter" + +namespace unitree +{ +namespace common +{ +class JsonConfig +{ +public: + JsonConfig(); + virtual ~JsonConfig(); + + JsonConfig(const std::string& configFileName); + + virtual void Parse(const std::string& configFileName); + virtual void ParseContent(const std::string& content); + + //top-level field + bool Has(const std::string& name) const; + + //top-level field + const Any& Get(const std::string& name) const; + + //top-level field + template + const T& Get(const std::string& name) const + { + return AnyCast(Get(name)); + } + + //top-level field + template + T GetNumber(const std::string& name) const + { + return AnyNumberCast(Get(name)); + } + + //top-level field + template + T Get(const std::string& name, const T& defValue) const + { + const Any& a = Get(name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyCast(a); + } + } + + //top-level field + template + T GetNumber(const std::string& name, const T& defValue) const + { + const Any& a = Get(name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyNumberCast(a); + } + } + + //JsonMap field + bool Has(const JsonMap& jsonMap, const std::string& name) const; + + //JsonMap field + const Any& Get(const JsonMap& jsonMap, const std::string& name) const; + + //JsonMap field + template + const T& Get(const JsonMap& jsonMap, const std::string& name) const + { + return AnyCast(Get(jsonMap, name)); + } + + //JsonMap field + template + T GetNumber(const JsonMap& jsonMap, const std::string& name) const + { + return AnyNumberCast(Get(jsonMap, name)); + } + + //JsonMap field + template + T Get(const JsonMap& jsonMap, const std::string& name, const T& defValue) const + { + const Any& a = Get(jsonMap, name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyCast(a); + } + } + + //JsonMap field + template + T GetNumber(const JsonMap& jsonMap, const std::string& name, const T& defValue) const + { + const Any& a = Get(jsonMap, name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyNumberCast(a); + } + } + + //top-level field + const Any& GetGlobalParameter(const std::string& name) const; + + //top-level field: Parameter + bool HasParameter(const std::string& name) const; + + //top-level field: Parameter + const JsonMap& GetParameter() const; + + //get field/value from top-level field: Parameter + const Any& GetParameter(const std::string& name) const; + + //get field/value from top-level field: Parameter + template + const T& GetParameter(const std::string& name) const + { + return AnyCast(GetParameter(name)); + } + + //get field/value from top-level field: Parameter + template + T GetNumberParameter(const std::string& name) const + { + return AnyNumberCast(GetParameter(name)); + } + + //get field/value from top-level field: Parameter + template + T GetParameter(const std::string& name, const T& defValue) const + { + const Any& a = GetParameter(name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyCast(a); + } + } + + template + T GetNumberParameter(const std::string& name, const T& defValue) const + { + const Any& a = GetParameter(name); + + if (a.Empty()) + { + return defValue; + } + else + { + return AnyNumberCast(a); + } + } + +protected: + JsonMap mParameter; + Any mContent; +}; + +typedef std::shared_ptr JsonConfigPtr; + +} +} + +#endif//__UT_JSON_CONFIG_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/jsonize.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/jsonize.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3cdec1e3d698053b0b537a2a8bf37abf9cd3eefd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/json/jsonize.hpp @@ -0,0 +1,275 @@ +#ifndef __UT_JSONIZE_HPP__ +#define __UT_JSONIZE_HPP__ + +#define JN_FROM_WEAK(m, name, value) \ + if (m.find(name) != m.end()){ JN_FROM(m, name, value); } + +#define JN_FROM(m, name, value) \ + unitree::common::FromJson(m[name], value) + +#define JN_TO(m, name, value) \ + unitree::common::ToJson(value, m[name]) + +#include + +namespace unitree +{ +namespace common +{ +template +void FromJson(const Any& a, T& t); + +template +void ToJson(const T& value, Any& a); + +template +void FromJsonString(const std::string& s, T& t) +{ + Any a = FromJsonString(s); + FromJson(a, t); +} + +template +std::string ToJsonString(const T& t, bool pretty = false) +{ + Any a; + ToJson(t, a); + return ToJsonString(a, pretty); +} + +class Jsonize +{ +public: + virtual void toJson(JsonMap& a) const = 0; + virtual void fromJson(JsonMap& a) = 0; +}; + +void FromAny(const Any& a, int8_t& value); + +void FromAny(const Any& a, uint8_t& value); + +void FromAny(const Any& a, int16_t& value); + +void FromAny(const Any& a, uint16_t& value); + +void FromAny(const Any& a, int32_t& value); + +void FromAny(const Any& a, uint32_t& value); + +void FromAny(const Any& a, int64_t& value); + +void FromAny(const Any& a, uint64_t& value); + +void FromAny(const Any& a, float& value); + +void FromAny(const Any& a, double& value); + +void FromAny(const Any& a, bool& value); + +void FromAny(const Any& a, std::string& value); + +void FromAny(const Any& a, JsonMap& value); + +void FromAny(const Any& a, JsonArray& value); + +void FromAny(const Any& a, Jsonize& value); + +template +void FromAny(const Any& a, std::vector& value) +{ + if (a.Empty()) + { + return; + } + + const JsonArray& arr = AnyCast(a); + size_t i, count = arr.size(); + + for (i=0; i(a_in, e); + value.push_back(std::move(e)); + } +} + +template +void FromAny(const Any& a, std::list& value) +{ + if (a.Empty()) + { + return; + } + + const JsonArray& arr = AnyCast(a); + size_t i, count = arr.size(); + + for (i=0; i(a_in, e); + value.push_back(std::move(e)); + } +} + +template +void FromAny(const Any& a, std::set& value) +{ + if (a.Empty()) + { + return; + } + + const JsonArray& arr = AnyCast(a); + size_t i, count = arr.size(); + + for (i=0; i(a_in, e); + value.insert(std::move(e)); + } +} + +template +void FromAny(const Any& a, std::map& value) +{ + if (a.Empty()) + { + return; + } + + const JsonMap& m = AnyCast(a); + JsonMap::const_iterator iter; + + for (iter = m.begin(); iter != m.end(); ++iter) + { + E e; + const std::string& name = iter->first; + const Any& a_in = iter->second; + FromJson(a_in, e); + value[name] = std::move(e); + } +} + +template +void FromJson(const Any& a, T& t) +{ + FromAny(a, t); +} + +void ToAny(const int8_t& value, Any& a); + +void ToAny(const uint8_t& value, Any& a); + +void ToAny(const int16_t& value, Any& a); + +void ToAny(const uint16_t& value, Any& a); + +void ToAny(const int32_t& value, Any& a); + +void ToAny(const uint32_t& value, Any& a); + +void ToAny(const int64_t& value, Any& a); + +void ToAny(const uint64_t& value, Any& a); + +void ToAny(const float& value, Any& a); + +void ToAny(const double& value, Any& a); + +void ToAny(const bool& value, Any& a); + +void ToAny(const std::string& value, Any& a); + +void ToAny(const JsonMap& value, Any& a); + +void ToAny(const JsonArray& value, Any& a); + +void ToAny(const Jsonize& value, Any& a); + +template +void ToAny(const std::vector& value, Any& a) +{ + JsonArray arr; + + size_t i, count = value.size(); + for (i=0; i(e, a_in); + arr.push_back(std::move(a_in)); + } + + a = Any(arr); +} + +template +void ToAny(const std::list& value, Any& a) +{ + JsonArray arr; + + typename std::list::const_iterator iter; + for (iter = value.begin(); iter != value.end(); ++iter) + { + Any a_in; + const E& e = *iter; + + ToJson(e, a_in); + arr.push_back(std::move(a_in)); + } + + a = Any(arr); +} + +template +void ToAny(const std::set& value, Any& a) +{ + JsonArray arr; + + typename std::set::const_iterator iter; + for (iter = value.begin(); iter != value.end(); ++iter) + { + Any a_in; + const E& e = *iter; + + ToJson(e, a_in); + arr.push_back(std::move(a_in)); + } + + a = Any(arr); +} + +template +void ToAny(const std::map& value, Any& a) +{ + JsonMap m; + typename std::map::const_iterator iter; + + for (iter = value.begin(); iter != value.end(); ++iter) + { + Any a_in; + const std::string& name = iter->first; + const E& e = iter->second; + + ToJson(e, a_in); + m[name] = a_in; + } + + a = Any(m); +} + +template +void ToJson(const T& value, Any& a) +{ + //std::cout << typeid(value).name() << std::endl; + ToAny(value, a); +} +} +} +#endif//__UT_JSONIZE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/lock/lock.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/lock/lock.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2edbad880cbf62e4e4b72f69a92de1b32b74d800 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/lock/lock.hpp @@ -0,0 +1,198 @@ +#ifndef __UT_LOCK_HPP__ +#define __UT_LOCK_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +enum +{ + UT_LOCK_MODE_READ = 0, + UT_LOCK_MODE_WRITE = 1, + UT_LOCK_MODE_UNLCK = 2 +}; + +enum +{ + UT_LOCK_ENO_INTR = EINTR, + UT_LOCK_ENO_BUSY = EBUSY, + UT_LOCK_ENO_TIMEDOUT = ETIMEDOUT +}; + +class Spinlock +{ +public: + explicit Spinlock(); + ~Spinlock(); + + void Lock(); + void Unlock(); + + bool Trylock(); + + pthread_spinlock_t & GetNative(); + +private: + pthread_spinlock_t mNative; +}; + +class CaspinLock +{ +public: + explicit CaspinLock(); + ~CaspinLock(); + + void Lock(); + void Unlock(); + + bool Trylock(); + +private: + volatile int32_t mData; +}; + +class Mutex +{ +public: + explicit Mutex(); + ~Mutex(); + + void Lock(); + void Unlock(); + + bool Trylock(); + + pthread_mutex_t & GetNative(); + +private: + pthread_mutex_t mNative; +}; + +class Cond +{ +public: + explicit Cond(); + ~Cond(); + + void Wait(Mutex& mutex); + bool Wait(Mutex& mutex, uint64_t microsec); + + void Notify(); + void NotifyAll(); + +private: + pthread_cond_t mNative; +}; + +class MutexCond +{ +public: + explicit MutexCond(); + ~MutexCond(); + + void Lock(); + void Unlock(); + + bool Wait(int64_t microsec = 0); + void Notify(); + void NotifyAll(); + +private: + Mutex mMutex; + Cond mCond; +}; + +class Rwlock +{ +public: + explicit Rwlock(); + ~Rwlock(); + + void Lock(int32_t mode); + void Unlock(); + + bool Trylock(int32_t mode); + + pthread_rwlock_t & GetNative(); + +private: + pthread_rwlock_t mNative; +}; + +class Filelock +{ +public: + explicit Filelock(const std::string& fileName); + explicit Filelock(int32_t fd); + ~Filelock(); + + void Lock(int32_t mode, int64_t start = 0, int64_t len = 0); + void Unlock(); + + bool Trylock(int32_t mode, int64_t start = 0, int64_t len = 0); + +private: + void SetLockMember(int32_t mode, int64_t start, int64_t len); + void SetLockMode(int32_t mode); + +private: + int32_t mFd; + bool mCloseFd; + struct flock mLock; +}; + +template +class LockGuard +{ +public: + explicit LockGuard(LOCK_TYPE& lockPtr) + { + mLockPtr = &lockPtr; + mLockPtr->Lock(); + } + + explicit LockGuard(LOCK_TYPE* lockPtr) + { + mLockPtr = lockPtr; + mLockPtr->Lock(); + } + + ~LockGuard() + { + mLockPtr->Unlock(); + } + +private: + LOCK_TYPE* mLockPtr; +}; + +template +class RwLockGuard +{ +public: + explicit RwLockGuard(LOCK_TYPE& lockPtr, int32_t mode) + { + mLockPtr = &lockPtr; + lockPtr.Lock(mode); + } + + explicit RwLockGuard(LOCK_TYPE* lockPtr, int32_t mode) + { + mLockPtr = lockPtr; + lockPtr->Lock(mode); + } + + ~RwLockGuard() + { + mLockPtr->Unlock(); + } + +private: + LOCK_TYPE* mLockPtr; +}; +} +} + +#endif//__UT_LOCK_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d950eb24ecfe1e28c88ac8a3035474bb7e6387b0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log.hpp @@ -0,0 +1,6 @@ +#ifndef __UT_LOG_HPP__ +#define __UT_LOG_HPP__ + +#include + +#endif//__UT_LOG_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_buffer.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_buffer.hpp new file mode 100644 index 0000000000000000000000000000000000000000..95dfb557da8e9111f693dbe7d53e455a864e9086 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_buffer.hpp @@ -0,0 +1,44 @@ +#ifndef __UT_LOG_BUFFER_HPP__ +#define __UT_LOG_BUFFER_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class LogBuffer +{ +public: + explicit LogBuffer(); + virtual ~LogBuffer(); + + virtual bool Append(const std::string& s); + virtual bool Get(std::string& s); + virtual bool Empty(); + +protected: + std::string mData; +}; + +typedef std::shared_ptr LogBufferPtr; + +class LogBlockBuffer : public LogBuffer +{ +public: + explicit LogBlockBuffer(); + ~LogBlockBuffer(); + + bool Append(const std::string& s); + bool Get(std::string& s); + bool Empty(); + +private: + Mutex mLock; +}; + +typedef std::shared_ptr LogBlockBufferPtr; +} +} + +#endif//__UT_LOG_BUFFER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_decl.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_decl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f3f44f3a9b49156ae78bb8ce4d0ad908414f5922 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_decl.hpp @@ -0,0 +1,261 @@ +#ifndef __UT_LOG_DECL_HPP__ +#define __UT_LOG_DECL_HPP__ + +#include +#include +#include +#include +#include +#include + +/* + * log buffer size + */ +#define UT_LOG_BUFFER_SIZE 65535 //64K-1 +#define UT_LOG_CRT_BUFFER_SIZE 64512 //63K +#define UT_LOG_MAX_BUFFER_SIZE 4194303 //4M-1 +/* + * log file size + */ +#define UT_LOG_FILE_SIZE 104857600 //100M +#define UT_LOG_MAX_FILE_SIZE 10737418240 //10G +#define UT_LOG_MIN_FILE_SIZE UT_LOG_MAX_BUFFER_SIZE + +/* + * log write interval(micro second) + */ +#define UT_LOG_WRITE_INTER 100000 //100ms +#define UT_LOG_MAX_WRITE_INTER 1000000 //1s +#define UT_LOG_MIN_WRITE_INTER 2000 //2ms + +/* + * log file number + */ +#define UT_LOG_FILE_NUMBER 2 +#define UT_LOG_MAX_FILE_NUMBER 100 +#define UT_LOG_MIN_FILE_NUMBER UT_LOG_FILE_NUMBER + +#define UT_LOG_FILE_EXT ".LOG" + +//write log macro wrapper +#define __UT_LOG(logger, level, ...)\ + do { \ + if (logger != NULL) \ + { \ + logger->Log(level, __VA_ARGS__); \ + } \ + } while (0) + +#define __UT_CRIT_LOG(logger, key, code, ...) \ + do { \ + if (logger != NULL) \ + { \ + logger->CritLog(UT_LOG_CRIT, key, code, __VA_ARGS__);\ + } \ + } while (0) + + +//debug +#define LOG_DEBUG(logger, ...) \ + __UT_LOG(logger, UT_LOG_DEBUG, __VA_ARGS__) + +//info +#define LOG_INFO(logger, ...) \ + __UT_LOG(logger, UT_LOG_INFO, __VA_ARGS__) + +//warning +#define LOG_WARNING(logger, ...) \ + __UT_LOG(logger, UT_LOG_WARNING, __VA_ARGS__) + +//error +#define LOG_ERROR(logger, ...) \ + __UT_LOG(logger, UT_LOG_ERROR, __VA_ARGS__) + +//fatal +#define LOG_FATAL(logger, ...) \ + __UT_LOG(logger, UT_LOG_FATAL, __VA_ARGS__) + +//critical log. the 1st args is CRITICAL KEY +#define CRIT_LOG(logger, ...) \ + __UT_CRIT_LOG(logger, __VA_ARGS__) + +#define CRIT_LOG(logger, ...) \ + __UT_CRIT_LOG(logger, __VA_ARGS__) + +//write log format macro wrapper +/* + * FMT_DEBUG(logger, ("key1", val1)("key2", val2)("keyn", "")); + */ +#define __UT_LOG_FMT(logger, level, keyvalues) \ + do { \ + if (logger != NULL) \ + { \ + logger->LogFormat(level, unitree::common::LogBuilder() keyvalues); \ + } \ + } while (0) + +#define __UT_CRIT_LOG_FMT(logger, key, code, keyvalues) \ + do { \ + if (logger != NULL) \ + { \ + logger->CritLogFormat(UT_LOG_CRIT, key, code, unitree::common::LogBuilder() keyvalues); \ + } \ + } while (0) + +//debug +#define FMT_DEBUG(logger, keyvalues) \ + __UT_LOG_FMT(logger, UT_LOG_DEBUG, keyvalues) + +//info +#define FMT_INFO(logger, keyvalues) \ + __UT_LOG_FMT(logger, UT_LOG_INFO, keyvalues) + +//warning +#define FMT_WARNING(logger, keyvalues) \ + __UT_LOG_FMT(logger, UT_LOG_WARNING, keyvalues) + +//error +#define FMT_ERROR(logger, keyvalues) \ + __UT_LOG_FMT(logger, UT_LOG_ERROR, keyvalues) + +//fatal +#define FMT_FATAL(logger, keyvalues) \ + __UT_LOG_FMT(logger, UT_LOG_FATAL, keyvalues) + +#define CRIT_FMT(logger, critkey, keyvalues) \ + __UT_CRIT_LOG_FMT(logger, critkey, keyvalues) + + +/* +//declare and define log level +#define UT_LOG_DECL_LEVEL(name, level, desc) \ + const int32_t name = level; \ + const std::string name##_DESC = desc; +#define UT_LOG_DESC_LEVEL(name) name##_DESC +*/ + +//declare and define log store type +#define UT_LOG_DECL_STORE_TYPE(name, type, desc)\ + const int32_t name = type; \ + const std::string name##_DESC = desc; +#define UT_LOG_DESC_STORE_TYPE(name) name##_DESC + +//define log level +#define UT_LOG_NONE 0 +#define UT_LOG_CRIT 1 +#define UT_LOG_FATAL 2 +#define UT_LOG_ERROR 3 +#define UT_LOG_WARNING 4 +#define UT_LOG_INFO 5 +#define UT_LOG_DEBUG 6 +#define UT_LOG_ALL 7 + +#define UT_LOG_DESC_NONE "NONE" +#define UT_LOG_DESC_CRIT "CRIT" +#define UT_LOG_DESC_FATAL "FATAL" +#define UT_LOG_DESC_ERROR "ERROR" +#define UT_LOG_DESC_WARNING "WARNING" +#define UT_LOG_DESC_INFO "INFO" +#define UT_LOG_DESC_DEBUG "DEBUG" +#define UT_LOG_DESC_ALL "ALL" + +//define log store type +#define UT_LOG_STORE_FILE_ASYNC 0 +#define UT_LOG_STORE_FILE 1 +#define UT_LOG_STORE_STDOUT 2 +#define UT_LOG_STORE_STDERR 3 + +#define UT_LOG_STORE_DESC_FILE_ASYNC "FILEASYNC" +#define UT_LOG_STORE_DESC_ASYNC_FILE "ASYNCFILE" +#define UT_LOG_STORE_DESC_ASYNC "ASYNC" +#define UT_LOG_STORE_DESC_FILE "FILE" +#define UT_LOG_STORE_DESC_STDOUT "STDOUT" +#define UT_LOG_STORE_DESC_STDERR "STDERR" + +namespace unitree +{ +namespace common +{ +static inline int32_t GetLogLevel(const std::string& desc) +{ + if (desc == UT_LOG_DESC_NONE) { + return UT_LOG_NONE; } + else if (desc == UT_LOG_DESC_CRIT) { + return UT_LOG_CRIT; } + else if (desc == UT_LOG_DESC_FATAL) { + return UT_LOG_FATAL; } + else if (desc == UT_LOG_DESC_ERROR) { + return UT_LOG_ERROR; } + else if (desc == UT_LOG_DESC_WARNING) { + return UT_LOG_WARNING; } + else if (desc == UT_LOG_DESC_INFO) { + return UT_LOG_INFO; } + else if (desc == UT_LOG_DESC_DEBUG) { + return UT_LOG_DEBUG; } + else if (desc == UT_LOG_DESC_ALL) { + return UT_LOG_ALL; } + + UT_THROW(CommonException, std::string("unknown log level desc:") + desc); +} + +static inline const char* GetLogLevelDesc(int32_t level) +{ + switch (level) + { + case UT_LOG_NONE: + return UT_LOG_DESC_NONE; + case UT_LOG_CRIT: + return UT_LOG_DESC_CRIT; + case UT_LOG_FATAL: + return UT_LOG_DESC_FATAL; + case UT_LOG_ERROR: + return UT_LOG_DESC_ERROR; + case UT_LOG_WARNING: + return UT_LOG_DESC_WARNING; + case UT_LOG_INFO: + return UT_LOG_DESC_INFO; + case UT_LOG_DEBUG: + return UT_LOG_DESC_DEBUG; + case UT_LOG_ALL: + return UT_LOG_DESC_ALL; + } + + UT_THROW(CommonException, "unknown log level"); +} + +static inline int32_t GetLogStoreType(const std::string& desc) +{ + if (desc == UT_LOG_STORE_DESC_FILE_ASYNC || + desc == UT_LOG_STORE_DESC_ASYNC_FILE || + desc == UT_LOG_STORE_DESC_ASYNC) { + return UT_LOG_STORE_FILE_ASYNC; } + else if (desc == UT_LOG_STORE_DESC_FILE) { + return UT_LOG_STORE_FILE; } + else if (desc == UT_LOG_STORE_DESC_STDOUT){ + return UT_LOG_STORE_STDOUT; } + else if (desc == UT_LOG_STORE_DESC_STDERR){ + return UT_LOG_STORE_STDERR; } + + UT_THROW(CommonException, std::string("unknown log store type desc:") + desc); +} + +static inline const char* GetLogStoreTypeDesc(int32_t type) +{ + switch (type) + { + case UT_LOG_STORE_FILE_ASYNC: + return UT_LOG_STORE_DESC_FILE_ASYNC; + case UT_LOG_STORE_FILE: + return UT_LOG_STORE_DESC_FILE; + case UT_LOG_STORE_STDOUT: + return UT_LOG_STORE_DESC_STDOUT; + case UT_LOG_STORE_STDERR: + return UT_LOG_STORE_DESC_STDERR; + } + + UT_THROW(CommonException, "unknown log store type"); +} +} +} + +#endif//__UT_LOG_DECL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_initor.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_initor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b353692fd5bdea6fc7a2a35b2d9e82d171845c48 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_initor.hpp @@ -0,0 +1,44 @@ +#ifndef __UT_LOG_INITOR_HPP__ +#define __UT_LOG_INITOR_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace common +{ +class LogInitor +{ +public: + explicit LogInitor(); + ~LogInitor(); + + void Init(const std::string& configFileName, bool stdoutDefault = false); + Logger* GetLogger(const std::string& tag); + + void Final(); + + void ParseConf(Any json); + void SetStdoutPolicy(); + void InitLogger(); + +private: + std::set mStoreNames; + std::vector mPolicis; + std::vector mStorePolicis; + std::map mLoggerMap; +}; + +using LogInitorPtr = std::shared_ptr; + +void LogInit(const std::string& configFileName = "", bool stdoutDefault = false); +void LogFinal(); + +Logger* GetLogger(const std::string& tag); + +} +} + +#endif//__UT_LOG_INITOR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_keeper.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_keeper.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d5f91aee84df674908e45be899a778b5ccd92f0d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_keeper.hpp @@ -0,0 +1,44 @@ +#ifndef __UT_LOG_FILE_KEEPER_H__ +#define __UT_LOG_FILE_KEEPER_H__ + +#include + +namespace unitree +{ +namespace common +{ +class LogKeeper +{ +public: + LogKeeper(LogStorePolicyPtr storePolicyPtr); + ~LogKeeper(); + + LogStorePolicyPtr GetStorePolicy() const; + + bool Append(const std::string& s, bool rotate); + +private: + void Rotate(); + + void AppendFile(const std::string& s); + void OpenFile(); + void CloseFile(); + + void CheckFileSize(); + + std::string MakeRegexExpress(); + +private: + volatile int64_t mFileSize; + std::string mFileName; + std::string mDirectory; + FilePtr mFilePtr; + LogStorePolicyPtr mStorePolicyPtr; +}; + +typedef std::shared_ptr LogKeeperPtr; + +} +} + +#endif//__UT_LOG_FILE_KEEPER_H__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_logger.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_logger.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4e9b9a28b2cb7a627ad14cf065698660863aaf8f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_logger.hpp @@ -0,0 +1,139 @@ +#ifndef __UT_LOGGER_HPP__ +#define __UT_LOGGER_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class LogBuilder +{ +public: + LogBuilder() + {} + + template + LogBuilder& operator()(const std::string& key, const T& value) + { + mOs << "\t" << key << ":" << value; + return *this; + } + + std::ostringstream mOs; +}; + +class Logger +{ +public: + explicit Logger(int32_t level, LogStorePtr storePtr) : + mLevel(level), mStorePtr(storePtr) + {} + + template + void Log(int32_t level, Args&&... args) + { + if (level > mLevel || mStorePtr == NULL) + { + return; + } + + std::ostringstream os; + LogBegin(os, level); + LogPend(os, std::forward(args)...); + LogEnd(os); + + mStorePtr->Append(os.str()); + } + + void LogFormat(int32_t level, LogBuilder& builder) + { + if (level > mLevel || mStorePtr == NULL) + { + return; + } + + std::ostringstream os; + LogBegin(os, level); + LogPendBuilder(os, builder); + LogEnd(os); + + mStorePtr->Append(os.str()); + } + + template + void CritLog(int32_t level, const std::string& key, int32_t code, Args&&... args) + { + if (level > mLevel || mStorePtr == NULL) + { + return; + } + + std::ostringstream os; + LogBegin(os, level); + LogPendCrit(os, key, code); + LogPend(os, std::forward(args)...); + LogEnd(os); + + mStorePtr->Append(os.str()); + } + + void CritLogFormat(int32_t level, const std::string& key, int32_t code, LogBuilder& builder) + { + if (level > mLevel || mStorePtr == NULL) + { + return; + } + + std::ostringstream os; + LogBegin(os, level); + LogPendCrit(os, key, code); + LogPendBuilder(os, builder); + LogEnd(os); + + mStorePtr->Append(os.str()); + } + +private: + void LogPendCrit(std::ostringstream& os, const std::string& key, int32_t code) + { + os << " [__KEY__:" << key << "]"; + os << " [__CODE__:" << code << "]"; + } + + template + void LogPend(std::ostringstream& os, Args&&... args) + { + os << " "; + std::initializer_list{ (os << args, 0)... }; + } + + void LogPendBuilder(std::ostringstream& os, LogBuilder& builder) + { + os << builder.mOs.str(); + } + + void LogBegin(std::ostringstream& os, int32_t level) + { + os << "[" << GetTimeMillisecondString() << "] "; + os << "[" << GetLogLevelDesc(level) << "] "; + os << "[" << OsHelper::Instance()->GetProcessId() << "] "; + os << "[" << OsHelper::Instance()->GetTid() << "]"; + os << std::setprecision(6) << std::fixed; + } + + void LogEnd(std::ostringstream& os) + { + os << std::endl; + } + +private: + int32_t mLevel; + LogStorePtr mStorePtr; +}; + +typedef std::shared_ptr LoggerPtr; +} +} + +#endif//__UT_LOGGER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_policy.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_policy.hpp new file mode 100644 index 0000000000000000000000000000000000000000..505b1c2b4e02c9fdf8980b777f3f49dbceac6085 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_policy.hpp @@ -0,0 +1,52 @@ +#ifndef __UT_LOG_POLICY_HPP__ +#define __UT_LOG_POLICY_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class LogPolicy +{ +public: + LogPolicy(); + LogPolicy(const std::string& tag, int32_t level, const std::string& store); + + void Dump(); + +public: + std::string mTag; + int32_t mLevel; + std::string mStore; +}; + +typedef std::shared_ptr LogPolicyPtr; + +class LogStorePolicy +{ +public: + LogStorePolicy(); + LogStorePolicy(const std::string& name, int32_t type, int32_t fileNumber, int64_t fileSize, + int64_t fileWriteInter = UT_LOG_WRITE_INTER, int32_t cpuId = UT_CPU_ID_NONE, + const std::string& fileName = "", const std::string& directory = ""); + + void Dump(); + +public: + std::string mName; + int32_t mType; + int32_t mFileNumber; + int64_t mFileSize; + int64_t mFileWriteInter; + int32_t mCpuId; + std::string mFileName; + std::string mDirectory; +}; + +typedef std::shared_ptr LogStorePolicyPtr; + +} +} + +#endif//__UT_LOG_POLICY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_store.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_store.hpp new file mode 100644 index 0000000000000000000000000000000000000000..eba6a8e891374946b7c64930cf70d869fd58f22a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_store.hpp @@ -0,0 +1,76 @@ +#ifndef __LOG_STORE_HPP__ +#define __LOG_STORE_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +class LogStore +{ +public: + explicit LogStore() + {} + virtual ~LogStore() + { + mWriterPtr.reset(); + } + + virtual void Append(const std::string& s) = 0; + +protected: + LogWriterPtr mWriterPtr; +}; + +typedef std::shared_ptr LogStorePtr; + +class LogStdoutStore : public LogStore +{ +public: + explicit LogStdoutStore(); + ~LogStdoutStore(); + + void Append(const std::string& s); +}; + +typedef std::shared_ptr LogStdoutStorePtr; + +class LogStderrStore : public LogStore +{ +public: + explicit LogStderrStore(); + ~LogStderrStore(); + + void Append(const std::string& s); +}; + +typedef std::shared_ptr LogStderrStorePtr; + +class LogFileStore : public LogStore +{ +public: + explicit LogFileStore(LogKeeperPtr keeperPtr); + ~LogFileStore(); + + void Append(const std::string& s); +}; + +typedef std::shared_ptr LogFileStorePtr; + +class LogFileAsyncStore : public LogStore +{ +public: + explicit LogFileAsyncStore(LogKeeperPtr keeperPtr); + ~LogFileAsyncStore(); + + void Append(const std::string& s); +}; + +typedef std::shared_ptr LogFileAsyncStorePtr; + +} +} + +#endif//__LOG_STORE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_writer.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_writer.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8b7edd3c08f1af27a3ab39b555e9f84908cfe511 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/log/log_writer.hpp @@ -0,0 +1,88 @@ +#ifndef __LOG_WRITER_HPP__ +#define __LOG_WRITER_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +class LogWriter +{ +public: + virtual void Write(const std::string& s) = 0; +}; + +typedef std::shared_ptr LogWriterPtr; + +class LogDirectWriter : public LogWriter +{ +public: + explicit LogDirectWriter(int32_t fd); + virtual ~LogDirectWriter(); + + void Write(const std::string& s); + +private: + Mutex mLock; + int32_t mFd; +}; + +class LogStdoutWriter : public LogDirectWriter +{ +public: + explicit LogStdoutWriter() : + LogDirectWriter(UT_FD_STDOUT) + {} + ~LogStdoutWriter() + {} +}; + +class LogStderrWriter : public LogDirectWriter +{ +public: + explicit LogStderrWriter() : + LogDirectWriter(UT_FD_STDERR) + {} + ~LogStderrWriter() + {} +}; + +class LogBufferWriter : public LogWriter +{ +public: + explicit LogBufferWriter(LogKeeperPtr keeperPtr); + ~LogBufferWriter(); + + void Write(const std::string& s); + +private: + LogBufferPtr mBufferPtr; + LogKeeperPtr mKeeperPtr; + Mutex mLock; +}; + +class LogAsyncBufferWriter : public LogWriter +{ +public: + explicit LogAsyncBufferWriter(LogKeeperPtr keeperPtr); + ~LogAsyncBufferWriter(); + + void Write(const std::string& s); + +private: + void DoWrite(); + +private: + volatile bool mRotate; + std::string mTempBuf; + LogBufferPtr mBufferPtr; + LogKeeperPtr mKeeperPtr; + ThreadPtr mThreadPtr; + Mutex mLock; +}; +} +} + +#endif//__LOG_WRITER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/os.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/os.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fd0067ef7c90099d0f76e4a5e6338c5d5a7aa914 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/os.hpp @@ -0,0 +1,93 @@ +#ifndef __UT_OS_HPP__ +#define __UT_OS_HPP__ + +#include +#include + +namespace unitree +{ +namespace common +{ +enum UT_SCHED_POLICY +{ + UT_SCHED_POLICY_NORMAL = SCHED_OTHER, + UT_SCHED_POLICY_FIFO = SCHED_FIFO, + UT_SCHED_POLICY_RR = SCHED_RR, + UT_SCHED_POLICY_BATCH = SCHED_BATCH, + UT_SCHED_POLICY_IDLE = SCHED_IDLE, + UT_SCHED_POLICY_DEADLINE = SCHED_DEADLINE +}; + +class OsHelper +{ +public: + static OsHelper* Instance() + { + static OsHelper inst; + return &inst; + } + + uid_t GetUID() const; + gid_t GetGID() const; + std::string GetUser() const; + const struct passwd& GetPasswd() const; + + bool GetPasswd(const std::string& name, struct passwd& pwd); + bool GetUIDAndGID(const std::string& name, uid_t& uid, gid_t& gid); + + int32_t GetProcessorNumber() const; + int32_t GetProcessorNumberConf() const; + + int32_t GetPageSize() const; + + int64_t Align(int64_t len) const; + bool IsAligned(int64_t len) const; + + const std::string& GetHostname() const; + + uint32_t GetProcessId(); + const std::string& GetProcessFileName(); + + std::string GetProcessName(); + std::string GetProcessDirectory(bool withEndDelim = true); + + uint64_t GetThreadId(); + int32_t GetTid(); + + bool GetNetworkInterfaceIps(std::map& networkInterfaceIpMap); + bool GetIps(std::set& ips); + + void CpuSet(const std::string& cpuIds); + void CpuSet(uint64_t threadId, size_t cpuId); + + void SetThreadName(uint64_t threadId, const std::string& name); + + void SetScheduler(int32_t policy, int32_t priority); + void SetScheduler(uint64_t threadId, int32_t policy, int32_t priority); + + void SingletonProcessInstance(); + +private: + OsHelper(); + + void __Getpwuid(); + void __GetProcessor(); + void __GetPageSize(); + void __GetProcessFileName(); + void __GetHostname(); + +private: + uid_t mUID; + struct passwd mPasswd; + int32_t mProcessorNumber; + int32_t mProcessorNumberConf; + int32_t mPageSize; + std::string mHostname; + std::string mProcessFileName; + std::shared_ptr mInstanceLockPtr; +}; + +} +} + +#endif//__UT_OS_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_application.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_application.hpp new file mode 100644 index 0000000000000000000000000000000000000000..024063a5e267fa023743362de567bf4e8f26d3c2 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_application.hpp @@ -0,0 +1,51 @@ +#ifndef __UT_SERVICE_APPLICATION_HPP__ +#define __UT_SERVICE_APPLICATION_HPP__ + +#include + +#define SERVICE_REGISTER(SERVICE) \ +class SERVICE##Register \ +{ \ +public: \ + SERVICE##Register() \ + { \ + unitree::common::ServiceApplication::Instance()->RegistService(); \ + } \ + static SERVICE##Register mRegister; \ +}; \ +SERVICE##Register SERVICE##Register::mRegister = SERVICE##Register(); + +namespace unitree +{ +namespace common +{ +class ServiceApplication +{ +public: + static ServiceApplication* Instance() + { + static ServiceApplication inst; + return &inst; + } + + template + void RegistService() + { + mServicePtr = ServicePtr(new SERVICE()); + } + + void Init(const std::string& configFileName); + void Start(); + void Stop(); + +private: + ServiceApplication(); + +protected: + ServicePtr mServicePtr; +}; + +} +} + +#endif//__UT_SERVICE_APPLICATION_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_base.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_base.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bacf750e975c270faa615080e35522c5986a129a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_base.hpp @@ -0,0 +1,104 @@ +#ifndef __UT_SERVICE_BASE_HPP__ +#define __UT_SERVICE_BASE_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class ServiceBase +{ +public: + ServiceBase(); + virtual ~ServiceBase(); + + virtual void Parse(const std::string& configFileName); + + virtual void Init(); + + virtual void Register(); + + virtual void Start(); + + virtual void Wait(); + + virtual void Stop(); + +protected: + /* + * Parse config content + */ + virtual void ParseConfigContent(const std::string& content); + + /* + * Get field: ServiceName + */ + const std::string& GetServiceName() const; + + /* + * Get field: CpuIds + */ + const std::string& GetCpuIds() const; + + /* + * Get top-level field/value + */ + const Any& GetGlobalParameter(const std::string& name) const; + + /* + * Get top-level field: Parameter + */ + bool HasParameter(const std::string& name) const; + + /* + * Get top-level field: Parameter + */ + const JsonMap& GetParameter() const; + + /* + * Get field from top-level field: Parameter + */ + const Any& GetParameter(const std::string& name) const; + + /* + * Get field from top-level field: Parameter + */ + template + const T& GetParameter(const std::string& name) const + { + return mConfig.GetParameter(name); + } + + /* + * Get field from top-level field: Parameter + */ + template + T GetNumberParameter(const std::string& name) const + { + return mConfig.GetNumberParameter(name); + } + + /* + * Get field from top-level field: Parameter + */ + template + T GetParameter(const std::string& name, const T& defValue) const + { + return mConfig.GetParameter(name, defValue); + } + + template + T GetNumberParameter(const std::string& name, const T& defValue) const + { + return mConfig.GetNumberParameter(name, defValue); + } + +private: + ServiceConfig mConfig; +}; +typedef std::shared_ptr ServicePtr; + +} +} +#endif//__UT_SERVICE_BASE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_config.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_config.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1d78d5ae2ec02287da79c88adcbf17acb4661cdc --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_config.hpp @@ -0,0 +1,37 @@ +#ifndef __UT_SERVICE_CONFIG_HPP__ +#define __UT_SERVICE_CONFIG_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class ServiceConfig : public common::JsonConfig +{ +public: + ServiceConfig(); + virtual ~ServiceConfig(); + + ServiceConfig(const std::string& configFileName); + + virtual void Parse(const std::string& configFileName); + virtual void ParseContent(const std::string& content); + + //top-level field: ServiceName + const std::string& GetServiceName() const; + + //top-level field: CpuIds + const std::string& GetCpuIds() const; + +protected: + std::string mCpuIds; + std::string mServiceName; +}; + +typedef std::shared_ptr ServiceConfigPtr; + +} +} + +#endif//__UT_SERVICE_CONFIG_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_decl.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_decl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..375f31b78028bca0037864cc1d85d14516b6c6e8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/base/service_decl.hpp @@ -0,0 +1,10 @@ +#ifndef __UT_SERVICE_DECL_HPP__ +#define __UT_SERVICE_DECL_HPP__ + +#include +#include +#include +#include +#include + +#endif//__UT_SERVICE_DECL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/dds_service.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/dds_service.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3fe75459e04d87ed4924765fe0e7ce0b753f1d9c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/service/dds_service.hpp @@ -0,0 +1,85 @@ +#ifndef __UT_DDS_SERVICE_HPP__ +#define __UT_DDS_SERVICE_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace common +{ +class DdsService : public ServiceBase +{ +public: + DdsService() + { + mLogger = GetLogger("/unitree/service/dds_service"); + mQuit = false; + } + + virtual ~DdsService() + {} + + virtual void Register() + {} + + virtual void Init() + { + mModel.Init(AnyCast(GetGlobalParameter("DdsParameter"))); + LOG_INFO(mLogger, "parse init dds model success."); + } + + virtual void Start() + {} + + virtual void Wait() + { + while (!mQuit) { sleep(1); } + } + + virtual void Stop() + { + mQuit = true; + } + +public: + virtual void Parse(const std::string& configFileName) + { + ServiceBase::Parse(configFileName); + LOG_INFO(mLogger, "parse config success. filename:", configFileName); + } + +protected: + template + void RegistTopicMessageHandler(const std::string& topic, const DdsMessageHandler& handler) + { + mModel.SetTopic(topic, handler); + LOG_INFO(mLogger, "regist topic reader callback. topic:", topic); + } + + template + void RegistTopic(const std::string& topic) + { + mModel.SetTopic(topic); + LOG_INFO(mLogger, "regist topic. topic:", topic); + } + + /* + * Write message to topic + */ + template + void WriteMessage(const std::string& topic, const MSG& message) + { + mModel.WriteMessage(topic, message); + } + +private: + bool mQuit; + DdsEasyModel mModel; + Logger* mLogger; +}; + +} +} +#endif//__UT_DDS_SERVICE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/string_tool.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/string_tool.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6a861a87290644987770eb81dbde0d0f1f1de44b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/string_tool.hpp @@ -0,0 +1,77 @@ +#ifndef __UT_STRING_TOOL_HPP__ +#define __UT_STRING_TOOL_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +/* + * trim delim + */ +const char UT_TRIM_DELIM_STR[] = {0x09,0x0A,0x0B,0x0C,0x0D,0x20,0x00}; + +/* + * string cast functions + */ +std::string ToString(const char* s); +std::string ToString(const std::string& s); + +/* + * template ToString + */ +template +std::string ToString(const T& t) +{ + return std::to_string(t); +} + +/* + * string functions + */ +void StringTo(const std::string& s, int32_t& val); +void StringTo(const std::string& s, uint32_t& val); +void StringTo(const std::string& s, int64_t& val); +void StringTo(const std::string& s, uint64_t& val); +void StringTo(const std::string& s, float& val); +void StringTo(const std::string& s, double& val); +void StringTo(const std::string& s, long double& val); + +template +T StringTo(const std::string& s) +{ + T t; + StringTo(s, t); + return t; +} + +/* + * string tool functions + */ +std::string& ToUpper(std::string& s); +std::string& ToLower(std::string& s); + +int32_t Compare(const std::string& s1, const std::string& s2, + bool caseSensitive = true); +int32_t Compare(const std::string& s1, size_t pos, size_t len, + const std::string& s2, bool caseSensitive = true); + +std::string& TrimLeft(std::string& s, const std::string& delim = std::string(UT_TRIM_DELIM_STR)); +std::string& TrimRight(std::string& s, const std::string& delim = std::string(UT_TRIM_DELIM_STR)); +std::string& Trim(std::string& s, const std::string& delim = std::string(UT_TRIM_DELIM_STR)); + +void Split(const std::string& s, std::vector& parts, + const std::string& delim); + +bool StartWith(const std::string& s, const std::string& start, + bool caseSensitive = true); + +bool EndWith(const std::string& s, const std::string& end, + bool caseSensitive = true); + +std::string Replace(const std::string& s, const std::string& partten, + const std::string& target); +} +} +#endif//__UT_STRING_TOOL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/future.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/future.hpp new file mode 100644 index 0000000000000000000000000000000000000000..61e03bef7f15b7e6d59834e59e85d29c75ee61b7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/future.hpp @@ -0,0 +1,102 @@ +#ifndef __UT_FUTURE_HPP__ +#define __UT_FUTURE_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class Future +{ +public: + enum + { + DEFER = 0, + READY = 1, + FAULT = 2 + }; + + Future() + {} + + virtual ~Future() + {} + + bool IsDeferred() + { + return GetState() == DEFER; + } + + bool IsReady() + { + return GetState() == READY; + } + + bool IsFault() + { + return GetState() == FAULT; + } + + virtual int32_t GetState() = 0; + virtual bool Wait(int64_t microsec = 0) = 0; + virtual const Any& GetValue(int64_t microsec = 0) = 0; + virtual const Any& GetFaultMessage() = 0; + +public: + virtual void Ready(const Any& value) = 0; + virtual void Fault(const Any& message) = 0; +}; + +typedef std::shared_ptr FuturePtr; + +class FutureWrapper : public Future +{ +public: + FutureWrapper(); + virtual ~FutureWrapper(); + + virtual int32_t GetState() + { + return mFuturePtr->GetState(); + } + + virtual bool Wait(int64_t microsec = 0) + { + return mFuturePtr->Wait(microsec); + } + + virtual const Any& GetValue(int64_t microsec = 0) + { + return mFuturePtr->GetValue(microsec); + } + + virtual const Any& GetFaultMessage() + { + return mFuturePtr->GetFaultMessage(); + } + + std::shared_ptr GetFuture() + { + return mFuturePtr; + } + +public: + virtual void Ready(const Any& value) + { + return mFuturePtr->Ready(value); + } + + virtual void Fault(const Any& message) + { + return mFuturePtr->Fault(message); + } + +protected: + std::shared_ptr mFuturePtr; +}; + +} +} + +#endif//__UT_FUTURE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/recurrent_thread.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/recurrent_thread.hpp new file mode 100644 index 0000000000000000000000000000000000000000..75b70b8da988c6eb2e83c88caa7a17402d6eca04 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/recurrent_thread.hpp @@ -0,0 +1,84 @@ +#ifndef __UT_RECURRENT_THREAD_HPP__ +#define __UT_RECURRENT_THREAD_HPP__ + +#include + +#define UT_THREAD_TIME_INTERVAL_MICROSEC 1000000 + +namespace unitree +{ +namespace common +{ +class RecurrentThread : public Thread +{ +public: + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit RecurrentThread(uint64_t intervalMicrosec, __UT_THREAD_TMPL_FUNC_ARG__) + : mQuit(false), mIntervalMicrosec(intervalMicrosec) + { + //recurrent function + mFunc = std::bind(__UT_THREAD_BIND_FUNC_ARG__); + + //Call Thread::Run for runing thread + if (mIntervalMicrosec == 0) + { + Run(&RecurrentThread::ThreadFunc_0, this); + } + else + { + Run(&RecurrentThread::ThreadFunc, this); + } + } + + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit RecurrentThread(const std::string& name, int32_t cpuId, uint64_t intervalMicrosec, + __UT_THREAD_TMPL_FUNC_ARG__) + : Thread(name, cpuId), mQuit(false), mIntervalMicrosec(intervalMicrosec) + { + //recurrent function + mFunc = std::bind(__UT_THREAD_BIND_FUNC_ARG__); + + //Call Thread::Run for runing thread + if (mIntervalMicrosec == 0) + { + Run(&RecurrentThread::ThreadFunc_0, this); + } + else + { + Run(&RecurrentThread::ThreadFunc, this); + } + } + + virtual ~RecurrentThread(); + + int32_t ThreadFunc(); + int32_t ThreadFunc_0(); + + bool Wait(int64_t microsec = 0); + +private: + volatile bool mQuit; + uint64_t mIntervalMicrosec; + std::function mFunc; +}; + +typedef std::shared_ptr RecurrentThreadPtr; + +__UT_THREAD_DECL_TMPL_FUNC_ARG__ +ThreadPtr CreateRecurrentThread(uint64_t intervalMicrosec, __UT_THREAD_TMPL_FUNC_ARG__) +{ + return ThreadPtr(new RecurrentThread(intervalMicrosec, __UT_THREAD_BIND_FUNC_ARG__)); +} + +__UT_THREAD_DECL_TMPL_FUNC_ARG__ +ThreadPtr CreateRecurrentThreadEx(const std::string& name, int32_t cpuId, uint64_t intervalMicrosec, + __UT_THREAD_TMPL_FUNC_ARG__) +{ + return ThreadPtr(new RecurrentThread(name, cpuId, intervalMicrosec, + __UT_THREAD_BIND_FUNC_ARG__)); +} + +} +} + +#endif//__UT_RECURRENT_THREAD_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2c30f1dd76d5d84a8256e46832730a59722379c1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread.hpp @@ -0,0 +1,79 @@ +#ifndef __UT_THREAD_HPP__ +#define __UT_THREAD_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class Thread : public FutureWrapper +{ +public: + Thread() + : mThreadId(0), mCpuId(UT_CPU_ID_NONE) + {} + + Thread(const std::string& name, int32_t cpuId) + : mThreadId(0), mName(name), mCpuId(cpuId) + {} + + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit Thread(__UT_THREAD_TMPL_FUNC_ARG__) + : Thread() + { + Run(__UT_THREAD_BIND_FUNC_ARG__); + } + + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit Thread(const std::string& name, int32_t cpuId, __UT_THREAD_TMPL_FUNC_ARG__) + : Thread(name, cpuId) + { + Run(__UT_THREAD_BIND_FUNC_ARG__); + } + + virtual ~Thread(); + + uint64_t GetThreadId() const; + + void SetCpu(); + void SetName(); + void SetPriority(int32_t priority); + + void Wrap(); + +protected: + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + void Run(__UT_THREAD_TMPL_FUNC_ARG__) + { + mFunc = std::bind(__UT_THREAD_BIND_FUNC_ARG__); + CreateThreadNative(); + } + + void CreateThreadNative(); + +protected: + pthread_t mThreadId; + std::string mName; + int32_t mCpuId; + std::function mFunc; +}; + +typedef std::shared_ptr ThreadPtr; + +__UT_THREAD_DECL_TMPL_FUNC_ARG__ +static inline ThreadPtr CreateThread(__UT_THREAD_TMPL_FUNC_ARG__) +{ + return ThreadPtr(new Thread(__UT_THREAD_BIND_FUNC_ARG__)); +} + +__UT_THREAD_DECL_TMPL_FUNC_ARG__ +static inline ThreadPtr CreateThreadEx(const std::string& name, int32_t cpuId, __UT_THREAD_TMPL_FUNC_ARG__) +{ + return ThreadPtr(new Thread(name, cpuId, __UT_THREAD_BIND_FUNC_ARG__)); +} + +} +} + +#endif//__UT_THREAD_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_decl.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_decl.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5d3b7dd4ecfbf91f8769ce3f2c042ef8527400c7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_decl.hpp @@ -0,0 +1,20 @@ +#ifndef __UT_THREAD_DECL_HPP__ +#define __UT_THREAD_DECL_HPP__ + +#include +#include +#include +#include + +#define __UT_THREAD_DECL_TMPL_FUNC_ARG__ \ + template + +#define __UT_THREAD_TMPL_FUNC_ARG__ \ + Func&& func, Args&&... args + +#define __UT_THREAD_BIND_FUNC_ARG__ \ + std::forward(func), std::forward(args)... + +#define UT_CPU_ID_NONE -1 + +#endif//__THREAD_DECL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_pool.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_pool.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fb40fee0d04747b0b76013c7668a232a6ab77481 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_pool.hpp @@ -0,0 +1,98 @@ +#ifndef __UT_THREAD_POOL_HPP__ +#define __UT_THREAD_POOL_HPP__ + +#include +#include +#include +#include + +namespace unitree +{ +namespace common +{ +class ThreadPool +{ +public: + enum + { + /* + * minimum threads can be created. + */ + MIN_THREAD_NUMBER = 1, + /* + * maximum threads can be created. + */ + MAX_THREAD_NUMBER = 1000, + /* + * default timeout get task from blockqueue. + * 1 second + */ + QUEUE_GET_TIMEOUT_MICROSEC = 1000000, + /* + * default max queue size. + * as UT_QUEUE_MAX_LEN + */ + MAX_QUEUE_SIZE = UT_QUEUE_MAX_LEN, + /* + * default in queue time in microsecond. + * 7 days + */ + MAX_QUEUE_MICROSEC = 25200000000 + }; + + explicit ThreadPool(uint32_t threadNumber = MIN_THREAD_NUMBER, + uint32_t queueMaxSize = UT_QUEUE_MAX_LEN, + uint64_t taskMaxQueueMicrosec = MAX_QUEUE_MICROSEC); + + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + bool AddTask(__UT_THREAD_TMPL_FUNC_ARG__) + { + return AddTaskInner(ThreadTaskPtr(new ThreadTask(__UT_THREAD_BIND_FUNC_ARG__))); + } + + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + FuturePtr AddTaskFuture(__UT_THREAD_TMPL_FUNC_ARG__) + { + ThreadTaskFuturePtr taskPtr = ThreadTaskFuturePtr( + new ThreadTaskFuture(__UT_THREAD_BIND_FUNC_ARG__)); + + if (AddTaskInner(std::dynamic_pointer_cast(taskPtr))) + { + return taskPtr->GetFuture(); + } + + return FuturePtr(); + } + + int32_t DoTask(); + uint64_t GetTaskSize(); + + bool IsQuit(); + void Quit(bool waitThreadExit = true); + + bool IsTaskOverdue(uint64_t enqueueTime); + +private: + bool AddTaskInner(ThreadTaskPtr taskptr); + + void InitCreateThread(); + void WaitThreadExit(); + +private: + volatile bool mQuit; + + uint32_t mThreadNumber; + uint32_t mTaskQueueMaxSize; + uint64_t mTaskMaxQueueTime; + + BlockQueue mTaskQueue; + std::vector mThreadList; + + Logger* mLogger; +}; + +typedef std::shared_ptr ThreadPoolPtr; + +} +} +#endif//__UT_THREAD_POOL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_task.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_task.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d1f9ba85c30342b5bea8185001124e29a6f5f4b5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/thread/thread_task.hpp @@ -0,0 +1,47 @@ +#ifndef __UT_THREAD_TASK_HPP__ +#define __UT_THREAD_TASK_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +class ThreadTask +{ +public: + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit ThreadTask(__UT_THREAD_TMPL_FUNC_ARG__) + { + mFunc = std::bind(__UT_THREAD_BIND_FUNC_ARG__); + } + + virtual void Execute(); + + void SetEnqueueTime(); + uint64_t GetEnqueueTime() const; + +protected: + uint64_t mEnqueueTimeMicrosec; + std::function mFunc; +}; + +typedef std::shared_ptr ThreadTaskPtr; + +class ThreadTaskFuture : public ThreadTask, public FutureWrapper +{ +public: + __UT_THREAD_DECL_TMPL_FUNC_ARG__ + explicit ThreadTaskFuture(__UT_THREAD_TMPL_FUNC_ARG__) + : ThreadTask(__UT_THREAD_BIND_FUNC_ARG__) + {} + + void Execute(); +}; + +typedef std::shared_ptr ThreadTaskFuturePtr; + +} +} + +#endif//__UT_THREAD_TASK_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/sleep.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/sleep.hpp new file mode 100644 index 0000000000000000000000000000000000000000..031b48182b692bc2e8bdeb1fba128c953670a13f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/sleep.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_SLEEP_HPP__ +#define __UT_SLEEP_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +void MicroSleep(uint64_t microsecond); +void MilliSleep(uint64_t millisecond); +void Sleep(uint64_t second); + +} +} + +#endif//__UT_SLEEP_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/time_tool.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/time_tool.hpp new file mode 100644 index 0000000000000000000000000000000000000000..da1b52ea520f5f0c54f976f4820d016bd58fad52 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/common/time/time_tool.hpp @@ -0,0 +1,81 @@ +#ifndef __UT_TIME_TOOL_HPP__ +#define __UT_TIME_TOOL_HPP__ + +#include + +namespace unitree +{ +namespace common +{ +#define UT_NUMER_NANO 1000000000 +#define UT_NUMER_MICRO 1000000 +#define UT_NUMER_MILLI 1000 + +//default time format: "YEAR-MON-DAY HOUR:MIN:SEC" +#define UT_TIME_FORMAT_STR "%d-%02d-%02d %02d:%02d:%02d" + +//default precise time format: "YEAR-MON-DAY HOUR:MIN:SEC.[MILLI/MICRO]" +#define UT_TIME_MICROSEC_FORMAT_STR "%d-%02d-%02d %02d:%02d:%02d.%06d" +#define UT_TIME_MILLISEC_FORMAT_STR "%d-%02d-%02d %02d:%02d:%02d.%03d" + +void GetCurrentTimeval(struct timeval& tv); +void GetCurrentTimespec(struct timespec& ts); + +uint64_t GetCurrentTime(); +uint64_t GetCurrentTimeNanosecond(); +uint64_t GetCurrentTimeMicrosecond(); +uint64_t GetCurrentTimeMillisecond(); + +uint64_t GetCurrentCpuTimeNanosecond(); +uint64_t GetCurrentThreadCpuTimeNanosecond(); +uint64_t GetCurrentMonotonicTimeNanosecond(); + +uint64_t GetCurrentCpuTimeMicrosecond(); +uint64_t GetCurrentThreadCpuTimeMicrosecond(); +uint64_t GetCurrentMonotonicTimeMicrosecond(); + +uint64_t TimevalToMicrosecond(const struct timeval& tv); +uint64_t TimevalToMillisecond(const struct timeval& tv); + +uint64_t TimespecToMicrosecond(const struct timespec& ts); +uint64_t TimespecToMillisecond(const struct timespec& ts); + +void MicrosecondToTimeval(uint64_t microsec, struct timeval& tv); +void MillisecondToTimeval(uint64_t millisec, struct timeval& tv); + +void MicrosecondToTimespec(uint64_t microsec, struct timespec& ts); +void MillisecondToTimespec(uint64_t millisec, struct timespec& ts); + +std::string TimeFormatString(struct tm* tmptr, const char* format = UT_TIME_FORMAT_STR); +std::string TimeFormatString(struct tm* tmptr, uint64_t precise, const char* format); +std::string TimeFormatString(uint64_t sec, const char* format = UT_TIME_FORMAT_STR); + +std::string TimeMicrosecondFormatString(const uint64_t& microsec, + const char* format = UT_TIME_MICROSEC_FORMAT_STR); + +std::string TimeMillisecondFormatString(const uint64_t& millisec, + const char* format = UT_TIME_MILLISEC_FORMAT_STR); + +std::string GetTimeString(); +std::string GetTimeMicrosecondString(); +std::string GetTimeMillisecondString(); + +class Timer +{ +public: + Timer(); + ~Timer(); + + void Start(); + void Restart(); + + uint64_t Stop(); + +private: + uint64_t mMicrosecond; +}; + +} +} + +#endif//__UT_TIME_TOOL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Publisher.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Publisher.h new file mode 100644 index 0000000000000000000000000000000000000000..2cad08a79307020aacfd6474b83fbe6d8ecb69a2 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Publisher.h @@ -0,0 +1,177 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include +#include + +namespace unitree +{ +namespace robot +{ + +/** + * @brief Base class for convenient publishing to topics. + * This class provides an easy-to-use interface for publishing messages to topics. + * + * @tparam MessageType The type of message being published. + */ +template +class PublisherBase : public unitree::robot::ChannelPublisher +{ +public: + using MsgType = MessageType; + using SharedPtr = std::shared_ptr>; + + PublisherBase(std::string TOPIC_NAME) + : unitree::robot::ChannelPublisher(TOPIC_NAME) + { + this->InitChannel(); + } +}; + +// For details: see https://github.com/ros-controls/realtime_tools +template +class RealTimePublisher +{ +public: + using MsgType = MessageType; + using PublisherSharedPtr = typename unitree::robot::ChannelPublisherPtr; + + MessageType msg_{}; + + explicit RealTimePublisher(PublisherSharedPtr publisher) + : publisher_(publisher), is_running_(false), keep_running_(true), turn_(LOOP_NOT_STARTED) + { + thread_ = std::thread(&RealTimePublisher::publishingLoop, this); + } + + explicit RealTimePublisher(std::string topic) + : RealTimePublisher(std::make_shared>(topic)) + {} + + ~RealTimePublisher() + { + stop(); + while (is_running()) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + if(thread_.joinable()) { thread_.join(); } + } + + void stop() + { + keep_running_ = false; + } + + /** + * @brief Try to get the data lock from realtime + * + * To publish data from the realtime loop, you need to run trylock to + * attenot to get unique access to the msg_ variable. Teylock returns + * true if the lock was aquired, and false otherwise. + */ + bool trylock() + { + if(mutex_.try_lock()) + { + if(turn_ == REALTIME) { + return true; + } else { + mutex_.unlock(); + return false; + } + } else { + return false; + } + } + + /** + * @brief Unlock the msg_ variable and publish it. + */ + void unlockAndPublish() + { + turn_ = NON_REALTIME; + mutex_.unlock(); + } + + /** + * @brief Get the data lock from non-realtime. + * + * To publish data from the realtime loop, you need to run trylock to + * attenot to get unique access to the msg_ variable. Teylock returns + * true if the lock was aquired, and false otherwise. + */ + void lock() + { + // never actually lock on the lock + while (!mutex_.try_lock()) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + } + + /** + * @brief Unlocks the data without publishing anything. + */ + void unlock() { mutex_.unlock(); } + +protected: + virtual void pre_communication() {} // something before sending the message + virtual void post_communication() {} // something after sending the message + +private: + // non-copyable + RealTimePublisher(const RealTimePublisher&) = delete; + RealTimePublisher& operator=(const RealTimePublisher&) = delete; + + + bool is_running() const { return is_running_; } + + void publishingLoop() + { + is_running_ = true; + turn_ = REALTIME; + + while (keep_running_) + { + MsgType outgoing; + + // Locks msg_ and copies it + lock(); + while (turn_ != NON_REALTIME && keep_running_) + { + unlock(); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + lock(); + } + pre_communication(); + outgoing = msg_; + turn_ = REALTIME; + + unlock(); + + if(keep_running_) { + publisher_->Write(outgoing, 0); + } + post_communication(); + } + is_running_ = false; + } + + PublisherSharedPtr publisher_; + std::atomic_bool is_running_; + std::atomic_bool keep_running_; + + std::mutex mutex_; + + std::thread thread_; + + enum { REALTIME, NON_REALTIME, LOOP_NOT_STARTED }; + std::atomic turn_; +}; + +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Subscription.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Subscription.h new file mode 100644 index 0000000000000000000000000000000000000000..51e76cc90c404be3a2ec1078068b4edec52f78ab --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/Subscription.h @@ -0,0 +1,84 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +/** + * @brief Base class for convenient subscription to topics. + * This class provides an easy-to-use interface for subscribing to topics, + * but the continuous background updates may increase CPU usage. + * + * @tparam MessageType The type of message being subscribed to. + */ +template +class SubscriptionBase +{ +public: + using MsgType = MessageType; + using SharedPtr = std::shared_ptr>; + + SubscriptionBase(const std::string& topic, const std::function& handler = nullptr) + { + last_update_time_ = std::chrono::steady_clock::now() - std::chrono::milliseconds(timeout_ms_); + sub_ = std::make_shared>(topic); + if (handler) { + sub_->InitChannel(handler); + } else { + sub_->InitChannel([this](const void *msg){ + last_update_time_ = std::chrono::steady_clock::now(); + std::lock_guard lock(mutex_); + pre_communication(); + msg_ = *(const MessageType*)msg; + post_communication(); + }); + } + } + + void set_timeout_ms(uint32_t timeout_ms) { timeout_ms_ = timeout_ms; } + + bool isTimeout() { + auto now = std::chrono::steady_clock::now(); + auto elasped_time = now - last_update_time_; + return elasped_time > std::chrono::milliseconds(timeout_ms_); + } + + void wait_for_connection() { + auto t0 = std::chrono::steady_clock::now(); + bool warn_info = false; + while(isTimeout()) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + if (!warn_info && std::chrono::steady_clock::now() - t0 > std::chrono::seconds(2)) { + warn_info = true; + spdlog::warn("Waiting for connection {}", sub_->GetChannelName()); + } + } + std::this_thread::sleep_for(std::chrono::milliseconds(100)); // wait for stable communicaiton + if (warn_info) { + spdlog::info("Connected {}", sub_->GetChannelName()); + } + } + + MessageType msg_; + std::mutex mutex_; + +protected: + virtual void pre_communication() {} // something before receiving message + virtual void post_communication() {} // something after receiving message + + uint32_t timeout_ms_{1000}; + unitree::robot::ChannelSubscriberPtr sub_; + std::chrono::steady_clock::time_point last_update_time_; +}; + + +}; // namespace robot +}; // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/crc.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/crc.h new file mode 100644 index 0000000000000000000000000000000000000000..41025ba1fd19b6c0bf8ddaecee4c22548a347d87 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/crc.h @@ -0,0 +1,80 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include + +inline uint16_t crc16_core (const uint8_t *nData, unsigned short wLength){ + static const uint16_t wCRCTable[] = { + 0X0000, 0XC0C1, 0XC181, 0X0140, 0XC301, 0X03C0, 0X0280, 0XC241, + 0XC601, 0X06C0, 0X0780, 0XC741, 0X0500, 0XC5C1, 0XC481, 0X0440, + 0XCC01, 0X0CC0, 0X0D80, 0XCD41, 0X0F00, 0XCFC1, 0XCE81, 0X0E40, + 0X0A00, 0XCAC1, 0XCB81, 0X0B40, 0XC901, 0X09C0, 0X0880, 0XC841, + 0XD801, 0X18C0, 0X1980, 0XD941, 0X1B00, 0XDBC1, 0XDA81, 0X1A40, + 0X1E00, 0XDEC1, 0XDF81, 0X1F40, 0XDD01, 0X1DC0, 0X1C80, 0XDC41, + 0X1400, 0XD4C1, 0XD581, 0X1540, 0XD701, 0X17C0, 0X1680, 0XD641, + 0XD201, 0X12C0, 0X1380, 0XD341, 0X1100, 0XD1C1, 0XD081, 0X1040, + 0XF001, 0X30C0, 0X3180, 0XF141, 0X3300, 0XF3C1, 0XF281, 0X3240, + 0X3600, 0XF6C1, 0XF781, 0X3740, 0XF501, 0X35C0, 0X3480, 0XF441, + 0X3C00, 0XFCC1, 0XFD81, 0X3D40, 0XFF01, 0X3FC0, 0X3E80, 0XFE41, + 0XFA01, 0X3AC0, 0X3B80, 0XFB41, 0X3900, 0XF9C1, 0XF881, 0X3840, + 0X2800, 0XE8C1, 0XE981, 0X2940, 0XEB01, 0X2BC0, 0X2A80, 0XEA41, + 0XEE01, 0X2EC0, 0X2F80, 0XEF41, 0X2D00, 0XEDC1, 0XEC81, 0X2C40, + 0XE401, 0X24C0, 0X2580, 0XE541, 0X2700, 0XE7C1, 0XE681, 0X2640, + 0X2200, 0XE2C1, 0XE381, 0X2340, 0XE101, 0X21C0, 0X2080, 0XE041, + 0XA001, 0X60C0, 0X6180, 0XA141, 0X6300, 0XA3C1, 0XA281, 0X6240, + 0X6600, 0XA6C1, 0XA781, 0X6740, 0XA501, 0X65C0, 0X6480, 0XA441, + 0X6C00, 0XACC1, 0XAD81, 0X6D40, 0XAF01, 0X6FC0, 0X6E80, 0XAE41, + 0XAA01, 0X6AC0, 0X6B80, 0XAB41, 0X6900, 0XA9C1, 0XA881, 0X6840, + 0X7800, 0XB8C1, 0XB981, 0X7940, 0XBB01, 0X7BC0, 0X7A80, 0XBA41, + 0XBE01, 0X7EC0, 0X7F80, 0XBF41, 0X7D00, 0XBDC1, 0XBC81, 0X7C40, + 0XB401, 0X74C0, 0X7580, 0XB541, 0X7700, 0XB7C1, 0XB681, 0X7640, + 0X7200, 0XB2C1, 0XB381, 0X7340, 0XB101, 0X71C0, 0X7080, 0XB041, + 0X5000, 0X90C1, 0X9181, 0X5140, 0X9301, 0X53C0, 0X5280, 0X9241, + 0X9601, 0X56C0, 0X5780, 0X9741, 0X5500, 0X95C1, 0X9481, 0X5440, + 0X9C01, 0X5CC0, 0X5D80, 0X9D41, 0X5F00, 0X9FC1, 0X9E81, 0X5E40, + 0X5A00, 0X9AC1, 0X9B81, 0X5B40, 0X9901, 0X59C0, 0X5880, 0X9841, + 0X8801, 0X48C0, 0X4980, 0X8941, 0X4B00, 0X8BC1, 0X8A81, 0X4A40, + 0X4E00, 0X8EC1, 0X8F81, 0X4F40, 0X8D01, 0X4DC0, 0X4C80, 0X8C41, + 0X4400, 0X84C1, 0X8581, 0X4540, 0X8701, 0X47C0, 0X4680, 0X8641, + 0X8201, 0X42C0, 0X4380, 0X8341, 0X4100, 0X81C1, 0X8081, 0X4040 }; + + uint8_t nTemp; + uint16_t wCRCWord = 0xFFFF; + + while (wLength--){ + nTemp = *nData++ ^ wCRCWord; + wCRCWord >>= 8; + wCRCWord ^= wCRCTable[nTemp]; + } + return wCRCWord; + +} // End: CRC16 + +inline uint32_t crc32_core(uint32_t* ptr, uint32_t len){ + uint32_t xbit = 0; + uint32_t data = 0; + uint32_t CRC32 = 0xFFFFFFFF; + const uint32_t dwPolynomial = 0x04c11db7; + for (uint32_t i = 0; i < len; i++) + { + xbit = 1 << 31; + data = ptr[i]; + for (uint32_t bits = 0; bits < 32; bits++) + { + if (CRC32 & 0x80000000) + { + CRC32 <<= 1; + CRC32 ^= dwPolynomial; + } + else + CRC32 <<= 1; + if (data & xbit) + CRC32 ^= dwPolynomial; + + xbit >>= 1; + } + } + return CRC32; +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/unitree_joystick.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/unitree_joystick.hpp new file mode 100644 index 0000000000000000000000000000000000000000..aff70df0482428e4c017393a5c528e5ab82c709e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/common/unitree_joystick.hpp @@ -0,0 +1,190 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include + +namespace unitree +{ +namespace common +{ + +// ***************************** Unitree Joystick Data Type ***************************** // +typedef union +{ + struct + { + uint8_t R1 : 1; + uint8_t L1 : 1; + uint8_t Start : 1; + uint8_t Select : 1; + uint8_t R2 : 1; + uint8_t L2 : 1; + uint8_t f1 : 1; + uint8_t f2 : 1; + uint8_t A : 1; + uint8_t B : 1; + uint8_t X : 1; + uint8_t Y : 1; + uint8_t up : 1; + uint8_t right : 1; + uint8_t down : 1; + uint8_t left : 1; + } components; + + uint16_t value; +} BtnUnion; + +typedef struct +{ + uint8_t head[2]; + BtnUnion btn; + float lx; + float rx; + float ry; + float L2; + float ly; +} BtnDataStruct; + +typedef union +{ + BtnDataStruct RF_RX; + uint8_t buff[40]; +}REMOTE_DATA_RX; + +// ***************************** Button & Axis ***************************** // + +template // int, bool, string +class Button +{ +public: + void operator()(const T& data){ // update + pressed = (data != dataNull_); + on_pressed = (pressed && data_ == dataNull_); + on_released = (!pressed && data_ != dataNull_); + data_ = data; + } + const T& operator()() { return data_; } + + bool pressed = false; + bool on_pressed = false; + bool on_released = false; +private: + T data_{}, dataNull_{}; +}; + +class Axis +{ +public: + void operator()(const float& data){ // update + auto data_deadzone = std::fabs(data) < deadzone ? 0.0 : data; + double new_data = data_ * (1.0 - smooth) + data_deadzone * smooth; + pressed = (new_data > threshold); + on_pressed = (pressed && data_ < threshold); + on_released = (!pressed && data_ > threshold); + data_ = new_data; + } + + const float& operator()() { return data_; } + + float smooth = 0.03; + float deadzone = 0.01; + + // Change an axis value to a button + bool pressed = false; + bool on_pressed = false; + bool on_released = false; + float threshold{0.5}; +private: + float data_{}; +}; + +// ***************************** Unitree Joystick Interface ***************************** // + +class UnitreeJoystick +{ +public: + UnitreeJoystick() = default; + + // Adopts standard joystick key names + Button back; + Button start; + Button LS; + Button RS; + Button LB; + Button RB; + Button A; + Button B; + Button X; + Button Y; + Button up; + Button down; + Button left; + Button right; + Button F1; + Button F2; + Axis lx; + Axis ly; + Axis rx; + Axis ry; + Axis LT; + Axis RT; + + virtual void update(){}; + + void extract(const REMOTE_DATA_RX& key) + { + back(key.RF_RX.btn.components.Select); + start(key.RF_RX.btn.components.Start); + LB(key.RF_RX.btn.components.L1); + RB(key.RF_RX.btn.components.R1); + F1(key.RF_RX.btn.components.f1); + F2(key.RF_RX.btn.components.f2); + A(key.RF_RX.btn.components.A); + B(key.RF_RX.btn.components.B); + X(key.RF_RX.btn.components.X); + Y(key.RF_RX.btn.components.Y); + up(key.RF_RX.btn.components.up); + down(key.RF_RX.btn.components.down); + left(key.RF_RX.btn.components.left); + right(key.RF_RX.btn.components.right); + LT(key.RF_RX.btn.components.L2); + RT(key.RF_RX.btn.components.R2); + lx(key.RF_RX.lx); + ly(key.RF_RX.ly); + rx(key.RF_RX.rx); + ry(key.RF_RX.ry); + } + + REMOTE_DATA_RX combine() + { + REMOTE_DATA_RX key; + key.RF_RX.btn.components.Select = back(); + key.RF_RX.btn.components.Start = start(); + key.RF_RX.btn.components.L1 = LB(); + key.RF_RX.btn.components.R1 = RB(); + key.RF_RX.btn.components.f1 = F1(); + key.RF_RX.btn.components.f2 = F2(); + key.RF_RX.btn.components.A = A(); + key.RF_RX.btn.components.B = B(); + key.RF_RX.btn.components.X = X(); + key.RF_RX.btn.components.Y = Y(); + key.RF_RX.btn.components.up = up(); + key.RF_RX.btn.components.down = down(); + key.RF_RX.btn.components.left = left(); + key.RF_RX.btn.components.right = right(); + key.RF_RX.btn.components.L2 = LT() > 0.5f ? 1 : 0; + key.RF_RX.btn.components.R2 = RT() > 0.5f ? 1 : 0; + key.RF_RX.lx = lx(); + key.RF_RX.ly = ly(); + key.RF_RX.rx = rx(); + key.RF_RX.ry = ry(); + return key; + } +}; + +} // namespace common +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/defines.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/defines.h new file mode 100644 index 0000000000000000000000000000000000000000..9f752de9ab44950894c7d44f936f92a0493ae3c4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/defines.h @@ -0,0 +1,71 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include + +namespace unitree +{ +namespace robot +{ +namespace g1 +{ + +enum JointIndex{ + // Left leg + LeftHipPitch = 0, + LeftHipRoll = 1, + LeftHipYaw = 2, + LeftKnee = 3, + LeftAnklePitch = 4, + LeftAnkleRoll = 5, + + // Right leg + RightHipPitch = 6, + RightHipRoll = 7, + RightHipYaw = 8, + RightKnee = 9, + RightAnklePitch = 10, + RightAnkleRoll = 11, + + WaistYaw = 12, + WaistRoll = 13, + WaistPitch = 14, + + // Left arm + LeftShoulderPitch = 15, + LeftShoulderRoll = 16, + LeftShoulderYaw = 17, + LeftElbow = 18, + LeftWristRoll = 19, + LeftWristPitch = 20, + LeftWristYaw = 21, + + // Right arm + RightShoulderPitch = 22, + RightShoulderRoll = 23, + RightShoulderYaw = 24, + RightElbow = 25, + RightWristRoll = 26, + RightWristPitch = 27, + RightWristYaw = 28 +}; + +static const std::array ArmJoints = { + JointIndex::LeftShoulderPitch, JointIndex::LeftShoulderRoll, + JointIndex::LeftShoulderYaw, JointIndex::LeftElbow, + JointIndex::LeftWristRoll, JointIndex::LeftWristPitch, + JointIndex::LeftWristYaw, + JointIndex::RightShoulderPitch, JointIndex::RightShoulderRoll, + JointIndex::RightShoulderYaw, JointIndex::RightElbow, + JointIndex::RightWristRoll, JointIndex::RightWristPitch, + JointIndex::RightWristYaw, + JointIndex::WaistYaw, + JointIndex::WaistRoll, + JointIndex::WaistPitch +}; + +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1.h new file mode 100644 index 0000000000000000000000000000000000000000..ec9a11c3ffbe48b25470bfa6beb9345de5fb5d87 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1.h @@ -0,0 +1,18 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include "unitree/dds_wrapper/robots/g1/g1_pub.h" +#include "unitree/dds_wrapper/robots/g1/g1_sub.h" + +namespace unitree +{ +namespace robot +{ +namespace g1 +{ + +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_pub.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_pub.h new file mode 100644 index 0000000000000000000000000000000000000000..2ae1515186ea5b9ecd200c6a0d7df37beeb3d798 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_pub.h @@ -0,0 +1,92 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include "unitree/dds_wrapper/common/crc.h" +#include "unitree/dds_wrapper/common/unitree_joystick.hpp" + +#include +#include +#include + +#include "g1_sub.h" + + +namespace unitree +{ +namespace robot +{ +namespace g1 +{ +namespace publisher +{ + +class LowState : public RealTimePublisher +{ +public: + LowState(std::string topic = "rt/lowstate") : RealTimePublisher(topic) + { + } + std::shared_ptr joystick = nullptr; + +private: + void pre_communication() override { + if (joystick) { + auto data = joystick->combine(); + memcpy(&msg_.wireless_remote()[0], &data, sizeof(unitree::common::REMOTE_DATA_RX)); + } + msg_.crc() = crc32_core((uint32_t*)&msg_, (sizeof(MsgType)>>2)-1); + } + }; + +class LowCmd : public RealTimePublisher +{ +public: + LowCmd(std::string topic = "rt/lowcmd") : RealTimePublisher(topic) + { + } + + bool check_mode_machine(subscription::LowState::SharedPtr lowstate = nullptr) const + { + auto sub = lowstate == nullptr ? std::make_shared() : lowstate; + sub->wait_for_connection(); + auto m_sub = sub->msg_.mode_machine(); + auto m_pub = msg_.mode_machine(); + + // 0: simulation environment + return !(m_sub != 0 && m_sub != m_pub); + } +private: + /** + * @brief Something before sending the message. + */ + void pre_communication() override { + msg_.crc() = crc32_core((uint32_t*)&msg_, (sizeof(MsgType)>>2)-1); + } +}; + +class ArmSdk : public RealTimePublisher +{ +public: + ArmSdk(std::string topic = "rt/arm_sdk") : RealTimePublisher(topic) {} + + // Enable arm sdk + void weight(float coe) + { + msg_.motor_cmd()[29].q() = std::clamp(coe, 0.0f, 1.0f); + } + + float weight () const + { + return msg_.motor_cmd()[29].q(); + } +}; + + +}; // namespace publisher +}; // namespace g1 +}; // namespace robot +}; // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_sub.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_sub.h new file mode 100644 index 0000000000000000000000000000000000000000..38a8eb5c31a8863ea12036633ba8b6557c5f7b38 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/g1/g1_sub.h @@ -0,0 +1,111 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include "unitree/dds_wrapper/common/Subscription.h" +#include "unitree/dds_wrapper/common/unitree_joystick.hpp" +#include "unitree/dds_wrapper/robots/g1/defines.h" + +#include +#include +#include +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +namespace g1 +{ +namespace subscription +{ + +class LowCmd : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + LowCmd(std::string topic = "rt/lowcmd") : SubscriptionBase(topic) {} + +}; + +class ArmSdk : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + ArmSdk(std::string topic = "rt/arm_sdk") : SubscriptionBase(topic) {} + +}; +class LowState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + LowState(std::string topic = "rt/lowstate") : SubscriptionBase(topic) {} + + void update() + { + std::lock_guard lock(mutex_); + // ********** Joystick ********** // + // Check if all joystick values are zero to determine if the joystick is inactive + if(std::all_of(msg_.wireless_remote().begin(), msg_.wireless_remote().end(), [](uint8_t i){return i == 0;})) + { + auto now = std::chrono::system_clock::now(); + auto elasped_time = now - last_joystick_time_; + if(elasped_time > std::chrono::milliseconds(joystick_timeout_ms_)) + { + isJoystickTimeout_ = true; + } + } else { + last_joystick_time_ = std::chrono::system_clock::now(); + isJoystickTimeout_ = false; + } + + // update joystick state + unitree::common::REMOTE_DATA_RX key; + memcpy(&key, &msg_.wireless_remote()[0], 40); + joystick.extract(key); + } + + bool isJoystickTimeout() const { return isJoystickTimeout_; } + unitree::common::UnitreeJoystick joystick; + +private: + uint32_t joystick_timeout_ms_ = 3000; + bool isJoystickTimeout_ = false; + std::chrono::time_point last_joystick_time_; +}; + +class InspireHandState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + InspireHandState(std::string topic = "rt/inspire/state") : SubscriptionBase(topic) {} +}; + +class Dex3LeftHandState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + Dex3LeftHandState(std::string topic = "rt/dex3/left/state") : SubscriptionBase(topic) {} +}; + +class Dex3RightHandState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + Dex3RightHandState(std::string topic = "rt/dex3/right/state") : SubscriptionBase(topic) {} +}; + +} // namespace subscription +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/defines.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/defines.h new file mode 100644 index 0000000000000000000000000000000000000000..45c8bba60f4ad508fdf9be9df44a00b777ab6bb8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/defines.h @@ -0,0 +1,32 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ + +enum class JointIndex{ + FR_Hip = 0, + FR_Thigh = 1, + FR_Calf = 2, + FL_Hip = 3, + FL_Thigh = 4, + FL_Calf = 5, + RR_Hip = 6, + RR_Thigh = 7, + RR_Calf = 8, + RL_Hip = 9, + RL_Thigh = 10, + RL_Calf = 11, +}; + +} // namespace go2 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2.h new file mode 100644 index 0000000000000000000000000000000000000000..8602cc2e8d487ce09d728c305826ca32acddb149 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2.h @@ -0,0 +1,37 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ + +// Close the default controller +// Run this function before publishing to rt/lowcmd. +inline void shutdown() +{ + auto msc = std::make_shared(); + msc->SetTimeout(3.f); + msc->Init(); + + std::string form, name; + while (msc->CheckMode(form, name), !name.empty()) { + if (msc->ReleaseMode()) { + spdlog::warn("Failed to switch to Release Mode."); + } + sleep(3); + } +} + +} // namespace go2 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_pub.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_pub.h new file mode 100644 index 0000000000000000000000000000000000000000..1d139f6f4ed0289563f0fee6459209a5e7e7c068 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_pub.h @@ -0,0 +1,129 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include "unitree/dds_wrapper/common/Publisher.h" +#include "unitree/dds_wrapper/common/crc.h" +#include "unitree/dds_wrapper/common/unitree_joystick.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +namespace publisher +{ + +class LowCmd : public RealTimePublisher +{ +public: + LowCmd(std::string topic = "rt/lowcmd") + : RealTimePublisher(topic) + { + msg_.head() = {0xFE, 0xEF}; + msg_.level_flag() = 0xFF; + + for (auto & m : msg_.motor_cmd()) m.mode(1); + } + +private: + /** + * @brief Something before sending the message. + */ + void pre_communication() override { + msg_.crc() = crc32_core((uint32_t*)&msg_, (sizeof(MsgType)>>2)-1); + } +}; + + +class LowState : public RealTimePublisher +{ +public: + LowState(std::string topic = "rt/lowstate") + : RealTimePublisher(topic) + {} + + std::shared_ptr joystick = nullptr; + +private: + void pre_communication() override { + if (joystick) { + unitree::common::REMOTE_DATA_RX key = joystick->combine(); + memcpy(&msg_.wireless_remote()[0], &key, sizeof(unitree::common::REMOTE_DATA_RX)); + } + msg_.crc() = crc32_core((uint32_t*)&msg_, (sizeof(MsgType)>>2)-1); + } +}; + +class SportModeState : public RealTimePublisher +{ +public: + SportModeState(std::string topic = "rt/sportmodestate") + : RealTimePublisher(topic) + { + } +}; + +class WirelessController : public RealTimePublisher +{ +public: + WirelessController(std::string topic = "rt/wirelesscontroller") + : RealTimePublisher(topic) + { + } + + std::shared_ptr joystick = nullptr; + +private: + void pre_communication() override { + if (joystick) { + msg_.lx() = joystick->lx(); + msg_.ly() = joystick->ly(); + msg_.rx() = joystick->rx(); + msg_.ry() = joystick->ry(); + msg_.keys() = joystick->combine().RF_RX.btn.value; + } + } +}; + +class MotorCmds : public RealTimePublisher +{ +public: + MotorCmds(std::string topic, int num = 1) + : RealTimePublisher(topic) + { + msg_.cmds().resize(num); + } +}; + +class MotorStates : public RealTimePublisher +{ +public: + MotorStates(std::string topic, int num = 1) + : RealTimePublisher(topic) + { + msg_.states().resize(num); + } +}; + +} // namespace publisher +} // namespace go2 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_sub.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_sub.h new file mode 100644 index 0000000000000000000000000000000000000000..973f8eafe51807faa97f9521805a539c3a6d6942 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/dds_wrapper/robots/go2/go2_sub.h @@ -0,0 +1,128 @@ +// Copyright (c) 2025, Unitree Robotics Co., Ltd. +// All rights reserved. + +#pragma once + +#include +#include +#include +#include "unitree/dds_wrapper/common/Subscription.h" +#include "unitree/dds_wrapper/common/unitree_joystick.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ + +namespace subscription +{ + +class LowState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + LowState(std::string topic = "rt/lowstate") : SubscriptionBase(topic) {} + + void update() + { + std::lock_guard lock(mutex_); + // ********** Joystick ********** // + // Check if all joystick values are zero to determine if the joystick is inactive + if(std::all_of(msg_.wireless_remote().begin(), msg_.wireless_remote().end(), [](uint8_t i){return i == 0;})) + { + auto now = std::chrono::system_clock::now(); + auto elasped_time = now - last_joystick_time_; + if(elasped_time > std::chrono::milliseconds(joystick_timeout_ms_)) + { + isJoystickTimeout_ = true; + } + } else { + last_joystick_time_ = std::chrono::system_clock::now(); + isJoystickTimeout_ = false; + } + + // update joystick state + unitree::common::REMOTE_DATA_RX key; + memcpy(&key, &msg_.wireless_remote()[0], 40); + joystick.extract(key); + } + + bool isJoystickTimeout() const { return isJoystickTimeout_; } + + unitree::common::UnitreeJoystick joystick; + +private: + uint32_t joystick_timeout_ms_ = 3000; + bool isJoystickTimeout_ = false; + std::chrono::time_point last_joystick_time_; +}; + +class LowCmd : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + LowCmd(std::string topic = "rt/lowcmd") : SubscriptionBase(topic) {} +}; + +class SportModeState : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + SportModeState(std::string topic = "rt/sportmodestate") : SubscriptionBase(topic) {} + + const uint32_t gaitType() const { return msg_.gait_type(); } + + const Eigen::Vector3f position() const { + return Eigen::Map(msg_.position().data()); + } + const Eigen::Vector3f velocity() const{ + return Eigen::Map(msg_.velocity().data()); + } +}; + +class MotorStates : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + MotorStates(std::string topic, int num = 0) : SubscriptionBase(topic) + { + if (num != 0) msg_.states().resize(num); + } +}; + +class MotorCmds : public SubscriptionBase +{ +public: + using SharedPtr = std::shared_ptr; + + MotorCmds(std::string topic, int num = 0) : SubscriptionBase(topic) + { + if (num != 0) msg_.cmds().resize(num); + } +}; + + +} // namespace subscriber +} // namespace go2 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/AudioData_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/AudioData_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2bd6d9231f5cbd32f7bcf25f4672cdfde6141304 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/AudioData_.hpp @@ -0,0 +1,351 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: AudioData_.idl + Source: AudioData_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP +#define DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class AudioData_ +{ +private: + uint64_t time_frame_ = 0; + std::vector data_; + +public: + AudioData_() = default; + + explicit AudioData_( + uint64_t time_frame, + const std::vector& data) : + time_frame_(time_frame), + data_(data) { } + + uint64_t time_frame() const { return this->time_frame_; } + uint64_t& time_frame() { return this->time_frame_; } + void time_frame(uint64_t _val_) { this->time_frame_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + + bool operator==(const AudioData_& _other) const + { + (void) _other; + return time_frame_ == _other.time_frame_ && + data_ == _other.data_; + } + + bool operator!=(const AudioData_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::AudioData_>::getTypeName() +{ + return "unitree_go::msg::dds_::AudioData_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::AudioData_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::AudioData_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_map_blob_sz() { return 270; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_map_blob() { + static const uint8_t blob[] = { + 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d, + 0x95, 0xbc, 0x6d, 0xad, 0xc9, 0xa2, 0xe8, 0x00, 0x38, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x2d, 0x24, 0x8b, 0x17, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x8d, 0x77, 0x7f, 0x38, 0x8f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x53, 0x16, 0x41, + 0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf, 0x39, 0x1a, 0x93, 0x00, 0x77, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x5f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, + 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0x53, 0x16, 0x41, 0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf, 0x39, 0x1a, 0x93, 0xf1, + 0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d, 0x95, 0xbc, 0x6d, 0xad, 0xc9, 0xa2, 0xe8, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d, 0x95, 0xbc, 0x6d, 0xad, + 0xc9, 0xa2, 0xe8, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x53, 0x16, 0x41, 0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf, + 0x39, 0x1a, 0x93, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::AudioData_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::AudioData_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::AudioData_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::AudioData_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::AudioData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::AudioData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::AudioData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::AudioData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e635d334c1dfd666a07c9cea74fa32dacf51c6f0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsCmd_.hpp @@ -0,0 +1,321 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: BmsCmd_.idl + Source: BmsCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class BmsCmd_ +{ +private: + uint8_t off_ = 0; + std::array reserve_ = { }; + +public: + BmsCmd_() = default; + + explicit BmsCmd_( + uint8_t off, + const std::array& reserve) : + off_(off), + reserve_(reserve) { } + + uint8_t off() const { return this->off_; } + uint8_t& off() { return this->off_; } + void off(uint8_t _val_) { this->off_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const BmsCmd_& _other) const + { + (void) _other; + return off_ == _other.off_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const BmsCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::getTypeName() +{ + return "unitree_go::msg::dds_::BmsCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_map_blob_sz() { return 278; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x56, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, + 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32, 0x62, 0xd4, 0x8d, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, + 0x34, 0x22, 0x33, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, + 0x6d, 0x73, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x6f, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, + 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, + 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, + 0xed, 0x4a, 0x23, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, + 0x34, 0x22, 0x33, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::BmsCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::BmsCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::BmsCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.off())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.off())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.off())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.off())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..00828053c05e814ebfac8874f711d56c59b8922e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/BmsState_.hpp @@ -0,0 +1,651 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: BmsState_.idl + Source: BmsState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class BmsState_ +{ +private: + uint8_t version_high_ = 0; + uint8_t version_low_ = 0; + uint8_t status_ = 0; + uint8_t soc_ = 0; + int32_t current_ = 0; + uint16_t cycle_ = 0; + std::array bq_ntc_ = { }; + std::array mcu_ntc_ = { }; + std::array cell_vol_ = { }; + +public: + BmsState_() = default; + + explicit BmsState_( + uint8_t version_high, + uint8_t version_low, + uint8_t status, + uint8_t soc, + int32_t current, + uint16_t cycle, + const std::array& bq_ntc, + const std::array& mcu_ntc, + const std::array& cell_vol) : + version_high_(version_high), + version_low_(version_low), + status_(status), + soc_(soc), + current_(current), + cycle_(cycle), + bq_ntc_(bq_ntc), + mcu_ntc_(mcu_ntc), + cell_vol_(cell_vol) { } + + uint8_t version_high() const { return this->version_high_; } + uint8_t& version_high() { return this->version_high_; } + void version_high(uint8_t _val_) { this->version_high_ = _val_; } + uint8_t version_low() const { return this->version_low_; } + uint8_t& version_low() { return this->version_low_; } + void version_low(uint8_t _val_) { this->version_low_ = _val_; } + uint8_t status() const { return this->status_; } + uint8_t& status() { return this->status_; } + void status(uint8_t _val_) { this->status_ = _val_; } + uint8_t soc() const { return this->soc_; } + uint8_t& soc() { return this->soc_; } + void soc(uint8_t _val_) { this->soc_ = _val_; } + int32_t current() const { return this->current_; } + int32_t& current() { return this->current_; } + void current(int32_t _val_) { this->current_ = _val_; } + uint16_t cycle() const { return this->cycle_; } + uint16_t& cycle() { return this->cycle_; } + void cycle(uint16_t _val_) { this->cycle_ = _val_; } + const std::array& bq_ntc() const { return this->bq_ntc_; } + std::array& bq_ntc() { return this->bq_ntc_; } + void bq_ntc(const std::array& _val_) { this->bq_ntc_ = _val_; } + void bq_ntc(std::array&& _val_) { this->bq_ntc_ = _val_; } + const std::array& mcu_ntc() const { return this->mcu_ntc_; } + std::array& mcu_ntc() { return this->mcu_ntc_; } + void mcu_ntc(const std::array& _val_) { this->mcu_ntc_ = _val_; } + void mcu_ntc(std::array&& _val_) { this->mcu_ntc_ = _val_; } + const std::array& cell_vol() const { return this->cell_vol_; } + std::array& cell_vol() { return this->cell_vol_; } + void cell_vol(const std::array& _val_) { this->cell_vol_ = _val_; } + void cell_vol(std::array&& _val_) { this->cell_vol_ = _val_; } + + bool operator==(const BmsState_& _other) const + { + (void) _other; + return version_high_ == _other.version_high_ && + version_low_ == _other.version_low_ && + status_ == _other.status_ && + soc_ == _other.soc_ && + current_ == _other.current_ && + cycle_ == _other.cycle_ && + bq_ntc_ == _other.bq_ntc_ && + mcu_ntc_ == _other.mcu_ntc_ && + cell_vol_ == _other.cell_vol_; + } + + bool operator!=(const BmsState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::BmsState_>::getTypeName() +{ + return "unitree_go::msg::dds_::BmsState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::BmsState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_map_blob_sz() { return 642; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xde, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, + 0xc2, 0xe0, 0x37, 0x0c, 0xec, 0x4c, 0xbb, 0x00, 0xc6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x75, 0x6a, 0xda, 0x84, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x51, 0x99, 0x89, 0x90, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x9a, 0xcb, 0x44, 0x54, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc7, 0xd5, 0xf8, 0x49, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x43, 0xb5, 0xc9, 0x17, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x9a, 0x4c, 0x07, 0x40, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x2a, 0x42, 0xc9, 0x1e, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x55, 0x65, 0x52, 0x17, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x2d, 0x87, + 0xc3, 0x55, 0x00, 0x00, 0x73, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xd8, 0x57, + 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, 0xfd, 0x14, 0x3d, 0x00, 0x5b, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x62, 0x71, 0x5f, 0x6e, 0x74, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6d, 0x63, 0x75, 0x5f, 0x6e, 0x74, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, + 0xfd, 0x14, 0x3d, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, 0x37, 0x0c, 0xec, + 0x4c, 0xbb, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, 0x37, 0x0c, + 0xec, 0x4c, 0xbb, 0x00, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, + 0xfd, 0x14, 0x3d, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::BmsState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::BmsState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::BmsState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::BmsState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.status())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.bq_ntc()[0], instance.bq_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.mcu_ntc()[0], instance.mcu_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.status())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.bq_ntc()[0], instance.bq_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.mcu_ntc()[0], instance.mcu_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.status())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.bq_ntc()[0], instance.bq_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.mcu_ntc()[0], instance.mcu_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.status())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.bq_ntc()[0], instance.bq_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.mcu_ntc()[0], instance.mcu_ntc().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/ConfigChangeStatus_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/ConfigChangeStatus_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6b021c7d8629db408e7f940d6f995b29cffd26fb --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/ConfigChangeStatus_.hpp @@ -0,0 +1,309 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: ConfigChangeStatus_.idl + Source: ConfigChangeStatus_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP +#define DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class ConfigChangeStatus_ +{ +private: + std::string name_; + std::string content_; + +public: + ConfigChangeStatus_() = default; + + explicit ConfigChangeStatus_( + const std::string& name, + const std::string& content) : + name_(name), + content_(content) { } + + const std::string& name() const { return this->name_; } + std::string& name() { return this->name_; } + void name(const std::string& _val_) { this->name_ = _val_; } + void name(std::string&& _val_) { this->name_ = _val_; } + const std::string& content() const { return this->content_; } + std::string& content() { return this->content_; } + void content(const std::string& _val_) { this->content_ = _val_; } + void content(std::string&& _val_) { this->content_ = _val_; } + + bool operator==(const ConfigChangeStatus_& _other) const + { + (void) _other; + return name_ == _other.name_ && + content_ == _other.content_; + } + + bool operator!=(const ConfigChangeStatus_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::getTypeName() +{ + return "unitree_go::msg::dds_::ConfigChangeStatus_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_map_blob_sz() { return 266; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xab, 0x72, 0x41, 0x14, 0x34, 0x88, + 0x06, 0xaa, 0x92, 0xd1, 0x55, 0xf0, 0xe9, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xb0, 0x68, 0x93, 0x1c, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x9a, 0x03, 0x64, 0xb9, + 0x8e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xf8, 0x3d, 0x36, 0xf2, 0x55, 0x84, + 0x27, 0x72, 0xfc, 0x68, 0x2f, 0x66, 0xf5, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x08, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xf8, 0x3d, + 0x36, 0xf2, 0x55, 0x84, 0x27, 0x72, 0xfc, 0x68, 0x2f, 0x66, 0xf5, 0xf1, 0x8b, 0xab, 0x72, 0x41, + 0x14, 0x34, 0x88, 0x06, 0xaa, 0x92, 0xd1, 0x55, 0xf0, 0xe9, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xab, 0x72, 0x41, 0x14, 0x34, 0x88, 0x06, 0xaa, 0x92, 0xd1, + 0x55, 0xf0, 0xe9, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xf8, 0x3d, 0x36, 0xf2, 0x55, 0x84, 0x27, 0x72, 0xfc, 0x68, + 0x2f, 0x66, 0xf5, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::ConfigChangeStatus_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::ConfigChangeStatus_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.content(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.content(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.content(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.content(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Error_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Error_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ebf191c32063fd66803c12c4468b403b6b52738a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Error_.hpp @@ -0,0 +1,301 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Error_.idl + Source: Error_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_ERROR__HPP +#define DDSCXX_UNITREE_IDL_GO2_ERROR__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class Error_ +{ +private: + uint32_t source_ = 0; + uint32_t state_ = 0; + +public: + Error_() = default; + + explicit Error_( + uint32_t source, + uint32_t state) : + source_(source), + state_(state) { } + + uint32_t source() const { return this->source_; } + uint32_t& source() { return this->source_; } + void source(uint32_t _val_) { this->source_ = _val_; } + uint32_t state() const { return this->state_; } + uint32_t& state() { return this->state_; } + void state(uint32_t _val_) { this->state_ = _val_; } + + bool operator==(const Error_& _other) const + { + (void) _other; + return source_ == _other.source_ && + state_ == _other.state_; + } + + bool operator!=(const Error_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::Error_>::getTypeName() +{ + return "unitree_go::msg::dds_::Error_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Error_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Error_>::type_map_blob_sz() { return 254; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Error_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Error_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64, + 0x1f, 0xee, 0x3b, 0xc7, 0x0e, 0xd6, 0x56, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x36, 0xcd, 0x38, 0xf4, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9e, 0xd3, 0x9e, 0x2e, 0x00, + 0x84, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a, + 0x4b, 0x4c, 0xbf, 0xbe, 0x7d, 0xd9, 0x1f, 0x00, 0x6c, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a, 0x4b, 0x4c, 0xbf, 0xbe, 0x7d, 0xd9, 0x1f, 0xf1, + 0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64, 0x1f, 0xee, 0x3b, 0xc7, 0x0e, 0xd6, 0x56, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Error_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64, 0x1f, 0xee, 0x3b, 0xc7, + 0x0e, 0xd6, 0x56, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a, 0x4b, 0x4c, 0xbf, 0xbe, + 0x7d, 0xd9, 0x1f, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::Error_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Error_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Error_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::Error_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::Error_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.source())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::Error_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Error_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::Error_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.source())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::Error_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Error_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::Error_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.source())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::Error_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Error_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::Error_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.source())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::Error_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Error_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_ERROR__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Go2FrontVideoData_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Go2FrontVideoData_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0f4ff45fc10f5f308895091b0cedb1258e7ec624 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Go2FrontVideoData_.hpp @@ -0,0 +1,523 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Go2FrontVideoData_.idl + Source: Go2FrontVideoData_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP +#define DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class Go2FrontVideoData_ +{ +private: + uint64_t time_frame_ = 0; + std::vector video720p_; + std::vector video360p_; + std::vector video180p_; + +public: + Go2FrontVideoData_() = default; + + explicit Go2FrontVideoData_( + uint64_t time_frame, + const std::vector& video720p, + const std::vector& video360p, + const std::vector& video180p) : + time_frame_(time_frame), + video720p_(video720p), + video360p_(video360p), + video180p_(video180p) { } + + uint64_t time_frame() const { return this->time_frame_; } + uint64_t& time_frame() { return this->time_frame_; } + void time_frame(uint64_t _val_) { this->time_frame_ = _val_; } + const std::vector& video720p() const { return this->video720p_; } + std::vector& video720p() { return this->video720p_; } + void video720p(const std::vector& _val_) { this->video720p_ = _val_; } + void video720p(std::vector&& _val_) { this->video720p_ = _val_; } + const std::vector& video360p() const { return this->video360p_; } + std::vector& video360p() { return this->video360p_; } + void video360p(const std::vector& _val_) { this->video360p_ = _val_; } + void video360p(std::vector&& _val_) { this->video360p_ = _val_; } + const std::vector& video180p() const { return this->video180p_; } + std::vector& video180p() { return this->video180p_; } + void video180p(const std::vector& _val_) { this->video180p_ = _val_; } + void video180p(std::vector&& _val_) { this->video180p_ = _val_; } + + bool operator==(const Go2FrontVideoData_& _other) const + { + (void) _other; + return time_frame_ == _other.time_frame_ && + video720p_ == _other.video720p_ && + video360p_ == _other.video360p_ && + video180p_ == _other.video180p_; + } + + bool operator!=(const Go2FrontVideoData_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::getTypeName() +{ + return "unitree_go::msg::dds_::Go2FrontVideoData_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_map_blob_sz() { return 386; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_map_blob() { + static const uint8_t blob[] = { + 0x78, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1, + 0x45, 0x05, 0x1d, 0x51, 0xbe, 0x71, 0xb1, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x2d, 0x24, 0x8b, 0x17, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0xd5, 0x57, 0x60, 0x01, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, + 0x01, 0x00, 0x00, 0x02, 0x1d, 0x38, 0x7d, 0x67, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x04, 0xb8, 0xc7, 0x48, 0xdc, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec, + 0x40, 0x49, 0xe1, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x47, + 0x6f, 0x32, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x5f, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x37, 0x32, 0x30, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x31, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec, + 0x40, 0x49, 0xe1, 0xf1, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1, 0x45, 0x05, 0x1d, 0x51, 0xbe, + 0x71, 0xb1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1, 0x45, 0x05, 0x1d, 0x51, + 0xbe, 0x71, 0xb1, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec, + 0x40, 0x49, 0xe1, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::Go2FrontVideoData_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Go2FrontVideoData_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video720p().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.video720p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video360p().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.video360p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video180p().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.video180p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video720p().size()); + if (!read(streamer, se_1)) + return false; + instance.video720p().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.video720p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video360p().size()); + if (!read(streamer, se_1)) + return false; + instance.video360p().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.video360p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video180p().size()); + if (!read(streamer, se_1)) + return false; + instance.video180p().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.video180p()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video720p().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video360p().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.video180p().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.time_frame())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/HeightMap_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/HeightMap_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b80ac52ac1019e6b796b671f5ffa19e024a9e956 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/HeightMap_.hpp @@ -0,0 +1,581 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: HeightMap_.idl + Source: HeightMap_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP +#define DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP + +#include +#include +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class HeightMap_ +{ +private: + double stamp_ = 0.0; + std::string frame_id_; + float resolution_ = 0.0f; + uint32_t width_ = 0; + uint32_t height_ = 0; + std::array origin_ = { }; + std::vector data_; + +public: + HeightMap_() = default; + + explicit HeightMap_( + double stamp, + const std::string& frame_id, + float resolution, + uint32_t width, + uint32_t height, + const std::array& origin, + const std::vector& data) : + stamp_(stamp), + frame_id_(frame_id), + resolution_(resolution), + width_(width), + height_(height), + origin_(origin), + data_(data) { } + + double stamp() const { return this->stamp_; } + double& stamp() { return this->stamp_; } + void stamp(double _val_) { this->stamp_ = _val_; } + const std::string& frame_id() const { return this->frame_id_; } + std::string& frame_id() { return this->frame_id_; } + void frame_id(const std::string& _val_) { this->frame_id_ = _val_; } + void frame_id(std::string&& _val_) { this->frame_id_ = _val_; } + float resolution() const { return this->resolution_; } + float& resolution() { return this->resolution_; } + void resolution(float _val_) { this->resolution_ = _val_; } + uint32_t width() const { return this->width_; } + uint32_t& width() { return this->width_; } + void width(uint32_t _val_) { this->width_ = _val_; } + uint32_t height() const { return this->height_; } + uint32_t& height() { return this->height_; } + void height(uint32_t _val_) { this->height_ = _val_; } + const std::array& origin() const { return this->origin_; } + std::array& origin() { return this->origin_; } + void origin(const std::array& _val_) { this->origin_ = _val_; } + void origin(std::array&& _val_) { this->origin_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + + bool operator==(const HeightMap_& _other) const + { + (void) _other; + return stamp_ == _other.stamp_ && + frame_id_ == _other.frame_id_ && + resolution_ == _other.resolution_ && + width_ == _other.width_ && + height_ == _other.height_ && + origin_ == _other.origin_ && + data_ == _other.data_; + } + + bool operator!=(const HeightMap_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::HeightMap_>::getTypeName() +{ + return "unitree_go::msg::dds_::HeightMap_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::HeightMap_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::HeightMap_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_map_blob_sz() { return 506; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_map_blob() { + static const uint8_t blob[] = { + 0xac, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x1f, 0x43, 0x34, 0x5b, 0x5b, 0x83, 0xd9, + 0xee, 0xf3, 0x84, 0x90, 0x47, 0xb5, 0x97, 0x00, 0x94, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x96, 0xb8, 0xc7, 0x8d, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0xe1, 0x64, 0xb3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xea, 0xae, 0x26, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xb4, 0x35, 0xe2, 0x27, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x7c, 0x49, 0xb1, 0x53, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x09, 0x8d, 0x77, 0x7f, 0x38, + 0x1f, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x23, 0x34, 0xab, 0xa3, 0x56, 0x73, 0x67, + 0xe5, 0x4e, 0xb6, 0x6f, 0x87, 0xb9, 0x09, 0x00, 0x07, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x5f, 0x00, 0x00, 0x00, + 0xcf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x09, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x23, 0x34, 0xab, + 0xa3, 0x56, 0x73, 0x67, 0xe5, 0x4e, 0xb6, 0x6f, 0x87, 0xb9, 0x09, 0xf1, 0x1f, 0x43, 0x34, 0x5b, + 0x5b, 0x83, 0xd9, 0xee, 0xf3, 0x84, 0x90, 0x47, 0xb5, 0x97, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x1f, 0x43, 0x34, 0x5b, 0x5b, 0x83, 0xd9, 0xee, 0xf3, 0x84, 0x90, + 0x47, 0xb5, 0x97, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x23, 0x34, 0xab, 0xa3, 0x56, 0x73, 0x67, 0xe5, 0x4e, 0xb6, 0x6f, + 0x87, 0xb9, 0x09, 0x00, 0x0b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::HeightMap_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::HeightMap_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::HeightMap_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::HeightMap_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::HeightMap_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::HeightMap_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::HeightMap_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, float(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::HeightMap_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, float(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/IMUState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/IMUState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fb15a87dfc83afe2043a854122c6e9a0c75049f4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/IMUState_.hpp @@ -0,0 +1,503 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: IMUState_.idl + Source: IMUState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class IMUState_ +{ +private: + std::array quaternion_ = { }; + std::array gyroscope_ = { }; + std::array accelerometer_ = { }; + std::array rpy_ = { }; + uint8_t temperature_ = 0; + +public: + IMUState_() = default; + + explicit IMUState_( + const std::array& quaternion, + const std::array& gyroscope, + const std::array& accelerometer, + const std::array& rpy, + uint8_t temperature) : + quaternion_(quaternion), + gyroscope_(gyroscope), + accelerometer_(accelerometer), + rpy_(rpy), + temperature_(temperature) { } + + const std::array& quaternion() const { return this->quaternion_; } + std::array& quaternion() { return this->quaternion_; } + void quaternion(const std::array& _val_) { this->quaternion_ = _val_; } + void quaternion(std::array&& _val_) { this->quaternion_ = _val_; } + const std::array& gyroscope() const { return this->gyroscope_; } + std::array& gyroscope() { return this->gyroscope_; } + void gyroscope(const std::array& _val_) { this->gyroscope_ = _val_; } + void gyroscope(std::array&& _val_) { this->gyroscope_ = _val_; } + const std::array& accelerometer() const { return this->accelerometer_; } + std::array& accelerometer() { return this->accelerometer_; } + void accelerometer(const std::array& _val_) { this->accelerometer_ = _val_; } + void accelerometer(std::array&& _val_) { this->accelerometer_ = _val_; } + const std::array& rpy() const { return this->rpy_; } + std::array& rpy() { return this->rpy_; } + void rpy(const std::array& _val_) { this->rpy_ = _val_; } + void rpy(std::array&& _val_) { this->rpy_ = _val_; } + uint8_t temperature() const { return this->temperature_; } + uint8_t& temperature() { return this->temperature_; } + void temperature(uint8_t _val_) { this->temperature_ = _val_; } + + bool operator==(const IMUState_& _other) const + { + (void) _other; + return quaternion_ == _other.quaternion_ && + gyroscope_ == _other.gyroscope_ && + accelerometer_ == _other.accelerometer_ && + rpy_ == _other.rpy_ && + temperature_ == _other.temperature_; + } + + bool operator!=(const IMUState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::IMUState_>::getTypeName() +{ + return "unitree_go::msg::dds_::IMUState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::IMUState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_map_blob_sz() { return 498; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xab, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, + 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, 0x93, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0e, 0x12, + 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, 0x92, 0xed, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00, + 0x16, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, + 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, + 0xb7, 0x64, 0xcc, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, + 0x31, 0x15, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, + 0x29, 0x31, 0x15, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, + 0xb7, 0x64, 0xcc, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::IMUState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::IMUState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::IMUState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::IMUState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/InterfaceConfig_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/InterfaceConfig_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e6bcf49f2715b72e27a1de0364d541ca3c2ca449 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/InterfaceConfig_.hpp @@ -0,0 +1,363 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: InterfaceConfig_.idl + Source: InterfaceConfig_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP +#define DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class InterfaceConfig_ +{ +private: + uint8_t mode_ = 0; + uint8_t value_ = 0; + std::array reserve_ = { }; + +public: + InterfaceConfig_() = default; + + explicit InterfaceConfig_( + uint8_t mode, + uint8_t value, + const std::array& reserve) : + mode_(mode), + value_(value), + reserve_(reserve) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + uint8_t value() const { return this->value_; } + uint8_t& value() { return this->value_; } + void value(uint8_t _val_) { this->value_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const InterfaceConfig_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + value_ == _other.value_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const InterfaceConfig_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::getTypeName() +{ + return "unitree_go::msg::dds_::InterfaceConfig_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_map_blob_sz() { return 326; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_map_blob() { + static const uint8_t blob[] = { + 0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b, + 0x3a, 0xaf, 0x05, 0x03, 0xdb, 0x8f, 0xa9, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x20, 0x63, 0xc1, 0x60, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f, 0x44, 0x70, 0x5d, 0xb6, + 0x2b, 0x7d, 0x87, 0x00, 0x96, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x00, + 0x5a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f, + 0x44, 0x70, 0x5d, 0xb6, 0x2b, 0x7d, 0x87, 0xf1, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b, 0x3a, + 0xaf, 0x05, 0x03, 0xdb, 0x8f, 0xa9, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b, 0x3a, 0xaf, 0x05, 0x03, + 0xdb, 0x8f, 0xa9, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f, 0x44, 0x70, 0x5d, 0xb6, + 0x2b, 0x7d, 0x87, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::InterfaceConfig_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::InterfaceConfig_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.value())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::InterfaceConfig_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.value())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.value())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.value())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LidarState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LidarState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5fe944a60910632cc5d327ce70829deac97260fe --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LidarState_.hpp @@ -0,0 +1,1007 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: LidarState_.idl + Source: LidarState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP + +#include +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class LidarState_ +{ +private: + double stamp_ = 0.0; + std::string firmware_version_; + std::string software_version_; + std::string sdk_version_; + float sys_rotation_speed_ = 0.0f; + float com_rotation_speed_ = 0.0f; + uint8_t error_state_ = 0; + uint8_t dirty_percentage_ = 0; + float cloud_frequency_ = 0.0f; + float cloud_packet_loss_rate_ = 0.0f; + uint32_t cloud_size_ = 0; + uint32_t cloud_scan_num_ = 0; + float imu_frequency_ = 0.0f; + float imu_packet_loss_rate_ = 0.0f; + std::array imu_rpy_ = { }; + double serial_recv_stamp_ = 0.0; + uint32_t serial_buffer_size_ = 0; + uint32_t serial_buffer_read_ = 0; + +public: + LidarState_() = default; + + explicit LidarState_( + double stamp, + const std::string& firmware_version, + const std::string& software_version, + const std::string& sdk_version, + float sys_rotation_speed, + float com_rotation_speed, + uint8_t error_state, + uint8_t dirty_percentage, + float cloud_frequency, + float cloud_packet_loss_rate, + uint32_t cloud_size, + uint32_t cloud_scan_num, + float imu_frequency, + float imu_packet_loss_rate, + const std::array& imu_rpy, + double serial_recv_stamp, + uint32_t serial_buffer_size, + uint32_t serial_buffer_read) : + stamp_(stamp), + firmware_version_(firmware_version), + software_version_(software_version), + sdk_version_(sdk_version), + sys_rotation_speed_(sys_rotation_speed), + com_rotation_speed_(com_rotation_speed), + error_state_(error_state), + dirty_percentage_(dirty_percentage), + cloud_frequency_(cloud_frequency), + cloud_packet_loss_rate_(cloud_packet_loss_rate), + cloud_size_(cloud_size), + cloud_scan_num_(cloud_scan_num), + imu_frequency_(imu_frequency), + imu_packet_loss_rate_(imu_packet_loss_rate), + imu_rpy_(imu_rpy), + serial_recv_stamp_(serial_recv_stamp), + serial_buffer_size_(serial_buffer_size), + serial_buffer_read_(serial_buffer_read) { } + + double stamp() const { return this->stamp_; } + double& stamp() { return this->stamp_; } + void stamp(double _val_) { this->stamp_ = _val_; } + const std::string& firmware_version() const { return this->firmware_version_; } + std::string& firmware_version() { return this->firmware_version_; } + void firmware_version(const std::string& _val_) { this->firmware_version_ = _val_; } + void firmware_version(std::string&& _val_) { this->firmware_version_ = _val_; } + const std::string& software_version() const { return this->software_version_; } + std::string& software_version() { return this->software_version_; } + void software_version(const std::string& _val_) { this->software_version_ = _val_; } + void software_version(std::string&& _val_) { this->software_version_ = _val_; } + const std::string& sdk_version() const { return this->sdk_version_; } + std::string& sdk_version() { return this->sdk_version_; } + void sdk_version(const std::string& _val_) { this->sdk_version_ = _val_; } + void sdk_version(std::string&& _val_) { this->sdk_version_ = _val_; } + float sys_rotation_speed() const { return this->sys_rotation_speed_; } + float& sys_rotation_speed() { return this->sys_rotation_speed_; } + void sys_rotation_speed(float _val_) { this->sys_rotation_speed_ = _val_; } + float com_rotation_speed() const { return this->com_rotation_speed_; } + float& com_rotation_speed() { return this->com_rotation_speed_; } + void com_rotation_speed(float _val_) { this->com_rotation_speed_ = _val_; } + uint8_t error_state() const { return this->error_state_; } + uint8_t& error_state() { return this->error_state_; } + void error_state(uint8_t _val_) { this->error_state_ = _val_; } + uint8_t dirty_percentage() const { return this->dirty_percentage_; } + uint8_t& dirty_percentage() { return this->dirty_percentage_; } + void dirty_percentage(uint8_t _val_) { this->dirty_percentage_ = _val_; } + float cloud_frequency() const { return this->cloud_frequency_; } + float& cloud_frequency() { return this->cloud_frequency_; } + void cloud_frequency(float _val_) { this->cloud_frequency_ = _val_; } + float cloud_packet_loss_rate() const { return this->cloud_packet_loss_rate_; } + float& cloud_packet_loss_rate() { return this->cloud_packet_loss_rate_; } + void cloud_packet_loss_rate(float _val_) { this->cloud_packet_loss_rate_ = _val_; } + uint32_t cloud_size() const { return this->cloud_size_; } + uint32_t& cloud_size() { return this->cloud_size_; } + void cloud_size(uint32_t _val_) { this->cloud_size_ = _val_; } + uint32_t cloud_scan_num() const { return this->cloud_scan_num_; } + uint32_t& cloud_scan_num() { return this->cloud_scan_num_; } + void cloud_scan_num(uint32_t _val_) { this->cloud_scan_num_ = _val_; } + float imu_frequency() const { return this->imu_frequency_; } + float& imu_frequency() { return this->imu_frequency_; } + void imu_frequency(float _val_) { this->imu_frequency_ = _val_; } + float imu_packet_loss_rate() const { return this->imu_packet_loss_rate_; } + float& imu_packet_loss_rate() { return this->imu_packet_loss_rate_; } + void imu_packet_loss_rate(float _val_) { this->imu_packet_loss_rate_ = _val_; } + const std::array& imu_rpy() const { return this->imu_rpy_; } + std::array& imu_rpy() { return this->imu_rpy_; } + void imu_rpy(const std::array& _val_) { this->imu_rpy_ = _val_; } + void imu_rpy(std::array&& _val_) { this->imu_rpy_ = _val_; } + double serial_recv_stamp() const { return this->serial_recv_stamp_; } + double& serial_recv_stamp() { return this->serial_recv_stamp_; } + void serial_recv_stamp(double _val_) { this->serial_recv_stamp_ = _val_; } + uint32_t serial_buffer_size() const { return this->serial_buffer_size_; } + uint32_t& serial_buffer_size() { return this->serial_buffer_size_; } + void serial_buffer_size(uint32_t _val_) { this->serial_buffer_size_ = _val_; } + uint32_t serial_buffer_read() const { return this->serial_buffer_read_; } + uint32_t& serial_buffer_read() { return this->serial_buffer_read_; } + void serial_buffer_read(uint32_t _val_) { this->serial_buffer_read_ = _val_; } + + bool operator==(const LidarState_& _other) const + { + (void) _other; + return stamp_ == _other.stamp_ && + firmware_version_ == _other.firmware_version_ && + software_version_ == _other.software_version_ && + sdk_version_ == _other.sdk_version_ && + sys_rotation_speed_ == _other.sys_rotation_speed_ && + com_rotation_speed_ == _other.com_rotation_speed_ && + error_state_ == _other.error_state_ && + dirty_percentage_ == _other.dirty_percentage_ && + cloud_frequency_ == _other.cloud_frequency_ && + cloud_packet_loss_rate_ == _other.cloud_packet_loss_rate_ && + cloud_size_ == _other.cloud_size_ && + cloud_scan_num_ == _other.cloud_scan_num_ && + imu_frequency_ == _other.imu_frequency_ && + imu_packet_loss_rate_ == _other.imu_packet_loss_rate_ && + imu_rpy_ == _other.imu_rpy_ && + serial_recv_stamp_ == _other.serial_recv_stamp_ && + serial_buffer_size_ == _other.serial_buffer_size_ && + serial_buffer_read_ == _other.serial_buffer_read_; + } + + bool operator!=(const LidarState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::LidarState_>::getTypeName() +{ + return "unitree_go::msg::dds_::LidarState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::LidarState_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::LidarState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LidarState_>::type_map_blob_sz() { return 1126; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LidarState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LidarState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x57, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x09, 0xd6, 0x30, 0xb6, 0x06, 0x40, 0xe7, + 0xbe, 0x4d, 0xa2, 0xb9, 0x6d, 0x00, 0x8c, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x96, 0xb8, 0xc7, 0x8d, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xdf, 0xa1, 0xc7, 0xbd, + 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xed, 0x06, 0xdc, 0x4c, + 0x0c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x57, 0xea, 0x46, 0xbb, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xa9, 0x50, 0xc9, 0xf7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xda, 0x34, 0xb9, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa7, 0xd8, 0x5b, 0x8a, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x46, 0xa2, 0x96, 0x22, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xee, 0x8b, 0xc3, 0x16, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x96, 0x24, 0x1c, 0x8b, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf0, 0x35, 0xb6, 0xef, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x77, 0x03, 0x9a, 0x1e, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb9, 0x6b, 0xc1, 0x8e, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x5f, 0x31, 0xe6, 0x4b, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x50, 0xa7, 0x3f, 0x29, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x88, 0x89, 0x6b, 0x48, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x0e, 0x29, 0x6f, 0xc3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x64, 0xba, 0x33, 0xa1, 0x00, 0xdd, 0x02, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x19, 0xc9, 0x75, 0x02, 0xb1, 0x96, 0x04, 0x36, 0x08, 0x47, 0x2b, + 0xd0, 0x18, 0x25, 0x00, 0xc5, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4c, + 0x69, 0x64, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x8d, 0x02, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x11, 0x00, 0x00, 0x00, 0x66, 0x69, 0x72, 0x6d, + 0x77, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x73, 0x79, 0x73, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x13, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x5f, + 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x64, 0x69, 0x72, 0x74, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x10, 0x00, 0x00, 0x00, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x66, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x17, 0x00, 0x00, 0x00, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x5f, 0x73, 0x63, + 0x61, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, + 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x15, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x69, 0x6d, 0x75, 0x5f, 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x12, 0x00, 0x00, 0x00, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x19, 0xc9, 0x75, 0x02, 0xb1, 0x96, 0x04, + 0x36, 0x08, 0x47, 0x2b, 0xd0, 0x18, 0x25, 0xf1, 0x09, 0xd6, 0x30, 0xb6, 0x06, 0x40, 0xe7, 0xbe, + 0x4d, 0xa2, 0xb9, 0x6d, 0x00, 0x8c, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LidarState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x09, 0xd6, 0x30, 0xb6, 0x06, 0x40, 0xe7, 0xbe, 0x4d, 0xa2, 0xb9, + 0x6d, 0x00, 0x8c, 0x00, 0x43, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x19, 0xc9, 0x75, 0x02, 0xb1, 0x96, 0x04, 0x36, 0x08, 0x47, 0x2b, + 0xd0, 0x18, 0x25, 0x00, 0xc9, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::LidarState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::LidarState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::LidarState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::LidarState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::LidarState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.firmware_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.software_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.sdk_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.sys_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.com_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dirty_percentage())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cloud_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cloud_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cloud_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cloud_scan_num())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.imu_rpy()[0], instance.imu_rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.serial_recv_stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.serial_buffer_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.serial_buffer_read())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::LidarState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LidarState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::LidarState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.firmware_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.software_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.sdk_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.sys_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.com_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dirty_percentage())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cloud_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cloud_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cloud_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cloud_scan_num())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.imu_rpy()[0], instance.imu_rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.serial_recv_stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.serial_buffer_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.serial_buffer_read())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::LidarState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LidarState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::LidarState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.firmware_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.software_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.sdk_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.sys_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.com_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dirty_percentage())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cloud_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cloud_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cloud_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cloud_scan_num())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.imu_rpy()[0], instance.imu_rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.serial_recv_stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.serial_buffer_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.serial_buffer_read())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::LidarState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LidarState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::LidarState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.firmware_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.software_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.sdk_version(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.sys_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.com_rotation_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dirty_percentage())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cloud_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cloud_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cloud_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cloud_scan_num())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_frequency())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_packet_loss_rate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.imu_rpy()[0], instance.imu_rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.serial_recv_stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.serial_buffer_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.serial_buffer_read())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::LidarState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LidarState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_LIDARSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..287c0db23f7d0fb12580b9d6ef32ea3b9a23b3ba --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowCmd_.hpp @@ -0,0 +1,999 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: LowCmd_.idl + Source: LowCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP + +#include "unitree/idl/go2/BmsCmd_.hpp" + +#include "unitree/idl/go2/MotorCmd_.hpp" + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class LowCmd_ +{ +private: + std::array head_ = { }; + uint8_t level_flag_ = 0; + uint8_t frame_reserve_ = 0; + std::array sn_ = { }; + std::array version_ = { }; + uint16_t bandwidth_ = 0; + std::array<::unitree_go::msg::dds_::MotorCmd_, 20> motor_cmd_ = { }; + ::unitree_go::msg::dds_::BmsCmd_ bms_cmd_; + std::array wireless_remote_ = { }; + std::array led_ = { }; + std::array fan_ = { }; + uint8_t gpio_ = 0; + uint32_t reserve_ = 0; + uint32_t crc_ = 0; + +public: + LowCmd_() = default; + + explicit LowCmd_( + const std::array& head, + uint8_t level_flag, + uint8_t frame_reserve, + const std::array& sn, + const std::array& version, + uint16_t bandwidth, + const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd, + const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd, + const std::array& wireless_remote, + const std::array& led, + const std::array& fan, + uint8_t gpio, + uint32_t reserve, + uint32_t crc) : + head_(head), + level_flag_(level_flag), + frame_reserve_(frame_reserve), + sn_(sn), + version_(version), + bandwidth_(bandwidth), + motor_cmd_(motor_cmd), + bms_cmd_(bms_cmd), + wireless_remote_(wireless_remote), + led_(led), + fan_(fan), + gpio_(gpio), + reserve_(reserve), + crc_(crc) { } + + const std::array& head() const { return this->head_; } + std::array& head() { return this->head_; } + void head(const std::array& _val_) { this->head_ = _val_; } + void head(std::array&& _val_) { this->head_ = _val_; } + uint8_t level_flag() const { return this->level_flag_; } + uint8_t& level_flag() { return this->level_flag_; } + void level_flag(uint8_t _val_) { this->level_flag_ = _val_; } + uint8_t frame_reserve() const { return this->frame_reserve_; } + uint8_t& frame_reserve() { return this->frame_reserve_; } + void frame_reserve(uint8_t _val_) { this->frame_reserve_ = _val_; } + const std::array& sn() const { return this->sn_; } + std::array& sn() { return this->sn_; } + void sn(const std::array& _val_) { this->sn_ = _val_; } + void sn(std::array&& _val_) { this->sn_ = _val_; } + const std::array& version() const { return this->version_; } + std::array& version() { return this->version_; } + void version(const std::array& _val_) { this->version_ = _val_; } + void version(std::array&& _val_) { this->version_ = _val_; } + uint16_t bandwidth() const { return this->bandwidth_; } + uint16_t& bandwidth() { return this->bandwidth_; } + void bandwidth(uint16_t _val_) { this->bandwidth_ = _val_; } + const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd() const { return this->motor_cmd_; } + std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd() { return this->motor_cmd_; } + void motor_cmd(const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& _val_) { this->motor_cmd_ = _val_; } + void motor_cmd(std::array<::unitree_go::msg::dds_::MotorCmd_, 20>&& _val_) { this->motor_cmd_ = _val_; } + const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() const { return this->bms_cmd_; } + ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() { return this->bms_cmd_; } + void bms_cmd(const ::unitree_go::msg::dds_::BmsCmd_& _val_) { this->bms_cmd_ = _val_; } + void bms_cmd(::unitree_go::msg::dds_::BmsCmd_&& _val_) { this->bms_cmd_ = _val_; } + const std::array& wireless_remote() const { return this->wireless_remote_; } + std::array& wireless_remote() { return this->wireless_remote_; } + void wireless_remote(const std::array& _val_) { this->wireless_remote_ = _val_; } + void wireless_remote(std::array&& _val_) { this->wireless_remote_ = _val_; } + const std::array& led() const { return this->led_; } + std::array& led() { return this->led_; } + void led(const std::array& _val_) { this->led_ = _val_; } + void led(std::array&& _val_) { this->led_ = _val_; } + const std::array& fan() const { return this->fan_; } + std::array& fan() { return this->fan_; } + void fan(const std::array& _val_) { this->fan_ = _val_; } + void fan(std::array&& _val_) { this->fan_ = _val_; } + uint8_t gpio() const { return this->gpio_; } + uint8_t& gpio() { return this->gpio_; } + void gpio(uint8_t _val_) { this->gpio_ = _val_; } + uint32_t reserve() const { return this->reserve_; } + uint32_t& reserve() { return this->reserve_; } + void reserve(uint32_t _val_) { this->reserve_ = _val_; } + uint32_t crc() const { return this->crc_; } + uint32_t& crc() { return this->crc_; } + void crc(uint32_t _val_) { this->crc_ = _val_; } + + bool operator==(const LowCmd_& _other) const + { + (void) _other; + return head_ == _other.head_ && + level_flag_ == _other.level_flag_ && + frame_reserve_ == _other.frame_reserve_ && + sn_ == _other.sn_ && + version_ == _other.version_ && + bandwidth_ == _other.bandwidth_ && + motor_cmd_ == _other.motor_cmd_ && + bms_cmd_ == _other.bms_cmd_ && + wireless_remote_ == _other.wireless_remote_ && + led_ == _other.led_ && + fan_ == _other.fan_ && + gpio_ == _other.gpio_ && + reserve_ == _other.reserve_ && + crc_ == _other.crc_; + } + + bool operator!=(const LowCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::LowCmd_>::getTypeName() +{ + return "unitree_go::msg::dds_::LowCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::LowCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_map_blob_sz() { return 1710; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x72, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37, + 0xd6, 0x9f, 0x6e, 0xd6, 0x2a, 0x3f, 0x63, 0x00, 0x63, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x96, 0xe8, 0x9a, 0x29, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa2, 0x18, 0x71, 0x24, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf0, 0xd2, 0xa4, 0x1c, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0xaf, 0xbe, 0x94, 0xcd, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x2a, 0xf7, + 0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x36, + 0x67, 0x6c, 0x2b, 0x00, 0x24, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, + 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x5b, 0xcf, 0x19, 0xa4, 0x19, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, + 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x11, 0x50, 0x97, 0xc7, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x28, 0x02, 0xa8, 0x2f, 0x18, 0xc9, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x0b, 0x98, + 0xf7, 0xbc, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x50, 0xbd, 0x8c, 0x21, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x95, 0x58, 0x71, 0xc9, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf5, 0xad, 0x59, 0xc5, 0xf1, + 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x00, + 0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x9c, 0x3b, + 0x62, 0x94, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, + 0x23, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32, 0x62, 0xd4, 0x8d, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xce, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20, 0xa9, 0x05, 0x40, 0x00, + 0x26, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4c, 0x6f, 0x77, 0x43, 0x6d, + 0x64, 0x5f, 0x00, 0x00, 0xf2, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x73, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf2, 0x42, 0x1f, + 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x0a, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, + 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x6d, 0x73, 0x5f, + 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x77, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x66, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x67, 0x70, 0x69, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x63, 0x72, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, + 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x31, + 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00, + 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x43, 0x6d, + 0x64, 0x5f, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x66, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20, + 0xa9, 0x05, 0x40, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37, 0xd6, 0x9f, 0x6e, 0xd6, 0x2a, + 0x3f, 0x63, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, + 0x3b, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, + 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1, + 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37, 0xd6, 0x9f, 0x6e, 0xd6, + 0x2a, 0x3f, 0x63, 0x00, 0x67, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, + 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, + 0x42, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20, + 0xa9, 0x05, 0x40, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, + 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, + 0x7a, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::LowCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::LowCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::LowCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::LowCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.led()[0], instance.led().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.fan()[0], instance.fan().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.gpio())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.led()[0], instance.led().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.fan()[0], instance.fan().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.gpio())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.led()[0], instance.led().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.fan()[0], instance.fan().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.gpio())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.led()[0], instance.led().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.fan()[0], instance.fan().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.gpio())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..383b31f203023dc2bfd630e6b988f973156dfb52 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/LowState_.hpp @@ -0,0 +1,1427 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: LowState_.idl + Source: LowState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP + +#include "unitree/idl/go2/BmsState_.hpp" + +#include "unitree/idl/go2/IMUState_.hpp" + +#include "unitree/idl/go2/MotorState_.hpp" + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class LowState_ +{ +private: + std::array head_ = { }; + uint8_t level_flag_ = 0; + uint8_t frame_reserve_ = 0; + std::array sn_ = { }; + std::array version_ = { }; + uint16_t bandwidth_ = 0; + ::unitree_go::msg::dds_::IMUState_ imu_state_; + std::array<::unitree_go::msg::dds_::MotorState_, 20> motor_state_ = { }; + ::unitree_go::msg::dds_::BmsState_ bms_state_; + std::array foot_force_ = { }; + std::array foot_force_est_ = { }; + uint32_t tick_ = 0; + std::array wireless_remote_ = { }; + uint8_t bit_flag_ = 0; + float adc_reel_ = 0.0f; + uint8_t temperature_ntc1_ = 0; + uint8_t temperature_ntc2_ = 0; + float power_v_ = 0.0f; + float power_a_ = 0.0f; + std::array fan_frequency_ = { }; + uint32_t reserve_ = 0; + uint32_t crc_ = 0; + +public: + LowState_() = default; + + explicit LowState_( + const std::array& head, + uint8_t level_flag, + uint8_t frame_reserve, + const std::array& sn, + const std::array& version, + uint16_t bandwidth, + const ::unitree_go::msg::dds_::IMUState_& imu_state, + const std::array<::unitree_go::msg::dds_::MotorState_, 20>& motor_state, + const ::unitree_go::msg::dds_::BmsState_& bms_state, + const std::array& foot_force, + const std::array& foot_force_est, + uint32_t tick, + const std::array& wireless_remote, + uint8_t bit_flag, + float adc_reel, + uint8_t temperature_ntc1, + uint8_t temperature_ntc2, + float power_v, + float power_a, + const std::array& fan_frequency, + uint32_t reserve, + uint32_t crc) : + head_(head), + level_flag_(level_flag), + frame_reserve_(frame_reserve), + sn_(sn), + version_(version), + bandwidth_(bandwidth), + imu_state_(imu_state), + motor_state_(motor_state), + bms_state_(bms_state), + foot_force_(foot_force), + foot_force_est_(foot_force_est), + tick_(tick), + wireless_remote_(wireless_remote), + bit_flag_(bit_flag), + adc_reel_(adc_reel), + temperature_ntc1_(temperature_ntc1), + temperature_ntc2_(temperature_ntc2), + power_v_(power_v), + power_a_(power_a), + fan_frequency_(fan_frequency), + reserve_(reserve), + crc_(crc) { } + + const std::array& head() const { return this->head_; } + std::array& head() { return this->head_; } + void head(const std::array& _val_) { this->head_ = _val_; } + void head(std::array&& _val_) { this->head_ = _val_; } + uint8_t level_flag() const { return this->level_flag_; } + uint8_t& level_flag() { return this->level_flag_; } + void level_flag(uint8_t _val_) { this->level_flag_ = _val_; } + uint8_t frame_reserve() const { return this->frame_reserve_; } + uint8_t& frame_reserve() { return this->frame_reserve_; } + void frame_reserve(uint8_t _val_) { this->frame_reserve_ = _val_; } + const std::array& sn() const { return this->sn_; } + std::array& sn() { return this->sn_; } + void sn(const std::array& _val_) { this->sn_ = _val_; } + void sn(std::array&& _val_) { this->sn_ = _val_; } + const std::array& version() const { return this->version_; } + std::array& version() { return this->version_; } + void version(const std::array& _val_) { this->version_ = _val_; } + void version(std::array&& _val_) { this->version_ = _val_; } + uint16_t bandwidth() const { return this->bandwidth_; } + uint16_t& bandwidth() { return this->bandwidth_; } + void bandwidth(uint16_t _val_) { this->bandwidth_ = _val_; } + const ::unitree_go::msg::dds_::IMUState_& imu_state() const { return this->imu_state_; } + ::unitree_go::msg::dds_::IMUState_& imu_state() { return this->imu_state_; } + void imu_state(const ::unitree_go::msg::dds_::IMUState_& _val_) { this->imu_state_ = _val_; } + void imu_state(::unitree_go::msg::dds_::IMUState_&& _val_) { this->imu_state_ = _val_; } + const std::array<::unitree_go::msg::dds_::MotorState_, 20>& motor_state() const { return this->motor_state_; } + std::array<::unitree_go::msg::dds_::MotorState_, 20>& motor_state() { return this->motor_state_; } + void motor_state(const std::array<::unitree_go::msg::dds_::MotorState_, 20>& _val_) { this->motor_state_ = _val_; } + void motor_state(std::array<::unitree_go::msg::dds_::MotorState_, 20>&& _val_) { this->motor_state_ = _val_; } + const ::unitree_go::msg::dds_::BmsState_& bms_state() const { return this->bms_state_; } + ::unitree_go::msg::dds_::BmsState_& bms_state() { return this->bms_state_; } + void bms_state(const ::unitree_go::msg::dds_::BmsState_& _val_) { this->bms_state_ = _val_; } + void bms_state(::unitree_go::msg::dds_::BmsState_&& _val_) { this->bms_state_ = _val_; } + const std::array& foot_force() const { return this->foot_force_; } + std::array& foot_force() { return this->foot_force_; } + void foot_force(const std::array& _val_) { this->foot_force_ = _val_; } + void foot_force(std::array&& _val_) { this->foot_force_ = _val_; } + const std::array& foot_force_est() const { return this->foot_force_est_; } + std::array& foot_force_est() { return this->foot_force_est_; } + void foot_force_est(const std::array& _val_) { this->foot_force_est_ = _val_; } + void foot_force_est(std::array&& _val_) { this->foot_force_est_ = _val_; } + uint32_t tick() const { return this->tick_; } + uint32_t& tick() { return this->tick_; } + void tick(uint32_t _val_) { this->tick_ = _val_; } + const std::array& wireless_remote() const { return this->wireless_remote_; } + std::array& wireless_remote() { return this->wireless_remote_; } + void wireless_remote(const std::array& _val_) { this->wireless_remote_ = _val_; } + void wireless_remote(std::array&& _val_) { this->wireless_remote_ = _val_; } + uint8_t bit_flag() const { return this->bit_flag_; } + uint8_t& bit_flag() { return this->bit_flag_; } + void bit_flag(uint8_t _val_) { this->bit_flag_ = _val_; } + float adc_reel() const { return this->adc_reel_; } + float& adc_reel() { return this->adc_reel_; } + void adc_reel(float _val_) { this->adc_reel_ = _val_; } + uint8_t temperature_ntc1() const { return this->temperature_ntc1_; } + uint8_t& temperature_ntc1() { return this->temperature_ntc1_; } + void temperature_ntc1(uint8_t _val_) { this->temperature_ntc1_ = _val_; } + uint8_t temperature_ntc2() const { return this->temperature_ntc2_; } + uint8_t& temperature_ntc2() { return this->temperature_ntc2_; } + void temperature_ntc2(uint8_t _val_) { this->temperature_ntc2_ = _val_; } + float power_v() const { return this->power_v_; } + float& power_v() { return this->power_v_; } + void power_v(float _val_) { this->power_v_ = _val_; } + float power_a() const { return this->power_a_; } + float& power_a() { return this->power_a_; } + void power_a(float _val_) { this->power_a_ = _val_; } + const std::array& fan_frequency() const { return this->fan_frequency_; } + std::array& fan_frequency() { return this->fan_frequency_; } + void fan_frequency(const std::array& _val_) { this->fan_frequency_ = _val_; } + void fan_frequency(std::array&& _val_) { this->fan_frequency_ = _val_; } + uint32_t reserve() const { return this->reserve_; } + uint32_t& reserve() { return this->reserve_; } + void reserve(uint32_t _val_) { this->reserve_ = _val_; } + uint32_t crc() const { return this->crc_; } + uint32_t& crc() { return this->crc_; } + void crc(uint32_t _val_) { this->crc_ = _val_; } + + bool operator==(const LowState_& _other) const + { + (void) _other; + return head_ == _other.head_ && + level_flag_ == _other.level_flag_ && + frame_reserve_ == _other.frame_reserve_ && + sn_ == _other.sn_ && + version_ == _other.version_ && + bandwidth_ == _other.bandwidth_ && + imu_state_ == _other.imu_state_ && + motor_state_ == _other.motor_state_ && + bms_state_ == _other.bms_state_ && + foot_force_ == _other.foot_force_ && + foot_force_est_ == _other.foot_force_est_ && + tick_ == _other.tick_ && + wireless_remote_ == _other.wireless_remote_ && + bit_flag_ == _other.bit_flag_ && + adc_reel_ == _other.adc_reel_ && + temperature_ntc1_ == _other.temperature_ntc1_ && + temperature_ntc2_ == _other.temperature_ntc2_ && + power_v_ == _other.power_v_ && + power_a_ == _other.power_a_ && + fan_frequency_ == _other.fan_frequency_ && + reserve_ == _other.reserve_ && + crc_ == _other.crc_; + } + + bool operator!=(const LowState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::LowState_>::getTypeName() +{ + return "unitree_go::msg::dds_::LowState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::LowState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowState_>::type_map_blob_sz() { return 3184; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowState_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x7e, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x85, 0x3a, 0x99, 0xe2, 0x3d, 0x0d, 0xaa, + 0x16, 0x10, 0xb6, 0x5c, 0x52, 0x6b, 0x40, 0x00, 0xff, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x01, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x96, 0xe8, 0x9a, 0x29, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa2, 0x18, 0x71, 0x24, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf0, 0xd2, 0xa4, 0x1c, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0xaf, 0xbe, 0x94, 0xcd, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x2a, 0xf7, + 0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x36, + 0x67, 0x6c, 0x2b, 0x00, 0x19, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x4b, + 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x9e, 0x5f, 0x37, + 0x13, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, + 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0xb2, 0x1e, 0x53, 0xdc, 0x19, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, + 0x37, 0x0c, 0xec, 0x4c, 0xbb, 0x7f, 0x6e, 0x62, 0x18, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x04, 0x03, 0x41, 0x56, 0x4b, 0x84, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x04, 0x1b, + 0xa1, 0x76, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe5, + 0xe5, 0xc0, 0x75, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0xa8, 0x2f, 0x18, 0xc9, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc8, 0xbc, 0x01, 0x8f, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xc1, 0x0c, 0x98, 0x67, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xb0, 0x29, 0x0b, 0xbb, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xd2, 0x14, 0xc5, 0x1f, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x52, 0xea, 0x3e, 0x50, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x3a, 0x40, 0xba, 0xb9, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x06, 0xa6, 0x69, 0xf7, 0x4e, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf5, 0xad, 0x59, 0xc5, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, + 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x0e, 0x12, 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, + 0x92, 0xed, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, + 0xf4, 0x38, 0xf7, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, + 0xb1, 0xbe, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6e, 0x96, 0x3d, 0x84, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x30, 0x50, 0xb6, 0xd9, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x4a, 0xe0, 0x48, 0xae, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, + 0x37, 0x0c, 0xec, 0x4c, 0xbb, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x75, 0x6a, 0xda, 0x84, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x51, 0x99, 0x89, 0x90, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x9a, 0xcb, 0x44, 0x54, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc7, 0xd5, 0xf8, 0x49, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x43, 0xb5, 0xc9, 0x17, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x9a, 0x4c, 0x07, 0x40, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x2a, 0x42, 0xc9, 0x1e, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x55, 0x65, 0x52, 0x17, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x2d, 0x87, + 0xc3, 0x55, 0x00, 0x00, 0x67, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x08, 0xf2, 0x39, + 0xc4, 0x71, 0xd3, 0xa2, 0x7e, 0x67, 0xe7, 0xc7, 0x72, 0x31, 0x84, 0x00, 0x52, 0x03, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x73, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x62, 0x61, 0x6e, 0x64, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, + 0xcc, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf2, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, + 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x0c, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x74, 0x6f, + 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, + 0x8c, 0x15, 0xfd, 0x14, 0x3d, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x62, 0x6d, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x74, 0x69, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x28, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x77, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, + 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x62, 0x69, 0x74, 0x5f, + 0x66, 0x6c, 0x61, 0x67, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x61, 0x64, 0x63, 0x5f, 0x72, 0x65, 0x65, 0x6c, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, + 0x6e, 0x74, 0x63, 0x31, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x5f, 0x6e, 0x74, 0x63, 0x32, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x5f, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x61, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x66, 0x61, 0x6e, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x63, 0x72, 0x63, 0x00, + 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, + 0xcc, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, + 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x79, 0x72, 0x6f, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, + 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00, 0x00, 0x00, 0x62, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, + 0x2a, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x6c, 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x2e, + 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, 0xfd, 0x14, 0x3d, 0x00, 0x00, 0x00, + 0x5b, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x23, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x00, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x62, 0x71, 0x5f, 0x6e, 0x74, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6d, 0x63, 0x75, 0x5f, + 0x6e, 0x74, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x08, 0xf2, 0x39, 0xc4, 0x71, 0xd3, 0xa2, + 0x7e, 0x67, 0xe7, 0xc7, 0x72, 0x31, 0x84, 0xf1, 0x85, 0x3a, 0x99, 0xe2, 0x3d, 0x0d, 0xaa, 0x16, + 0x10, 0xb6, 0x5c, 0x52, 0x6b, 0x40, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, + 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, + 0xc8, 0x29, 0x31, 0x15, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, + 0x0b, 0xa1, 0xc9, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, + 0xb1, 0xbe, 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, 0xfd, 0x14, + 0x3d, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, 0x37, 0x0c, 0xec, 0x4c, 0xbb, +}; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowState_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x85, 0x3a, 0x99, 0xe2, 0x3d, 0x0d, 0xaa, 0x16, 0x10, 0xb6, 0x5c, + 0x52, 0x6b, 0x40, 0x00, 0x03, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, + 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, 0x97, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x00, + 0xd2, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, + 0xc2, 0xe0, 0x37, 0x0c, 0xec, 0x4c, 0xbb, 0x00, 0xca, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x08, 0xf2, 0x39, + 0xc4, 0x71, 0xd3, 0xa2, 0x7e, 0x67, 0xe7, 0xc7, 0x72, 0x31, 0x84, 0x00, 0x56, 0x03, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, + 0x02, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, + 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00, 0x66, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, 0xfd, 0x14, 0x3d, 0x00, + 0x5f, 0x01, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::LowState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::LowState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::LowState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::LowState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bms_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.foot_force_est()[0], instance.foot_force_est().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bit_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.adc_reel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature_ntc1())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature_ntc2())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 18: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 19: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.fan_frequency()[0], instance.fan_frequency().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 20: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 21: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.motor_state()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bms_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.foot_force_est()[0], instance.foot_force_est().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bit_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.adc_reel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature_ntc1())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature_ntc2())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 18: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 19: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.fan_frequency()[0], instance.fan_frequency().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 20: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 21: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bms_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.foot_force_est()[0], instance.foot_force_est().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bit_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.adc_reel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature_ntc1())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature_ntc2())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 18: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 19: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.fan_frequency()[0], instance.fan_frequency().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 20: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 21: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.head()[0], instance.head().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.level_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.frame_reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.sn()[0], instance.sn().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bandwidth())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bms_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.foot_force_est()[0], instance.foot_force_est().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bit_flag())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.adc_reel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature_ntc1())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature_ntc2())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 17: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 18: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 19: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.fan_frequency()[0], instance.fan_frequency().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 20: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 21: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_LOWSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..980978f230dadc532a3c125c05a88faffb974d76 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmd_.hpp @@ -0,0 +1,528 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorCmd_.idl + Source: MotorCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class MotorCmd_ +{ +private: + uint8_t mode_ = 0; + float q_ = 0.0f; + float dq_ = 0.0f; + float tau_ = 0.0f; + float kp_ = 0.0f; + float kd_ = 0.0f; + std::array reserve_ = { }; + +public: + MotorCmd_() = default; + + explicit MotorCmd_( + uint8_t mode, + float q, + float dq, + float tau, + float kp, + float kd, + const std::array& reserve) : + mode_(mode), + q_(q), + dq_(dq), + tau_(tau), + kp_(kp), + kd_(kd), + reserve_(reserve) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + float q() const { return this->q_; } + float& q() { return this->q_; } + void q(float _val_) { this->q_ = _val_; } + float dq() const { return this->dq_; } + float& dq() { return this->dq_; } + void dq(float _val_) { this->dq_ = _val_; } + float tau() const { return this->tau_; } + float& tau() { return this->tau_; } + void tau(float _val_) { this->tau_ = _val_; } + float kp() const { return this->kp_; } + float& kp() { return this->kp_; } + void kp(float _val_) { this->kp_ = _val_; } + float kd() const { return this->kd_; } + float& kd() { return this->kd_; } + void kd(float _val_) { this->kd_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const MotorCmd_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + q_ == _other.q_ && + dq_ == _other.dq_ && + tau_ == _other.tau_ && + kp_ == _other.kp_ && + kd_ == _other.kd_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const MotorCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::getTypeName() +{ + return "unitree_go::msg::dds_::MotorCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_map_blob_sz() { return 478; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0xa6, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, + 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, + 0x16, 0x30, 0x3b, 0x00, 0xee, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, + 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0xf1, + 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, + 0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, + 0x16, 0x30, 0x3b, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::MotorCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::MotorCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmds_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmds_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..cdce89290cdba26ef875b2fa5519b98037163114 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorCmds_.hpp @@ -0,0 +1,348 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorCmds_.idl + Source: MotorCmds_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP + +#include "unitree/idl/go2/MotorCmd_.hpp" + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class MotorCmds_ +{ +private: + std::vector<::unitree_go::msg::dds_::MotorCmd_> cmds_; + +public: + MotorCmds_() = default; + + explicit MotorCmds_( + const std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds) : + cmds_(cmds) { } + + const std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds() const { return this->cmds_; } + std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds() { return this->cmds_; } + void cmds(const std::vector<::unitree_go::msg::dds_::MotorCmd_>& _val_) { this->cmds_ = _val_; } + void cmds(std::vector<::unitree_go::msg::dds_::MotorCmd_>&& _val_) { this->cmds_ = _val_; } + + bool operator==(const MotorCmds_& _other) const + { + (void) _other; + return cmds_ == _other.cmds_; + } + + bool operator!=(const MotorCmds_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::getTypeName() +{ + return "unitree_go::msg::dds_::MotorCmds_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_map_blob_sz() { return 708; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_map_blob() { + static const uint8_t blob[] = { + 0xf2, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2, + 0xac, 0x2e, 0xa6, 0xb2, 0xa0, 0x48, 0x2e, 0x00, 0x36, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1, + 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0xb0, 0x2e, + 0x95, 0x33, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, + 0xff, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x82, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0x2e, 0xa8, 0x7a, 0x3a, 0xc2, 0x22, 0xec, 0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0x00, + 0x67, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, + 0x43, 0x6d, 0x64, 0x73, 0x5f, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, + 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x63, 0x6d, 0x64, 0x73, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, + 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xa8, 0x7a, 0x3a, 0xc2, 0x22, 0xec, + 0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2, 0xac, + 0x2e, 0xa6, 0xb2, 0xa0, 0x48, 0x2e, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, + 0x3f, 0xff, 0x16, 0x30, 0x3b, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, + 0x1d, 0xfa, 0x02, 0xff, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2, 0xac, 0x2e, 0xa6, 0xb2, + 0xa0, 0x48, 0x2e, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, + 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xa8, 0x7a, + 0x3a, 0xc2, 0x22, 0xec, 0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0x00, 0x6b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, + 0xf2, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::MotorCmds_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorCmds_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::MotorCmds_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::MotorCmds_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.cmds().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.cmds()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::MotorCmds_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.cmds().size()); + if (!read(streamer, se_1)) + return false; + instance.cmds().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.cmds()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::MotorCmds_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.cmds().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.cmds()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::MotorCmds_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.cmds()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..792e68e6c5b46b9ead6c7f1a07ad80c075fa32ee --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorState_.hpp @@ -0,0 +1,696 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorState_.idl + Source: MotorState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class MotorState_ +{ +private: + uint8_t mode_ = 0; + float q_ = 0.0f; + float dq_ = 0.0f; + float ddq_ = 0.0f; + float tau_est_ = 0.0f; + float q_raw_ = 0.0f; + float dq_raw_ = 0.0f; + float ddq_raw_ = 0.0f; + uint8_t temperature_ = 0; + uint32_t lost_ = 0; + std::array reserve_ = { }; + +public: + MotorState_() = default; + + explicit MotorState_( + uint8_t mode, + float q, + float dq, + float ddq, + float tau_est, + float q_raw, + float dq_raw, + float ddq_raw, + uint8_t temperature, + uint32_t lost, + const std::array& reserve) : + mode_(mode), + q_(q), + dq_(dq), + ddq_(ddq), + tau_est_(tau_est), + q_raw_(q_raw), + dq_raw_(dq_raw), + ddq_raw_(ddq_raw), + temperature_(temperature), + lost_(lost), + reserve_(reserve) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + float q() const { return this->q_; } + float& q() { return this->q_; } + void q(float _val_) { this->q_ = _val_; } + float dq() const { return this->dq_; } + float& dq() { return this->dq_; } + void dq(float _val_) { this->dq_ = _val_; } + float ddq() const { return this->ddq_; } + float& ddq() { return this->ddq_; } + void ddq(float _val_) { this->ddq_ = _val_; } + float tau_est() const { return this->tau_est_; } + float& tau_est() { return this->tau_est_; } + void tau_est(float _val_) { this->tau_est_ = _val_; } + float q_raw() const { return this->q_raw_; } + float& q_raw() { return this->q_raw_; } + void q_raw(float _val_) { this->q_raw_ = _val_; } + float dq_raw() const { return this->dq_raw_; } + float& dq_raw() { return this->dq_raw_; } + void dq_raw(float _val_) { this->dq_raw_ = _val_; } + float ddq_raw() const { return this->ddq_raw_; } + float& ddq_raw() { return this->ddq_raw_; } + void ddq_raw(float _val_) { this->ddq_raw_ = _val_; } + uint8_t temperature() const { return this->temperature_; } + uint8_t& temperature() { return this->temperature_; } + void temperature(uint8_t _val_) { this->temperature_ = _val_; } + uint32_t lost() const { return this->lost_; } + uint32_t& lost() { return this->lost_; } + void lost(uint32_t _val_) { this->lost_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const MotorState_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + q_ == _other.q_ && + dq_ == _other.dq_ && + ddq_ == _other.ddq_ && + tau_est_ == _other.tau_est_ && + q_raw_ == _other.q_raw_ && + dq_raw_ == _other.dq_raw_ && + ddq_raw_ == _other.ddq_raw_ && + temperature_ == _other.temperature_ && + lost_ == _other.lost_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const MotorState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::MotorState_>::getTypeName() +{ + return "unitree_go::msg::dds_::MotorState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_map_blob_sz() { return 658; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xe6, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, + 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x00, 0xce, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6e, 0x96, 0x3d, 0x84, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x30, 0x50, 0xb6, 0xd9, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x4a, 0xe0, 0x48, 0xae, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x7a, 0x01, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, + 0x0b, 0xa1, 0xc9, 0x00, 0x62, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, + 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x2a, 0x01, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x71, 0x5f, 0x72, 0x61, + 0x77, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x64, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, + 0x0b, 0xa1, 0xc9, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, + 0xb1, 0xbe, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, + 0x36, 0xb1, 0xbe, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, + 0x0b, 0xa1, 0xc9, 0x00, 0x66, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::MotorState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::MotorState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.q_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.ddq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.q_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.ddq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.q_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.ddq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.q_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.ddq_raw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorStates_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorStates_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..56fbf2d7abe9ad6f927153d55013e44f307de9cc --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/MotorStates_.hpp @@ -0,0 +1,359 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorStates_.idl + Source: MotorStates_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP +#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP + +#include "unitree/idl/go2/MotorState_.hpp" + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class MotorStates_ +{ +private: + std::vector<::unitree_go::msg::dds_::MotorState_> states_; + +public: + MotorStates_() = default; + + explicit MotorStates_( + const std::vector<::unitree_go::msg::dds_::MotorState_>& states) : + states_(states) { } + + const std::vector<::unitree_go::msg::dds_::MotorState_>& states() const { return this->states_; } + std::vector<::unitree_go::msg::dds_::MotorState_>& states() { return this->states_; } + void states(const std::vector<::unitree_go::msg::dds_::MotorState_>& _val_) { this->states_ = _val_; } + void states(std::vector<::unitree_go::msg::dds_::MotorState_>&& _val_) { this->states_ = _val_; } + + bool operator==(const MotorStates_& _other) const + { + (void) _other; + return states_ == _other.states_; + } + + bool operator!=(const MotorStates_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::MotorStates_>::getTypeName() +{ + return "unitree_go::msg::dds_::MotorStates_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorStates_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorStates_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_map_blob_sz() { return 888; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_map_blob() { + static const uint8_t blob[] = { + 0x32, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x13, 0xa0, 0x6c, 0x7a, 0xa8, 0x80, 0x82, + 0x61, 0x7d, 0xd1, 0xe8, 0xed, 0xe0, 0x45, 0x00, 0x36, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1, + 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x34, 0xd9, + 0x55, 0xa0, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, + 0xbe, 0x00, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6e, 0x96, 0x3d, 0x84, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x30, 0x50, 0xb6, 0xd9, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x4a, 0xe0, 0x48, 0xae, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xf6, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0xb9, 0x0a, 0xca, 0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0x00, + 0x69, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, + 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, + 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x62, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x00, 0x00, 0x2a, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x71, 0x5f, 0x72, + 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0x0a, 0xca, + 0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0xf1, 0x13, 0xa0, 0x6c, 0x7a, + 0xa8, 0x80, 0x82, 0x61, 0x7d, 0xd1, 0xe8, 0xed, 0xe0, 0x45, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, + 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, + 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x13, 0xa0, 0x6c, 0x7a, 0xa8, 0x80, 0x82, 0x61, 0x7d, 0xd1, 0xe8, + 0xed, 0xe0, 0x45, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, + 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0x0a, 0xca, + 0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0x00, 0x6d, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00, + 0x66, 0x01, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::MotorStates_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorStates_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorStates_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::MotorStates_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::MotorStates_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.states().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.states()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::MotorStates_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.states().size()); + if (!read(streamer, se_1)) + return false; + instance.states().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.states()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::MotorStates_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.states().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.states()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::MotorStates_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.states()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/PathPoint_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/PathPoint_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d6f70b48ba5952ec04e45d5c9829c6e5cec681c4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/PathPoint_.hpp @@ -0,0 +1,508 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PathPoint_.idl + Source: PathPoint_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP +#define DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP + + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class PathPoint_ +{ +private: + float t_from_start_ = 0.0f; + float x_ = 0.0f; + float y_ = 0.0f; + float yaw_ = 0.0f; + float vx_ = 0.0f; + float vy_ = 0.0f; + float vyaw_ = 0.0f; + +public: + PathPoint_() = default; + + explicit PathPoint_( + float t_from_start, + float x, + float y, + float yaw, + float vx, + float vy, + float vyaw) : + t_from_start_(t_from_start), + x_(x), + y_(y), + yaw_(yaw), + vx_(vx), + vy_(vy), + vyaw_(vyaw) { } + + float t_from_start() const { return this->t_from_start_; } + float& t_from_start() { return this->t_from_start_; } + void t_from_start(float _val_) { this->t_from_start_ = _val_; } + float x() const { return this->x_; } + float& x() { return this->x_; } + void x(float _val_) { this->x_ = _val_; } + float y() const { return this->y_; } + float& y() { return this->y_; } + void y(float _val_) { this->y_ = _val_; } + float yaw() const { return this->yaw_; } + float& yaw() { return this->yaw_; } + void yaw(float _val_) { this->yaw_ = _val_; } + float vx() const { return this->vx_; } + float& vx() { return this->vx_; } + void vx(float _val_) { this->vx_ = _val_; } + float vy() const { return this->vy_; } + float& vy() { return this->vy_; } + void vy(float _val_) { this->vy_ = _val_; } + float vyaw() const { return this->vyaw_; } + float& vyaw() { return this->vyaw_; } + void vyaw(float _val_) { this->vyaw_ = _val_; } + + bool operator==(const PathPoint_& _other) const + { + (void) _other; + return t_from_start_ == _other.t_from_start_ && + x_ == _other.x_ && + y_ == _other.y_ && + yaw_ == _other.yaw_ && + vx_ == _other.vx_ && + vy_ == _other.vy_ && + vyaw_ == _other.vyaw_; + } + + bool operator!=(const PathPoint_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::PathPoint_>::getTypeName() +{ + return "unitree_go::msg::dds_::PathPoint_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::PathPoint_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_map_blob_sz() { return 454; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_map_blob() { + static const uint8_t blob[] = { + 0x9b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, + 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x6c, 0x41, 0xab, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x92, 0xdd, 0xa6, 0x44, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x7f, 0xc7, 0x3d, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x94, 0x95, 0xfa, 0x6c, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x83, 0x29, 0x00, 0xa3, 0x00, + 0xfb, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, + 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, 0xe3, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x50, 0x61, 0x74, 0x68, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, + 0xab, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x76, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x76, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x76, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, + 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, + 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, + 0xf6, 0xbd, 0xe2, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, + 0xa2, 0xd4, 0x15, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::PathPoint_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::PathPoint_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::PathPoint_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::PathPoint_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::PathPoint_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.t_from_start())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.vx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.vy())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.vyaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::PathPoint_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.t_from_start())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.vx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.vy())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.vyaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::PathPoint_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.t_from_start())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.vx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.vy())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.vyaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::PathPoint_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.t_from_start())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.vx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.vy())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.vyaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Req_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Req_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3efeead1a4491d71748b097d68920b46391d96f6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Req_.hpp @@ -0,0 +1,308 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Req_.idl + Source: Req_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_REQ__HPP +#define DDSCXX_UNITREE_IDL_GO2_REQ__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class Req_ +{ +private: + std::string uuid_; + std::string body_; + +public: + Req_() = default; + + explicit Req_( + const std::string& uuid, + const std::string& body) : + uuid_(uuid), + body_(body) { } + + const std::string& uuid() const { return this->uuid_; } + std::string& uuid() { return this->uuid_; } + void uuid(const std::string& _val_) { this->uuid_ = _val_; } + void uuid(std::string&& _val_) { this->uuid_ = _val_; } + const std::string& body() const { return this->body_; } + std::string& body() { return this->body_; } + void body(const std::string& _val_) { this->body_ = _val_; } + void body(std::string&& _val_) { this->body_ = _val_; } + + bool operator==(const Req_& _other) const + { + (void) _other; + return uuid_ == _other.uuid_ && + body_ == _other.body_; + } + + bool operator!=(const Req_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::Req_>::getTypeName() +{ + return "unitree_go::msg::dds_::Req_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Req_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Req_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Req_>::type_map_blob_sz() { return 246; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Req_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Req_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab, + 0x31, 0x5f, 0x50, 0x70, 0x86, 0x74, 0x52, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xef, 0x7c, 0x87, 0x6f, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x84, 0x1a, 0x2d, 0x68, + 0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61, + 0x1d, 0xd6, 0x73, 0x0b, 0x4b, 0x4d, 0x57, 0x00, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x5f, 0x00, 0x33, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x75, 0x75, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61, + 0x1d, 0xd6, 0x73, 0x0b, 0x4b, 0x4d, 0x57, 0xf1, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab, 0x31, + 0x5f, 0x50, 0x70, 0x86, 0x74, 0x52, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Req_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab, 0x31, 0x5f, 0x50, 0x70, + 0x86, 0x74, 0x52, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61, 0x1d, 0xd6, 0x73, 0x0b, + 0x4b, 0x4d, 0x57, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::Req_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Req_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Req_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::Req_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::Req_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::Req_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Req_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::Req_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::Req_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Req_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::Req_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::Req_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Req_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::Req_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::Req_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Req_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_REQ__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Res_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Res_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bb37287042c4b2e226d776747ed7aa55be05c859 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/Res_.hpp @@ -0,0 +1,395 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Res_.idl + Source: Res_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_RES__HPP +#define DDSCXX_UNITREE_IDL_GO2_RES__HPP + +#include +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class Res_ +{ +private: + std::string uuid_; + std::vector data_; + std::string body_; + +public: + Res_() = default; + + explicit Res_( + const std::string& uuid, + const std::vector& data, + const std::string& body) : + uuid_(uuid), + data_(data), + body_(body) { } + + const std::string& uuid() const { return this->uuid_; } + std::string& uuid() { return this->uuid_; } + void uuid(const std::string& _val_) { this->uuid_ = _val_; } + void uuid(std::string&& _val_) { this->uuid_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + const std::string& body() const { return this->body_; } + std::string& body() { return this->body_; } + void body(const std::string& _val_) { this->body_ = _val_; } + void body(std::string&& _val_) { this->body_ = _val_; } + + bool operator==(const Res_& _other) const + { + (void) _other; + return uuid_ == _other.uuid_ && + data_ == _other.data_ && + body_ == _other.body_; + } + + bool operator!=(const Res_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::Res_>::getTypeName() +{ + return "unitree_go::msg::dds_::Res_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Res_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Res_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Res_>::type_map_blob_sz() { return 294; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Res_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Res_>::type_map_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0, + 0x13, 0x2b, 0xc3, 0x64, 0xa3, 0xd8, 0xca, 0x00, 0x48, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xef, 0x7c, 0x87, 0x6f, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x8d, 0x77, 0x7f, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x84, 0x1a, 0x2d, 0x68, 0x97, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0x28, 0xe7, + 0x14, 0xf2, 0x86, 0x5c, 0xb5, 0xdb, 0x4d, 0x4f, 0x9b, 0x8d, 0x01, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x5f, 0x00, 0x4f, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x75, 0x75, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, + 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0x28, 0xe7, 0x14, 0xf2, 0x86, 0x5c, + 0xb5, 0xdb, 0x4d, 0x4f, 0x9b, 0x8d, 0x01, 0xf1, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0, 0x13, + 0x2b, 0xc3, 0x64, 0xa3, 0xd8, 0xca, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Res_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0, 0x13, 0x2b, 0xc3, 0x64, + 0xa3, 0xd8, 0xca, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0x28, 0xe7, 0x14, 0xf2, 0x86, 0x5c, 0xb5, 0xdb, 0x4d, 0x4f, + 0x9b, 0x8d, 0x01, 0x00, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::Res_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Res_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Res_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::Res_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::Res_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::Res_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Res_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::Res_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::Res_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Res_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::Res_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::Res_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Res_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::Res_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.uuid(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.body(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::Res_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::Res_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_RES__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..71cb8b74e16b91f4ad326cd257d2758de65bb778 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeCmd_.hpp @@ -0,0 +1,819 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: SportModeCmd_.idl + Source: SportModeCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP +#define DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP + +#include "unitree/idl/go2/BmsCmd_.hpp" + +#include "unitree/idl/go2/PathPoint_.hpp" + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class SportModeCmd_ +{ +private: + uint8_t mode_ = 0; + uint8_t gait_type_ = 0; + uint8_t speed_level_ = 0; + float foot_raise_height_ = 0.0f; + float body_height_ = 0.0f; + std::array position_ = { }; + std::array euler_ = { }; + std::array velocity_ = { }; + float yaw_speed_ = 0.0f; + ::unitree_go::msg::dds_::BmsCmd_ bms_cmd_; + std::array<::unitree_go::msg::dds_::PathPoint_, 30> path_point_ = { }; + +public: + SportModeCmd_() = default; + + explicit SportModeCmd_( + uint8_t mode, + uint8_t gait_type, + uint8_t speed_level, + float foot_raise_height, + float body_height, + const std::array& position, + const std::array& euler, + const std::array& velocity, + float yaw_speed, + const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd, + const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point) : + mode_(mode), + gait_type_(gait_type), + speed_level_(speed_level), + foot_raise_height_(foot_raise_height), + body_height_(body_height), + position_(position), + euler_(euler), + velocity_(velocity), + yaw_speed_(yaw_speed), + bms_cmd_(bms_cmd), + path_point_(path_point) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + uint8_t gait_type() const { return this->gait_type_; } + uint8_t& gait_type() { return this->gait_type_; } + void gait_type(uint8_t _val_) { this->gait_type_ = _val_; } + uint8_t speed_level() const { return this->speed_level_; } + uint8_t& speed_level() { return this->speed_level_; } + void speed_level(uint8_t _val_) { this->speed_level_ = _val_; } + float foot_raise_height() const { return this->foot_raise_height_; } + float& foot_raise_height() { return this->foot_raise_height_; } + void foot_raise_height(float _val_) { this->foot_raise_height_ = _val_; } + float body_height() const { return this->body_height_; } + float& body_height() { return this->body_height_; } + void body_height(float _val_) { this->body_height_ = _val_; } + const std::array& position() const { return this->position_; } + std::array& position() { return this->position_; } + void position(const std::array& _val_) { this->position_ = _val_; } + void position(std::array&& _val_) { this->position_ = _val_; } + const std::array& euler() const { return this->euler_; } + std::array& euler() { return this->euler_; } + void euler(const std::array& _val_) { this->euler_ = _val_; } + void euler(std::array&& _val_) { this->euler_ = _val_; } + const std::array& velocity() const { return this->velocity_; } + std::array& velocity() { return this->velocity_; } + void velocity(const std::array& _val_) { this->velocity_ = _val_; } + void velocity(std::array&& _val_) { this->velocity_ = _val_; } + float yaw_speed() const { return this->yaw_speed_; } + float& yaw_speed() { return this->yaw_speed_; } + void yaw_speed(float _val_) { this->yaw_speed_ = _val_; } + const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() const { return this->bms_cmd_; } + ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() { return this->bms_cmd_; } + void bms_cmd(const ::unitree_go::msg::dds_::BmsCmd_& _val_) { this->bms_cmd_ = _val_; } + void bms_cmd(::unitree_go::msg::dds_::BmsCmd_&& _val_) { this->bms_cmd_ = _val_; } + const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point() const { return this->path_point_; } + std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point() { return this->path_point_; } + void path_point(const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& _val_) { this->path_point_ = _val_; } + void path_point(std::array<::unitree_go::msg::dds_::PathPoint_, 30>&& _val_) { this->path_point_ = _val_; } + + bool operator==(const SportModeCmd_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + gait_type_ == _other.gait_type_ && + speed_level_ == _other.speed_level_ && + foot_raise_height_ == _other.foot_raise_height_ && + body_height_ == _other.body_height_ && + position_ == _other.position_ && + euler_ == _other.euler_ && + velocity_ == _other.velocity_ && + yaw_speed_ == _other.yaw_speed_ && + bms_cmd_ == _other.bms_cmd_ && + path_point_ == _other.path_point_; + } + + bool operator!=(const SportModeCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::getTypeName() +{ + return "unitree_go::msg::dds_::SportModeCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_map_blob_sz() { return 1506; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x13, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d, + 0x02, 0x68, 0x52, 0x1d, 0xd0, 0xd4, 0xb6, 0x00, 0x10, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xe2, 0xc7, 0x6d, 0x1e, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x3b, 0xbb, 0xc1, 0x77, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb5, 0x46, 0x7f, 0xa0, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe0, 0x34, 0x4c, 0x32, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0xbc, 0x64, 0x6b, 0xe3, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0xac, 0x1a, + 0x45, 0x3d, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x25, + 0xcf, 0xab, 0x66, 0x00, 0x19, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x3e, + 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x11, 0x50, 0x97, + 0xc7, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1e, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, + 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0xdc, 0x56, 0xb6, 0x0a, 0xf1, 0x3e, 0x8e, 0xb6, + 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32, + 0x62, 0xd4, 0x8d, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0x6d, + 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x00, 0x00, + 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0xe9, 0x6c, 0x41, 0xab, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x92, 0xdd, 0xa6, 0x44, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x76, 0x7f, 0xc7, 0x3d, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x94, 0x95, 0xfa, 0x6c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x83, 0x29, 0x00, 0xa3, 0x00, 0x63, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66, 0x1a, 0x6a, 0xcc, 0x38, 0x22, 0x2e, 0x2f, 0x00, + 0xc9, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x53, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x01, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x61, 0x69, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x12, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x72, 0x61, 0x69, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x65, 0x75, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x79, 0x61, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, + 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x6d, 0x73, 0x5f, + 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1e, 0xf2, 0xd6, 0x62, + 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x0b, 0x00, 0x00, 0x00, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, + 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x76, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, + 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, + 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x50, 0x61, 0x74, 0x68, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, + 0xab, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x76, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x76, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x76, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, + 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66, + 0x1a, 0x6a, 0xcc, 0x38, 0x22, 0x2e, 0x2f, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d, 0x02, + 0x68, 0x52, 0x1d, 0xd0, 0xd4, 0xb6, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, + 0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, + 0x51, 0xed, 0x4a, 0x23, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, + 0xa2, 0xd4, 0x15, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, + 0xbd, 0xe2, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d, 0x02, 0x68, 0x52, 0x1d, + 0xd0, 0xd4, 0xb6, 0x00, 0x14, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, + 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x42, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, + 0x87, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66, 0x1a, 0x6a, 0xcc, 0x38, + 0x22, 0x2e, 0x2f, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, + 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, + 0xe7, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::SportModeCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::SportModeCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::SportModeCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::SportModeCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.speed_level())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.euler()[0], instance.euler().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::SportModeCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.speed_level())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.euler()[0], instance.euler().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.path_point()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::SportModeCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.speed_level())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.euler()[0], instance.euler().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::SportModeCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.speed_level())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.euler()[0], instance.euler().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.bms_cmd(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0eda56288b6ac8513ed0766e3a3d2019f0c0ada5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/SportModeState_.hpp @@ -0,0 +1,1121 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: SportModeState_.idl + Source: SportModeState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP + +#include "unitree/idl/go2/IMUState_.hpp" + +#include "unitree/idl/go2/PathPoint_.hpp" + +#include "unitree/idl/go2/TimeSpec_.hpp" + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class SportModeState_ +{ +private: + ::unitree_go::msg::dds_::TimeSpec_ stamp_; + uint32_t error_code_ = 0; + ::unitree_go::msg::dds_::IMUState_ imu_state_; + uint8_t mode_ = 0; + float progress_ = 0.0f; + uint8_t gait_type_ = 0; + float foot_raise_height_ = 0.0f; + std::array position_ = { }; + float body_height_ = 0.0f; + std::array velocity_ = { }; + float yaw_speed_ = 0.0f; + std::array range_obstacle_ = { }; + std::array foot_force_ = { }; + std::array foot_position_body_ = { }; + std::array foot_speed_body_ = { }; + std::array<::unitree_go::msg::dds_::PathPoint_, 10> path_point_ = { }; + +public: + SportModeState_() = default; + + explicit SportModeState_( + const ::unitree_go::msg::dds_::TimeSpec_& stamp, + uint32_t error_code, + const ::unitree_go::msg::dds_::IMUState_& imu_state, + uint8_t mode, + float progress, + uint8_t gait_type, + float foot_raise_height, + const std::array& position, + float body_height, + const std::array& velocity, + float yaw_speed, + const std::array& range_obstacle, + const std::array& foot_force, + const std::array& foot_position_body, + const std::array& foot_speed_body, + const std::array<::unitree_go::msg::dds_::PathPoint_, 10>& path_point) : + stamp_(stamp), + error_code_(error_code), + imu_state_(imu_state), + mode_(mode), + progress_(progress), + gait_type_(gait_type), + foot_raise_height_(foot_raise_height), + position_(position), + body_height_(body_height), + velocity_(velocity), + yaw_speed_(yaw_speed), + range_obstacle_(range_obstacle), + foot_force_(foot_force), + foot_position_body_(foot_position_body), + foot_speed_body_(foot_speed_body), + path_point_(path_point) { } + + const ::unitree_go::msg::dds_::TimeSpec_& stamp() const { return this->stamp_; } + ::unitree_go::msg::dds_::TimeSpec_& stamp() { return this->stamp_; } + void stamp(const ::unitree_go::msg::dds_::TimeSpec_& _val_) { this->stamp_ = _val_; } + void stamp(::unitree_go::msg::dds_::TimeSpec_&& _val_) { this->stamp_ = _val_; } + uint32_t error_code() const { return this->error_code_; } + uint32_t& error_code() { return this->error_code_; } + void error_code(uint32_t _val_) { this->error_code_ = _val_; } + const ::unitree_go::msg::dds_::IMUState_& imu_state() const { return this->imu_state_; } + ::unitree_go::msg::dds_::IMUState_& imu_state() { return this->imu_state_; } + void imu_state(const ::unitree_go::msg::dds_::IMUState_& _val_) { this->imu_state_ = _val_; } + void imu_state(::unitree_go::msg::dds_::IMUState_&& _val_) { this->imu_state_ = _val_; } + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + float progress() const { return this->progress_; } + float& progress() { return this->progress_; } + void progress(float _val_) { this->progress_ = _val_; } + uint8_t gait_type() const { return this->gait_type_; } + uint8_t& gait_type() { return this->gait_type_; } + void gait_type(uint8_t _val_) { this->gait_type_ = _val_; } + float foot_raise_height() const { return this->foot_raise_height_; } + float& foot_raise_height() { return this->foot_raise_height_; } + void foot_raise_height(float _val_) { this->foot_raise_height_ = _val_; } + const std::array& position() const { return this->position_; } + std::array& position() { return this->position_; } + void position(const std::array& _val_) { this->position_ = _val_; } + void position(std::array&& _val_) { this->position_ = _val_; } + float body_height() const { return this->body_height_; } + float& body_height() { return this->body_height_; } + void body_height(float _val_) { this->body_height_ = _val_; } + const std::array& velocity() const { return this->velocity_; } + std::array& velocity() { return this->velocity_; } + void velocity(const std::array& _val_) { this->velocity_ = _val_; } + void velocity(std::array&& _val_) { this->velocity_ = _val_; } + float yaw_speed() const { return this->yaw_speed_; } + float& yaw_speed() { return this->yaw_speed_; } + void yaw_speed(float _val_) { this->yaw_speed_ = _val_; } + const std::array& range_obstacle() const { return this->range_obstacle_; } + std::array& range_obstacle() { return this->range_obstacle_; } + void range_obstacle(const std::array& _val_) { this->range_obstacle_ = _val_; } + void range_obstacle(std::array&& _val_) { this->range_obstacle_ = _val_; } + const std::array& foot_force() const { return this->foot_force_; } + std::array& foot_force() { return this->foot_force_; } + void foot_force(const std::array& _val_) { this->foot_force_ = _val_; } + void foot_force(std::array&& _val_) { this->foot_force_ = _val_; } + const std::array& foot_position_body() const { return this->foot_position_body_; } + std::array& foot_position_body() { return this->foot_position_body_; } + void foot_position_body(const std::array& _val_) { this->foot_position_body_ = _val_; } + void foot_position_body(std::array&& _val_) { this->foot_position_body_ = _val_; } + const std::array& foot_speed_body() const { return this->foot_speed_body_; } + std::array& foot_speed_body() { return this->foot_speed_body_; } + void foot_speed_body(const std::array& _val_) { this->foot_speed_body_ = _val_; } + void foot_speed_body(std::array&& _val_) { this->foot_speed_body_ = _val_; } + const std::array<::unitree_go::msg::dds_::PathPoint_, 10>& path_point() const { return this->path_point_; } + std::array<::unitree_go::msg::dds_::PathPoint_, 10>& path_point() { return this->path_point_; } + void path_point(const std::array<::unitree_go::msg::dds_::PathPoint_, 10>& _val_) { this->path_point_ = _val_; } + void path_point(std::array<::unitree_go::msg::dds_::PathPoint_, 10>&& _val_) { this->path_point_ = _val_; } + + bool operator==(const SportModeState_& _other) const + { + (void) _other; + return stamp_ == _other.stamp_ && + error_code_ == _other.error_code_ && + imu_state_ == _other.imu_state_ && + mode_ == _other.mode_ && + progress_ == _other.progress_ && + gait_type_ == _other.gait_type_ && + foot_raise_height_ == _other.foot_raise_height_ && + position_ == _other.position_ && + body_height_ == _other.body_height_ && + velocity_ == _other.velocity_ && + yaw_speed_ == _other.yaw_speed_ && + range_obstacle_ == _other.range_obstacle_ && + foot_force_ == _other.foot_force_ && + foot_position_body_ == _other.foot_position_body_ && + foot_speed_body_ == _other.foot_speed_body_ && + path_point_ == _other.path_point_; + } + + bool operator!=(const SportModeState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::SportModeState_>::getTypeName() +{ + return "unitree_go::msg::dds_::SportModeState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::SportModeState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeState_>::type_map_blob_sz() { return 2316; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeState_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x33, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x9f, 0xa6, 0xcc, 0xdc, 0x5c, 0xaf, 0xde, + 0xaa, 0xb8, 0xa7, 0x62, 0xe3, 0x10, 0x44, 0x00, 0x94, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, + 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x8e, 0x95, 0xbd, 0x42, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, + 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x9e, 0x5f, 0x37, 0x13, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x3c, 0x70, 0x9b, 0x10, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xe2, 0xc7, 0x6d, 0x1e, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb5, 0x46, 0x7f, 0xa0, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe0, 0x34, 0x4c, 0x32, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0xac, 0x1a, 0x45, 0x3d, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x25, 0xcf, 0xab, 0x66, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0xcd, 0x43, + 0x62, 0x2f, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x41, 0x56, 0x4b, 0x84, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xb3, 0x0f, 0x21, 0x66, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0c, 0x09, 0x43, 0x94, 0x9e, 0x02, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0xf1, 0x6d, 0x6e, + 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0xdc, 0x56, 0xb6, 0x0a, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, + 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0e, 0x12, + 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, 0x92, 0xed, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0xf1, + 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x00, + 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0xe9, 0x6c, 0x41, 0xab, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x92, 0xdd, 0xa6, 0x44, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x76, 0x7f, 0xc7, 0x3d, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x94, 0x95, 0xfa, 0x6c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x83, 0x29, 0x00, 0xa3, 0x00, 0x4f, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x97, 0x49, 0x63, 0x0f, 0xff, 0x75, 0xcc, 0x17, 0x0a, 0xfb, 0x23, 0x87, 0x83, 0x00, + 0xa9, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x53, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x6d, 0x02, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x61, + 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, 0xcc, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, + 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x61, 0x69, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x12, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x72, 0x61, 0x69, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x79, 0x61, 0x77, 0x5f, + 0x73, 0x70, 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6f, 0x62, 0x73, 0x74, 0x61, 0x63, + 0x6c, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x62, + 0x6f, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0xd6, 0x62, + 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x0b, 0x00, 0x00, 0x00, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, + 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, 0xcc, 0x6e, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0xc4, + 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, + 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, + 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, + 0x15, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, + 0x61, 0x74, 0x68, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x79, 0x61, 0x77, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x76, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x76, 0x79, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x76, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x97, 0x49, 0x63, 0x0f, 0xff, 0x75, 0xcc, 0x17, 0x0a, 0xfb, + 0x23, 0x87, 0x83, 0xf1, 0x9f, 0xa6, 0xcc, 0xdc, 0x5c, 0xaf, 0xde, 0xaa, 0xb8, 0xa7, 0x62, 0xe3, + 0x10, 0x44, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, + 0xcc, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, + 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0xf1, + 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0xf2, 0xd6, + 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0xf1, 0x6d, 0x6e, + 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeState_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x9f, 0xa6, 0xcc, 0xdc, 0x5c, 0xaf, 0xde, 0xaa, 0xb8, 0xa7, 0x62, + 0xe3, 0x10, 0x44, 0x00, 0x98, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, + 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, + 0x97, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, + 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x97, 0x49, + 0x63, 0x0f, 0xff, 0x75, 0xcc, 0x17, 0x0a, 0xfb, 0x23, 0x87, 0x83, 0x00, 0xad, 0x02, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, 0xcc, 0x00, + 0x72, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, + 0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, 0x02, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, + 0xe7, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::SportModeState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::SportModeState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::SportModeState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::SportModeState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.error_code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.progress())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.range_obstacle()[0], instance.range_obstacle().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.foot_position_body()[0], instance.foot_position_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.foot_speed_body()[0], instance.foot_speed_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.error_code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.progress())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.range_obstacle()[0], instance.range_obstacle().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.foot_position_body()[0], instance.foot_position_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.foot_speed_body()[0], instance.foot_speed_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.path_point()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.error_code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.progress())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.range_obstacle()[0], instance.range_obstacle().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.foot_position_body()[0], instance.foot_position_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.foot_speed_body()[0], instance.foot_speed_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.error_code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.progress())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.gait_type())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.foot_raise_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.position()[0], instance.position().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.body_height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.velocity()[0], instance.velocity().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.yaw_speed())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.range_obstacle()[0], instance.range_obstacle().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.foot_force()[0], instance.foot_force().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.foot_position_body()[0], instance.foot_position_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.foot_speed_body()[0], instance.foot_speed_body().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.path_point()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_SPORTMODESTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/TimeSpec_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/TimeSpec_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5cd7f3618788d75266fa692f6f77cdc8e23a4afe --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/TimeSpec_.hpp @@ -0,0 +1,302 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: TimeSpec_.idl + Source: TimeSpec_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP +#define DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class TimeSpec_ +{ +private: + int32_t sec_ = 0; + uint32_t nanosec_ = 0; + +public: + TimeSpec_() = default; + + explicit TimeSpec_( + int32_t sec, + uint32_t nanosec) : + sec_(sec), + nanosec_(nanosec) { } + + int32_t sec() const { return this->sec_; } + int32_t& sec() { return this->sec_; } + void sec(int32_t _val_) { this->sec_ = _val_; } + uint32_t nanosec() const { return this->nanosec_; } + uint32_t& nanosec() { return this->nanosec_; } + void nanosec(uint32_t _val_) { this->nanosec_ = _val_; } + + bool operator==(const TimeSpec_& _other) const + { + (void) _other; + return sec_ == _other.sec_ && + nanosec_ == _other.nanosec_; + } + + bool operator!=(const TimeSpec_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::getTypeName() +{ + return "unitree_go::msg::dds_::TimeSpec_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_map_blob_sz() { return 258; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, + 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0x00, + 0x86, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, + 0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, 0xcc, 0x00, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, + 0xc9, 0x35, 0xcc, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, + 0xf9, 0x8d, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24, + 0xc9, 0x35, 0xcc, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::TimeSpec_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::TimeSpec_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::TimeSpec_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::TimeSpec_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::TimeSpec_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::TimeSpec_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::TimeSpec_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..913e7a24f1554d0ddfecd666b4968ba71414cab4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbState_.hpp @@ -0,0 +1,968 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: UwbState_.idl + Source: UwbState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP +#define DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP + +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class UwbState_ +{ +private: + std::array version_ = { }; + uint8_t channel_ = 0; + uint8_t joy_mode_ = 0; + float orientation_est_ = 0.0f; + float pitch_est_ = 0.0f; + float distance_est_ = 0.0f; + float yaw_est_ = 0.0f; + float tag_roll_ = 0.0f; + float tag_pitch_ = 0.0f; + float tag_yaw_ = 0.0f; + float base_roll_ = 0.0f; + float base_pitch_ = 0.0f; + float base_yaw_ = 0.0f; + std::array joystick_ = { }; + uint8_t error_state_ = 0; + uint8_t buttons_ = 0; + uint8_t enabled_from_app_ = 0; + +public: + UwbState_() = default; + + explicit UwbState_( + const std::array& version, + uint8_t channel, + uint8_t joy_mode, + float orientation_est, + float pitch_est, + float distance_est, + float yaw_est, + float tag_roll, + float tag_pitch, + float tag_yaw, + float base_roll, + float base_pitch, + float base_yaw, + const std::array& joystick, + uint8_t error_state, + uint8_t buttons, + uint8_t enabled_from_app) : + version_(version), + channel_(channel), + joy_mode_(joy_mode), + orientation_est_(orientation_est), + pitch_est_(pitch_est), + distance_est_(distance_est), + yaw_est_(yaw_est), + tag_roll_(tag_roll), + tag_pitch_(tag_pitch), + tag_yaw_(tag_yaw), + base_roll_(base_roll), + base_pitch_(base_pitch), + base_yaw_(base_yaw), + joystick_(joystick), + error_state_(error_state), + buttons_(buttons), + enabled_from_app_(enabled_from_app) { } + + const std::array& version() const { return this->version_; } + std::array& version() { return this->version_; } + void version(const std::array& _val_) { this->version_ = _val_; } + void version(std::array&& _val_) { this->version_ = _val_; } + uint8_t channel() const { return this->channel_; } + uint8_t& channel() { return this->channel_; } + void channel(uint8_t _val_) { this->channel_ = _val_; } + uint8_t joy_mode() const { return this->joy_mode_; } + uint8_t& joy_mode() { return this->joy_mode_; } + void joy_mode(uint8_t _val_) { this->joy_mode_ = _val_; } + float orientation_est() const { return this->orientation_est_; } + float& orientation_est() { return this->orientation_est_; } + void orientation_est(float _val_) { this->orientation_est_ = _val_; } + float pitch_est() const { return this->pitch_est_; } + float& pitch_est() { return this->pitch_est_; } + void pitch_est(float _val_) { this->pitch_est_ = _val_; } + float distance_est() const { return this->distance_est_; } + float& distance_est() { return this->distance_est_; } + void distance_est(float _val_) { this->distance_est_ = _val_; } + float yaw_est() const { return this->yaw_est_; } + float& yaw_est() { return this->yaw_est_; } + void yaw_est(float _val_) { this->yaw_est_ = _val_; } + float tag_roll() const { return this->tag_roll_; } + float& tag_roll() { return this->tag_roll_; } + void tag_roll(float _val_) { this->tag_roll_ = _val_; } + float tag_pitch() const { return this->tag_pitch_; } + float& tag_pitch() { return this->tag_pitch_; } + void tag_pitch(float _val_) { this->tag_pitch_ = _val_; } + float tag_yaw() const { return this->tag_yaw_; } + float& tag_yaw() { return this->tag_yaw_; } + void tag_yaw(float _val_) { this->tag_yaw_ = _val_; } + float base_roll() const { return this->base_roll_; } + float& base_roll() { return this->base_roll_; } + void base_roll(float _val_) { this->base_roll_ = _val_; } + float base_pitch() const { return this->base_pitch_; } + float& base_pitch() { return this->base_pitch_; } + void base_pitch(float _val_) { this->base_pitch_ = _val_; } + float base_yaw() const { return this->base_yaw_; } + float& base_yaw() { return this->base_yaw_; } + void base_yaw(float _val_) { this->base_yaw_ = _val_; } + const std::array& joystick() const { return this->joystick_; } + std::array& joystick() { return this->joystick_; } + void joystick(const std::array& _val_) { this->joystick_ = _val_; } + void joystick(std::array&& _val_) { this->joystick_ = _val_; } + uint8_t error_state() const { return this->error_state_; } + uint8_t& error_state() { return this->error_state_; } + void error_state(uint8_t _val_) { this->error_state_ = _val_; } + uint8_t buttons() const { return this->buttons_; } + uint8_t& buttons() { return this->buttons_; } + void buttons(uint8_t _val_) { this->buttons_ = _val_; } + uint8_t enabled_from_app() const { return this->enabled_from_app_; } + uint8_t& enabled_from_app() { return this->enabled_from_app_; } + void enabled_from_app(uint8_t _val_) { this->enabled_from_app_ = _val_; } + + bool operator==(const UwbState_& _other) const + { + (void) _other; + return version_ == _other.version_ && + channel_ == _other.channel_ && + joy_mode_ == _other.joy_mode_ && + orientation_est_ == _other.orientation_est_ && + pitch_est_ == _other.pitch_est_ && + distance_est_ == _other.distance_est_ && + yaw_est_ == _other.yaw_est_ && + tag_roll_ == _other.tag_roll_ && + tag_pitch_ == _other.tag_pitch_ && + tag_yaw_ == _other.tag_yaw_ && + base_roll_ == _other.base_roll_ && + base_pitch_ == _other.base_pitch_ && + base_yaw_ == _other.base_yaw_ && + joystick_ == _other.joystick_ && + error_state_ == _other.error_state_ && + buttons_ == _other.buttons_ && + enabled_from_app_ == _other.enabled_from_app_; + } + + bool operator!=(const UwbState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::UwbState_>::getTypeName() +{ + return "unitree_go::msg::dds_::UwbState_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::UwbState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_map_blob_sz() { return 998; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x53, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3, + 0x3d, 0x57, 0x4e, 0xb0, 0xbe, 0x39, 0xae, 0x00, 0x3b, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x2a, 0xf7, 0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc4, 0x85, 0xd2, 0xed, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf5, 0x20, 0x55, 0xed, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0x48, 0xcc, 0x5d, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x17, 0x8d, 0xce, 0xa7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xf5, 0x06, 0x73, 0x9b, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x2e, 0xae, 0x04, 0xde, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6f, 0x2d, 0x01, 0xc9, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x2f, 0x7d, 0xc9, 0x14, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x1e, 0xe4, 0xc0, 0x80, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x69, 0x52, 0xd1, 0x26, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0xda, 0x41, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x83, 0xbd, 0x50, 0x7a, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x09, 0x2e, 0xd6, 0x98, 0x33, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0xa7, 0xd8, 0x5b, 0x8a, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x02, 0x63, 0x4e, 0xff, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x84, 0x86, 0xf2, 0x61, 0x00, 0x63, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1, 0x58, 0xaf, 0x64, 0xdc, 0x66, 0xa5, 0x20, 0x00, + 0x4b, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x55, 0x77, 0x62, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x6a, 0x6f, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x73, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x70, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, + 0x1b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, + 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x79, 0x61, 0x77, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f, + 0x72, 0x6f, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f, 0x70, 0x69, 0x74, 0x63, + 0x68, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x70, 0x69, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1, + 0x58, 0xaf, 0x64, 0xdc, 0x66, 0xa5, 0x20, 0xf1, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3, 0x3d, + 0x57, 0x4e, 0xb0, 0xbe, 0x39, 0xae, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3, 0x3d, 0x57, 0x4e, 0xb0, + 0xbe, 0x39, 0xae, 0x00, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1, 0x58, 0xaf, 0x64, 0xdc, + 0x66, 0xa5, 0x20, 0x00, 0x4f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::UwbState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::UwbState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::UwbState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::UwbState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::UwbState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.channel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.joy_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.orientation_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.pitch_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.distance_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.yaw_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tag_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tag_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tag_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.base_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.base_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.base_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.joystick()[0], instance.joystick().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.buttons())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.enabled_from_app())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::UwbState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.channel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.joy_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.orientation_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.pitch_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.distance_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.yaw_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tag_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tag_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tag_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.base_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.base_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.base_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.joystick()[0], instance.joystick().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.buttons())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.enabled_from_app())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::UwbState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.channel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.joy_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.orientation_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.pitch_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.distance_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.yaw_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tag_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tag_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tag_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.base_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.base_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.base_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.joystick()[0], instance.joystick().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.buttons())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.enabled_from_app())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::UwbState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.channel())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.joy_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.orientation_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.pitch_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.distance_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.yaw_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tag_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tag_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tag_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.base_roll())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.base_pitch())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.base_yaw())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 13: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.joystick()[0], instance.joystick().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 14: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.error_state())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 15: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.buttons())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 16: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.enabled_from_app())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbSwitch_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbSwitch_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..12abe7c26dae9c1a047ea7c57dc64107fa0f1d96 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/UwbSwitch_.hpp @@ -0,0 +1,260 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: UwbSwitch_.idl + Source: UwbSwitch_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP +#define DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class UwbSwitch_ +{ +private: + uint8_t enabled_ = 0; + +public: + UwbSwitch_() = default; + + explicit UwbSwitch_( + uint8_t enabled) : + enabled_(enabled) { } + + uint8_t enabled() const { return this->enabled_; } + uint8_t& enabled() { return this->enabled_; } + void enabled(uint8_t _val_) { this->enabled_ = _val_; } + + bool operator==(const UwbSwitch_& _other) const + { + (void) _other; + return enabled_ == _other.enabled_; + } + + bool operator!=(const UwbSwitch_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::getTypeName() +{ + return "unitree_go::msg::dds_::UwbSwitch_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_map_blob_sz() { return 218; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_map_blob() { + static const uint8_t blob[] = { + 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xcf, 0xfe, 0xd4, 0x3a, 0x87, 0x3e, + 0x4b, 0xff, 0x03, 0x70, 0x95, 0x52, 0x60, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa1, 0x03, 0x11, 0x45, 0x00, + 0x6e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x22, 0x0e, 0x76, 0xfa, 0x1b, 0x1c, 0x22, + 0x03, 0x2c, 0x71, 0xd3, 0x7c, 0x77, 0x05, 0x00, 0x56, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x55, 0x77, 0x62, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x22, 0x0e, 0x76, + 0xfa, 0x1b, 0x1c, 0x22, 0x03, 0x2c, 0x71, 0xd3, 0x7c, 0x77, 0x05, 0xf1, 0xb3, 0xcf, 0xfe, 0xd4, + 0x3a, 0x87, 0x3e, 0x4b, 0xff, 0x03, 0x70, 0x95, 0x52, 0x60, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xcf, 0xfe, 0xd4, 0x3a, 0x87, 0x3e, 0x4b, 0xff, 0x03, 0x70, + 0x95, 0x52, 0x60, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x22, 0x0e, 0x76, 0xfa, 0x1b, 0x1c, 0x22, 0x03, 0x2c, 0x71, 0xd3, + 0x7c, 0x77, 0x05, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::UwbSwitch_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::UwbSwitch_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::UwbSwitch_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::UwbSwitch_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.enabled())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::UwbSwitch_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.enabled())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::UwbSwitch_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.enabled())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::UwbSwitch_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.enabled())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/VoxelMapCompressed_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/VoxelMapCompressed_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5d92c26b86bc246292a3a9d7e91ea889391a8741 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/VoxelMapCompressed_.hpp @@ -0,0 +1,600 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: VoxelMapCompressed_.idl + Source: VoxelMapCompressed_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP +#define DDSCXX_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP + +#include +#include +#include +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class VoxelMapCompressed_ +{ +private: + double stamp_ = 0.0; + std::string frame_id_; + double resolution_ = 0.0; + std::array origin_ = { }; + std::array width_ = { }; + uint64_t src_size_ = 0; + std::vector data_; + +public: + VoxelMapCompressed_() = default; + + explicit VoxelMapCompressed_( + double stamp, + const std::string& frame_id, + double resolution, + const std::array& origin, + const std::array& width, + uint64_t src_size, + const std::vector& data) : + stamp_(stamp), + frame_id_(frame_id), + resolution_(resolution), + origin_(origin), + width_(width), + src_size_(src_size), + data_(data) { } + + double stamp() const { return this->stamp_; } + double& stamp() { return this->stamp_; } + void stamp(double _val_) { this->stamp_ = _val_; } + const std::string& frame_id() const { return this->frame_id_; } + std::string& frame_id() { return this->frame_id_; } + void frame_id(const std::string& _val_) { this->frame_id_ = _val_; } + void frame_id(std::string&& _val_) { this->frame_id_ = _val_; } + double resolution() const { return this->resolution_; } + double& resolution() { return this->resolution_; } + void resolution(double _val_) { this->resolution_ = _val_; } + const std::array& origin() const { return this->origin_; } + std::array& origin() { return this->origin_; } + void origin(const std::array& _val_) { this->origin_ = _val_; } + void origin(std::array&& _val_) { this->origin_ = _val_; } + const std::array& width() const { return this->width_; } + std::array& width() { return this->width_; } + void width(const std::array& _val_) { this->width_ = _val_; } + void width(std::array&& _val_) { this->width_ = _val_; } + uint64_t src_size() const { return this->src_size_; } + uint64_t& src_size() { return this->src_size_; } + void src_size(uint64_t _val_) { this->src_size_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + + bool operator==(const VoxelMapCompressed_& _other) const + { + (void) _other; + return stamp_ == _other.stamp_ && + frame_id_ == _other.frame_id_ && + resolution_ == _other.resolution_ && + origin_ == _other.origin_ && + width_ == _other.width_ && + src_size_ == _other.src_size_ && + data_ == _other.data_; + } + + bool operator!=(const VoxelMapCompressed_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::getTypeName() +{ + return "unitree_go::msg::dds_::VoxelMapCompressed_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_map_blob_sz() { return 538; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_map_blob() { + static const uint8_t blob[] = { + 0xb8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xf4, 0x58, 0xe7, 0x8f, 0x62, 0xc9, 0xad, + 0xbc, 0x43, 0x1d, 0x16, 0x4e, 0xdf, 0xdd, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x96, 0xb8, 0xc7, 0x8d, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xb7, 0xe1, 0x64, 0xb3, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x7c, 0x49, 0xb1, 0x53, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x06, 0xea, 0xae, 0x26, 0xa6, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x08, 0x20, 0x1e, 0x06, 0xae, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x8d, 0x77, 0x7f, 0x38, 0x33, 0x01, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x07, 0xc6, 0xdb, 0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e, + 0xd7, 0xa4, 0x76, 0x00, 0x1b, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, + 0x6f, 0x78, 0x65, 0x6c, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x5f, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x09, 0x00, 0x00, 0x00, 0x73, 0x72, 0x63, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x07, 0xc6, 0xdb, + 0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e, 0xd7, 0xa4, 0x76, 0xf1, 0xf4, 0x58, 0xe7, 0x8f, + 0x62, 0xc9, 0xad, 0xbc, 0x43, 0x1d, 0x16, 0x4e, 0xdf, 0xdd, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xf4, 0x58, 0xe7, 0x8f, 0x62, 0xc9, 0xad, 0xbc, 0x43, 0x1d, 0x16, + 0x4e, 0xdf, 0xdd, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x07, 0xc6, 0xdb, 0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e, + 0xd7, 0xa4, 0x76, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::VoxelMapCompressed_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::VoxelMapCompressed_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.width()[0], instance.width().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.src_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.width()[0], instance.width().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.src_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.width()[0], instance.width().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.src_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.stamp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.origin()[0], instance.origin().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.width()[0], instance.width().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.src_size())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/WirelessController_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/WirelessController_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1bd8bf44f137edcca684f8b12715976ffbc45209 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/go2/WirelessController_.hpp @@ -0,0 +1,426 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: WirelessController_.idl + Source: WirelessController_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP +#define DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP + +#include + +namespace unitree_go +{ +namespace msg +{ +namespace dds_ +{ +class WirelessController_ +{ +private: + float lx_ = 0.0f; + float ly_ = 0.0f; + float rx_ = 0.0f; + float ry_ = 0.0f; + uint16_t keys_ = 0; + +public: + WirelessController_() = default; + + explicit WirelessController_( + float lx, + float ly, + float rx, + float ry, + uint16_t keys) : + lx_(lx), + ly_(ly), + rx_(rx), + ry_(ry), + keys_(keys) { } + + float lx() const { return this->lx_; } + float& lx() { return this->lx_; } + void lx(float _val_) { this->lx_ = _val_; } + float ly() const { return this->ly_; } + float& ly() { return this->ly_; } + void ly(float _val_) { this->ly_ = _val_; } + float rx() const { return this->rx_; } + float& rx() { return this->rx_; } + void rx(float _val_) { this->rx_ = _val_; } + float ry() const { return this->ry_; } + float& ry() { return this->ry_; } + void ry(float _val_) { this->ry_ = _val_; } + uint16_t keys() const { return this->keys_; } + uint16_t& keys() { return this->keys_; } + void keys(uint16_t _val_) { this->keys_ = _val_; } + + bool operator==(const WirelessController_& _other) const + { + (void) _other; + return lx_ == _other.lx_ && + ly_ == _other.ly_ && + rx_ == _other.rx_ && + ry_ == _other.ry_ && + keys_ == _other.keys_; + } + + bool operator!=(const WirelessController_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_go::msg::dds_::WirelessController_>::getTypeName() +{ + return "unitree_go::msg::dds_::WirelessController_"; +} + +template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::WirelessController_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_map_blob_sz() { return 382; } +template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_map_blob() { + static const uint8_t blob[] = { + 0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59, + 0x61, 0xcd, 0x0e, 0x3f, 0xc0, 0x49, 0xcb, 0x00, 0x63, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x80, 0x37, 0xcc, 0xea, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe7, 0x28, 0xb4, 0x77, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x22, 0x77, 0x0f, 0xbd, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x73, 0x1a, 0x58, 0x83, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x14, 0xf8, 0x02, 0xe1, 0x00, + 0xd3, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08, + 0xf9, 0x2c, 0xb2, 0x49, 0x43, 0xac, 0x72, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x57, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x6c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x72, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x72, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x6b, 0x65, 0x79, 0x73, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08, 0xf9, 0x2c, 0xb2, 0x49, 0x43, 0xac, 0x72, 0xf1, + 0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59, 0x61, 0xcd, 0x0e, 0x3f, 0xc0, 0x49, 0xcb, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59, 0x61, 0xcd, 0x0e, 0x3f, + 0xc0, 0x49, 0xcb, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08, 0xf9, 0x2c, 0xb2, 0x49, + 0x43, 0xac, 0x72, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_go::msg::dds_::WirelessController_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::WirelessController_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::WirelessController_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_go::msg::dds_::WirelessController_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_go::msg::dds_::WirelessController_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.lx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.ly())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.rx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.ry())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.keys())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_go::msg::dds_::WirelessController_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.lx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.ly())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.rx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.ry())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.keys())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_go::msg::dds_::WirelessController_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.lx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.ly())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.rx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.ry())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.keys())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_go::msg::dds_::WirelessController_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.lx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.ly())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.rx())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.ry())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.keys())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) { + auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6188a6155ea81ada2f313a00003143ea4ad7f356 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsCmd_.hpp @@ -0,0 +1,321 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: BmsCmd_.idl + Source: BmsCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_BMSCMD__HPP +#define DDSCXX_UNITREE_IDL_HG_BMSCMD__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class BmsCmd_ +{ +private: + uint8_t cmd_ = 0; + std::array reserve_ = { }; + +public: + BmsCmd_() = default; + + explicit BmsCmd_( + uint8_t cmd, + const std::array& reserve) : + cmd_(cmd), + reserve_(reserve) { } + + uint8_t cmd() const { return this->cmd_; } + uint8_t& cmd() { return this->cmd_; } + void cmd(uint8_t _val_) { this->cmd_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const BmsCmd_& _other) const + { + (void) _other; + return cmd_ == _other.cmd_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const BmsCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::getTypeName() +{ + return "unitree_hg::msg::dds_::BmsCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::type_map_blob_sz() { return 278; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x56, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x91, 0xa3, 0x78, 0x24, 0x46, 0xf5, 0xc1, + 0xa3, 0xbe, 0x38, 0x87, 0x82, 0x38, 0xf4, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xdf, 0xff, 0x0a, 0x7f, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xf3, 0x1a, 0x44, 0x88, 0xbc, 0xce, 0xdc, 0xaa, 0xdb, 0x49, 0x15, + 0xee, 0x2b, 0x01, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, + 0x6d, 0x73, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xf3, 0x1a, 0x44, 0x88, 0xbc, 0xce, 0xdc, + 0xaa, 0xdb, 0x49, 0x15, 0xee, 0x2b, 0x01, 0xf1, 0x91, 0xa3, 0x78, 0x24, 0x46, 0xf5, 0xc1, 0xa3, + 0xbe, 0x38, 0x87, 0x82, 0x38, 0xf4, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x91, 0xa3, 0x78, 0x24, 0x46, 0xf5, 0xc1, 0xa3, 0xbe, 0x38, 0x87, + 0x82, 0x38, 0xf4, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf3, 0x1a, 0x44, 0x88, 0xbc, 0xce, 0xdc, 0xaa, 0xdb, 0x49, 0x15, + 0xee, 0x2b, 0x01, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::BmsCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::BmsCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::BmsCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::BmsCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cmd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cmd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cmd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::BmsCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cmd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::BmsCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_BMSCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b30d032767f48ae06828dbbba6c1bfc79d3084c8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/BmsState_.hpp @@ -0,0 +1,855 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: BmsState_.idl + Source: BmsState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_BMSSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_BMSSTATE__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class BmsState_ +{ +private: + uint8_t version_high_ = 0; + uint8_t version_low_ = 0; + uint8_t fn_ = 0; + std::array cell_vol_ = { }; + std::array bmsvoltage_ = { }; + int32_t current_ = 0; + uint8_t soc_ = 0; + uint8_t soh_ = 0; + std::array temperature_ = { }; + uint16_t cycle_ = 0; + uint16_t manufacturer_date_ = 0; + std::array bmsstate_ = { }; + std::array reserve_ = { }; + +public: + BmsState_() = default; + + explicit BmsState_( + uint8_t version_high, + uint8_t version_low, + uint8_t fn, + const std::array& cell_vol, + const std::array& bmsvoltage, + int32_t current, + uint8_t soc, + uint8_t soh, + const std::array& temperature, + uint16_t cycle, + uint16_t manufacturer_date, + const std::array& bmsstate, + const std::array& reserve) : + version_high_(version_high), + version_low_(version_low), + fn_(fn), + cell_vol_(cell_vol), + bmsvoltage_(bmsvoltage), + current_(current), + soc_(soc), + soh_(soh), + temperature_(temperature), + cycle_(cycle), + manufacturer_date_(manufacturer_date), + bmsstate_(bmsstate), + reserve_(reserve) { } + + uint8_t version_high() const { return this->version_high_; } + uint8_t& version_high() { return this->version_high_; } + void version_high(uint8_t _val_) { this->version_high_ = _val_; } + uint8_t version_low() const { return this->version_low_; } + uint8_t& version_low() { return this->version_low_; } + void version_low(uint8_t _val_) { this->version_low_ = _val_; } + uint8_t fn() const { return this->fn_; } + uint8_t& fn() { return this->fn_; } + void fn(uint8_t _val_) { this->fn_ = _val_; } + const std::array& cell_vol() const { return this->cell_vol_; } + std::array& cell_vol() { return this->cell_vol_; } + void cell_vol(const std::array& _val_) { this->cell_vol_ = _val_; } + void cell_vol(std::array&& _val_) { this->cell_vol_ = _val_; } + const std::array& bmsvoltage() const { return this->bmsvoltage_; } + std::array& bmsvoltage() { return this->bmsvoltage_; } + void bmsvoltage(const std::array& _val_) { this->bmsvoltage_ = _val_; } + void bmsvoltage(std::array&& _val_) { this->bmsvoltage_ = _val_; } + int32_t current() const { return this->current_; } + int32_t& current() { return this->current_; } + void current(int32_t _val_) { this->current_ = _val_; } + uint8_t soc() const { return this->soc_; } + uint8_t& soc() { return this->soc_; } + void soc(uint8_t _val_) { this->soc_ = _val_; } + uint8_t soh() const { return this->soh_; } + uint8_t& soh() { return this->soh_; } + void soh(uint8_t _val_) { this->soh_ = _val_; } + const std::array& temperature() const { return this->temperature_; } + std::array& temperature() { return this->temperature_; } + void temperature(const std::array& _val_) { this->temperature_ = _val_; } + void temperature(std::array&& _val_) { this->temperature_ = _val_; } + uint16_t cycle() const { return this->cycle_; } + uint16_t& cycle() { return this->cycle_; } + void cycle(uint16_t _val_) { this->cycle_ = _val_; } + uint16_t manufacturer_date() const { return this->manufacturer_date_; } + uint16_t& manufacturer_date() { return this->manufacturer_date_; } + void manufacturer_date(uint16_t _val_) { this->manufacturer_date_ = _val_; } + const std::array& bmsstate() const { return this->bmsstate_; } + std::array& bmsstate() { return this->bmsstate_; } + void bmsstate(const std::array& _val_) { this->bmsstate_ = _val_; } + void bmsstate(std::array&& _val_) { this->bmsstate_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const BmsState_& _other) const + { + (void) _other; + return version_high_ == _other.version_high_ && + version_low_ == _other.version_low_ && + fn_ == _other.fn_ && + cell_vol_ == _other.cell_vol_ && + bmsvoltage_ == _other.bmsvoltage_ && + current_ == _other.current_ && + soc_ == _other.soc_ && + soh_ == _other.soh_ && + temperature_ == _other.temperature_ && + cycle_ == _other.cycle_ && + manufacturer_date_ == _other.manufacturer_date_ && + bmsstate_ == _other.bmsstate_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const BmsState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::BmsState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::BmsState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::BmsState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::BmsState_>::type_map_blob_sz() { return 874; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::BmsState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::BmsState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x36, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x98, 0xd8, 0x09, 0xa6, 0x3f, 0x63, + 0xc7, 0xcb, 0x31, 0xa8, 0x18, 0x50, 0x6b, 0x00, 0x1e, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x75, 0x6a, 0xda, 0x84, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x51, 0x99, 0x89, 0x90, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x4d, 0x9d, 0x6c, 0x17, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x28, 0x06, 0x2d, 0x87, 0xc3, 0x55, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x46, 0x32, 0x3c, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x43, 0xb5, 0xc9, 0x17, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0xc7, 0xd5, 0xf8, 0x49, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x17, 0x39, 0xe7, 0x01, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x03, 0xee, 0xf4, + 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x9a, + 0x4c, 0x07, 0x40, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0xe9, + 0x68, 0x5d, 0x46, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x07, 0x35, 0x33, 0xbf, 0xfb, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xdb, 0xa6, 0x86, 0x24, 0x98, 0xf5, 0x54, 0xba, 0x92, 0x7b, + 0xa1, 0x8d, 0xe0, 0x00, 0xea, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, + 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x01, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x67, 0x68, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x77, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x66, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x28, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x62, 0x6d, 0x73, 0x76, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0c, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, + 0x65, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x62, 0x6d, 0x73, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xdb, 0xa6, + 0x86, 0x24, 0x98, 0xf5, 0x54, 0xba, 0x92, 0x7b, 0xa1, 0x8d, 0xe0, 0xf1, 0x4b, 0x98, 0xd8, 0x09, + 0xa6, 0x3f, 0x63, 0xc7, 0xcb, 0x31, 0xa8, 0x18, 0x50, 0x6b, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::BmsState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x98, 0xd8, 0x09, 0xa6, 0x3f, 0x63, 0xc7, 0xcb, 0x31, 0xa8, + 0x18, 0x50, 0x6b, 0x00, 0x22, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xdb, 0xa6, 0x86, 0x24, 0x98, 0xf5, 0x54, 0xba, 0x92, 0x7b, + 0xa1, 0x8d, 0xe0, 0x00, 0xee, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::BmsState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::BmsState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::BmsState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::BmsState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.fn())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.bmsvoltage()[0], instance.bmsvoltage().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.soh())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.manufacturer_date())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.bmsstate()[0], instance.bmsstate().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.fn())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.bmsvoltage()[0], instance.bmsvoltage().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.soh())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.manufacturer_date())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.bmsstate()[0], instance.bmsstate().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.fn())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.bmsvoltage()[0], instance.bmsvoltage().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.soh())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.manufacturer_date())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.bmsstate()[0], instance.bmsstate().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::BmsState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.version_high())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.version_low())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.fn())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.cell_vol()[0], instance.cell_vol().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.bmsvoltage()[0], instance.bmsvoltage().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.current())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.soc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.soh())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.cycle())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 10: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.manufacturer_date())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 11: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.bmsstate()[0], instance.bmsstate().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 12: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::BmsState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::BmsState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_BMSSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5697607121b3d51fe6b7f1184c4184990c69132b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandCmd_.hpp @@ -0,0 +1,409 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: HandCmd_.idl + Source: HandCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_HANDCMD__HPP +#define DDSCXX_UNITREE_IDL_HG_HANDCMD__HPP + +#include "unitree/idl/hg/MotorCmd_.hpp" + +#include +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class HandCmd_ +{ +private: + std::vector<::unitree_hg::msg::dds_::MotorCmd_> motor_cmd_; + std::array reserve_ = { }; + +public: + HandCmd_() = default; + + explicit HandCmd_( + const std::vector<::unitree_hg::msg::dds_::MotorCmd_>& motor_cmd, + const std::array& reserve) : + motor_cmd_(motor_cmd), + reserve_(reserve) { } + + const std::vector<::unitree_hg::msg::dds_::MotorCmd_>& motor_cmd() const { return this->motor_cmd_; } + std::vector<::unitree_hg::msg::dds_::MotorCmd_>& motor_cmd() { return this->motor_cmd_; } + void motor_cmd(const std::vector<::unitree_hg::msg::dds_::MotorCmd_>& _val_) { this->motor_cmd_ = _val_; } + void motor_cmd(std::vector<::unitree_hg::msg::dds_::MotorCmd_>&& _val_) { this->motor_cmd_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const HandCmd_& _other) const + { + (void) _other; + return motor_cmd_ == _other.motor_cmd_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const HandCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::getTypeName() +{ + return "unitree_hg::msg::dds_::HandCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::type_map_blob_sz() { return 752; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x03, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xa6, 0x3e, 0x17, 0xe2, 0x28, 0xe6, 0x7d, + 0x27, 0x6d, 0xfe, 0x71, 0xd6, 0xf1, 0x56, 0x00, 0x52, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1, + 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, 0x5b, 0xcf, + 0x19, 0xa4, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0x82, + 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, 0x00, 0x00, 0x00, + 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x9e, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0x5c, 0x45, 0xf9, 0xf8, 0xb1, 0xe1, 0xc2, 0x79, 0xa6, 0x59, 0x52, 0x13, 0x32, 0xb0, 0x00, + 0x8e, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x61, 0x6e, 0x64, 0x43, + 0x6d, 0x64, 0x5f, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, + 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x04, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, + 0x00, 0x00, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, + 0xf1, 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, + 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xf2, 0x5c, 0x45, 0xf9, 0xf8, 0xb1, 0xe1, 0xc2, 0x79, 0xa6, 0x59, 0x52, + 0x13, 0x32, 0xb0, 0xf1, 0xa6, 0x3e, 0x17, 0xe2, 0x28, 0xe6, 0x7d, 0x27, 0x6d, 0xfe, 0x71, 0xd6, + 0xf1, 0x56, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, + 0xf1, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, +}; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xa6, 0x3e, 0x17, 0xe2, 0x28, 0xe6, 0x7d, 0x27, 0x6d, 0xfe, 0x71, + 0xd6, 0xf1, 0x56, 0x00, 0x56, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, + 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x5c, 0x45, 0xf9, + 0xf8, 0xb1, 0xe1, 0xc2, 0x79, 0xa6, 0x59, 0x52, 0x13, 0x32, 0xb0, 0x00, 0x92, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0x00, + 0xe6, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::HandCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::HandCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::HandCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::HandCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::HandCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_cmd().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.motor_cmd()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::HandCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::HandCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_cmd().size()); + if (!read(streamer, se_1)) + return false; + instance.motor_cmd().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.motor_cmd()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::HandCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::HandCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_cmd().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.motor_cmd()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::HandCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::HandCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.motor_cmd()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::HandCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_HANDCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e64861806f89e0e2e44562809b3dd15e3ecb796e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/HandState_.hpp @@ -0,0 +1,850 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: HandState_.idl + Source: HandState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_HANDSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_HANDSTATE__HPP + +#include "unitree/idl/hg/IMUState_.hpp" + +#include "unitree/idl/hg/MotorState_.hpp" + +#include "unitree/idl/hg/PressSensorState_.hpp" + +#include +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class HandState_ +{ +private: + std::vector<::unitree_hg::msg::dds_::MotorState_> motor_state_; + std::vector<::unitree_hg::msg::dds_::PressSensorState_> press_sensor_state_; + ::unitree_hg::msg::dds_::IMUState_ imu_state_; + float power_v_ = 0.0f; + float power_a_ = 0.0f; + float system_v_ = 0.0f; + float device_v_ = 0.0f; + std::array error_ = { }; + std::array reserve_ = { }; + +public: + HandState_() = default; + + explicit HandState_( + const std::vector<::unitree_hg::msg::dds_::MotorState_>& motor_state, + const std::vector<::unitree_hg::msg::dds_::PressSensorState_>& press_sensor_state, + const ::unitree_hg::msg::dds_::IMUState_& imu_state, + float power_v, + float power_a, + float system_v, + float device_v, + const std::array& error, + const std::array& reserve) : + motor_state_(motor_state), + press_sensor_state_(press_sensor_state), + imu_state_(imu_state), + power_v_(power_v), + power_a_(power_a), + system_v_(system_v), + device_v_(device_v), + error_(error), + reserve_(reserve) { } + + const std::vector<::unitree_hg::msg::dds_::MotorState_>& motor_state() const { return this->motor_state_; } + std::vector<::unitree_hg::msg::dds_::MotorState_>& motor_state() { return this->motor_state_; } + void motor_state(const std::vector<::unitree_hg::msg::dds_::MotorState_>& _val_) { this->motor_state_ = _val_; } + void motor_state(std::vector<::unitree_hg::msg::dds_::MotorState_>&& _val_) { this->motor_state_ = _val_; } + const std::vector<::unitree_hg::msg::dds_::PressSensorState_>& press_sensor_state() const { return this->press_sensor_state_; } + std::vector<::unitree_hg::msg::dds_::PressSensorState_>& press_sensor_state() { return this->press_sensor_state_; } + void press_sensor_state(const std::vector<::unitree_hg::msg::dds_::PressSensorState_>& _val_) { this->press_sensor_state_ = _val_; } + void press_sensor_state(std::vector<::unitree_hg::msg::dds_::PressSensorState_>&& _val_) { this->press_sensor_state_ = _val_; } + const ::unitree_hg::msg::dds_::IMUState_& imu_state() const { return this->imu_state_; } + ::unitree_hg::msg::dds_::IMUState_& imu_state() { return this->imu_state_; } + void imu_state(const ::unitree_hg::msg::dds_::IMUState_& _val_) { this->imu_state_ = _val_; } + void imu_state(::unitree_hg::msg::dds_::IMUState_&& _val_) { this->imu_state_ = _val_; } + float power_v() const { return this->power_v_; } + float& power_v() { return this->power_v_; } + void power_v(float _val_) { this->power_v_ = _val_; } + float power_a() const { return this->power_a_; } + float& power_a() { return this->power_a_; } + void power_a(float _val_) { this->power_a_ = _val_; } + float system_v() const { return this->system_v_; } + float& system_v() { return this->system_v_; } + void system_v(float _val_) { this->system_v_ = _val_; } + float device_v() const { return this->device_v_; } + float& device_v() { return this->device_v_; } + void device_v(float _val_) { this->device_v_ = _val_; } + const std::array& error() const { return this->error_; } + std::array& error() { return this->error_; } + void error(const std::array& _val_) { this->error_ = _val_; } + void error(std::array&& _val_) { this->error_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const HandState_& _other) const + { + (void) _other; + return motor_state_ == _other.motor_state_ && + press_sensor_state_ == _other.press_sensor_state_ && + imu_state_ == _other.imu_state_ && + power_v_ == _other.power_v_ && + power_a_ == _other.power_a_ && + system_v_ == _other.system_v_ && + device_v_ == _other.device_v_ && + error_ == _other.error_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const HandState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::HandState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::HandState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::HandState_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::HandState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::HandState_>::type_map_blob_sz() { return 2244; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::HandState_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::HandState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x1f, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x69, 0x9e, 0xb3, 0x27, 0x0c, 0x7d, 0x77, + 0x88, 0xed, 0x03, 0xbe, 0xbe, 0x16, 0xb9, 0x00, 0xf2, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1, + 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0xb2, 0x1e, + 0x53, 0xdc, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, + 0x01, 0x00, 0x00, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, 0x26, 0x6e, 0x46, 0x6a, 0x66, + 0xb2, 0x55, 0xa0, 0x32, 0xed, 0x8c, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, + 0x80, 0x9e, 0x5f, 0x37, 0x13, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x52, 0xea, 0x3e, 0x50, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x3a, 0x40, 0xba, 0xb9, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x2b, 0xfa, 0xf9, 0xa4, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x8f, 0x6a, 0x1d, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0xcb, 0x5e, + 0x10, 0x0e, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0x7c, + 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0x00, 0x00, 0x00, + 0xd6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc6, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x03, 0xee, 0xf4, + 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x0a, + 0xcf, 0x8b, 0xe1, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0xa5, 0xfe, 0x26, 0xd5, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xd1, 0x41, 0x1a, 0xed, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, + 0x60, 0x08, 0x26, 0x6e, 0x46, 0x6a, 0x66, 0xb2, 0x55, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xd9, 0x9f, 0xad, 0x96, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0xfc, 0x68, 0x71, 0x76, + 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x0e, 0x12, 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, + 0x92, 0xed, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0xee, + 0xf4, 0x38, 0xf7, 0x00, 0x1a, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0xf2, 0x80, + 0x69, 0x66, 0x06, 0x0f, 0xc0, 0xf9, 0x13, 0xa4, 0x7b, 0x8a, 0xb9, 0x00, 0x92, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x61, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x00, 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, + 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x35, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, + 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x70, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, + 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x76, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, + 0x00, 0x00, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, + 0x99, 0x00, 0x00, 0x00, 0x66, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, + 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x2e, 0x01, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0xcd, + 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0x00, 0x00, 0x00, + 0xca, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x70, 0x72, 0x65, 0x73, 0x73, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x7d, + 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0x00, 0x00, + 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, + 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0xf2, 0x80, + 0x69, 0x66, 0x06, 0x0f, 0xc0, 0xf9, 0x13, 0xa4, 0x7b, 0x8a, 0xb9, 0xf1, 0x69, 0x9e, 0xb3, 0x27, + 0x0c, 0x7d, 0x77, 0x88, 0xed, 0x03, 0xbe, 0xbe, 0x16, 0xb9, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, + 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, + 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0xf2, 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, + 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, 0x26, + 0x6e, 0x46, 0x6a, 0x66, 0xb2, 0x55, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, + 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, + 0xdf, 0x44, 0x22, 0x80, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::HandState_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x69, 0x9e, 0xb3, 0x27, 0x0c, 0x7d, 0x77, 0x88, 0xed, 0x03, 0xbe, + 0xbe, 0x16, 0xb9, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, + 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0x00, 0xda, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, 0x26, 0x6e, 0x46, 0x6a, 0x66, 0xb2, 0x55, 0x00, + 0x6f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, + 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0x00, 0x97, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0xf2, 0x80, + 0x69, 0x66, 0x06, 0x0f, 0xc0, 0xf9, 0x13, 0xa4, 0x7b, 0x8a, 0xb9, 0x00, 0x96, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0x00, + 0x6a, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, + 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0x00, 0xce, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, + 0x02, 0x01, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::HandState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::HandState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::HandState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::HandState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::HandState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_state().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.motor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.press_sensor_state().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.press_sensor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.system_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.device_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.error()[0], instance.error().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::HandState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::HandState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_state().size()); + if (!read(streamer, se_1)) + return false; + instance.motor_state().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.motor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.press_sensor_state().size()); + if (!read(streamer, se_1)) + return false; + instance.press_sensor_state().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.press_sensor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.system_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.device_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.error()[0], instance.error().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::HandState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::HandState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.motor_state().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.motor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.press_sensor_state().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.press_sensor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.system_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.device_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.error()[0], instance.error().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::HandState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::HandState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.motor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.press_sensor_state()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.power_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.power_a())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.system_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.device_v())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.error()[0], instance.error().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::HandState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::HandState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_HANDSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/IMUState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/IMUState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9448e47c6feb3eeed4a6721ebdee5d9a2ea68f74 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/IMUState_.hpp @@ -0,0 +1,503 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: IMUState_.idl + Source: IMUState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_IMUSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_IMUSTATE__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class IMUState_ +{ +private: + std::array quaternion_ = { }; + std::array gyroscope_ = { }; + std::array accelerometer_ = { }; + std::array rpy_ = { }; + int16_t temperature_ = 0; + +public: + IMUState_() = default; + + explicit IMUState_( + const std::array& quaternion, + const std::array& gyroscope, + const std::array& accelerometer, + const std::array& rpy, + int16_t temperature) : + quaternion_(quaternion), + gyroscope_(gyroscope), + accelerometer_(accelerometer), + rpy_(rpy), + temperature_(temperature) { } + + const std::array& quaternion() const { return this->quaternion_; } + std::array& quaternion() { return this->quaternion_; } + void quaternion(const std::array& _val_) { this->quaternion_ = _val_; } + void quaternion(std::array&& _val_) { this->quaternion_ = _val_; } + const std::array& gyroscope() const { return this->gyroscope_; } + std::array& gyroscope() { return this->gyroscope_; } + void gyroscope(const std::array& _val_) { this->gyroscope_ = _val_; } + void gyroscope(std::array&& _val_) { this->gyroscope_ = _val_; } + const std::array& accelerometer() const { return this->accelerometer_; } + std::array& accelerometer() { return this->accelerometer_; } + void accelerometer(const std::array& _val_) { this->accelerometer_ = _val_; } + void accelerometer(std::array&& _val_) { this->accelerometer_ = _val_; } + const std::array& rpy() const { return this->rpy_; } + std::array& rpy() { return this->rpy_; } + void rpy(const std::array& _val_) { this->rpy_ = _val_; } + void rpy(std::array&& _val_) { this->rpy_ = _val_; } + int16_t temperature() const { return this->temperature_; } + int16_t& temperature() { return this->temperature_; } + void temperature(int16_t _val_) { this->temperature_ = _val_; } + + bool operator==(const IMUState_& _other) const + { + (void) _other; + return quaternion_ == _other.quaternion_ && + gyroscope_ == _other.gyroscope_ && + accelerometer_ == _other.accelerometer_ && + rpy_ == _other.rpy_ && + temperature_ == _other.temperature_; + } + + bool operator!=(const IMUState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::IMUState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::IMUState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::IMUState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::IMUState_>::type_map_blob_sz() { return 498; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::IMUState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::IMUState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xab, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, + 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0x00, 0x93, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0e, 0x12, + 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, 0x92, 0xed, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0xee, 0xf4, 0x38, 0xf7, 0x00, + 0x16, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, + 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, + 0x5b, 0x04, 0x03, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, 0x44, + 0x22, 0x80, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::IMUState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, + 0x44, 0x22, 0x80, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, + 0x5b, 0x04, 0x03, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::IMUState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::IMUState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::IMUState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::IMUState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::IMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::IMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::IMUState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_IMUSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8fc355d85747a96fdaf0361860b7eedcb5627806 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowCmd_.hpp @@ -0,0 +1,506 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: LowCmd_.idl + Source: LowCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_LOWCMD__HPP +#define DDSCXX_UNITREE_IDL_HG_LOWCMD__HPP + +#include "unitree/idl/hg/MotorCmd_.hpp" + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class LowCmd_ +{ +private: + uint8_t mode_pr_ = 0; + uint8_t mode_machine_ = 0; + std::array<::unitree_hg::msg::dds_::MotorCmd_, 35> motor_cmd_ = { }; + std::array reserve_ = { }; + uint32_t crc_ = 0; + +public: + LowCmd_() = default; + + explicit LowCmd_( + uint8_t mode_pr, + uint8_t mode_machine, + const std::array<::unitree_hg::msg::dds_::MotorCmd_, 35>& motor_cmd, + const std::array& reserve, + uint32_t crc) : + mode_pr_(mode_pr), + mode_machine_(mode_machine), + motor_cmd_(motor_cmd), + reserve_(reserve), + crc_(crc) { } + + uint8_t mode_pr() const { return this->mode_pr_; } + uint8_t& mode_pr() { return this->mode_pr_; } + void mode_pr(uint8_t _val_) { this->mode_pr_ = _val_; } + uint8_t mode_machine() const { return this->mode_machine_; } + uint8_t& mode_machine() { return this->mode_machine_; } + void mode_machine(uint8_t _val_) { this->mode_machine_ = _val_; } + const std::array<::unitree_hg::msg::dds_::MotorCmd_, 35>& motor_cmd() const { return this->motor_cmd_; } + std::array<::unitree_hg::msg::dds_::MotorCmd_, 35>& motor_cmd() { return this->motor_cmd_; } + void motor_cmd(const std::array<::unitree_hg::msg::dds_::MotorCmd_, 35>& _val_) { this->motor_cmd_ = _val_; } + void motor_cmd(std::array<::unitree_hg::msg::dds_::MotorCmd_, 35>&& _val_) { this->motor_cmd_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + uint32_t crc() const { return this->crc_; } + uint32_t& crc() { return this->crc_; } + void crc(uint32_t _val_) { this->crc_ = _val_; } + + bool operator==(const LowCmd_& _other) const + { + (void) _other; + return mode_pr_ == _other.mode_pr_ && + mode_machine_ == _other.mode_machine_ && + motor_cmd_ == _other.motor_cmd_ && + reserve_ == _other.reserve_ && + crc_ == _other.crc_; + } + + bool operator!=(const LowCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::getTypeName() +{ + return "unitree_hg::msg::dds_::LowCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::type_map_blob_sz() { return 892; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x37, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x65, 0x69, 0xfc, 0x15, 0xf0, 0xd4, 0x7a, + 0xa8, 0x60, 0x0b, 0x9e, 0x91, 0xfb, 0xbc, 0x00, 0x87, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xb6, 0x9f, 0x36, 0x51, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xed, 0xb8, 0xc4, 0x0a, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x23, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, + 0xcd, 0x1e, 0x56, 0xc9, 0x5b, 0xcf, 0x19, 0xa4, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, + 0x62, 0x94, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf5, + 0xad, 0x59, 0xc5, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, 0x1e, + 0x56, 0xc9, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0xf6, 0x01, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xf2, 0x42, 0xb0, 0x28, 0x3a, 0xa7, 0xe1, 0xbb, 0x59, 0x2e, 0xc8, 0x98, + 0xa0, 0xdb, 0xed, 0x00, 0xe6, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4c, + 0x6f, 0x77, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x23, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, + 0x0a, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x63, 0x72, 0x63, 0x00, 0x00, 0x00, 0xf2, 0xa2, + 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0x00, 0x00, 0x00, + 0xe2, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, + 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0x42, 0xb0, 0x28, 0x3a, 0xa7, 0xe1, 0xbb, 0x59, 0x2e, 0xc8, 0x98, 0xa0, 0xdb, 0xed, 0xf1, + 0x65, 0x69, 0xfc, 0x15, 0xf0, 0xd4, 0x7a, 0xa8, 0x60, 0x0b, 0x9e, 0x91, 0xfb, 0xbc, 0xf2, 0xa2, + 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0xf1, 0x82, 0x7f, + 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x65, 0x69, 0xfc, 0x15, 0xf0, 0xd4, 0x7a, 0xa8, 0x60, 0x0b, 0x9e, + 0x91, 0xfb, 0xbc, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, + 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, 0x00, 0x87, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x42, 0xb0, 0x28, + 0x3a, 0xa7, 0xe1, 0xbb, 0x59, 0x2e, 0xc8, 0x98, 0xa0, 0xdb, 0xed, 0x00, 0xea, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0x00, + 0xe6, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::LowCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::LowCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::LowCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::LowCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::LowCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_cmd()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::LowCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_LOWCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..685c610b55b8e4ea4edad4041f2591a5fe3838a3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/LowState_.hpp @@ -0,0 +1,762 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: LowState_.idl + Source: LowState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_LOWSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_LOWSTATE__HPP + +#include "unitree/idl/hg/IMUState_.hpp" + +#include "unitree/idl/hg/MotorState_.hpp" + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class LowState_ +{ +private: + std::array version_ = { }; + uint8_t mode_pr_ = 0; + uint8_t mode_machine_ = 0; + uint32_t tick_ = 0; + ::unitree_hg::msg::dds_::IMUState_ imu_state_; + std::array<::unitree_hg::msg::dds_::MotorState_, 35> motor_state_ = { }; + std::array wireless_remote_ = { }; + std::array reserve_ = { }; + uint32_t crc_ = 0; + +public: + LowState_() = default; + + explicit LowState_( + const std::array& version, + uint8_t mode_pr, + uint8_t mode_machine, + uint32_t tick, + const ::unitree_hg::msg::dds_::IMUState_& imu_state, + const std::array<::unitree_hg::msg::dds_::MotorState_, 35>& motor_state, + const std::array& wireless_remote, + const std::array& reserve, + uint32_t crc) : + version_(version), + mode_pr_(mode_pr), + mode_machine_(mode_machine), + tick_(tick), + imu_state_(imu_state), + motor_state_(motor_state), + wireless_remote_(wireless_remote), + reserve_(reserve), + crc_(crc) { } + + const std::array& version() const { return this->version_; } + std::array& version() { return this->version_; } + void version(const std::array& _val_) { this->version_ = _val_; } + void version(std::array&& _val_) { this->version_ = _val_; } + uint8_t mode_pr() const { return this->mode_pr_; } + uint8_t& mode_pr() { return this->mode_pr_; } + void mode_pr(uint8_t _val_) { this->mode_pr_ = _val_; } + uint8_t mode_machine() const { return this->mode_machine_; } + uint8_t& mode_machine() { return this->mode_machine_; } + void mode_machine(uint8_t _val_) { this->mode_machine_ = _val_; } + uint32_t tick() const { return this->tick_; } + uint32_t& tick() { return this->tick_; } + void tick(uint32_t _val_) { this->tick_ = _val_; } + const ::unitree_hg::msg::dds_::IMUState_& imu_state() const { return this->imu_state_; } + ::unitree_hg::msg::dds_::IMUState_& imu_state() { return this->imu_state_; } + void imu_state(const ::unitree_hg::msg::dds_::IMUState_& _val_) { this->imu_state_ = _val_; } + void imu_state(::unitree_hg::msg::dds_::IMUState_&& _val_) { this->imu_state_ = _val_; } + const std::array<::unitree_hg::msg::dds_::MotorState_, 35>& motor_state() const { return this->motor_state_; } + std::array<::unitree_hg::msg::dds_::MotorState_, 35>& motor_state() { return this->motor_state_; } + void motor_state(const std::array<::unitree_hg::msg::dds_::MotorState_, 35>& _val_) { this->motor_state_ = _val_; } + void motor_state(std::array<::unitree_hg::msg::dds_::MotorState_, 35>&& _val_) { this->motor_state_ = _val_; } + const std::array& wireless_remote() const { return this->wireless_remote_; } + std::array& wireless_remote() { return this->wireless_remote_; } + void wireless_remote(const std::array& _val_) { this->wireless_remote_ = _val_; } + void wireless_remote(std::array&& _val_) { this->wireless_remote_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + uint32_t crc() const { return this->crc_; } + uint32_t& crc() { return this->crc_; } + void crc(uint32_t _val_) { this->crc_ = _val_; } + + bool operator==(const LowState_& _other) const + { + (void) _other; + return version_ == _other.version_ && + mode_pr_ == _other.mode_pr_ && + mode_machine_ == _other.mode_machine_ && + tick_ == _other.tick_ && + imu_state_ == _other.imu_state_ && + motor_state_ == _other.motor_state_ && + wireless_remote_ == _other.wireless_remote_ && + reserve_ == _other.reserve_ && + crc_ == _other.crc_; + } + + bool operator!=(const LowState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::LowState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::LowState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::LowState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::LowState_>::type_map_blob_sz() { return 1850; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::LowState_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::LowState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x9a, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x38, 0x29, 0x6b, 0x52, 0xaa, 0x02, + 0x30, 0xb9, 0x2d, 0x37, 0x8b, 0x1e, 0x39, 0x00, 0xef, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x2a, 0xf7, 0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xb6, 0x9f, 0x36, 0x51, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xed, 0xb8, 0xc4, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe5, 0xe5, 0xc0, 0x75, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, + 0x73, 0xdf, 0x44, 0x22, 0x80, 0x9e, 0x5f, 0x37, 0x13, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x23, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, + 0xb2, 0x1e, 0x53, 0xdc, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0xa8, 0x2f, 0x18, 0xc9, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf5, 0xad, 0x59, 0xc5, 0xf1, 0xfc, 0x68, 0x71, 0x76, + 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x0e, 0x12, 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, + 0x92, 0xed, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0xee, + 0xf4, 0x38, 0xf7, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, + 0xed, 0x24, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x03, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x0a, 0xcf, 0x8b, 0xe1, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0xa5, 0xfe, + 0x26, 0xd5, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xd1, + 0x41, 0x1a, 0xed, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, + 0x32, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf2, 0x2b, 0xe9, 0x70, 0x6c, 0x95, 0x87, 0xe8, + 0xd8, 0xaf, 0xd8, 0xbf, 0xc6, 0xde, 0x7b, 0x00, 0x8a, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x4c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x69, 0x63, 0x6b, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x7d, + 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x75, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x23, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, + 0x66, 0x43, 0xa0, 0x99, 0x0c, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x77, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x63, 0x72, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, + 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, + 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0x00, 0x00, 0x00, 0x66, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x00, 0x00, 0x2e, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf2, 0x2b, 0xe9, 0x70, 0x6c, 0x95, 0x87, 0xe8, 0xd8, 0xaf, 0xd8, 0xbf, 0xc6, 0xde, 0x7b, 0xf1, + 0x2f, 0x38, 0x29, 0x6b, 0x52, 0xaa, 0x02, 0x30, 0xb9, 0x2d, 0x37, 0x8b, 0x1e, 0x39, 0xf2, 0x7d, + 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0xf1, 0xfc, 0x68, + 0x71, 0x76, 0x65, 0x12, 0x06, 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0xf2, 0xa8, 0x6c, 0xba, + 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0xf1, 0x7c, 0xc5, 0x84, 0xed, + 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::LowState_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x38, 0x29, 0x6b, 0x52, 0xaa, 0x02, 0x30, 0xb9, 0x2d, 0x37, + 0x8b, 0x1e, 0x39, 0x00, 0xf3, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xfc, 0x68, 0x71, 0x76, 0x65, 0x12, 0x06, + 0x55, 0x84, 0x73, 0xdf, 0x44, 0x22, 0x80, 0x00, 0x97, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0x00, + 0xda, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x2b, 0xe9, 0x70, 0x6c, 0x95, 0x87, 0xe8, 0xd8, 0xaf, 0xd8, 0xbf, + 0xc6, 0xde, 0x7b, 0x00, 0x8e, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x7d, 0x41, 0x66, 0x75, 0x41, 0x77, 0xd8, + 0x6f, 0xa2, 0x7c, 0xd2, 0x5b, 0x04, 0x03, 0x00, 0x02, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0x00, + 0x6a, 0x01, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::LowState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::LowState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::LowState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::LowState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!write(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (auto & a_1:instance.motor_state()) { //array depth 1 + if (!read(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!move(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::LowState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.version()[0], instance.version().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode_pr())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode_machine())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.imu_state(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, false)) + return false; + for (const auto & a_1:instance.motor_state()) { //array depth 1 + if (!max(streamer, a_1, prop)) + return false; + } //array depth 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.wireless_remote()[0], instance.wireless_remote().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.crc())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::LowState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::LowState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_LOWSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MainBoardState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MainBoardState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d203586343b719413ceb6fb07494eaaca5f5425b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MainBoardState_.hpp @@ -0,0 +1,460 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MainBoardState_.idl + Source: MainBoardState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_MAINBOARDSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_MAINBOARDSTATE__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class MainBoardState_ +{ +private: + std::array fan_state_ = { }; + std::array temperature_ = { }; + std::array value_ = { }; + std::array state_ = { }; + +public: + MainBoardState_() = default; + + explicit MainBoardState_( + const std::array& fan_state, + const std::array& temperature, + const std::array& value, + const std::array& state) : + fan_state_(fan_state), + temperature_(temperature), + value_(value), + state_(state) { } + + const std::array& fan_state() const { return this->fan_state_; } + std::array& fan_state() { return this->fan_state_; } + void fan_state(const std::array& _val_) { this->fan_state_ = _val_; } + void fan_state(std::array&& _val_) { this->fan_state_ = _val_; } + const std::array& temperature() const { return this->temperature_; } + std::array& temperature() { return this->temperature_; } + void temperature(const std::array& _val_) { this->temperature_ = _val_; } + void temperature(std::array&& _val_) { this->temperature_ = _val_; } + const std::array& value() const { return this->value_; } + std::array& value() { return this->value_; } + void value(const std::array& _val_) { this->value_ = _val_; } + void value(std::array&& _val_) { this->value_ = _val_; } + const std::array& state() const { return this->state_; } + std::array& state() { return this->state_; } + void state(const std::array& _val_) { this->state_ = _val_; } + void state(std::array&& _val_) { this->state_ = _val_; } + + bool operator==(const MainBoardState_& _other) const + { + (void) _other; + return fan_state_ == _other.fan_state_ && + temperature_ == _other.temperature_ && + value_ == _other.value_ && + state_ == _other.state_; + } + + bool operator!=(const MainBoardState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::MainBoardState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::type_map_blob_sz() { return 446; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x9a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xde, 0xab, 0xb8, 0xf4, 0x95, 0x16, 0x55, + 0x33, 0xd2, 0x9d, 0x46, 0x46, 0x5f, 0x6a, 0x00, 0x82, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x06, 0x06, 0x6f, 0x80, 0x17, 0x1f, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x06, 0x03, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x20, 0x63, + 0xc1, 0x60, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x07, 0x9e, 0xd3, 0x9e, 0x2e, 0x00, 0x00, + 0xf4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x56, 0xc3, 0x59, 0xc8, 0xbe, 0x34, 0xec, + 0xd0, 0x38, 0xbc, 0x21, 0x76, 0x76, 0x4d, 0x00, 0xdc, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x4d, 0x61, 0x69, 0x6e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x06, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x66, 0x61, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0x56, 0xc3, 0x59, 0xc8, 0xbe, 0x34, 0xec, 0xd0, 0x38, 0xbc, 0x21, 0x76, 0x76, 0x4d, 0xf1, + 0xde, 0xab, 0xb8, 0xf4, 0x95, 0x16, 0x55, 0x33, 0xd2, 0x9d, 0x46, 0x46, 0x5f, 0x6a, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xde, 0xab, 0xb8, 0xf4, 0x95, 0x16, 0x55, 0x33, 0xd2, 0x9d, 0x46, + 0x46, 0x5f, 0x6a, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x56, 0xc3, 0x59, 0xc8, 0xbe, 0x34, 0xec, 0xd0, 0x38, 0xbc, 0x21, + 0x76, 0x76, 0x4d, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::MainBoardState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::MainBoardState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::MainBoardState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::MainBoardState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::MainBoardState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.fan_state()[0], instance.fan_state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.value()[0], instance.value().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.state()[0], instance.state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::MainBoardState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MainBoardState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::MainBoardState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.fan_state()[0], instance.fan_state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.value()[0], instance.value().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.state()[0], instance.state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::MainBoardState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MainBoardState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::MainBoardState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.fan_state()[0], instance.fan_state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.value()[0], instance.value().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.state()[0], instance.state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::MainBoardState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MainBoardState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::MainBoardState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.fan_state()[0], instance.fan_state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.value()[0], instance.value().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.state()[0], instance.state().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::MainBoardState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MainBoardState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_MAINBOARDSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorCmd_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorCmd_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f7233c7d3532c9853e37fbeb4727677d2825f527 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorCmd_.hpp @@ -0,0 +1,509 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorCmd_.idl + Source: MotorCmd_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_MOTORCMD__HPP +#define DDSCXX_UNITREE_IDL_HG_MOTORCMD__HPP + +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class MotorCmd_ +{ +private: + uint8_t mode_ = 0; + float q_ = 0.0f; + float dq_ = 0.0f; + float tau_ = 0.0f; + float kp_ = 0.0f; + float kd_ = 0.0f; + uint32_t reserve_ = 0; + +public: + MotorCmd_() = default; + + explicit MotorCmd_( + uint8_t mode, + float q, + float dq, + float tau, + float kp, + float kd, + uint32_t reserve) : + mode_(mode), + q_(q), + dq_(dq), + tau_(tau), + kp_(kp), + kd_(kd), + reserve_(reserve) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + float q() const { return this->q_; } + float& q() { return this->q_; } + void q(float _val_) { this->q_ = _val_; } + float dq() const { return this->dq_; } + float& dq() { return this->dq_; } + void dq(float _val_) { this->dq_ = _val_; } + float tau() const { return this->tau_; } + float& tau() { return this->tau_; } + void tau(float _val_) { this->tau_ = _val_; } + float kp() const { return this->kp_; } + float& kp() { return this->kp_; } + void kp(float _val_) { this->kp_ = _val_; } + float kd() const { return this->kd_; } + float& kd() { return this->kd_; } + void kd(float _val_) { this->kd_ = _val_; } + uint32_t reserve() const { return this->reserve_; } + uint32_t& reserve() { return this->reserve_; } + void reserve(uint32_t _val_) { this->reserve_ = _val_; } + + bool operator==(const MotorCmd_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + q_ == _other.q_ && + dq_ == _other.dq_ && + tau_ == _other.tau_ && + kp_ == _other.kp_ && + kd_ == _other.kd_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const MotorCmd_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::getTypeName() +{ + return "unitree_hg::msg::dds_::MotorCmd_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::type_map_blob_sz() { return 454; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::type_map_blob() { + static const uint8_t blob[] = { + 0x9b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, + 0x8c, 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, 0x00, 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, + 0xfa, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, + 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0x00, 0xe2, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0xaa, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x64, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, + 0xe2, 0xa6, 0x07, 0x61, 0x3a, 0x13, 0xf1, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, + 0x62, 0xba, 0xcd, 0x1e, 0x56, 0xc9, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x7f, 0x55, 0xde, 0x9b, 0x9d, 0xe3, 0x8c, 0x62, 0xba, 0xcd, + 0x1e, 0x56, 0xc9, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xa2, 0xd9, 0xce, 0xd5, 0x0a, 0x79, 0x56, 0xe2, 0xa6, 0x07, 0x61, + 0x3a, 0x13, 0xf1, 0x00, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::MotorCmd_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::MotorCmd_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::MotorCmd_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::MotorCmd_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::MotorCmd_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tau())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.kp())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.kd())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::MotorCmd_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorCmd_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_MOTORCMD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3bddcadd261dbd837f678c1a1394e4162629ba3a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/MotorState_.hpp @@ -0,0 +1,691 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MotorState_.idl + Source: MotorState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_MOTORSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_MOTORSTATE__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class MotorState_ +{ +private: + uint8_t mode_ = 0; + float q_ = 0.0f; + float dq_ = 0.0f; + float ddq_ = 0.0f; + float tau_est_ = 0.0f; + std::array temperature_ = { }; + float vol_ = 0.0f; + std::array sensor_ = { }; + uint32_t motorstate_ = 0; + std::array reserve_ = { }; + +public: + MotorState_() = default; + + explicit MotorState_( + uint8_t mode, + float q, + float dq, + float ddq, + float tau_est, + const std::array& temperature, + float vol, + const std::array& sensor, + uint32_t motorstate, + const std::array& reserve) : + mode_(mode), + q_(q), + dq_(dq), + ddq_(ddq), + tau_est_(tau_est), + temperature_(temperature), + vol_(vol), + sensor_(sensor), + motorstate_(motorstate), + reserve_(reserve) { } + + uint8_t mode() const { return this->mode_; } + uint8_t& mode() { return this->mode_; } + void mode(uint8_t _val_) { this->mode_ = _val_; } + float q() const { return this->q_; } + float& q() { return this->q_; } + void q(float _val_) { this->q_ = _val_; } + float dq() const { return this->dq_; } + float& dq() { return this->dq_; } + void dq(float _val_) { this->dq_ = _val_; } + float ddq() const { return this->ddq_; } + float& ddq() { return this->ddq_; } + void ddq(float _val_) { this->ddq_ = _val_; } + float tau_est() const { return this->tau_est_; } + float& tau_est() { return this->tau_est_; } + void tau_est(float _val_) { this->tau_est_ = _val_; } + const std::array& temperature() const { return this->temperature_; } + std::array& temperature() { return this->temperature_; } + void temperature(const std::array& _val_) { this->temperature_ = _val_; } + void temperature(std::array&& _val_) { this->temperature_ = _val_; } + float vol() const { return this->vol_; } + float& vol() { return this->vol_; } + void vol(float _val_) { this->vol_ = _val_; } + const std::array& sensor() const { return this->sensor_; } + std::array& sensor() { return this->sensor_; } + void sensor(const std::array& _val_) { this->sensor_ = _val_; } + void sensor(std::array&& _val_) { this->sensor_ = _val_; } + uint32_t motorstate() const { return this->motorstate_; } + uint32_t& motorstate() { return this->motorstate_; } + void motorstate(uint32_t _val_) { this->motorstate_ = _val_; } + const std::array& reserve() const { return this->reserve_; } + std::array& reserve() { return this->reserve_; } + void reserve(const std::array& _val_) { this->reserve_ = _val_; } + void reserve(std::array&& _val_) { this->reserve_ = _val_; } + + bool operator==(const MotorState_& _other) const + { + (void) _other; + return mode_ == _other.mode_ && + q_ == _other.q_ && + dq_ == _other.dq_ && + ddq_ == _other.ddq_ && + tau_est_ == _other.tau_est_ && + temperature_ == _other.temperature_ && + vol_ == _other.vol_ && + sensor_ == _other.sensor_ && + motorstate_ == _other.motorstate_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const MotorState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::MotorState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::MotorState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::MotorState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MotorState_>::type_map_blob_sz() { return 670; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::MotorState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MotorState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xee, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, + 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, 0x00, 0xd6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x02, 0x03, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x0a, 0xcf, 0x8b, 0xe1, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x02, 0x07, 0xa5, 0xfe, 0x26, 0xd5, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0xd1, 0x41, 0x1a, 0xed, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x9c, 0x3b, + 0x62, 0x94, 0x00, 0x00, 0x7e, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xa8, 0x6c, 0xba, + 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0x00, 0x66, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x00, 0x00, 0x2e, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, 0x43, 0xa0, 0x99, 0xf1, + 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, 0xe0, 0xed, 0x24, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::MotorState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x7c, 0xc5, 0x84, 0xed, 0x94, 0x0b, 0x8f, 0x30, 0x18, 0xf1, 0x8d, + 0xe0, 0xed, 0x24, 0x00, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xa8, 0x6c, 0xba, 0xb3, 0xae, 0x0a, 0xa9, 0x8a, 0x1e, 0x74, 0x66, + 0x43, 0xa0, 0x99, 0x00, 0x6a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::MotorState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::MotorState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::MotorState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::MotorState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.vol())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.sensor()[0], instance.sensor().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.motorstate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.vol())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.sensor()[0], instance.sensor().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.motorstate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.vol())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.sensor()[0], instance.sensor().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.motorstate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::MotorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.q())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.dq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.ddq())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tau_est())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.vol())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.sensor()[0], instance.sensor().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.motorstate())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 9: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.reserve()[0], instance.reserve().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::MotorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::MotorState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_MOTORSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/PressSensorState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/PressSensorState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..786fe7151c7ada574eca4148f5574f6609316771 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/PressSensorState_.hpp @@ -0,0 +1,424 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PressSensorState_.idl + Source: PressSensorState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_PRESSSENSORSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_PRESSSENSORSTATE__HPP + +#include +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class PressSensorState_ +{ +private: + std::array pressure_ = { }; + std::array temperature_ = { }; + uint32_t lost_ = 0; + uint32_t reserve_ = 0; + +public: + PressSensorState_() = default; + + explicit PressSensorState_( + const std::array& pressure, + const std::array& temperature, + uint32_t lost, + uint32_t reserve) : + pressure_(pressure), + temperature_(temperature), + lost_(lost), + reserve_(reserve) { } + + const std::array& pressure() const { return this->pressure_; } + std::array& pressure() { return this->pressure_; } + void pressure(const std::array& _val_) { this->pressure_ = _val_; } + void pressure(std::array&& _val_) { this->pressure_ = _val_; } + const std::array& temperature() const { return this->temperature_; } + std::array& temperature() { return this->temperature_; } + void temperature(const std::array& _val_) { this->temperature_ = _val_; } + void temperature(std::array&& _val_) { this->temperature_ = _val_; } + uint32_t lost() const { return this->lost_; } + uint32_t& lost() { return this->lost_; } + void lost(uint32_t _val_) { this->lost_ = _val_; } + uint32_t reserve() const { return this->reserve_; } + uint32_t& reserve() { return this->reserve_; } + void reserve(uint32_t _val_) { this->reserve_ = _val_; } + + bool operator==(const PressSensorState_& _other) const + { + (void) _other; + return pressure_ == _other.pressure_ && + temperature_ == _other.temperature_ && + lost_ == _other.lost_ && + reserve_ == _other.reserve_; + } + + bool operator!=(const PressSensorState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::PressSensorState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::type_map_blob_sz() { return 406; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x83, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, + 0x26, 0x6e, 0x46, 0x6a, 0x66, 0xb2, 0x55, 0x00, 0x6b, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xd9, 0x9f, 0xad, 0x96, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0c, 0x09, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0x00, + 0xca, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x70, 0x72, 0x65, 0x73, 0x73, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, + 0x07, 0xb3, 0x82, 0x0f, 0xf4, 0x2b, 0x21, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, 0x26, + 0x6e, 0x46, 0x6a, 0x66, 0xb2, 0x55, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x03, 0x93, 0x1d, 0x83, 0x67, 0x60, 0x08, 0x26, 0x6e, 0x46, 0x6a, + 0x66, 0xb2, 0x55, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xcd, 0x53, 0x1f, 0x52, 0x24, 0x7f, 0x1d, 0x07, 0xb3, 0x82, 0x0f, + 0xf4, 0x2b, 0x21, 0x00, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::PressSensorState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::PressSensorState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::PressSensorState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::PressSensorState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::PressSensorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.pressure()[0], instance.pressure().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::PressSensorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::PressSensorState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::PressSensorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.pressure()[0], instance.pressure().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::PressSensorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::PressSensorState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::PressSensorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.pressure()[0], instance.pressure().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::PressSensorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::PressSensorState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::PressSensorState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.pressure()[0], instance.pressure().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.temperature()[0], instance.temperature().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.lost())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.reserve())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::PressSensorState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::PressSensorState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_PRESSSENSORSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/SportModeState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/SportModeState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a974a9786313b3cad29d454a4c6b3659d32009ea --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg/SportModeState_.hpp @@ -0,0 +1,386 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: SportModeState_.idl + Source: SportModeState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP + +#include + +namespace unitree_hg +{ +namespace msg +{ +namespace dds_ +{ +class SportModeState_ +{ +private: + uint32_t fsm_id_ = 0; + uint32_t fsm_mode_ = 0; + uint32_t task_id_ = 0; + float task_time_ = 0.0f; + +public: + SportModeState_() = default; + + explicit SportModeState_( + uint32_t fsm_id, + uint32_t fsm_mode, + uint32_t task_id, + float task_time) : + fsm_id_(fsm_id), + fsm_mode_(fsm_mode), + task_id_(task_id), + task_time_(task_time) { } + + uint32_t fsm_id() const { return this->fsm_id_; } + uint32_t& fsm_id() { return this->fsm_id_; } + void fsm_id(uint32_t _val_) { this->fsm_id_ = _val_; } + uint32_t fsm_mode() const { return this->fsm_mode_; } + uint32_t& fsm_mode() { return this->fsm_mode_; } + void fsm_mode(uint32_t _val_) { this->fsm_mode_ = _val_; } + uint32_t task_id() const { return this->task_id_; } + uint32_t& task_id() { return this->task_id_; } + void task_id(uint32_t _val_) { this->task_id_ = _val_; } + float task_time() const { return this->task_time_; } + float& task_time() { return this->task_time_; } + void task_time(float _val_) { this->task_time_ = _val_; } + + bool operator==(const SportModeState_& _other) const + { + (void) _other; + return fsm_id_ == _other.fsm_id_ && + fsm_mode_ == _other.fsm_mode_ && + task_id_ == _other.task_id_ && + task_time_ == _other.task_time_; + } + + bool operator!=(const SportModeState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::getTypeName() +{ + return "unitree_hg::msg::dds_::SportModeState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_map_blob_sz() { return 354; } +template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_map_blob() { + static const uint8_t blob[] = { + 0x6b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8, + 0x28, 0xb3, 0x93, 0x6e, 0xf9, 0xad, 0xcd, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x2d, 0xd6, 0x36, 0xc3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x8d, 0x48, 0xe5, 0x3f, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x57, 0x74, 0x6c, 0xc8, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x80, 0xea, 0xf8, 0x4c, 0x00, + 0xc8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30, + 0xa5, 0xcc, 0x29, 0x21, 0x14, 0x99, 0xd6, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x66, 0x73, 0x6d, 0x5f, + 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x73, 0x6d, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30, 0xa5, 0xcc, 0x29, 0x21, + 0x14, 0x99, 0xd6, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8, 0x28, 0xb3, 0x93, 0x6e, 0xf9, + 0xad, 0xcd, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8, 0x28, 0xb3, 0x93, 0x6e, + 0xf9, 0xad, 0xcd, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30, 0xa5, 0xcc, 0x29, 0x21, + 0x14, 0x99, 0xd6, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg::msg::dds_::SportModeState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::SportModeState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg::msg::dds_::SportModeState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.fsm_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.fsm_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.task_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.task_time())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.fsm_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.fsm_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.task_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.task_time())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.fsm_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.fsm_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.task_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.task_time())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.fsm_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.fsm_mode())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.task_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.task_time())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg_doubleimu/doubleIMUState_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg_doubleimu/doubleIMUState_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..db08842881da2696e1569c6e32fd61fba2c3e609 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/hg_doubleimu/doubleIMUState_.hpp @@ -0,0 +1,545 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: doubleIMUState_.idl + Source: doubleIMUState_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_HG_DOUBLEIMU_DOUBLEIMUSTATE__HPP +#define DDSCXX_UNITREE_IDL_HG_DOUBLEIMU_DOUBLEIMUSTATE__HPP + +#include +#include + +namespace unitree_hg_doubleimu +{ +namespace msg +{ +namespace dds_ +{ +class doubleIMUState_ +{ +private: + std::array quaternion_ = { }; + std::array gyroscope_ = { }; + std::array accelerometer_ = { }; + std::array rpy_ = { }; + int16_t temperature_ = 0; + uint32_t tick_ = 0; + +public: + doubleIMUState_() = default; + + explicit doubleIMUState_( + const std::array& quaternion, + const std::array& gyroscope, + const std::array& accelerometer, + const std::array& rpy, + int16_t temperature, + uint32_t tick) : + quaternion_(quaternion), + gyroscope_(gyroscope), + accelerometer_(accelerometer), + rpy_(rpy), + temperature_(temperature), + tick_(tick) { } + + const std::array& quaternion() const { return this->quaternion_; } + std::array& quaternion() { return this->quaternion_; } + void quaternion(const std::array& _val_) { this->quaternion_ = _val_; } + void quaternion(std::array&& _val_) { this->quaternion_ = _val_; } + const std::array& gyroscope() const { return this->gyroscope_; } + std::array& gyroscope() { return this->gyroscope_; } + void gyroscope(const std::array& _val_) { this->gyroscope_ = _val_; } + void gyroscope(std::array&& _val_) { this->gyroscope_ = _val_; } + const std::array& accelerometer() const { return this->accelerometer_; } + std::array& accelerometer() { return this->accelerometer_; } + void accelerometer(const std::array& _val_) { this->accelerometer_ = _val_; } + void accelerometer(std::array&& _val_) { this->accelerometer_ = _val_; } + const std::array& rpy() const { return this->rpy_; } + std::array& rpy() { return this->rpy_; } + void rpy(const std::array& _val_) { this->rpy_ = _val_; } + void rpy(std::array&& _val_) { this->rpy_ = _val_; } + int16_t temperature() const { return this->temperature_; } + int16_t& temperature() { return this->temperature_; } + void temperature(int16_t _val_) { this->temperature_ = _val_; } + uint32_t tick() const { return this->tick_; } + uint32_t& tick() { return this->tick_; } + void tick(uint32_t _val_) { this->tick_ = _val_; } + + bool operator==(const doubleIMUState_& _other) const + { + (void) _other; + return quaternion_ == _other.quaternion_ && + gyroscope_ == _other.gyroscope_ && + accelerometer_ == _other.accelerometer_ && + rpy_ == _other.rpy_ && + temperature_ == _other.temperature_ && + tick_ == _other.tick_; + } + + bool operator!=(const doubleIMUState_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::getTypeName() +{ + return "unitree_hg_doubleimu::msg::dds_::doubleIMUState_"; +} + +template <> constexpr bool TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::type_map_blob_sz() { return 554; } +template<> constexpr unsigned int TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::type_map_blob() { + static const uint8_t blob[] = { + 0xbb, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xcc, 0xc5, 0x2b, 0x0f, 0x1a, 0xc2, + 0x5a, 0xa6, 0x45, 0x4a, 0x3f, 0x62, 0x20, 0x00, 0xa3, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0e, 0x12, + 0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0xb0, 0x7d, 0x92, 0xed, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0xee, 0xf4, 0x38, 0xf7, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe5, 0xe5, 0xc0, 0x75, 0x00, + 0x3f, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd0, 0x8d, 0x00, 0x25, 0xc9, 0x25, 0x90, + 0xdf, 0xc3, 0x06, 0x18, 0x52, 0xa9, 0xf7, 0x00, 0x27, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x69, 0x6d, 0x75, + 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x49, 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x72, 0x70, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x74, 0x69, 0x63, 0x6b, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd0, 0x8d, 0x00, + 0x25, 0xc9, 0x25, 0x90, 0xdf, 0xc3, 0x06, 0x18, 0x52, 0xa9, 0xf7, 0xf1, 0x8b, 0xcc, 0xc5, 0x2b, + 0x0f, 0x1a, 0xc2, 0x5a, 0xa6, 0x45, 0x4a, 0x3f, 0x62, 0x20, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xcc, 0xc5, 0x2b, 0x0f, 0x1a, 0xc2, 0x5a, 0xa6, 0x45, 0x4a, + 0x3f, 0x62, 0x20, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd0, 0x8d, 0x00, 0x25, 0xc9, 0x25, 0x90, 0xdf, 0xc3, 0x06, 0x18, + 0x52, 0xa9, 0xf7, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_hg_doubleimu::msg::dds_::doubleIMUState_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.quaternion()[0], instance.quaternion().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.gyroscope()[0], instance.gyroscope().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.accelerometer()[0], instance.accelerometer().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.rpy()[0], instance.rpy().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.temperature())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.tick())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_hg_doubleimu::msg::dds_::doubleIMUState_& instance, bool as_key) { + auto &props = get_type_props<::unitree_hg_doubleimu::msg::dds_::doubleIMUState_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_HG_DOUBLEIMU_DOUBLEIMUSTATE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Header_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Header_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b09cb4865479634fed200472bba3b1a974b9258b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Header_.hpp @@ -0,0 +1,330 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Header_.idl + Source: Header_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP +#define DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP + +#include "unitree/idl/ros2/Time_.hpp" + +#include + +namespace std_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Header_ +{ +private: + ::builtin_interfaces::msg::dds_::Time_ stamp_; + std::string frame_id_; + +public: + Header_() = default; + + explicit Header_( + const ::builtin_interfaces::msg::dds_::Time_& stamp, + const std::string& frame_id) : + stamp_(stamp), + frame_id_(frame_id) { } + + const ::builtin_interfaces::msg::dds_::Time_& stamp() const { return this->stamp_; } + ::builtin_interfaces::msg::dds_::Time_& stamp() { return this->stamp_; } + void stamp(const ::builtin_interfaces::msg::dds_::Time_& _val_) { this->stamp_ = _val_; } + void stamp(::builtin_interfaces::msg::dds_::Time_&& _val_) { this->stamp_ = _val_; } + const std::string& frame_id() const { return this->frame_id_; } + std::string& frame_id() { return this->frame_id_; } + void frame_id(const std::string& _val_) { this->frame_id_ = _val_; } + void frame_id(std::string&& _val_) { this->frame_id_ = _val_; } + + bool operator==(const Header_& _other) const + { + (void) _other; + return stamp_ == _other.stamp_ && + frame_id_ == _other.frame_id_; + } + + bool operator!=(const Header_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::std_msgs::msg::dds_::Header_>::getTypeName() +{ + return "std_msgs::msg::dds_::Header_"; +} + +template <> constexpr bool TopicTraits<::std_msgs::msg::dds_::Header_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::std_msgs::msg::dds_::Header_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::std_msgs::msg::dds_::Header_>::type_map_blob_sz() { return 524; } +template<> constexpr unsigned int TopicTraits<::std_msgs::msg::dds_::Header_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::std_msgs::msg::dds_::Header_>::type_map_blob() { + static const uint8_t blob[] = { + 0xa3, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x44, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, + 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0x00, 0x1a, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, + 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, + 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, + 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::std_msgs::msg::dds_::Header_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, + 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, + 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, + 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::std_msgs::msg::dds_::Header_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::std_msgs::msg::dds_::Header_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::std_msgs::msg::dds_::Header_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::std_msgs::msg::dds_::Header_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::std_msgs::msg::dds_::Header_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::std_msgs::msg::dds_::Header_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::Header_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::std_msgs::msg::dds_::Header_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::std_msgs::msg::dds_::Header_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::Header_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::std_msgs::msg::dds_::Header_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::std_msgs::msg::dds_::Header_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::Header_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::std_msgs::msg::dds_::Header_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.stamp(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::std_msgs::msg::dds_::Header_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::Header_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_HEADER__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Imu_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Imu_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e26fbdabefa0a693fa36622a60f66cc1ffc450b0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Imu_.hpp @@ -0,0 +1,672 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Imu_.idl + Source: Imu_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_IMU__HPP +#define DDSCXX_UNITREE_IDL_ROS2_IMU__HPP + +#include "unitree/idl/ros2/Quaternion_.hpp" + +#include "unitree/idl/ros2/Vector3_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + +#include + +namespace sensor_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Imu_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Quaternion_ orientation_; + std::array orientation_covariance_ = { }; + ::geometry_msgs::msg::dds_::Vector3_ angular_velocity_; + std::array angular_velocity_covariance_ = { }; + ::geometry_msgs::msg::dds_::Vector3_ linear_acceleration_; + std::array linear_acceleration_covariance_ = { }; + +public: + Imu_() = default; + + explicit Imu_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Quaternion_& orientation, + const std::array& orientation_covariance, + const ::geometry_msgs::msg::dds_::Vector3_& angular_velocity, + const std::array& angular_velocity_covariance, + const ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration, + const std::array& linear_acceleration_covariance) : + header_(header), + orientation_(orientation), + orientation_covariance_(orientation_covariance), + angular_velocity_(angular_velocity), + angular_velocity_covariance_(angular_velocity_covariance), + linear_acceleration_(linear_acceleration), + linear_acceleration_covariance_(linear_acceleration_covariance) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Quaternion_& orientation() const { return this->orientation_; } + ::geometry_msgs::msg::dds_::Quaternion_& orientation() { return this->orientation_; } + void orientation(const ::geometry_msgs::msg::dds_::Quaternion_& _val_) { this->orientation_ = _val_; } + void orientation(::geometry_msgs::msg::dds_::Quaternion_&& _val_) { this->orientation_ = _val_; } + const std::array& orientation_covariance() const { return this->orientation_covariance_; } + std::array& orientation_covariance() { return this->orientation_covariance_; } + void orientation_covariance(const std::array& _val_) { this->orientation_covariance_ = _val_; } + void orientation_covariance(std::array&& _val_) { this->orientation_covariance_ = _val_; } + const ::geometry_msgs::msg::dds_::Vector3_& angular_velocity() const { return this->angular_velocity_; } + ::geometry_msgs::msg::dds_::Vector3_& angular_velocity() { return this->angular_velocity_; } + void angular_velocity(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->angular_velocity_ = _val_; } + void angular_velocity(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->angular_velocity_ = _val_; } + const std::array& angular_velocity_covariance() const { return this->angular_velocity_covariance_; } + std::array& angular_velocity_covariance() { return this->angular_velocity_covariance_; } + void angular_velocity_covariance(const std::array& _val_) { this->angular_velocity_covariance_ = _val_; } + void angular_velocity_covariance(std::array&& _val_) { this->angular_velocity_covariance_ = _val_; } + const ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration() const { return this->linear_acceleration_; } + ::geometry_msgs::msg::dds_::Vector3_& linear_acceleration() { return this->linear_acceleration_; } + void linear_acceleration(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->linear_acceleration_ = _val_; } + void linear_acceleration(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->linear_acceleration_ = _val_; } + const std::array& linear_acceleration_covariance() const { return this->linear_acceleration_covariance_; } + std::array& linear_acceleration_covariance() { return this->linear_acceleration_covariance_; } + void linear_acceleration_covariance(const std::array& _val_) { this->linear_acceleration_covariance_ = _val_; } + void linear_acceleration_covariance(std::array&& _val_) { this->linear_acceleration_covariance_ = _val_; } + + bool operator==(const Imu_& _other) const + { + (void) _other; + return header_ == _other.header_ && + orientation_ == _other.orientation_ && + orientation_covariance_ == _other.orientation_covariance_ && + angular_velocity_ == _other.angular_velocity_ && + angular_velocity_covariance_ == _other.angular_velocity_covariance_ && + linear_acceleration_ == _other.linear_acceleration_ && + linear_acceleration_covariance_ == _other.linear_acceleration_covariance_; + } + + bool operator!=(const Imu_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::sensor_msgs::msg::dds_::Imu_>::getTypeName() +{ + return "sensor_msgs::msg::dds_::Imu_"; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::Imu_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::Imu_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_map_blob_sz() { return 1814; } +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_info_blob_sz() { return 292; } +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5f, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, + 0x22, 0x6a, 0xd9, 0xb4, 0x81, 0xee, 0xcf, 0x00, 0xe6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, + 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, 0x42, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x77, 0xf3, 0x0b, 0x71, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, + 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x58, 0x1e, 0xf3, 0x6e, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x09, 0x0a, 0xe6, 0x5c, 0x0b, 0xa5, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0x1c, 0x0c, 0x95, 0xca, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0xcb, 0x0e, + 0x14, 0xbf, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, + 0xf2, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, + 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, + 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, + 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, + 0x04, 0x64, 0xd5, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, + 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0xf1, 0x5e, 0x73, 0x97, 0xe7, + 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x10, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf2, 0x29, 0xbf, 0xf9, + 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, 0x24, 0x64, 0xd8, 0x00, 0xb1, 0x01, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49, 0x6d, 0x75, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x7d, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x0a, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, + 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, + 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x33, 0x5f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0xf2, 0x29, 0xbf, 0xf9, 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, 0x24, 0x64, 0xd8, 0xf1, + 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, 0x22, 0x6a, 0xd9, 0xb4, 0x81, 0xee, 0xcf, 0xf2, 0xe5, + 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, + 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, + 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, + 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, + 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, + 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, + 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::Imu_>::type_info_blob() { + static const uint8_t blob[] = { + 0x20, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0xf9, 0x81, 0x03, 0x5a, 0x0e, 0xd7, 0x22, 0x6a, 0xd9, 0xb4, + 0x81, 0xee, 0xcf, 0x00, 0xea, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x29, 0xbf, 0xf9, 0x05, 0xfe, 0xca, 0x04, 0x21, 0xfc, 0x4f, 0x4e, + 0x24, 0x64, 0xd8, 0x00, 0xb5, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x94, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::sensor_msgs::msg::dds_::Imu_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::sensor_msgs::msg::dds_::Imu_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::sensor_msgs::msg::dds_::Imu_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::sensor_msgs::msg::dds_::Imu_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.orientation_covariance()[0], instance.orientation_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.angular_velocity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.angular_velocity_covariance()[0], instance.angular_velocity_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.linear_acceleration(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.linear_acceleration_covariance()[0], instance.linear_acceleration_covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::sensor_msgs::msg::dds_::Imu_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::Imu_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_IMU__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/MapMetaData_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/MapMetaData_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..45b908b01fff799ad381602f2e3ebad2e31acead --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/MapMetaData_.hpp @@ -0,0 +1,517 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: MapMetaData_.idl + Source: MapMetaData_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP +#define DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP + +#include "unitree/idl/ros2/Time_.hpp" + +#include "unitree/idl/ros2/Pose_.hpp" + +#include + +namespace nav_msgs +{ +namespace msg +{ +namespace dds_ +{ +class MapMetaData_ +{ +private: + ::builtin_interfaces::msg::dds_::Time_ map_load_time_; + float resolution_ = 0.0f; + uint32_t width_ = 0; + uint32_t height_ = 0; + ::geometry_msgs::msg::dds_::Pose_ origin_; + +public: + MapMetaData_() = default; + + explicit MapMetaData_( + const ::builtin_interfaces::msg::dds_::Time_& map_load_time, + float resolution, + uint32_t width, + uint32_t height, + const ::geometry_msgs::msg::dds_::Pose_& origin) : + map_load_time_(map_load_time), + resolution_(resolution), + width_(width), + height_(height), + origin_(origin) { } + + const ::builtin_interfaces::msg::dds_::Time_& map_load_time() const { return this->map_load_time_; } + ::builtin_interfaces::msg::dds_::Time_& map_load_time() { return this->map_load_time_; } + void map_load_time(const ::builtin_interfaces::msg::dds_::Time_& _val_) { this->map_load_time_ = _val_; } + void map_load_time(::builtin_interfaces::msg::dds_::Time_&& _val_) { this->map_load_time_ = _val_; } + float resolution() const { return this->resolution_; } + float& resolution() { return this->resolution_; } + void resolution(float _val_) { this->resolution_ = _val_; } + uint32_t width() const { return this->width_; } + uint32_t& width() { return this->width_; } + void width(uint32_t _val_) { this->width_ = _val_; } + uint32_t height() const { return this->height_; } + uint32_t& height() { return this->height_; } + void height(uint32_t _val_) { this->height_ = _val_; } + const ::geometry_msgs::msg::dds_::Pose_& origin() const { return this->origin_; } + ::geometry_msgs::msg::dds_::Pose_& origin() { return this->origin_; } + void origin(const ::geometry_msgs::msg::dds_::Pose_& _val_) { this->origin_ = _val_; } + void origin(::geometry_msgs::msg::dds_::Pose_&& _val_) { this->origin_ = _val_; } + + bool operator==(const MapMetaData_& _other) const + { + (void) _other; + return map_load_time_ == _other.map_load_time_ && + resolution_ == _other.resolution_ && + width_ == _other.width_ && + height_ == _other.height_ && + origin_ == _other.origin_; + } + + bool operator!=(const MapMetaData_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::getTypeName() +{ + return "nav_msgs::msg::dds_::MapMetaData_"; +} + +template <> constexpr bool TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::type_map_blob_sz() { return 1546; } +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::type_info_blob_sz() { return 292; } +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::type_map_blob() { + static const uint8_t blob[] = { + 0x03, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, + 0x18, 0x8f, 0x00, 0x60, 0x94, 0x68, 0x47, 0x00, 0x81, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, + 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x66, 0x5b, 0xc6, 0xd3, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0xe1, 0x64, 0xb3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xea, 0xae, 0x26, 0xa6, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xb4, 0x35, 0xe2, 0x27, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, + 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x7c, 0x49, 0xb1, 0x53, 0xf1, 0x56, 0x7c, + 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, + 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, + 0x04, 0x64, 0xd5, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, + 0x17, 0xeb, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, + 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, + 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, 0x42, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, + 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0xf1, + 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, + 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, 0x60, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, 0x52, 0xab, 0x2d, 0x00, + 0xe9, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, + 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x6d, 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0d, + 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, + 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x72, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, + 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, + 0x7d, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, + 0x52, 0xab, 0x2d, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, 0x18, 0x8f, 0x00, 0x60, 0x94, + 0x68, 0x47, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, + 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0xf1, + 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::type_info_blob() { + static const uint8_t blob[] = { + 0x20, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, 0x18, 0x8f, 0x00, 0x60, + 0x94, 0x68, 0x47, 0x00, 0x85, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, + 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, + 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, + 0x52, 0xab, 0x2d, 0x00, 0xed, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::nav_msgs::msg::dds_::MapMetaData_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::nav_msgs::msg::dds_::MapMetaData_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::nav_msgs::msg::dds_::MapMetaData_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::nav_msgs::msg::dds_::MapMetaData_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::nav_msgs::msg::dds_::MapMetaData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.map_load_time(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.origin(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::nav_msgs::msg::dds_::MapMetaData_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::MapMetaData_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::nav_msgs::msg::dds_::MapMetaData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.map_load_time(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.origin(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::nav_msgs::msg::dds_::MapMetaData_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::MapMetaData_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::nav_msgs::msg::dds_::MapMetaData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.map_load_time(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.origin(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::nav_msgs::msg::dds_::MapMetaData_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::MapMetaData_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::nav_msgs::msg::dds_::MapMetaData_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.map_load_time(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.resolution())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.origin(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::nav_msgs::msg::dds_::MapMetaData_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::MapMetaData_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_MAPMETADATA__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/OccupancyGrid_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/OccupancyGrid_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d3e73604ce7ee815a3b41df5f50c21bba2be2929 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/OccupancyGrid_.hpp @@ -0,0 +1,532 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: OccupancyGrid_.idl + Source: OccupancyGrid_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP +#define DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP + +#include "unitree/idl/ros2/MapMetaData_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + +#include +#include + +namespace nav_msgs +{ +namespace msg +{ +namespace dds_ +{ +class OccupancyGrid_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::nav_msgs::msg::dds_::MapMetaData_ info_; + std::vector data_; + +public: + OccupancyGrid_() = default; + + explicit OccupancyGrid_( + const ::std_msgs::msg::dds_::Header_& header, + const ::nav_msgs::msg::dds_::MapMetaData_& info, + const std::vector& data) : + header_(header), + info_(info), + data_(data) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::nav_msgs::msg::dds_::MapMetaData_& info() const { return this->info_; } + ::nav_msgs::msg::dds_::MapMetaData_& info() { return this->info_; } + void info(const ::nav_msgs::msg::dds_::MapMetaData_& _val_) { this->info_ = _val_; } + void info(::nav_msgs::msg::dds_::MapMetaData_&& _val_) { this->info_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + + bool operator==(const OccupancyGrid_& _other) const + { + (void) _other; + return header_ == _other.header_ && + info_ == _other.info_ && + data_ == _other.data_; + } + + bool operator!=(const OccupancyGrid_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::getTypeName() +{ + return "nav_msgs::msg::dds_::OccupancyGrid_"; +} + +template <> constexpr bool TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::type_map_blob_sz() { return 2154; } +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::type_info_blob_sz() { return 388; } +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::type_map_blob() { + static const uint8_t blob[] = { + 0xd7, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf1, 0xa6, 0x7a, 0x91, 0x75, 0x57, 0xcb, 0x8b, + 0xe9, 0x7b, 0x12, 0x9d, 0x77, 0xb3, 0xfd, 0x00, 0x68, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, + 0x5c, 0x8d, 0x18, 0x8f, 0x00, 0x60, 0x94, 0x68, 0x47, 0xca, 0xf9, 0xb6, 0xb9, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x8d, 0x77, 0x7f, 0x38, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, + 0x1f, 0xa3, 0xf2, 0x00, 0x44, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, + 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, + 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, + 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, + 0x04, 0x64, 0xd5, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, 0x18, 0x8f, 0x00, 0x60, 0x94, + 0x68, 0x47, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, + 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x66, 0x5b, 0xc6, 0xd3, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0xe1, 0x64, 0xb3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xea, 0xae, 0x26, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xb4, 0x35, 0xe2, 0x27, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, + 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x7c, 0x49, 0xb1, 0x53, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, + 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, + 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, 0x42, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, + 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, 0xb0, 0x04, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0xfe, 0xf8, 0xd1, 0x93, 0x3f, 0x26, 0x1c, 0xef, 0x1f, 0x33, + 0xfd, 0x62, 0x89, 0x00, 0xab, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x73, + 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4f, 0x63, 0x63, + 0x75, 0x70, 0x61, 0x6e, 0x63, 0x79, 0x47, 0x72, 0x69, 0x64, 0x5f, 0x00, 0x73, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, + 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, + 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, 0x52, 0xab, 0x2d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x69, 0x6e, 0x66, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, + 0x2a, 0x55, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, + 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, + 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, + 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, + 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, + 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, 0x52, 0xab, 0x2d, 0x00, 0x00, 0x00, 0xe9, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, + 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, + 0x5f, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x70, 0x5f, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, + 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, + 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, + 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, + 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0xd6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0xfe, 0xf8, 0xd1, 0x93, 0x3f, 0x26, + 0x1c, 0xef, 0x1f, 0x33, 0xfd, 0x62, 0x89, 0xf1, 0xa6, 0x7a, 0x91, 0x75, 0x57, 0xcb, 0x8b, 0xe9, + 0x7b, 0x12, 0x9d, 0x77, 0xb3, 0xfd, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, + 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, + 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, + 0xf9, 0x8d, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, 0x8e, 0x1b, 0x5c, 0x8c, 0x51, 0x02, 0x52, 0xab, + 0x2d, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, 0x18, 0x8f, 0x00, 0x60, 0x94, 0x68, 0x47, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0xf1, + 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::type_info_blob() { + static const uint8_t blob[] = { + 0x80, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0xb8, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xa6, 0x7a, 0x91, 0x75, 0x57, 0xcb, 0x8b, 0xe9, 0x7b, 0x12, 0x9d, + 0x77, 0xb3, 0xfd, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x07, 0x57, 0xb7, 0x09, 0xbd, 0x5c, 0x8d, + 0x18, 0x8f, 0x00, 0x60, 0x94, 0x68, 0x47, 0x00, 0x85, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, + 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0xb8, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0xfe, 0xf8, 0xd1, 0x93, 0x3f, 0x26, 0x1c, 0xef, 0x1f, 0x33, + 0xfd, 0x62, 0x89, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xaf, 0xf2, 0xbe, 0x67, 0xdd, 0x8e, 0x1b, + 0x5c, 0x8c, 0x51, 0x02, 0x52, 0xab, 0x2d, 0x00, 0xed, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::nav_msgs::msg::dds_::OccupancyGrid_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::nav_msgs::msg::dds_::OccupancyGrid_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::nav_msgs::msg::dds_::OccupancyGrid_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::nav_msgs::msg::dds_::OccupancyGrid_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.info(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::OccupancyGrid_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::nav_msgs::msg::dds_::OccupancyGrid_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.info(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::nav_msgs::msg::dds_::OccupancyGrid_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::OccupancyGrid_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.info(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::OccupancyGrid_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.info(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::nav_msgs::msg::dds_::OccupancyGrid_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::OccupancyGrid_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_OCCUPANCYGRID__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Odometry_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Odometry_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f60aff09af9f2e8c4283c7bd7b97a99856a84176 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Odometry_.hpp @@ -0,0 +1,588 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Odometry_.idl + Source: Odometry_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP +#define DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP + +#include "unitree/idl/ros2/PoseWithCovariance_.hpp" + +#include "unitree/idl/ros2/TwistWithCovariance_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + +#include + +namespace nav_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Odometry_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + std::string child_frame_id_; + ::geometry_msgs::msg::dds_::PoseWithCovariance_ pose_; + ::geometry_msgs::msg::dds_::TwistWithCovariance_ twist_; + +public: + Odometry_() = default; + + explicit Odometry_( + const ::std_msgs::msg::dds_::Header_& header, + const std::string& child_frame_id, + const ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose, + const ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist) : + header_(header), + child_frame_id_(child_frame_id), + pose_(pose), + twist_(twist) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const std::string& child_frame_id() const { return this->child_frame_id_; } + std::string& child_frame_id() { return this->child_frame_id_; } + void child_frame_id(const std::string& _val_) { this->child_frame_id_ = _val_; } + void child_frame_id(std::string&& _val_) { this->child_frame_id_ = _val_; } + const ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose() const { return this->pose_; } + ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose() { return this->pose_; } + void pose(const ::geometry_msgs::msg::dds_::PoseWithCovariance_& _val_) { this->pose_ = _val_; } + void pose(::geometry_msgs::msg::dds_::PoseWithCovariance_&& _val_) { this->pose_ = _val_; } + const ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist() const { return this->twist_; } + ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist() { return this->twist_; } + void twist(const ::geometry_msgs::msg::dds_::TwistWithCovariance_& _val_) { this->twist_ = _val_; } + void twist(::geometry_msgs::msg::dds_::TwistWithCovariance_&& _val_) { this->twist_ = _val_; } + + bool operator==(const Odometry_& _other) const + { + (void) _other; + return header_ == _other.header_ && + child_frame_id_ == _other.child_frame_id_ && + pose_ == _other.pose_ && + twist_ == _other.twist_; + } + + bool operator!=(const Odometry_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::nav_msgs::msg::dds_::Odometry_>::getTypeName() +{ + return "nav_msgs::msg::dds_::Odometry_"; +} + +template <> constexpr bool TopicTraits<::nav_msgs::msg::dds_::Odometry_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::nav_msgs::msg::dds_::Odometry_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::Odometry_>::type_map_blob_sz() { return 2952; } +template<> constexpr unsigned int TopicTraits<::nav_msgs::msg::dds_::Odometry_>::type_info_blob_sz() { return 508; } +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::Odometry_>::type_map_blob() { + static const uint8_t blob[] = { + 0xdf, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xf1, 0x09, 0x05, 0x85, 0xef, 0x1f, 0x33, 0xdc, + 0x43, 0x45, 0xaf, 0xc8, 0x7d, 0x2b, 0x18, 0x00, 0x81, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x8d, 0x9f, 0x65, 0x1d, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, + 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x2d, 0x5f, 0x8a, 0xe9, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, + 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0xeb, 0x3b, 0xac, 0x16, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0xb7, 0xb7, 0x26, 0xac, + 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, + 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x2d, 0x5f, 0x8a, + 0xe9, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x2f, + 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x00, 0x00, + 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, + 0xa1, 0xda, 0x16, 0x39, 0x42, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, + 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, + 0x29, 0x01, 0x86, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, 0x4a, + 0x4b, 0xa6, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, + 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xeb, 0x3b, 0xac, 0x16, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, + 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x9a, 0x93, 0x2b, 0x3c, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xd1, 0x8b, 0x86, 0x24, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x6c, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xf2, 0xc9, 0xe4, 0x81, + 0x30, 0x36, 0xe7, 0x83, 0xf6, 0x0b, 0x54, 0x7c, 0xee, 0x4e, 0x2f, 0x00, 0xd8, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x76, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, + 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4f, 0x64, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x00, 0x00, + 0xa4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, + 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, + 0x0c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, + 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x74, 0x77, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, + 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, + 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, + 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, + 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x19, + 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x00, 0x00, + 0x99, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, + 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, + 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, + 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x92, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, + 0x5e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, + 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, + 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, + 0xdf, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, + 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x77, 0x00, 0x00, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, + 0x7b, 0x7e, 0x15, 0x00, 0x99, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x54, 0x77, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, + 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x74, 0x77, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, + 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, + 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, + 0x69, 0x73, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, + 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xf2, 0xc9, 0xe4, 0x81, + 0x30, 0x36, 0xe7, 0x83, 0xf6, 0x0b, 0x54, 0x7c, 0xee, 0x4e, 0x2f, 0xf1, 0x09, 0x05, 0x85, 0xef, + 0x1f, 0x33, 0xdc, 0x43, 0x45, 0xaf, 0xc8, 0x7d, 0x2b, 0x18, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, + 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, + 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, + 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, + 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, + 0xa3, 0x3c, 0x52, 0xc9, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, + 0xf3, 0x2f, 0x7d, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, + 0x17, 0xeb, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, + 0xdf, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, + 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xf2, 0xf5, + 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0xf1, 0x40, 0xaa, + 0x70, 0xe1, 0xf7, 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0xf2, 0x66, 0x9d, 0xb6, + 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0xf1, 0x28, 0xcf, 0x21, 0x56, + 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, + 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, + 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::nav_msgs::msg::dds_::Odometry_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf8, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0xe8, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x09, 0x05, 0x85, 0xef, 0x1f, 0x33, 0xdc, 0x43, 0x45, 0xaf, 0xc8, + 0x7d, 0x2b, 0x18, 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, + 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x00, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, + 0x57, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, + 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0x00, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x00, 0x01, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc9, 0xe4, 0x81, 0x30, 0x36, 0xe7, 0x83, 0xf6, 0x0b, 0x54, 0x7c, + 0xee, 0x4e, 0x2f, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, + 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, + 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, + 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::nav_msgs::msg::dds_::Odometry_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::nav_msgs::msg::dds_::Odometry_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::nav_msgs::msg::dds_::Odometry_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::nav_msgs::msg::dds_::Odometry_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::nav_msgs::msg::dds_::Odometry_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.child_frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::nav_msgs::msg::dds_::Odometry_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::Odometry_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::nav_msgs::msg::dds_::Odometry_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.child_frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::nav_msgs::msg::dds_::Odometry_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::Odometry_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::nav_msgs::msg::dds_::Odometry_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.child_frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::nav_msgs::msg::dds_::Odometry_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::Odometry_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::nav_msgs::msg::dds_::Odometry_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.child_frame_id(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::nav_msgs::msg::dds_::Odometry_& instance, bool as_key) { + auto &props = get_type_props<::nav_msgs::msg::dds_::Odometry_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_ODOMETRY__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point32_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point32_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..7343187b3294faaf6419fba68b31df7a44047a07 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point32_.hpp @@ -0,0 +1,341 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Point32_.idl + Source: Point32_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Point32_ +{ +private: + float x_ = 0.0f; + float y_ = 0.0f; + float z_ = 0.0f; + +public: + Point32_() = default; + + explicit Point32_( + float x, + float y, + float z) : + x_(x), + y_(y), + z_(z) { } + + float x() const { return this->x_; } + float& x() { return this->x_; } + void x(float _val_) { this->x_ = _val_; } + float y() const { return this->y_; } + float& y() { return this->y_; } + void y(float _val_) { this->y_ = _val_; } + float z() const { return this->z_; } + float& z() { return this->z_; } + void z(float _val_) { this->z_ = _val_; } + + bool operator==(const Point32_& _other) const + { + (void) _other; + return x_ == _other.x_ && + y_ == _other.y_ && + z_ == _other.z_; + } + + bool operator!=(const Point32_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Point32_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Point32_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Point32_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Point32_>::type_map_blob_sz() { return 282; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Point32_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Point32_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xbd, 0xb3, 0x4b, 0x07, 0x97, 0x70, 0xd5, + 0x44, 0x4c, 0xda, 0x2d, 0x20, 0xb7, 0x83, 0x00, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xc0, 0x1f, 0x51, 0xb0, 0x99, 0xa4, + 0x54, 0xb3, 0xb8, 0xff, 0x68, 0x29, 0xe5, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xc0, 0x1f, + 0x51, 0xb0, 0x99, 0xa4, 0x54, 0xb3, 0xb8, 0xff, 0x68, 0x29, 0xe5, 0xf1, 0xbd, 0xb3, 0x4b, 0x07, + 0x97, 0x70, 0xd5, 0x44, 0x4c, 0xda, 0x2d, 0x20, 0xb7, 0x83, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Point32_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xbd, 0xb3, 0x4b, 0x07, 0x97, 0x70, 0xd5, 0x44, 0x4c, 0xda, 0x2d, + 0x20, 0xb7, 0x83, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xc0, 0x1f, 0x51, 0xb0, 0x99, 0xa4, 0x54, 0xb3, 0xb8, 0xff, + 0x68, 0x29, 0xe5, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Point32_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Point32_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Point32_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Point32_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Point32_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Point32_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point32_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Point32_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Point32_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point32_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Point32_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Point32_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point32_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Point32_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Point32_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point32_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POINT32__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointCloud2_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointCloud2_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fea5360b0af574a3fdf15783b5de228319090ef2 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointCloud2_.hpp @@ -0,0 +1,761 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PointCloud2_.idl + Source: PointCloud2_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP + +#include "unitree/idl/ros2/PointField_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + +#include +#include + +namespace sensor_msgs +{ +namespace msg +{ +namespace dds_ +{ +class PointCloud2_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + uint32_t height_ = 0; + uint32_t width_ = 0; + std::vector<::sensor_msgs::msg::dds_::PointField_> fields_; + bool is_bigendian_ = false; + uint32_t point_step_ = 0; + uint32_t row_step_ = 0; + std::vector data_; + bool is_dense_ = false; + +public: + PointCloud2_() = default; + + explicit PointCloud2_( + const ::std_msgs::msg::dds_::Header_& header, + uint32_t height, + uint32_t width, + const std::vector<::sensor_msgs::msg::dds_::PointField_>& fields, + bool is_bigendian, + uint32_t point_step, + uint32_t row_step, + const std::vector& data, + bool is_dense) : + header_(header), + height_(height), + width_(width), + fields_(fields), + is_bigendian_(is_bigendian), + point_step_(point_step), + row_step_(row_step), + data_(data), + is_dense_(is_dense) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + uint32_t height() const { return this->height_; } + uint32_t& height() { return this->height_; } + void height(uint32_t _val_) { this->height_ = _val_; } + uint32_t width() const { return this->width_; } + uint32_t& width() { return this->width_; } + void width(uint32_t _val_) { this->width_ = _val_; } + const std::vector<::sensor_msgs::msg::dds_::PointField_>& fields() const { return this->fields_; } + std::vector<::sensor_msgs::msg::dds_::PointField_>& fields() { return this->fields_; } + void fields(const std::vector<::sensor_msgs::msg::dds_::PointField_>& _val_) { this->fields_ = _val_; } + void fields(std::vector<::sensor_msgs::msg::dds_::PointField_>&& _val_) { this->fields_ = _val_; } + bool is_bigendian() const { return this->is_bigendian_; } + bool& is_bigendian() { return this->is_bigendian_; } + void is_bigendian(bool _val_) { this->is_bigendian_ = _val_; } + uint32_t point_step() const { return this->point_step_; } + uint32_t& point_step() { return this->point_step_; } + void point_step(uint32_t _val_) { this->point_step_ = _val_; } + uint32_t row_step() const { return this->row_step_; } + uint32_t& row_step() { return this->row_step_; } + void row_step(uint32_t _val_) { this->row_step_ = _val_; } + const std::vector& data() const { return this->data_; } + std::vector& data() { return this->data_; } + void data(const std::vector& _val_) { this->data_ = _val_; } + void data(std::vector&& _val_) { this->data_ = _val_; } + bool is_dense() const { return this->is_dense_; } + bool& is_dense() { return this->is_dense_; } + void is_dense(bool _val_) { this->is_dense_ = _val_; } + + bool operator==(const PointCloud2_& _other) const + { + (void) _other; + return header_ == _other.header_ && + height_ == _other.height_ && + width_ == _other.width_ && + fields_ == _other.fields_ && + is_bigendian_ == _other.is_bigendian_ && + point_step_ == _other.point_step_ && + row_step_ == _other.row_step_ && + data_ == _other.data_ && + is_dense_ == _other.is_dense_; + } + + bool operator!=(const PointCloud2_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::getTypeName() +{ + return "sensor_msgs::msg::dds_::PointCloud2_"; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::type_map_blob_sz() { return 1472; } +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::type_map_blob() { + static const uint8_t blob[] = { + 0xeb, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x62, 0xa4, 0x8e, 0xfc, 0x63, 0xa8, + 0xa6, 0xfe, 0x5f, 0x9e, 0xda, 0x06, 0xd7, 0x00, 0xcb, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xb4, 0x35, 0xe2, 0x27, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xea, 0xae, 0x26, 0xa6, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1, + 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, 0x2b, 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, 0xd0, 0x5b, + 0x6e, 0xd7, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x70, + 0x8e, 0x8a, 0xc3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1a, + 0x99, 0x6a, 0x87, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x8b, + 0x4f, 0x6f, 0x6b, 0x00, 0x10, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, + 0x01, 0x00, 0x00, 0x02, 0x8d, 0x77, 0x7f, 0x38, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x01, 0x40, 0x23, 0x8a, 0xea, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, + 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, + 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, 0x8d, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, 0x2b, + 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xb0, 0x68, 0x93, 0x1c, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x7a, 0x86, 0xc1, 0x57, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x39, 0x31, 0x10, 0x8d, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x94, 0x2a, 0x04, 0x00, + 0x4c, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0xf6, 0xf1, 0xa7, 0xb4, 0x13, 0x2f, 0x17, + 0xb4, 0xae, 0x1d, 0x73, 0x77, 0xc5, 0xbc, 0x00, 0x63, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x32, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2, 0xa3, 0xab, 0xc2, 0x35, + 0xd1, 0x3d, 0xdb, 0xab, 0x7a, 0x36, 0x56, 0x16, 0xf1, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x73, 0x5f, 0x62, + 0x69, 0x67, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x72, 0x6f, 0x77, 0x5f, + 0x73, 0x74, 0x65, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x00, 0x00, 0x00, 0xf2, + 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, 0xab, 0x7a, + 0x36, 0x56, 0x16, 0xf1, 0x08, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x00, + 0x6c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x00, 0x00, + 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0xf6, 0xf1, 0xa7, 0xb4, 0x13, 0x2f, 0x17, + 0xb4, 0xae, 0x1d, 0x73, 0x77, 0xc5, 0xbc, 0xf1, 0x7f, 0x62, 0xa4, 0x8e, 0xfc, 0x63, 0xa8, 0xa6, + 0xfe, 0x5f, 0x9e, 0xda, 0x06, 0xd7, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, + 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, + 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, + 0xf9, 0x8d, 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, 0xab, 0x7a, 0x36, 0x56, 0x16, 0xf1, + 0x08, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, 0x2b, 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, +}; + return blob; +} +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x62, 0xa4, 0x8e, 0xfc, 0x63, 0xa8, 0xa6, 0xfe, 0x5f, 0x9e, + 0xda, 0x06, 0xd7, 0x00, 0xcf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, + 0x2b, 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf6, 0xf1, 0xa7, + 0xb4, 0x13, 0x2f, 0x17, 0xb4, 0xae, 0x1d, 0x73, 0x77, 0xc5, 0xbc, 0x00, 0x67, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, 0xab, 0x7a, 0x36, 0x56, 0x16, 0xf1, 0x08, 0x00, + 0xa8, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::sensor_msgs::msg::dds_::PointCloud2_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::sensor_msgs::msg::dds_::PointCloud2_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::sensor_msgs::msg::dds_::PointCloud2_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::sensor_msgs::msg::dds_::PointCloud2_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.fields().size()); + if (!write(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!write(streamer, instance.fields()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.is_bigendian())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.point_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.row_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.is_dense())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointCloud2_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::sensor_msgs::msg::dds_::PointCloud2_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.fields().size()); + if (!read(streamer, se_1)) + return false; + instance.fields().resize(se_1); + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!read(streamer, instance.fields()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.is_bigendian())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.point_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.row_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!read(streamer, se_1)) + return false; + instance.data().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.data()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.is_dense())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::sensor_msgs::msg::dds_::PointCloud2_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointCloud2_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = uint32_t(instance.fields().size()); + if (!move(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!move(streamer, instance.fields()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.is_bigendian())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.point_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.row_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.data().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.is_dense())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointCloud2_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.height())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.width())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, false)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + for (uint32_t i_1 = 0; i_1 < se_1; i_1++) { + if (!max(streamer, instance.fields()[i_1], prop)) + return false; + } //i_1 + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 4: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.is_bigendian())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 5: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.point_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 6: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.row_step())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 7: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + case 8: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.is_dense())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::sensor_msgs::msg::dds_::PointCloud2_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointCloud2_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTCLOUD2__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointField_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointField_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3fab88fbed38c046a24abe685d6951bd46d07e7e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointField_.hpp @@ -0,0 +1,412 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PointField_.idl + Source: PointField_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP + +#include +#include + +namespace sensor_msgs +{ +namespace msg +{ +namespace dds_ +{ +namespace PointField_Constants +{ +const uint8_t INT8_ = 1; + +const uint8_t UINT8_ = 2; + +const uint8_t INT16_ = 3; + +const uint8_t UINT16_ = 4; + +const uint8_t INT32_ = 5; + +const uint8_t UINT32_ = 6; + +const uint8_t FLOAT32_ = 7; + +const uint8_t FLOAT64_ = 8; + +} + +class PointField_ +{ +private: + std::string name_; + uint32_t offset_ = 0; + uint8_t datatype_ = 0; + uint32_t count_ = 0; + +public: + PointField_() = default; + + explicit PointField_( + const std::string& name, + uint32_t offset, + uint8_t datatype, + uint32_t count) : + name_(name), + offset_(offset), + datatype_(datatype), + count_(count) { } + + const std::string& name() const { return this->name_; } + std::string& name() { return this->name_; } + void name(const std::string& _val_) { this->name_ = _val_; } + void name(std::string&& _val_) { this->name_ = _val_; } + uint32_t offset() const { return this->offset_; } + uint32_t& offset() { return this->offset_; } + void offset(uint32_t _val_) { this->offset_ = _val_; } + uint8_t datatype() const { return this->datatype_; } + uint8_t& datatype() { return this->datatype_; } + void datatype(uint8_t _val_) { this->datatype_ = _val_; } + uint32_t count() const { return this->count_; } + uint32_t& count() { return this->count_; } + void count(uint32_t _val_) { this->count_ = _val_; } + + bool operator==(const PointField_& _other) const + { + (void) _other; + return name_ == _other.name_ && + offset_ == _other.offset_ && + datatype_ == _other.datatype_ && + count_ == _other.count_; + } + + bool operator!=(const PointField_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::sensor_msgs::msg::dds_::PointField_>::getTypeName() +{ + return "sensor_msgs::msg::dds_::PointField_"; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::PointField_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::sensor_msgs::msg::dds_::PointField_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::PointField_>::type_map_blob_sz() { return 342; } +template<> constexpr unsigned int TopicTraits<::sensor_msgs::msg::dds_::PointField_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::PointField_>::type_map_blob() { + static const uint8_t blob[] = { + 0x6b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, + 0x2b, 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xb0, 0x68, 0x93, 0x1c, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x7a, 0x86, 0xc1, 0x57, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x39, 0x31, 0x10, 0x8d, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x94, 0x2a, 0x04, 0x00, + 0xbc, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, + 0xab, 0x7a, 0x36, 0x56, 0x16, 0xf1, 0x08, 0x00, 0xa4, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x00, + 0x6c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, + 0xab, 0x7a, 0x36, 0x56, 0x16, 0xf1, 0x08, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, 0x2b, + 0xa8, 0x4e, 0xb5, 0xeb, 0x0e, 0x0b, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::sensor_msgs::msg::dds_::PointField_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x17, 0x10, 0x85, 0xb3, 0xf2, 0x74, 0x2b, 0xa8, 0x4e, 0xb5, + 0xeb, 0x0e, 0x0b, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xa3, 0xab, 0xc2, 0x35, 0xd1, 0x3d, 0xdb, 0xab, 0x7a, 0x36, 0x56, + 0x16, 0xf1, 0x08, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::sensor_msgs::msg::dds_::PointField_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::sensor_msgs::msg::dds_::PointField_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::sensor_msgs::msg::dds_::PointField_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::sensor_msgs::msg::dds_::PointField_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::sensor_msgs::msg::dds_::PointField_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.offset())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.datatype())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.count())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::sensor_msgs::msg::dds_::PointField_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointField_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::sensor_msgs::msg::dds_::PointField_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.offset())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.datatype())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.count())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::sensor_msgs::msg::dds_::PointField_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointField_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::sensor_msgs::msg::dds_::PointField_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.offset())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.datatype())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.count())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::sensor_msgs::msg::dds_::PointField_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointField_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::sensor_msgs::msg::dds_::PointField_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.name(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.offset())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.datatype())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.count())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::sensor_msgs::msg::dds_::PointField_& instance, bool as_key) { + auto &props = get_type_props<::sensor_msgs::msg::dds_::PointField_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTFIELD__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4368725c8f4df40287147b28f7bd922a3b41f594 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PointStamped_.hpp @@ -0,0 +1,372 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PointStamped_.idl + Source: PointStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP + +#include "unitree/idl/ros2/Point_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class PointStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Point_ point_; + +public: + PointStamped_() = default; + + explicit PointStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Point_& point) : + header_(header), + point_(point) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Point_& point() const { return this->point_; } + ::geometry_msgs::msg::dds_::Point_& point() { return this->point_; } + void point(const ::geometry_msgs::msg::dds_::Point_& _val_) { this->point_ = _val_; } + void point(::geometry_msgs::msg::dds_::Point_&& _val_) { this->point_ = _val_; } + + bool operator==(const PointStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + point_ == _other.point_; + } + + bool operator!=(const PointStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::PointStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::type_map_blob_sz() { return 1080; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5f, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0xbc, 0x24, 0xf4, 0xb3, 0xd4, 0xb8, 0xc5, + 0x25, 0x31, 0xec, 0x3b, 0xeb, 0x9c, 0x24, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x78, 0xee, 0x54, 0xaa, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x5e, 0x73, 0x97, 0xe7, + 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x50, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x48, 0xc5, 0xdf, + 0xc4, 0x35, 0xf9, 0x84, 0x49, 0xf9, 0x9e, 0x53, 0x04, 0x09, 0xd0, 0x00, 0x94, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x5f, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, + 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, + 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, + 0x4e, 0x2a, 0x55, 0x00, 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, + 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, + 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, + 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, + 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0xf2, 0x48, 0xc5, 0xdf, 0xc4, 0x35, 0xf9, 0x84, 0x49, 0xf9, 0x9e, 0x53, 0x04, 0x09, 0xd0, 0xf1, + 0xbc, 0x24, 0xf4, 0xb3, 0xd4, 0xb8, 0xc5, 0x25, 0x31, 0xec, 0x3b, 0xeb, 0x9c, 0x24, 0xf2, 0xe5, + 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, + 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, + 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, + 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xbc, 0x24, 0xf4, 0xb3, 0xd4, 0xb8, 0xc5, 0x25, 0x31, 0xec, 0x3b, + 0xeb, 0x9c, 0x24, 0x00, 0x55, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x48, 0xc5, 0xdf, + 0xc4, 0x35, 0xf9, 0x84, 0x49, 0xf9, 0x9e, 0x53, 0x04, 0x09, 0xd0, 0x00, 0x98, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::PointStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::PointStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::PointStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::PointStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::PointStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.point(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::PointStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PointStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::PointStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.point(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::PointStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PointStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::PointStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.point(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::PointStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PointStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::PointStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.point(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::PointStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PointStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POINTSTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..22ca13c27b90cf312c423e5c4612c02598b17cc8 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Point_.hpp @@ -0,0 +1,341 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Point_.idl + Source: Point_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POINT__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POINT__HPP + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Point_ +{ +private: + double x_ = 0.0; + double y_ = 0.0; + double z_ = 0.0; + +public: + Point_() = default; + + explicit Point_( + double x, + double y, + double z) : + x_(x), + y_(y), + z_(z) { } + + double x() const { return this->x_; } + double& x() { return this->x_; } + void x(double _val_) { this->x_ = _val_; } + double y() const { return this->y_; } + double& y() { return this->y_; } + void y(double _val_) { this->y_ = _val_; } + double z() const { return this->z_; } + double& z() { return this->z_; } + void z(double _val_) { this->z_ = _val_; } + + bool operator==(const Point_& _other) const + { + (void) _other; + return x_ == _other.x_ && + y_ == _other.y_ && + z_ == _other.z_; + } + + bool operator!=(const Point_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Point_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Point_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Point_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Point_>::type_map_blob_sz() { return 282; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Point_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Point_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, + 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, 0x5e, 0x73, 0x97, 0xe7, + 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Point_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, + 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, + 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Point_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Point_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Point_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Point_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Point_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Point_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Point_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Point_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Point_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Point_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Point_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Point_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Point_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POINT__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose2D_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose2D_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1e5ee418b775c2d9de16a39a2ff0dd81ad645b41 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose2D_.hpp @@ -0,0 +1,341 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Pose2D_.idl + Source: Pose2D_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Pose2D_ +{ +private: + double x_ = 0.0; + double y_ = 0.0; + double theta_ = 0.0; + +public: + Pose2D_() = default; + + explicit Pose2D_( + double x, + double y, + double theta) : + x_(x), + y_(y), + theta_(theta) { } + + double x() const { return this->x_; } + double& x() { return this->x_; } + void x(double _val_) { this->x_ = _val_; } + double y() const { return this->y_; } + double& y() { return this->y_; } + void y(double _val_) { this->y_ = _val_; } + double theta() const { return this->theta_; } + double& theta() { return this->theta_; } + void theta(double _val_) { this->theta_ = _val_; } + + bool operator==(const Pose2D_& _other) const + { + (void) _other; + return x_ == _other.x_ && + y_ == _other.y_ && + theta_ == _other.theta_; + } + + bool operator!=(const Pose2D_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Pose2D_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::type_map_blob_sz() { return 286; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xe6, 0x4d, 0xe9, 0xc3, 0xbd, 0x87, 0xa5, + 0x1f, 0x57, 0xf7, 0x59, 0xf0, 0x59, 0x77, 0x00, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x61, 0xa7, 0x4b, 0xe6, 0x00, + 0x94, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc6, 0x23, 0x0c, 0x9d, 0x1e, 0x0d, 0x38, + 0x95, 0xf0, 0x39, 0x06, 0x50, 0x19, 0xc5, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x32, 0x44, 0x5f, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x74, 0x68, 0x65, 0x74, 0x61, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xf2, 0xc6, 0x23, 0x0c, 0x9d, 0x1e, 0x0d, 0x38, 0x95, 0xf0, 0x39, 0x06, 0x50, 0x19, 0xc5, 0xf1, + 0xe6, 0x4d, 0xe9, 0xc3, 0xbd, 0x87, 0xa5, 0x1f, 0x57, 0xf7, 0x59, 0xf0, 0x59, 0x77, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xe6, 0x4d, 0xe9, 0xc3, 0xbd, 0x87, 0xa5, 0x1f, 0x57, 0xf7, 0x59, + 0xf0, 0x59, 0x77, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc6, 0x23, 0x0c, 0x9d, 0x1e, 0x0d, 0x38, 0x95, 0xf0, 0x39, 0x06, + 0x50, 0x19, 0xc5, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Pose2D_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Pose2D_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Pose2D_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Pose2D_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Pose2D_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.theta())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Pose2D_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose2D_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Pose2D_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.theta())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Pose2D_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose2D_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Pose2D_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.theta())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Pose2D_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose2D_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Pose2D_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.theta())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Pose2D_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose2D_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POSE2D__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6b0935a1f2ccd3b752005983a8bae6f83094ff8c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseStamped_.hpp @@ -0,0 +1,415 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PoseStamped_.idl + Source: PoseStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP + +#include "unitree/idl/ros2/Pose_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class PoseStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Pose_ pose_; + +public: + PoseStamped_() = default; + + explicit PoseStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Pose_& pose) : + header_(header), + pose_(pose) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Pose_& pose() const { return this->pose_; } + ::geometry_msgs::msg::dds_::Pose_& pose() { return this->pose_; } + void pose(const ::geometry_msgs::msg::dds_::Pose_& _val_) { this->pose_ = _val_; } + void pose(::geometry_msgs::msg::dds_::Pose_&& _val_) { this->pose_ = _val_; } + + bool operator==(const PoseStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + pose_ == _other.pose_; + } + + bool operator!=(const PoseStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::PoseStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::type_map_blob_sz() { return 1676; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::type_info_blob_sz() { return 340; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0x2b, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf1, 0xcb, 0xe6, 0x9d, 0x4c, 0xd6, 0x91, 0x76, + 0x9e, 0xaf, 0x8f, 0xf6, 0xd5, 0x5c, 0x6f, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, + 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x2d, 0x5f, 0x8a, 0xe9, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, + 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x47, 0x57, 0xfe, + 0x07, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, + 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, + 0x42, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, + 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, + 0x9c, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf2, 0x80, 0x17, 0x7b, 0xda, 0x5a, 0x70, 0x7b, + 0x8b, 0x87, 0xbc, 0x32, 0x31, 0x6b, 0x6a, 0x00, 0x93, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, + 0x64, 0x5f, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, + 0x7d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x00, 0x00, 0xf2, + 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, + 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, + 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, + 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0xb8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf2, 0x80, 0x17, 0x7b, 0xda, 0x5a, 0x70, 0x7b, + 0x8b, 0x87, 0xbc, 0x32, 0x31, 0x6b, 0x6a, 0xf1, 0xcb, 0xe6, 0x9d, 0x4c, 0xd6, 0x91, 0x76, 0x9e, + 0xaf, 0x8f, 0xf6, 0xd5, 0x5c, 0x6f, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, + 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, + 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, + 0xf9, 0x8d, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, + 0x7d, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, + 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, + 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, + 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0x50, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xcb, 0xe6, 0x9d, 0x4c, 0xd6, 0x91, 0x76, 0x9e, 0xaf, 0x8f, 0xf6, + 0xd5, 0x5c, 0x6f, 0x00, 0x55, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, + 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0xa0, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x80, 0x17, 0x7b, + 0xda, 0x5a, 0x70, 0x7b, 0x8b, 0x87, 0xbc, 0x32, 0x31, 0x6b, 0x6a, 0x00, 0x97, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::PoseStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::PoseStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::PoseStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::PoseStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::PoseStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::PoseStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::PoseStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POSESTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a1f25237174bc8dc112396aca360a070ce56142c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp @@ -0,0 +1,438 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PoseWithCovarianceStamped_.idl + Source: PoseWithCovarianceStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP + +#include "unitree/idl/ros2/PoseWithCovariance_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class PoseWithCovarianceStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::PoseWithCovariance_ pose_; + +public: + PoseWithCovarianceStamped_() = default; + + explicit PoseWithCovarianceStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose) : + header_(header), + pose_(pose) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose() const { return this->pose_; } + ::geometry_msgs::msg::dds_::PoseWithCovariance_& pose() { return this->pose_; } + void pose(const ::geometry_msgs::msg::dds_::PoseWithCovariance_& _val_) { this->pose_ = _val_; } + void pose(::geometry_msgs::msg::dds_::PoseWithCovariance_&& _val_) { this->pose_ = _val_; } + + bool operator==(const PoseWithCovarianceStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + pose_ == _other.pose_; + } + + bool operator!=(const PoseWithCovarianceStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::PoseWithCovarianceStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::type_map_blob_sz() { return 1994; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::type_info_blob_sz() { return 388; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0x8f, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf1, 0x3d, 0xeb, 0xb5, 0x11, 0xcc, 0xa4, 0xdc, + 0x63, 0xf4, 0xba, 0x83, 0xde, 0x11, 0x70, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, + 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x2d, 0x5f, 0x8a, 0xe9, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0xb7, 0xb7, 0x26, 0xac, + 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, + 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x2d, 0x5f, 0x8a, + 0xe9, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x2f, + 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x00, 0x00, + 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, + 0xa1, 0xda, 0x16, 0x39, 0x42, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, + 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, + 0x29, 0x01, 0x86, 0x00, 0x58, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf2, 0x24, 0x77, 0x5a, + 0x9f, 0x85, 0xf9, 0x7b, 0x5b, 0xeb, 0x5a, 0x31, 0xb0, 0x0c, 0x05, 0x00, 0xa3, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x57, 0x69, + 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, + 0x70, 0x65, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, + 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, + 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, + 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, + 0x2a, 0x55, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, + 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, + 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, + 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, + 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, + 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, + 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x57, 0x69, + 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x00, 0x00, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, + 0x7d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, + 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, + 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, + 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, + 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0xd6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf2, 0x24, 0x77, 0x5a, 0x9f, 0x85, 0xf9, 0x7b, + 0x5b, 0xeb, 0x5a, 0x31, 0xb0, 0x0c, 0x05, 0xf1, 0x3d, 0xeb, 0xb5, 0x11, 0xcc, 0xa4, 0xdc, 0x63, + 0xf4, 0xba, 0x83, 0xde, 0x11, 0x70, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, + 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, + 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, + 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, + 0xf9, 0x8d, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, + 0x0c, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0xf1, + 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0xf2, 0x04, + 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xf2, 0x6f, 0x01, 0xea, + 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0x80, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0xb8, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x3d, 0xeb, 0xb5, 0x11, 0xcc, 0xa4, 0xdc, 0x63, 0xf4, 0xba, 0x83, + 0xde, 0x11, 0x70, 0x00, 0x55, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, + 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x00, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, + 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0xb8, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x24, 0x77, 0x5a, 0x9f, 0x85, 0xf9, 0x7b, 0x5b, 0xeb, 0x5a, 0x31, + 0xb0, 0x0c, 0x05, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, + 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCESTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovariance_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovariance_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..724ce6c9487660a6203d622388ce11386236d073 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/PoseWithCovariance_.hpp @@ -0,0 +1,388 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: PoseWithCovariance_.idl + Source: PoseWithCovariance_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP + +#include "unitree/idl/ros2/Pose_.hpp" + +#include + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class PoseWithCovariance_ +{ +private: + ::geometry_msgs::msg::dds_::Pose_ pose_; + std::array covariance_ = { }; + +public: + PoseWithCovariance_() = default; + + explicit PoseWithCovariance_( + const ::geometry_msgs::msg::dds_::Pose_& pose, + const std::array& covariance) : + pose_(pose), + covariance_(covariance) { } + + const ::geometry_msgs::msg::dds_::Pose_& pose() const { return this->pose_; } + ::geometry_msgs::msg::dds_::Pose_& pose() { return this->pose_; } + void pose(const ::geometry_msgs::msg::dds_::Pose_& _val_) { this->pose_ = _val_; } + void pose(::geometry_msgs::msg::dds_::Pose_&& _val_) { this->pose_ = _val_; } + const std::array& covariance() const { return this->covariance_; } + std::array& covariance() { return this->covariance_; } + void covariance(const std::array& _val_) { this->covariance_ = _val_; } + void covariance(std::array&& _val_) { this->covariance_ = _val_; } + + bool operator==(const PoseWithCovariance_& _other) const + { + (void) _other; + return pose_ == _other.pose_ && + covariance_ == _other.covariance_; + } + + bool operator!=(const PoseWithCovariance_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::PoseWithCovariance_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::type_map_blob_sz() { return 1180; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::type_map_blob() { + static const uint8_t blob[] = { + 0x8b, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, + 0x1d, 0xc5, 0x32, 0xa3, 0x3c, 0x52, 0xc9, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, + 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x2d, 0x5f, 0x8a, 0xe9, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, + 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x47, 0x57, 0xfe, + 0x07, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, + 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, + 0x42, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, + 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, + 0x88, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, + 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x99, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0d, + 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x24, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x63, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, + 0x34, 0xf3, 0x2f, 0x7d, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, + 0x94, 0xe7, 0x0c, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, 0x3c, + 0x52, 0xc9, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, + 0x7d, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, + 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0xf1, + 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, + 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xb7, 0xb7, 0x26, 0xac, 0x8e, 0x3d, 0x19, 0x1d, 0xc5, 0x32, 0xa3, + 0x3c, 0x52, 0xc9, 0x00, 0x52, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, + 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x19, 0x12, 0x04, + 0x8a, 0x82, 0xed, 0x6f, 0x0a, 0x49, 0x06, 0x5e, 0x94, 0xe7, 0x0c, 0x00, 0x9d, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, 0xf3, 0x2f, 0x7d, 0x00, + 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::PoseWithCovariance_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::PoseWithCovariance_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::PoseWithCovariance_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::PoseWithCovariance_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.pose(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::PoseWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::PoseWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POSEWITHCOVARIANCE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5a49edde2242ac5da65b494b92ccba8ad22bb365 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Pose_.hpp @@ -0,0 +1,351 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Pose_.idl + Source: Pose_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_POSE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_POSE__HPP + +#include "unitree/idl/ros2/Point_.hpp" + +#include "unitree/idl/ros2/Quaternion_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Pose_ +{ +private: + ::geometry_msgs::msg::dds_::Point_ position_; + ::geometry_msgs::msg::dds_::Quaternion_ orientation_; + +public: + Pose_() = default; + + explicit Pose_( + const ::geometry_msgs::msg::dds_::Point_& position, + const ::geometry_msgs::msg::dds_::Quaternion_& orientation) : + position_(position), + orientation_(orientation) { } + + const ::geometry_msgs::msg::dds_::Point_& position() const { return this->position_; } + ::geometry_msgs::msg::dds_::Point_& position() { return this->position_; } + void position(const ::geometry_msgs::msg::dds_::Point_& _val_) { this->position_ = _val_; } + void position(::geometry_msgs::msg::dds_::Point_&& _val_) { this->position_ = _val_; } + const ::geometry_msgs::msg::dds_::Quaternion_& orientation() const { return this->orientation_; } + ::geometry_msgs::msg::dds_::Quaternion_& orientation() { return this->orientation_; } + void orientation(const ::geometry_msgs::msg::dds_::Quaternion_& _val_) { this->orientation_ = _val_; } + void orientation(::geometry_msgs::msg::dds_::Quaternion_&& _val_) { this->orientation_ = _val_; } + + bool operator==(const Pose_& _other) const + { + (void) _other; + return position_ == _other.position_ && + orientation_ == _other.orientation_; + } + + bool operator!=(const Pose_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Pose_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Pose_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Pose_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Pose_>::type_map_blob_sz() { return 878; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Pose_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Pose_>::type_map_blob() { + static const uint8_t blob[] = { + 0x27, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, + 0x11, 0x90, 0x31, 0xc4, 0x88, 0x17, 0xeb, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, + 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0xda, 0x16, 0x39, 0x42, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, + 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, 0xdc, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, + 0xf3, 0x2f, 0x7d, 0x00, 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x50, 0x6f, 0x73, 0x65, 0x5f, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, + 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, + 0xf3, 0x2f, 0x7d, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, 0x88, + 0x17, 0xeb, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, + 0xdf, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, + 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Pose_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2f, 0x93, 0xf0, 0x5b, 0x8c, 0xef, 0xbe, 0x11, 0x90, 0x31, 0xc4, + 0x88, 0x17, 0xeb, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, + 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0d, 0x47, 0x26, 0x4b, 0x4a, 0x66, 0xfa, 0x94, 0xbb, 0xfe, 0x34, + 0xf3, 0x2f, 0x7d, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x04, 0xac, 0x28, 0xf9, 0x19, 0x64, 0x23, + 0x5d, 0xc9, 0x81, 0xe3, 0xf8, 0xfa, 0xdf, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Pose_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Pose_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Pose_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Pose_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Pose_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.position(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Pose_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Pose_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.position(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Pose_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Pose_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.position(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Pose_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Pose_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.position(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.orientation(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Pose_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Pose_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_POSE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/QuaternionStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/QuaternionStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2aff19190f9104e48f2022e3ecdafeb7abf683a1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/QuaternionStamped_.hpp @@ -0,0 +1,375 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: QuaternionStamped_.idl + Source: QuaternionStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP + +#include "unitree/idl/ros2/Quaternion_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class QuaternionStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Quaternion_ quaternion_; + +public: + QuaternionStamped_() = default; + + explicit QuaternionStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Quaternion_& quaternion) : + header_(header), + quaternion_(quaternion) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Quaternion_& quaternion() const { return this->quaternion_; } + ::geometry_msgs::msg::dds_::Quaternion_& quaternion() { return this->quaternion_; } + void quaternion(const ::geometry_msgs::msg::dds_::Quaternion_& _val_) { this->quaternion_ = _val_; } + void quaternion(::geometry_msgs::msg::dds_::Quaternion_&& _val_) { this->quaternion_ = _val_; } + + bool operator==(const QuaternionStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + quaternion_ == _other.quaternion_; + } + + bool operator!=(const QuaternionStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::QuaternionStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::type_map_blob_sz() { return 1132; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0x6f, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x48, 0xbf, 0x6a, 0x4a, 0x49, 0x9d, 0x11, + 0xb6, 0x78, 0xe7, 0xaa, 0xeb, 0xe0, 0xd8, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, + 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x75, 0xb9, 0xaa, 0xa0, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, + 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, + 0x29, 0x01, 0x86, 0x00, 0x74, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x08, 0x9d, 0x5a, + 0xed, 0x58, 0xa4, 0x0f, 0x87, 0xb3, 0x3b, 0xf3, 0x76, 0x5e, 0x82, 0x00, 0xa1, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, + 0x6e, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x5d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, + 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, + 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, + 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, + 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, + 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, + 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, + 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xf2, 0x08, 0x9d, 0x5a, 0xed, 0x58, 0xa4, 0x0f, 0x87, 0xb3, 0x3b, 0xf3, + 0x76, 0x5e, 0x82, 0xf1, 0x48, 0xbf, 0x6a, 0x4a, 0x49, 0x9d, 0x11, 0xb6, 0x78, 0xe7, 0xaa, 0xeb, + 0xe0, 0xd8, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, + 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x6f, + 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, + 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x48, 0xbf, 0x6a, 0x4a, 0x49, 0x9d, 0x11, 0xb6, 0x78, 0xe7, 0xaa, + 0xeb, 0xe0, 0xd8, 0x00, 0x55, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x08, 0x9d, 0x5a, + 0xed, 0x58, 0xa4, 0x0f, 0x87, 0xb3, 0x3b, 0xf3, 0x76, 0x5e, 0x82, 0x00, 0xa5, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, + 0x94, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::QuaternionStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::QuaternionStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::QuaternionStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::QuaternionStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.quaternion(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::QuaternionStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.quaternion(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::QuaternionStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.quaternion(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::QuaternionStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.quaternion(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::QuaternionStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::QuaternionStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_QUATERNIONSTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Quaternion_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Quaternion_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1ab2559bb5b4e9be82a065cbab0d369637db2e1f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Quaternion_.hpp @@ -0,0 +1,383 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Quaternion_.idl + Source: Quaternion_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP +#define DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Quaternion_ +{ +private: + double x_ = 0.0; + double y_ = 0.0; + double z_ = 0.0; + double w_ = 0.0; + +public: + Quaternion_() = default; + + explicit Quaternion_( + double x, + double y, + double z, + double w) : + x_(x), + y_(y), + z_(z), + w_(w) { } + + double x() const { return this->x_; } + double& x() { return this->x_; } + void x(double _val_) { this->x_ = _val_; } + double y() const { return this->y_; } + double& y() { return this->y_; } + void y(double _val_) { this->y_ = _val_; } + double z() const { return this->z_; } + double& z() { return this->z_; } + void z(double _val_) { this->z_ = _val_; } + double w() const { return this->w_; } + double& w() { return this->w_; } + void w(double _val_) { this->w_ = _val_; } + + bool operator==(const Quaternion_& _other) const + { + (void) _other; + return x_ == _other.x_ && + y_ == _other.y_ && + z_ == _other.z_ && + w_ == _other.w_; + } + + bool operator!=(const Quaternion_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Quaternion_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::type_map_blob_sz() { return 322; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::type_map_blob() { + static const uint8_t blob[] = { + 0x6b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, + 0x4b, 0x34, 0x86, 0x46, 0xa9, 0x62, 0xa1, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xf1, 0x29, 0x01, 0x86, 0x00, + 0xa8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, + 0x80, 0x58, 0xc3, 0xa8, 0xda, 0xe3, 0x52, 0x00, 0x90, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x51, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, + 0x5f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, + 0xda, 0xe3, 0x52, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, 0xa9, + 0x62, 0xa1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x2e, 0xd7, 0x30, 0x7b, 0x8e, 0xc5, 0x7c, 0x4b, 0x34, 0x86, 0x46, + 0xa9, 0x62, 0xa1, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x6f, 0x01, 0xea, 0x49, 0x00, 0xbc, 0x02, 0x80, 0x58, 0xc3, 0xa8, + 0xda, 0xe3, 0x52, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Quaternion_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Quaternion_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Quaternion_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Quaternion_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Quaternion_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.w())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Quaternion_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Quaternion_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Quaternion_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.w())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Quaternion_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Quaternion_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Quaternion_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.w())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Quaternion_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Quaternion_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Quaternion_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 3: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.w())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Quaternion_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Quaternion_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_QUATERNION__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/String_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/String_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b85ca7140d97caa95f783ac6500a687ee7f63f3f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/String_.hpp @@ -0,0 +1,266 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: String_.idl + Source: String_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_STRING__HPP +#define DDSCXX_UNITREE_IDL_ROS2_STRING__HPP + +#include + +namespace std_msgs +{ +namespace msg +{ +namespace dds_ +{ +class String_ +{ +private: + std::string data_; + +public: + String_() = default; + + explicit String_( + const std::string& data) : + data_(data) { } + + const std::string& data() const { return this->data_; } + std::string& data() { return this->data_; } + void data(const std::string& _val_) { this->data_ = _val_; } + void data(std::string&& _val_) { this->data_ = _val_; } + + bool operator==(const String_& _other) const + { + (void) _other; + return data_ == _other.data_; + } + + bool operator!=(const String_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::std_msgs::msg::dds_::String_>::getTypeName() +{ + return "std_msgs::msg::dds_::String_"; +} + +template <> constexpr bool TopicTraits<::std_msgs::msg::dds_::String_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::std_msgs::msg::dds_::String_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::std_msgs::msg::dds_::String_>::type_map_blob_sz() { return 210; } +template<> constexpr unsigned int TopicTraits<::std_msgs::msg::dds_::String_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::std_msgs::msg::dds_::String_>::type_map_blob() { + static const uint8_t blob[] = { + 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x59, 0x65, 0x6d, 0x08, 0x0a, 0xb9, 0x26, + 0xa3, 0x33, 0xa6, 0x9d, 0x26, 0x9c, 0xb1, 0x00, 0x24, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x8d, 0x77, 0x7f, 0x38, + 0x67, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc3, 0xda, 0x80, 0xd6, 0x38, 0xe9, 0x1b, + 0x9f, 0xad, 0x0a, 0x6b, 0x76, 0x5c, 0xc2, 0x00, 0x4f, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, + 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, + 0x3a, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc3, 0xda, 0x80, 0xd6, 0x38, 0xe9, 0x1b, 0x9f, 0xad, 0x0a, 0x6b, + 0x76, 0x5c, 0xc2, 0xf1, 0x59, 0x65, 0x6d, 0x08, 0x0a, 0xb9, 0x26, 0xa3, 0x33, 0xa6, 0x9d, 0x26, + 0x9c, 0xb1, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::std_msgs::msg::dds_::String_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x59, 0x65, 0x6d, 0x08, 0x0a, 0xb9, 0x26, 0xa3, 0x33, 0xa6, 0x9d, + 0x26, 0x9c, 0xb1, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc3, 0xda, 0x80, 0xd6, 0x38, 0xe9, 0x1b, 0x9f, 0xad, 0x0a, 0x6b, + 0x76, 0x5c, 0xc2, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::std_msgs::msg::dds_::String_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::std_msgs::msg::dds_::String_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::std_msgs::msg::dds_::String_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::std_msgs::msg::dds_::String_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::std_msgs::msg::dds_::String_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::std_msgs::msg::dds_::String_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::String_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::std_msgs::msg::dds_::String_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::std_msgs::msg::dds_::String_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::String_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::std_msgs::msg::dds_::String_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::std_msgs::msg::dds_::String_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::String_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::std_msgs::msg::dds_::String_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::std_msgs::msg::dds_::String_& instance, bool as_key) { + auto &props = get_type_props<::std_msgs::msg::dds_::String_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_STRING__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Time_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Time_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2489c5e9764c194e2d04391bca3c05c9c1c5dbae --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Time_.hpp @@ -0,0 +1,302 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Time_.idl + Source: Time_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_TIME__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TIME__HPP + +#include + +namespace builtin_interfaces +{ +namespace msg +{ +namespace dds_ +{ +class Time_ +{ +private: + int32_t sec_ = 0; + uint32_t nanosec_ = 0; + +public: + Time_() = default; + + explicit Time_( + int32_t sec, + uint32_t nanosec) : + sec_(sec), + nanosec_(nanosec) { } + + int32_t sec() const { return this->sec_; } + int32_t& sec() { return this->sec_; } + void sec(int32_t _val_) { this->sec_ = _val_; } + uint32_t nanosec() const { return this->nanosec_; } + uint32_t& nanosec() { return this->nanosec_; } + void nanosec(uint32_t _val_) { this->nanosec_ = _val_; } + + bool operator==(const Time_& _other) const + { + (void) _other; + return sec_ == _other.sec_ && + nanosec_ == _other.nanosec_; + } + + bool operator!=(const Time_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::builtin_interfaces::msg::dds_::Time_>::getTypeName() +{ + return "builtin_interfaces::msg::dds_::Time_"; +} + +template <> constexpr bool TopicTraits<::builtin_interfaces::msg::dds_::Time_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::builtin_interfaces::msg::dds_::Time_>::type_map_blob_sz() { return 262; } +template<> constexpr unsigned int TopicTraits<::builtin_interfaces::msg::dds_::Time_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::builtin_interfaces::msg::dds_::Time_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, + 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0x00, + 0x8a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, + 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::builtin_interfaces::msg::dds_::Time_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, + 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::builtin_interfaces::msg::dds_::Time_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::builtin_interfaces::msg::dds_::Time_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::builtin_interfaces::msg::dds_::Time_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::builtin_interfaces::msg::dds_::Time_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::builtin_interfaces::msg::dds_::Time_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::builtin_interfaces::msg::dds_::Time_& instance, bool as_key) { + auto &props = get_type_props<::builtin_interfaces::msg::dds_::Time_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::builtin_interfaces::msg::dds_::Time_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::builtin_interfaces::msg::dds_::Time_& instance, bool as_key) { + auto &props = get_type_props<::builtin_interfaces::msg::dds_::Time_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::builtin_interfaces::msg::dds_::Time_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::builtin_interfaces::msg::dds_::Time_& instance, bool as_key) { + auto &props = get_type_props<::builtin_interfaces::msg::dds_::Time_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::builtin_interfaces::msg::dds_::Time_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.sec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.nanosec())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::builtin_interfaces::msg::dds_::Time_& instance, bool as_key) { + auto &props = get_type_props<::builtin_interfaces::msg::dds_::Time_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_TIME__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3e351e5ba2a496b836ae255b7a6c2c6d434b5979 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistStamped_.hpp @@ -0,0 +1,394 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: TwistStamped_.idl + Source: TwistStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP + +#include "unitree/idl/ros2/Twist_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class TwistStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::Twist_ twist_; + +public: + TwistStamped_() = default; + + explicit TwistStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::Twist_& twist) : + header_(header), + twist_(twist) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::Twist_& twist() const { return this->twist_; } + ::geometry_msgs::msg::dds_::Twist_& twist() { return this->twist_; } + void twist(const ::geometry_msgs::msg::dds_::Twist_& _val_) { this->twist_ = _val_; } + void twist(::geometry_msgs::msg::dds_::Twist_&& _val_) { this->twist_ = _val_; } + + bool operator==(const TwistStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + twist_ == _other.twist_; + } + + bool operator!=(const TwistStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::TwistStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::type_map_blob_sz() { return 1378; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::type_info_blob_sz() { return 292; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0xc3, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf1, 0x73, 0xe5, 0x49, 0xa3, 0xc7, 0xc7, 0x09, + 0x40, 0xe3, 0xe7, 0xba, 0xfb, 0x9f, 0x5d, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, + 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xeb, 0x3b, 0xac, 0x16, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x28, 0xcf, 0x21, 0x56, + 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x9a, 0x93, 0x2b, + 0x3c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xd1, 0x8b, 0x86, + 0x24, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0xf2, 0x47, 0x67, 0x84, 0x3d, 0x44, 0x90, 0x86, 0x2d, 0xa2, 0x41, 0xbe, 0x2e, 0x36, 0xde, 0x00, + 0x94, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x5f, 0x00, 0x58, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xe5, + 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, + 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x74, 0x77, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7b, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x74, 0x64, 0x5f, + 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, + 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xd4, + 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, + 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x3a, + 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x66, + 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x00, 0x00, + 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, + 0x69, 0x73, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, + 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf2, 0x47, 0x67, 0x84, + 0x3d, 0x44, 0x90, 0x86, 0x2d, 0xa2, 0x41, 0xbe, 0x2e, 0x36, 0xde, 0xf1, 0x73, 0xe5, 0x49, 0xa3, + 0xc7, 0xc7, 0x09, 0x40, 0xe3, 0xe7, 0xba, 0xfb, 0x9f, 0x5d, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, + 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, + 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, + 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, + 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, + 0x3c, 0xfb, 0x2b, 0x52, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, + 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, + 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0x20, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x73, 0xe5, 0x49, 0xa3, 0xc7, 0xc7, 0x09, 0x40, 0xe3, 0xe7, 0xba, + 0xfb, 0x9f, 0x5d, 0x00, 0x55, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, + 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x47, 0x67, 0x84, 0x3d, 0x44, 0x90, 0x86, 0x2d, 0xa2, 0x41, 0xbe, + 0x2e, 0x36, 0xde, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, + 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, + 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, + 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::TwistStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::TwistStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::TwistStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::TwistStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::TwistStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::TwistStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::TwistStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTSTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a1b13845de886d42ee7549376e102c25579a14f3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp @@ -0,0 +1,417 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: TwistWithCovarianceStamped_.idl + Source: TwistWithCovarianceStamped_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP + +#include "unitree/idl/ros2/TwistWithCovariance_.hpp" + +#include "unitree/idl/ros2/Header_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class TwistWithCovarianceStamped_ +{ +private: + ::std_msgs::msg::dds_::Header_ header_; + ::geometry_msgs::msg::dds_::TwistWithCovariance_ twist_; + +public: + TwistWithCovarianceStamped_() = default; + + explicit TwistWithCovarianceStamped_( + const ::std_msgs::msg::dds_::Header_& header, + const ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist) : + header_(header), + twist_(twist) { } + + const ::std_msgs::msg::dds_::Header_& header() const { return this->header_; } + ::std_msgs::msg::dds_::Header_& header() { return this->header_; } + void header(const ::std_msgs::msg::dds_::Header_& _val_) { this->header_ = _val_; } + void header(::std_msgs::msg::dds_::Header_&& _val_) { this->header_ = _val_; } + const ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist() const { return this->twist_; } + ::geometry_msgs::msg::dds_::TwistWithCovariance_& twist() { return this->twist_; } + void twist(const ::geometry_msgs::msg::dds_::TwistWithCovariance_& _val_) { this->twist_ = _val_; } + void twist(::geometry_msgs::msg::dds_::TwistWithCovariance_&& _val_) { this->twist_ = _val_; } + + bool operator==(const TwistWithCovarianceStamped_& _other) const + { + (void) _other; + return header_ == _other.header_ && + twist_ == _other.twist_; + } + + bool operator!=(const TwistWithCovarianceStamped_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::TwistWithCovarianceStamped_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::type_map_blob_sz() { return 1696; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::type_info_blob_sz() { return 340; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::type_map_blob() { + static const uint8_t blob[] = { + 0x27, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf1, 0x6b, 0x99, 0xff, 0x52, 0x31, 0x98, 0x5f, + 0xa5, 0x4d, 0x78, 0x46, 0x89, 0xff, 0xf4, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, + 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, + 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0xeb, 0x3b, 0xac, 0x16, 0xf1, 0xdc, 0xf1, + 0x2c, 0xd2, 0xdd, 0x5e, 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x44, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x56, + 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x96, 0xb8, 0xc7, + 0x8d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x4b, 0xb3, 0x9c, 0x5c, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, + 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0xf1, 0x40, 0xaa, 0x70, 0xe1, + 0xf7, 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x28, + 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xeb, 0x3b, 0xac, + 0x16, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x28, + 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x00, 0x00, + 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0x9a, 0x93, 0x2b, 0x3c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, + 0xbc, 0xd1, 0x8b, 0x86, 0x24, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, + 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0xb4, 0x03, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0xf2, 0x4d, 0x3f, 0xc8, 0x81, 0x9c, 0xdd, 0x5f, 0x9e, 0x68, 0x92, 0x3d, + 0xe6, 0x2d, 0xf3, 0x00, 0xa4, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x3e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x54, 0x77, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x65, 0x64, 0x5f, 0x00, 0x00, 0x00, + 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, + 0x55, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xf5, + 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x74, 0x77, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0xf2, 0xe5, 0x76, 0x5e, + 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, 0x7b, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, + 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, + 0x0d, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, + 0xae, 0xf3, 0x2d, 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, + 0x69, 0x6d, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, + 0x00, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, + 0x15, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x54, 0x77, 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, + 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x74, 0x77, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, + 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, + 0x92, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, + 0x69, 0x73, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, + 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf2, 0x4d, 0x3f, 0xc8, + 0x81, 0x9c, 0xdd, 0x5f, 0x9e, 0x68, 0x92, 0x3d, 0xe6, 0x2d, 0xf3, 0xf1, 0x6b, 0x99, 0xff, 0x52, + 0x31, 0x98, 0x5f, 0xa5, 0x4d, 0x78, 0x46, 0x89, 0xff, 0xf4, 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, + 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, + 0x71, 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, + 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, + 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, 0x66, 0x8e, 0xcd, + 0x3e, 0x4a, 0x4b, 0xa6, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, + 0x17, 0x6d, 0x6f, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, + 0x2b, 0x52, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, + 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, +}; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::type_info_blob() { + static const uint8_t blob[] = { + 0x50, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x6b, 0x99, 0xff, 0x52, 0x31, 0x98, 0x5f, 0xa5, 0x4d, 0x78, 0x46, + 0x89, 0xff, 0xf4, 0x00, 0x55, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xdc, 0xf1, 0x2c, 0xd2, 0xdd, 0x5e, 0x71, + 0x2c, 0xb7, 0xb1, 0xe5, 0x1f, 0xa3, 0xf2, 0x00, 0x48, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, + 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0x00, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, + 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0xa0, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x4d, 0x3f, 0xc8, + 0x81, 0x9c, 0xdd, 0x5f, 0x9e, 0x68, 0x92, 0x3d, 0xe6, 0x2d, 0xf3, 0x00, 0xa8, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xe5, 0x76, 0x5e, 0xc4, 0x8c, 0xff, 0xd4, 0x19, 0xed, 0x7f, 0xe8, 0x4e, 0x2a, 0x55, 0x00, + 0x7f, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd4, 0x85, 0x4f, 0x13, 0xae, 0xf3, 0x2d, + 0xfe, 0x21, 0x57, 0xf3, 0xe6, 0x32, 0x0d, 0x00, 0x76, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0x00, + 0x9d, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, + 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovarianceStamped_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCESTAMPED__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovariance_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovariance_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..35660f9a5890e2e61c1f4b26c951cb4662109dfd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/TwistWithCovariance_.hpp @@ -0,0 +1,367 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: TwistWithCovariance_.idl + Source: TwistWithCovariance_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP + +#include "unitree/idl/ros2/Twist_.hpp" + +#include + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class TwistWithCovariance_ +{ +private: + ::geometry_msgs::msg::dds_::Twist_ twist_; + std::array covariance_ = { }; + +public: + TwistWithCovariance_() = default; + + explicit TwistWithCovariance_( + const ::geometry_msgs::msg::dds_::Twist_& twist, + const std::array& covariance) : + twist_(twist), + covariance_(covariance) { } + + const ::geometry_msgs::msg::dds_::Twist_& twist() const { return this->twist_; } + ::geometry_msgs::msg::dds_::Twist_& twist() { return this->twist_; } + void twist(const ::geometry_msgs::msg::dds_::Twist_& _val_) { this->twist_ = _val_; } + void twist(::geometry_msgs::msg::dds_::Twist_&& _val_) { this->twist_ = _val_; } + const std::array& covariance() const { return this->covariance_; } + std::array& covariance() { return this->covariance_; } + void covariance(const std::array& _val_) { this->covariance_ = _val_; } + void covariance(std::array&& _val_) { this->covariance_ = _val_; } + + bool operator==(const TwistWithCovariance_& _other) const + { + (void) _other; + return twist_ == _other.twist_ && + covariance_ == _other.covariance_; + } + + bool operator!=(const TwistWithCovariance_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::TwistWithCovariance_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::type_map_blob_sz() { return 882; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::type_map_blob() { + static const uint8_t blob[] = { + 0x23, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, + 0x66, 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, + 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xeb, 0x3b, 0xac, 0x16, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0xac, 0xdb, 0x06, 0x55, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, + 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x9a, 0x93, 0x2b, + 0x3c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, + 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xd1, 0x8b, 0x86, + 0x24, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, + 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, 0xe4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0x00, + 0x99, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2f, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, + 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, + 0x69, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, + 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x74, 0x77, 0x69, 0x73, + 0x74, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x63, 0x6f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, + 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x92, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, 0x69, 0x73, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, + 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x00, + 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, + 0x32, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, + 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, + 0x6d, 0x7b, 0xe3, 0xa4, 0x7b, 0x7e, 0x15, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, 0x66, + 0x8e, 0xcd, 0x3e, 0x4a, 0x4b, 0xa6, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, + 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, + 0x3c, 0xfb, 0x2b, 0x52, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, + 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, + 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x40, 0xaa, 0x70, 0xe1, 0xf7, 0x44, 0x45, 0x66, 0x8e, 0xcd, 0x3e, + 0x4a, 0x4b, 0xa6, 0x00, 0x52, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, + 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, + 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf5, 0xc6, 0x39, 0xf6, 0x33, 0xf1, 0x5a, 0x6d, 0x7b, 0xe3, 0xa4, + 0x7b, 0x7e, 0x15, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, + 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x96, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::TwistWithCovariance_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::TwistWithCovariance_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::TwistWithCovariance_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::TwistWithCovariance_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!write(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!read(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!move(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.twist(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(true, true)) + return false; + if (!max(streamer, instance.covariance()[0], instance.covariance().size())) + return false; + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::TwistWithCovariance_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::TwistWithCovariance_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_TWISTWITHCOVARIANCE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Twist_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Twist_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5d63f3c296bb019444e29c64d6889c05c4812298 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Twist_.hpp @@ -0,0 +1,328 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Twist_.idl + Source: Twist_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP +#define DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP + +#include "unitree/idl/ros2/Vector3_.hpp" + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Twist_ +{ +private: + ::geometry_msgs::msg::dds_::Vector3_ linear_; + ::geometry_msgs::msg::dds_::Vector3_ angular_; + +public: + Twist_() = default; + + explicit Twist_( + const ::geometry_msgs::msg::dds_::Vector3_& linear, + const ::geometry_msgs::msg::dds_::Vector3_& angular) : + linear_(linear), + angular_(angular) { } + + const ::geometry_msgs::msg::dds_::Vector3_& linear() const { return this->linear_; } + ::geometry_msgs::msg::dds_::Vector3_& linear() { return this->linear_; } + void linear(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->linear_ = _val_; } + void linear(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->linear_ = _val_; } + const ::geometry_msgs::msg::dds_::Vector3_& angular() const { return this->angular_; } + ::geometry_msgs::msg::dds_::Vector3_& angular() { return this->angular_; } + void angular(const ::geometry_msgs::msg::dds_::Vector3_& _val_) { this->angular_ = _val_; } + void angular(::geometry_msgs::msg::dds_::Vector3_&& _val_) { this->angular_ = _val_; } + + bool operator==(const Twist_& _other) const + { + (void) _other; + return linear_ == _other.linear_ && + angular_ == _other.angular_; + } + + bool operator!=(const Twist_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Twist_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Twist_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Twist_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Twist_>::type_map_blob_sz() { return 580; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Twist_>::type_info_blob_sz() { return 148; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Twist_>::type_map_blob() { + static const uint8_t blob[] = { + 0xbf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, + 0x84, 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x9a, 0x93, 0x2b, 0x3c, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, + 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0xd1, 0x8b, 0x86, 0x24, 0xf1, 0x5e, 0x73, + 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x43, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, + 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, + 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, + 0xad, 0xe9, 0xe3, 0x00, 0x38, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, + 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x92, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, + 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x54, 0x77, 0x69, 0x73, 0x74, 0x5f, + 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, + 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x00, + 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, + 0x32, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, + 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, 0x2b, 0xd5, 0x53, 0x1f, + 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, + 0x6f, 0x1b, 0x3c, 0xfb, 0x2b, 0x52, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, + 0xda, 0xb3, 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, + 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Twist_>::type_info_blob() { + static const uint8_t blob[] = { + 0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0x21, 0x56, 0x4e, 0xbe, 0xe5, 0x84, 0x6f, 0x1b, 0x3c, + 0xfb, 0x2b, 0x52, 0x00, 0x55, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x66, 0x9d, 0xb6, + 0x2b, 0xd5, 0x53, 0x1f, 0x0b, 0xe5, 0x2c, 0x2a, 0x17, 0x6d, 0x6f, 0x00, 0x96, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, + 0x7c, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Twist_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Twist_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Twist_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Twist_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Twist_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.linear(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.angular(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Twist_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Twist_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Twist_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.linear(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.angular(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Twist_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Twist_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Twist_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.linear(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.angular(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Twist_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Twist_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Twist_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.linear(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.angular(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Twist_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Twist_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_TWIST__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Vector3_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Vector3_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d4f6633d339c4e173f84c11062ca913eb9d068ee --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/idl/ros2/Vector3_.hpp @@ -0,0 +1,341 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Vector3_.idl + Source: Vector3_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP +#define DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP + + +namespace geometry_msgs +{ +namespace msg +{ +namespace dds_ +{ +class Vector3_ +{ +private: + double x_ = 0.0; + double y_ = 0.0; + double z_ = 0.0; + +public: + Vector3_() = default; + + explicit Vector3_( + double x, + double y, + double z) : + x_(x), + y_(y), + z_(z) { } + + double x() const { return this->x_; } + double& x() { return this->x_; } + void x(double _val_) { this->x_ = _val_; } + double y() const { return this->y_; } + double& y() { return this->y_; } + void y(double _val_) { this->y_ = _val_; } + double z() const { return this->z_; } + double& z() { return this->z_; } + void z(double _val_) { this->z_ = _val_; } + + bool operator==(const Vector3_& _other) const + { + (void) _other; + return x_ == _other.x_ && + y_ == _other.y_ && + z_ == _other.z_; + } + + bool operator!=(const Vector3_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::getTypeName() +{ + return "geometry_msgs::msg::dds_::Vector3_"; +} + +template <> constexpr bool TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::type_map_blob_sz() { return 282; } +template<> constexpr unsigned int TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::type_map_blob() { + static const uint8_t blob[] = { + 0x5b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, + 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, 0x00, 0x43, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x9d, 0xd4, 0xe4, 0x61, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x41, 0x52, 0x90, 0x76, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfb, 0xad, 0xe9, 0xe3, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, + 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0x00, 0x78, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x67, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, + 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x5f, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x7a, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, + 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, 0x78, 0xfd, 0x32, 0xf1, 0x5e, 0x73, 0x97, 0xe7, + 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, 0xcd, 0x4c, 0xbc, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5e, 0x73, 0x97, 0xe7, 0xe8, 0x64, 0x40, 0xdf, 0x64, 0xaf, 0x76, + 0xcd, 0x4c, 0xbc, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xac, 0xe2, 0x5e, 0x59, 0xb0, 0x1a, 0x7a, 0x3a, 0x5c, 0xda, 0xb3, + 0x78, 0xfd, 0x32, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::geometry_msgs::msg::dds_::Vector3_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::geometry_msgs::msg::dds_::Vector3_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::geometry_msgs::msg::dds_::Vector3_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::geometry_msgs::msg::dds_::Vector3_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::geometry_msgs::msg::dds_::Vector3_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::geometry_msgs::msg::dds_::Vector3_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Vector3_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::geometry_msgs::msg::dds_::Vector3_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::geometry_msgs::msg::dds_::Vector3_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Vector3_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::geometry_msgs::msg::dds_::Vector3_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::geometry_msgs::msg::dds_::Vector3_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Vector3_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::geometry_msgs::msg::dds_::Vector3_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.x())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.y())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.z())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::geometry_msgs::msg::dds_::Vector3_& instance, bool as_key) { + auto &props = get_type_props<::geometry_msgs::msg::dds_::Vector3_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_UNITREE_IDL_ROS2_VECTOR3__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b711188cf6b16c79d9c8652df666ddbd630a46c3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_api.hpp @@ -0,0 +1,24 @@ +#ifndef __UT_ROBOT_B2_BACK_VIDEO_API_HPP__ +#define __UT_ROBOT_B2_BACK_VIDEO_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/*service name*/ +const std::string ROBOT_BACK_VIDEO_SERVICE_NAME = "back_videohub"; + +/*api version*/ +const std::string ROBOT_BACK_VIDEO_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_BACK_VIDEO_API_ID_GETIMAGESAMPLE = 1001; +} +} +} + +#endif //__UT_ROBOT_B2_BACK_VIDEO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c1664b4705841ca341eabded79ccb23e4110dc76 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_client.hpp @@ -0,0 +1,34 @@ +#ifndef __UT_ROBOT_B2_BACK_VIDEO_CLIENT_HPP__ +#define __UT_ROBOT_B2_BACK_VIDEO_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * BackVideoClient + */ +class BackVideoClient : public Client +{ +public: + explicit BackVideoClient(); + ~BackVideoClient(); + + void Init(); + + /* + * @brief GetImageSample + * @api: 1001 + */ + int32_t GetImageSample(std::vector&); + +}; +} +} +} + +#endif//__UT_ROBOT_B2_BACK_VIDEO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..12a071dd6d26ed84019e929759d4ce6b9a1a623c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/back_video/back_video_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_B2_BACK_VIDEO_ERROR_HPP__ +#define __UT_ROBOT_B2_BACK_VIDEO_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ + UT_DECL_ERR(UT_ROBOT_BACK_VIDEO_ERR_COMM, 100, "Invalid parameter") +} +} +} + +#endif//__UT_ROBOT_B2_BACK_VIDEO_ERROR_HPP__ \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3e5f5e54dbca94d473a5672c090b90b34bfbb53a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_api.hpp @@ -0,0 +1,210 @@ +#ifndef __UT_ROBOT_B2_CONFIG_API_HPP__ +#define __UT_ROBOT_B2_CONFIG_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * service name + */ +const std::string CONFIG_SERVICE_NAME = "config"; + +/* + * api version + */ +const std::string CONFIG_API_VERSION = "1.0.0.1"; + +/* + * api id + */ +const int32_t CONFIG_API_ID_SET = 1001; +const int32_t CONFIG_API_ID_GET = 1002; +const int32_t CONFIG_API_ID_DEL = 1003; +const int32_t CONFIG_API_ID_META = 1004; + +/* + * data type + */ +class JsonizeConfigMeta : public common::Jsonize +{ +public: + JsonizeConfigMeta() + {} + + ~JsonizeConfigMeta() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["lastModified"], lastModified); + common::FromJson(json["size"], size); + common::FromJson(json["epoch"], epoch); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(lastModified, json["lastModified"]); + common::ToJson(size, json["size"]); + common::ToJson(epoch, json["epoch"]); + } + +public: + std::string name; + std::string lastModified; + int32_t size; + int32_t epoch; +}; + +class ConfigSetParameter : public common::Jsonize +{ +public: + ConfigSetParameter() + {} + + ~ConfigSetParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["content"], content); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(content, json["content"]); + } + +public: + std::string name; + std::string content; +}; + +class ConfigGetParameter : public common::Jsonize +{ +public: + ConfigGetParameter() + {} + + ~ConfigGetParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigGetData : public common::Jsonize +{ +public: + ConfigGetData() + {} + + ~ConfigGetData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["content"], content); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(content, json["content"]); + } + +public: + std::string content; +}; + +class ConfigDelParameter : public common::Jsonize +{ +public: + ConfigDelParameter() + {} + + ~ConfigDelParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigMetaParameter : public common::Jsonize +{ +public: + ConfigMetaParameter() + {} + + ~ConfigMetaParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigMetaData : public common::Jsonize +{ +public: + ConfigMetaData() + {} + + ~ConfigMetaData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["meta"], meta); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(meta, json["meta"]); + } + +public: + JsonizeConfigMeta meta; +}; + +} +} +} + +#endif//__UT_ROBOT_B2_CONFIG_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a089818c4ad759db6942b1e1f24e47c0fb2cb63f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_client.hpp @@ -0,0 +1,68 @@ +#ifndef __UT_ROBOT_B2_CONFIG_CLIENT_HPP__ +#define __UT_ROBOT_B2_CONFIG_CLIENT_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * @brief ConfigMeta + */ +class ConfigMeta +{ +public: + ConfigMeta() : size(-1), epoch(-1) + {} + ~ConfigMeta() + {} + +public: + std::string name; + std::string lastModified; + int32_t size; + int32_t epoch; +}; + +/* + * @brief ConfigClient + */ + +using ConfigChangeStatusCallback = std::function; + +class ConfigClient : public Client +{ +public: + explicit ConfigClient(); + ~ConfigClient(); + + void Init(); + + int32_t Set(const std::string& name, const std::string& content); + int32_t Get(const std::string& name, std::string& content); + int32_t Del(const std::string& name); + int32_t Meta(const std::string& name, ConfigMeta& meta); + int32_t Meta(const std::string& name, std::string& meta); + + void SubscribeChangeStatus(const std::string& name, const ConfigChangeStatusCallback& callback); + +private: + void ChangeStatusMessageHandler(const void* message); + +private: + unitree::common::Mutex mLock; + std::map mNameCallbackMap; + ChannelSubscriberPtr mSubscriberPtr; +}; + +} +} +} + +#endif//__UT_ROBOT_B2_CONFIG_CLIENT_HPP__ + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3f0e19e4996abb098c1a484425322faf342113a4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/config/config_error.hpp @@ -0,0 +1,29 @@ +#ifndef __UT_ROBOT_B2_CONFIG_ERROR_HPP__ +#define __UT_ROBOT_B2_CONFIG_ERROR_HPP__ + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +UT_DECL_ERR(UT_CONFIG_ERR_PARAMETER, 8201, "parameter error.") +UT_DECL_ERR(UT_CONFIG_ERR_NOT_FOUND, 8202, "config name is not found.") +UT_DECL_ERR(UT_CONFIG_ERR_NAME, 8203, "name is invalid.") +UT_DECL_ERR(UT_CONFIG_ERR_LIMITED, 8204, "name/content length limited.") +UT_DECL_ERR(UT_CONFIG_ERR_LOCK, 8205, "lock error.") +UT_DECL_ERR(UT_CONFIG_ERR_LOAD_META, 8206, "load meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_SAVE_META, 8207, "save meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_TEMP_META, 8208, "save meta temp error.") +UT_DECL_ERR(UT_CONFIG_ERR_FORMAL_META, 8209, "formalize meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_REMOVE_META, 8210, "remove meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_LOAD_DATA, 8211, "load data error.") +UT_DECL_ERR(UT_CONFIG_ERR_SAVE_DATA, 8212, "save data error.") +UT_DECL_ERR(UT_CONFIG_ERR_TEMP_DATA, 8213, "save data temp error.") +UT_DECL_ERR(UT_CONFIG_ERR_FORMAL_DATA, 8214, "formalize data error.") +UT_DECL_ERR(UT_CONFIG_ERR_REMOVE_DATA, 8215, "remove data error.") +} +} +} + +#endif//__UT_ROBOT_B2_CONFIG_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..49c6b1243dd66e01d0a2ddfa4941c32d3bca9641 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_api.hpp @@ -0,0 +1,24 @@ +#ifndef __UT_ROBOT_B2_FRONT_VIDEO_API_HPP__ +#define __UT_ROBOT_B2_FRONT_VIDEO_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/*service name*/ +const std::string ROBOT_FRONT_VIDEO_SERVICE_NAME = "front_videohub"; + +/*api version*/ +const std::string ROBOT_FRONT_VIDEO_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_FRONT_VIDEO_API_ID_GETIMAGESAMPLE = 1001; +} +} +} + +#endif //__UT_ROBOT_B2_FRONT_VIDEO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..145499050a513407f12018bcba07b0f2d9aa7c62 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_client.hpp @@ -0,0 +1,34 @@ +#ifndef __UT_ROBOT_B2_FRONT_VIDEO_CLIENT_HPP__ +#define __UT_ROBOT_B2_FRONT_VIDEO_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * FrontVideoClient + */ +class FrontVideoClient : public Client +{ +public: + explicit FrontVideoClient(); + ~FrontVideoClient(); + + void Init(); + + /* + * @brief GetImageSample + * @api: 1001 + */ + int32_t GetImageSample(std::vector&); + +}; +} +} +} + +#endif//__UT_ROBOT_B2_FRONT_VIDEO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..54d7940f51eae333ca0787e017c98e021b3409d7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/front_video/front_video_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_B2_FRONT_VIDEO_ERROR_HPP__ +#define __UT_ROBOT_B2_FRONT_VIDEO_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ + UT_DECL_ERR(UT_ROBOT_FRONT_VIDEO_ERR_COMM, 100, "Invalid parameter") +} +} +} + +#endif//__UT_ROBOT_B2_FRONT_VIDEO_ERROR_HPP__ \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..79ee5e3c7766be5a48ec6ce9e1b5de3f8b8960b4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp @@ -0,0 +1,99 @@ +#ifndef __UT_ROBOT_B2_MOTION_SWITCHER_API_HPP__ +#define __UT_ROBOT_B2_MOTION_SWITCHER_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * service name + */ +const std::string MOTION_SWITCHER_SERVICE_NAME = "motion_switcher"; + +/* + * api version + */ +const std::string MOTION_SWITCHER_API_VERSION = "1.0.0.1"; + +/* + * api id + */ +const int32_t MOTION_SWITCHER_API_ID_CHECK_MODE = 1001; +const int32_t MOTION_SWITCHER_API_ID_SELECT_MODE = 1002; +const int32_t MOTION_SWITCHER_API_ID_RELEASE_MODE = 1003; +const int32_t MOTION_SWITCHER_API_ID_SET_SILENT = 1004; +const int32_t MOTION_SWITCHER_API_ID_GET_SILENT = 1005; + +/* + * api data type + */ +class JsonizeModeName : public common::Jsonize +{ +public: + JsonizeModeName() + {} + + ~JsonizeModeName() + {} + + /*override*/ + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + + if (json.find("form") != json.end()) + { + common::FromJson(json["form"], form); + } + } + + /*override*/ + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + + if (!form.empty()) + { + common::ToJson(form, json["form"]); + } + } + +public: + std::string name; + std::string form; +}; + +class JsonizeSilent : public common::Jsonize +{ +public: + JsonizeSilent() : silent(false) + {} + + ~JsonizeSilent() + {} + + /*override*/ + void fromJson(common::JsonMap& json) + { + common::FromJson(json["silent"], silent); + } + + /*override*/ + void toJson(common::JsonMap& json) const + { + common::ToJson(silent, json["silent"]); + } + +public: + bool silent; +}; + +} +} +} + +#endif//__UT_ROBOT_B2_MOTION_SWITCHER_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0659a5bb8f0995fff439ce3c3c3fd0bf74ba9f8a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp @@ -0,0 +1,35 @@ +#ifndef __UT_ROBOT_B2_MOTION_SWITCHER_CLIENT_HPP__ +#define __UT_ROBOT_B2_MOTION_SWITCHER_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * @brief MotionSwitcherClient + */ +class MotionSwitcherClient : public Client +{ +public: + explicit MotionSwitcherClient(); + ~MotionSwitcherClient(); + + void Init(); + + int32_t CheckMode(std::string& form, std::string& name); + int32_t SelectMode(const std::string& nameOrAlias); + int32_t ReleaseMode(); + int32_t SetSilent(bool silent); + int32_t GetSilent(bool& silent); +}; + +} +} +} + +#endif//__UT_ROBOT_B2_MOTION_SWITCHER_CLIENT_HPP__ + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bb0c9e595e1f0f896626604d074a220e582600d5 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp @@ -0,0 +1,25 @@ +#ifndef __UT_ROBOT_B2_MOTION_SWITCHER_ERROR_HPP__ +#define __UT_ROBOT_B2_MOTION_SWITCHER_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ + UT_DECL_ERR(UT_SWITCH_ERR_PARAMETR, 7001, "parameter is invalid.") + UT_DECL_ERR(UT_SWITCH_ERR_BUSY, 7002, "switcher is busy.") + UT_DECL_ERR(UT_SWITCH_ERR_EVENT, 7003, "event is invalid.") + UT_DECL_ERR(UT_SWITCH_ERR_NAME, 7004, "name or alias is invalid.") + UT_DECL_ERR(UT_SWITCH_ERR_CMD, 7005, "name or alias is invalid.") + UT_DECL_ERR(UT_SWITCH_ERR_EXEC_CHECK, 7006, "check cmd execute error.") + UT_DECL_ERR(UT_SWITCH_ERR_EXEC_SELECT, 7007, "select cmd execute error.") + UT_DECL_ERR(UT_SWITCH_ERR_EXEC_RELEASE, 7008, "release cmd execute error.") + UT_DECL_ERR(UT_SWITCH_ERR_CUSTOMIZE, 7009, "save customize data error.") +} +} +} + +#endif//__UT_ROBOT_B2_MOTION_SWITCHER_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9b742a3cad1523d04105744b71a2d913f34deac4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_api.hpp @@ -0,0 +1,206 @@ +#ifndef __UT_ROBOT_B2_ROBOT_STATE_API_HPP__ +#define __UT_ROBOT_B2_ROBOT_STATE_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * service name + */ +const std::string ROBOT_STATE_SERVICE_NAME = "robot_state"; + +/* + * api version + */ +const std::string ROBOT_STATE_API_VERSION = "1.0.0.2"; + +/* + * api id + */ +const int32_t ROBOT_STATE_API_ID_SERVICE_SWITCH = 1001; +const int32_t ROBOT_STATE_API_ID_SET_REPORT_FREQ = 1002; +const int32_t ROBOT_STATE_API_ID_SERVICE_LIST = 1003; +const int32_t ROBOT_STATE_API_ID_LOWPOWER_SWITCH = 1004; +const int32_t ROBOT_STATE_API_ID_LOWPOWER_STATUS = 1005; + +/* + * request parameter for 1001 + */ +class ServiceSwitchParameter : public common::Jsonize +{ +public: + ServiceSwitchParameter() : swit(0) + {} + + ~ServiceSwitchParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["switch"], swit); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(swit, json["switch"]); + } + +public: + std::string name; + int32_t swit; +}; + +/* + * response data for 1001 + */ +class ServiceSwitchData : public common::Jsonize +{ +public: + ServiceSwitchData() : status(0) + {} + + ~ServiceSwitchData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["status"], status); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(status, json["status"]); + } + +public: + std::string name; + int32_t status; +}; + +/* + * request parameter for 1002 + */ +class SetReportFreqParameter : public common::Jsonize +{ +public: + SetReportFreqParameter() + {} + + ~SetReportFreqParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["interval"], interval); + common::FromJson(json["duration"], duration); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(interval, json["interval"]); + common::ToJson(duration, json["duration"]); + } + +public: + int32_t interval; + int32_t duration; +}; + +/* + * request data for 1003 + */ +class ServiceStateData : public common::Jsonize +{ +public: + ServiceStateData() + {} + + ~ServiceStateData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["status"], status); + common::FromJson(json["protect"], protect); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(status, json["status"]); + common::ToJson(protect, json["protect"]); + } + +public: + std::string name; + int32_t status; + int32_t protect; +}; + +/* + * request parameter for 1004 + */ +class LowPowerSwitchParameter : public common::Jsonize +{ +public: + LowPowerSwitchParameter() : swit(0) + {} + + ~LowPowerSwitchParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["switch"], swit); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(swit, json["switch"]); + } + +public: + int32_t swit; +}; + +/* + * response data for 1004 + */ +class LowPowerStatusData : public common::Jsonize +{ +public: + LowPowerStatusData() : status(0) + {} + + ~LowPowerStatusData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["status"], status); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(status, json["status"]); + } + +public: + int32_t status; +}; + +} +} +} + +#endif//__UT_ROBOT_B2_ROBOT_STATE_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5f1374163a0bfde8d6ed3ed50021a9fa0c9141ce --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_client.hpp @@ -0,0 +1,49 @@ +#ifndef __UT_ROBOT_B2_ROBOT_STATE_CLIENT_HPP__ +#define __UT_ROBOT_B2_ROBOT_STATE_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * @brief ServiceState + */ +class ServiceState +{ +public: + ServiceState() : status(0), protect(0) + {} + + std::string name; + int32_t status; + int32_t protect; +}; + +/* + * @brief RobotStateClient + */ +class RobotStateClient : public Client +{ +public: + explicit RobotStateClient(); + ~RobotStateClient(); + + void Init(); + + int32_t ServiceList(std::vector& serviceStateList); + int32_t ServiceSwitch(const std::string& name, int32_t swit, int32_t& status); + int32_t SetReportFreq(int32_t interval, int32_t duration); + int32_t LowPowerSwitch(int32_t swit); + int32_t LowPowerStatus(int32_t& status); +}; + +} +} +} + +#endif//__UT_ROBOT_B2_ROBOT_STATE_CLIENT_HPP__ + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..53b6fb4e096a54d084c2f48abdc240d4ebd8e897 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/robot_state/robot_state_error.hpp @@ -0,0 +1,20 @@ +#ifndef __UT_ROBOT_B2_ROBOT_STATE_CLIENT_ERROR_HPP__ +#define __UT_ROBOT_B2_ROBOT_STATE_CLIENT_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_SERVICE_SWITCH, 5201, "service switch error.") +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_SERVICE_PROTECTED, 5202, "service is protected.") +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_LOWPOWER_SWITCH, 5203, "low power switch error.") +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_LOWPOWER_STATE, 5204, "low power state error.") +} +} +} + +#endif//__UT_ROBOT_B2_ROBOT_STATE_CLIENT_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2dd5ce0c00a0f93e99c0e91dcd3f8d8b77b762b0 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_api.hpp @@ -0,0 +1,45 @@ +#ifndef __UT_ROBOT_B2_SPORT_API_HPP__ +#define __UT_ROBOT_B2_SPORT_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/*service name*/ +const std::string ROBOT_SPORT_SERVICE_NAME = "sport"; + +/*api version*/ +const std::string ROBOT_SPORT_API_VERSION = "1.0.0.1"; + +/*api id*/ +const int32_t ROBOT_SPORT_API_ID_DAMP = 1001; +const int32_t ROBOT_SPORT_API_ID_BALANCESTAND = 1002; +const int32_t ROBOT_SPORT_API_ID_STOPMOVE = 1003; +const int32_t ROBOT_SPORT_API_ID_STANDUP = 1004; +const int32_t ROBOT_SPORT_API_ID_STANDDOWN = 1005; +const int32_t ROBOT_SPORT_API_ID_RECOVERYSTAND = 1006; +const int32_t ROBOT_SPORT_API_ID_MOVE = 1008; +const int32_t ROBOT_SPORT_API_ID_SWITCHGAIT = 1011; +const int32_t ROBOT_SPORT_API_ID_BODYHEIGHT = 1013; +const int32_t ROBOT_SPORT_API_ID_SPEEDLEVEL = 1015; +const int32_t ROBOT_SPORT_API_ID_TRAJECTORYFOLLOW = 1018; +const int32_t ROBOT_SPORT_API_ID_CONTINUOUSGAIT = 1019; +const int32_t ROBOT_SPORT_API_ID_MOVETOPOS = 1036; +const int32_t ROBOT_SPORT_API_ID_SWITCHMOVEMODE = 1038; +const int32_t ROBOT_SPORT_API_ID_VISIONWALK = 1101; +const int32_t ROBOT_SPORT_API_ID_HANDSTAND = 1039; +const int32_t ROBOT_SPORT_API_ID_AUTORECOVERY_SET = 1040; +const int32_t ROBOT_SPORT_API_ID_FREEWALK = 1045; +const int32_t ROBOT_SPORT_API_ID_CLASSICWALK = 1049; +const int32_t ROBOT_SPORT_API_ID_FASTWALK = 1050; +const int32_t ROBOT_SPORT_API_ID_FREEEULER = 1051; + +} +} +} + +#endif //__UT_ROBOT_B2_SPORT_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d2e02beccc8aab5fb224875cb59af0066b13ac35 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_client.hpp @@ -0,0 +1,86 @@ +#ifndef __UT_ROBOT_B2_SPORT_CLIENT_HPP__ +#define __UT_ROBOT_B2_SPORT_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +/* + * PathPoint + */ +struct stPathPoint +{ + float timeFromStart; + float x; + float y; + float yaw; + float vx; + float vy; + float vyaw; +}; + +typedef struct stPathPoint PathPoint; + +/* + * SportClient + */ +class SportClient : public Client +{ +public: + explicit SportClient(bool enableLease = false); + ~SportClient(); + + void Init(); + + int32_t Damp(); + + int32_t BalanceStand(); + + int32_t StopMove(); + + int32_t StandUp(); + + int32_t StandDown(); + + int32_t RecoveryStand(); + + int32_t Move(float vx, float vy, float vyaw); + + int32_t SwitchGait(int d); + + int32_t BodyHeight(float height); + + int32_t SpeedLevel(int level); + + int32_t TrajectoryFollow(std::vector &path); + + int32_t ContinuousGait(bool flag); + + int32_t MoveToPos(float x, float y, float yaw); + + int32_t SwitchMoveMode(bool flag); + + int32_t VisionWalk(bool flag); + + int32_t HandStand(bool flag); + + int32_t AutoRecoverySet(bool flag); + + int32_t FreeWalk(); + + int32_t ClassicWalk(bool flag); + + int32_t FastWalk(bool flag); + + int32_t Euler(float roll, float pitch, float yaw); + +}; +} +} +} + +#endif//__UT_ROBOT_B2_SPORT_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f87140f32906d544dabef8a4c9a1fa6d3ee3d658 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/b2/sport/sport_error.hpp @@ -0,0 +1,19 @@ +#ifndef __UT_ROBOT_B2_SPORT_ERROR_HPP__ +#define __UT_ROBOT_B2_SPORT_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace b2 +{ +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_CLIENT_POINT_PATH, 4101, "point path error.") +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_SERVER_OVERTIME, 4201, "server overtime.") +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_SERVER_NOT_INIT, 4205, "server function not init.") +} +} +} + +#endif//__UT_ROBOT_B2_SPORT_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_factory.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_factory.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a7b11f35dc7643b5ff0dc82092cff77059e75c26 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_factory.hpp @@ -0,0 +1,62 @@ +#ifndef __UT_ROBOT_SDK_CHANNEL_FACTORY_HPP__ +#define __UT_ROBOT_SDK_CHANNEL_FACTORY_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +template +using Channel = unitree::common::DdsTopicChannel; + +template +using ChannelPtr = unitree::common::DdsTopicChannelPtr; + +class ChannelFactory +{ +public: + static ChannelFactory* Instance() + { + static ChannelFactory inst; + return &inst; + } + + void Init(int32_t domainId, const std::string& networkInterface = ""); + void Init(const std::string& configFileName = ""); + void Init(const common::JsonMap& jsonMap); + + void Release(); + + template + ChannelPtr CreateSendChannel(const std::string& name) + { + ChannelPtr channelPtr = mDdsFactoryPtr->CreateTopicChannel(name); + mDdsFactoryPtr->SetWriter(channelPtr); + return channelPtr; + } + + template + ChannelPtr CreateRecvChannel(const std::string& name, std::function callback, int32_t queuelen = 0) + { + ChannelPtr channelPtr = mDdsFactoryPtr->CreateTopicChannel(name); + mDdsFactoryPtr->SetReader(channelPtr, callback, queuelen); + return channelPtr; + } + +public: + ~ChannelFactory(); + +private: + ChannelFactory(); + +private: + bool mInited; + common::DdsFactoryModelPtr mDdsFactoryPtr; + common::Mutex mMutex; +}; + +} +} + +#endif//__UT_ROBOT_SDK_CHANNEL_FACTORY_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_labor.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_labor.hpp new file mode 100644 index 0000000000000000000000000000000000000000..eeef72773f2d240b1b9cd2fbc4107a482a172666 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_labor.hpp @@ -0,0 +1,99 @@ +#ifndef __UT_ROBOT_SDK_CHANNEL_LABOR_HPP__ +#define __UT_ROBOT_SDK_CHANNEL_LABOR_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +/* + * @brief + * @class: ChannelLabor + */ +template +class ChannelLabor +{ +public: + ChannelLabor() + {} + + virtual ~ChannelLabor() + {} + + void InitChannel(const std::string& name, const std::function& recvMesageCallback, int32_t queuelen = 0) + { + std::string sendChannelName = mNamerPtr->GetSendChannelName(name); + std::string recvChannelName = mNamerPtr->GetRecvChannelName(name); + + mSendChannlPtr = ChannelFactory::Instance()->CreateSendChannel(sendChannelName); + mRecvChannlPtr = ChannelFactory::Instance()->CreateRecvChannel(recvChannelName, recvMesageCallback, queuelen); + } + + bool Send(const SEND_MSG& msg, int64_t waitTimeout) + { + return mSendChannlPtr->Write(msg, waitTimeout); + } + + int64_t GetLastDataAvailableTime() const + { + return mRecvChannlPtr->GetLastDataAvailableTime(); + } + +protected: + ChannelNamerPtr mNamerPtr; + +private: + ChannelPtr mSendChannlPtr; + ChannelPtr mRecvChannlPtr; +}; + +template +using ChannelLaborPtr = std::shared_ptr>; + +/* + * @brief + * @class: ClientChannelLabor + */ +template +class ClientChannelLabor : public ChannelLabor +{ +public: + ClientChannelLabor() + { + ChannelLabor::mNamerPtr = ChannelNamerPtr(new ClientChannelNamer()); + } + + ~ClientChannelLabor() + {} +}; + +template +using ClientChannelLaborPtr = std::shared_ptr>; + +/* + * @brief + * @class: ServerChannelLabor + */ +template +class ServerChannelLabor : public ChannelLabor +{ +public: + ServerChannelLabor() + { + ChannelLabor::mNamerPtr = ChannelNamerPtr(new ServerChannelNamer()); + } + + ~ServerChannelLabor() + {} +}; + +template +using ServerChannelLaborPtr = std::shared_ptr>; + +} +} + +#endif//__UT_ROBOT_SDK_CHANNEL_LABOR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_namer.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_namer.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b3a2fc2a5e8bb3bff75da08f987ccb5f924a69a4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_namer.hpp @@ -0,0 +1,64 @@ +#ifndef __UT_ROBOT_SDK_CHANNEL_NAMER_HPP__ +#define __UT_ROBOT_SDK_CHANNEL_NAMER_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +const std::string ROBOT_SDK_CHANNEL_PREFIX = "rt/api/"; +const std::string ROBOT_SDK_CHANNEL_SUFFIX_CLIENT = "/request"; +const std::string ROBOT_SDK_CHANNEL_SUFFIX_SERVER = "/response"; + +/* + * @brief + * @class: ChannelNamer + */ +class ChannelNamer +{ +public: + virtual std::string GetSendChannelName(const std::string& name) = 0; + virtual std::string GetRecvChannelName(const std::string& name) = 0; +}; + +using ChannelNamerPtr = std::shared_ptr; + +/* + * @brief + * @class: ClientChannelNamer + */ +class ClientChannelNamer : public ChannelNamer +{ +public: + ClientChannelNamer(); + ~ClientChannelNamer(); + +protected: + std::string GetSendChannelName(const std::string& name); + std::string GetRecvChannelName(const std::string& name); +}; + +using ClientChannelNamerPtr = std::shared_ptr; + +/* + * @brief + * @class: ServerChannelNamer + */ +class ServerChannelNamer : public ChannelNamer +{ +public: + ServerChannelNamer(); + virtual ~ServerChannelNamer(); + +protected: + std::string GetSendChannelName(const std::string& name); + std::string GetRecvChannelName(const std::string& name); +}; + +using ServerChannelNamerPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_CHANNEL_NAMER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_publisher.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_publisher.hpp new file mode 100644 index 0000000000000000000000000000000000000000..0855fdc4467596427e5f8a2ccd468afe2bd0a25c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_publisher.hpp @@ -0,0 +1,54 @@ +#ifndef __UT_ROBOT_SDK_CHANNEL_PUBLISHER_HPP__ +#define __UT_ROBOT_SDK_CHANNEL_PUBLISHER_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +template +class ChannelPublisher +{ +public: + explicit ChannelPublisher(const std::string& channelName) : + mChannelName(channelName) + {} + + void InitChannel() + { + mChannelPtr = ChannelFactory::Instance()->CreateSendChannel(mChannelName); + } + + bool Write(const MSG& msg, int64_t waitMicrosec = 0) + { + if (mChannelPtr) + { + return mChannelPtr->Write(msg, waitMicrosec); + } + + return false; + } + + void CloseChannel() + { + mChannelPtr.reset(); + } + + const std::string& GetChannelName() const + { + return mChannelName; + } + +private: + std::string mChannelName; + ChannelPtr mChannelPtr; +}; + +template +using ChannelPublisherPtr = std::shared_ptr>; + +} +} + +#endif//__UT_ROBOT_SDK_CHANNEL_PUBLISHER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_subscriber.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_subscriber.hpp new file mode 100644 index 0000000000000000000000000000000000000000..314da3673f92b4d73b12b0bae6145fa09594b8e6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/channel/channel_subscriber.hpp @@ -0,0 +1,75 @@ +#ifndef __UT_ROBOT_SDK_CHANNEL_SUBSCRIBER_HPP__ +#define __UT_ROBOT_SDK_CHANNEL_SUBSCRIBER_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +template +class ChannelSubscriber +{ +public: + explicit ChannelSubscriber(const std::string& channelName) : + mChannelName(channelName), mQueueLen(0) + {} + + explicit ChannelSubscriber(const std::string& channelName, const std::function& handler, int64_t queuelen = 0) : + mChannelName(channelName), mQueueLen(queuelen), mHandler(handler) + {} + + void InitChannel(const std::function& handler, int64_t queuelen = 0) + { + mHandler = handler; + mQueueLen = queuelen; + + InitChannel(); + } + + void InitChannel() + { + if (mHandler) + { + mChannelPtr = ChannelFactory::Instance()->CreateRecvChannel(mChannelName, mHandler, mQueueLen); + } + else + { + UT_THROW(common::CommonException, "subscribe handler is invalid"); + } + } + + void CloseChannel() + { + mChannelPtr.reset(); + } + + int64_t GetLastDataAvailableTime() const + { + if (mChannelPtr) + { + return mChannelPtr->GetLastDataAvailableTime(); + } + + return -1; + } + + const std::string& GetChannelName() const + { + return mChannelName; + } + +private: + std::string mChannelName; + int64_t mQueueLen; + std::function mHandler; + ChannelPtr mChannelPtr; +}; + +template +using ChannelSubscriberPtr = std::shared_ptr>; + +} +} + +#endif//__UT_ROBOT_SDK_CHANNEL_SUBSCRIBER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..73640994dff05724b50be0b3f6a12566a98f97e6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client.hpp @@ -0,0 +1,61 @@ +#ifndef __UT_ROBOT_SDK_CLIENT_HPP__ +#define __UT_ROBOT_SDK_CLIENT_HPP__ + +#include +#include + +#define UT_ROBOT_CLIENT_REG_API_NO_PROI(apiId) \ + UT_ROBOT_CLIENT_REG_API(apiId, 0) + +#define UT_ROBOT_CLIENT_REG_API(apiId, priority) \ + RegistApi(apiId, priority) + +namespace unitree +{ +namespace robot +{ +/* + * @brief + * @class: Client + */ +class Client: public ClientBase +{ +public: + explicit Client(const std::string& name, bool enableLease = false); + virtual ~Client(); + + void WaitLeaseApplied(); + int64_t GetLeaseId(); + + const std::string& GetApiVersion() const; + std::string GetServerApiVersion(); + +protected: + void SetApiVersion(const std::string& apiVersion); + + int32_t Noop(); + + int32_t Call(int32_t apiId, const std::string& parameter, std::string& data); + int32_t Call(int32_t apiId, const std::string& parameter); + + int32_t Call(int32_t apiId, const std::vector& parameter, std::vector& data); + int32_t Call(int32_t apiId, const std::vector& parameter); + + int32_t Call(int32_t apiId, const std::string& parameter, const std::vector& binary); + + void RegistApi(int32_t apiId, int32_t priority = 0); + int32_t CheckApi(int32_t apiId, int32_t& priority, int64_t& leaseId); + +private: + bool mEnableLease; + std::string mApiVersion; + std::unordered_map mApiMap; + LeaseClientPtr mLeaseClientPtr; +}; + +using ClientPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_base.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_base.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b59cb4399107db4ada58077357763ec083859ded --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_base.hpp @@ -0,0 +1,54 @@ +#ifndef __UT_ROBOT_SDK_CLIENT_BASE_HPP__ +#define __UT_ROBOT_SDK_CLIENT_BASE_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +/* + * @brief + * @default client timeout. 1s + */ +const int64_t ROBOT_CLIENT_TIMEOUT = 1000000; + +/* + * @brief + * @class: ClientBase + */ +class ClientBase +{ +public: + explicit ClientBase(const std::string& name); + virtual ~ClientBase(); + + virtual void Init() = 0; + + void SetTimeout(int64_t timeout); + void SetTimeout(float timeout); + +protected: + int32_t Call(int32_t apiId, const std::string& parameter, std::string& data, int32_t priority, int64_t leaseId); + int32_t Call(int32_t apiId, const std::string& parameter, int32_t priority, int64_t leaseId); + + int32_t Call(int32_t apiId, const std::vector& parameter, std::vector& bin_data, int32_t priority, int64_t leaseId); + int32_t Call(int32_t apiId, const std::vector& parameter, int32_t priority, int64_t leaseId); + + int32_t Call(int32_t apiId, const std::string& parameter, const std::vector& binary, int32_t priority, int64_t leaseId); + + int32_t Call(int32_t apiId, const std::string& parameter, std::string& data, int32_t priority, int64_t leaseId, int64_t timeout); + + void SetHeader(RequestHeader& header, int32_t apiId, int64_t leaseId, int32_t priority, bool noReply); + +private: + int64_t mTimeout; + ClientStubPtr mClientStubPtr; +}; + +using ClientBasePtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_CLIENT_BASE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_stub.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_stub.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ad875c852578e85100d81f88ac40d12e075c44ef --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/client_stub.hpp @@ -0,0 +1,36 @@ +#ifndef __UT_ROBOT_SDK_CLIENT_STUB_HPP__ +#define __UT_ROBOT_SDK_CLIENT_STUB_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +class ClientStub +{ +public: + explicit ClientStub(); + ~ClientStub(); + + void Init(const std::string& name); + + bool Send(const Request& req, int64_t waitTimeout); + RequestFuturePtr SendRequest(const Request& req, int64_t waitTimeout); + +private: + void ResponseFunc(const void* message); + +private: + ChannelLaborPtr mChannelLaborPtr; + RequestFutureQueuePtr mFutureQueuePtr; +}; + +using ClientStubPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_CLIENT_STUB_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/lease_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/lease_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1952ea23dab16265438b7f634d124c008b1d39ce --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/client/lease_client.hpp @@ -0,0 +1,65 @@ +#ifndef __UT_ROBOT_SDK_LEASE_CLIENT_H__ +#define __UT_ROBOT_SDK_LEASE_CLIENT_H__ + +#include +#include + +namespace unitree +{ +namespace robot +{ +class LeaseContext +{ +public: + LeaseContext(); + ~LeaseContext(); + + void Update(int64_t id, int64_t term); + void Reset(); + + bool Valid() const; + + int64_t GetId() const; + int64_t GetTerm() const; + +private: + int64_t mId; + int64_t mTerm; +}; + +using LeaseContextPtr = std::shared_ptr; + +class LeaseClient : public ClientBase +{ +public: + explicit LeaseClient(const std::string& name); + ~LeaseClient(); + + void Init(); + + void WaitApplied(); + int64_t GetId(); + bool Applied(); + +private: + void Apply(); + void Renewal(); + + void ThreadFunction(); + + int64_t GetWaitMicrosec(); + +private: + std::string mName; + std::string mContextName; + LeaseContext mContext; + common::ThreadPtr mThreadPtr; + common::Mutex mMutex; +}; + +using LeaseClientPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_LEASE_CLIENT_H__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/future/request_future.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/future/request_future.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9fc5cc6452f8f5ef78d3cf6db90ff302c747bfd9 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/future/request_future.hpp @@ -0,0 +1,82 @@ +#ifndef __UT_DDS_ROBOT_REQUEST_FUTURE_HPP__ +#define __UT_DDS_ROBOT_REQUEST_FUTURE_HPP__ + +#include +#include + +namespace unitree +{ +namespace robot +{ +class RequestFutureQueue; +using RequestFutureQueuePtr = std::shared_ptr; + +/* + * @brief + * @class: RequestFuture + */ +class RequestFuture : public std::enable_shared_from_this +{ +public: + enum + { + DEFER = 0, + READY = 1 + }; + + explicit RequestFuture(); + explicit RequestFuture(int64_t requestId); + ~RequestFuture(); + + void SetRequestId(int64_t requestId); + int64_t GetRequestId() const; + + bool SetQueue(const std::shared_ptr& futureQueuePtr); + + const ResponsePtr& GetResponse(int64_t microsec); + +public: + void Ready(const ResponsePtr& requestPtr); + +private: + bool IsDeferred(); + bool IsReady(); + +private: + int32_t mState; + int64_t mRequestId; + ResponsePtr mResponsePtr; + common::MutexCond mMutexCond; + RequestFutureQueuePtr mFutureQueuePtr; +}; + +using RequestFuturePtr = std::shared_ptr; + +/* + * @brief + * @class: RequestFutureQueue + */ +class RequestFutureQueue +{ +public: + using iterator = std::unordered_map::iterator; + using const_iterator = std::unordered_map::const_iterator; + + RequestFutureQueue(); + ~RequestFutureQueue(); + + RequestFuturePtr Get(int64_t requestId); + bool Put(int64_t requestId, const RequestFuturePtr& futurePtr); + void Remove(int64_t requestId); + + size_t Size(); + +private: + common::Mutex mMutex; + std::unordered_map mFutureMap; +}; + +} +} + +#endif//__UT_DDS_ROBOT_REQUEST_FUTURE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f476fc23a8eb0ec46c07e7eec0004311c868055e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_api.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include +#include + +namespace unitree { +namespace robot { +namespace g1 { +/*service name*/ +const std::string ARM_ACTION_SERVICE_NAME = "arm"; + +/*api version*/ +const std::string ARM_ACTION_API_VERSION = "1.0.0.14"; + +/*api id*/ +const int32_t ROBOT_API_ID_ARM_ACTION_EXECUTE_ACTION = 7106; +const int32_t ROBOT_API_ID_ARM_ACTION_GET_ACTION_LIST = 7107; + +class JsonizeArmActionCommand : public common::Jsonize { + public: + JsonizeArmActionCommand() {} + ~JsonizeArmActionCommand() {} + + void fromJson(common::JsonMap &json) { + common::FromJson(json["data"], action_id); + } + + void toJson(common::JsonMap &json) const { + common::ToJson(action_id, json["data"]); + } + + int32_t action_id; +}; + +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..487563ea5d44ae4c5fef92afe295a9916d1f888d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_client.hpp @@ -0,0 +1,69 @@ +#pragma once + +#include +#include +#include "g1_arm_action_api.hpp" + +namespace unitree { +namespace robot { +namespace g1 { + + /** + * @brief Arm action client + * + * The arm action server provides some upper body actions. + * The controller is based on the `rt/arm_sdk` interface. + */ +class G1ArmActionClient : public Client { + public: + G1ArmActionClient() : Client(ARM_ACTION_SERVICE_NAME, false) {} + ~G1ArmActionClient() {} + + /*Init*/ + void Init() { + SetApiVersion(ARM_ACTION_API_VERSION); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_ARM_ACTION_EXECUTE_ACTION); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_ARM_ACTION_GET_ACTION_LIST); + } + + /*API Call*/ + int32_t ExecuteAction(int32_t action_id) { + std::string parameter, data; + JsonizeArmActionCommand json; + + json.action_id = action_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_ARM_ACTION_EXECUTE_ACTION, parameter, data); + } + + int32_t GetActionList(std::string &data) { + std::string parameter; + return Call(ROBOT_API_ID_ARM_ACTION_GET_ACTION_LIST, parameter, data); + } + + /*Action List*/ + std::map action_map = { + {"release arm", 99}, + {"two-hand kiss", 11}, + {"left kiss", 12}, + {"right kiss", 12}, + {"hands up", 15}, + {"clap", 17}, + {"high five", 18}, + {"hug", 19}, + {"heart", 20}, + {"right heart", 21}, + {"reject", 22}, + {"right hand up", 23}, + {"x-ray", 24}, + {"face wave", 25}, + {"high wave", 26}, + {"shake hand", 27}, + }; +}; + + +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..30799f349bacd33bfac4432f5a12603587719183 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/arm/g1_arm_action_error.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include + +namespace unitree { +namespace robot { +namespace g1 { + +UT_DECL_ERR(UT_ROBOT_ARM_ACTION_ERR_ARMSDK, 7400, "The topic rt/armsdk is occupied.") +UT_DECL_ERR(UT_ROBOT_ARM_ACTION_ERR_HOLDING, 7401, "The arm is holding. Expecting release action(99) or the same last action id.") +UT_DECL_ERR(UT_ROBOT_ARM_ACTION_ERR_INVALID_ACTION_ID, 7402, "Invalid action id.") +// The actions are only supported in fsm id {500, 501, 801}; +// You can subscribe the topic rt/sportmodestate to check the fsm id. +// And in the state 801, the actions are only supported in the fsm mode {0, 3}. +// See https://support.unitree.com/home/en/G1_developer/sport_services_interface#Expert%20interface +UT_DECL_ERR(UT_ROBOT_ARM_ACTION_ERR_INVALID_FSM_ID, 7404, "Invalid fsm id.") + +} // namespace g1 +} // namespace robot +} // namespace unitree \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..cb0e439eb7398c2d0bfdde6ed9eee04c7feabae3 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_api.hpp @@ -0,0 +1,94 @@ +#ifndef __UT_ROBOT_G1_AUDIO_API_HPP__ +#define __UT_ROBOT_G1_AUDIO_API_HPP__ + +#include +// #include + +namespace unitree { +namespace robot { +namespace g1 { +/*service name*/ +const std::string AUDIO_SERVICE_NAME = "voice"; + +/*api version*/ +const std::string AUDIO_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_API_ID_AUDIO_TTS = 1001; +const int32_t ROBOT_API_ID_AUDIO_ASR = 1002; +const int32_t ROBOT_API_ID_AUDIO_START_PLAY = 1003; +const int32_t ROBOT_API_ID_AUDIO_STOP_PLAY = 1004; +const int32_t ROBOT_API_ID_AUDIO_GET_VOLUME = 1005; +const int32_t ROBOT_API_ID_AUDIO_SET_VOLUME = 1006; +const int32_t ROBOT_API_ID_AUDIO_SET_RGB_LED = 1010; + +class TtsMakerParameter : public common::Jsonize { + public: + TtsMakerParameter() {} + ~TtsMakerParameter() {} + + void fromJson(common::JsonMap &json) {} + + void toJson(common::JsonMap &json) const { + common::ToJson(index, json["index"]); + common::ToJson(speaker_id, json["speaker_id"]); + common::ToJson(text, json["text"]); + } + + int32_t index = 0; + uint16_t speaker_id = 0; + std::string text; +}; + +class PlayStreamParameter : public common::Jsonize { + public: + PlayStreamParameter() {} + ~PlayStreamParameter() {} + + void fromJson(common::JsonMap &json) {} + + void toJson(common::JsonMap &json) const { + common::ToJson(app_name, json["app_name"]); + common::ToJson(stream_id, json["stream_id"]); + } + + std::string app_name; + std::string stream_id; +}; + +class PlayStopParameter : public common::Jsonize { + public: + PlayStopParameter() {} + ~PlayStopParameter() {} + + void fromJson(common::JsonMap &json) {} + + void toJson(common::JsonMap &json) const { + common::ToJson(app_name, json["app_name"]); + } + + std::string app_name; +}; + +class LedControlParameter : public common::Jsonize { + public: + LedControlParameter() {} + ~LedControlParameter() {} + + void fromJson(common::JsonMap &json) {} + + void toJson(common::JsonMap &json) const { + common::ToJson(R, json["R"]); + common::ToJson(G, json["G"]); + common::ToJson(B, json["B"]); + } + + uint8_t R; + uint8_t G; + uint8_t B; +}; +} // namespace g1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_G1_AUDIO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f615fe649dbd662c5e5981933d8d68a35d6a6110 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_client.hpp @@ -0,0 +1,110 @@ +#ifndef __UT_ROBOT_G1_AUDIO_CLIENT_HPP__ +#define __UT_ROBOT_G1_AUDIO_CLIENT_HPP__ + +#include +#include +#include + +#include "g1_audio_api.hpp" + +namespace unitree { +namespace robot { +namespace g1 { +class AudioClient : public Client { + public: + AudioClient() : Client(AUDIO_SERVICE_NAME, false) {} + ~AudioClient() {} + + /*Init*/ + void Init() { + SetApiVersion(AUDIO_API_VERSION); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_TTS); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_ASR); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_START_PLAY); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_STOP_PLAY); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_GET_VOLUME); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_SET_VOLUME); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_AUDIO_SET_RGB_LED); + }; + + /*API Call*/ + int32_t TtsMaker(const std::string& text, int32_t speaker_id) { + std::string parameter, data; + TtsMakerParameter json; + + json.index = tts_index++; + json.text = text; + json.speaker_id = speaker_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_AUDIO_TTS, parameter, data); + } + + int32_t GetVolume(uint8_t& volume) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_AUDIO_GET_VOLUME, parameter, data); + if (ret == 0) { + unitree::robot::go2::JsonizeCommObjInt json; + json.name = "volume"; + common::FromJsonString(data, json); + volume = json.value; + } + + return ret; + } + + int32_t SetVolume(uint8_t volume) { + std::string parameter, data; + unitree::robot::go2::JsonizeCommObjInt json; + + json.value = volume; + json.name = "volume"; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_AUDIO_SET_VOLUME, parameter, data); + } + + int32_t PlayStream(std::string app_name, std::string stream_id, + std::vector pcm_data) { + std::string parameter; + PlayStreamParameter json; + + json.app_name = app_name; + json.stream_id = stream_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_AUDIO_START_PLAY, parameter, pcm_data); + } + + int32_t PlayStop(std::string app_name) { + std::string parameter, data; + PlayStopParameter json; + + json.app_name = app_name; + parameter = common::ToJsonString(json); + + Call(ROBOT_API_ID_AUDIO_STOP_PLAY, parameter, data); + return 0; + } + + int32_t LedControl(uint8_t R, uint8_t G, uint8_t B) { + std::string parameter, data; + LedControlParameter json; + + json.R = R; + json.G = G; + json.B = B; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_AUDIO_SET_RGB_LED, parameter, data); + } + + private: + uint32_t tts_index = 0; +}; +} // namespace g1 + +} // namespace robot +} // namespace unitree +#endif // __UT_ROBOT_G1_AUDIO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3f528447e13ab2b3789f0257bab495f9c815106a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/audio/g1_audio_error.hpp @@ -0,0 +1,14 @@ +#ifndef __UT_ROBOT_G1_AUDIO_ERROR_HPP__ +#define __UT_ROBOT_G1_AUDIO_ERROR_HPP__ + +#include + +namespace unitree { +namespace robot { +namespace g1 { +UT_DECL_ERR(UT_ROBOT_AUDIO_ERR_COMM, 100, "Invalid parameter ") +} // namespace g1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_G1_AUDIO_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/common/terminations.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/common/terminations.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9e8250e6f8ffbd82c8c92d6a68e3d3a18a95250a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/common/terminations.hpp @@ -0,0 +1,90 @@ +#pragma once + +/** + * This file implements some functions used to protect the G1 during runtime. + * When the function returns true, it is recommended to set the motor to passive mode in the lower-level control. + */ + +#include +#include +#include +#include + +namespace unitree { +namespace robot { +namespace g1 { + +// robot orientation is too far from the desired orientation limits. +inline bool bad_orientation(const unitree_hg::msg::dds_::LowState_ & lowstate, float limit_angle = 1.0) +{ + auto & imu = lowstate.imu_state(); + Eigen::Quaternionf quat( + imu.quaternion()[0], + imu.quaternion()[1], + imu.quaternion()[2], + imu.quaternion()[3] + ); + Eigen::Vector3f projected_gravity_b = quat.conjugate() * Eigen::Vector3f(0, 0, -1); + return std::fabs(std::acos(-projected_gravity_b[2])) > limit_angle; +} + +// Joint velocities are outside of the soft joint limits +inline bool joint_vel_out_of_limit(const unitree_hg::msg::dds_::LowState_ & lowstate, float limit_vel = 10.0) +{ + auto & motors = lowstate.motor_state(); + return std::any_of(motors.begin(), motors.end(), [limit_vel](const auto & motor) { + return std::fabs(motor.dq()) > limit_vel; + }); +} + +// Agnular velocities are outside of the soft joint limits +inline bool ang_vel_out_of_limit(const unitree_hg::msg::dds_::LowState_ & lowstate, float limit_vel = 6.0) +{ + auto & gyroscope = lowstate.imu_state().gyroscope(); + return std::any_of(gyroscope.begin(), gyroscope.end(), [limit_vel](const auto & ang_vel) { + return std::fabs(ang_vel) > limit_vel; + }); +} + +// Motor winding temperature is above the limit +inline bool motor_winding_overheat(const unitree_hg::msg::dds_::LowState_ & lowstate, float limit_temp = 120.0) +{ + auto & motors = lowstate.motor_state(); + return std::any_of(motors.begin(), motors.end(), [limit_temp](const auto & motor) { + return motor.temperature()[1] > limit_temp; + }); +} + +// Motor casing temperature is above the limit +inline bool motor_casing_overheat(const unitree_hg::msg::dds_::LowState_ & lowstate, float limit_temp = 85.0) +{ + auto & motors = lowstate.motor_state(); + return std::any_of(motors.begin(), motors.end(), [limit_temp](const auto & motor) { + return motor.temperature()[0] > limit_temp; + }); +} + +// State of charge (SOC) is below the limit +inline bool low_battery(const unitree_hg::msg::dds_::BmsState_ & bms_state, float limit_soc = 20.0) +{ + return bms_state.soc() < limit_soc; +} + +/** + * @brief Lost connection to the robot + * This function checks if the last data available time is older than the specified timeout. + * If the timeout is reached, it indicates a lost connection. + * + * When using a wired connection to the robot, a loose network cable may cause the connection to be interrupted. + * If the program continues to run at this time, it will send a step signal to the motors, causing violent movement. + */ +inline bool lost_connection(unitree::robot::ChannelSubscriberPtr & subscriber, int64_t timeout_ms = 1000) +{ + auto now = unitree::common::GetCurrentMonotonicTimeNanosecond(); + auto elasped_ms = (now - subscriber->GetLastDataAvailableTime()) / 1e6; + return elasped_ms > timeout_ms; +} + +} +} +} \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..9df2fc4bc151f54dbb8f19e60587c62f39b0128a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_api.hpp @@ -0,0 +1,72 @@ +#ifndef __UT_ROBOT_G1_LOCO_API_HPP__ +#define __UT_ROBOT_G1_LOCO_API_HPP__ + +#include +#include + +namespace unitree { +namespace robot { +namespace g1 { +/*service name*/ +const std::string LOCO_SERVICE_NAME = "sport"; + +/*api version*/ +const std::string LOCO_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_API_ID_LOCO_GET_FSM_ID = 7001; +const int32_t ROBOT_API_ID_LOCO_GET_FSM_MODE = 7002; +const int32_t ROBOT_API_ID_LOCO_GET_BALANCE_MODE = 7003; +const int32_t ROBOT_API_ID_LOCO_GET_SWING_HEIGHT = 7004; +const int32_t ROBOT_API_ID_LOCO_GET_STAND_HEIGHT = 7005; +const int32_t ROBOT_API_ID_LOCO_GET_PHASE = 7006; // deprecated + +const int32_t ROBOT_API_ID_LOCO_SET_FSM_ID = 7101; +const int32_t ROBOT_API_ID_LOCO_SET_BALANCE_MODE = 7102; +const int32_t ROBOT_API_ID_LOCO_SET_SWING_HEIGHT = 7103; +const int32_t ROBOT_API_ID_LOCO_SET_STAND_HEIGHT = 7104; +const int32_t ROBOT_API_ID_LOCO_SET_VELOCITY = 7105; +const int32_t ROBOT_API_ID_LOCO_SET_ARM_TASK = 7106; +const int32_t ROBOT_API_ID_LOCO_SET_SPEED_MODE = 7107; + +using LocoCmd = + std::map>>; + +class JsonizeDataVecFloat : public common::Jsonize { +public: + JsonizeDataVecFloat() {} + ~JsonizeDataVecFloat() {} + + void fromJson(common::JsonMap &json) { common::FromJson(json["data"], data); } + + void toJson(common::JsonMap &json) const { + common::ToJson(data, json["data"]); + } + + std::vector data; +}; + +class JsonizeVelocityCommand : public common::Jsonize { +public: + JsonizeVelocityCommand() {} + ~JsonizeVelocityCommand() {} + + void fromJson(common::JsonMap &json) { + common::FromJson(json["velocity"], velocity); + common::FromJson(json["duration"], duration); + } + + void toJson(common::JsonMap &json) const { + common::ToJson(velocity, json["velocity"]); + common::ToJson(duration, json["duration"]); + } + + std::vector velocity; + float duration; +}; + +} // namespace g1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_G1_LOCO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ced7e6ae5d92a3c87c3e03c16df5fb61f50f3940 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_client.hpp @@ -0,0 +1,253 @@ +#ifndef __UT_ROBOT_G1_LOCO_CLIENT_HPP__ +#define __UT_ROBOT_G1_LOCO_CLIENT_HPP__ + +#include "g1_loco_api.hpp" +#include +#include +#include + +namespace unitree { +namespace robot { +namespace g1 { +class LocoClient : public Client { + public: + LocoClient() : Client(LOCO_SERVICE_NAME, false) {} + ~LocoClient() {} + + /*Init*/ + void Init() { + SetApiVersion(LOCO_API_VERSION); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_FSM_ID); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_FSM_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_BALANCE_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_SWING_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_STAND_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_PHASE); // deprecated + + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_FSM_ID); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_BALANCE_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_SWING_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_VELOCITY); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_ARM_TASK); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_SPEED_MODE); + }; + + /*Low Level API Call*/ + int32_t GetFsmId(int& fsm_id) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_FSM_ID, parameter, data); + + if (ret == 0) { + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + fsm_id = json.data; + } + + return ret; + } + + int32_t GetFsmMode(int& fsm_mode) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_FSM_MODE, parameter, data); + + if (ret == 0) { + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + fsm_mode = json.data; + } + + return ret; + } + + int32_t GetBalanceMode(int& balance_mode) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_BALANCE_MODE, parameter, data); + + if (ret == 0) { + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + balance_mode = json.data; + } + + return ret; + } + + int32_t GetSwingHeight(float& swing_height) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_SWING_HEIGHT, parameter, data); + + if (ret == 0) { + go2::JsonizeDataFloat json; + common::FromJsonString(data, json); + swing_height = json.data; + } + + return ret; + } + + int32_t GetStandHeight(float& stand_height) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_STAND_HEIGHT, parameter, data); + + if (ret == 0) { + go2::JsonizeDataFloat json; + common::FromJsonString(data, json); + stand_height = json.data; + } + + return ret; + } + + int32_t GetPhase(std::vector& phase) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_PHASE, parameter, data); + + if (ret == 0) { + JsonizeDataVecFloat json; + common::FromJsonString(data, json); + phase = json.data; + } + + return ret; + } + + int32_t SetFsmId(int fsm_id) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = fsm_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_FSM_ID, parameter, data); + } + + int32_t SetBalanceMode(int balance_mode) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = balance_mode; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_BALANCE_MODE, parameter, data); + } + + int32_t SetSwingHeight(float swing_height) { + std::string parameter, data; + + go2::JsonizeDataFloat json; + json.data = swing_height; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_SWING_HEIGHT, parameter, data); + } + + int32_t SetStandHeight(float stand_height) { + std::string parameter, data; + + go2::JsonizeDataFloat json; + json.data = stand_height; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT, parameter, data); + } + + int32_t SetVelocity(float vx, float vy, float omega, float duration = 1.f) { + std::string parameter, data; + + JsonizeVelocityCommand json; + std::vector velocity = {vx, vy, omega}; + json.velocity = velocity; + json.duration = duration; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_VELOCITY, parameter, data); + } + + int32_t SetTaskId(int task_id) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = task_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_ARM_TASK, parameter, data); + } + + /*High Level API Call*/ + int32_t Damp() { return SetFsmId(1); } + + int32_t Start() { return SetFsmId(500); } + + int32_t Squat() { return SetFsmId(2); } + + int32_t Sit() { return SetFsmId(3); } + + int32_t StandUp() { return SetFsmId(4); } + + int32_t ZeroTorque() { return SetFsmId(0); } + + int32_t StopMove() { return SetVelocity(0.f, 0.f, 0.f); } + + int32_t HighStand() { return SetStandHeight(std::numeric_limits::max()); } + + int32_t LowStand() { return SetStandHeight(std::numeric_limits::min()); } + + int32_t Move(float vx, float vy, float vyaw, bool continous_move) { + return SetVelocity(vx, vy, vyaw, continous_move ? 864000.f : 1.f); + } + + int32_t Move(float vx, float vy, float vyaw) { return Move(vx, vy, vyaw, continous_move_); } + + int32_t BalanceStand() { return SetBalanceMode(0); } + + int32_t ContinuousGait(bool flag) { return SetBalanceMode(flag ? 1 : 0); } + + int32_t SwitchMoveMode(bool flag) { + continous_move_ = flag; + return 0; + } + + int32_t WaveHand(bool turn_flag = false) { return SetTaskId(turn_flag ? 1 : 0); } + + int32_t ShakeHand(int stage = -1) { + switch (stage) { + case 0: + first_shake_hand_stage_ = false; + return SetTaskId(2); + + case 1: + first_shake_hand_stage_ = true; + return SetTaskId(3); + + default: + first_shake_hand_stage_ = !first_shake_hand_stage_; + return SetTaskId(first_shake_hand_stage_ ? 3 : 2); + } + } + + int32_t SetSpeedMode(int speed_mode) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = speed_mode; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_SPEED_MODE, parameter, data); + } + +private: + bool continous_move_ = false; + bool first_shake_hand_stage_ = true; +}; +} // namespace g1 + +} // namespace robot +} // namespace unitree +#endif // __UT_ROBOT_G1_LOCO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f62131cd55a88dfa9d36784e80065fcfc8941d9e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/g1/loco/g1_loco_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_G1_LOCO_ERROR_HPP__ +#define __UT_ROBOT_G1_LOCO_ERROR_HPP__ + +#include + +namespace unitree { +namespace robot { +namespace g1 { +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_LOCOSTATE_NOT_AVAILABLE, 7301, + "LocoState not available.") +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_INVALID_FSM_ID, 7302, "Invalid fsm id.") +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_INVALID_TASK_ID, 7303, "Invalid task id.") +} // namespace g1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_G1_LOCO_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b382564829284edf88b0053698189632fbd958ba --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_api.hpp @@ -0,0 +1,210 @@ +#ifndef __UT_ROBOT_GO2_CONFIG_API_HPP__ +#define __UT_ROBOT_GO2_CONFIG_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * service name + */ +const std::string CONFIG_SERVICE_NAME = "config"; + +/* + * api version + */ +const std::string CONFIG_API_VERSION = "1.0.0.1"; + +/* + * api id + */ +const int32_t CONFIG_API_ID_SET = 1001; +const int32_t CONFIG_API_ID_GET = 1002; +const int32_t CONFIG_API_ID_DEL = 1003; +const int32_t CONFIG_API_ID_META = 1004; + +/* + * data type + */ +class JsonizeConfigMeta : public common::Jsonize +{ +public: + JsonizeConfigMeta() + {} + + ~JsonizeConfigMeta() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["lastModified"], lastModified); + common::FromJson(json["size"], size); + common::FromJson(json["epoch"], epoch); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(lastModified, json["lastModified"]); + common::ToJson(size, json["size"]); + common::ToJson(epoch, json["epoch"]); + } + +public: + std::string name; + std::string lastModified; + int32_t size; + int32_t epoch; +}; + +class ConfigSetParameter : public common::Jsonize +{ +public: + ConfigSetParameter() + {} + + ~ConfigSetParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["content"], content); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(content, json["content"]); + } + +public: + std::string name; + std::string content; +}; + +class ConfigGetParameter : public common::Jsonize +{ +public: + ConfigGetParameter() + {} + + ~ConfigGetParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigGetData : public common::Jsonize +{ +public: + ConfigGetData() + {} + + ~ConfigGetData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["content"], content); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(content, json["content"]); + } + +public: + std::string content; +}; + +class ConfigDelParameter : public common::Jsonize +{ +public: + ConfigDelParameter() + {} + + ~ConfigDelParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigMetaParameter : public common::Jsonize +{ +public: + ConfigMetaParameter() + {} + + ~ConfigMetaParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +class ConfigMetaData : public common::Jsonize +{ +public: + ConfigMetaData() + {} + + ~ConfigMetaData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["meta"], meta); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(meta, json["meta"]); + } + +public: + JsonizeConfigMeta meta; +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_CONFIG_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..85f21400ea2c2a76734aa99e0c4b9f8b4d4efa9d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_client.hpp @@ -0,0 +1,68 @@ +#ifndef __UT_ROBOT_GO2_CONFIG_CLIENT_HPP__ +#define __UT_ROBOT_GO2_CONFIG_CLIENT_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * @brief ConfigMeta + */ +class ConfigMeta +{ +public: + ConfigMeta() : size(-1), epoch(-1) + {} + ~ConfigMeta() + {} + +public: + std::string name; + std::string lastModified; + int32_t size; + int32_t epoch; +}; + +/* + * @brief ConfigClient + */ + +using ConfigChangeStatusCallback = std::function; + +class ConfigClient : public Client +{ +public: + explicit ConfigClient(); + ~ConfigClient(); + + void Init(); + + int32_t Set(const std::string& name, const std::string& content); + int32_t Get(const std::string& name, std::string& content); + int32_t Del(const std::string& name); + int32_t Meta(const std::string& name, ConfigMeta& meta); + int32_t Meta(const std::string& name, std::string& meta); + + void SubscribeChangeStatus(const std::string& name, const ConfigChangeStatusCallback& callback); + +private: + void ChangeStatusMessageHandler(const void* message); + +private: + unitree::common::Mutex mLock; + std::map mNameCallbackMap; + ChannelSubscriberPtr mSubscriberPtr; +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_CONFIG_CLIENT_HPP__ + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..fdfd6bcbb6a354e3857b2b5cc243a1f6e1fca295 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/config/config_error.hpp @@ -0,0 +1,29 @@ +#ifndef __UT_ROBOT_GO2_CONFIG_ERROR_HPP__ +#define __UT_ROBOT_GO2_CONFIG_ERROR_HPP__ + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +UT_DECL_ERR(UT_CONFIG_ERR_PARAMETER, 8201, "parameter error.") +UT_DECL_ERR(UT_CONFIG_ERR_NOT_FOUND, 8202, "config name is not found.") +UT_DECL_ERR(UT_CONFIG_ERR_NAME, 8203, "name is invalid.") +UT_DECL_ERR(UT_CONFIG_ERR_LIMITED, 8204, "name/content length limited.") +UT_DECL_ERR(UT_CONFIG_ERR_LOCK, 8205, "lock error.") +UT_DECL_ERR(UT_CONFIG_ERR_LOAD_META, 8206, "load meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_SAVE_META, 8207, "save meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_TEMP_META, 8208, "save meta temp error.") +UT_DECL_ERR(UT_CONFIG_ERR_FORMAL_META, 8209, "formalize meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_REMOVE_META, 8210, "remove meta error.") +UT_DECL_ERR(UT_CONFIG_ERR_LOAD_DATA, 8211, "load data error.") +UT_DECL_ERR(UT_CONFIG_ERR_SAVE_DATA, 8212, "save data error.") +UT_DECL_ERR(UT_CONFIG_ERR_TEMP_DATA, 8213, "save data temp error.") +UT_DECL_ERR(UT_CONFIG_ERR_FORMAL_DATA, 8214, "formalize data error.") +UT_DECL_ERR(UT_CONFIG_ERR_REMOVE_DATA, 8215, "remove data error.") +} +} +} + +#endif//__UT_ROBOT_GO2_CONFIG_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..38ba60a396a0a9caf463e4d9025d114ce011325c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp @@ -0,0 +1,104 @@ +#ifndef __UT_ROBOT_GO2_OBSTACLES_AVOID_API_HPP__ +#define __UT_ROBOT_GO2_OBSTACLES_AVOID_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +const std::string ROBOT_OBSTACLES_AVOID_SERVICE_NAME = "obstacles_avoid"; +const std::string ROBOT_OBSTACLES_AVOID_API_VERSION = "1.0.0.2"; + +const int32_t ROBOT_API_ID_OBSTACLES_AVOID_SWITCH_SET = 1001; +const int32_t ROBOT_API_ID_OBSTACLES_AVOID_SWITCH_GET = 1002; +const int32_t ROBOT_API_ID_OBSTACLES_AVOID_MOVE = 1003; +const int32_t ROBOT_API_ID_OBSTACLES_AVOID_USE_REMOTE_COMMAND_FROM_API = 1004; + +class ObstaclesAvoidSwitchSetParameter : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["enable"], mEnable); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mEnable, json["enable"]); + } + + bool mEnable = true; +}; + +class ObstaclesAvoidSwitchGetData : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["enable"], mEnable); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mEnable, json["enable"]); + } + + bool mEnable = true; +}; + +class ObstaclesAvoidMoveParameter : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["x"], mX); + common::FromJson(json["y"], mY); + common::FromJson(json["yaw"], mYaw); + common::FromJson(json["mode"], mMode); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mX, json["x"]); + common::ToJson(mY, json["y"]); + common::ToJson(mYaw, json["yaw"]); + common::ToJson(mMode, json["mode"]); + } + + float mX = 0.0; + float mY = 0.0; + float mYaw = 0.0; + + /* + * mode: + * 0 for vel + * 1 for increment pose + * 2 for absolute pose + */ + int mMode = 0; +}; + +class ObstaclesAvoidRemoteCommandSource : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["is_remote_commands_from_api"], mIsRemoteCommandsFromApi); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mIsRemoteCommandsFromApi, json["is_remote_commands_from_api"]); + } + + bool mIsRemoteCommandsFromApi = true; +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_OBSTACLES_AVOID_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f9ecca770c45228933dd9b4dbae64e6d7a608caf --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp @@ -0,0 +1,33 @@ +#ifndef __UT_ROBOT_GO2_OBSTACLES_AVOID_CLIENT_HPP__ +#define __UT_ROBOT_GO2_OBSTACLES_AVOID_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +class ObstaclesAvoidClient : public Client +{ +public: + ObstaclesAvoidClient(); + ~ObstaclesAvoidClient(); + + void Init(); + + int32_t SwitchSet(bool enable); + int32_t SwitchGet(bool& enable); + + int32_t Move(float x, float y, float yaw); + int32_t UseRemoteCommandFromApi(bool isRemoteCommandsFromApi); + + int32_t MoveToAbsolutePosition(float x, float y, float yaw); + int32_t MoveToIncrementPosition(float x, float y, float yaw); +}; +} +} +} + +#endif//__UT_ROBOT_GO2_OBSTACLES_AVOID_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/public/jsonize_type.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/public/jsonize_type.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f123672a88fb221b647c9e2e7c7c4eb42cc8c762 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/public/jsonize_type.hpp @@ -0,0 +1,311 @@ +#ifndef __UT_ROBOT_GO2_SDK_JSON_DATA_TYPE_HPP__ +#define __UT_ROBOT_GO2_SDK_JSON_DATA_TYPE_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * @brief Jonsize for simple flag type bool + */ +class JsonizeFlagBool : public common::Jsonize +{ +public: + JsonizeFlagBool() : flag(false) + {} + + ~JsonizeFlagBool() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["flag"], flag); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(flag, json["flag"]); + } + +public: + bool flag; +}; + +/* + * @brief Jonsize for simple data type bool + */ +class JsonizeDataBool : public common::Jsonize +{ +public: + JsonizeDataBool() : data(false) + {} + + ~JsonizeDataBool() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["data"], data); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(data, json["data"]); + } + +public: + bool data; +}; + +/* + * @brief Jonsize for simple data type int + */ +class JsonizeDataInt : public common::Jsonize +{ +public: + JsonizeDataInt() : data(0) + {} + + ~JsonizeDataInt() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["data"], data); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(data, json["data"]); + } + +public: + int data; +}; + +/* + * @brief Jonsize for simple data type float + */ +class JsonizeDataFloat : public common::Jsonize +{ +public: + JsonizeDataFloat() : data(0.0F) + {} + + ~JsonizeDataFloat() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["data"], data); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(data, json["data"]); + } + +public: + float data; +}; + +/* + * @brief Jonsize for simple data type double + */ +class JsonizeDataDouble : public common::Jsonize +{ +public: + JsonizeDataDouble() : data(0.0F) + {} + + ~JsonizeDataDouble() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["data"], data); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(data, json["data"]); + } + +public: + double data; +}; + +/* + * @brief Jonsize for simple data type string + */ +class JsonizeDataString : public common::Jsonize +{ +public: + JsonizeDataString() + {} + + ~JsonizeDataString() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["data"], data); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(data, json["data"]); + } + +public: + std::string data; +}; + +/* + * @brief Jonsize for data type vec3 + */ +class JsonizeVec3 : public common::Jsonize +{ +public: + JsonizeVec3() : x(0.0F), y(0.0F), z(0.0F) + {} + + ~JsonizeVec3() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["x"], x); + common::FromJson(json["y"], y); + common::FromJson(json["z"], z); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(x, json["x"]); + common::ToJson(y, json["y"]); + common::ToJson(z, json["z"]); + } + +public: + float x; + float y; + float z; +}; + +/* + * @brief Jonsize for data type quaternion + */ +class JsonizeQuat : public common::Jsonize +{ +public: + JsonizeQuat() : x(0.0F), y(0.0F), z(0.0F), w(0.0F) + {} + + ~JsonizeQuat() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["x"], x); + common::FromJson(json["y"], y); + common::FromJson(json["z"], z); + common::FromJson(json["w"], w); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(x, json["x"]); + common::ToJson(y, json["y"]); + common::ToJson(z, json["z"]); + common::ToJson(w, json["w"]); + } + +public: + float x; + float y; + float z; + float w; +}; + +/* + * Jsonize class for PathPoint + */ +class JsonizePathPoint : public common::Jsonize +{ +public: + JsonizePathPoint() : + timeFromStart(0.0F), x(0.0F), y(0.0F), yaw(0.0F), vx(0.0F), vy(0.0F), vyaw(0.0F) + {} + + ~JsonizePathPoint() + {} + +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["t_from_start"], timeFromStart); + common::FromJson(json["x"], x); + common::FromJson(json["y"], y); + common::FromJson(json["yaw"], yaw); + common::FromJson(json["vx"], vx); + common::FromJson(json["vy"], vy); + common::FromJson(json["vyaw"], vyaw); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(timeFromStart, json["t_from_start"]); + common::ToJson(x, json["x"]); + common::ToJson(y, json["y"]); + common::ToJson(yaw, json["yaw"]); + common::ToJson(vx, json["vx"]); + common::ToJson(vy, json["vy"]); + common::ToJson(vyaw, json["vyaw"]); + } + +public: + float timeFromStart; + float x; + float y; + float yaw; + float vx; + float vy; + float vyaw; +}; + +/* + * @brief Jonsize for simple common object type int + */ +class JsonizeCommObjInt : public common::Jsonize +{ +public: + JsonizeCommObjInt() : value(0) + {} + + ~JsonizeCommObjInt() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json[name], value); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(value, json[name]); + } + +public: + int value; + std::string name; +}; + +} +} +} +#endif//__UT_ROBOT_GO2_SDK_JSON_DATA_TYPE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..83c3bb53d70bf7aca2e5ba74bac60328b98dfe88 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_api.hpp @@ -0,0 +1,152 @@ +#ifndef __UT_ROBOT_GO2_ROBOT_STATE_API_HPP__ +#define __UT_ROBOT_GO2_ROBOT_STATE_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * service name + */ +const std::string ROBOT_STATE_SERVICE_NAME = "robot_state"; + +/* + * api version + */ +const std::string ROBOT_STATE_API_VERSION = "1.0.0.1"; + +/* + * api id + */ +const int32_t ROBOT_STATE_API_ID_SERVICE_SWITCH = 1001; +const int32_t ROBOT_STATE_API_ID_SET_REPORT_FREQ = 1002; +const int32_t ROBOT_STATE_API_ID_SERVICE_LIST = 1003; + +/* + * request parameter for 1001 + */ +class ServiceSwitchParameter : public common::Jsonize +{ +public: + ServiceSwitchParameter() : swit(0) + {} + + ~ServiceSwitchParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["switch"], swit); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(swit, json["switch"]); + } + +public: + std::string name; + int32_t swit; +}; + +/* + * response data for 1001 + */ +class ServiceSwitchData : public common::Jsonize +{ +public: + ServiceSwitchData() : status(0) + {} + + ~ServiceSwitchData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["status"], status); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(status, json["status"]); + } + +public: + std::string name; + int32_t status; +}; + +/* + * request parameter for 1002 + */ +class SetReportFreqParameter : public common::Jsonize +{ +public: + SetReportFreqParameter() + {} + + ~SetReportFreqParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["interval"], interval); + common::FromJson(json["duration"], duration); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(interval, json["interval"]); + common::ToJson(duration, json["duration"]); + } + +public: + int32_t interval; + int32_t duration; +}; + +/* + * request data for 1003 + */ +class ServiceStateData : public common::Jsonize +{ +public: + ServiceStateData() + {} + + ~ServiceStateData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + common::FromJson(json["status"], status); + common::FromJson(json["protect"], protect); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + common::ToJson(status, json["status"]); + common::ToJson(protect, json["protect"]); + } + +public: + std::string name; + int32_t status; + int32_t protect; +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_ROBOT_STATE_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..56ddf65ca7454a487ded902f55ba02b97143527f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_client.hpp @@ -0,0 +1,47 @@ +#ifndef __UT_ROBOT_GO2_ROBOT_STATE_CLIENT_HPP__ +#define __UT_ROBOT_GO2_ROBOT_STATE_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * @brief ServiceState + */ +class ServiceState +{ +public: + ServiceState() : status(0), protect(0) + {} + + std::string name; + int32_t status; + int32_t protect; +}; + +/* + * @brief RobotStateClient + */ +class RobotStateClient : public Client +{ +public: + explicit RobotStateClient(); + ~RobotStateClient(); + + void Init(); + + int32_t ServiceList(std::vector& serviceStateList); + int32_t ServiceSwitch(const std::string& name, int32_t swit, int32_t& status); + int32_t SetReportFreq(int32_t interval, int32_t duration); +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_ROBOT_STATE_CLIENT_HPP__ + diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f5a19b8358b9ae4c4dc9e9f7200f745e986c9860 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/robot_state/robot_state_error.hpp @@ -0,0 +1,18 @@ +#ifndef __UT_ROBOT_GO2_ROBOT_STATE_CLIENT_ERROR_HPP__ +#define __UT_ROBOT_GO2_ROBOT_STATE_CLIENT_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_SERVICE_SWITCH, 5201, "service switch error.") +UT_DECL_ERR(UT_ROBOT_STATE_CLIENT_ERR_SERVICE_PROTECTED, 5202, "service is protected.") +} +} +} + +#endif//__UT_ROBOT_GO2_ROBOT_STATE_CLIENT_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..215b2e1e7483d222a9c3f7bfef7c48d73e3e5c28 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_api.hpp @@ -0,0 +1,64 @@ +#ifndef __UT_ROBOT_GO2_SPORT_API_HPP__ +#define __UT_ROBOT_GO2_SPORT_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/*service name*/ +const std::string ROBOT_SPORT_SERVICE_NAME = "sport"; + +/*api version*/ +const std::string ROBOT_SPORT_API_VERSION = "1.0.0.1"; + +/*api id*/ +const int32_t ROBOT_SPORT_API_ID_DAMP = 1001; +const int32_t ROBOT_SPORT_API_ID_BALANCESTAND = 1002; +const int32_t ROBOT_SPORT_API_ID_STOPMOVE = 1003; +const int32_t ROBOT_SPORT_API_ID_STANDUP = 1004; +const int32_t ROBOT_SPORT_API_ID_STANDDOWN = 1005; +const int32_t ROBOT_SPORT_API_ID_RECOVERYSTAND = 1006; +const int32_t ROBOT_SPORT_API_ID_EULER = 1007; +const int32_t ROBOT_SPORT_API_ID_MOVE = 1008; +const int32_t ROBOT_SPORT_API_ID_SIT = 1009; +const int32_t ROBOT_SPORT_API_ID_RISESIT = 1010; +const int32_t ROBOT_SPORT_API_ID_SPEEDLEVEL = 1015; +const int32_t ROBOT_SPORT_API_ID_HELLO = 1016; +const int32_t ROBOT_SPORT_API_ID_STRETCH = 1017; +const int32_t ROBOT_SPORT_API_ID_CONTENT = 1020; +const int32_t ROBOT_SPORT_API_ID_DANCE1 = 1022; +const int32_t ROBOT_SPORT_API_ID_DANCE2 = 1023; +const int32_t ROBOT_SPORT_API_ID_SWITCHJOYSTICK = 1027; +const int32_t ROBOT_SPORT_API_ID_POSE = 1028; +const int32_t ROBOT_SPORT_API_ID_SCRAPE = 1029; +const int32_t ROBOT_SPORT_API_ID_FRONTFLIP = 1030; +const int32_t ROBOT_SPORT_API_ID_FRONTJUMP = 1031; +const int32_t ROBOT_SPORT_API_ID_FRONTPOUNCE = 1032; +const int32_t ROBOT_SPORT_API_ID_HEART = 1036; +const int32_t ROBOT_SPORT_API_ID_STATICWALK = 1061; +const int32_t ROBOT_SPORT_API_ID_TROTRUN = 1062; +const int32_t ROBOT_SPORT_API_ID_ECONOMICGAIT = 1063; +const int32_t ROBOT_SPORT_API_ID_LEFTFLIP = 2041; +const int32_t ROBOT_SPORT_API_ID_BACKFLIP = 2043; +const int32_t ROBOT_SPORT_API_ID_HANDSTAND = 2044; +const int32_t ROBOT_SPORT_API_ID_FREEWALK = 2045; +const int32_t ROBOT_SPORT_API_ID_FREEBOUND = 2046; +const int32_t ROBOT_SPORT_API_ID_FREEJUMP = 2047; +const int32_t ROBOT_SPORT_API_ID_FREEAVOID = 2048; +const int32_t ROBOT_SPORT_API_ID_CLASSICWALK = 2049; +const int32_t ROBOT_SPORT_API_ID_WALKUPRIGHT = 2050; +const int32_t ROBOT_SPORT_API_ID_CROSSSTEP = 2051; +const int32_t ROBOT_SPORT_API_ID_AUTORECOVERY_SET = 2054; +const int32_t ROBOT_SPORT_API_ID_AUTORECOVERY_GET = 2055; +const int32_t ROBOT_SPORT_API_ID_SWITCHAVOIDMODE = 2058; + + +} +} +} + +#endif //__UT_ROBOT_GO2_SPORT_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..047ba211a8b8731ce89a9a968ad435ad60af529a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_client.hpp @@ -0,0 +1,86 @@ +#ifndef __UT_ROBOT_GO2_SPORT_CLIENT_HPP__ +#define __UT_ROBOT_GO2_SPORT_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * PathPoint + */ +struct stPathPoint +{ + float timeFromStart; + float x; + float y; + float yaw; + float vx; + float vy; + float vyaw; +}; + +typedef struct stPathPoint PathPoint; + +/* + * SportClient + */ +class SportClient : public Client +{ +public: + explicit SportClient(bool enableLease = false); + ~SportClient(); + + void Init(); + + int32_t Damp(); + int32_t BalanceStand(); + int32_t StopMove(); + int32_t StandUp(); + int32_t StandDown(); + int32_t RecoveryStand(); + int32_t Euler(float roll, float pitch, float yaw); + int32_t Move(float vx, float vy, float vyaw); + int32_t Sit(); + int32_t RiseSit(); + int32_t SpeedLevel(int level); + int32_t Hello(); + int32_t Stretch(); + int32_t SwitchJoystick(bool flag); + int32_t Content(); + int32_t Heart(); + int32_t Pose(bool flag); + int32_t Scrape(); + int32_t FrontFlip(); + int32_t FrontJump(); + int32_t FrontPounce(); + int32_t Dance1(); + int32_t Dance2(); + int32_t LeftFlip(); + int32_t BackFlip(); + int32_t HandStand(bool flag); + int32_t FreeWalk(); + int32_t FreeBound(bool flag); + int32_t FreeJump(bool flag); + int32_t FreeAvoid(bool flag); + int32_t ClassicWalk(bool flag); + int32_t WalkUpright(bool flag); + int32_t CrossStep(bool flag); + int32_t AutoRecoverSet(bool flag); + int32_t AutoRecoverGet(bool& flag); + int32_t StaticWalk(); + int32_t TrotRun(); + int32_t EconomicGait(); + int32_t SwitchAvoidMode(); + + + +}; +} +} +} + +#endif//__UT_ROBOT_GO2_SPORT_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..81658c305f6873a404c00d5500c711bab3def666 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/sport/sport_error.hpp @@ -0,0 +1,19 @@ +#ifndef __UT_ROBOT_GO2_SPORT_ERROR_HPP__ +#define __UT_ROBOT_GO2_SPORT_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_CLIENT_POINT_PATH, 4101, "point path error.") +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_SERVER_OVERTIME, 4201, "server overtime.") +UT_DECL_ERR(UT_ROBOT_SPORT_ERR_SERVER_NOT_INIT, 4205, "server function not init.") +} +} +} + +#endif//__UT_ROBOT_GO2_SPORT_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..68bf6822b22e0c8f9873cd37c65542358be45367 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_api.hpp @@ -0,0 +1,55 @@ +#ifndef __UT_ROBOT_GO2_UTRACK_API_HPP__ +#define __UT_ROBOT_GO2_UTRACK_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +const std::string ROBOT_UTRACK_SERVICE_NAME = "uwbswitch"; +const std::string ROBOT_UTRACK_API_VERSION = "1.0.0.1"; + +const int32_t ROBOT_API_ID_UTRACK_SWITCH_SET = 1001; +const int32_t ROBOT_API_ID_UTRACK_SWITCH_GET = 1002; +const int32_t ROBOT_API_ID_UTRACK_IS_TRACKING = 1003; + +class UtrackSwitchSetParameter : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["enable"], mEnable); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mEnable, json["enable"]); + } + + int32_t mEnable = true; +}; + +class UtrackSwitchGetData : public common::Jsonize +{ +public: + void fromJson(common::JsonMap& json) + { + common::FromJson(json["enable"], mEnable); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(mEnable, json["enable"]); + } + + int32_t mEnable = true; +}; + +} +} +} + +#endif//__UT_ROBOT_GO2_UTRACK_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4e4372ce30a11ccdd799f6afe4ec61b6e1d61491 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/utrack/utrack_client.hpp @@ -0,0 +1,28 @@ +#ifndef __UT_ROBOT_GO2_UTRACK_CLIENT_HPP__ +#define __UT_ROBOT_GO2_UTRACK_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +class UtrackClient : public Client +{ + public: + UtrackClient(); + ~UtrackClient(); + + void Init(); + + int32_t SwitchSet(bool enable); + int32_t SwitchGet(bool& enable); + int32_t IsTracking(bool& enable); +}; +} +} +} + +#endif//__UT_ROBOT_GO2_UTRACK_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1adc50edd5e352cde8b887d1c63d36a688464696 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_api.hpp @@ -0,0 +1,24 @@ +#ifndef __UT_ROBOT_GO2_VIDEO_API_HPP__ +#define __UT_ROBOT_GO2_VIDEO_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/*service name*/ +const std::string ROBOT_VIDEO_SERVICE_NAME = "videohub"; + +/*api version*/ +const std::string ROBOT_VIDEO_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_VIDEO_API_ID_GETIMAGESAMPLE = 1001; +} +} +} + +#endif //__UT_ROBOT_GO2_VIDEO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..85892e9e9bcdb9379cb7106e8df512c38350546c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_client.hpp @@ -0,0 +1,34 @@ +#ifndef __UT_ROBOT_GO2_VIDEO_CLIENT_HPP__ +#define __UT_ROBOT_GO2_VIDEO_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * VideoClient + */ +class VideoClient : public Client +{ +public: + explicit VideoClient(); + ~VideoClient(); + + void Init(); + + /* + * @brief GetImageSample + * @api: 1001 + */ + int32_t GetImageSample(std::vector&); + +}; +} +} +} + +#endif//__UT_ROBOT_GO2_VIDEO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c9df9ed16c430f45501f7422c9928d2ef8be02b6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/video/video_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_GO2_VIDEO_ERROR_HPP__ +#define __UT_ROBOT_GO2_VIDEO_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ + UT_DECL_ERR(UT_ROBOT_VIDEO_ERR_COMM, 100, "Invalid parameter") +} +} +} + +#endif//__UT_ROBOT_GO2_VIDEO_ERROR_HPP__ \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3d5f17ccb314a05b564456ced38b836fc9dfa2a6 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_api.hpp @@ -0,0 +1,29 @@ +#ifndef __UT_ROBOT_GO2_VUI_API_HPP__ +#define __UT_ROBOT_GO2_VUI_API_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/*service name*/ +const std::string ROBOT_VUI_SERVICE_NAME = "vui"; + +/*api version*/ +const std::string ROBOT_VUI_API_VERSION = "1.0.0.0"; + +/*api id*/ +const int32_t ROBOT_VUI_API_ID_SETSWITCH = 1001; +const int32_t ROBOT_VUI_API_ID_GETSWITCH = 1002; +const int32_t ROBOT_VUI_API_ID_SETVOLUME = 1003; +const int32_t ROBOT_VUI_API_ID_GETVOLUME = 1004; +const int32_t ROBOT_VUI_API_ID_SETBRIGHTNESS = 1005; +const int32_t ROBOT_VUI_API_ID_GETBRIGHTNESS = 1006; +} +} +} + +#endif //__UT_ROBOT_GO2_VUI_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f2d22c4affd43d9b74d3657b08dd16b68bf7e692 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_client.hpp @@ -0,0 +1,64 @@ +#ifndef __UT_ROBOT_GO2_VUI_CLIENT_HPP__ +#define __UT_ROBOT_GO2_VUI_CLIENT_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ +/* + * VuiClient + */ +class VuiClient : public Client +{ +public: + explicit VuiClient(); + ~VuiClient(); + + void Init(); + + /* + * @brief SetSwitch + * @api: 1001 + */ + int32_t SetSwitch(int enable); + + /* + * @brief GetSwitch + * @api: 1002 + */ + int32_t GetSwitch(int&); + + /* + * @brief SetVolume + * @api: 1003 + */ + int32_t SetVolume(int level); + + /* + * @brief GetVolume + * @api: 1004 + */ + int32_t GetVolume(int&); + + /* + * @brief SetBrightness + * @api: 1005 + */ + int32_t SetBrightness(int level); + + /* + * @brief GetBrightness + * @api: 1006 + */ + int32_t GetBrightness(int&); + +}; +} +} +} + +#endif//__UT_ROBOT_GO2_VUI_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3b92ae4b1173dcdd9eb8a09e72d7a8326951d33a --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/go2/vui/vui_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_GO2_VUI_ERROR_HPP__ +#define __UT_ROBOT_GO2_VUI_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +namespace go2 +{ + UT_DECL_ERR(UT_ROBOT_VUI_ERR_COMM, 100, "Invalid parameter") +} +} +} + +#endif//__UT_ROBOT_GO2_VUI_ERROR_HPP__ \ No newline at end of file diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ac2b3e16a01bebe0fe96301256a12aa4b00efbcf --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_api.hpp @@ -0,0 +1,97 @@ +#ifndef __UT_ROBOT_H1_LOCO_API_HPP__ +#define __UT_ROBOT_H1_LOCO_API_HPP__ + +#include +#include + +namespace unitree { +namespace robot { +namespace h1 { +/*service name*/ +const std::string LOCO_SERVICE_NAME = "loco"; + +/*api version*/ +const std::string LOCO_API_VERSION = "2.0.0.0"; + +/*api id*/ +const int32_t ROBOT_API_ID_LOCO_GET_FSM_ID = 8001; +const int32_t ROBOT_API_ID_LOCO_GET_FSM_MODE = 8002; +const int32_t ROBOT_API_ID_LOCO_GET_BALANCE_MODE = 8003; +const int32_t ROBOT_API_ID_LOCO_GET_SWING_HEIGHT = 8004; +const int32_t ROBOT_API_ID_LOCO_GET_STAND_HEIGHT = 8005; +const int32_t ROBOT_API_ID_LOCO_GET_PHASE = 8006; // deprecated + +const int32_t ROBOT_API_ID_LOCO_SET_FSM_ID = 8101; +const int32_t ROBOT_API_ID_LOCO_SET_BALANCE_MODE = 8102; +const int32_t ROBOT_API_ID_LOCO_SET_SWING_HEIGHT = 8103; +const int32_t ROBOT_API_ID_LOCO_SET_STAND_HEIGHT = 8104; +const int32_t ROBOT_API_ID_LOCO_SET_VELOCITY = 8105; +const int32_t ROBOT_API_ID_LOCO_SET_PHASE = 8106; +const int32_t ROBOT_API_ID_LOCO_SET_ARM_TASK = 8107; + +const int32_t ROBOT_API_ID_LOCO_ENABLE_ODOM = 8201; +const int32_t ROBOT_API_ID_LOCO_DISABLE_ODOM = 8202; +const int32_t ROBOT_API_ID_LOCO_GET_ODOM = 8203; +const int32_t ROBOT_API_ID_LOCO_SET_TARGET_POSITION = 8204; + +using LocoCmd = std::map>>; + +class JsonizeDataVecFloat : public common::Jsonize { + public: + JsonizeDataVecFloat() {} + ~JsonizeDataVecFloat() {} + + void fromJson(common::JsonMap& json) { common::FromJson(json["data"], data); } + + void toJson(common::JsonMap& json) const { common::ToJson(data, json["data"]); } + + std::vector data; +}; + +class JsonizeVelocityCommand : public common::Jsonize { + public: + JsonizeVelocityCommand() {} + ~JsonizeVelocityCommand() {} + + void fromJson(common::JsonMap& json) { + common::FromJson(json["velocity"], velocity); + common::FromJson(json["duration"], duration); + } + + void toJson(common::JsonMap& json) const { + common::ToJson(velocity, json["velocity"]); + common::ToJson(duration, json["duration"]); + } + + std::vector velocity; + float duration; +}; + +class JsonizeTargetPos : public common::Jsonize { + public: + JsonizeTargetPos() {} + ~JsonizeTargetPos() {} + + void fromJson(common::JsonMap& json) { + common::FromJson(json["x"], x); + common::FromJson(json["y"], y); + common::FromJson(json["yaw"], yaw); + common::FromJson(json["relative"], relative); + } + + void toJson(common::JsonMap& json) const { + common::ToJson(x, json["x"]); + common::ToJson(y, json["y"]); + common::ToJson(yaw, json["yaw"]); + common::ToJson(relative, json["relative"]); + } + + float x, y, yaw; + bool relative; +}; + +} // namespace h1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_H1_LOCO_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_client.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_client.hpp new file mode 100644 index 0000000000000000000000000000000000000000..7e069743eaa4952e15e4eab496798f640d34b801 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_client.hpp @@ -0,0 +1,283 @@ +#ifndef __UT_ROBOT_H1_LOCO_CLIENT_HPP__ +#define __UT_ROBOT_H1_LOCO_CLIENT_HPP__ + +#include "h1_loco_api.hpp" +#include +#include +#include + +namespace unitree { +namespace robot { +namespace h1 { +class LocoClient : public Client { + public: + LocoClient() : Client(LOCO_SERVICE_NAME, false) {} + ~LocoClient() {} + + /*Init*/ + void Init() { + SetApiVersion(LOCO_API_VERSION); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_FSM_ID); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_FSM_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_BALANCE_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_SWING_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_STAND_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_PHASE); // deprecated + + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_FSM_ID); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_BALANCE_MODE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_SWING_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_VELOCITY); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_PHASE); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_ARM_TASK); + + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_ENABLE_ODOM); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_DISABLE_ODOM); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_GET_ODOM); + UT_ROBOT_CLIENT_REG_API_NO_PROI(ROBOT_API_ID_LOCO_SET_TARGET_POSITION); + }; + + /*Low Level API Call*/ + int32_t GetFsmId(int& fsm_id) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_FSM_ID, parameter, data); + + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + fsm_id = json.data; + + return ret; + } + + int32_t GetFsmMode(int& fsm_mode) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_FSM_MODE, parameter, data); + + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + fsm_mode = json.data; + + return ret; + } + + int32_t GetBalanceMode(int& balance_mode) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_BALANCE_MODE, parameter, data); + + go2::JsonizeDataInt json; + common::FromJsonString(data, json); + balance_mode = json.data; + + return ret; + } + + int32_t GetSwingHeight(float& swing_height) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_SWING_HEIGHT, parameter, data); + + go2::JsonizeDataFloat json; + common::FromJsonString(data, json); + swing_height = json.data; + + return ret; + } + + int32_t GetStandHeight(float& stand_height) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_STAND_HEIGHT, parameter, data); + + go2::JsonizeDataFloat json; + common::FromJsonString(data, json); + stand_height = json.data; + + return ret; + } + + int32_t GetPhase(std::vector& phase) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_PHASE, parameter, data); + + JsonizeDataVecFloat json; + common::FromJsonString(data, json); + phase = json.data; + + return ret; + } + + int32_t EnableOdom() { + std::string parameter, data; + return Call(ROBOT_API_ID_LOCO_ENABLE_ODOM, parameter, data); + } + + int32_t DisableOdom() { + std::string parameter, data; + return Call(ROBOT_API_ID_LOCO_DISABLE_ODOM, parameter, data); + } + + int32_t GetOdom(float& x, float& y, float& yaw) { + std::string parameter, data; + + int32_t ret = Call(ROBOT_API_ID_LOCO_GET_ODOM, parameter, data); + + go2::JsonizeVec3 json; + common::FromJsonString(data, json); + x = json.x; + y = json.y; + yaw = json.z; + + return ret; + } + + int32_t SetFsmId(int fsm_id) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = fsm_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_FSM_ID, parameter, data); + } + + int32_t SetBalanceMode(int balance_mode) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = balance_mode; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_BALANCE_MODE, parameter, data); + } + + int32_t SetSwingHeight(float swing_height) { + std::string parameter, data; + + go2::JsonizeDataFloat json; + json.data = swing_height; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_SWING_HEIGHT, parameter, data); + } + + int32_t SetStandHeight(float stand_height) { + std::string parameter, data; + + go2::JsonizeDataFloat json; + json.data = stand_height; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_STAND_HEIGHT, parameter, data); + } + + int32_t SetVelocity(float vx, float vy, float omega, float duration = 1.f) { + std::string parameter, data; + + JsonizeVelocityCommand json; + std::vector velocity = {vx, vy, omega}; + json.velocity = velocity; + json.duration = duration; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_VELOCITY, parameter, data); + } + + int32_t SetPhase(std::vector phase) { + std::string parameter, data; + + JsonizeDataVecFloat json; + json.data = phase; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_PHASE, parameter, data); + } + + int32_t SetTargetPos(float x, float y, float yaw, bool relative = true) { + std::string parameter, data; + + JsonizeTargetPos json; + json.x = x; + json.y = y; + json.yaw = yaw; + json.relative = relative; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_TARGET_POSITION, parameter, data); + } + + int32_t SetTaskId(int task_id) { + std::string parameter, data; + + go2::JsonizeDataInt json; + json.data = task_id; + parameter = common::ToJsonString(json); + + return Call(ROBOT_API_ID_LOCO_SET_ARM_TASK, parameter, data); + } + + /*High Level API Call*/ + int32_t Damp() { return SetFsmId(1); } + + int32_t Start() { return SetFsmId(204); } + + int32_t StandUp() { return SetFsmId(2); } + + int32_t ZeroTorque() { return SetFsmId(0); } + + int32_t StopMove() { return SetVelocity(0.f, 0.f, 0.f); } + + int32_t HighStand() { return SetStandHeight(std::numeric_limits::max()); } + + int32_t LowStand() { return SetStandHeight(std::numeric_limits::min()); } + + int32_t Move(float vx, float vy, float vyaw, bool continous_move) { + return SetVelocity(vx, vy, vyaw, continous_move ? 864000.f : 1.f); + } + + int32_t Move(float vx, float vy, float vyaw) { return Move(vx, vy, vyaw, continous_move_); } + + int32_t BalanceStand() { return SetBalanceMode(0); } + + int32_t ContinuousGait(bool flag) { return SetBalanceMode(flag ? 1 : 0); } + + int32_t SwitchMoveMode(bool flag) { + continous_move_ = flag; + return 0; + } + + int32_t SetNextFoot(bool foot) { + return SetPhase(foot ? std::vector({0.f, 1.f}) : std::vector({1.f, 0.f})); + } + + int32_t WaveHand() { return SetTaskId(0); } + + int32_t ShakeHand(int stage = -1) { + switch (stage) { + case 0: + first_shake_hand_stage_ = false; + return SetTaskId(1); + + case 1: + first_shake_hand_stage_ = true; + return SetTaskId(2); + + default: + first_shake_hand_stage_ = !first_shake_hand_stage_; + return SetTaskId(first_shake_hand_stage_ ? 2 : 1); + } + } + + private: + bool continous_move_ = false; + bool first_shake_hand_stage_ = true; +}; +} // namespace h1 + +} // namespace robot +} // namespace unitree +#endif // __UT_ROBOT_H1_LOCO_CLIENT_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..87892cec270b09e766749fcf6adf854860824c13 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/h1/loco/h1_loco_error.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_H1_LOCO_ERROR_HPP__ +#define __UT_ROBOT_H1_LOCO_ERROR_HPP__ + +#include + +namespace unitree { +namespace robot { +namespace h1 { +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_LOCOSTATE_NOT_AVAILABLE, 8301, "LocoState not available.") +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_INVALID_FSM_ID, 8302, "Invalid fsm id.") +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_ODOMSTATE_NOT_AVAILABLE, 8303, "OdomState not available.") +UT_DECL_ERR(UT_ROBOT_LOCO_ERR_INVALID_TASK_ID, 8304, "Invalid task id.") +} // namespace h1 +} // namespace robot +} // namespace unitree + +#endif // __UT_ROBOT_H1_LOCO_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal.hpp new file mode 100644 index 0000000000000000000000000000000000000000..56682ac470c1b18046e79f4549851fc5eec71ba9 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal.hpp @@ -0,0 +1,17 @@ +#ifndef __UT_ROBOT_SDK_INERNAL_HPP__ +#define __UT_ROBOT_SDK_INERNAL_HPP__ + +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +using RequestPtr = std::shared_ptr; +using ResponsePtr = std::shared_ptr; +} +} + +#endif//__UT_ROBOT_SDK_INERNAL_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_api.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_api.hpp new file mode 100644 index 0000000000000000000000000000000000000000..542d521c60cd1f48b4f3b376ef6e282bd655bd8d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_api.hpp @@ -0,0 +1,120 @@ +#ifndef __UT_ROBOT_SDK_INERNAL_API_HPP__ +#define __UT_ROBOT_SDK_INERNAL_API_HPP__ + +#include +#include + +namespace unitree +{ +namespace robot +{ +/* + * @brief max internal api id + * @value: 100 + */ +const int32_t ROBOT_INTERNAL_API_ID_MAX = 100; + +/////////////////////////////////////////////////////////////// +/* + * @brief invailed api id + * @value: -1 + */ +const int32_t ROBOT_API_ID_NONE = -1; + +/* + * @brief Get api version from server. + * @value: 1 + */ +const int32_t ROBOT_API_ID_INTERNAL_API_VERSION = 1; + +/* + * @brief Noop. + * @value: 2 + */ +const int32_t ROBOT_API_ID_INTERNAL_API_NOOP = 2; + +/* + * @brief Apply lease from server. + * @value: 101 + */ +const int32_t ROBOT_API_ID_LEASE_APPLY = 101; +/* + * @brief Renewal lease term from server. + * @value: 102 + */ +const int32_t ROBOT_API_ID_LEASE_RENEWAL = 102; + +/////////////////////////////////////////////////////////////// + +/* + * @biref robot lease term default. + * @value: default 1000000 us + */ +const int32_t ROBOT_LEASE_TERM = 1000000; + +/* + * micro: IS_INTERNAL_API + */ +#define IS_INTERNAL_API(apiId) ((apiId) <= ROBOT_MAX_INTERNAL_API_ID) + +/////////////////////////////////////////////////////////////// + +/* + * @brief Input parameter type for ROBOT_API_ID_INTERNAL_APPLY_LEASE + * @class: ApplyLeaseParameter + */ +class ApplyLeaseParameter : public common::Jsonize +{ +public: + ApplyLeaseParameter() + {} + + ~ApplyLeaseParameter() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["name"], name); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(name, json["name"]); + } + +public: + std::string name; +}; + +/* + * @brief Output data type for ROBOT_API_ID_INTERNAL_APPLY_LEASE + * @class: ApplyLeaseData + */ +class ApplyLeaseData : public common::Jsonize +{ +public: + ApplyLeaseData() : id(0),term(0) + {} + + ~ApplyLeaseData() + {} + + void fromJson(common::JsonMap& json) + { + common::FromJson(json["id"], id); + common::FromJson(json["term"], term); + } + + void toJson(common::JsonMap& json) const + { + common::ToJson(id, json["id"]); + common::ToJson(term, json["term"]); + } + +public: + int64_t id; + int64_t term; +}; +} +} +#endif//__UT_ROBOT_SDK_INERNAL_API_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_error.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_error.hpp new file mode 100644 index 0000000000000000000000000000000000000000..07426ec3c912660b63103dc4be9e7a5b443fd562 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_error.hpp @@ -0,0 +1,29 @@ +#ifndef __UT_ROBOT_INTERNAL_ERROR_HPP__ +#define __UT_ROBOT_INTERNAL_ERROR_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +UT_DECL_ERR(UT_ROBOT_OK, 0, "Success.") +UT_DECL_ERR(UT_ROBOT_ERR_UNKNOWN, 3001, "Unknown error.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_SEND, 3102, "Send request error.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_API_NOT_REG, 3103, "Api is not registed.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_API_TIMEOUT, 3104, "Call api timeout error.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_API_NOT_MATCH, 3105, "Response api not match error.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_API_DATA, 3106, "Response data error.") +UT_DECL_ERR(UT_ROBOT_ERR_CLIENT_LEASE_INVALID, 3107, "Lease is invalid.") + +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_SEND, 3201, "Send response error.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_INTERNAL, 3202, "Server internal error.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_API_NOT_IMPL, 3203, "Api not implement error.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_API_PARAMETER, 3204, "Api parameter error.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_LEASE_DENIED, 3205, "Request denied by lease.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_LEASE_NOT_EXIST, 3206, "Lease not exist in server cache.") +UT_DECL_ERR(UT_ROBOT_ERR_SERVER_LEASE_EXIST, 3207, "Lease is already exist in server cache.") +} +} + +#endif//__UT_ROBOT_INTERNAL_ERROR_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..136373d35d3d415c7a48c3b771f2cea32fee7777 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp @@ -0,0 +1,408 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: RequestHeader_.idl + Source: RequestHeader_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_REQUESTHEADER__HPP +#define DDSCXX_REQUESTHEADER__HPP + +#include "RequestIdentity_.hpp" + +#include "RequestLease_.hpp" + +#include "RequestPolicy_.hpp" + + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class RequestHeader_ +{ +private: + ::unitree_api::msg::dds_::RequestIdentity_ identity_; + ::unitree_api::msg::dds_::RequestLease_ lease_; + ::unitree_api::msg::dds_::RequestPolicy_ policy_; + +public: + RequestHeader_() = default; + + explicit RequestHeader_( + const ::unitree_api::msg::dds_::RequestIdentity_& identity, + const ::unitree_api::msg::dds_::RequestLease_& lease, + const ::unitree_api::msg::dds_::RequestPolicy_& policy) : + identity_(identity), + lease_(lease), + policy_(policy) { } + + const ::unitree_api::msg::dds_::RequestIdentity_& identity() const { return this->identity_; } + ::unitree_api::msg::dds_::RequestIdentity_& identity() { return this->identity_; } + void identity(const ::unitree_api::msg::dds_::RequestIdentity_& _val_) { this->identity_ = _val_; } + void identity(::unitree_api::msg::dds_::RequestIdentity_&& _val_) { this->identity_ = _val_; } + const ::unitree_api::msg::dds_::RequestLease_& lease() const { return this->lease_; } + ::unitree_api::msg::dds_::RequestLease_& lease() { return this->lease_; } + void lease(const ::unitree_api::msg::dds_::RequestLease_& _val_) { this->lease_ = _val_; } + void lease(::unitree_api::msg::dds_::RequestLease_&& _val_) { this->lease_ = _val_; } + const ::unitree_api::msg::dds_::RequestPolicy_& policy() const { return this->policy_; } + ::unitree_api::msg::dds_::RequestPolicy_& policy() { return this->policy_; } + void policy(const ::unitree_api::msg::dds_::RequestPolicy_& _val_) { this->policy_ = _val_; } + void policy(::unitree_api::msg::dds_::RequestPolicy_&& _val_) { this->policy_ = _val_; } + + bool operator==(const RequestHeader_& _other) const + { + (void) _other; + return identity_ == _other.identity_ && + lease_ == _other.lease_ && + policy_ == _other.policy_; + } + + bool operator!=(const RequestHeader_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::getTypeName() +{ + return "unitree_api::msg::dds_::RequestHeader_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::type_map_blob_sz() { return 1064; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4f, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0xfd, 0xdd, 0x30, 0x0e, 0xc6, 0xac, 0x5e, + 0x7a, 0x4b, 0xda, 0xf7, 0xa4, 0xdc, 0xc7, 0x00, 0x71, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, + 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xff, 0x48, 0x3d, 0x1f, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, + 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x1a, 0xdc, 0x13, 0xcf, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, + 0x5f, 0x25, 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0xf4, 0xaf, 0x8b, 0x57, 0xf1, 0x8f, 0x78, + 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, + 0x0b, 0xb7, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xd3, + 0x3a, 0xff, 0x5d, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, + 0x3f, 0xca, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0xf1, 0x76, 0x57, 0x81, 0x5a, + 0xa1, 0x5f, 0x25, 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xb9, + 0x88, 0x29, 0x5c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x14, + 0x70, 0x9c, 0x93, 0x00, 0x4e, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0x9a, 0x2d, + 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0x00, 0xbd, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, + 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, + 0x84, 0xee, 0x9f, 0x41, 0xe3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x99, + 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, + 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x75, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x70, 0x69, 0x5f, + 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, 0x84, + 0xee, 0x9f, 0x41, 0xe3, 0x55, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0x99, 0xe3, + 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x76, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x6f, 0x72, 0x65, + 0x70, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0xf2, 0x9b, 0x9a, 0x2d, 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0xf1, + 0xfd, 0xdd, 0x30, 0x0e, 0xc6, 0xac, 0x5e, 0x7a, 0x4b, 0xda, 0xf7, 0xa4, 0xdc, 0xc7, 0xf2, 0xf8, + 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0xf1, 0x8f, 0x78, + 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xf2, 0x0c, 0xd7, 0x3d, + 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0xf1, 0xe7, 0xaa, 0x98, 0x61, + 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, + 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, + 0x25, 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xfd, 0xdd, 0x30, 0x0e, 0xc6, 0xac, 0x5e, 0x7a, 0x4b, 0xda, 0xf7, + 0xa4, 0xdc, 0xc7, 0x00, 0x75, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, + 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x00, 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, + 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0x00, 0x37, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0x9a, 0x2d, + 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0x00, 0xc1, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, + 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0x00, 0x59, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x00, + 0x7a, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::RequestHeader_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::RequestHeader_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::RequestHeader_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::RequestHeader_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::RequestHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.lease(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.policy(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::RequestHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestHeader_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::RequestHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.lease(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.policy(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::RequestHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestHeader_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::RequestHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.lease(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.policy(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::RequestHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestHeader_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::RequestHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.lease(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.policy(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::RequestHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestHeader_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_REQUESTHEADER__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..07b73d0caf673c6452f2a66f4f524b162083154d --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp @@ -0,0 +1,302 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: RequestIdentity_.idl + Source: RequestIdentity_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_REQUESTIDENTITY__HPP +#define DDSCXX_REQUESTIDENTITY__HPP + +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class RequestIdentity_ +{ +private: + int64_t id_ = 0; + int64_t api_id_ = 0; + +public: + RequestIdentity_() = default; + + explicit RequestIdentity_( + int64_t id, + int64_t api_id) : + id_(id), + api_id_(api_id) { } + + int64_t id() const { return this->id_; } + int64_t& id() { return this->id_; } + void id(int64_t _val_) { this->id_ = _val_; } + int64_t api_id() const { return this->api_id_; } + int64_t& api_id() { return this->api_id_; } + void api_id(int64_t _val_) { this->api_id_ = _val_; } + + bool operator==(const RequestIdentity_& _other) const + { + (void) _other; + return id_ == _other.id_ && + api_id_ == _other.api_id_; + } + + bool operator!=(const RequestIdentity_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::getTypeName() +{ + return "unitree_api::msg::dds_::RequestIdentity_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::type_map_blob_sz() { return 266; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, + 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xd3, 0x3a, 0xff, 0x5d, 0x00, + 0x8d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, + 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x75, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x70, 0x69, 0x5f, 0x69, 0x64, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, + 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0xf1, 0x8f, 0x78, 0x20, 0x91, + 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, + 0xd6, 0x60, 0xe6, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, + 0x3c, 0xdd, 0x22, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::RequestIdentity_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::RequestIdentity_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::RequestIdentity_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::RequestIdentity_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::RequestIdentity_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.api_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::RequestIdentity_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestIdentity_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::RequestIdentity_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.api_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::RequestIdentity_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestIdentity_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::RequestIdentity_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.api_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::RequestIdentity_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestIdentity_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::RequestIdentity_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.api_id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::RequestIdentity_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestIdentity_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_REQUESTIDENTITY__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..036412f9e76946d7d62b4ed239db913a38d2a2fd --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp @@ -0,0 +1,260 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: RequestLease_.idl + Source: RequestLease_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_REQUESTLEASE__HPP +#define DDSCXX_REQUESTLEASE__HPP + +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class RequestLease_ +{ +private: + int64_t id_ = 0; + +public: + RequestLease_() = default; + + explicit RequestLease_( + int64_t id) : + id_(id) { } + + int64_t id() const { return this->id_; } + int64_t& id() { return this->id_; } + void id(int64_t _val_) { this->id_ = _val_; } + + bool operator==(const RequestLease_& _other) const + { + (void) _other; + return id_ == _other.id_; + } + + bool operator!=(const RequestLease_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::RequestLease_>::getTypeName() +{ + return "unitree_api::msg::dds_::RequestLease_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::RequestLease_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestLease_>::type_map_blob_sz() { return 218; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestLease_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestLease_>::type_map_blob() { + static const uint8_t blob[] = { + 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, + 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0x00, + 0x6d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, + 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0x00, 0x55, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x5f, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, + 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0xf1, 0xe7, 0xaa, 0x98, 0x61, + 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestLease_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, + 0x89, 0x3f, 0xca, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, 0x84, 0xee, + 0x9f, 0x41, 0xe3, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::RequestLease_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::RequestLease_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::RequestLease_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::RequestLease_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::RequestLease_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::RequestLease_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestLease_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::RequestLease_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::RequestLease_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestLease_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::RequestLease_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::RequestLease_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestLease_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::RequestLease_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.id())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::RequestLease_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestLease_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_REQUESTLEASE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1ff9ecc9187ecf9d8f1fecaf22e0da3bc41a53fa --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp @@ -0,0 +1,302 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: RequestPolicy_.idl + Source: RequestPolicy_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_REQUESTPOLICY__HPP +#define DDSCXX_REQUESTPOLICY__HPP + +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class RequestPolicy_ +{ +private: + int32_t priority_ = 0; + bool noreply_ = false; + +public: + RequestPolicy_() = default; + + explicit RequestPolicy_( + int32_t priority, + bool noreply) : + priority_(priority), + noreply_(noreply) { } + + int32_t priority() const { return this->priority_; } + int32_t& priority() { return this->priority_; } + void priority(int32_t _val_) { this->priority_ = _val_; } + bool noreply() const { return this->noreply_; } + bool& noreply() { return this->noreply_; } + void noreply(bool _val_) { this->noreply_ = _val_; } + + bool operator==(const RequestPolicy_& _other) const + { + (void) _other; + return priority_ == _other.priority_ && + noreply_ == _other.noreply_; + } + + bool operator!=(const RequestPolicy_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::getTypeName() +{ + return "unitree_api::msg::dds_::RequestPolicy_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::type_map_blob_sz() { return 266; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::type_map_blob() { + static const uint8_t blob[] = { + 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, + 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xb9, 0x88, 0x29, 0x5c, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x14, 0x70, 0x9c, 0x93, 0x00, + 0x8e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, + 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x70, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x99, 0xe3, 0xb9, + 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0xf1, 0x76, 0x57, 0x81, 0x5a, + 0xa1, 0x5f, 0x25, 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, 0x32, 0xc9, 0x00, 0x8d, + 0x48, 0x4d, 0x4f, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, + 0x89, 0x7a, 0x17, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::RequestPolicy_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::RequestPolicy_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::RequestPolicy_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::RequestPolicy_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::RequestPolicy_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.priority())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.noreply())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::RequestPolicy_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestPolicy_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::RequestPolicy_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.priority())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.noreply())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::RequestPolicy_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestPolicy_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::RequestPolicy_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.priority())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.noreply())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::RequestPolicy_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestPolicy_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::RequestPolicy_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.priority())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.noreply())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::RequestPolicy_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::RequestPolicy_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_REQUESTPOLICY__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Request_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Request_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f900a54ace095c3fafa9650fcd38f1732d2d6b67 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Request_.hpp @@ -0,0 +1,477 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Request_.idl + Source: Request_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_REQUEST__HPP +#define DDSCXX_REQUEST__HPP + +#include "RequestHeader_.hpp" + +#include +#include +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class Request_ +{ +private: + ::unitree_api::msg::dds_::RequestHeader_ header_; + std::string parameter_; + std::vector binary_; + +public: + Request_() = default; + + explicit Request_( + const ::unitree_api::msg::dds_::RequestHeader_& header, + const std::string& parameter, + const std::vector& binary) : + header_(header), + parameter_(parameter), + binary_(binary) { } + + const ::unitree_api::msg::dds_::RequestHeader_& header() const { return this->header_; } + ::unitree_api::msg::dds_::RequestHeader_& header() { return this->header_; } + void header(const ::unitree_api::msg::dds_::RequestHeader_& _val_) { this->header_ = _val_; } + void header(::unitree_api::msg::dds_::RequestHeader_&& _val_) { this->header_ = _val_; } + const std::string& parameter() const { return this->parameter_; } + std::string& parameter() { return this->parameter_; } + void parameter(const std::string& _val_) { this->parameter_ = _val_; } + void parameter(std::string&& _val_) { this->parameter_ = _val_; } + const std::vector& binary() const { return this->binary_; } + std::vector& binary() { return this->binary_; } + void binary(const std::vector& _val_) { this->binary_ = _val_; } + void binary(std::vector&& _val_) { this->binary_ = _val_; } + + bool operator==(const Request_& _other) const + { + (void) _other; + return header_ == _other.header_ && + parameter_ == _other.parameter_ && + binary_ == _other.binary_; + } + + bool operator!=(const Request_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::Request_>::getTypeName() +{ + return "unitree_api::msg::dds_::Request_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::Request_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::Request_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::Request_>::type_map_blob_sz() { return 1382; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::Request_>::type_info_blob_sz() { return 292; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::Request_>::type_map_blob() { + static const uint8_t blob[] = { + 0xbb, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf1, 0xcb, 0xa4, 0xdc, 0x96, 0x5d, 0x39, 0x3a, + 0xda, 0x76, 0xb4, 0xde, 0x08, 0x19, 0x25, 0x00, 0x58, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xfd, 0xdd, 0x30, 0x0e, 0xc6, + 0xac, 0x5e, 0x7a, 0x4b, 0xda, 0xf7, 0xa4, 0xdc, 0xc7, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x03, 0x14, 0x4c, 0xce, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x9d, 0x71, 0x83, 0xf1, 0xf1, 0xfd, 0xdd, 0x30, 0x0e, 0xc6, 0xac, 0x5e, 0x7a, 0x4b, 0xda, 0xf7, + 0xa4, 0xdc, 0xc7, 0x00, 0x71, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, + 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xff, 0x48, 0x3d, 0x1f, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, 0x20, 0x9b, + 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x1a, 0xdc, 0x13, 0xcf, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, 0x32, 0xc9, + 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0xf4, 0xaf, 0x8b, 0x57, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, + 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xd3, 0x3a, 0xff, 0x5d, 0xf1, + 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, 0x32, + 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xb9, 0x88, 0x29, 0x5c, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x14, 0x70, 0x9c, 0x93, 0x00, + 0x02, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0x7a, 0x44, 0x29, 0xfc, 0xbf, 0x53, + 0x94, 0x86, 0x49, 0x87, 0x53, 0xc4, 0x8f, 0x00, 0xa1, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x00, 0x00, 0x00, 0x00, + 0x69, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0x9b, 0x9a, 0x2d, 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, + 0xdb, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x07, 0x00, 0x00, 0x00, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0x9a, + 0x2d, 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0xbd, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, + 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, + 0x84, 0xee, 0x9f, 0x41, 0xe3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x99, + 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, + 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x75, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x70, 0x69, 0x5f, + 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, 0x27, 0x8f, 0x84, + 0xee, 0x9f, 0x41, 0xe3, 0x55, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0x99, 0xe3, + 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x76, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x6f, 0x72, 0x65, + 0x70, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0xf2, 0xc4, 0x7a, 0x44, 0x29, 0xfc, 0xbf, 0x53, 0x94, 0x86, 0x49, 0x87, 0x53, 0xc4, 0x8f, 0xf1, + 0xcb, 0xa4, 0xdc, 0x96, 0x5d, 0x39, 0x3a, 0xda, 0x76, 0xb4, 0xde, 0x08, 0x19, 0x25, 0xf2, 0x9b, + 0x9a, 0x2d, 0x50, 0x17, 0x56, 0xf6, 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0xf1, 0xfd, 0xdd, + 0x30, 0x0e, 0xc6, 0xac, 0x5e, 0x7a, 0x4b, 0xda, 0xf7, 0xa4, 0xdc, 0xc7, 0xf2, 0xf8, 0x8b, 0x48, + 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0xf1, 0x8f, 0x78, 0x20, 0x91, + 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, + 0x87, 0xee, 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, + 0x22, 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, + 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, 0x32, + 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::Request_>::type_info_blob() { + static const uint8_t blob[] = { + 0x20, 0x01, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0xcb, 0xa4, 0xdc, 0x96, 0x5d, 0x39, 0x3a, 0xda, 0x76, 0xb4, 0xde, + 0x08, 0x19, 0x25, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xfd, 0xdd, 0x30, 0x0e, 0xc6, 0xac, 0x5e, + 0x7a, 0x4b, 0xda, 0xf7, 0xa4, 0xdc, 0xc7, 0x00, 0x75, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xe7, 0xaa, 0x98, 0x61, 0xf7, 0xb0, 0x22, + 0x20, 0x9b, 0xda, 0x6c, 0x89, 0x3f, 0xca, 0x00, 0x27, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x76, 0x57, 0x81, 0x5a, 0xa1, 0x5f, 0x25, 0x32, 0xc9, 0x00, 0x8d, 0x48, 0x4d, 0x4f, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0x7a, 0x44, 0x29, 0xfc, 0xbf, 0x53, 0x94, 0x86, 0x49, 0x87, + 0x53, 0xc4, 0x8f, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x9b, 0x9a, 0x2d, 0x50, 0x17, 0x56, 0xf6, + 0x0f, 0x8c, 0x92, 0x41, 0xb0, 0xee, 0xdb, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, + 0x79, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0c, 0xd7, 0x3d, 0x1a, 0x1e, 0x87, 0xee, + 0x27, 0x8f, 0x84, 0xee, 0x9f, 0x41, 0xe3, 0x00, 0x59, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x99, 0xe3, 0xb9, 0xf0, 0xba, 0xac, 0xdc, 0x09, 0x3a, 0x18, 0x6d, 0x89, 0x7a, 0x17, 0x00, + 0x7a, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::Request_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::Request_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::Request_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::Request_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::Request_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.parameter(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.binary()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::Request_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Request_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::Request_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.parameter(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!read(streamer, se_1)) + return false; + instance.binary().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.binary()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::Request_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Request_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::Request_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.parameter(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::Request_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Request_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::Request_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.parameter(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::Request_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Request_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_REQUEST__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..701937b4a2f58a777046a53ea86dead0c978d2a1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp @@ -0,0 +1,344 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: ResponseHeader_.idl + Source: ResponseHeader_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_RESPONSEHEADER__HPP +#define DDSCXX_RESPONSEHEADER__HPP + +#include "RequestIdentity_.hpp" + +#include "ResponseStatus_.hpp" + + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class ResponseHeader_ +{ +private: + ::unitree_api::msg::dds_::RequestIdentity_ identity_; + ::unitree_api::msg::dds_::ResponseStatus_ status_; + +public: + ResponseHeader_() = default; + + explicit ResponseHeader_( + const ::unitree_api::msg::dds_::RequestIdentity_& identity, + const ::unitree_api::msg::dds_::ResponseStatus_& status) : + identity_(identity), + status_(status) { } + + const ::unitree_api::msg::dds_::RequestIdentity_& identity() const { return this->identity_; } + ::unitree_api::msg::dds_::RequestIdentity_& identity() { return this->identity_; } + void identity(const ::unitree_api::msg::dds_::RequestIdentity_& _val_) { this->identity_ = _val_; } + void identity(::unitree_api::msg::dds_::RequestIdentity_&& _val_) { this->identity_ = _val_; } + const ::unitree_api::msg::dds_::ResponseStatus_& status() const { return this->status_; } + ::unitree_api::msg::dds_::ResponseStatus_& status() { return this->status_; } + void status(const ::unitree_api::msg::dds_::ResponseStatus_& _val_) { this->status_ = _val_; } + void status(::unitree_api::msg::dds_::ResponseStatus_&& _val_) { this->status_ = _val_; } + + bool operator==(const ResponseHeader_& _other) const + { + (void) _other; + return identity_ == _other.identity_ && + status_ == _other.status_; + } + + bool operator!=(const ResponseHeader_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::getTypeName() +{ + return "unitree_api::msg::dds_::ResponseHeader_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::type_map_blob_sz() { return 754; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::type_info_blob_sz() { return 196; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::type_map_blob() { + static const uint8_t blob[] = { + 0xe7, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, + 0x25, 0xe7, 0x3c, 0x21, 0xef, 0xbf, 0xee, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, + 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xff, 0x48, 0x3d, 0x1f, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, + 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x9a, 0xcb, 0x44, 0x54, 0xf1, 0x8f, 0x78, + 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x33, 0x00, 0x00, 0x00, + 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, + 0x0b, 0xb7, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xd3, + 0x3a, 0xff, 0x5d, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, + 0x73, 0x40, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xc1, 0x33, 0x67, 0x94, 0x00, 0x9f, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, + 0x07, 0xeb, 0x3e, 0x00, 0x95, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, + 0x59, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, + 0x22, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x1a, + 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, + 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x75, 0x00, 0x00, 0x00, + 0xf2, 0x51, 0x01, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, + 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x70, 0x69, 0x5f, + 0x69, 0x64, 0x00, 0x00, 0x00, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, + 0x0c, 0xff, 0x55, 0xda, 0x57, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x00, + 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, + 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, + 0x7f, 0xf8, 0x91, 0x0c, 0x07, 0xeb, 0x3e, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, 0x25, + 0xe7, 0x3c, 0x21, 0xef, 0xbf, 0xee, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, + 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, + 0xe7, 0xd6, 0x60, 0xe6, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, + 0xff, 0x55, 0xda, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, + 0x73, 0x40, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::type_info_blob() { + static const uint8_t blob[] = { + 0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, 0x25, 0xe7, 0x3c, 0x21, + 0xef, 0xbf, 0xee, 0x00, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, + 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x00, 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, + 0x07, 0xeb, 0x3e, 0x00, 0x99, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, + 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x79, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0x00, + 0x5b, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::ResponseHeader_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::ResponseHeader_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::ResponseHeader_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::ResponseHeader_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::ResponseHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.status(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::ResponseHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseHeader_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::ResponseHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.status(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::ResponseHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseHeader_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::ResponseHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.status(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::ResponseHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseHeader_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::ResponseHeader_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.identity(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.status(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::ResponseHeader_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseHeader_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_RESPONSEHEADER__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bd8f5556053062e08ca7682602f65c1f2cd85a3c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp @@ -0,0 +1,260 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: ResponseStatus_.idl + Source: ResponseStatus_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_RESPONSESTATUS__HPP +#define DDSCXX_RESPONSESTATUS__HPP + +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class ResponseStatus_ +{ +private: + int32_t code_ = 0; + +public: + ResponseStatus_() = default; + + explicit ResponseStatus_( + int32_t code) : + code_(code) { } + + int32_t code() const { return this->code_; } + int32_t& code() { return this->code_; } + void code(int32_t _val_) { this->code_ = _val_; } + + bool operator==(const ResponseStatus_& _other) const + { + (void) _other; + return code_ == _other.code_; + } + + bool operator!=(const ResponseStatus_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::getTypeName() +{ + return "unitree_api::msg::dds_::ResponseStatus_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::type_map_blob_sz() { return 218; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::type_info_blob_sz() { return 100; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::type_map_blob() { + static const uint8_t blob[] = { + 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, + 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0xc1, 0x33, 0x67, 0x94, 0x00, + 0x6f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, + 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0x00, 0x57, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x5f, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x64, 0x65, + 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x1a, 0x4c, 0x7d, + 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0xf1, 0x5b, 0x67, 0x75, 0x71, + 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::type_info_blob() { + static const uint8_t blob[] = { + 0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, + 0xf9, 0x73, 0x40, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, + 0xff, 0x55, 0xda, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::ResponseStatus_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::ResponseStatus_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::ResponseStatus_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::ResponseStatus_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::ResponseStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::ResponseStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseStatus_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::ResponseStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::ResponseStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseStatus_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::ResponseStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::ResponseStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseStatus_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::ResponseStatus_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.code())) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::ResponseStatus_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::ResponseStatus_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_RESPONSESTATUS__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Response_.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Response_.hpp new file mode 100644 index 0000000000000000000000000000000000000000..37299c977b7878c79b8ef756f31dba079d703fcf --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_idl_decl/Response_.hpp @@ -0,0 +1,454 @@ +/**************************************************************** + + Generated by Eclipse Cyclone DDS IDL to CXX Translator + File name: Response_.idl + Source: Response_.hpp + Cyclone DDS: v0.10.2 + +*****************************************************************/ +#ifndef DDSCXX_RESPONSE__HPP +#define DDSCXX_RESPONSE__HPP + +#include "ResponseHeader_.hpp" + +#include +#include +#include + +namespace unitree_api +{ +namespace msg +{ +namespace dds_ +{ +class Response_ +{ +private: + ::unitree_api::msg::dds_::ResponseHeader_ header_; + std::string data_; + std::vector binary_; + +public: + Response_() = default; + + explicit Response_( + const ::unitree_api::msg::dds_::ResponseHeader_& header, + const std::string& data, + const std::vector& binary) : + header_(header), + data_(data), + binary_(binary) { } + + const ::unitree_api::msg::dds_::ResponseHeader_& header() const { return this->header_; } + ::unitree_api::msg::dds_::ResponseHeader_& header() { return this->header_; } + void header(const ::unitree_api::msg::dds_::ResponseHeader_& _val_) { this->header_ = _val_; } + void header(::unitree_api::msg::dds_::ResponseHeader_&& _val_) { this->header_ = _val_; } + const std::string& data() const { return this->data_; } + std::string& data() { return this->data_; } + void data(const std::string& _val_) { this->data_ = _val_; } + void data(std::string&& _val_) { this->data_ = _val_; } + const std::vector& binary() const { return this->binary_; } + std::vector& binary() { return this->binary_; } + void binary(const std::vector& _val_) { this->binary_ = _val_; } + void binary(std::vector&& _val_) { this->binary_ = _val_; } + + bool operator==(const Response_& _other) const + { + (void) _other; + return header_ == _other.header_ && + data_ == _other.data_ && + binary_ == _other.binary_; + } + + bool operator!=(const Response_& _other) const + { + return !(*this == _other); + } + +}; + +} + +} + +} + +#include "dds/topic/TopicTraits.hpp" +#include "org/eclipse/cyclonedds/topic/datatopic.hpp" + +namespace org { +namespace eclipse { +namespace cyclonedds { +namespace topic { + +template <> constexpr const char* TopicTraits<::unitree_api::msg::dds_::Response_>::getTypeName() +{ + return "unitree_api::msg::dds_::Response_"; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::Response_>::isSelfContained() +{ + return false; +} + +template <> constexpr bool TopicTraits<::unitree_api::msg::dds_::Response_>::isKeyless() +{ + return true; +} + +#ifdef DDSCXX_HAS_TYPE_DISCOVERY +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::Response_>::type_map_blob_sz() { return 1068; } +template<> constexpr unsigned int TopicTraits<::unitree_api::msg::dds_::Response_>::type_info_blob_sz() { return 244; } +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::Response_>::type_map_blob() { + static const uint8_t blob[] = { + 0x53, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xf1, 0x48, 0xc9, 0x97, 0xd3, 0x79, 0xc3, 0xe1, + 0x8c, 0x53, 0x0b, 0x5f, 0x8f, 0xe9, 0x46, 0x00, 0x58, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, + 0x26, 0x2e, 0x25, 0xe7, 0x3c, 0x21, 0xef, 0xbf, 0xee, 0x09, 0x9f, 0xb9, 0x95, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x8d, 0x77, 0x7f, 0x38, + 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, + 0x9d, 0x71, 0x83, 0xf1, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, 0x25, 0xe7, 0x3c, 0x21, + 0xef, 0xbf, 0xee, 0x00, 0x51, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, + 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xff, 0x48, 0x3d, 0x1f, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, + 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x9a, 0xcb, 0x44, 0x54, 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, + 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xb8, 0x0b, 0xb7, 0x74, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xd3, 0x3a, 0xff, 0x5d, 0xf1, + 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x04, 0xc1, 0x33, 0x67, 0x94, 0x00, 0x4f, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0xf2, 0xd1, 0xc3, 0x2c, 0xc0, 0x22, 0x14, 0x90, 0x1a, 0x46, 0x4a, 0x6c, 0x51, 0x32, 0x5d, 0x00, + 0x9d, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, + 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, + 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, 0x07, 0xeb, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61, + 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, + 0x01, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x00, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x00, 0x00, + 0x00, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, 0x07, 0xeb, 0x3e, + 0x95, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, + 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x00, 0x59, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0xf8, + 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, + 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, + 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x75, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, + 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, + 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, + 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x70, 0x69, 0x5f, 0x69, 0x64, 0x00, 0x00, + 0x00, 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, + 0x57, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3a, + 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x00, 0x1b, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0xc3, 0x2c, 0xc0, 0x22, 0x14, 0x90, 0x1a, 0x46, 0x4a, 0x6c, + 0x51, 0x32, 0x5d, 0xf1, 0x48, 0xc9, 0x97, 0xd3, 0x79, 0xc3, 0xe1, 0x8c, 0x53, 0x0b, 0x5f, 0x8f, + 0xe9, 0x46, 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, 0x07, 0xeb, + 0x3e, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, 0x25, 0xe7, 0x3c, 0x21, 0xef, 0xbf, 0xee, + 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0xf1, + 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0xf2, 0x1a, + 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0xf1, 0x5b, 0x67, + 0x75, 0x71, 0x30, 0x34, 0xdf, 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, }; + return blob; +} +template<> inline const uint8_t * TopicTraits<::unitree_api::msg::dds_::Response_>::type_info_blob() { + static const uint8_t blob[] = { + 0xf0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0xf1, 0x48, 0xc9, 0x97, 0xd3, 0x79, 0xc3, 0xe1, 0x8c, 0x53, 0x0b, 0x5f, + 0x8f, 0xe9, 0x46, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x9c, 0x43, 0xe5, 0x09, 0xd9, 0x26, 0x2e, + 0x25, 0xe7, 0x3c, 0x21, 0xef, 0xbf, 0xee, 0x00, 0x55, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf1, 0x8f, 0x78, 0x20, 0x91, 0xd8, 0x0b, 0x89, 0x0d, 0xad, 0xf3, 0xe7, 0xd6, 0x60, 0xe6, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x5b, 0x67, 0x75, 0x71, 0x30, 0x34, 0xdf, + 0x53, 0x23, 0x66, 0x5f, 0xf9, 0x73, 0x40, 0x00, 0x27, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, + 0x70, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0xc3, 0x2c, + 0xc0, 0x22, 0x14, 0x90, 0x1a, 0x46, 0x4a, 0x6c, 0x51, 0x32, 0x5d, 0x00, 0xa1, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x0f, 0x90, 0xcc, 0xa0, 0xee, 0x3b, 0x25, 0x7f, 0xf8, 0x91, 0x0c, 0x07, 0xeb, 0x3e, 0x00, + 0x99, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xf8, 0x8b, 0x48, 0x81, 0xc6, 0xcf, 0x5a, + 0x29, 0xdc, 0xd6, 0x89, 0x3c, 0xdd, 0x22, 0x00, 0x79, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xf2, 0x1a, 0x4c, 0x7d, 0xe4, 0xfc, 0x64, 0xee, 0x04, 0x5d, 0x30, 0x0c, 0xff, 0x55, 0xda, 0x00, + 0x5b, 0x00, 0x00, 0x00, }; + return blob; +} +#endif //DDSCXX_HAS_TYPE_DISCOVERY + +} //namespace topic +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +namespace dds { +namespace topic { + +template <> +struct topic_type_name<::unitree_api::msg::dds_::Response_> +{ + static std::string value() + { + return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_api::msg::dds_::Response_>::getTypeName(); + } +}; + +} +} + +REGISTER_TOPIC_TYPE(::unitree_api::msg::dds_::Response_) + +namespace org{ +namespace eclipse{ +namespace cyclonedds{ +namespace core{ +namespace cdr{ + +template<> +propvec &get_type_props<::unitree_api::msg::dds_::Response_>(); + +template::value, bool> = true > +bool write(T& streamer, const ::unitree_api::msg::dds_::Response_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!write(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!write_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!write(streamer, se_1)) + return false; + if (se_1 > 0 && + !write(streamer, instance.binary()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool write(S& str, const ::unitree_api::msg::dds_::Response_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Response_>(); + str.set_mode(cdr_stream::stream_mode::write, as_key); + return write(str, instance, props.data()); +} + +template::value, bool> = true > +bool read(T& streamer, ::unitree_api::msg::dds_::Response_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!read(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!read_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!read(streamer, se_1)) + return false; + instance.binary().resize(se_1); + if (se_1 > 0 && + !read(streamer, instance.binary()[0], se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool read(S& str, ::unitree_api::msg::dds_::Response_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Response_>(); + str.set_mode(cdr_stream::stream_mode::read, as_key); + return read(str, instance, props.data()); +} + +template::value, bool> = true > +bool move(T& streamer, const ::unitree_api::msg::dds_::Response_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!move(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!move_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = uint32_t(instance.binary().size()); + if (!move(streamer, se_1)) + return false; + if (se_1 > 0 && + !move(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool move(S& str, const ::unitree_api::msg::dds_::Response_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Response_>(); + str.set_mode(cdr_stream::stream_mode::move, as_key); + return move(str, instance, props.data()); +} + +template::value, bool> = true > +bool max(T& streamer, const ::unitree_api::msg::dds_::Response_& instance, entity_properties_t *props) { + (void)instance; + if (!streamer.start_struct(*props)) + return false; + auto prop = streamer.first_entity(props); + while (prop) { + switch (prop->m_id) { + case 0: + if (!streamer.start_member(*prop)) + return false; + if (!max(streamer, instance.header(), prop)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 1: + if (!streamer.start_member(*prop)) + return false; + if (!max_string(streamer, instance.data(), 0)) + return false; + if (!streamer.finish_member(*prop)) + return false; + break; + case 2: + if (!streamer.start_member(*prop)) + return false; + if (!streamer.start_consecutive(false, true)) + return false; + { + uint32_t se_1 = 0; + if (!max(streamer, se_1)) + return false; + if (se_1 > 0 && + !max(streamer, uint8_t(), se_1)) + return false; + } //end sequence 1 + if (!streamer.finish_consecutive()) + return false; + streamer.position(SIZE_MAX); + if (!streamer.finish_member(*prop)) + return false; + break; + } + prop = streamer.next_entity(prop); + } + return streamer.finish_struct(*props); +} + +template::value, bool> = true > +bool max(S& str, const ::unitree_api::msg::dds_::Response_& instance, bool as_key) { + auto &props = get_type_props<::unitree_api::msg::dds_::Response_>(); + str.set_mode(cdr_stream::stream_mode::max, as_key); + return max(str, instance, props.data()); +} + +} //namespace cdr +} //namespace core +} //namespace cyclonedds +} //namespace eclipse +} //namespace org + +#endif // DDSCXX_RESPONSE__HPP diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_request_response.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_request_response.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b9ebf1d3b8a696caedabd9e4cd418a3c9fd8858b --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/internal/internal_request_response.hpp @@ -0,0 +1,23 @@ +#ifndef __UT_ROBOT_INTERNAL_REQUEST_RESPONSE_HPP__ +#define __UT_ROBOT_INTERNAL_REQUEST_RESPONSE_HPP__ + +#include +#include + +namespace unitree +{ +namespace robot +{ +using RequestIdentity = unitree_api::msg::dds_::RequestIdentity_; +using RequestLease = unitree_api::msg::dds_::RequestLease_; +using RequestPolicy = unitree_api::msg::dds_::RequestPolicy_; +using RequestHeader = unitree_api::msg::dds_::RequestHeader_; +using Request = unitree_api::msg::dds_::Request_; + +using ResponseStatus = unitree_api::msg::dds_::ResponseStatus_; +using ResponseHeader = unitree_api::msg::dds_::ResponseHeader_; +using Response = unitree_api::msg::dds_::Response_; +} +} + +#endif//__UT_ROBOT_INTERNAL_REQUEST_RESPONSE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/serialize/serialize.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/serialize/serialize.hpp new file mode 100644 index 0000000000000000000000000000000000000000..700717666d3f7d21571010228dd96d3521fb6899 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/serialize/serialize.hpp @@ -0,0 +1,43 @@ +#ifndef __UT_ROBOT_SDK_SERIALIZE_HPP__ +#define __UT_ROBOT_SDK_SERIALIZE_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +template +inline bool Serialize(const T& instance, std::string& serialziedData) +{ + try + { + serialziedData = common::ToJsonString(instance); + } + catch(const common::Exception& e) + { + return false; + } + + return true; +} + +template +inline bool Deserialize(const std::string& serialziedData, T& instance) +{ + try + { + instance = common::FromJsonString(serialziedData); + } + catch(const common::Exception& e) + { + return false; + } + + return true; +} + +} +} + +#endif//__UT_ROBOT_SDK_SERIALIZE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/lease_server.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/lease_server.hpp new file mode 100644 index 0000000000000000000000000000000000000000..7db2c819836eb09d6c630eb84927ccd4f90c3e06 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/lease_server.hpp @@ -0,0 +1,60 @@ +#ifndef __UT_ROBOT_LEASE_SERVER_HPP__ +#define __UT_ROBOT_LEASE_SERVER_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +class LeaseCache +{ +public: + LeaseCache(); + ~LeaseCache(); + + void Set(int64_t id, const std::string& mName, int64_t lastModified = 0); + void Renewal(int64_t lastModified = 0); + void Clear(); + + int64_t GetLastModified() const; + int64_t GetId() const; + const std::string& GetName() const; + +private: + int64_t mLastModified; + int64_t mId; + std::string mName; +}; + +class LeaseServer : public ServerBase +{ +public: + explicit LeaseServer(const std::string& name, int64_t term); + ~LeaseServer(); + + void Init(); + + bool CheckRequestLeaseDenied(int64_t leaseId); + +private: + void ServerRequestHandler(const RequestPtr& request); + + int32_t Apply(const std::string& parameter, std::string& data); + int32_t Renewal(int64_t leaseId); + + int64_t GenerateId(const std::string& name); + +private: + int64_t mTerm; + LeaseCache mCache; + common::Mutex mMutex; + ServerStubPtr mServerStubPtr; +}; + +using LeaseServerPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_LEASE_SERVER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server.hpp new file mode 100644 index 0000000000000000000000000000000000000000..abef09c9692f8c1915765fb826566c28e8bbf40e --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server.hpp @@ -0,0 +1,77 @@ +#ifndef __UT_ROBOT_SDK_SERVER_HPP__ +#define __UT_ROBOT_SDK_SERVER_HPP__ + +#include +#include + +#define UT_ROBOT_SERVER_REG_API_HANDLER_NO_LEASE(apiId, handler) \ + UT_ROBOT_SERVER_REG_API_HANDLER(apiId, handler, false) + +#define UT_ROBOT_SERVER_REG_API_BINARY_HANDLER_NO_LEASE(apiId, handler) \ + UT_ROBOT_SERVER_REG_API_BINARY_HANDLER(apiId, handler, false) + +#define UT_ROBOT_SERVER_REG_API_HANDLER(apiId, handler, checkLease) \ + RegistHandler(apiId, std::bind(handler, this, std::placeholders::_1, std::placeholders::_2), checkLease) + +#define UT_ROBOT_SERVER_REG_API_BINARY_HANDLER(apiId, handler, checkLease) \ + RegistBinaryHandler(apiId, std::bind(handler, this, std::placeholders::_1, std::placeholders::_2), checkLease) + +namespace unitree +{ +namespace robot +{ +using RequestHandler = std::function; +using BinaryRequestHandler = std::function& parameter, std::vector& data)>; + +class Server : public ServerBase +{ +public: + explicit Server(const std::string& name); + virtual ~Server(); + + virtual void Init() = 0; + + void StartLease(int64_t leaseTerm); + void StartLease(float leaseTerm); + + const std::string& GetName(); + const std::string& GetApiVersion() const; + + int32_t GetCurrentApiId() const; + +protected: + void SetApiVersion(const std::string& version); + + void ServerRequestHandler(const RequestPtr& request); + + void RegistHandler(int32_t apiId, const RequestHandler& handler, bool checkLease = false); + void RegistBinaryHandler(int32_t apiId, const BinaryRequestHandler& binaryHandler, bool checkLease = false); + + bool IsBinary(int32_t apiId); + + RequestHandler GetHandler(int32_t apiId, bool& ignoreLease) const; + BinaryRequestHandler GetBinaryHandler(int32_t apiId, bool& ignoreLease) const; + + bool CheckLeaseDenied(int64_t leaseId); + +private: + bool mEnableLease; + std::string mName; + std::string mApiVersion; + std::unordered_map> mApiHandlerMap; + std::unordered_map> mApiBinaryHandlerMap; + + std::set mApiBinarySet; + + LeaseServerPtr mLeaseServerPtr; + +private: + static thread_local int32_t mCurrentApiId; +}; + +using ServerPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_SERVER_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_base.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_base.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3158980cfdefe3b0b762fd585c8285601a644afa --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_base.hpp @@ -0,0 +1,35 @@ +#ifndef __UT_ROBOT_SDK_SERVER_BASE_HPP__ +#define __UT_ROBOT_SDK_SERVER_BASE_HPP__ + +#include + +namespace unitree +{ +namespace robot +{ +class ServerBase +{ +public: + explicit ServerBase(const std::string& name); + virtual ~ServerBase(); + + virtual void Init() = 0; + virtual void Start(bool enableProiQueue = false); + + const std::string& GetName() const; + +protected: + virtual void ServerRequestHandler(const RequestPtr& request) = 0; + void SendResponse(const Response& response); + +protected: + std::string mName; + ServerStubPtr mServerStubPtr; +}; + +using ServerBasePtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_SERVER_BASE_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_stub.hpp b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_stub.hpp new file mode 100644 index 0000000000000000000000000000000000000000..02b8709a2364bf0815de849dd4848954a0de9c8c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/include/unitree/robot/server/server_stub.hpp @@ -0,0 +1,46 @@ +#ifndef __UT_ROBOT_SDK_SERVER_STUB_HPP__ +#define __UT_ROBOT_SDK_SERVER_STUB_HPP__ + +#include +#include +#include +#include + +namespace unitree +{ +namespace robot +{ +using ServerRequestHandler = std::function; + +class ServerStub +{ +public: + explicit ServerStub(); + ~ServerStub(); + + void Init(const std::string& name, const ServerRequestHandler& handler, bool enableProiQueue); + bool Send(const Response& response, int64_t timeout = 0); + +private: + void Enqueue(const void* message); + + int32_t QueueThreadFunction(); + int32_t ProiQueueThreadFunction(); + +private: + bool mEnableProiQueue; + bool mRunning; + ServerRequestHandler mRequestHandler; + ChannelLaborPtr mChannelLaborPtr; + common::BlockQueuePtr mQueuePtr; + common::BlockQueuePtr mProiQueuePtr; + common::ThreadPtr mQueueThreadPtr; + common::ThreadPtr mProiQueueThreadPtr; +}; + +using ServerStubPtr = std::shared_ptr; + +} +} + +#endif//__UT_ROBOT_SDK_SERVER_STUB_HPP__ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/Tencent/rapidjson/LICENSE b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/Tencent/rapidjson/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7ccc161c84b243687498a0dae5043c1da6173ac4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/Tencent/rapidjson/LICENSE @@ -0,0 +1,57 @@ +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. + +If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. +If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license. +A copy of the MIT License is included in this file. + +Other dependencies and licenses: + +Open Source Software Licensed Under the BSD License: +-------------------------------------------------------------------- + +The msinttypes r29 +Copyright (c) 2006-2013 Alexander Chemeris +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Open Source Software Licensed Under the JSON License: +-------------------------------------------------------------------- + +json.org +Copyright (c) 2002 JSON.org +All Rights Reserved. + +JSON_checker +Copyright (c) 2002 JSON.org +All Rights Reserved. + + +Terms of the JSON License: +--------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Terms of the MIT License: +-------------------------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds-cxx/LICENSE b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds-cxx/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..38bb25de76ebfcc1d8317854b25584e6f3bd2e5c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds-cxx/LICENSE @@ -0,0 +1,318 @@ +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v. 2.0 which is available at +http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License +v. 1.0 which is available at +http://www.eclipse.org/org/documents/edl-v10.php. + + + +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. + + + +Eclipse Distribution License - v 1.0 + +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds/LICENSE b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..38bb25de76ebfcc1d8317854b25584e6f3bd2e5c --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-cyclonedds/cyclonedds/LICENSE @@ -0,0 +1,318 @@ +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v. 2.0 which is available at +http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License +v. 1.0 which is available at +http://www.eclipse.org/org/documents/edl-v10.php. + + + +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. + + + +Eclipse Distribution License - v 1.0 + +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-iceoryx/iceoryx/LICENSE b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-iceoryx/iceoryx/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..521019bbdaa39436f0b837dc1dad878c09f47833 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/licenses/eclipse-iceoryx/iceoryx/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Robert Bosch GmbH + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/CMakeLists.txt b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..bb98b35319fc70eccb1bb9a0714f1fccf8cb9ec4 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/CMakeLists.txt @@ -0,0 +1,35 @@ +find_package(Threads REQUIRED) + +message(STATUS "Importing: ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libddsc.so") + +add_library(ddsc SHARED IMPORTED GLOBAL) +set_target_properties(ddsc PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libddsc.so) +set_target_properties(ddsc PROPERTIES IMPORTED_NO_SONAME TRUE) +target_link_libraries(ddsc INTERFACE Threads::Threads) +target_link_directories(ddsc INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}) +target_include_directories(ddsc INTERFACE + $ + $) + +message(STATUS "Importing: ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libddscxx.so") + +add_library(ddscxx SHARED IMPORTED GLOBAL) +set_target_properties(ddscxx PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/libddscxx.so) +set_target_properties(ddscxx PROPERTIES IMPORTED_NO_SONAME TRUE) +target_link_libraries(ddscxx INTERFACE Threads::Threads) +target_link_directories(ddscxx INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}) +target_include_directories(ddscxx INTERFACE + $ + $ + $ + $) + +## Install targets +file(GLOB DDS_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/${CMAKE_SYSTEM_PROCESSOR}/*") + +install(FILES ${DDS_LIBRARIES} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/config.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/config.h new file mode 100644 index 0000000000000000000000000000000000000000..f3df386556b20e22d99b04eadc2522b9d6c74f6f --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/config.h @@ -0,0 +1,31 @@ +/* + * Copyright(c) 2022 ZettaScale Technology and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ +#ifndef DDS_CONFIG_H +#define DDS_CONFIG_H + +/* #undef DDSRT_WITH_LWIP */ +/* #undef DDSRT_WITH_FREERTOS */ + +#define DDSRT_HAVE_DYNLIB 1 +#define DDSRT_HAVE_FILESYSTEM 1 +#define DDSRT_HAVE_NETSTAT 1 +#define DDSRT_HAVE_RUSAGE 1 + +#define DDSRT_HAVE_IPV6 1 +#define DDSRT_HAVE_DNS 1 +#define DDSRT_HAVE_GETADDRINFO 1 +#define DDSRT_HAVE_GETHOSTBYNAME_R 1 +#define DDSRT_HAVE_GETHOSTNAME 1 +#define DDSRT_HAVE_INET_NTOP 1 +#define DDSRT_HAVE_INET_PTON 1 + +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/dds.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/dds.h new file mode 100644 index 0000000000000000000000000000000000000000..97647d6e750024ba3f8f6f63721b6b8b461880d1 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/dds.h @@ -0,0 +1,4744 @@ +/* + * Copyright(c) 2006 to 2021 ZettaScale Technology and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ +#ifndef DDS_H +#define DDS_H + +/** + * @file + * @brief Eclipse Cyclone DDS C header + * Main header of the Cyclone DDS C library, containing everything you need + * for your DDS application. + */ + +/** + * @defgroup dds (DDS Functionality) + */ +/** + * @defgroup deprecated (Deprecated functionality) + */ + +#if defined (__cplusplus) +#define restrict +#endif + +#include "dds/export.h" +#include "dds/features.h" + +#include "dds/ddsc/dds_basic_types.h" + +/* Sub components */ + +#include "dds/ddsrt/time.h" +#include "dds/ddsrt/retcode.h" +#include "dds/ddsrt/log.h" +#include "dds/ddsc/dds_public_impl.h" +#include "dds/ddsc/dds_public_alloc.h" +#include "dds/ddsc/dds_public_qos.h" +#include "dds/ddsc/dds_public_error.h" +#include "dds/ddsc/dds_public_status.h" +#include "dds/ddsc/dds_public_listener.h" + +#if defined (__cplusplus) +extern "C" { +#endif + + +/** + * @brief DDS Type Identifier (XTypes) + * @ingroup dds + * DOC_TODO + */ +typedef struct ddsi_typeid dds_typeid_t; + +/** + * @brief DDS Type Information (XTypes) + * @ingroup dds + * DOC_TODO + */ +typedef struct ddsi_typeinfo dds_typeinfo_t; + +/** + * @brief DDS Type Object (XTypes) + * @ingroup dds + * DOC_TODO + */ +typedef struct ddsi_typeobj dds_typeobj_t; + +/** + * @brief Reader History Cache + * @ingroup dds + * DOC_TODO + */ +struct dds_rhc; + +/** + * @brief DDSI parameter list + * @ingroup dds + * DOC_TODO + */ +struct ddsi_plist; + +/** + * @anchor ddsi_sertype + * @brief DDSI sertype + * @ingroup dds + * DOC_TODO + */ +struct ddsi_sertype; + +/** + * @anchor ddsi_serdata + * @brief DDSI Serdata + * @ingroup dds + * DOC_TODO + */ +struct ddsi_serdata; + +/** + * @ingroup deprecated + * @warning The DDSI sertopic functionality was moved to ddsi_sertype. + * It has been retained as a symbol to ensure binary compatibility. + */ +struct ddsi_sertopic; + +/** + * @brief DDSI Config + * @ingroup dds + * DOC_TODO + */ +struct ddsi_config; + +/** + * @brief Indicates that the library uses ddsi_sertype instead of ddsi_sertopic + * @ingroup dds + * If sertype is used, the function dds_create_topic_sertype requires a topic name parameter, + * as this field is not included in ddsi_sertype. + */ +#define DDS_HAS_DDSI_SERTYPE 1 + +/** + * @defgroup builtintopic (Builtin Topic Support) + * @ingroup dds + */ +/** + * @defgroup builtintopic_constants (Constants) + * @ingroup builtintopic + * @brief Convenience constants for referring to builtin topics + * These constants can be used in place of an actual dds_topic_t, when creating + * readers or writers for builtin-topics. + */ +/** + * @def DDS_BUILTIN_TOPIC_DCPSPARTICIPANT + * @ingroup builtintopic_constants + * Pseudo dds_topic_t for the builtin topic DcpsParticipant. Samples from this topic are + * @ref dds_builtintopic_participant structs. + */ +/** + * @def DDS_BUILTIN_TOPIC_DCPSTOPIC + * @ingroup builtintopic_constants + * Pseudo dds_topic_t for the builtin topic DcpsTopic. Samples from this topic are + * @ref dds_builtintopic_topic structs. Note that this only works if you have specified + * ENABLE_TOPIC_DISCOVERY in your cmake build. + */ +/** + * @def DDS_BUILTIN_TOPIC_DCPSPUBLICATION + * @ingroup builtintopic_constants + * Pseudo dds_topic_t for the builtin topic DcpsPublication. Samples from this topic are + * @ref dds_builtintopic_endpoint structs. + */ +/** + * @def DDS_BUILTIN_TOPIC_DCPSSUBSCRIPTION + * @ingroup builtintopic_constants + * Pseudo dds_topic_t for the builtin topic DcpsSubscription. Samples from this topic are + * @ref dds_builtintopic_endpoint structs. + */ + +#define DDS_BUILTIN_TOPIC_DCPSPARTICIPANT ((dds_entity_t) (DDS_MIN_PSEUDO_HANDLE + 1)) +#define DDS_BUILTIN_TOPIC_DCPSTOPIC ((dds_entity_t) (DDS_MIN_PSEUDO_HANDLE + 2)) +#define DDS_BUILTIN_TOPIC_DCPSPUBLICATION ((dds_entity_t) (DDS_MIN_PSEUDO_HANDLE + 3)) +#define DDS_BUILTIN_TOPIC_DCPSSUBSCRIPTION ((dds_entity_t) (DDS_MIN_PSEUDO_HANDLE + 4)) + + +/** + * @ingroup DOC_TODO + * Special handle representing the entity which forces the dds_data_allocator to allocate on heap + */ +#define DDS_DATA_ALLOCATOR_ALLOC_ON_HEAP ((dds_entity_t) (DDS_MIN_PSEUDO_HANDLE + 257)) + +/** + * @defgroup entity_status (Entity Status) + * @ingroup entity + * All entities have a set of "status conditions" + * (following the DCPS spec), read peeks, take reads & resets (analogously to read & + * take operations on reader). The "mask" allows operating only on a subset of the statuses. + * Enabled status analogously to DCPS spec. + * @{ + */ +/** + * @brief These identifiers are used to generate the bitshifted identifiers. + * By using bitflags instead of these IDs the process of building status masks is + * simplified to using simple binary OR operations. + * DOC_TODO fix the refs + */ +typedef enum dds_status_id { + DDS_INCONSISTENT_TOPIC_STATUS_ID, /**< See @ref DDS_INCONSISTENT_TOPIC_STATUS */ + DDS_OFFERED_DEADLINE_MISSED_STATUS_ID, /**< See @ref DDS_OFFERED_DEADLINE_MISSED_STATUS */ + DDS_REQUESTED_DEADLINE_MISSED_STATUS_ID, /**< See @ref DDS_REQUESTED_DEADLINE_MISSED_STATUS */ + DDS_OFFERED_INCOMPATIBLE_QOS_STATUS_ID, /**< See @ref DDS_OFFERED_INCOMPATIBLE_QOS_STATUS */ + DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS_ID, /**< See @ref DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS */ + DDS_SAMPLE_LOST_STATUS_ID, /**< See @ref DDS_SAMPLE_LOST_STATUS */ + DDS_SAMPLE_REJECTED_STATUS_ID, /**< See @ref DDS_SAMPLE_REJECTED_STATUS */ + DDS_DATA_ON_READERS_STATUS_ID, /**< See @ref DDS_DATA_ON_READERS_STATUS */ + DDS_DATA_AVAILABLE_STATUS_ID, /**< See @ref DDS_DATA_AVAILABLE_STATUS */ + DDS_LIVELINESS_LOST_STATUS_ID, /**< See @ref DDS_LIVELINESS_LOST_STATUS */ + DDS_LIVELINESS_CHANGED_STATUS_ID, /**< See @ref DDS_LIVELINESS_CHANGED_STATUS */ + DDS_PUBLICATION_MATCHED_STATUS_ID, /**< See @ref DDS_PUBLICATION_MATCHED_STATUS */ + DDS_SUBSCRIPTION_MATCHED_STATUS_ID /**< See @ref DDS_SUBSCRIPTION_MATCHED_STATUS */ +} dds_status_id_t; + +/** Helper value to indicate the highest bit that can be set in a status mask. */ +#define DDS_STATUS_ID_MAX (DDS_SUBSCRIPTION_MATCHED_STATUS_ID) + +/** + * @anchor DDS_INCONSISTENT_TOPIC_STATUS + * Another topic exists with the same name but with different characteristics. + */ +#define DDS_INCONSISTENT_TOPIC_STATUS (1u << DDS_INCONSISTENT_TOPIC_STATUS_ID) +/** + * @anchor DDS_OFFERED_DEADLINE_MISSED_STATUS + * The deadline that the writer has committed through its deadline QoS policy was not respected for a specific instance. */ +#define DDS_OFFERED_DEADLINE_MISSED_STATUS (1u << DDS_OFFERED_DEADLINE_MISSED_STATUS_ID) +/** + * @anchor DDS_REQUESTED_DEADLINE_MISSED_STATUS + * The deadline that the reader was expecting through its deadline QoS policy was not respected for a specific instance. */ +#define DDS_REQUESTED_DEADLINE_MISSED_STATUS (1u << DDS_REQUESTED_DEADLINE_MISSED_STATUS_ID) +/** + * @anchor DDS_OFFERED_INCOMPATIBLE_QOS_STATUS + * A QoS policy setting was incompatible with what was requested. */ +#define DDS_OFFERED_INCOMPATIBLE_QOS_STATUS (1u << DDS_OFFERED_INCOMPATIBLE_QOS_STATUS_ID) +/** + * @anchor DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS + * A QoS policy setting was incompatible with what is offered. */ +#define DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS (1u << DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS_ID) +/** + * @anchor DDS_SAMPLE_LOST_STATUS + * A sample has been lost (never received). */ +#define DDS_SAMPLE_LOST_STATUS (1u << DDS_SAMPLE_LOST_STATUS_ID) +/** + * @anchor DDS_SAMPLE_REJECTED_STATUS + * A (received) sample has been rejected. */ +#define DDS_SAMPLE_REJECTED_STATUS (1u << DDS_SAMPLE_REJECTED_STATUS_ID) +/** + * @anchor DDS_DATA_ON_READERS_STATUS + * New information is available in some of the data readers of a subscriber. */ +#define DDS_DATA_ON_READERS_STATUS (1u << DDS_DATA_ON_READERS_STATUS_ID) +/** + * @anchor DDS_DATA_AVAILABLE_STATUS + * New information is available in a data reader. */ +#define DDS_DATA_AVAILABLE_STATUS (1u << DDS_DATA_AVAILABLE_STATUS_ID) +/** + * @anchor DDS_LIVELINESS_LOST_STATUS + * The liveliness that the DDS_DataWriter has committed through its liveliness QoS policy was not respected; thus readers will consider the writer as no longer "alive". */ +#define DDS_LIVELINESS_LOST_STATUS (1u << DDS_LIVELINESS_LOST_STATUS_ID) +/** + * @anchor DDS_LIVELINESS_CHANGED_STATUS + * The liveliness of one or more writers, that were writing instances read through the readers has changed. Some writers have become "alive" or "not alive". */ +#define DDS_LIVELINESS_CHANGED_STATUS (1u << DDS_LIVELINESS_CHANGED_STATUS_ID) +/** + * @anchor DDS_PUBLICATION_MATCHED_STATUS + * The writer has found a reader that matches the topic and has a compatible QoS. */ +#define DDS_PUBLICATION_MATCHED_STATUS (1u << DDS_PUBLICATION_MATCHED_STATUS_ID) +/** + * @anchor DDS_SUBSCRIPTION_MATCHED_STATUS + * The reader has found a writer that matches the topic and has a compatible QoS. */ +#define DDS_SUBSCRIPTION_MATCHED_STATUS (1u << DDS_SUBSCRIPTION_MATCHED_STATUS_ID) +/** @}*/ // end group entity_status + +/** + * @defgroup subscription (Subscription) + * @ingroup dds + * DOC_TODO This contains the definitions regarding subscribing to data. + */ + +/** + * @defgroup subdata (Data access) + * @ingroup subscription + * Every sample you read from DDS comes with some metadata, which you can inspect and filter on. + * @{ + */ + +/** Read state for a data value */ +typedef enum dds_sample_state +{ + DDS_SST_READ = DDS_READ_SAMPLE_STATE, /**0 + * A valid publisher handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_get_publisher(dds_entity_t writer); + +/** + * @brief Get entity subscriber. + * @ingroup entity + * + * This operation returns the subscriber to which the given entity belongs. + * For instance, it will return the Subscriber that was used when + * creating a DataReader (when that DataReader was provided here). + * + * @param[in] entity Entity from which to get its subscriber. + * + * @returns A valid subscriber handle or an error code. + * + * @retval >0 + * A valid subscriber handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * DOC_TODO: Link to generic dds entity relations documentation. + */ +DDS_EXPORT dds_entity_t +dds_get_subscriber(dds_entity_t entity); + +/** + * @brief Get entity datareader. + * @ingroup entity + * + * This operation returns the datareader to which the given entity belongs. + * For instance, it will return the DataReader that was used when + * creating a ReadCondition (when that ReadCondition was provided here). + * + * @param[in] entity Entity from which to get its datareader. + * + * @returns A valid reader handle or an error code. + * + * @retval >0 + * A valid reader handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * DOC_TODO: Link to generic dds entity relations documentation. + */ +DDS_EXPORT dds_entity_t +dds_get_datareader(dds_entity_t entity); + +/** + * @defgroup condition (Conditions) + * @ingroup dds + * @brief Conditions allow you to express conditional interest in samples, + * to be used in read/take operations or attach to Waitsets. + */ + +/** + * @brief Get the mask of a condition. + * @ingroup condition + * + * This operation returns the mask that was used to create the given + * condition. + * + * @param[in] condition Read or Query condition that has a mask. + * @param[out] mask Where to store the mask of the condition. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success (given mask is set). + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The mask arg is NULL. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_get_mask(dds_entity_t condition, uint32_t *mask); + +/** + * @brief Returns the instance handle that represents the entity. + * @ingroup entity + * + * @param[in] entity Entity of which to get the instance handle. + * @param[out] ihdl Pointer to dds_instance_handle_t. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * DOC_TODO: Check list of return codes is complete. + * */ +DDS_EXPORT dds_return_t +dds_get_instance_handle(dds_entity_t entity, dds_instance_handle_t *ihdl); + +/** + * @brief Returns the GUID that represents the entity in the network, + * and therefore only supports participants, readers and writers. + * @ingroup entity + * + * @param[in] entity Entity of which to get the instance handle. + * @param[out] guid Where to store the GUID. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * + * DOC_TODO: Check list of return codes is complete. + */ +DDS_EXPORT dds_return_t +dds_get_guid (dds_entity_t entity, dds_guid_t *guid); + +/** + * @brief Read the status set for the entity + * @ingroup entity_status + * + * This operation reads the status(es) set for the entity based on + * the enabled status and mask set. It does not clear the read status(es). + * + * @param[in] entity Entity on which the status has to be read. + * @param[out] status Returns the status set on the entity, based on the enabled status. + * @param[in] mask Filter the status condition to be read, 0 means all statuses + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter, status is a null pointer or + * mask has bits set outside the status range. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object or mask has status + * bits set that are undefined for the type of entity. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_status(dds_entity_t entity, uint32_t *status, uint32_t mask); + +/** + * @brief Read the status set for the entity + * @ingroup entity_status + * + * This operation reads the status(es) set for the entity based on the enabled + * status and mask set. It clears the status set after reading. + * + * @param[in] entity Entity on which the status has to be read. + * @param[out] status Returns the status set on the entity, based on the enabled status. + * @param[in] mask Filter the status condition to be read, 0 means all statuses + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter, status is a null pointer or + * mask has bits set outside the status range. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object or mask has status + * bits set that are undefined for the type of entity. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_status(dds_entity_t entity, uint32_t *status, uint32_t mask); + +/** + * @brief Get changed status(es) + * @ingroup entity_status + * + * This operation returns the status changes since they were last read. + * + * @param[in] entity Entity on which the statuses are read. + * @param[out] status Returns the current set of triggered statuses. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_get_status_changes(dds_entity_t entity, uint32_t *status); + +/** + * @anchor dds_get_status_mask + * @brief Get enabled status on entity + * @ingroup entity_status + * + * This operation returns the status enabled on the entity + * + * @param[in] entity Entity to get the status. + * @param[out] mask Mask of enabled statuses set on the entity. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_get_status_mask(dds_entity_t entity, uint32_t *mask); + +/** + * @deprecated Get enabled status on entity. Use \ref dds_get_status_mask instead. + * @ingroup deprecated + * + * @param[in] entity Entity to get the status. + * @param[out] mask Mask of enabled statuses set on the entity. + * @returns A dds_return_t indicating success of failure. + */ +DDS_DEPRECATED_EXPORT dds_return_t +dds_get_enabled_status(dds_entity_t entity, uint32_t *mask); + +/** + * @anchor dds_set_status_mask + * @brief Set status enabled on entity + * @ingroup entity_status + * + * This operation enables the status(es) based on the mask set + * + * @param[in] entity Entity to enable the status. + * @param[in] mask Status value that indicates the status to be enabled. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Success. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_set_status_mask(dds_entity_t entity, uint32_t mask); + +/** + * @deprecated Set enabled status on entity. Use \ref dds_set_status_mask instead. + * @ingroup deprecated + * + * @param[in] entity Entity to enable the status. + * @param[out] mask Status value that indicates the status to be enabled. + * @returns A dds_return_t indicating success of failure. + */ +DDS_DEPRECATED_EXPORT dds_return_t +dds_set_enabled_status(dds_entity_t entity, uint32_t mask); + +/** + * @defgroup entity_qos (Entity QoS) + * @ingroup entity + * @brief Almost all entities have get/set qos operations defined on them, + * again following the DCPS spec. But unlike the DCPS spec, the + * "present" field in qos_t allows one to initialize just the one QoS + * one wants to set & pass it to set_qos. + */ + +/** + * @brief Get entity QoS policies. + * @ingroup entity_qos + * + * This operation allows access to the existing set of QoS policies + * for the entity. + * + * @param[in] entity Entity on which to get qos. + * @param[out] qos Pointer to the qos structure that returns the set policies. + * + * @returns A dds_return_t indicating success or failure. The QoS object will have + * at least all QoS relevant for the entity present and the corresponding dds_qget_... + * will return true. + * + * @retval DDS_RETCODE_OK + * The existing set of QoS policy values applied to the entity + * has successfully been copied into the specified qos parameter. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The qos parameter is NULL. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * + * DOC_TODO: Link to generic QoS information documentation. + */ +DDS_EXPORT dds_return_t +dds_get_qos(dds_entity_t entity, dds_qos_t *qos); + +/** + * @brief Set entity QoS policies. + * @ingroup entity_qos + * + * This operation replaces the existing set of Qos Policy settings for an + * entity. The parameter qos must contain the struct with the QosPolicy + * settings which is checked for self-consistency. + * + * The set of QosPolicy settings specified by the qos parameter are applied on + * top of the existing QoS, replacing the values of any policies previously set + * (provided, the operation returned DDS_RETCODE_OK). + * + * Not all policies are changeable when the entity is enabled. + * + * @note Currently only Latency Budget and Ownership Strength are changeable QoS + * that can be set. + * + * @param[in] entity Entity from which to get qos. + * @param[in] qos Pointer to the qos structure that provides the policies. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The new QoS policies are set. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The qos parameter is NULL. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_IMMUTABLE_POLICY + * The entity is enabled and one or more of the policies of the QoS + * are immutable. + * @retval DDS_RETCODE_INCONSISTENT_POLICY + * A few policies within the QoS are not consistent with each other. + * + * DOC_TODO: Link to generic QoS information documentation. + */ +DDS_EXPORT dds_return_t +dds_set_qos(dds_entity_t entity, const dds_qos_t * qos); + +/** + * @defgroup entity_listener (Entity Listener) + * @ingroup entity + * @brief Get or set listener associated with an entity, + * type of listener provided much match type of entity. + */ + +/** + * @brief Get entity listeners. + * @ingroup entity_listener + * + * This operation allows access to the existing listeners attached to + * the entity. + * + * @param[in] entity Entity on which to get the listeners. + * @param[out] listener Pointer to the listener structure that returns the + * set of listener callbacks. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The listeners of to the entity have been successfully been + * copied into the specified listener parameter. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The listener parameter is NULL. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * + * DOC_TODO: Link to (generic) Listener and status information. + */ +DDS_EXPORT dds_return_t +dds_get_listener(dds_entity_t entity, dds_listener_t * listener); + +/** + * @brief Set entity listeners. + * @ingroup entity_listener + * + * This operation attaches a dds_listener_t to the dds_entity_t. Only one + * Listener can be attached to each Entity. If a Listener was already + * attached, this operation will replace it with the new one. In other + * words, all related callbacks are replaced (possibly with NULL). + * + * When listener parameter is NULL, all listener callbacks that were possibly + * set on the Entity will be removed. + * + * @note Not all listener callbacks are related to all entities. + * + * ## Communication Status + * For each communication status, the StatusChangedFlag flag is initially set to + * FALSE. It becomes TRUE whenever that plain communication status changes. For + * each plain communication status activated in the mask, the associated + * Listener callback is invoked and the communication status is reset + * to FALSE, as the listener implicitly accesses the status which is passed as a + * parameter to that operation. + * The status is reset prior to calling the listener, so if the application calls + * the get_ from inside the listener it will see the + * status already reset. + * + * ## Status Propagation + * In case a related callback within the Listener is not set, the Listener of + * the Parent entity is called recursively, until a Listener with the appropriate + * callback set has been found and called. This allows the application to set + * (for instance) a default behaviour in the Listener of the containing Publisher + * and a DataWriter specific behaviour when needed. In case the callback is not + * set in the Publishers' Listener either, the communication status will be + * propagated to the Listener of the DomainParticipant of the containing + * DomainParticipant. In case the callback is not set in the DomainParticipants' + * Listener either, the Communication Status flag will be set, resulting in a + * possible WaitSet trigger. + * + * @param[in] entity Entity on which to get the listeners. + * @param[in] listener Pointer to the listener structure that contains the + * set of listener callbacks (maybe NULL). + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The listeners of to the entity have been successfully been + * copied into the specified listener parameter. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * DOC_TODO: Link to (generic) Listener and status information. + */ +DDS_EXPORT dds_return_t +dds_set_listener(dds_entity_t entity, const dds_listener_t * listener); + +/* + Creation functions for various entities. Creating a subscriber or + publisher is optional: if one creates a reader as a descendant of a + participant, it is as if a subscriber is created specially for + that reader. + + QoS default values are those of the DDS specification, but the + inheritance rules are different: + + * publishers and subscribers inherit from the participant QoS + * readers and writers always inherit from the topic QoS + * the QoS's present in the "qos" parameter override the inherited values +*/ + +/** + * @defgroup domain (Domain) + * @ingroup DDS + */ + +/** + * @defgroup domain_participant (DomainParticipant) + * @ingroup domain + */ + +/** + * @brief Creates a new instance of a DDS participant in a domain + * @ingroup domain_participant + * + * If domain is set (not DDS_DOMAIN_DEFAULT) then it must match if the domain has also + * been configured or an error status will be returned. + * Currently only a single domain can be configured by providing configuration file. + * If no configuration file exists, the default domain is configured as 0. + * + * + * @param[in] domain The domain in which to create the participant (can be DDS_DOMAIN_DEFAULT). DDS_DOMAIN_DEFAULT is for using the domain in the configuration. + * @param[in] qos The QoS to set on the new participant (can be NULL). + * @param[in] listener Any listener functions associated with the new participant (can be NULL). + + * @returns A valid participant handle or an error code. + * + * @retval >0 + * A valid participant handle. + * @retval DDS_RETCODE_NOT_ALLOWED_BY_SECURITY + * An invalid DDS Security configuration was specified (whether + * that be missing or incorrect entries, expired certificates, + * or anything else related to the security settings and + * implementation). + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Some security properties specified in the QoS, but the Cyclone + * build does not include support for DDS Security. + * @retval DDS_RETCODE_OUT_OF_RESOURCES + * Some resource limit (maximum participants, memory, handles, + * &c.) prevented creation of the participant. + * @retval DDS_RETCODE_ERROR + * The "CYCLONEDDS_URI" environment variable lists non-existent + * or invalid configuration files, or contains invalid embedded + * configuration items; or an unspecified internal error has + * occurred. + */ +DDS_EXPORT dds_entity_t +dds_create_participant( + const dds_domainid_t domain, + const dds_qos_t *qos, + const dds_listener_t *listener); + +/** + * @brief Creates a domain with a given configuration + * @ingroup domain + * + * To explicitly create a domain based on a configuration passed as a string. + * + * It will not be created if a domain with the given domain id already exists. + * This could have been created implicitly by a dds_create_participant(). + * + * Please be aware that the given domain_id always takes precedence over the + * configuration. + * + * | domain_id | domain id in config | result | + * |:----------|:--------------------|:------------------------------| + * | n | any (or absent) | n, config is used | + * | n | m == n | n, config is used | + * | n | m != n | n, config is ignored: default | + * + * Config models: + * -# @code{xml} + * + * ... + * + * + * @endcode + * where ... is all that can today be set in children of CycloneDDS + * with the exception of the id + * -# @code{xml} + * + * X + * + * + * @endcode + * Legacy form, domain id must be the first element in the file with + * a value (if nothing has been set previously, it a warning is good + * enough) + * + * Using NULL or "" as config will create a domain with default settings. + * + * + * @param[in] domain The domain to be created. DEFAULT_DOMAIN is not allowed. + * @param[in] config A configuration string containing file names and/or XML fragments representing the configuration. + * + * @returns A valid entity handle or an error code. + * + * @retval DDS_RETCODE_BAD_PARAMETER + * Illegal value for domain id or the configfile parameter is NULL. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The domain already existed and cannot be created again. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + */ +DDS_EXPORT dds_entity_t +dds_create_domain(const dds_domainid_t domain, const char *config); + +/** + * @brief Creates a domain with a given configuration, specified as an + * initializer (unstable interface) + * @ingroup domain + * + * To explicitly create a domain based on a configuration passed as a raw + * initializer rather than as an XML string. This allows bypassing the XML + * parsing, but tightly couples the initializing to implementation. See + * dds/ddsi/ddsi_config.h:ddsi_config_init_default for a way to initialize + * the default configuration. + * + * It will not be created if a domain with the given domain id already exists. + * This could have been created implicitly by a dds_create_participant(). + * + * Please be aware that the given domain_id always takes precedence over the + * configuration. + * + * @param[in] domain The domain to be created. DEFAULT_DOMAIN is not allowed. + * @param[in] config A configuration initializer. The lifetime of any pointers + * in config must be at least that of the lifetime of the domain. + * + * @returns A valid entity handle or an error code. + * + * @retval DDS_RETCODE_BAD_PARAMETER + * Illegal value for domain id or the config parameter is NULL. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The domain already existed and cannot be created again. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + */ +DDS_EXPORT dds_entity_t +dds_create_domain_with_rawconfig(const dds_domainid_t domain, const struct ddsi_config *config); + +/** + * @brief Get entity parent. + * @ingroup entity + * + * This operation returns the parent to which the given entity belongs. + * For instance, it will return the Participant that was used when + * creating a Publisher (when that Publisher was provided here). + * + * When a reader or a writer are created with a participant, then a + * subscriber or publisher are created implicitly. + * This function will return the implicit parent and not the used + * participant. + * + * @param[in] entity Entity from which to get its parent. + * + * @returns A valid entity handle or an error code. + * + * @retval >0 + * A valid entity handle. + * @retval DDS_ENTITY_NIL + * Called with a participant. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * DOC_TODO: Link to generic dds entity relations documentation. + */ +DDS_EXPORT dds_entity_t +dds_get_parent(dds_entity_t entity); + +/** + * @brief Get entity participant. + * @ingroup entity + * + * This operation returns the participant to which the given entity belongs. + * For instance, it will return the Participant that was used when + * creating a Publisher that was used to create a DataWriter (when that + * DataWriter was provided here). + * + * DOC_TODO: Link to generic dds entity relations documentation. + * + * @param[in] entity Entity from which to get its participant. + * + * @returns A valid entity or an error code. + * + * @retval >0 + * A valid participant handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_get_participant(dds_entity_t entity); + +/** + * @brief Get entity children. + * @ingroup entity + * + * This operation returns the children that the entity contains. + * For instance, it will return all the Topics, Publishers and Subscribers + * of the Participant that was used to create those entities (when that + * Participant is provided here). + * + * This functions takes a pre-allocated list to put the children in and + * will return the number of found children. It is possible that the given + * size of the list is not the same as the number of found children. If + * less children are found, then the last few entries in the list are + * untouched. When more children are found, then only 'size' number of + * entries are inserted into the list, but still complete count of the + * found children is returned. Which children are returned in the latter + * case is undefined. + * + * When supplying NULL as list and 0 as size, you can use this to acquire + * the number of children without having to pre-allocate a list. + * + * When a reader or a writer are created with a participant, then a + * subscriber or publisher are created implicitly. + * When used on the participant, this function will return the implicit + * subscriber and/or publisher and not the related reader/writer. + * + * @param[in] entity Entity from which to get its children. + * @param[out] children Pre-allocated array to contain the found children. + * @param[in] size Size of the pre-allocated children's list. + * + * @returns Number of children or an error code. + * + * @retval >=0 + * Number of found children (can be larger than 'size'). + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The children parameter is NULL, while a size is provided. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +/* TODO: Link to generic dds entity relations documentation. */ +DDS_EXPORT dds_return_t +dds_get_children(dds_entity_t entity, dds_entity_t *children, size_t size); + +/** + * @brief Get the domain id to which this entity is attached. + * @ingroup entity + * + * When creating a participant entity, it is attached to a certain domain. + * All the children (like Publishers) and childrens' children (like + * DataReaders), etc are also attached to that domain. + * + * This function will return the original domain ID when called on + * any of the entities within that hierarchy. For entities not associated + * with a domain, the id is set to DDS_DOMAIN_DEFAULT. + * + * @param[in] entity Entity from which to get its children. + * @param[out] id Pointer to put the domain ID in. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Domain ID was returned. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The id parameter is NULL. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_get_domainid(dds_entity_t entity, dds_domainid_t *id); + +/** + * @brief Get participants of a domain. + * @ingroup domain + * + * This operation acquires the participants created on a domain and returns + * the number of found participants. + * + * This function takes a domain id with the size of pre-allocated participant's + * list in and will return the number of found participants. It is possible that + * the given size of the list is not the same as the number of found participants. + * If less participants are found, then the last few entries in an array stay + * untouched. If more participants are found and the array is too small, then the + * participants returned are undefined. + * + * @param[in] domain_id The domain id. + * @param[out] participants The participant for domain. + * @param[in] size Size of the pre-allocated participant's list. + * + * @returns Number of participants found or and error code. + * + * @retval >0 + * Number of participants found. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The participant parameter is NULL, while a size is provided. + */ +DDS_EXPORT dds_return_t +dds_lookup_participant( + dds_domainid_t domain_id, + dds_entity_t *participants, + size_t size); + +/** + * @defgroup topic (Topic) + * @ingroup dds + */ + +/** + * @brief Creates a new topic with default type handling. + * @ingroup topic + * + * The type name for the topic is taken from the generated descriptor. Topic + * matching is done on a combination of topic name and type name. Each successful + * call to dds_create_topic creates a new topic entity sharing the same QoS + * settings with all other topics of the same name. + * + * @param[in] participant Participant on which to create the topic. + * @param[in] descriptor An IDL generated topic descriptor. + * @param[in] name Name of the topic. + * @param[in] qos QoS to set on the new topic (can be NULL). + * @param[in] listener Any listener functions associated with the new topic (can be NULL). + * + * @returns A valid, unique topic handle or an error code. + * + * @retval >=0 + * A valid unique topic handle. + * @retval DDS_RETCODE_BAD_PARAMETER + * Either participant, descriptor, name or qos is invalid. + * @retval DDS_RETCODE_INCONSISTENT_POLICY + * QoS mismatch between qos and an existing topic's QoS. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Mismatch between type name in descriptor and pre-existing + * topic's type name. + */ +DDS_EXPORT dds_entity_t +dds_create_topic( + dds_entity_t participant, + const dds_topic_descriptor_t *descriptor, + const char *name, + const dds_qos_t *qos, + const dds_listener_t *listener); + + +/** + * @brief Indicates that the library defines the dds_create_topic_sertype function + * @ingroup topic + * Introduced to help with the change from sertopic to sertype. If you are using + * a modern CycloneDDS version you will not need this. + */ +#define DDS_HAS_CREATE_TOPIC_SERTYPE 1 + +/** + * @brief Creates a new topic with provided type handling. + * @ingroup topic + * + * The name for the type is taken from the provided "sertype" object. Type + * matching is done on a combination of topic name and type name. Each successful + * call to dds_create_topic creates a new topic entity sharing the same QoS + * settings with all other topics of the same name. + * + * In case this function returns a valid handle, the ownership of the provided + * sertype is handed over to Cyclone. On return, the caller gets in the sertype parameter a + * pointer to the sertype that is actually used by the topic. This can be the provided sertype + * (if this sertype was not yet known in the domain), or a sertype thas was + * already known in the domain. + * + * @param[in] participant Participant on which to create the topic. + * @param[in] name Topic name + * @param[in,out] sertype Internal description of the type . On return, the sertype parameter is set to the actual sertype that is used by the topic. + * @param[in] qos QoS to set on the new topic (can be NULL). + * @param[in] listener Any listener functions associated with the new topic (can be NULL). + * @param[in] sedp_plist Topic description to be published as part of discovery (if NULL, not published). + * + * @returns A valid, unique topic handle or an error code. Iff a valid handle, the domain takes ownership of provided serdata. + * + * @retval >=0 + * A valid unique topic handle. + * @retval DDS_RETCODE_BAD_PARAMETER + * Either participant, descriptor, name or qos is invalid. + * @retval DDS_RETCODE_INCONSISTENT_POLICY + * QoS mismatch between qos and an existing topic's QoS. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Mismatch between type name in sertype and pre-existing + * topic's type name. + */ +DDS_EXPORT dds_entity_t +dds_create_topic_sertype ( + dds_entity_t participant, + const char *name, + struct ddsi_sertype **sertype, + const dds_qos_t *qos, + const dds_listener_t *listener, + const struct ddsi_plist *sedp_plist); + +/** + * @brief Indicates that the library defines the dds_create_topic_generic function + * @ingroup topic + * Introduced to help with the change from sertopic to sertype. You should probably + * move to using sertype instead of sertopic and ignore this. + */ +#define DDS_HAS_CREATE_TOPIC_GENERIC 1 + +/** + * @anchor dds_create_topic_generic + * @brief Creates a new topic with provided type handling. + * @ingroup topic + * + * DOC_TODO: this description does not make any sense, this is for the legacy sertopic? + * deprecate? + * + * The name for the type is taken from the provided "sertype" object. Type + * matching is done on a combination of topic name and type name. Each successful + * call to dds_create_topic creates a new topic entity sharing the same QoS + * settings with all other topics of the same name. + * + * In case this function returns a valid handle, the ownership of the provided + * sertype is handed over to Cyclone. On return, the caller gets in the sertype parameter a + * pointer to the sertype that is actually used by the topic. This can be the provided sertype + * (if this sertype was not yet known in the domain), or a sertype thas was + * already known in the domain. + * + * @param[in] participant Participant on which to create the topic. + * @param[in,out] sertopic Legacy internal description of the type. On return, the sertype parameter is set to the actual sertype that is used by the topic. + * @param[in] qos QoS to set on the new topic (can be NULL). + * @param[in] listener Any listener functions associated with the new topic (can be NULL). + * @param[in] sedp_plist Topic description to be published as part of discovery (if NULL, not published). + * + * @returns A valid, unique topic handle or an error code. Iff a valid handle, the domain takes ownership of provided serdata. + * + * @retval >=0 + * A valid unique topic handle. + * @retval DDS_RETCODE_BAD_PARAMETER + * Either participant, descriptor, name or qos is invalid. + * @retval DDS_RETCODE_INCONSISTENT_POLICY + * QoS mismatch between qos and an existing topic's QoS. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Mismatch between type name in sertype and pre-existing + * topic's type name. + */ +DDS_EXPORT dds_entity_t +dds_create_topic_generic ( + dds_entity_t participant, + struct ddsi_sertopic **sertopic, + const dds_qos_t *qos, + const dds_listener_t *listener, + const struct ddsi_plist *sedp_plist); + +/** + * @deprecated Creates a new topic with provided type handling. + * @ingroup deprecated + * Use @ref dds_create_topic_sertype instead. + * + * @param[in] participant Participant on which to create the topic. + * @param[in,out] sertopic Legacy internal description of the type. On return, the sertype parameter is set to the actual sertype that is used by the topic. + * @param[in] qos QoS to set on the new topic (can be NULL). + * @param[in] listener Any listener functions associated with the new topic (can be NULL). + * @param[in] sedp_plist Topic description to be published as part of discovery (if NULL, not published). + * + * @returns A valid, unique topic handle or an error code. + */ +DDS_DEPRECATED_EXPORT dds_entity_t +dds_create_topic_arbitrary ( + dds_entity_t participant, + struct ddsi_sertopic *sertopic, + const dds_qos_t *qos, + const dds_listener_t *listener, + const struct ddsi_plist *sedp_plist); + +/** + * @brief Finds a locally created or discovered remote topic by topic name and type information + * @ingroup topic + * + * Finds a locally created topic or a discovered remote topic based on the topic + * name and type. In case the topic is not found, this function will wait for + * the topic to become available until the provided time out. + * + * When using the scope DDS_FIND_SCOPE_LOCAL_DOMAIN, there will be no requests sent + * over the network for resolving the type in case it is unresolved. This also applies + * to dependent types: in case a dependency of the provided type is unresolved, no + * requests will be sent for resolving the type when using LOCAL_DOMAIN scope. + * + * In case the scope is DDS_FIND_SCOPE_GLOBAL, for unresolved types (or dependencies) + * a type lookup request will be sent. + * + * In case no type information is provided and multiple (discovered) topics exist + * with the provided name, an arbitrary topic with that name will be returned. + * In this scenario, it would be better to read DCPSTopic data and use that to + * get the required topic meta-data. + * + * The returned topic should be released with dds_delete. + * + * @param[in] scope The scope used to find the topic. In case topic discovery is not enabled in the build, SCOPE_GLOBAL cannot be used. + * @param[in] participant The handle of the participant the found topic will be created in + * @param[in] name The name of the topic to find. + * @param[in] type_info The type information of the topic to find. Optional, and should not be provided in case topic discovery is not enabled in the build. + * @param[in] timeout The timeout for waiting for the topic to become available + * + * @returns A valid topic handle or an error code. + * + * @retval >0 + * A valid topic handle. + * @retval 0 + * No topic of this name exists + * @retval DDS_RETCODE_BAD_PARAMETER + * Participant or type information was invalid. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The provided type could not be found. + */ +DDS_EXPORT dds_entity_t +dds_find_topic (dds_find_scope_t scope, dds_entity_t participant, const char *name, const dds_typeinfo_t *type_info, dds_duration_t timeout); + +/** + * @deprecated Finds a locally created or discovered remote topic by topic name + * @ingroup deprecated + * Use @ref dds_find_topic instead. + * + * Finds a locally created topic or a discovered remote topic based on the topic + * name. In case the topic is not found, this function will wait for the topic + * to become available until the provided time out. + * + * In case multiple (discovered) topics exist with the provided name, this function + * will return randomly one of these topic. The caller can decide to read DCPSTopic + * data and select one of the topic definitions to create the topic. + * + * The returned topic should be released with dds_delete. + * + * @param[in] scope The scope used to find the topic + * @param[in] participant The handle of the participant the found topic will be created in + * @param[in] name The name of the topic to find. + * @param[in] timeout The timeout for waiting for the topic to become available + * + * @returns A valid topic handle or an error code. + * + * @retval >0 + * A valid topic handle. + * @retval 0 + * No topic of this name existed yet + * @retval DDS_RETCODE_BAD_PARAMETER + * Participant handle or scope invalid + */ +DDS_DEPRECATED_EXPORT dds_entity_t +dds_find_topic_scoped (dds_find_scope_t scope, dds_entity_t participant, const char *name, dds_duration_t timeout); + + +/** + * @ingroup topic + * @brief Creates topic descriptor for the provided type_info + * + * @param[in] scope The scope used to find the type: DDS_FIND_SCOPE_LOCAL_DOMAIN or DDS_FIND_SCOPE_GLOBAL. In case DDS_FIND_SCOPE_GLOBAL is used, a type lookup request will be sent to other nodes. + * @param[in] participant The handle of the participant. + * @param[in] type_info The type (dds_typeinfo_t) of the topic to find. + * @param[in] timeout The timeout for waiting for the type to become available + * @param[out] descriptor - Pointer to a dds_topic_descriptor_t pointer that will be allocated and populated. To free allocated memory for this descriptor, use dds_delete_topic_descriptor. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The topic descriptor has been succesfully created. + * @retval DDS_RETCODE_BAD_PARAMETER + * Type_info or descriptor parameter not provided, invalid entity (not a participant) or scope invalid. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The participant or the type_id was not found. + * @retval DDS_RETCODE_TIMEOUT + * Type was not resolved within the provided timeout + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) + */ +DDS_EXPORT dds_return_t +dds_create_topic_descriptor (dds_find_scope_t scope, dds_entity_t participant, const dds_typeinfo_t *type_info, dds_duration_t timeout, dds_topic_descriptor_t **descriptor); + +/** + * @ingroup topic + * @brief Delete memory allocated to the provided topic descriptor + * + * @param[in] descriptor - Pointer to a dds_topic_descriptor_t + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The topic descriptor has been succesfully deleted. + * @retval DDS_RETCODE_BAD_PARAMETER + * No descriptor provided + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) + */ +DDS_EXPORT dds_return_t +dds_delete_topic_descriptor (dds_topic_descriptor_t *descriptor); + +/** + * @brief Returns the name of a given topic. + * @ingroup topic + * + * @param[in] topic The topic. + * @param[out] name Buffer to write the topic name to. + * @param[in] size Number of bytes available in the buffer. + * + * @returns A dds_return_t indicating success or failure. + * + * @return Actual length of topic name (name is truncated if return value >= size) or error + */ +DDS_EXPORT dds_return_t +dds_get_name(dds_entity_t topic, char *name, size_t size); + +/** + * @brief Returns the type name of a given topic. + * @ingroup topic + * + * @param[in] topic The topic. + * @param[out] name Buffer to write the topic type name to. + * @param[in] size Number of bytes available in the buffer. + * + * @returns A dds_return_t indicating success or failure. + * + * @return Actual length of type name (name is truncated if return value >= size) or error + */ +DDS_EXPORT dds_return_t +dds_get_type_name(dds_entity_t topic, char *name, size_t size); + +/** + * @defgroup topic_filter (Topic filters) + * @ingroup topic + * Topic filter functions. + * @warning part of the Unstable API: no guarantee that any + * of this will be maintained for backwards compatibility. + * + * Sampleinfo is all zero when filtering in a write call (i.e., writer created + * using a filtered topic, which one perhaps shouldn't be doing), otherwise it + * has as much filled in correctly as is possible given the context and the rest + * fixed: + * - sample_state DDS_SST_NOT_READ; + * - publication_handle set to writer's instance handle + * - source_timestamp set to source timestamp of sample + * - ranks 0 + * - valid_data true + * - instance_handle set to instance handle of existing instance if the + * sample matches an existing instance, otherwise to what + * the instance handle will be if it passes the filter + * - view_state set to instance view state if sample being filtered + * matches an existing instance, NEW if not + * - instance_state set to instance state if sample being filtered + * matches an existing instance, NEW if not + * - generation counts set to instance's generation counts if the sample + * matches an existing instance instance, 0 if not + */ + +/** + * @anchor dds_topic_filter_sample_fn + * @brief Topic filter function that only needs to look at the sample. + * @ingroup topic_filter + * @warning Unstable API + */ +typedef bool (*dds_topic_filter_sample_fn) (const void * sample); + +/** + * @anchor dds_topic_filter_sample_arg_fn + * @brief Topic filter function that only needs to look at the sample and a custom argument. + * @ingroup topic_filter + * @warning Unstable API + */ +typedef bool (*dds_topic_filter_sample_arg_fn) (const void * sample, void * arg); + +/** + * @anchor dds_topic_filter_sampleinfo_arg_fn + * @brief Topic filter function that only needs to look at the sampleinfo and a custom argument. + * @ingroup topic_filter + * @warning Unstable API + */ +typedef bool (*dds_topic_filter_sampleinfo_arg_fn) (const dds_sample_info_t * sampleinfo, void * arg); + +/** + * @anchor dds_topic_filter_sample_sampleinfo_arg_fn + * @brief Topic filter function that needs to look at the sample, the sampleinfo and a custom argument. + * @ingroup topic_filter + * @warning Unstable API + */ +typedef bool (*dds_topic_filter_sample_sampleinfo_arg_fn) (const void * sample, const dds_sample_info_t * sampleinfo, void * arg); + +/** + * @anchor dds_topic_filter_fn + * @brief See \ref dds_topic_filter_sample_fn + * @ingroup topic_filter + * @warning Unstable API + */ +typedef dds_topic_filter_sample_fn dds_topic_filter_fn; + +/** + * @anchor dds_topic_filter_arg_fn + * @brief See \ref dds_topic_filter_sample_arg_fn + * @ingroup topic_filter + * @warning Unstable API + */ +typedef dds_topic_filter_sample_arg_fn dds_topic_filter_arg_fn; + +/** + * @brief Topic filter mode; + * @ingroup topic_filter + * @warning Unstable API + */ +enum dds_topic_filter_mode { + DDS_TOPIC_FILTER_NONE, /**< Can be used to reset topic filter */ + DDS_TOPIC_FILTER_SAMPLE, /**< Use with \ref dds_topic_filter_sample_fn */ + DDS_TOPIC_FILTER_SAMPLE_ARG, /**< Use with \ref dds_topic_filter_sample_arg_fn */ + DDS_TOPIC_FILTER_SAMPLEINFO_ARG, /**< Use with \ref dds_topic_filter_sampleinfo_arg_fn */ + DDS_TOPIC_FILTER_SAMPLE_SAMPLEINFO_ARG, /**< Use with \ref dds_topic_filter_sample_sampleinfo_arg_fn */ +}; + +/** + * @brief Union of all filter function types; + * @ingroup topic_filter + * @warning Unstable API +*/ +union dds_topic_filter_function_union { + dds_topic_filter_sample_fn sample; /**< Use with mode dds_topic_filter_mode::DDS_TOPIC_FILTER_SAMPLE */ + dds_topic_filter_sample_arg_fn sample_arg; /**< Use with mode dds_topic_filter_mode::DDS_TOPIC_FILTER_SAMPLE_ARG */ + dds_topic_filter_sampleinfo_arg_fn sampleinfo_arg; /**< Use with mode dds_topic_filter_mode::DDS_TOPIC_FILTER_SAMPLEINFO_ARG */ + dds_topic_filter_sample_sampleinfo_arg_fn sample_sampleinfo_arg; /**< Use with mode dds_topic_filter_mode::DDS_TOPIC_FILTER_SAMPLE_SAMPLEINFO_ARG */ +}; + +/** + * @brief Full topic filter container; + * @ingroup topic_filter + * @warning Unstable API + */ +struct dds_topic_filter { + enum dds_topic_filter_mode mode; /**< Provide a mode */ + union dds_topic_filter_function_union f; /**< Provide a filter function */ + void *arg; /**< Provide an argument, can be NULL */ +}; + +/** + * @brief Sets a filter on a topic. To be replaced by proper filtering on readers, + * @ingroup topic_filter + * @warning Unstable API + * @deprecated use @ref dds_set_topic_filter_and_arg or @ref dds_set_topic_filter_extended instead + * + * Not thread-safe with respect to data being read/written using readers/writers + * using this topic. Be sure to create a topic entity specific to the reader you + * want to filter, then set the filter function, and only then create the reader. + * And don't change it unless you know there are no concurrent writes. + * + * @param[in] topic The topic on which the content filter is set. + * @param[in] filter The filter function used to filter topic samples. + */ +DDS_DEPRECATED_EXPORT void +dds_set_topic_filter(dds_entity_t topic, dds_topic_filter_fn filter); + +/** + * @brief Sets a filter on a topic. To be replaced by proper filtering on readers, + * @ingroup topic_filter + * @warning Unstable API + * @deprecated use @ref dds_set_topic_filter_and_arg or @ref dds_set_topic_filter_extended instead + * + * Not thread-safe with respect to data being read/written using readers/writers + * using this topic. Be sure to create a topic entity specific to the reader you + * want to filter, then set the filter function, and only then create the reader. + * And don't change it unless you know there are no concurrent writes. + * + * @param[in] topic The topic on which the content filter is set. + * @param[in] filter The filter function used to filter topic samples. + */ +DDS_DEPRECATED_EXPORT void +dds_topic_set_filter(dds_entity_t topic, dds_topic_filter_fn filter); + +/** + * @anchor dds_set_topic_filter_and_arg + * @brief Sets a filter and filter argument on a topic. + * @ingroup topic_filter + * @warning Unstable API + * To be replaced by proper filtering on readers. + * + * Not thread-safe with respect to data being read/written using readers/writers + * using this topic. Be sure to create a topic entity specific to the reader you + * want to filter, then set the filter function, and only then create the reader. + * And don't change it unless you know there are no concurrent writes. + * + * @param[in] topic The topic on which the content filter is set. + * @param[in] filter The filter function used to filter topic samples. + * @param[in] arg Argument for the filter function. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK Filter set successfully + * @retval DDS_RETCODE_BAD_PARAMETER The topic handle is invalid +*/ +DDS_EXPORT dds_return_t +dds_set_topic_filter_and_arg( + dds_entity_t topic, + dds_topic_filter_arg_fn filter, + void *arg); + +/** + * @anchor dds_set_topic_filter_extended + * @brief Sets a filter and filter argument on a topic. + * @ingroup topic_filter + * @warning Unstable API + * To be replaced by proper filtering on readers. + * + * Not thread-safe with respect to data being read/written using readers/writers + * using this topic. Be sure to create a topic entity specific to the reader you + * want to filter, then set the filter function, and only then create the reader. + * And don't change it unless you know there are no concurrent writes. + * + * @param[in] topic The topic on which the content filter is set. + * @param[in] filter The filter specification. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK Filter set successfully + * @retval DDS_RETCODE_BAD_PARAMETER The topic handle is invalid +*/ +DDS_EXPORT dds_return_t +dds_set_topic_filter_extended( + dds_entity_t topic, + const struct dds_topic_filter *filter); + +/** + * @brief Gets the filter for a topic. + * @ingroup topic_filter + * @deprecated Use dds_get_topic_filter_and_arg() or dds_get_topic_filter_extended() instead. + * @warning Unstable API + * + * To be replaced by proper filtering on readers. + * + * @param[in] topic The topic from which to get the filter. + * + * @returns The topic filter, or 0 when of type other than "sample". + */ +DDS_DEPRECATED_EXPORT dds_topic_filter_fn +dds_get_topic_filter(dds_entity_t topic); + +/** + * @brief Gets the filter for a topic. + * @ingroup topic_filter + * @deprecated Use dds_get_topic_filter_and_arg() or dds_get_topic_filter_extended() instead. + * @warning Unstable API + * + * To be replaced by proper filtering on readers. + * + * @param[in] topic The topic from which to get the filter. + * + * @returns The topic filter, or 0 when of type other than "sample". + */ +DDS_DEPRECATED_EXPORT dds_topic_filter_fn +dds_topic_get_filter(dds_entity_t topic); + +/** + * @brief Gets the filter for a topic. + * @ingroup topic_filter + * @warning Unstable API + * + * To be replaced by proper filtering on readers + * + * @param[in] topic The topic from which to get the filter. + * @param[out] fn The topic filter function (fn may be NULL). + * @param[out] arg Filter function argument (arg may be NULL). + * + * @retval DDS_RETCODE_OK Filter set successfully + * @retval DDS_RETCODE_PRECONDITION_NOT_MET Filter is not of "none" or "sample_arg" + * @retval DDS_RETCODE_BAD_PARAMETER The topic handle is invalid + */ +DDS_EXPORT dds_return_t +dds_get_topic_filter_and_arg ( + dds_entity_t topic, + dds_topic_filter_arg_fn *fn, + void **arg); + +/** + * @brief Gets the filter for a topic. + * @ingroup topic_filter + * @warning Unstable API + * + * To be replaced by proper filtering on readers + * + * @param[in] topic The topic from which to get the filter. + * @param[out] filter The topic filter specification. + * + * @retval DDS_RETCODE_OK Filter set successfully + * @retval DDS_RETCODE_BAD_PARAMETER The topic handle is invalid + */ +DDS_EXPORT dds_return_t +dds_get_topic_filter_extended ( + dds_entity_t topic, + struct dds_topic_filter *filter); + +/** + * @defgroup subscriber (Subscriber) + * @ingroup subscription + * DOC_TODO The Subscriber is a DDS Entity + */ + +/** + * @brief Creates a new instance of a DDS subscriber + * @ingroup subscriber + * + * @param[in] participant The participant on which the subscriber is being created. + * @param[in] qos The QoS to set on the new subscriber (can be NULL). + * @param[in] listener Any listener functions associated with the new subscriber (can be NULL). + * + * @returns A valid subscriber handle or an error code. + * + * @retval >0 + * A valid subscriber handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the parameters is invalid. + */ +DDS_EXPORT dds_entity_t +dds_create_subscriber( + dds_entity_t participant, + const dds_qos_t *qos, + const dds_listener_t *listener); + + +/** + * @defgroup publication (Publication) + * @ingroup dds + * DOC_TODO This contains the definitions regarding publication of data. + */ + +/** + * @defgroup publisher (Publisher) + * @ingroup publication + * DOC_TODO The Publisher is a DDS Entity + */ + +/** + * @brief Creates a new instance of a DDS publisher + * @ingroup publisher + * + * @param[in] participant The participant to create a publisher for. + * @param[in] qos The QoS to set on the new publisher (can be NULL). + * @param[in] listener Any listener functions associated with the new publisher (can be NULL). + * + * @returns A valid publisher handle or an error code. + * + * @retval >0 + * A valid publisher handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + */ +/* TODO: Check list of error codes is complete. */ +DDS_EXPORT dds_entity_t +dds_create_publisher( + dds_entity_t participant, + const dds_qos_t *qos, + const dds_listener_t *listener); + +/** + * @brief Suspends the publications of the Publisher + * @ingroup publisher + * + * This operation is a hint to the Service so it can optimize its performance by e.g., collecting + * modifications to DDS writers and then batching them. The Service is not required to use the hint. + * + * Every invocation of this operation must be matched by a corresponding call to @see dds_resume + * indicating that the set of modifications has completed. + * + * @param[in] publisher The publisher for which all publications will be suspended. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Publications suspended successfully. + * @retval DDS_RETCODE_BAD_PARAMETER + * The pub parameter is not a valid publisher. + * @retval DDS_RETCODE_UNSUPPORTED + * Operation is not supported. + */ +DDS_EXPORT dds_return_t +dds_suspend(dds_entity_t publisher); + +/** + * @brief Resumes the publications of the Publisher + * @ingroup publisher + * + * This operation is a hint to the Service to indicate that the application has + * completed changes initiated by a previous dds_suspend(). The Service is not + * required to use the hint. + * + * The call to resume_publications must match a previous call to @see suspend_publications. + * + * @param[in] publisher The publisher for which all publications will be resumed. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Publications resumed successfully. + * @retval DDS_RETCODE_BAD_PARAMETER + * The pub parameter is not a valid publisher. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * No previous matching dds_suspend(). + * @retval DDS_RETCODE_UNSUPPORTED + * Operation is not supported. + */ +DDS_EXPORT dds_return_t +dds_resume(dds_entity_t publisher); + +/** + * @brief Waits at most for the duration timeout for acks for data in the publisher or writer. + * @ingroup publication + * + * This operation blocks the calling thread until either all data written by the publisher + * or writer is acknowledged by all matched reliable reader entities, or else the duration + * specified by the timeout parameter elapses, whichever happens first. + * + * @param[in] publisher_or_writer Publisher or writer whose acknowledgments must be waited for + * @param[in] timeout How long to wait for acknowledgments before time out + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * All acknowledgments successfully received with the timeout. + * @retval DDS_RETCODE_BAD_PARAMETER + * The publisher_or_writer is not a valid publisher or writer. + * @retval DDS_RETCODE_TIMEOUT + * Timeout expired before all acknowledgments from reliable reader entities were received. + * @retval DDS_RETCODE_UNSUPPORTED + * Operation is not supported. + */ +DDS_EXPORT dds_return_t +dds_wait_for_acks(dds_entity_t publisher_or_writer, dds_duration_t timeout); + + +/** + * @defgroup reader (Reader) + * @ingroup subscription + * DOC_TODO The reader is a DDS Entity + */ + +/** + * @brief Creates a new instance of a DDS reader. + * @ingroup reader + * + * When a participant is used to create a reader, an implicit subscriber is created. + * This implicit subscriber will be deleted automatically when the created reader + * is deleted. + * + * @param[in] participant_or_subscriber The participant or subscriber on which the reader is being created. + * @param[in] topic The topic to read. + * @param[in] qos The QoS to set on the new reader (can be NULL). + * @param[in] listener Any listener functions associated with the new reader (can be NULL). + * + * @returns A valid reader handle or an error code. + * + * @retval >0 + * A valid reader handle. + * @retval DDS_RETCODE_ERROR + * An internal error occurred. + * + * DOC_TODO: Complete list of error codes + */ +DDS_EXPORT dds_entity_t +dds_create_reader( + dds_entity_t participant_or_subscriber, + dds_entity_t topic, + const dds_qos_t *qos, + const dds_listener_t *listener); + +/** + * @brief Creates a new instance of a DDS reader with a custom history cache. + * @ingroup reader + * + * When a participant is used to create a reader, an implicit subscriber is created. + * This implicit subscriber will be deleted automatically when the created reader + * is deleted. + * + * @param[in] participant_or_subscriber The participant or subscriber on which the reader is being created. + * @param[in] topic The topic to read. + * @param[in] qos The QoS to set on the new reader (can be NULL). + * @param[in] listener Any listener functions associated with the new reader (can be NULL). + * @param[in] rhc Reader history cache to use, reader becomes the owner + * + * @returns A valid reader handle or an error code. + * + * @retval >0 + * A valid reader handle. + * @retval DDS_RETCODE_ERROR + * An internal error occurred. + * + * DOC_TODO: Complete list of error codes + */ +DDS_EXPORT dds_entity_t +dds_create_reader_rhc( + dds_entity_t participant_or_subscriber, + dds_entity_t topic, + const dds_qos_t *qos, + const dds_listener_t *listener, + struct dds_rhc *rhc); + +/** + * @brief Wait until reader receives all historic data + * @ingroup reader + * + * The operation blocks the calling thread until either all "historical" data is + * received, or else the duration specified by the max_wait parameter elapses, whichever happens + * first. A return value of 0 indicates that all the "historical" data was received; a return + * value of TIMEOUT indicates that max_wait elapsed before all the data was received. + * + * @param[in] reader The reader on which to wait for historical data. + * @param[in] max_wait How long to wait for historical data before time out. + * + * @returns a status, 0 on success, TIMEOUT on timeout or a negative value to indicate error. + * + * DOC_TODO: Complete list of error codes + */ +DDS_EXPORT dds_return_t +dds_reader_wait_for_historical_data( + dds_entity_t reader, + dds_duration_t max_wait); + +/** + * @defgroup writer (Writer) + * @ingroup publication + * DOC_TODO The writer is a DDS Entity + */ + +/** + * @brief Creates a new instance of a DDS writer. + * @ingroup writer + * + * When a participant is used to create a writer, an implicit publisher is created. + * This implicit publisher will be deleted automatically when the created writer + * is deleted. + * + * @param[in] participant_or_publisher The participant or publisher on which the writer is being created. + * @param[in] topic The topic to write. + * @param[in] qos The QoS to set on the new writer (can be NULL). + * @param[in] listener Any listener functions associated with the new writer (can be NULL). + * + * @returns A valid writer handle or an error code. + * + * @returns >0 + * A valid writer handle. + * @returns DDS_RETCODE_ERROR + * An internal error occurred. + * + * DOC_TODO: Complete list of error codes + */ +DDS_EXPORT dds_entity_t +dds_create_writer( + dds_entity_t participant_or_publisher, + dds_entity_t topic, + const dds_qos_t *qos, + const dds_listener_t *listener); + + +/** + * @defgroup writing (Writing data) + * @ingroup writer + * Writing data (and variants of it) is straightforward. The first set + * is equivalent to the second set with -1 passed for "timestamp", + * meaning, substitute the result of a call to time(). The dispose + * and unregister operations take an object of the topic's type, but + * only touch the key fields; the remained may be undefined. +*/ + +/** + * @brief Registers an instance + * @ingroup writing + * + * This operation registers an instance with a key value to the data writer and + * returns an instance handle that could be used for successive write & dispose + * operations. When the handle is not allocated, the function will return an + * error and the handle will be un-touched. + * + * @param[in] writer The writer to which instance has be associated. + * @param[out] handle The instance handle. + * @param[in] data The instance with the key value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_register_instance( + dds_entity_t writer, + dds_instance_handle_t *handle, + const void *data); + +/** + * @brief Unregisters an instance by instance + * @ingroup writing + * + * This operation reverses the action of register instance, removes all information regarding + * the instance and unregisters an instance with a key value from the data writer. + * + * @param[in] writer The writer to which instance is associated. + * @param[in] data The instance with the key value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_unregister_instance(dds_entity_t writer, const void *data); + +/** + * @brief Unregisters an instance by instance handle + * @ingroup writing + * + * This operation unregisters the instance which is identified by the key fields of the given + * typed instance handle. + * + * @param[in] writer The writer to which instance is associated. + * @param[in] handle The instance handle. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_unregister_instance_ih(dds_entity_t writer, dds_instance_handle_t handle); + +/** + * @brief Unregisters an instance by instance with timestamp + * @ingroup writing + * + * This operation reverses the action of register instance, removes all information regarding + * the instance and unregisters an instance with a key value from the data writer. It also + * provides a value for the timestamp explicitly. + * + * @param[in] writer The writer to which instance is associated. + * @param[in] data The instance with the key value. + * @param[in] timestamp The timestamp used at registration. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_unregister_instance_ts( + dds_entity_t writer, + const void *data, + dds_time_t timestamp); + +/** + * @brief Unregisters an instance by instance handle with timestamp + * @ingroup writing + * + * This operation unregisters an instance with a key value from the handle. Instance can be identified + * from instance handle. If an unregistered key ID is passed as an instance data, an error is logged and + * not flagged as return value. + * + * @param[in] writer The writer to which instance is associated. + * @param[in] handle The instance handle. + * @param[in] timestamp The timestamp used at registration. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object + */ +DDS_EXPORT dds_return_t +dds_unregister_instance_ih_ts( + dds_entity_t writer, + dds_instance_handle_t handle, + dds_time_t timestamp); + +/** + * @brief This operation modifies and disposes a data instance. + * @ingroup writing + * + * This operation requests the Data Distribution Service to modify the instance and + * mark it for deletion. Copies of the instance and its corresponding samples, which are + * stored in every connected reader and, dependent on the QoS policy settings (also in + * the Transient and Persistent stores) will be modified and marked for deletion by + * setting their dds_instance_state_t to DDS_IST_NOT_ALIVE_DISPOSED. + * + * @par Blocking + * If the history QoS policy is set to DDS_HISTORY_KEEP_ALL, the + * dds_writedispose operation on the writer may block if the modification + * would cause data to be lost because one of the limits, specified in the + * resource_limits QoS policy, to be exceeded. In case the synchronous + * attribute value of the reliability Qos policy is set to true for + * communicating writers and readers then the writer will wait until + * all synchronous readers have acknowledged the data. Under these + * circumstances, the max_blocking_time attribute of the reliability + * QoS policy configures the maximum time the dds_writedispose operation + * may block. + * If max_blocking_time elapses before the writer is able to store the + * modification without exceeding the limits and all expected acknowledgements + * are received, the dds_writedispose operation will fail and returns + * DDS_RETCODE_TIMEOUT. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] data The data to be written and disposed. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_TIMEOUT + * Either the current action overflowed the available resources as + * specified by the combination of the reliability QoS policy, + * history QoS policy and resource_limits QoS policy, or the + * current action was waiting for data delivery acknowledgement + * by synchronous readers. This caused blocking of this operation, + * which could not be resolved before max_blocking_time of the + * reliability QoS policy elapsed. + */ +DDS_EXPORT dds_return_t +dds_writedispose(dds_entity_t writer, const void *data); + +/** + * @brief This operation modifies and disposes a data instance with a specific + * timestamp. + * @ingroup writing + * + * This operation performs the same functions as dds_writedispose() except that + * the application provides the value for the source_timestamp that is made + * available to connected reader objects. This timestamp is important for the + * interpretation of the destination_order QoS policy. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] data The data to be written and disposed. + * @param[in] timestamp The timestamp used as source timestamp. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_TIMEOUT + * Either the current action overflowed the available resources as + * specified by the combination of the reliability QoS policy, + * history QoS policy and resource_limits QoS policy, or the + * current action was waiting for data delivery acknowledgement + * by synchronous readers. This caused blocking of this operation, + * which could not be resolved before max_blocking_time of the + * reliability QoS policy elapsed. + */ +DDS_EXPORT dds_return_t +dds_writedispose_ts( + dds_entity_t writer, + const void *data, + dds_time_t timestamp); + +/** + * @brief This operation disposes an instance, identified by the data sample. + * @ingroup writing + * + * This operation requests the Data Distribution Service to modify the instance and + * mark it for deletion. Copies of the instance and its corresponding samples, which are + * stored in every connected reader and, dependent on the QoS policy settings (also in + * the Transient and Persistent stores) will be modified and marked for deletion by + * setting their dds_instance_state_t to DDS_IST_NOT_ALIVE_DISPOSED. + * + * @par Blocking + * If the history QoS policy is set to DDS_HISTORY_KEEP_ALL, the + * dds_writedispose operation on the writer may block if the modification + * would cause data to be lost because one of the limits, specified in the + * resource_limits QoS policy, to be exceeded. In case the synchronous + * attribute value of the reliability Qos policy is set to true for + * communicating writers and readers then the writer will wait until + * all synchronous readers have acknowledged the data. Under these + * circumstances, the max_blocking_time attribute of the reliability + * QoS policy configures the maximum time the dds_writedispose operation + * may block. + * If max_blocking_time elapses before the writer is able to store the + * modification without exceeding the limits and all expected acknowledgements + * are received, the dds_writedispose operation will fail and returns + * DDS_RETCODE_TIMEOUT. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] data The data sample that identifies the instance + * to be disposed. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_TIMEOUT + * Either the current action overflowed the available resources as + * specified by the combination of the reliability QoS policy, + * history QoS policy and resource_limits QoS policy, or the + * current action was waiting for data delivery acknowledgement + * by synchronous readers. This caused blocking of this operation, + * which could not be resolved before max_blocking_time of the + * reliability QoS policy elapsed. + */ +DDS_EXPORT dds_return_t +dds_dispose(dds_entity_t writer, const void *data); + +/** + * @brief This operation disposes an instance with a specific timestamp, identified by the data sample. + * @ingroup writing + * + * This operation performs the same functions as dds_dispose() except that + * the application provides the value for the source_timestamp that is made + * available to connected reader objects. This timestamp is important for the + * interpretation of the destination_order QoS policy. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] data The data sample that identifies the instance + * to be disposed. + * @param[in] timestamp The timestamp used as source timestamp. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion + * @retval DDS_RETCODE_ERROR + * An internal error has occurred + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted + * @retval DDS_RETCODE_TIMEOUT + * Either the current action overflowed the available resources as + * specified by the combination of the reliability QoS policy, + * history QoS policy and resource_limits QoS policy, or the + * current action was waiting for data delivery acknowledgment + * by synchronous readers. This caused blocking of this operation, + * which could not be resolved before max_blocking_time of the + * reliability QoS policy elapsed. + */ +DDS_EXPORT dds_return_t +dds_dispose_ts( + dds_entity_t writer, + const void *data, + dds_time_t timestamp); + +/** + * @brief This operation disposes an instance, identified by the instance handle. + * @ingroup writing + * + * This operation requests the Data Distribution Service to modify the instance and + * mark it for deletion. Copies of the instance and its corresponding samples, which are + * stored in every connected reader and, dependent on the QoS policy settings (also in + * the Transient and Persistent stores) will be modified and marked for deletion by + * setting their dds_instance_state_t to DDS_IST_NOT_ALIVE_DISPOSED. + * + * @par Instance Handle + * The given instance handle must correspond to the value that was returned by either + * the dds_register_instance operation, dds_register_instance_ts or dds_lookup_instance. + * If there is no correspondence, then the result of the operation is unspecified. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] handle The handle to identify an instance. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this writer + */ +DDS_EXPORT dds_return_t +dds_dispose_ih(dds_entity_t writer, dds_instance_handle_t handle); + +/** + * @brief This operation disposes an instance with a specific timestamp, identified by the instance handle. + * @ingroup writing + * + * This operation performs the same functions as dds_dispose_ih() except that + * the application provides the value for the source_timestamp that is made + * available to connected reader objects. This timestamp is important for the + * interpretation of the destination_order QoS policy. + * + * @param[in] writer The writer to dispose the data instance from. + * @param[in] handle The handle to identify an instance. + * @param[in] timestamp The timestamp used as source timestamp. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The sample is written and the instance is marked for deletion. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * At least one of the arguments is invalid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this writer. + */ +DDS_EXPORT dds_return_t +dds_dispose_ih_ts( + dds_entity_t writer, + dds_instance_handle_t handle, + dds_time_t timestamp); + +/** + * @brief Write the value of a data instance + * @ingroup writing + * + * With this API, the value of the source timestamp is automatically made + * available to the data reader by the service. + * + * @param[in] writer The writer entity. + * @param[in] data Value to be written. + * + * @returns dds_return_t indicating success or failure. + */ +DDS_EXPORT dds_return_t +dds_write(dds_entity_t writer, const void *data); + +/** + * @brief Flush a writers batched writes + * @ingroup writing + * + * When using the WriteBatch mode you can manually batch small writes into larger + * datapackets for network efficiency. The normal dds_write() calls will no longer + * automatically decide when to send data, you will do that manually using this function. + * + * DOC_TODO check if my assumptions about how this function works are correct + * + * @param[in] writer The writer entity. + */ +DDS_EXPORT void +dds_write_flush(dds_entity_t writer); + +/** + * @brief Write a serialized value of a data instance + * @ingroup writing + * + * This call causes the writer to write the serialized value that is provided + * in the serdata argument. Timestamp and statusinfo fields are set to the + * current time and 0 (indicating a regular write), respectively. + * + * @param[in] writer The writer entity. + * @param[in] serdata Serialized value to be written. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The writer successfully wrote the serialized value. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_TIMEOUT + * The writer failed to write the serialized value reliably within the specified max_blocking_time. + */ +DDS_EXPORT dds_return_t +dds_writecdr(dds_entity_t writer, struct ddsi_serdata *serdata); + +/** + * @brief Write a serialized value of a data instance + * @ingroup writing + * + * This call causes the writer to write the serialized value that is provided + * in the serdata argument. Timestamp and statusinfo are used as is. + * + * @param[in] writer The writer entity. + * @param[in] serdata Serialized value to be written. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The writer successfully wrote the serialized value. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_TIMEOUT + * The writer failed to write the serialized value reliably within the specified max_blocking_time. + */ +DDS_EXPORT dds_return_t +dds_forwardcdr(dds_entity_t writer, struct ddsi_serdata *serdata); + +/** + * @brief Write the value of a data instance along with the source timestamp passed. + * @ingroup writing + * + * @param[in] writer The writer entity. + * @param[in] data Value to be written. + * @param[in] timestamp Source timestamp. + * + * @returns A dds_return_t indicating success or failure. + */ +DDS_EXPORT dds_return_t +dds_write_ts( + dds_entity_t writer, + const void *data, + dds_time_t timestamp); + +/** + * @defgroup readcondition (ReadCondition) + * @ingroup condition + */ +/** + * @defgroup querycondition (QueryCondition) + * @ingroup condition + */ +/** + * @defgroup guardcondition (GuardCondition) + * @ingroup condition + */ + +/** + * @brief Creates a readcondition associated to the given reader. + * @ingroup readcondition + * + * The readcondition allows specifying which samples are of interest in + * a data reader's history, by means of a mask. The mask is or'd with + * the flags that are dds_sample_state_t, dds_view_state_t and + * dds_instance_state_t. + * + * Based on the mask value set, the readcondition gets triggered when + * data is available on the reader. + * + * Waitsets allow waiting for an event on some of any set of entities. + * This means that the readcondition can be used to wake up a waitset when + * data is in the reader history with states that matches the given mask. + * + * @note The parent reader and every of its associated conditions (whether + * they are readconditions or queryconditions) share the same resources. + * This means that one of these entities reads or takes data, the states + * of the data will change for other entities automatically. For instance, + * if one reads a sample, then the sample state will become 'read' for all + * associated reader/conditions. Or if one takes a sample, then it's not + * available to any other associated reader/condition. + * + * @param[in] reader Reader to associate the condition to. + * @param[in] mask Interest (dds_sample_state_t|dds_view_state_t|dds_instance_state_t). + * + * @returns A valid condition handle or an error code. + * + * @retval >0 + * A valid condition handle + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_create_readcondition(dds_entity_t reader, uint32_t mask); + +/** + * @brief Function signature for a querycondition filter + * @ingroup querycondition + */ +typedef bool (*dds_querycondition_filter_fn) (const void * sample); + +/** + * @brief Creates a queryondition associated to the given reader. + * @ingroup querycondition + * + * The queryondition allows specifying which samples are of interest in + * a data reader's history, by means of a mask and a filter. The mask is + * or'd with the flags that are dds_sample_state_t, dds_view_state_t and + * dds_instance_state_t. + * + * Based on the mask value set and data that matches the filter, the + * querycondition gets triggered when data is available on the reader. + * + * Waitsets allow waiting for an event on some of any set of entities. + * This means that the querycondition can be used to wake up a waitset when + * data is in the reader history with states that matches the given mask + * and filter. + * + * @note The parent reader and every of its associated conditions (whether + * they are readconditions or queryconditions) share the same resources. + * This means that one of these entities reads or takes data, the states + * of the data will change for other entities automatically. For instance, + * if one reads a sample, then the sample state will become 'read' for all + * associated reader/conditions. Or if one takes a sample, then it's not + * available to any other associated reader/condition. + * + * @param[in] reader Reader to associate the condition to. + * @param[in] mask Interest (dds_sample_state_t|dds_view_state_t|dds_instance_state_t). + * @param[in] filter Callback that the application can use to filter specific samples. + * + * @returns A valid condition handle or an error code + * + * @retval >=0 + * A valid condition handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_create_querycondition( + dds_entity_t reader, + uint32_t mask, + dds_querycondition_filter_fn filter); + +/** + * @brief Creates a guardcondition. + * @ingroup guardcondition + * + * Waitsets allow waiting for an event on some of any set of entities. + * This means that the guardcondition can be used to wake up a waitset when + * data is in the reader history with states that matches the given mask. + * + * @param[in] participant Participant on which to create the guardcondition. + * + * @returns A valid condition handle or an error code. + * + * @retval >0 + * A valid condition handle + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_create_guardcondition(dds_entity_t participant); + +/** + * @brief Sets the trigger status of a guardcondition. + * @ingroup guardcondition + * + * @param[in] guardcond Guard condition to set the trigger status of. + * @param[in] triggered The triggered status to set. + * + * @retval DDS_RETCODE_OK + * Operation successful + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_set_guardcondition(dds_entity_t guardcond, bool triggered); + +/** + * @brief Reads the trigger status of a guardcondition. + * @ingroup guardcondition + * + * @param[in] guardcond Guard condition to read the trigger status of. + * @param[out] triggered The triggered status read from the guard condition. + * + * @retval DDS_RETCODE_OK + * Operation successful + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_guardcondition(dds_entity_t guardcond, bool *triggered); + +/** + * @brief Reads and resets the trigger status of a guardcondition. + * @ingroup guardcondition + * + * @param[in] guardcond Guard condition to read and reset the trigger status of. + * @param[out] triggered The triggered status read from the guard condition. + * + * @retval DDS_RETCODE_OK + * Operation successful + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_guardcondition(dds_entity_t guardcond, bool *triggered); + +/** + * @defgroup waitset (WaitSet) + * @ingroup dds + */ + +/** + * @brief Waitset attachment argument. + * @ingroup waitset + * + * Every entity that is attached to the waitset can be accompanied by such + * an attachment argument. When the waitset wait is unblocked because of an + * entity that triggered, then the returning array will be populated with + * these attachment arguments that are related to the triggered entity. + */ +typedef intptr_t dds_attach_t; + +/** + * @brief Create a waitset and allocate the resources required + * @ingroup waitset + * + * A WaitSet object allows an application to wait until one or more of the + * conditions of the attached entities evaluates to TRUE or until the timeout + * expires. + * + * @param[in] participant Domain participant which the WaitSet contains. + * + * @returns A valid waitset handle or an error code. + * + * @retval >=0 + * A valid waitset handle. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_create_waitset(dds_entity_t participant); + +/** + * @brief Acquire previously attached entities. + * @ingroup waitset + * + * This functions takes a pre-allocated list to put the entities in and + * will return the number of found entities. It is possible that the given + * size of the list is not the same as the number of found entities. If + * less entities are found, then the last few entries in the list are + * untouched. When more entities are found, then only 'size' number of + * entries are inserted into the list, but still the complete count of the + * found entities is returned. Which entities are returned in the latter + * case is undefined. + * + * @param[in] waitset Waitset from which to get its attached entities. + * @param[out] entities Pre-allocated array to contain the found entities. + * @param[in] size Size of the pre-allocated entities' list. + * + * @returns A dds_return_t with the number of children or an error code. + * + * @retval >=0 + * Number of children found (can be larger than 'size'). + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entities parameter is NULL, while a size is provided. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_waitset_get_entities( + dds_entity_t waitset, + dds_entity_t *entities, + size_t size); + +/** + * @brief This operation attaches an Entity to the WaitSet. + * @ingroup waitset + * + * This operation attaches an Entity to the WaitSet. The dds_waitset_wait() + * will block when none of the attached entities are triggered. 'Triggered' + * (dds_triggered()) doesn't mean the same for every entity: + * - Reader/Writer/Publisher/Subscriber/Topic/Participant + * - These are triggered when their status changed. + * - WaitSet + * - Triggered when trigger value was set to true by the application. + * It stays triggered until application sets the trigger value to + * false (dds_waitset_set_trigger()). This can be used to wake up an + * waitset for different reasons (f.i. termination) than the 'normal' + * status change (like new data). + * - ReadCondition/QueryCondition + * - Triggered when data is available on the related Reader that matches + * the Condition. + * + * Multiple entities can be attached to a single waitset. A particular entity + * can be attached to multiple waitsets. However, a particular entity can not + * be attached to a particular waitset multiple times. + * + * @param[in] waitset The waitset to attach the given entity to. + * @param[in] entity The entity to attach. + * @param[in] x Blob that will be supplied when the waitset wait is + * triggered by the given entity. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Entity attached. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The given waitset or entity are not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The entity was already attached. + */ +DDS_EXPORT dds_return_t +dds_waitset_attach( + dds_entity_t waitset, + dds_entity_t entity, + dds_attach_t x); + +/** + * @brief This operation detaches an Entity from the WaitSet. + * @ingroup waitset + * + * @param[in] waitset The waitset to detach the given entity from. + * @param[in] entity The entity to detach. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Entity detached. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The given waitset or entity are not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The entity is not attached. + */ +DDS_EXPORT dds_return_t +dds_waitset_detach( + dds_entity_t waitset, + dds_entity_t entity); + +/** + * @brief Sets the trigger_value associated with a waitset. + * @ingroup waitset + * + * When the waitset is attached to itself and the trigger value is + * set to 'true', then the waitset will wake up just like with an + * other status change of the attached entities. + * + * This can be used to forcefully wake up a waitset, for instance + * when the application wants to shut down. So, when the trigger + * value is true, the waitset will wake up or not wait at all. + * + * The trigger value will remain true until the application sets it + * false again deliberately. + * + * @param[in] waitset The waitset to set the trigger value on. + * @param[in] trigger The trigger value to set. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * Trigger value set. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The given waitset is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_waitset_set_trigger( + dds_entity_t waitset, + bool trigger); + +/** + * @brief This operation allows an application thread to wait for the a status + * change or other trigger on (one of) the entities that are attached to + * the WaitSet. + * @ingroup waitset + * + * The dds_waitset_wait() operation blocks until the some of the attached + * entities have triggered or "reltimeout" has elapsed. + * 'Triggered' (dds_triggered()) doesn't mean the same for every entity: + * - Reader/Writer/Publisher/Subscriber/Topic/Participant + * - These are triggered when their status changed. + * - WaitSet + * - Triggered when trigger value was set to true by the application. + * It stays triggered until application sets the trigger value to + * false (dds_waitset_set_trigger()). This can be used to wake up an + * waitset for different reasons (f.i. termination) than the 'normal' + * status change (like new data). + * - ReadCondition/QueryCondition + * - Triggered when data is available on the related Reader that matches + * the Condition. + * + * This functions takes a pre-allocated list to put the "xs" blobs in (that + * were provided during the attach of the related entities) and will return + * the number of triggered entities. It is possible that the given size + * of the list is not the same as the number of triggered entities. If less + * entities were triggered, then the last few entries in the list are + * untouched. When more entities are triggered, then only 'size' number of + * entries are inserted into the list, but still the complete count of the + * triggered entities is returned. Which "xs" blobs are returned in the + * latter case is undefined. + * + * In case of a time out, the return value is 0. + * + * Deleting the waitset while the application is blocked results in an + * error code (i.e. < 0) returned by "wait". + * + * Multiple threads may block on a single waitset at the same time; + * the calls are entirely independent. + * + * An empty waitset never triggers (i.e., dds_waitset_wait on an empty + * waitset is essentially equivalent to a sleep). + * + * The "dds_waitset_wait_until" operation is the same as the + * "dds_waitset_wait" except that it takes an absolute timeout. + * + * @param[in] waitset The waitset to set the trigger value on. + * @param[out] xs Pre-allocated list to store the 'blobs' that were + * provided during the attach of the triggered entities. + * @param[in] nxs The size of the pre-allocated blobs list. + * @param[in] reltimeout Relative timeout + * + * @returns A dds_return_t with the number of entities triggered or an error code + * + * @retval >0 + * Number of entities triggered. + * @retval 0 + * Time out (no entities were triggered). + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The given waitset is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_waitset_wait( + dds_entity_t waitset, + dds_attach_t *xs, + size_t nxs, + dds_duration_t reltimeout); + +/** + * @brief This operation allows an application thread to wait for the a status + * change or other trigger on (one of) the entities that are attached to + * the WaitSet. + * @ingroup waitset + * + * The dds_waitset_wait() operation blocks until the some of the attached + * entities have triggered or "abstimeout" has been reached. + * 'Triggered' (dds_triggered()) doesn't mean the same for every entity: + * - Reader/Writer/Publisher/Subscriber/Topic/Participant + * - These are triggered when their status changed. + * - WaitSet + * - Triggered when trigger value was set to true by the application. + * It stays triggered until application sets the trigger value to + * false (dds_waitset_set_trigger()). This can be used to wake up an + * waitset for different reasons (f.i. termination) than the 'normal' + * status change (like new data). + * - ReadCondition/QueryCondition + * - Triggered when data is available on the related Reader that matches + * the Condition. + * + * This functions takes a pre-allocated list to put the "xs" blobs in (that + * were provided during the attach of the related entities) and will return + * the number of triggered entities. It is possible that the given size + * of the list is not the same as the number of triggered entities. If less + * entities were triggered, then the last few entries in the list are + * untouched. When more entities are triggered, then only 'size' number of + * entries are inserted into the list, but still the complete count of the + * triggered entities is returned. Which "xs" blobs are returned in the + * latter case is undefined. + * + * In case of a time out, the return value is 0. + * + * Deleting the waitset while the application is blocked results in an + * error code (i.e. < 0) returned by "wait". + * + * Multiple threads may block on a single waitset at the same time; + * the calls are entirely independent. + * + * An empty waitset never triggers (i.e., dds_waitset_wait on an empty + * waitset is essentially equivalent to a sleep). + * + * The "dds_waitset_wait" operation is the same as the + * "dds_waitset_wait_until" except that it takes an relative timeout. + * + * The "dds_waitset_wait" operation is the same as the "dds_wait" + * except that it takes an absolute timeout. + * + * @param[in] waitset The waitset to set the trigger value on. + * @param[out] xs Pre-allocated list to store the 'blobs' that were + * provided during the attach of the triggered entities. + * @param[in] nxs The size of the pre-allocated blobs list. + * @param[in] abstimeout Absolute timeout + * + * @returns A dds_return_t with the number of entities triggered or an error code. + * + * @retval >0 + * Number of entities triggered. + * @retval 0 + * Time out (no entities were triggered). + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The given waitset is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The waitset has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_waitset_wait_until( + dds_entity_t waitset, + dds_attach_t *xs, + size_t nxs, + dds_time_t abstimeout); + +/** + * @defgroup reading (Reading Data) + * @ingroup reader + * There are a number of ways to aquire data, divided into variations of "read" and "take". + * The return value of a read/take operation is the number of elements returned. "max_samples" + * should have the same type, as one can't return more than MAX_INT + * this way, anyway. X, Y, CX, CY return to the various filtering + * options, see the DCPS spec. + * + * O ::= read | take + * + * X => CX + * (empty) (empty) + * _next_instance instance_handle_t prev + * + * Y => CY + * (empty) uint32_t mask + * _cond cond_t cond -- refers to a read condition (or query if implemented) + */ + +/** + * @brief Access and read the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition. + * @ingroup reading + * + * Return value provides information about number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain data to be read only + * when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the Data. + * Data values once read will remain in the buffer with the sample_state set to READ + * and view_state set to NOT_NEW. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs); + +/** + * @brief Access and read loaned samples of data reader, readcondition or querycondition. + * @ingroup reading + * + * After dds_read_wl function is being called and the data has been handled, dds_return_loan() function must be called to possibly free memory. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL) + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value + * @param[in] maxs Maximum number of samples to read + * + * @returns A dds_return_t with the number of samples read or an error code + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs); + +/** + * @brief Read the collection of data values and sample info from the data reader, readcondition + * or querycondition based on mask. + * @ingroup reading + * + * When using a readcondition or querycondition, their masks are or'd with the given mask. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_mask( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + uint32_t mask); + +/** + * @brief Access and read loaned samples of data reader, readcondition + * or querycondition based on mask + * @ingroup reading + * + * When using a readcondition or querycondition, their masks are or'd with the given mask. + * + * After dds_read_mask_wl function is being called and the data has been handled, dds_return_loan() function must be called to possibly free memory + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_mask_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + uint32_t mask); + +/** + * @brief Access and read the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition, coped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_read, except that only data scoped to + * the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_read_instance( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + dds_instance_handle_t handle); + +/** + * @brief Access and read loaned samples of data reader, readcondition or querycondition, + * scoped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_read_wl, except that only data + * scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_read_instance_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + dds_instance_handle_t handle); + +/** + * @brief Read the collection of data values and sample info from the data reader, readcondition + * or querycondition based on mask and scoped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_read_mask, except that only data + * scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_read_instance_mask( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + dds_instance_handle_t handle, + uint32_t mask); + +/** + * @brief Access and read loaned samples of data reader, readcondition or + * querycondition based on mask, scoped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_read_mask_wl, except that + * only data scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_read_instance_mask_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + dds_instance_handle_t handle, + uint32_t mask); + +/** + * @brief Access the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition. + * @ingroup reading + * + * Data value once read is removed from the Data Reader cannot to + * 'read' or 'taken' again. + * Return value provides information about number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain data to be read only + * when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the Data. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs); + +/** + * @brief Access loaned samples of data reader, readcondition or querycondition. + * @ingroup reading + * + * After dds_take_wl function is being called and the data has been handled, dds_return_loan() function must be called to possibly free memory + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs); + +/** + * @brief Take the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition based on mask + * @ingroup reading + * + * When using a readcondition or querycondition, their masks are or'd with the given mask. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_mask( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + uint32_t mask); + +/** + * @brief Access loaned samples of data reader, readcondition or querycondition based on mask. + * @ingroup reading + * + * When using a readcondition or querycondition, their masks are or'd with the given mask. + * + * After dds_take_mask_wl function is being called and the data has been handled, dds_return_loan() function must be called to possibly free memory + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_mask_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + uint32_t mask); + +/** + * @anchor DDS_HAS_READCDR + * @ingroup reading + * @brief Set when function dds_has_readcdr is defined. + */ +#define DDS_HAS_READCDR 1 + +/** + * @brief Access the collection of serialized data values (of same type) and + * sample info from the data reader, readcondition or querycondition. + * @ingroup reading + * + * This call accesses the serialized data from the data reader, readcondition or + * querycondition and makes it available to the application. The serialized data + * is made available through @ref ddsi_serdata structures. Returned samples are + * marked as READ. + * + * Return value provides information about the number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain serialized data to be + * read only when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the data. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to @ref ddsi_serdata structures that contain + * the serialized data. The pointers can be NULL. + * @param[in] maxs Maximum number of samples to read. + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The precondition for this operation is not met. + */ +DDS_EXPORT dds_return_t +dds_readcdr( + dds_entity_t reader_or_condition, + struct ddsi_serdata **buf, + uint32_t maxs, + dds_sample_info_t *si, + uint32_t mask); + +/** + * @brief Access the collection of serialized data values (of same type) and + * sample info from the data reader, readcondition or querycondition + * scoped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_read_instance_wl, except that + * samples are now in their serialized form. The serialized data is made available through + * @ref ddsi_serdata structures. Returned samples are marked as READ. + * + * Return value provides information about the number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain serialized data to be + * read only when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the data. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to @ref ddsi_serdata structures that contain + * the serialized data. The pointers can be NULL. + * @param[in] maxs Maximum number of samples to read. + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_readcdr_instance ( + dds_entity_t reader_or_condition, + struct ddsi_serdata **buf, + uint32_t maxs, + dds_sample_info_t *si, + dds_instance_handle_t handle, + uint32_t mask); + +/** + * @brief Access the collection of serialized data values (of same type) and + * sample info from the data reader, readcondition or querycondition. + * @ingroup reading + * + * This call accesses the serialized data from the data reader, readcondition or + * querycondition and makes it available to the application. The serialized data + * is made available through @ref ddsi_serdata structures. Once read the data is + * removed from the reader and cannot be 'read' or 'taken' again. + * + * Return value provides information about the number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain serialized data to be + * read only when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the data. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to @ref ddsi_serdata structures that contain + * the serialized data. The pointers can be NULL. + * @param[in] maxs Maximum number of samples to read. + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The precondition for this operation is not met. + */ +DDS_EXPORT dds_return_t +dds_takecdr( + dds_entity_t reader_or_condition, + struct ddsi_serdata **buf, + uint32_t maxs, + dds_sample_info_t *si, + uint32_t mask); + +/** + * @brief Access the collection of serialized data values (of same type) and + * sample info from the data reader, readcondition or querycondition + * scoped by the provided instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_take_instance_wl, except that + * samples are now in their serialized form. The serialized data is made available through + * @ref ddsi_serdata structures. Returned samples are marked as READ. + * + * Return value provides information about the number of samples read, which will + * be <= maxs. Based on the count, the buffer will contain serialized data to be + * read only when valid_data bit in sample info structure is set. + * The buffer required for data values, could be allocated explicitly or can + * use the memory from data reader to prevent copy. In the latter case, buffer and + * sample_info should be returned back, once it is no longer using the data. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to @ref ddsi_serdata structures that contain + * the serialized data. The pointers can be NULL. + * @param[in] maxs Maximum number of samples to read. + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_takecdr_instance ( + dds_entity_t reader_or_condition, + struct ddsi_serdata **buf, + uint32_t maxs, + dds_sample_info_t *si, + dds_instance_handle_t handle, + uint32_t mask); + + +/** + * @brief Access the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition but scoped by the given + * instance handle. + * @ingroup reading + * + * This operation mplements the same functionality as dds_take, except that only data + * scoped to the provided instance handle is taken. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_take_instance( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + dds_instance_handle_t handle); + +/** + * @brief Access loaned samples of data reader, readcondition or querycondition, + * scoped by the given instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_take_wl, except that + * only data scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_take_instance_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + dds_instance_handle_t handle); + +/** + * @brief Take the collection of data values (of same type) and sample info from the + * data reader, readcondition or querycondition based on mask and scoped + * by the given instance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_take_mask, except that only + * data scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] bufsz The size of buffer provided. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples read or an error code. + * + * @retval >=0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_take_instance_mask( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + size_t bufsz, + uint32_t maxs, + dds_instance_handle_t handle, + uint32_t mask); + +/** + * @brief Access loaned samples of data reader, readcondition or querycondition based + * on mask and scoped by the given intance handle. + * @ingroup reading + * + * This operation implements the same functionality as dds_take_mask_wl, except that + * only data scoped to the provided instance handle is read. + * + * @param[in] reader_or_condition Reader, readcondition or querycondition entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. + * @param[in] maxs Maximum number of samples to read. + * @param[in] handle Instance handle related to the samples to read. + * @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t. + * + * @returns A dds_return_t with the number of samples or an error code. + * + * @retval >= 0 + * Number of samples read. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the given arguments is not valid. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * The instance handle has not been registered with this reader. + */ +DDS_EXPORT dds_return_t +dds_take_instance_mask_wl( + dds_entity_t reader_or_condition, + void **buf, + dds_sample_info_t *si, + uint32_t maxs, + dds_instance_handle_t handle, + uint32_t mask); + +/** + * @brief Read, copy and remove the status set for the entity + * @ingroup reading + * + * This operation copies the next, non-previously accessed + * data value and corresponding sample info and removes from + * the data reader. As an entity, only reader is accepted. + * + * The read/take next functions return a single sample. The returned sample + * has a sample state of NOT_READ, a view state of ANY_VIEW_STATE and an + * instance state of ANY_INSTANCE_STATE. + * + * @param[in] reader The reader entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si The pointer to @ref dds_sample_info_t returned for a data value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_next( + dds_entity_t reader, + void **buf, + dds_sample_info_t *si); + +/** + * @brief Read, copy and remove the status set for the entity + * @ingroup reading + * + * This operation copies the next, non-previously accessed + * data value and corresponding sample info and removes from + * the data reader. As an entity, only reader is accepted. + * + * The read/take next functions return a single sample. The returned sample + * has a sample state of NOT_READ, a view state of ANY_VIEW_STATE and an + * instance state of ANY_INSTANCE_STATE. + * + * After dds_take_next_wl function is being called and the data has been handled, + * dds_return_loan() function must be called to possibly free memory. + * + * @param[in] reader The reader entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si The pointer to @ref dds_sample_info_t returned for a data value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_take_next_wl( + dds_entity_t reader, + void **buf, + dds_sample_info_t *si); + +/** + * @brief Read and copy the status set for the entity + * @ingroup reading + * + * This operation copies the next, non-previously accessed + * data value and corresponding sample info. As an entity, + * only reader is accepted. + * + * The read/take next functions return a single sample. The returned sample + * has a sample state of NOT_READ, a view state of ANY_VIEW_STATE and an + * instance state of ANY_INSTANCE_STATE. + * + * @param[in] reader The reader entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si The pointer to @ref dds_sample_info_t returned for a data value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_next( + dds_entity_t reader, + void **buf, + dds_sample_info_t *si); + +/** + * @brief Read and copy the status set for the loaned sample + * @ingroup reading + * + * This operation copies the next, non-previously accessed + * data value and corresponding loaned sample info. As an entity, + * only reader is accepted. + * + * The read/take next functions return a single sample. The returned sample + * has a sample state of NOT_READ, a view state of ANY_VIEW_STATE and an + * instance state of ANY_INSTANCE_STATE. + * + * After dds_read_next_wl function is being called and the data has been handled, + * dds_return_loan() function must be called to possibly free memory. + * + * @param[in] reader The reader entity. + * @param[out] buf An array of pointers to samples into which data is read (pointers can be NULL). + * @param[out] si The pointer to @ref dds_sample_info_t returned for a data value. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_read_next_wl( + dds_entity_t reader, + void **buf, + dds_sample_info_t *si); + + +/** + * @defgroup loan (Loans API) + * @ingroup dds + */ + +/** + * @brief Return loaned samples to a reader or writer + * @ingroup loan + * + * Used to release sample buffers returned by a read/take operation (a reader-loan) + * or, in case shared memory is enabled, of the loan_sample operation (a writer-loan). + * + * When the application provides an empty buffer to a reader-loan, memory is allocated and + * managed by DDS. By calling dds_return_loan(), the reader-loan is released so that the buffer + * can be reused during a successive read/take operation. When a condition is provided, the + * reader to which the condition belongs is looked up. + * + * Writer-loans are normally released implicitly when writing a loaned sample, but you can + * cancel a writer-loan prematurely by invoking the return_loan() operation. For writer loans, buf is + * overwritten with null pointers for all successfully returned entries. Any failure causes it to abort, + * possibly midway through buf. + * + * @param[in] entity The entity that the loan belongs to. + * @param[in,out] buf An array of (pointers to) samples, some or all of which will be set to null pointers. + * @param[in] bufsz The number of (pointers to) samples stored in buf. + * + * @returns A dds_return_t indicating success or failure + * @retval DDS_RETCODE_OK + * - the operation was successful; for a writer loan, all entries in buf are set to null + * - this specifically includes cases where bufsz <= 0 while entity is valid + * @retval DDS_RETCODE_BAD_PARAMETER + * - the entity parameter is not a valid parameter + * - buf is null, or bufsz > 0 and buf[0] = null + * - (for writer loans) buf[0 <= i < bufsz] is null; operation is aborted, all buf[j < i] = null on return + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * - (for reader loans) buf was already returned (not guaranteed to be detected) + * - (for writer loans) buf[0 <= i < bufsz] does not correspond to an outstanding loan, all buf[j < i] = null on return + * @retval DDS_RETCODE_UNSUPPORTED + * - (for writer loans) invoked on a writer not supporting loans. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * - the operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_return_loan( + dds_entity_t entity, + void **buf, + int32_t bufsz); + +/** + * @defgroup instance_handle (Instance Handles) + * @ingroup dds + * Instance handle <=> key value mapping. + * Functions exactly as read w.r.t. treatment of data + * parameter. On output, only key values set. + * @code{c} + * T x = { ... }; + * T y; + * dds_instance_handle_t ih; + * ih = dds_lookup_instance (e, &x); + * dds_instance_get_key (e, ih, &y); + * @endcode +*/ + +/** + * @brief This operation takes a sample and returns an instance handle to be used for subsequent operations. + * @ingroup instance_handle + * + * @param[in] entity Reader or Writer entity. + * @param[in] data Sample with a key fields set. + * + * @returns instance handle or DDS_HANDLE_NIL if instance could not be found from key. + */ +DDS_EXPORT dds_instance_handle_t +dds_lookup_instance(dds_entity_t entity, const void *data); + +/** + * @deprecated Get enabled status on entity. Use \ref dds_lookup_instance instead. + * @ingroup instance_handle + * + * @param[in] entity Reader or Writer entity. + * @param[in] data Sample with a key fields set. + * + * @returns instance handle or DDS_HANDLE_NIL if instance could not be found from key. + */ +DDS_DEPRECATED_EXPORT dds_instance_handle_t +dds_instance_lookup(dds_entity_t entity, const void *data); + +/** + * @brief This operation takes an instance handle and return a key-value corresponding to it. + * @ingroup instance_handle + * + * @param[in] entity Reader, writer, readcondition or querycondition entity. + * @param[in] inst Instance handle. + * @param[out] data pointer to an instance, to which the key ID corresponding to the instance handle will be + * returned, the sample in the instance should be ignored. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One of the parameters was invalid or the topic does not exist. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * + * DOC_TODO: Check return codes for completeness + */ +DDS_EXPORT dds_return_t +dds_instance_get_key( + dds_entity_t entity, + dds_instance_handle_t inst, + void *data); + +/** + * @brief Begin coherent publishing or begin accessing a coherent set in a subscriber + * @ingroup publication + * + * Invoking on a Writer or Reader behaves as if dds_begin_coherent was invoked on its parent + * Publisher or Subscriber respectively. + * + * @param[in] entity The entity that is prepared for coherent access. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_ERROR + * An internal error has occurred. + * @retval DDS_RETCODE_BAD_PARAMETER + * The provided entity is invalid or not supported. + */ +DDS_EXPORT dds_return_t +dds_begin_coherent(dds_entity_t entity); + +/** + * @brief End coherent publishing or end accessing a coherent set in a subscriber + * @ingroup publication + * + * Invoking on a Writer or Reader behaves as if dds_end_coherent was invoked on its parent + * Publisher or Subscriber respectively. + * + * @param[in] entity The entity on which coherent access is finished. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The provided entity is invalid or not supported. + */ +DDS_EXPORT dds_return_t +dds_end_coherent(dds_entity_t entity); + +/** + * @brief Trigger DATA_AVAILABLE event on contained readers + * @ingroup subscriber + * + * The DATA_AVAILABLE event is broadcast to all readers owned by this subscriber that currently + * have new data available. Any on_data_available listener callbacks attached to respective + * readers are invoked. + * + * @param[in] subscriber A valid subscriber handle. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The provided subscriber is invalid. + */ +DDS_EXPORT dds_return_t +dds_notify_readers(dds_entity_t subscriber); + +/** + * @brief Checks whether the entity has one of its enabled statuses triggered. + * @ingroup entity + * + * @param[in] entity Entity for which to check for triggered status. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_return_t +dds_triggered(dds_entity_t entity); + +/** + * @brief Get the topic + * @ingroup entity + * + * This operation returns a topic (handle) when the function call is done + * with reader, writer, read condition or query condition. For instance, it + * will return the topic when it is used for creating the reader or writer. + * For the conditions, it returns the topic that is used for creating the reader + * which was used to create the condition. + * + * @param[in] entity The entity. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_ALREADY_DELETED + * The entity has already been deleted. + */ +DDS_EXPORT dds_entity_t +dds_get_topic(dds_entity_t entity); + +/** + * @brief Get instance handles of the data readers matching a writer + * @ingroup builtintopic + * + * This operation fills the provided array with the instance handles + * of the data readers that match the writer. On successful output, + * the number of entries of "rds" set is the minimum of the return + * value and the value of "nrds". + * + * @param[in] writer The writer. + * @param[in] rds The array to be filled. + * @param[in] nrds The size of the rds array, at most the first + * nrds entries will be filled. rds = NULL and nrds = 0 + * is a valid way of determining the number of matched + * readers, but inefficient compared to relying on the + * matched publication status. + * + * @returns A dds_return_t indicating the number of matched readers + * or failure. The return value may be larger than nrds + * if there are more matching readers than the array can + * hold. + * + * @retval >=0 + * The number of matching readers. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not valid or rds = NULL and + * nrds > 0. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_get_matched_subscriptions ( + dds_entity_t writer, + dds_instance_handle_t *rds, + size_t nrds); + +/** + * @brief Get a description of a reader matched with the provided writer + * @ingroup builtintopic + * + * This operation looks up the reader instance handle in the set of + * readers matched with the specified writer, returning a freshly + * allocated sample of the DCPSSubscription built-in topic if found, + * and NULL if not. The caller is responsible for freeing the + * memory allocated, e.g. using dds_builtintopic_free_endpoint. + * + * This operation is similar to performing a read of the given + * instance handle on a reader of the DCPSSubscription built-in + * topic, but this operation additionally filters on whether the + * reader is matched by the provided writer. + * + * @param[in] writer The writer. + * @param[in] ih The instance handle of a reader. + * + * @returns A newly allocated sample containing the information on the + * reader, or a NULL pointer for any kind of failure. + * + * @retval != NULL + * The requested data + * @retval NULL + * The writer is not valid or ih is not an instance handle + * of a matched reader. + */ +DDS_EXPORT dds_builtintopic_endpoint_t * +dds_get_matched_subscription_data ( + dds_entity_t writer, + dds_instance_handle_t ih); + +/** + * @brief Get instance handles of the data writers matching a reader + * @ingroup builtintopic + * + * This operation fills the provided array with the instance handles + * of the data writers that match the reader. On successful output, + * the number of entries of "wrs" set is the minimum of the return + * value and the value of "nwrs". + * + * @param[in] reader The reader. + * @param[in] wrs The array to be filled. + * @param[in] nwrs The size of the wrs array, at most the first + * nwrs entries will be filled. wrs = NULL and wrds = 0 + * is a valid way of determining the number of matched + * readers, but inefficient compared to relying on the + * matched publication status. + * + * @returns A dds_return_t indicating the number of matched writers + * or failure. The return value may be larger than nwrs + * if there are more matching writers than the array can + * hold. + * + * @retval >=0 + * The number of matching writers. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not valid or wrs = NULL and + * nwrs > 0. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_get_matched_publications ( + dds_entity_t reader, + dds_instance_handle_t *wrs, + size_t nwrs); + +/** + * @brief Get a description of a writer matched with the provided reader + * @ingroup builtintopic + * + * This operation looks up the writer instance handle in the set of + * writers matched with the specified reader, returning a freshly + * allocated sample of the DCPSPublication built-in topic if found, + * and NULL if not. The caller is responsible for freeing the + * memory allocated, e.g. using dds_builtintopic_free_endpoint. + * + * This operation is similar to performing a read of the given + * instance handle on a reader of the DCPSPublication built-in + * topic, but this operation additionally filters on whether the + * writer is matched by the provided reader. + * + * @param[in] reader The reader. + * @param[in] ih The instance handle of a writer. + * + * @returns A newly allocated sample containing the information on the + * writer, or a NULL pointer for any kind of failure. + * + * @retval != NULL + * The requested data + * @retval NULL + * The reader is not valid or ih is not an instance handle + * of a matched writer. + */ +DDS_EXPORT dds_builtintopic_endpoint_t * +dds_get_matched_publication_data ( + dds_entity_t reader, + dds_instance_handle_t ih); + +#ifdef DDS_HAS_TYPE_DISCOVERY +/** + * @brief Gets the type information from endpoint information that was + * retrieved by dds_get_matched_subscription_data or + * dds_get_matched_publication_data + * @ingroup builtintopic + * + * @param[in] builtintopic_endpoint The builtintopic endpoint struct + * @param[out] type_info Type information that will be allocated by this function in case of success. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * One or more parameters are invalid + */ +DDS_EXPORT dds_return_t +dds_builtintopic_get_endpoint_type_info ( + dds_builtintopic_endpoint_t * builtintopic_endpoint, + const dds_typeinfo_t ** type_info); +#endif + +/** + * @brief Free the endpoint information that was retrieved by + * dds_get_matched_subscription_data or dds_get_matched_publication_data + * @ingroup builtintopic + * + * This operation deallocates the memory of the fields in a + * dds_builtintopic_endpoint_t struct and deallocates the + * struct itself. + * + * @param[in] builtintopic_endpoint The builtintopic endpoint struct + */ +DDS_EXPORT void +dds_builtintopic_free_endpoint ( + dds_builtintopic_endpoint_t * builtintopic_endpoint); + +/** + * @brief Free the provided topic information + * @ingroup builtintopic + * + * This operation deallocates the memory of the fields in a + * dds_builtintopic_topic_t struct and deallocates the + * struct itself. + * + * @param[in] builtintopic_topic The builtintopic topic struct + */ +DDS_EXPORT void +dds_builtintopic_free_topic ( + dds_builtintopic_topic_t * builtintopic_topic); + +/** + * @brief Free the provided participant information + * @ingroup builtintopic + * + * This operation deallocates the memory of the fields in a + * dds_builtintopic_participant_t struct and deallocates the + * struct itself. + * + * @param[in] builtintopic_participant The builtintopic participant struct + */ +DDS_EXPORT void +dds_builtintopic_free_participant ( + dds_builtintopic_participant_t * builtintopic_participant); + +/** + * @brief This operation manually asserts the liveliness of a writer + * or domain participant. + * @ingroup entity + * + * This operation manually asserts the liveliness of a writer + * or domain participant. This is used in combination with the Liveliness + * QoS policy to indicate that the entity remains active. This operation need + * only be used if the liveliness kind in the QoS is either + * DDS_LIVELINESS_MANUAL_BY_PARTICIPANT or DDS_LIVELINESS_MANUAL_BY_TOPIC. + * + * @param[in] entity A domain participant or writer + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + */ +DDS_EXPORT dds_return_t +dds_assert_liveliness ( + dds_entity_t entity); + + +/** + * @defgroup internal (Internal) + * @ingroup dds + */ + +/** + * @defgroup testing (Testing tools) + * @ingroup internal + */ + +/** + * + * @brief This operation allows making the domain's network stack temporarily deaf and/or mute. + * @ingroup testing + * @warning Unstable API, for testing + * + * This is a support function for testing and, other special uses and is subject to change. + * + * @param[in] entity A domain entity or an entity bound to a domain, such + * as a participant, reader or writer. + * @param[in] deaf Whether to network stack should pretend to be deaf and + * ignore any incoming packets. + * @param[in] mute Whether to network stack should pretend to be mute and + * discard any outgoing packets where it normally would. + * pass them to the operating system kernel for transmission. + * @param[in] reset_after Any value less than INFINITY will cause it to + * set deaf = mute = false after reset_after ns have passed. + * This is done by an event scheduled for the appropriate + * time and otherwise forgotten. These events are not + * affected by subsequent calls to this function. + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter. + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. +*/ +DDS_EXPORT dds_return_t +dds_domain_set_deafmute ( + dds_entity_t entity, + bool deaf, + bool mute, + dds_duration_t reset_after); + + +/** + * @defgroup xtypes (XTypes) + * @ingroup dds + * + * CycloneDDS supports XTypes, but most of that functionality outside the new IDL constructs + * happens behind the scenes. However, some API functionality is added that allows inspecting + * types at runtime. Using it in C is not very ergonomic, but dynamic languages like Python can + * make good use of it. + */ + +/** + * @brief This function resolves the type for the provided type identifier, + * which can e.g. be retrieved from endpoint or topic discovery data. + * @ingroup xtypes + * + * @param[in] entity A domain entity or an entity bound to a domain, such + * as a participant, reader or writer. + * @param[in] type_id Type identifier + * @param[in] timeout Timeout for waiting for requested type information to be available + * @param[out] type_obj The type information, untouched if type is not resolved + * + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The entity parameter is not a valid parameter, type_id or type name + * is not provided, or the sertype out parameter is NULL + * @retval DDS_RETCODE_NOT_FOUND + * A type with the provided type_id and type_name was not found + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) +*/ +DDS_EXPORT dds_return_t +dds_get_typeobj ( + dds_entity_t entity, + const dds_typeid_t *type_id, + dds_duration_t timeout, + dds_typeobj_t **type_obj); + +/** + * @brief Free the type object that was retrieved using dds_get_typeobj + * @ingroup xtypes + * + * @param[in] type_obj The type object + * + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The type_obj parameter is NULL + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) +*/ +DDS_EXPORT dds_return_t +dds_free_typeobj ( + dds_typeobj_t *type_obj); + +/** + * @brief This function gets the type information from the + * provided topic, reader or writer + * @ingroup xtypes + * + * @param[in] entity A topic/reader/writer entity + * @param[out] type_info The type information, untouched if returncode indicates failure + * + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The type_info parameter is null + * @retval DDS_RETCODE_NOT_FOUND + * The entity does not have type information set + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * The operation is invoked on an inappropriate object. + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) +*/ +DDS_EXPORT dds_return_t +dds_get_typeinfo ( + dds_entity_t entity, + dds_typeinfo_t **type_info); + +/** + * @brief Free the type information that was retrieved using dds_get_typeinfo + * @ingroup xtypes + * + * @param[in] type_info The type information + * + * + * @returns A dds_return_t indicating success or failure. + * + * @retval DDS_RETCODE_OK + * The operation was successful. + * @retval DDS_RETCODE_BAD_PARAMETER + * The type_info parameter is NULL + * @retval DDS_RETCODE_UNSUPPORTED + * Cyclone DDS built without type discovery + * (cf. DDS_HAS_TYPE_DISCOVERY) +*/ +DDS_EXPORT dds_return_t +dds_free_typeinfo ( + dds_typeinfo_t *type_info); + +#if defined (__cplusplus) +} +#endif +#endif /* DDS_H */ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_basic_types.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_basic_types.h new file mode 100644 index 0000000000000000000000000000000000000000..f112b644c708ffb8f02e7377fab61a6b7fef5309 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_basic_types.h @@ -0,0 +1,48 @@ +/* + * Copyright(c) 2006 to 2022 ZettaScale Technology and others + * Copyright(c) 2021 Apex.AI, Inc + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +#ifndef _DDS_BASIC_TYPES_H_ +#define _DDS_BASIC_TYPES_H_ + +#include +#include +#include + +/** + * @brief Handle to an entity + * @ingroup entity + * + * A valid entity handle will always have a positive integer value. + * Should the value be negative, it is one of the DDS_RETCODE_* + * error codes. + */ +typedef int32_t dds_entity_t; + +/** + * @anchor DDS_MIN_PSEUDO_HANDLE + * @ingroup internal + * @brief Pseudo Handle origin + * + * Some handles in CycloneDDS are 'fake', most importantly the builtin topic handles. + * These handles are derived from this constant. + */ +#define DDS_MIN_PSEUDO_HANDLE ((dds_entity_t)0x7fff0000) + +/** + * @anchor DDS_CYCLONEDDS_HANDLE + * @ingroup internal + * @brief Special handle representing the entity corresponding to the CycloneDDS library itself + */ +#define DDS_CYCLONEDDS_HANDLE ((dds_entity_t)(DDS_MIN_PSEUDO_HANDLE + 256)) + +#endif /*_DDS_PUBLIC_TYPES_H_*/ diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_data_allocator.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_data_allocator.h new file mode 100644 index 0000000000000000000000000000000000000000..190b25c0e6c80ab3cf7ab085e65e67c71eb6b452 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_data_allocator.h @@ -0,0 +1,149 @@ +/* + * Copyright(c) 2021 ZettaScale Technology and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +#ifndef DDS_DATA_ALLOCATOR_H +#define DDS_DATA_ALLOCATOR_H + +/** + * @defgroup data_allocator (Data Allocator) + * @ingroup dds + * A quick-and-dirty provisional interface + */ + +#include "dds/dds.h" +#include "dds/ddsrt/attributes.h" +#include "dds/export.h" + +#if defined (__cplusplus) +extern "C" { +#endif + +// macOS' mutexes require quite a lot of space, but it is not quite enough +// to make this system-dependent +#define DDS_DATA_ALLOCATOR_MAX_SIZE (12 * sizeof (void *)) + +/** + * @ingroup data_allocator + * @brief Data Allocator structure + * Contains internal details about the data allocator for a given entity + */ +typedef struct dds_data_allocator { + dds_entity_t entity; /**< to which entity this allocator is attached */ + union { + unsigned char bytes[DDS_DATA_ALLOCATOR_MAX_SIZE]; /**< internal details */ + void *align_ptr; /**< internal details */ + uint64_t align_u64; /**< internal details */ + } opaque; /**< internal details */ +} dds_data_allocator_t; + +/** + * @ingroup data_allocator + * @brief Initialize an object for performing allocations/frees in the context of a reader/writer + * + * The operation will fall back to standard heap allocation if nothing better is available. + * + * @param[in] entity the handle of the entity + * @param[out] data_allocator opaque allocator object to initialize + * + * @returns success or a generic error indication + * + * @retval DDS_RETCODE_OK + * the allocator object was successfully initialized + * @retval DDS_RETCODE_BAD_PARAMETER + * entity is invalid, data_allocator is a null pointer + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Cyclone DDS is not initialized + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * operation not supported on this entity + */ +DDS_EXPORT dds_return_t dds_data_allocator_init (dds_entity_t entity, dds_data_allocator_t *data_allocator); + +/** + * @ingroup data_allocator + * @brief Initialize an object for performing standard allocations/frees on the heap + * + * @param[out] data_allocator opaque allocator object to initialize + * + * @returns success or a generic error indication + * + * @retval DDS_RETCODE_OK + * the allocator object was successfully initialized + * @retval DDS_RETCODE_BAD_PARAMETER + * entity is invalid, data_allocator is a null pointer + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Cyclone DDS is not initialized + * @retval DDS_RETCODE_ILLEGAL_OPERATION + * operation not supported on this entity + */ +DDS_EXPORT dds_return_t dds_data_allocator_init_heap (dds_data_allocator_t *data_allocator); + +/** + * @ingroup data_allocator + * @brief Finalize a previously initialized allocator object + * + * @param[in,out] data_allocator object to finalize + * + * @returns success or an error indication + * + * @retval DDS_RETCODE_OK + * the data was successfully finalized + * @retval DDS_RETCODE_BAD_PARAMETER + * data_allocator does not reference a valid entity + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * Cyclone DDS is not initialized + */ +DDS_EXPORT dds_return_t dds_data_allocator_fini (dds_data_allocator_t *data_allocator); + +/** + * @ingroup data_allocator + * @brief Allocate memory using the given allocator + * + * @param[in,out] data_allocator initialized allocator object + * @param[in] size minimum number of bytes to allocate with suitable alignment + * + * @returns a pointer to unaliased, uninitialized memory of at least the requested size, or NULL + */ +DDS_EXPORT void *dds_data_allocator_alloc (dds_data_allocator_t *data_allocator, size_t size) + ddsrt_attribute_warn_unused_result ddsrt_attribute_malloc; + +/** + * @ingroup data_allocator + * @brief Release memory using the given allocator + * + * @param[in,out] data_allocator initialized allocator object + * @param[in] ptr memory to free + * + * @returns success or an error indication + * + * @retval DDS_RETCODE_OK + * the memory was successfully released + * @retval DDS_RETCODE_BAD_PARAMETER + * data_allocator does not reference a valid entity + * @retval DDS_RETCODE_PRECONDITION_NOT_MET + * dds_data_allocator already finalized + */ +DDS_EXPORT dds_return_t dds_data_allocator_free (dds_data_allocator_t *data_allocator, void *ptr); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +/// @note This function declaration is deprecated here and has been moved to +/// dds_loan_api.h. +DDS_EXPORT bool dds_is_loan_available(const dds_entity_t entity); + +/// @note This function declaration is deprecated here and has been moved to +/// dds_loan_api.h. +DDS_EXPORT bool is_loan_available(const dds_entity_t entity); +#endif + +#if defined (__cplusplus) +} +#endif +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_internal_api.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_internal_api.h new file mode 100644 index 0000000000000000000000000000000000000000..0ef244ad7b6b154600ce9c7ce076f8aa5cedc3e7 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_internal_api.h @@ -0,0 +1,56 @@ +/* + * Copyright(c) 2006 to 2020 ZettaScale Technology and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + + +/* + * WARNING This file is only needed for the work around for https://github.com/eclipse-cyclonedds/cyclonedds/issues/74 + * Do not include this file in an application! Once issue #74 is solved this header file should be removed. + */ + +#ifndef DDS_INTERNAL_API_H +#define DDS_INTERNAL_API_H + +#if defined (__cplusplus) +extern "C" { +#endif + +/** + * @anchor DDS_READ_WITHOUT_LOCK + * @ingroup internal + * @brief Constant to use with dds_read() or dds_take() when using dds_reader_lock_samples() + */ +#define DDS_READ_WITHOUT_LOCK (0xFFFFFFED) + +/** + * @ingroup internal + * @brief Returns number of samples in read cache and locks the reader cache, + * to make sure that the samples content doesn't change. + * + * Because the cache is locked, you should be able to read/take without having to + * lock first. This is done by passing the @ref DDS_READ_WITHOUT_LOCK value to the + * read/take call as maxs. Then the read/take will not lock but still unlock. + * + * CycloneDDS doesn't support a read/take that just returns all + * available samples issue #74. As a work around to support LENGTH_UNLIMITED in C++. + * dds_reader_lock_samples() and @ref DDS_READ_WITHOUT_LOCK are needed. + * + * @param[in] reader Reader to lock the cache of. + * + * @returns the number of samples in the reader cache. + */ +DDS_EXPORT uint32_t +dds_reader_lock_samples (dds_entity_t reader); + +#if defined (__cplusplus) +} +#endif +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_loan_api.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_loan_api.h new file mode 100644 index 0000000000000000000000000000000000000000..f032e345622d7c2f0ee2ea4da3f9d82967ff27ab --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_loan_api.h @@ -0,0 +1,95 @@ +/* + * Copyright(c) 2021 ZettaScale Technology + * Copyright(c) 2021 Apex.AI, Inc + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +// API extension +// defines functions needed for loaning and shared memory usage + +#ifndef _DDS_LOAN_API_H_ +#define _DDS_LOAN_API_H_ + +#include "dds/ddsc/dds_basic_types.h" +#include "dds/ddsrt/retcode.h" +#include "dds/export.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +/** + * @ingroup loan + * @brief Check if a Loan is available to reader/writer + * The loan is available if the shared memory is enabled and all the constraints + * to enable shared memory are met and the type is fixed + * @note dds_loan_sample can be used if and only if + * dds_is_loan_available returns true. + * + * @param[in] entity the handle of the entity + * + * @returns loan available or not + */ +DDS_EXPORT bool dds_is_loan_available(const dds_entity_t entity); + +/** + * @ingroup loan + * @brief Check if a shared memory is available to reader/writer. + * + * @note dds_loan_shared_memory_buffer can be used if and only if + * dds_is_shared_memory_available returns true. + * + * @param[in] entity the handle of the entity + * + * @returns true if shared memory is available, false otherwise + */ +DDS_EXPORT bool dds_is_shared_memory_available(const dds_entity_t entity); + +DDS_DEPRECATED_EXPORT bool is_loan_available(const dds_entity_t entity); + +/** + * @ingroup loan + * @brief Loan a shared memory buffer of a specific size from the writer. + * + * @note Currently this function is to be used with dds_writecdr by adding the + * loaned buffer to serdata as iox_chunk. + * @note The function can only be used if dds_is_shared_memory_available is + * true for the writer. + * + * @param[in] writer the writer to loan the buffer from + * @param[in] size the requested buffer size + * @param[out] buffer the loaned buffer + * + * @returns DDS_RETCODE_OK if successful, DDS_RETCODE_ERROR otherwise + */ +DDS_EXPORT dds_return_t dds_loan_shared_memory_buffer(dds_entity_t writer, + size_t size, + void **buffer); + +/** + * @ingroup loan + * @brief Loan a sample from the writer. + * + * @note This function is to be used with dds_write to publish the loaned + * sample. + * @note The function can only be used if dds_is_loan_available is + * true for the writer. + * + * @param[in] writer the writer to loan the buffer from + * @param[out] sample the loaned sample + * + * @returns DDS_RETCODE_OK if successful, DDS_RETCODE_ERROR otherwise + */ +DDS_EXPORT dds_return_t dds_loan_sample(dds_entity_t writer, void **sample); + +#if defined(__cplusplus) +} +#endif +#endif diff --git a/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_opcodes.h b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_opcodes.h new file mode 100644 index 0000000000000000000000000000000000000000..8a8dcc6decadd83de1b9df4ab45598bab9517e76 --- /dev/null +++ b/third-party/GR00T-WholeBodyControl/gear_sonic_deploy/thirdparty/unitree_sdk2/thirdparty/include/dds/ddsc/dds_opcodes.h @@ -0,0 +1,626 @@ +/* + * Copyright(c) 2021 to 2022 ZettaScale Technology and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License + * v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +#ifndef DDS_OPCODES_H +#define DDS_OPCODES_H + +#include "dds/ddsrt/align.h" +#include "dds/ddsrt/static_assert.h" + +#if defined (__cplusplus) +extern "C" { +#endif + +/** + * @defgroup serialization (Serialization) + * @ingroup dds + * + * Opcodes for (de)serialization of types generated by idlc. Isolated in a + * separate header to share with idlc without the need to pull in the entire + * Eclipse Cyclone DDS C language binding. + * + * One opcode is a uint32 and depending on which code it is can contain several uint32 arguments. + */ + +/** + * @anchor DDS_OP_MASK + * @ingroup serialization + * @brief Mask for the OP + */ +#define DDS_OP_MASK 0xff000000 + +/** + * @anchor DDS_OP_TYPE_FLAGS_MASK + * @ingroup serialization + * @brief Mask for the OP type flags + */ +#define DDS_OP_TYPE_FLAGS_MASK 0x00800000 + +/** + * @anchor DDS_OP_TYPE_MASK + * @ingroup serialization + * @brief Mask for the OP type + */ +#define DDS_OP_TYPE_MASK 0x007f0000 + +/** + * @anchor DDS_OP_SUBTYPE_MASK + * @ingroup serialization + * @brief Mask for the OP subtype + */ +#define DDS_OP_SUBTYPE_MASK 0x0000ff00 + +/** + * @anchor DDS_OP_JMP_MASK + * @ingroup serialization + * @brief Mask for the OP jump + */ +#define DDS_OP_JMP_MASK 0x0000ffff + +/** + * @anchor DDS_OP_FLAGS_MASK + * @ingroup serialization + * @brief Mask for the OP flags + */ +#define DDS_OP_FLAGS_MASK 0x000000ff + +/** + * @anchor DDS_JEQ_TYPE_FLAGS_MASK + * @ingroup serialization + * @brief Mask for the JEQ type flags + */ +#define DDS_JEQ_TYPE_FLAGS_MASK 0x00800000 + +/** + * @anchor DDS_JEQ_TYPE_MASK + * @ingroup serialization + * @brief Mask for the JEQ type + */ +#define DDS_JEQ_TYPE_MASK 0x007f0000 + +/** + * @anchor DDS_PLM_FLAGS_MASK + * @ingroup serialization + * @brief Mask for the PLM flags + */ +#define DDS_PLM_FLAGS_MASK 0x00ff0000 + +/** + * @anchor DDS_KOF_OFFSET_MASK + * @ingroup serialization + * @brief Mask for the KOF offset + */ +#define DDS_KOF_OFFSET_MASK 0x0000ffff + + + +/** + * @anchor DDS_OP + * @ingroup serialization + * @brief Extract the DDS OP from a uint32 as a \ref dds_stream_opcode + */ +#define DDS_OP(o) ((enum dds_stream_opcode) ((o) & DDS_OP_MASK)) + +/** + * @anchor DDS_OP_TYPE + * @ingroup serialization + * @brief Extract the DDS OP_TYPE from a uint32 as a \ref dds_stream_typecode + */ +#define DDS_OP_TYPE(o) ((enum dds_stream_typecode) (((o) & DDS_OP_TYPE_MASK) >> 16)) + +/** + * @anchor DDS_OP_TYPE_FLAGS + * @ingroup serialization + * @brief Extract the DDS OP_TYPE_FLAGS from a uint32 + * DOC_TODO: possible values? + */ +#define DDS_OP_TYPE_FLAGS(o) ((o) & DDS_OP_TYPE_FLAGS_MASK) + +/** + * @anchor DDS_OP_SUBTYPE + * @ingroup serialization + * @brief Extract the DDS OP_SUBTYPE from a uint32 as a \ref dds_stream_typecode + * Used for collections, the OP_TYPE is array/sequence + */ +#define DDS_OP_SUBTYPE(o) ((enum dds_stream_typecode) (((o) & DDS_OP_SUBTYPE_MASK) >> 8)) + +/** + * @anchor DDS_OP_FLAGS + * @ingroup serialization + * @brief Extract the DDS OP_FLAGS from a uint32 + * DOC_TODO: possible values? + */ +#define DDS_OP_FLAGS(o) ((o) & DDS_OP_FLAGS_MASK) + +/** + * @anchor DDS_OP_ADR_JSR + * @ingroup serialization + * @brief Extract the ADR JSR from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_OP_ADR_JSR(o) ((int16_t) ((o) & DDS_OP_JMP_MASK)) + +/** + * @anchor DDS_OP_ADR_PLM + * @ingroup serialization + * @brief Extract the ADR PLM from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_OP_ADR_PLM(o) ((int16_t) ((o) & DDS_OP_JMP_MASK)) + +/** + * @anchor DDS_OP_LENGTH + * @ingroup serialization + * @brief Extract the LENGTH from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_OP_LENGTH(o) ((uint16_t) ((o) & DDS_OP_JMP_MASK)) + +/** + * @anchor DDS_OP_JUMP + * @ingroup serialization + * @brief Extract the JUMP from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_OP_JUMP(o) ((int16_t) ((o) & DDS_OP_JMP_MASK)) + +/** + * @anchor DDS_OP_ADR_JMP + * @ingroup serialization + * @brief Extract the ADR_JMP from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_OP_ADR_JMP(o) ((o) >> 16) + +/** + * @anchor DDS_JEQ_TYPE + * @ingroup serialization + * @brief Extract the JEQ_TYPE from a uint32 as a \ref dds_stream_typecode + * DOC_TODO: meaning? + */ +#define DDS_JEQ_TYPE(o) ((enum dds_stream_typecode) (((o) & DDS_JEQ_TYPE_MASK) >> 16)) + +/** + * @anchor DDS_JEQ_TYPE_FLAGS + * @ingroup serialization + * @brief Extract the JEQ_TYPE_FLAGS from a uint32 + * DOC_TODO: meaning? + */ +#define DDS_JEQ_TYPE_FLAGS(o) ((o) & DDS_JEQ_TYPE_FLAGS_MASK) + +/** + * @anchor DDS_PLM_FLAGS + * @ingroup serialization + * @brief Extract the PLM_FLAGS from a uint32 as a \ref dds_stream_typecode + * DOC_TODO: meaning? + */ +#define DDS_PLM_FLAGS(o) ((enum dds_stream_typecode) (((o) & DDS_PLM_FLAGS_MASK) >> 16)) + + + +/** + * @ingroup serialization + * @brief Topic encoding instruction types +*/ +enum dds_stream_opcode { + /** return from subroutine, exits top-level + [RTS, 0, 0, 0] */ + DDS_OP_RTS = 0x00 << 24, + + /** data field + [ADR, nBY, 0, f] [offset] + [ADR, BLN, 0, f] [offset] + [ADR, ENU, 0, f] [offset] [max] + [ADR, BMK, 0, f] [offset] [bits-high] [bits-low] + [ADR, STR, 0, f] [offset] + [ADR, BST, 0, f] [offset] [max-size] + + [ADR, SEQ, nBY, f] [offset] + [ADR, SEQ, BLN, f] [offset] + [ADR, SEQ, ENU, f] [offset] [max] + [ADR, SEQ, BMK, f] [offset] [bits-high] [bits-low] + [ADR, SEQ, STR, f] [offset] + [ADR, SEQ, BST, f] [offset] [max-size] + [ADR, SEQ, s, f] [offset] [elem-size] [next-insn, elem-insn] + where s = {SEQ,ARR,UNI,STU,BSQ} + [ADR, SEQ, EXT, f] *** not supported + + [ADR, BSQ, nBY, f] [offset] [sbound] + [ADR, BSQ, BLN, f] [offset] [sbound] + [ADR, BSQ, ENU, f] [offset] [sbound] [max] + [ADR, BSQ, BMK, f] [offset] [sbound] [bits-high] [bits-low] + [ADR, BSQ, STR, f] [offset] [sbound] + [ADR, BSQ, BST, f] [offset] [sbound] [max-size] + [ADR, BSQ, s, f] [offset] [sbound] [elem-size] [next-insn, elem-insn] + where s = {SEQ,ARR,UNI,STU,BSQ} + [ADR, BSQ, EXT, f] *** not supported + + [ADR, ARR, nBY, f] [offset] [alen] + [ADR, ARR, BLN, f] [offset] [alen] + [ADR, ARR, ENU, f] [offset] [alen] [max] + [ADR, ARR, BMK, f] [offset] [alen] [bits-high] [bits-low] + [ADR, ARR, STR, f] [offset] [alen] + [ADR, ARR, BST, f] [offset] [alen] [0] [max-size] + [ADR, ARR, s, f] [offset] [alen] [next-insn, elem-insn] [elem-size] + where s = {SEQ,ARR,UNI,STU,BSQ} + [ADR, ARR, EXT, f] *** not supported + + [ADR, UNI, d, z] [offset] [alen] [next-insn, cases] + [ADR, UNI, ENU, z] [offset] [alen] [next-insn, cases] [max] + [ADR, UNI, EXT, f] *** not supported + where + d = discriminant type of {1BY,2BY,4BY,BLN} + z = default present/not present (DDS_OP_FLAG_DEF) + offset = discriminant offset + max = max enum value + followed by alen case labels: in JEQ format + + [ADR, e | EXT, 0, f] [offset] [next-insn, elem-insn] [elem-size iff "external" flag e is set, or flag f has DDS_OP_FLAG_OPT] + [ADR, STU, 0, f] *** not supported + where + s = subtype + e = external: stored as external data (pointer) (DDS_OP_FLAG_EXT) + f = flags: + - key/not key (DDS_OP_FLAG_KEY) + - base type member, used with EXT type (DDS_OP_FLAG_BASE) + - optional (DDS_OP_FLAG_OPT) + - must-understand (DDS_OP_FLAG_MU) + - storage size, only for ENU and BMK (n << DDS_OP_FLAG_SZ_SHIFT) + [offset] = field offset from start of element in memory + [elem-size] = element size in memory (elem-size is only included in case 'external' flag is set) + [max-size] = string bound + 1 + [max] = max enum value + [bits-..] = identified bits in the bitmask, split into high and low 32 bits + [alen] = array length, number of cases + [sbound] = bounded sequence maximum number of elements + [next-insn] = (unsigned 16 bits) offset to instruction for next field, from start of insn + [elem-insn] = (unsigned 16 bits) offset to first instruction for element, from start of insn + [cases] = (unsigned 16 bits) offset to first case label, from start of insn + */ + DDS_OP_ADR = 0x01 << 24, + + /** jump-to-subroutine (e.g. used for recursive types and appendable unions) + [JSR, 0, e] + where + e = (signed 16 bits) offset to first instruction in subroutine, from start of insn + instruction sequence must end in RTS, execution resumes at instruction + following JSR */ + DDS_OP_JSR = 0x02 << 24, + + /** jump-if-equal, used for union cases: + [JEQ, nBY, 0] [disc] [offset] + [JEQ, BLN, 0] [disc] [offset] + [JEQ, STR, 0] [disc] [offset] + [JEQ, s, i] [disc] [offset] + [JEQ4, e | nBY, 0] [disc] [offset] 0 + [JEQ4, e | STR, 0] [disc] [offset] 0 + [JEQ4, e | ENU, f] [disc] [offset] [max] + [JEQ4, EXT, 0] *** not supported, use STU/UNI for external defined types + [JEQ4, e | s, i] [disc] [offset] [elem-size iff "external" flag e is set, else 0] + where + e = external: stored as external data (pointer) (DDS_OP_FLAG_EXT) + s = subtype other than {nBY,STR} for JEQ and {nBY,STR,ENU,EXT} for JEQ4 + (note that BMK cannot be inline, because it needs 2 additional instructions + for the bits that are identified in the bitmask type) + i = (unsigned 16 bits) offset to first instruction for case, from start of insn + instruction sequence must end in RTS, at which point executes continues + at the next field's instruction as specified by the union + f = size flags for ENU instruction + + Note that the JEQ instruction is deprecated and replaced by the JEQ4 instruction. The + IDL compiler only generates JEQ4 for union cases, the JEQ instruction is included here + for backwards compatibility (topic descriptors generated with a previous version of IDLC) + */ + DDS_OP_JEQ = 0x03 << 24, + + /** XCDR2 delimited CDR (inserts DHEADER before type) + [DLC, 0, 0] + */ + DDS_OP_DLC = 0x04 << 24, + + /** XCDR2 parameter list CDR (inserts DHEADER before type and EMHEADER before each member) + [PLC, 0, 0] + followed by a list of JEQ instructions + */ + DDS_OP_PLC = 0x05 << 24, + + /** + [PLM, f, elem-insn] [member id] + for members of aggregated mutable types (pl-cdr): + where + f = flags: + - jump to base type (DDS_OP_FLAG_BASE) + [elem-insn] = (unsigned 16 bits) offset to instruction for element, from start of insn + when FLAG_BASE is set, this is the offset of the PLM list of the base type + [member id] = id for this member (0 in case FLAG_BASE is set) + */ + DDS_OP_PLM = 0x06 << 24, + + /** Key offset list + [KOF, 0, n] [offset-1] ... [offset-n] + where + n = number of key offsets in following ops + offset = Offset of the key field relative to the previous offset, repeated n times when key is + in a nested struct. In case of inheritance of mutable structs, a single offset of + the key member relative to the first op of the top-level type (index 0). + */ + DDS_OP_KOF = 0x07 << 24, + + /** see comment for JEQ/JEQ4 above */ + DDS_OP_JEQ4 = 0x08 << 24 +}; + +/** + * @ingroup serialization + * @brief datatypes as recognized by serialization VM. + */ +enum dds_stream_typecode { + DDS_OP_VAL_1BY = 0x01, /**< one byte simple type (char, octet) */ + DDS_OP_VAL_2BY = 0x02, /**< two byte simple type ((unsigned) short) */ + DDS_OP_VAL_4BY = 0x03, /**< four byte simple type ((unsigned) long, float) */ + DDS_OP_VAL_8BY = 0x04, /**< eight byte simple type ((unsigned) long long, double) */ + DDS_OP_VAL_STR = 0x05, /**< string */ + DDS_OP_VAL_BST = 0x06, /**< bounded string */ + DDS_OP_VAL_SEQ = 0x07, /**< sequence */ + DDS_OP_VAL_ARR = 0x08, /**< array */ + DDS_OP_VAL_UNI = 0x09, /**< union */ + DDS_OP_VAL_STU = 0x0a, /**< struct */ + DDS_OP_VAL_BSQ = 0x0b, /**< bounded sequence */ + DDS_OP_VAL_ENU = 0x0c, /**< enumerated value (long) */ + DDS_OP_VAL_EXT = 0x0d, /**< field with external definition */ + DDS_OP_VAL_BLN = 0x0e, /**< boolean */ + DDS_OP_VAL_BMK = 0x0f /**< bitmask */ +}; + +/** + * @ingroup serialization + * @brief primary type code for DDS_OP_ADR, DDS_OP_JEQ + * Convinience pre-bitshifted values. + */ +enum dds_stream_typecode_primary { + DDS_OP_TYPE_1BY = DDS_OP_VAL_1BY << 16, /**< one byte simple type (char, octet) */ + DDS_OP_TYPE_2BY = DDS_OP_VAL_2BY << 16, /**< two byte simple type ((unsigned) short) */ + DDS_OP_TYPE_4BY = DDS_OP_VAL_4BY << 16, /**< four byte simple type ((unsigned) long, float) */ + DDS_OP_TYPE_8BY = DDS_OP_VAL_8BY << 16, /**< eight byte simple type ((unsigned) long long, double) */ + DDS_OP_TYPE_STR = DDS_OP_VAL_STR << 16, /**< string */ + DDS_OP_TYPE_BST = DDS_OP_VAL_BST << 16, /**< bounded string */ + DDS_OP_TYPE_SEQ = DDS_OP_VAL_SEQ << 16, /**< sequence */ + DDS_OP_TYPE_ARR = DDS_OP_VAL_ARR << 16, /**< array */ + DDS_OP_TYPE_UNI = DDS_OP_VAL_UNI << 16, /**< union */ + DDS_OP_TYPE_STU = DDS_OP_VAL_STU << 16, /**< struct */ + DDS_OP_TYPE_BSQ = DDS_OP_VAL_BSQ << 16, /**< bounded sequence */ + DDS_OP_TYPE_ENU = DDS_OP_VAL_ENU << 16, /**< enumerated value (long) */ + DDS_OP_TYPE_EXT = DDS_OP_VAL_EXT << 16, /**< field with external definition */ + DDS_OP_TYPE_BLN = DDS_OP_VAL_BLN << 16, /**< boolean */ + DDS_OP_TYPE_BMK = DDS_OP_VAL_BMK << 16 /**< bitmask */ +}; + +/** + * @anchor DDS_OP_FLAG_EXT + * @ingroup serialization + * @brief This flag indicates that the type has external data + * (i.e. a mapped to a pointer type), which can be the case because of (1) the \@external annotation + * in idl or (2) the \@optional annotation (optional fields are also mapped to pointer types as described + * in the XTypes spec). This flag is stored in the most-significant bit of the 'type' part of the + * serializer instruction. + */ +#define DDS_OP_FLAG_EXT (1u << 23) + + + +/** + * @ingroup serialization + * @brief sub-type code + * - encodes element type for DDS_OP_TYPE_{SEQ,ARR}, + * - discriminant type for DDS_OP_TYPE_UNI + * Convinience pre-bitshifted values. + */ +enum dds_stream_typecode_subtype { + DDS_OP_SUBTYPE_1BY = DDS_OP_VAL_1BY << 8, /**< one byte simple type (char, octet) */ + DDS_OP_SUBTYPE_2BY = DDS_OP_VAL_2BY << 8, /**< two byte simple type ((unsigned) short) */ + DDS_OP_SUBTYPE_4BY = DDS_OP_VAL_4BY << 8, /**< four byte simple type ((unsigned) long, float) */ + DDS_OP_SUBTYPE_8BY = DDS_OP_VAL_8BY << 8, /**< eight byte simple type ((unsigned) long long, double) */ + DDS_OP_SUBTYPE_STR = DDS_OP_VAL_STR << 8, /**< string */ + DDS_OP_SUBTYPE_BST = DDS_OP_VAL_BST << 8, /**< bounded string */ + DDS_OP_SUBTYPE_SEQ = DDS_OP_VAL_SEQ << 8, /**< sequence */ + DDS_OP_SUBTYPE_ARR = DDS_OP_VAL_ARR << 8, /**< array */ + DDS_OP_SUBTYPE_UNI = DDS_OP_VAL_UNI << 8, /**< union */ + DDS_OP_SUBTYPE_STU = DDS_OP_VAL_STU << 8, /**< struct */ + DDS_OP_SUBTYPE_BSQ = DDS_OP_VAL_BSQ << 8, /**< bounded sequence */ + DDS_OP_SUBTYPE_ENU = DDS_OP_VAL_ENU << 8, /**< enumerated value (long) */ + DDS_OP_SUBTYPE_BLN = DDS_OP_VAL_BLN << 8, /**< boolean */ + DDS_OP_SUBTYPE_BMK = DDS_OP_VAL_BMK << 8 /**< bitmask */ +}; + +/** + * @anchor DDS_OP_FLAG_KEY + * @ingroup serialization + * @brief mark field as key + * applicable to {1,2,4,8}BY, STR, BST, ARR-of-{1,2,4,8}BY. + * Note that when defining keys in nested types, the key flag should be set + * on both the field(s) in the subtype and on the enclosing STU/EXT field. + */ +#define DDS_OP_FLAG_KEY (1u << 0) + +/** + * @anchor DDS_OP_FLAG_DEF + * @ingroup serialization + * @brief For a union: + * -# the discriminator may be a key field; + * -# there may be a default value; + * -# and the discriminator can be an integral type (or enumerated - here treated as equivalent). + * What it can't be is a floating-point type. So DEF and FP need never be set at the same time. + * There are only a few flag bits, so saving one is not such a bad idea. + * + * union has a default case (for DDS_OP_ADR | DDS_OP_TYPE_UNI) + */ +#define DDS_OP_FLAG_DEF (1u << 1) + +/** + * @anchor DDS_OP_FLAG_FP + * @ingroup serialization + * @brief floating-point, + * applicable to {4,8}BY and arrays, sequences of them + */ +#define DDS_OP_FLAG_FP (1u << 1) + +/** + * @anchor DDS_OP_FLAG_SGN + * @ingroup serialization + * @brief signed, + * applicable to {1,2,4,8}BY and arrays, sequences of them + */ +#define DDS_OP_FLAG_SGN (1u << 2) + +/** + * @anchor DDS_OP_FLAG_MU + * @ingroup serialization + * @brief must-understand flag, + * as defined by the XTypes spec. + */ +#define DDS_OP_FLAG_MU (1u << 3) + +/** + * @anchor DDS_OP_FLAG_BASE + * @ingroup serialization + * @brief jump to base type, + * used with PLM in mutable types and for the TYPE_EXT 'parent' member + * in final and appendable types + */ +#define DDS_OP_FLAG_BASE (1u << 4) + +/** + * @anchor DDS_OP_FLAG_OPT + * @ingroup serialization + * @brief optional flag, + * used with struct members. For non-string types, an optional member + * also gets the FLAG_EXT, see above. + */ +#define DDS_OP_FLAG_OPT (1u << 5) + +/** + * @anchor DDS_OP_FLAG_SZ_SHIFT + * @ingroup serialization + * @brief Enum and bitmask storage size (shift amount) + */ +#define DDS_OP_FLAG_SZ_SHIFT (6) + +/** + * @anchor DDS_OP_FLAG_SZ_MASK + * @ingroup serialization + * @brief Enum and bitmask storage size + * -# 00 = 1 byte, + * -# 01 = 2 bytes, + * -# 10 = 4 bytes, + * -# 11 = 8 bytes (bitmask only) + */ +#define DDS_OP_FLAG_SZ_MASK (3u << DDS_OP_FLAG_SZ_SHIFT) + +/** + * @anchor DDS_OP_FLAGS_SZ + * @ingroup serialization + * @brief Extract the Enum and Bitmask storage size from flags + */ +#define DDS_OP_FLAGS_SZ(f) (1u << (((f) & DDS_OP_FLAG_SZ_MASK) >> DDS_OP_FLAG_SZ_SHIFT)) + +/** + * @anchor DDS_OP_TYPE_SZ + * @ingroup serialization + * @brief Extract the Enum and Bitmask storage size from an uint32 + */ +#define DDS_OP_TYPE_SZ(o) DDS_OP_FLAGS_SZ(DDS_OP_FLAGS(o)) + +/** + * @defgroup topic_flags (Topic flags) + * @ingroup serialization + * There are several flags that can be added to dds_topic_descriptor_t by the IDL compiler. + */ + +/** + * @anchor DDS_TOPIC_NO_OPTIMIZE + * @ingroup topic_flags + * @brief Don't optimize the opcodes to quick memcpy's. + * If a topic includes only plain types and directly nested structs, + * it can be that a simple copy+optional byteswap can produce the right + * C memory layout straight from CDR. If this flag is added it means that + * there is pointer 'magic' involved in decoding the type and no shortcuts should be taken. + * @deprecated Optimizability is determined runtime when creating the sertype_default + * for the type, this flag is not used. + */ +#define DDS_TOPIC_NO_OPTIMIZE (1u << 0) + +/** + * @anchor DDS_TOPIC_FIXED_KEY + * @ingroup topic_flags + * @brief The XCDRV1 serialized key fits in 16 bytes. + * If statically determined that a key always fits in 16 bytes + * the spec specifies that the key of a sample is the resulting CDR. + * If it is longer we must use MD5 to hash the resultant key CDR. + */ +#define DDS_TOPIC_FIXED_KEY (1u << 1) + +/** + * @anchor DDS_TOPIC_CONTAINS_UNION + * @ingroup topic_flags + * @brief at arbitrary deep nesting the topic type contains at least one union. + */ +#define DDS_TOPIC_CONTAINS_UNION (1u << 2) + + +// (1u << 3) unused, was used for DDS_TOPIC_DISABLE_TYPECHECK + +/** + * @anchor DDS_TOPIC_FIXED_SIZE + * @ingroup topic_flags + * @brief The size in memory of a sample of this topic type is fully fixed. + */ +#define DDS_TOPIC_FIXED_SIZE (1u << 4) + +/** + * @anchor DDS_TOPIC_FIXED_KEY_XCDR2 + * @ingroup topic_flags + * @brief The XCDRV2 serialized key fits in 16 bytes. + * If statically determined that a key always fits in 16 bytes + * the spec specifies that the key of a sample is the resulting CDR. + * If it is longer we must use MD5 to hash the resultant key CDR. + * + * This is separate from the XCDRV1 version because it can differ due + * to the change in alignment of 8byte types. + */ +#define DDS_TOPIC_FIXED_KEY_XCDR2 (1u << 5) + +/** + * @anchor DDS_TOPIC_XTYPES_METADATA + * @ingroup topic_flags + * @brief Set if XTypes meta-data is present for this topic + */ +#define DDS_TOPIC_XTYPES_METADATA (1u << 6) + +/** + * @anchor DDS_TOPIC_RESTRICT_DATA_REPRESENTATION + * @ingroup topic_flags + * @brief Set if data representation restrictions for the top-level type are present in the topic descriptor + */ +#define DDS_TOPIC_RESTRICT_DATA_REPRESENTATION (1u << 7) + +/** + * @anchor DDS_FIXED_KEY_MAX_SIZE + * @ingroup topic_flags + * @brief Max size of fixed key + */ +#define DDS_FIXED_KEY_MAX_SIZE (16) + +#if defined(__cplusplus) +} +#endif + +#endif /* DDS_OPCODES_H */