Skip to content

Joint Encoder Component

fibril_sim/encoder は MuJoCo hinge joint の position を rotary encoder として取得します。 出力は JointEncoderSample で、sample type ID は fibril_sim/joint_encoder_sample/v1 です。

MuJoCo 側の要件

joint は hinge joint を参照する必要があります。 他の joint type は Plan construction で拒否されます。

最小設定

1
2
3
4
5
6
7
components:
  - id: steering_encoder
    type: fibril_sim/encoder
    config:
      joint: steering_joint
      counts_per_revolution: 4096
      period_s: 0.001

Configuration の項目

Field Type Required Default Meaning
joint string yes hinge joint name
counts_per_revolution int64 yes positive encoder CPR
reverse bool no false position direction を反転する
zero_at_model_start bool no true model initial qpos を zero reference にする
position_offset_rad double no 0.0 zero reference に加える offset
noise_stddev_rad double no 0.0 position Gaussian noise standard deviation
period_s double yes acquisition period
phase_s double no 0.0 acquisition phase
latency_s double no 0.0 delivery latency
quantization string no next_boundary schedule quantization

counts_per_revolution は正の値、noise_stddev_rad は非負である必要があります。

Output の形式

JointEncoderSample は counts と position_rad を持ちます。 position に direction、zero、offset、noise を適用した後、CPR に対応する angular resolution で量子化して count を生成します。