0
$\begingroup$

Rosanswers logo

Following the tutorial of ros1_bridge

I can bridge the ros1 topics to ros2 and worked very well.

And I want to use this feature to communicate between multi-robots through DDS

But there is a problem with bridging big_data like image_raw when I use --bridge-all-topics

It will cause the network traffic jams

Is it possible to bridge specific topic or just except some topics that I don't want it bridged to ros2?

Thank you


Originally posted by NEET on ROS Answers with karma: 13 on 2019-08-01

Post score: 1


Original comments

Comment by Dirk Thomas on 2019-08-01:
Which bridge executable are you currently using? There are different ones for different use cases: dynamic_bridge, parameter_bridge, static_bridge, ...

Comment by NEET on 2019-08-01:
@Dirk Thomas I use dynamic_bridge. I have no idea about other methods...

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you dig into the ros1_bridge source code you will find the answer.
dynamic_bridge has the following available flags that are of interest in this case:

--bridge-all-topics: Bridge all topics in both directions, whether or not there is a matching subscriber.
--bridge-all-1to2-topics: Bridge all ROS 1 topics to ROS 2, whether or not there is a matching subscriber.
--bridge-all-2to1-topics: Bridge all ROS 2 topics to ROS 1, whether or not there is a matching subscriber.

Regarding your question for bridging specific topics you should look at the parameter_bridge:

bridge all topics listed in a ROS 1 parameter. The parameter needs to be an array and each item needs to be a dictionary with the following keys; 
topic: the name of the topic to bridge
type: the type of the topic to bridge
queue_size: the queue size to use (default: 100)

or static_bridge which gives an example implementation of bridging one topic.


Originally posted by pavel92 with karma: 1655 on 2019-08-02

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by NEET on 2019-08-02:
Thank you for your reply. And yes, I found the solution after I review the source code of ros1_bridge. Now, I feel so sorry about I did not try to look into ros1_bridge. Thank you so much!

$\endgroup$

Your Answer

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