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

SubscribeOptions for image_transport subscriber

asked 2017-06-05 12:52:49 -0500

holmes.kirby gravatar image

updated 2017-06-07 18:10:12 -0500

I would like my image_transport subscriber to use a different callback queue than the global queue so that when ros::spingOnce() is called my image_transport callback is not triggered.

Normally I would create a new callback queue and pass that to the subscriber constructor via SubscribeOptions but image_transport doesn't seem to support that.

I am curious why image_transport does not support seperate callback queues and what I should do to separate my image_transport subscriber from ros::spinOnce()

edit retag flag offensive close merge delete

Comments

Could I ask you to post your approach / work-around as an answer and then accept your own answer? That way it's clearer that this question has been answered (instead of just closed).

Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-07 00:25:35 -0500 )edit

id be happy to but i need more reputation to reopen a closed question.

holmes.kirby gravatar image holmes.kirby  ( 2017-06-07 07:40:49 -0500 )edit

I've re-opened it for you.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-07 09:38:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-07 18:14:38 -0500

holmes.kirby gravatar image

Instead of separating the image_transport callback from the global callback queue, I have limited the global callback queue to the image_transport callback.

This isn't an elegant solution, i have to call callAvailable() which may not be clear to some other people who are less familiar to ros, but it does work.

I am still not sure why image_transport doesn't support the SubscribeOptions...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-06-05 12:52:49 -0500

Seen: 350 times

Last updated: Jun 07 '17