Ask Your Question

Revision history [back]

You can use the sizeof() operator to determine the memory footprint of an object.

The accepted pattern would be to create the Service object, and do the .waitForExistence once, outside the loop, to avoid the overhead.

You can use the sizeof() operator to determine the memory footprint of an object.

The accepted pattern would be to create the Service object, and do the .waitForExistence call once, outside the loop, to avoid the overhead.overhead. The overhead will be communication related - the nodehandle has to establish a connection with the service server through the ROS master.