0
$\begingroup$

Rosanswers logo

Currently i am working with ROS2 which is based on DDS. So I have ROS2 installed on 1 machine and on the other I have a DDS implementation. So basically I can exchange messages through DDS and I do not explicitly need to have ROS2 also installed on the 2nd machine.

Could tihs be also possible with ROS 1 ? Since ROS is based on a Master/ Slave system, could it be possible somehow to exchange info between a nonROS machine by exchanging IP address or something ?


Originally posted by aks on ROS Answers with karma: 667 on 2018-06-28

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Yes, it is possible. One of the most widely used methods for accomplishing this is using rosbridge. There are lots of clients for rosbridge in many different programming languages. So, you can run rosbridge_server in your ROS1 computer and then use a rosbridge_client of your preference in your non-ROS computer.


Originally posted by lucascoelho with karma: 497 on 2018-06-28

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by aks on 2018-06-28:
Thank you. I will study more about it and come back to you :)

Comment by aks on 2018-06-28:
Just out of curiosity, can the non ROS machine also be a Windows machine and does both the machines need to be in the same network to communicate like in ROS2 ? @lucascoelho

Comment by lucascoelho on 2018-06-28:
Not sure if I understood you, but ROS1 does not runs in Windows natively. You can use a rosbridge client, as I said, in the Windows side to communicate with your ROS machine. And yes, using rosbridge they don't need to be in the same network (assuming no firewalls). Let me know if it was clear.

Comment by aks on 2018-06-28:
I guess I understood it. The only unclear point is that do i then need to implement socket programming in my ROS node as well ? e.g. I have a ROS node communicating with ROS server and the node is exchanging messages with a Windows based client. Could you direct me to some examples or literature ?

Comment by aks on 2018-06-28:
If you read the installation section here, it states that a working ROS installation is required within the network. So now I am a bit confused. @lucascoelho could you explain the difference between what you said and this statement ?

Comment by lucascoelho on 2018-06-28:
Since you want to use a python client and you have opted for roslibpy, you need both rosbridge and tf2_web_republished. In this link you can find installation and run instructions http://roslibpy.readthedocs.io/en/latest/reference/

Comment by lucascoelho on 2018-06-28:
Here is an example on how to read a topic using roslibpy https://github.com/gramaziokohler/roslibpy/blob/master/tests/test_topic.py

Comment by aks on 2018-09-26:
@lucascoelho : As soon as I run the tf2_web_republisher, it gives me a segmentation fault(core dumped) error. I am using ROS Kinetic. Did you ever face this problem ?

$\endgroup$
0
$\begingroup$

Rosanswers logo

This is a bit of an ill posed question as a "nonROS" machines are hard to define. As soon as you install or implement something that talks the ROS protocol it then makes it a non-"nonROS", or just a ROS machine.

As with any protocol you can implement it in different ways or with different languages. This is very clear as we have pure C/C++ implementations, pure python impelementations and pure java implementations to name a few.

If you were to implement on top of your DDS library enough to talk to the ROS system, you would effectively be writing a partial ROS 2 Client Library like the existing rclpy or rclcpp. Thus you wouldn't be using the most common implementation but you'd still be talking the ROS(2) protocol and thus from your question you'd be a "ROS machine". To that end though I would

It's also quite possible to bridge to another communication protocol such as a websockets based stream (ala rosbridge) or any other custom protocol (such as rosserial)

These are not talking the pure ROS protocol but are designed to be able to communicate ROS messages over another channel.

So for any generic machine that you want to communicate with a ROS system you can choose to use an existing ROS client library and integrate that into your system, implement your own client library(or partial implementation for the subset of features you need), or bridge to another protocol and forward messages back and forth.

From a practical standpoint it's is quite possible to communicate with ROS 2 just using pure DDS messages. But in reality you will effectively need to implement all of the functionality built into the existing client libraries, validate and test them. We've worked hard and have extensive testing to validate and cross validate all the of the existing implementations. There are a lot of corner cases under the hood that can catch you off guard until you get into the nuts and bolts of the implementation. In most cases it will be noteably more work to reimplement it all versus installing the ROS2 libraries necessary and integrating them. If you want to use a different DDS vendor there is an abstraction at the middleware level to allow adding support for a different vendor. And there are quite a few projects in the community for adding new language bindings on top of the core impelementation that the language specific implementations can leverage.


Originally posted by tfoote with karma: 58457 on 2018-06-28

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by aks on 2018-06-29:
@tfoote : Thank you for such a detailed explanation. I implemented DDS as I could not use ROS2 API's for my use case as to use a ROS2 API, there should be full ROS2 installation on the same machine which shouldnt be the case in the project i am working on else my first try was always using ROS2 APIs

$\endgroup$

Your Answer

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