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

Passing a pointer as a ROS msg

asked 2012-04-08 09:49:23 -0500

Alekzander gravatar image

updated 2014-04-20 14:09:18 -0500

ngrennan gravatar image

Hello, im creating a basic vision system which implements filters through a pipeline structure. My point cloud is grabbed by a kinect. The thing is i would like t send just a pointer to the cloud as a ROS message, in order to get a faster and more efficient processing. Is there a way to do this? thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-04-08 10:17:39 -0500

Mac gravatar image

updated 2012-04-11 05:22:40 -0500

...not as such. ROS messages are transmitted over the network; as a result, "passing a pointer" doesn't make any sense.

But wait, there's more!

One possibility is to just implement your pipeline in a single node; then it can pass pointers around because it's all in one process.

Another is to use nodelets, which offer a way of defining something that behaves like a node, but lets you have several in the same process; these were devised to solve exactly the problem you're talking about.

A third option is ecto; where ROS is by-design asynchronous (which makes multi-input perceptual pipelines very painful), ecto is by-design synchronous, to make such pipelines easy. Ecto's still in heavy development, but it'll be seriously cool when it's done.

edit flag offensive delete link more

answered 2012-04-08 10:26:51 -0500

Alekzander gravatar image

Thank you very much, I didnt know the difference between nodes and nodelets, ill look into it. Thanks again.

edit flag offensive delete link more


Glad to help. Give me an upvote, and accept the answer?

Mac gravatar image Mac  ( 2012-04-09 06:18:29 -0500 )edit

And use comments instead of answers :)

felix k gravatar image felix k  ( 2012-04-09 22:53:13 -0500 )edit

Question Tools


Asked: 2012-04-08 09:49:23 -0500

Seen: 2,307 times

Last updated: Apr 11 '12