ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You're shadowing the variables pub and sub in your constructor. You're then assigning to these local copies, which leads to the problem that's mentioned in the earlier answer.

You're shadowing the variables pub and sub in your constructor. You're then assigning to these local copies, which leads to them being destructed when the problem that's mentioned in the earlier answer.constructor for your class is done.