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

Data transfer from a non-ros software to the ros environment

asked 2021-04-13 10:15:32 -0500

staos gravatar image

Hi there,

i am a beginner with ROS and I have a non-ROS application which calculates the position of a tag and i need to get this position data(x,y,z) into ROS environment, in order to use the ROS tools and libraries to develop further applications. This non-ROS positioning application(Server) provides the calculated data into some GUIs(Client) via TCP/IP Server-Client method by using sockets(localhost) to display the position of the tag. So my question is, how i could manage to create a communication between a non-ROS application with the ROS environment in order to manage the data transfer? If i would develop a ROS TCP/IP Client Node with the appropriate socket would it be possible to connect and communicate direct to the non-ROS positioning application Server and ask for the positioning data? I hope that i was clear enough. Thank you very much in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-13 14:21:25 -0500

gvdhoorn gravatar image

updated 2021-04-17 09:01:36 -0500

If i would develop a ROS TCP/IP Client Node with the appropriate socket would it be possible to connect and communicate direct to the non-ROS positioning application Server and ask for the positioning data?

The short answer would be: yes.

This is done all the time, and we typically call these kinds of ROS nodes bridges (when connecting pieces of software) or drivers (when connecting ROS to (robot) hardware).

Be sure to check whether standard messages such as geometry_msgs or TF2 can be used to represent the location of the tag instead of creating a new custom message. Using standard messages will make consumption by existing nodes much easier.


Edit:

I hope it works because i found the rosbridge_suite a bit complex for this task.

rosbridge could also be used, but it depends a bit on how your "non-ROS application" works.

If it's under your control, and you can extend it with rosbridge compatibility, that could be a very lightweight way to be able to publish data to a ROS node graph without linking your/the "non-ROS application" to anything ROS (ie: roscpp).

If it's not under your control, and it only exposes some tcp:// endpoints, then rosbridge would not really help that much.

Actually the rosbridge_suite is useful only for Web applications?

No, not at all. It's just a simple JSON based protocol with a server which happens to "understand" ROS, allowing it to function (almost) as a transparent bridge and thereby allowing client applications to (almost) directly publish, subscribe and more without directly depending or importing any part of ROS itself.

I mean, if i wanted to publish the position of the tag into some web page then i had to use the rosbridge_suite, right?

You could use rosbridge for that, yes. But that's mostly just because there is a well supported client implementation of the rosbridge protocol written in Javascript.

There's nothing inherently "web based" in rosbridge.

edit flag offensive delete link more

Comments

Thank you very much for your fast response. I hope it works because i found the rosbridge_suite a bit complex for this task. Actually the rosbridge_suite is useful only for Web applications? I mean, if i wanted to publish the position of the tag into some web page then i had to use the rosbridge_suite, right? Thanks again.

staos gravatar image staos  ( 2021-04-17 04:29:52 -0500 )edit

What made you revoke the answered status?

gvdhoorn gravatar image gvdhoorn  ( 2021-04-18 11:07:26 -0500 )edit

Oh sorry that done by mistake. Thanks that you noticed.

staos gravatar image staos  ( 2021-04-29 04:31:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-04-13 10:15:32 -0500

Seen: 542 times

Last updated: Apr 17 '21