Dynamic reconfigure vs Rosparam get.
Hello people,
I wanna know what are the advantages and the disadvantages regardless to CPU usage / Memory between using the Dynamic reconfigure tool to simply use the rosparam::get function inside my loop.
Thanks, Aviad
I don't believe
dynamic_reconfigure
was created to deal with resource utilisation issues.dynamic_reconfigure
is an asynchronous callback based system, in which your nodes are notified parameters have changed.ros::param::get(..)
needs to be called by your code, periodically. There is no way for it to be notified of anything, so your node will be unaware anything has changed, unless it explicitly callsros::param::get(..)
.This is a fundamentally different control flow, and that's the big difference between the two.
Edit: repeatedly calling
ros::param::get(..)
is actually an anti-pattern (as there is a rather significant overhead incurred when retrieving parameters) and should be avoided.From that perspective there is a difference in resource utilisation, but it would depend on how the developer has structured his node.