ros subscriber/publisher define scope

asked 2019-08-19 04:18:46 -0500

RosNav gravatar image


this may be also in general cpp related question or a style related question. I just wonder, if i should define my publisher and subscriber in the header of my class as class member, what I always did so far or should I define them e.g. in my myRosNode:run() function scope.

Is there any advantage?

I already googled and did not get a answer so far.

Thanks in advance.

edit retag flag offensive close merge delete