Skip to content

[Humble] Fixed how Puma diagnostics are handled. - #372

Closed
mergify[bot] wants to merge 1 commit into
humblefrom
mergify/bp/humble/pr-322
Closed

mergify[bot] wants to merge 1 commit into
humblefrom
mergify/bp/humble/pr-322

Conversation

@mergify

@mergify mergify Bot commented Oct 23, 2026

Copy link
Copy Markdown

Backport of #322 to Humble.

* Fixed how Puma diagnostics are handled.

* fix(puma_motor_driver): fix status frequency check and spread CAN polling

Diagnostics
- Expect LM_API_STATUS_FAULT at 2 Hz instead of 1 Hz. The Pumas send it
  unsolicited at 2 Hz (measured on do150-0006), so the old value flagged
  every healthy driver as "frequency too high".
- Run the feedback and status frequency checks into separate wrappers
  and merge them. FrequencyStatus::run() overwrites the summary, so only
  the last check's result was ever reported. Non-OK summaries are now
  prefixed with the check name and the check's values are added.
- Cast the control mode to unsigned int before adding it as a diagnostic
  value. As a uint8_t it was streamed as a char, so mode 0 put a null
  byte in the string and crashed the diagnostics publisher
  (Fast CDR BadParamException).

Polling
- Poll one driver per tick in round-robin order from a new poll_timer_
  (period 1/(frequency x N)) instead of requesting from every driver in
  run(). Each driver is still polled at `frequency`. With CAN
  auto-retransmission disabled in the MCU firmware, back-to-back
  requests lost roughly 40-80% of replies on three of four Pumas on a
  Dingo; the round-robin avoids that on older MCU firmware.

Docs
- Add MULTI_PUMA_NODE.md and four PlantUML diagrams (static, startup,
  runtime, diagnostics) under puma_motor_driver/docs, including the CAN
  IDs the node uses.

---------

Co-authored-by: Mark Ibrahim <mibrahim@clearpathrobotics.com>
(cherry picked from commit f4109bb)

# Conflicts:
#	.cspell.json
#	clearpath_motor_drivers/puma_motor_driver/include/puma_motor_driver/driver.hpp
#	clearpath_motor_drivers/puma_motor_driver/include/puma_motor_driver/multi_puma_node.hpp
#	clearpath_motor_drivers/puma_motor_driver/src/driver.cpp
#	clearpath_motor_drivers/puma_motor_driver/src/multi_puma_node.cpp
@mergify
mergify Bot requested a review from a team as a code owner October 23, 2026 20:27
@mergify mergify Bot added the conflicts label Oct 23, 2026
@mergify
mergify Bot requested review from luis-camero, mibrahim-cpr, nnarain-cpr, tonybaltovski and twallis-cpr and removed request for a team October 23, 2026 20:27
@mergify

mergify Bot commented Oct 23, 2026

Copy link
Copy Markdown
Author

Cherry-pick of f4109bb has failed:

On branch mergify/bp/humble/pr-322
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit f4109bb.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   clearpath_motor_drivers/puma_motor_driver/docs/MULTI_PUMA_NODE.md
	new file:   clearpath_motor_drivers/puma_motor_driver/docs/multi_puma_node_diagnostics.puml
	new file:   clearpath_motor_drivers/puma_motor_driver/docs/multi_puma_node_runtime.puml
	new file:   clearpath_motor_drivers/puma_motor_driver/docs/multi_puma_node_startup.puml
	new file:   clearpath_motor_drivers/puma_motor_driver/docs/multi_puma_node_static.puml

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   .cspell.json
	both modified:   clearpath_motor_drivers/puma_motor_driver/include/puma_motor_driver/driver.hpp
	both modified:   clearpath_motor_drivers/puma_motor_driver/include/puma_motor_driver/multi_puma_node.hpp
	both modified:   clearpath_motor_drivers/puma_motor_driver/src/driver.cpp
	both modified:   clearpath_motor_drivers/puma_motor_driver/src/multi_puma_node.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant