Encoder
The Encoder node reads a quadrature encoder via two digital input channels and publishes count and direction.
Configuration​
encoder:
enabled: true
sensors: ["left_wheel"]
left_wheel:
port_a: 0
port_b: 1
topic: "left_encoder"
Parameters​
| Parameter | Description |
|---|---|
port_a | DIO channel for encoder channel A (range 0 – 21) |
port_b | DIO channel for encoder channel B (range 0 – 21) |
topic | Topic name to publish on |
Topics​
Published​
| Topic | Type | Description | Rate |
|---|---|---|---|
/<topic> | studica_control/EncoderMsg | encoder_count (int32) and encoder_direction (string) | 20 Hz |
Service​
Service name: /<name>/encoder_cmd
Type: studica_control/SetData
| Command | Description |
|---|---|
get_count | Read current tick count |
get_direction | Read current direction string |