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

boost::shared_ptr are explicitly designed to be shared between threads; the function prototype for your callback seems fine.

I would run your program through a debugger (gdb) to determine the location of the segfault.

(It's also odd that you're calling _nh.shutdown() when you want to unsubscribe from a single topic, because this will shut down your entire process; not just a single subscriber).