Files
PX4-Autopilot/msg/WheelEncoders.msg
T
e03e075003 feat(rover): add high level encoder support (#28848)
* feat(rover): add high level encoder support

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): add gz mixing interface to output encoder position

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): add wheel encoder to logged topics, high rate sensors

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): fix wheel encoder division by zero and stream iteration

Corrected Roboclaw driver to initialize counts_per_rev, fixed wheel encoder stream to iterate over multiple wheels, and added trapezoidal integration to GZMixingInterfaceWheel. Removed unused RO_WHEEL_RAD from position controllers and restricted the wheel encoder stream to rover targets.

Assisted-by: Qwen-Code

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(rover): adjust wheel radius default for SITL

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update msg/WheelEncoders.msg

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* chore(rover): fixes to decimal and constrained flash mavlink message

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(gz): update encoder counts reference

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(rover): fix to outdated encoder pos reference

* fix(rover): update uorb message to account for 4 wheel encoders

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update msg/WheelEncoders.msg

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* fix(roboclaw): add in encoder position, counts per rev. Msg desc update

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(wheel_encoders): add description to top of msg file for docs

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(sim): fixes to initialize wheel pos m, rename wheel_encoder to wheel_distance

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update src/lib/rover_control/rovercontrol_params.yaml

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/mavlink/streams/WHEEL_DISTANCE.hpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/simulation/gz_bridge/GZMixingInterfaceWheel.cpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* Update src/modules/simulation/gz_bridge/GZMixingInterfaceWheel.hpp

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

* chore(rover): update wheel encoder msg, fixes to gz bridge

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* chore(rover): Apply batched suggestions from code review

Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Michael Fritsche <64464652+Frigiii@users.noreply.github.com>
2026-11-10 08:54:19 -05:00

24 lines
1.3 KiB
Plaintext

# Wheel encoder readings
#
# Angular speed, unwrapped angle and raw encoder counts for up to four wheels.
# Published by the Roboclaw driver (one instance per controller, two encoder channels each)
# and by the Gazebo bridge in simulation.
# Streamed to MAVLink as WHEEL_DISTANCE, logged, and exported over uXRCE-DDS.
#
# Wheel order follows the PX4 motor index: entry i is the wheel driven by Motor(i+1) in the
# rover's actuator configuration.
# - Mecanum: 0 = front right, 1 = front left, 2 = rear right, 3 = rear left
# - Differential: 0 = right, 1 = left (2 and 3 unused)
# - Ackermann: 0 = drivetrain (motor or drive shaft, reported as wheel rotation), 1-3 unused
#
# Unused entries have counts_per_rev = 0.
#
# The WHEEL_DISTANCE stream supports a single publisher: with several instances (e.g. two Roboclaw
# controllers) they all fill the same slots and only the last updated instance is streamed.
uint64 timestamp # time since system start (microseconds)
float32[4] wheel_speed # [rad/s] Wheel angular speed. Positive is forward rotation
float32[4] wheel_angle # [rad] Unwrapped wheel angle since boot, 2 * pi * encoder_counts / counts_per_rev
uint32[4] counts_per_rev # [counts/rev] Encoder counts per wheel revolution
int64[4] encoder_counts # The wheel position, in encoder counts since boot. Positive is forward rotation, negative is reverse rotation