Ask Your Question
1

Message (ConstPtr) forwarding in ROS

asked 2013-06-14 09:22:48 -0600

Javier J. Salmerón García gravatar image

Hello everyone,

I am developing an application with several nodes: one receives a message (for example: ImageConstPtr&) that will be forwarded to another node in particular (via another topic), following a pool of workers approach. Can I create a publisher that use its function publish() with that ConstPtr& message, or should I transfer its contents to a new message object?

Thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2013-06-14 10:26:38 -0600

Mac gravatar image

Short version:

Yes, you can pass that ConstPtr to a call to publish(), and it will work.

Long answer: Can you explain the problem you're trying to solve in a bit more detail? I'm envisioning a sort of round-robin message dispatch, and that seems painful.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-14 09:22:48 -0600

Seen: 1,195 times

Last updated: Jun 14 '13