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

How can i have a subscriber within a subscriber

asked 2013-12-05 05:18:55 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I need to subscribe to a topic within a subscriber, is this possible? and if so how can i accomplish it, thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-12-05 07:22:55 -0600

Can you clarify what it is you're trying to do and why? Typical pattern would be to subscribe to the two topics independently, cache one them using a shared_ptr, and do your processing for both in the second one's callback.

edit flag offensive delete link more

Comments

@mikepurvis Thanks a lot that worked, right now im having problem subscribing to /move_base/current_goal do you have any idea how to accomplish this?

ctguell gravatar image ctguell  ( 2013-12-12 04:07:30 -0600 )edit
mikepurvis gravatar image mikepurvis  ( 2013-12-16 14:39:35 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-05 05:18:55 -0600

Seen: 431 times

Last updated: Dec 05 '13