Ask Your Question
0

ros2-dashing (DDS) fastrtps in python node

asked 2020-05-10 08:12:27 -0500

KiD gravatar image

Hi,

I am trying to build a test ros2 project where I have two nodes running in two different machines and communicate (publish/subscribe) with each other using DDS. I was thinking to use the default DDS implementation which I think is fastrtps. I am guessing the communication will be done via the router using Multicast (is RTPS a Multicast based protocol?).

Right now my test nodes are written in Python. Is it possible to use DDS in this Nods or do my Nodes need to be written in C++ (all the examples I found were written in C++)

If yes, is there any good Python example/Tutorial on how to do it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-10 09:48:22 -0500

gvdhoorn gravatar image

If you write your ROS 2 node(s) using rclpy, then all ROS based communication (ie: publishing, invoking services and sending goals to action servers) will be using whichever RMW (ROS MiddleWare abstraction) is active.

In the default configuration, that would mean a DDS implementation, which by default is Fast RTPS.

As to tutorials/documentation: index/ ROS 2 Overview > Tutorials > Writing a simple publisher and subscriber (Python) should help you get started.

Other Python examples may be found in ros2/examples. There's also the ros2/demos repository which contains Python examples.

edit flag offensive delete link more

Comments

Thank you gvdhoom. I actually had not noticed, but my nodes already publish through RTPS.

It seems that the default address is 239.255.0.1.

Do you know if there is any way to modify it (through an RTPS.ini file for example)?

I was just wanted to play around a little and see if i can have different topics being publishes to different addresses.

Also is the ROS_DOMAIN_ID something that I need to set in my publishers/subscribers running in different machines? Or is there a default ROS_DOMAIN_ID that is being used?

KiD gravatar image KiD  ( 2020-05-10 13:16:38 -0500 )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

Stats

Asked: 2020-05-10 08:12:27 -0500

Seen: 52 times

Last updated: May 10