Hello!
This post is specifically intended to critique software design. I have nothing but appreciation for the people who work on open source robotics. I’m also relatively new to the community, so it’s perfectly possible that I’m just misunderstanding something
While trying to understand the architecture of the ros2_control
package, I was wondering why it doesn’t use the node and message passing system already provided by ROS 2 and DDS. Basic usage gave me the impression that the control library was over-abstracting when the same level of modularity and interoperability could be achieved via defining both controllers and hardware as regular nodes.
For example, a specific PID controller would have subscribe to /measurement
, /setpoint
, and /voltage
topics with user configured message types. On the receiving end, a piece of hardware would subscribe to /voltage
and publish /temperature
. This seems more straightforward and benefits from relying on ROS infrastructure for message passing, logging, etc.
This past thread had an inconclusive discussion on the topic.
The main feature a native ros controller implementation would not achieve is requiring controllers to own their hardware resources. However, I question the necessity of that, since it seems like a lot of work to circumvent a specific potential issue.