0
$\begingroup$

Rosanswers logo

Hi, everyone. i have one publisher that publishes data on a topic, and one subscriber that receives message from that topic. both publisher and subscriber are on the same node. ros intraprocess publishing indicates that if used shared_ptr serialization/deserialization will be ignored, for testing, i use other PC and connect to running roscore on robot and with rostopic echo, i can see publishing data. therefore i think serialization and deserialization happens. furthermore rostopic in the same PC shows publishing data. i think when i publish with shared_ptr, other nodes can't see the data, if they can, serialization/deserialization is being happend. please explain if i'm wrong?


Originally posted by MohsenTamiz on ROS Answers with karma: 31 on 2014-05-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

serialization/deserialization will only be skipped if the connection is within the same node.

If you use rostopic echo or some other different program of course serialization must happen, otherwise it cannot work.


Originally posted by dornhege with karma: 31395 on 2014-05-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by MohsenTamiz on 2014-05-11:
Thanks for your reply. Is it mean subscriber determines if a message should serialize or not? In class reference of Publish of ROS documentation message I found three methods that always do serialize for example this method: void ros::Publisher::publish( const boost::shared_ptr< M > & message)

Comment by dornhege on 2014-05-12:
It's handled internally. This is a special case.

Comment by MohsenTamiz on 2014-05-12:
As ROS class reference publisher said,"This version of publish will allow fast intra-process message-passing in the future", the shared_ptr transmision will be added in future. this feature is very important in my project, and i want to be sure about this capability. Is there any way to check this?

Comment by dornhege on 2014-05-12:
If you are relying on fast inner-node publications that work via topics http://wiki.ros.org/nodelet is probably what you are looking for.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.