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

Could two nodelet_manager do zero-copy?

asked 2019-09-11 04:47:58 -0500

mikechan0731 gravatar image

Hi! I am writing a big project about auto-driving car with my team, and there is lots of module in it. And now we want to change every node to nodelet for boosting our inference speed.

I research the ROS Nodelet document but it seems not mention about the function below:

A_nodelet_manager(with A_nodelet_01 + A_nodelet_02) <=> B_nodelet_manager(with B_nodelet_01)

Now B_nodelet_01 want to get data from A_nodelet_01 by zero-copy way.

Is it possible to do it? Will the only way is create a new C_nodelet_manager and submit all the nodelets?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-09-11 04:58:25 -0500

gvdhoorn gravatar image

Could two nodelet_manager do zero-copy?

No, this is not supported.

Nodelets are essentially nodes mapped on threads, instead of processes. Threads share a single address space, so they can exchange pointers. This is what allows them greater efficiency when communicating using pub-sub.

Two nodelet managers would be two different processes. Processes do not share memory address spaces (by default) and thus cannot exchange pointers.

(shared memory between processes is of course something that exists, but the current nodelet implementation does not support that)

Will the only way is create a new C_nodelet_manager and submit all the nodelets?

From what you describe here, yes, you'd have to host all nodelets in a single manager to allow them to communicate using zero-copy message exchange.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-11 04:47:58 -0500

Seen: 295 times

Last updated: Sep 11 '19