ros-perception / image_common

Common code for working with images in ROS
http://www.ros.org/wiki/image_common
125 stars 220 forks source link

SimpleSubscriberPlugin shutdown() implementation #224

Closed afrixs closed 2 years ago

afrixs commented 2 years ago

There is a TODO in SimpleSubscriberPlugin about waiting for ROS2 to support subscriber shutdown.

I believe ROS2 now supports subscriber shutdown - it's performed in subscriber's destructor.

I would propose to simply use impl_.reset(); like it's done e.g. in message_filters package. I've tested it and it works.

gbiggs commented 2 years ago

Could you please submit a PR that includes a test? We can help you through the process if you're unsure how to do one.

afrixs commented 2 years ago

Reopening since calling publish on a disabled publisher caused process to crash (see #235)