DDS Communication Between ROS-2 and LabVIEW

4 posts / 0 new
Last post
Offline
Last seen: 4 months 4 weeks ago
Joined: 02/06/2020
Posts: 5
DDS Communication Between ROS-2 and LabVIEW

Hi,

 

Currently I'm trying to  establish/communicate between ROS-2 and LabVIEW, as known LabVIEW as an add on of RTI-DDS Toolkit and even on ROS-2 on the underlay it has the RTI DDS Implementation. Here I would like to know how could I Publish some msg in LabVIEW RTI DDS, where it needs to Subscribe the msg back in ROS2 DDS. Both LabVIEW and ROS-2 works on different PC, preferable connection would be via Ethernet. Kindly I would like to know if you have any sources/guide/workflow to make it easy or the best way to do this. 

Awaiting for your valuable inputs..

Thanks in advance!

 

Offline
Last seen: 2 months 1 week ago
Joined: 11/14/2017
Posts: 18

Hello!

The good news: ROS 2, being built on top of DDS, is therefore itself a set of DDS applications.
This means that other DDS applications, (ROS 2 or not) can interoperate with ROS 2 applications, as long as they're using the same data types, topic names, and a compatible QoS.
To make this happen, build your LabVIEW data elements to have the same structure and topic naming convention as used in ROS 2, and ensure the QoS settings match what's used in ROS 2 (Best Effort or Reliable).

A handy reference of the data types used in ROS 2 (in IDL and MSG format) can be found on the RTI GitHub site at https://github.com/rticommunity/ros-data-types, these can help ensure the data types that you build in LabVIEW are correct & match what's expected in ROS 2.

In general, the newer versions of ROS 2 (starting with 'Bouncy') use a topic naming convention of:
  prefix the topic name with "rt/" (for "ROS topic", letting ROS 2 know that this is a user topic)
  potentially follow with the name of the entity that needs or sends the data.
  finish with the name of the topic.

For example, when running the "turtlesim" application, it might receive direction commands using the topic named "rt/turtle1/cmd_vel", using the data type "geometry_msgs::msg::Twist", which is composed of two structs of type "geometry_msgs::msg::Vector3", which holds 3 values of type float64.   The cluster in LabVIEW would need to reproduce this data structure to control the turtle sim.
RTI Admin Console or RTI DDS Spy can be of assistance here; sometimes there may be small naming differences in the topics (like trailing underscores) that will cause trouble, these can be spotted quickly using these tools.
This is just an example; use the data type(s) that fit your application.

Does this help?

Offline
Last seen: 4 months 4 weeks ago
Joined: 02/06/2020
Posts: 5

Hi Good Day!,

Thank you very much for the information!

Do we have any similar examples (with same data type and structure) both in ROS2 and LabVIEW. if not what would be the good point to start ??

Also I would like to know how could I get ethernet connection between ROS2 and LabVIEW like do I need to make any specific settings in RTI, if Yes! what should I do ??

looking forward for your reply!

Thank you very much:) 

 

 

Offline
Last seen: 1 month 6 days ago
Joined: 08/13/2020
Posts: 1

Hi, I hope im not too late :) 

https://github.com/SynapseProgramming/ros2labview_guide

I hope this helps.