Ask Your Question

Can python subscribe nodelet topic?

asked 2018-04-23 00:11:27 -0600

marshalshiaug gravatar image

I'm new in ROS and I understand that nodelet is using ROS c++ interface.

Currently, I am using a library which can publish nodelet topic. Should I have to write subscriber in c++ or it's OK using python subscriber?

From my testing, I wrote a python script to sub nodelet topic which worked as well as normal node topic. But I am not sure whether subscriber is getting data from nodelet or normal node.

Thanks for helping.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-23 00:55:34 -0600

gvdhoorn gravatar image

Topics published by nodelets are no different from regular topics, apart from the fact that other nodelets hosted by the same nodelet manager can use shared memory to avoid (de)serialisation.

Regular nodes (ie: other processes) cannot, and will thus use the regular TCP/IP (or UDP) based transports to receive the messages (this is irrespective of the programming language: it's more about whether the subscribing node(let) shares an address space with the publisher).

If you desire/require zero-copy pub-sub, writing a nodelet in C++ will be required.

edit flag offensive delete link more


@gvdhoorn Thanks for your answer. It's clear.

marshalshiaug gravatar imagemarshalshiaug ( 2018-04-23 01:07:26 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-04-23 00:04:48 -0600

Seen: 152 times

Last updated: Apr 23 '18