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

Do interprocess nodelet communication perform any kind of TCP external communication?

asked 2012-10-05 04:18:48 -0500

Victor Lopez gravatar image

updated 2014-01-28 17:13:51 -0500

ngrennan gravatar image

Hi, I was reading about how nodelets are implemented and as far as I understand, an shared_ptr is passed from the publisher to the subcriber's callback if both are part of the same nodelet.

This seems familiar to a shared memory implementation I read about, that used TCP to transmit the pointers to the allocated memory between different applications.

I'm trying to reduce the number of TCP communication as I believe they are causing me severe performance issues, and want to make sure that publishing/subscribing in a nodelet doesn't perform any kind of socket reading/writing.

So, this is the question, given a publisher and a susbcriber in the same nodelet, does their communication happen completely inside the application or needs some kind of external communication, for instance, with the ROS master?

edit retag flag offensive close merge delete

Comments

They do not need to be in the same nodelet, but must be loaded into the same nodelet manager process.

joq gravatar image joq  ( 2012-10-05 09:16:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-05 04:26:29 -0500

Lorenz gravatar image

updated 2012-10-05 04:27:26 -0500

As long as you are publishing a shared pointer and a subscriber is inside the same node, no TCP communication should be involved. Right after instantiation, publishers and subscribers have to communicate with the ros master though to enable other nodes to connect to the topics.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-05 04:18:48 -0500

Seen: 491 times

Last updated: Oct 05 '12