DutyCycleEncoder
The DutyCycleEncoder node reads an absolute position encoder from a PWM duty cycle signal and tracks total rotation across all revolutions.
Configuration​
duty_cycle:
enabled: true
sensors: ["arm_encoder"]
arm_encoder:
port: 8
topic: "arm_angle"
Parameters​
| Parameter | Description |
|---|---|
port | Duty cycle input channel — valid values: 0, 2, 4, 6, 8, 10 |
topic | Topic name to publish on |
Topics​
Published​
| Topic | Type | Description | Rate |
|---|---|---|---|
/<topic> | studica_control/DutyCycleEncoderMsg | absolute_angle (float64), rollover_count (int32), total_rotation (float64) | 20 Hz |
Service​
Service name: /<name>/duty_cycle_encoder_cmd
Type: studica_control/SetData
| Command | Description |
|---|---|
get_absolute_position | Absolute angle within one revolution |
get_rollover_count | Number of complete revolutions |
get_total_rotation | Total rotation across all revolutions |