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

Revision history [back]

click to hide/show revision 1
initial version

You are going to have huge message-delivery problems with this design. If you have a remote master node, or the master is otherwise busy, it can take 100's of milliseconds to create a publisher. Any messages sent to a publisher object before the proper connections are established are simply discarded on the sending side (this is not a bug - ros1 does not guarantee message delivery.)

Creating a publisher-object is quite a bit more expensive than just holding the publisher-object open. Of course, if you create an insane number of publishers, that's going to be a different problem.

You are going to have huge message-delivery problems with this design. If you have a remote master node, or the master is otherwise busy, it can take 100's of milliseconds to create a publisher. Any messages sent to a publisher object before the proper connections are established are simply discarded on the sending side (this is not a bug - ros1 does not guarantee message delivery.)

Creating a publisher-object is quite a bit more expensive than just holding the publisher-object open. Of course, if you create an insane number of publishers, that's going to be a different problem.

And lastly: ros service calls are not very efficient, and are not meant to be used for high-rate communication or activities. If your ros service is being called even once a second, that is too often. You need to figure out a more efficient approach.