Add temperature tracking (MOS and rotor) to motor state#14
Merged
Conversation
kou
approved these changes
Jun 24, 2026
avoiding abbreviation Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
avoiding abbreviation Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
…for temperature tests per review
Contributor
Author
|
Switched the temperature assertions to temps.tolist() == [25] * 8 so the == list comparison works on the NumPy array |
kou
reviewed
Jun 24, 2026
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
kou
pushed a commit
to enactic/dora-openarm
that referenced
this pull request
Jun 24, 2026
…rray (#17) Exposes per-motor temperature in the `request_state` → `state` output. The `openarm_driver.fetch_state()` call already returns MOS and rotor temperatures (added in openarm_driver enactic/openarm_driver#14), but the node was dropping them. This PR surfaces them so downstream nodes can monitor thermals. - Adds fields to an existing output without changing field order, so existing consumers reading `qpos`/`qvel`/`qtorque` by name are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds per-motor temperature readings to the driver's state. Each motor now reports both its MOSFET (tmos) and rotor (trotor) temperatures, enabling thermal monitoring during operation.
Changes:
update_state() now reads get_state_tmos() and get_state_trotor() from each motor and stores them in latest_state as tmos / trotor arrays (dtype int).
Added two convenience accessors:
fetch_mos_temperature(refresh=True) — MOS temperature per motor
fetch_rotor_temperature(refresh=True) — rotor temperature per motor
Extended the test MotorStub in tests/test_driver.py with temperature getters and added test_fetch_mos_temperature / test_fetch_rotor_temperature.