1
$\begingroup$

Rosanswers logo

A very simple question on ROS2,

Can we use ROS2 on embedded platform/board without any network connection (no internet/no router) means standalone board only ?

I tried running ROS2 without any network connectivity on laptop but it is not able to create any topic, services. (And works well with network connectivity)

Is it like ROS2 always need some router/network connectivity to run ROS nodes? (can't run on standalone board)

please help in understanding ROS2 concepts.


Originally posted by askkvn on ROS Answers with karma: 115 on 2019-06-15

Post score: 1


Original comments

Comment by gvdhoorn on 2019-06-15:
I believe the issue is not "with or without a network connection", it is that some DDS implementations ignore lo (ie: localhost) network interfaces. They should be configurable to enable the lo interface as well and then everything should work as normal.

See ros2/rmw_fastrtps#228, eProsima/Fast-RTPS#167 and eProsima/Fast-RTPS#267 for what I believe are related issues.

$\endgroup$

1 Answer 1

1
$\begingroup$

Rosanswers logo

@gvdhoorn Thanks for your reference links.

This one solves my problem https://stackoverflow.com/a/30982079/6920365

You can use multicast on loopback but you have to add a new route because your OS using default external interface by default for multicast. Also multicast can be disabled by default on loopback. On linux you can change this with this command:

route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
ifconfig lo multicast  

To check loopback, run this command: (make you are disconnected from all network connectivity)

Terminal 1: ros2 run demo_nodes_cpp talker Terminal 2: ros2 run demo_nodes_cpp listener


Originally posted by askkvn with karma: 115 on 2019-06-17

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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