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

Starting step ROS2

asked 2018-04-24 02:21:42 -0600

aks gravatar image

updated 2018-04-26 03:58:53 -0600

From the last few weeks, I have been studying and implementing examples based on ROS and now i have finally jimped into ROS2. Honestly, the more i read, the more i get confused. I guess i am missing the starting point. For the moment i have thought of a simple application which is as follows :

AIM : To test communication between ROS2 and an Individual tool through DDS.

  1. Create a New Package in ROS2.
  2. Write a simple function o1 = i1*time.
  3. Connect the DDS layer(ROS2) with a tool and display this updated value of a in the tool.
  4. The inputs to the tool is a python script file which can take a server address and a port number to establish a connection.
  5. Note and try to syncronize the time stamps between the ROS2 function and the tool.

I am just looking for a starting point for this as I feel a bit lost around. Any help would be appreciated.

EDIT: modified the function and attached an image

image description

edit retag flag offensive close merge delete

Comments

You will have to explain what you mean by "connect the DDS layer with a tool". What is this tool? Do you want to use DDS directly from the tool? Why can't the tool use the ROS client library?

Geoff gravatar image Geoff  ( 2018-04-24 19:56:14 -0600 )edit

@Geoff : edited the question and attached an image for better understanding. The tool is a co simulation tool where different simulation tools can be integrated. I want DDS as a communication medium between the tool and ROS2 (requirement).

aks gravatar image aks  ( 2018-04-26 04:00:25 -0600 )edit

Can this be closed in favor of https://answers.ros.org/question/2897...

William gravatar image William  ( 2018-04-26 12:39:45 -0600 )edit

@William : I would say no as this question goes more in the direction "Connecting a Tool interface with ROS2" only the function part is common.

aks gravatar image aks  ( 2018-04-27 03:46:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-26 18:40:13 -0600

Geoff gravatar image

To talk between a ROS2 application and a non-ROS tool (i.e. a tool that does not use any of the ROS APIs) using DDS, you have two options:

  1. Use DDS directly from the ROS2 application (not via the ROS2 APIs). You will be using raw DDS so you need to learn how to do that from the documentation for the DDS implementation you are using. You will need to supply data types yourself, choose topics yourself, etc.

  2. Make the non-ROS tool talk ROS2-style DDS. You will need to understand how ROS2 uses DDS in detail so you can mimic it in your tool. Look at the design documents for ROS2, especially the mapping between ROS2 topics and DDS topics and the mapping between ROS2 types and DDS types, but in general anything on that page that talks about how ROS uses DDS. There are people who have done this but I don't know of any open examples; hopefully someone will provide one in the comments.

The first approach is probably less fragile, but it will need to be implemented carefully to avoid increasing resource use. The second approach is fragile to changes in the ROS2 implementation - it is still beta, after all. The second approach is also, in my opinion, adding a murky dependency on ROS2. Using the ROS2 API directly from your tool, if that is possible, would be clearer and easier to maintain.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-04-24 02:21:42 -0600

Seen: 319 times

Last updated: Apr 26 '18