Skip to content

Conversation

@nnarain-cpr
Copy link
Contributor

This PR implements the puma motor drivers using HAL CAN adaptors.

In the context of the puma drivers the Driver class is a HAL SignalAdaptor responsible for mapping signals to and from the device. The MultiPumaNode is just initialising 4 adaptors.

HAL Concepts

HAL supports cyclic and acyclic data. That is: streaming data, and data on request.

The implementation of this varies between protocols. For CAN this uses RTR frames.

Puma Concepts

The puma driver statemachine is effectively: configure, verify, run.

out of the box the CAN adaptor doesn't support this, so we can't move to pure configs just yet.

The protocol used by the pumas as a request data mechanism similar to RTR frame (though it doesn't set the RTR flag).

Changes

First off all the signal registration now happens upfront (CAN IDs and data type). previously you'd have to look at where the CAN IDs were used to understand the data types.

Part of the fixed point float conversion is now managed automatically by the adaptor.

Support was added in the CAN adaptor to override the request read frames. In the context the pumas, this is clearing the RTR flag.

A puma specific signal type was added to wrap the adaptor and add better semantics around interacting with the signals. This is a feature I'd like to add to the core eventually.

Future work

Generalisation of the state machine can be done to enable implementation without bespoke code.

Once ros2_control support is added to hal we can map signals to joints from the urdf.

@nnarain-cpr nnarain-cpr self-assigned this Jan 2, 2026
@nnarain-cpr nnarain-cpr requested a review from a team as a code owner January 2, 2026 19:07
@nnarain-cpr nnarain-cpr requested review from luis-camero and tonybaltovski and removed request for a team January 2, 2026 19:07
@mergify
Copy link

mergify bot commented Jan 2, 2026

🧪 CI Insights

Here's what we observed from your CI run for 41a2474.

🟢 All jobs passed!

But CI Insights is watching 👀

}

uint8_t * Driver::getRawP()
double Driver::getRawP()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just get rid of the raw now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a bit of clean up to do. Then I'll move it out of wip. But yes.


void MultiPumaNode::run()
{
RCLCPP_INFO_THROTTLE(this->get_logger(), *this->get_clock(), 5000,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean the leave this in?

@tonybaltovski tonybaltovski marked this pull request as draft January 9, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants