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

what is the fastest way to copy and ROS topic to another ROs topic based on some condition without having a node in between ? Is this possible ?

asked 2018-11-08 02:48:47 -0500

jithinreju@gmail.com gravatar image

what is the fastest way to copy and ROS topic to another ROs topic based on some condition without having a node in between ? Is this possible ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-11-08 03:36:38 -0500

gvdhoorn gravatar image

updated 2018-11-08 03:57:45 -0500

what is the fastest way to copy and ROS topic to another ROs topic based on some condition without having a node in between ? Is this possible ?

Copy? No.

Clarification: not without a node in between, remember: ROS has no broker, so nodes are the only entities that participate in actual communication. No nodes -> no communication.

Redirect: yes.

But only at system startup time (in ROS 1, see #q31718: I don't believe this has changed).

Use remapping.

See #q303611 for a high-level explanation.


Edit: if copying is really a requirement, you could take a look at the relay (and perhaps relay_field) nodes from the topic_tools package.


Edit 2: there is a variant of topic_tools that has been implemented as a nodelet: nodelet_topic_tools. It doesn't seem to provide a version of relay, but if it did, that would seem to be the closest you could get to zero-copy runtime rewiring/remapping of ROS topics in ROS 1.

edit flag offensive delete link more

Comments

PS: I assumed 'fastest' to mean two things here:

  1. most efficient
  2. least amount of effort required on the developers side
gvdhoorn gravatar image gvdhoorn  ( 2018-11-08 04:07:03 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-08 02:48:47 -0500

Seen: 1,986 times

Last updated: Nov 08 '18