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

ROS2: Running subscriber_lambda and publisher_lambda on different machines (in the same network)

asked 2019-04-05 03:44:20 -0500

nickcage gravatar image

updated 2019-04-05 05:51:45 -0500

gvdhoorn gravatar image

Hello,

I have two machines connected via ethernet cable, configured to be in the same network and they can ping each other successfully. What I would like to know is what would be the necessary steps to run build/examples_rclcpp_minimal_subscriber/subscriber_lambda on one machine and build/examples_rclcpp_minimal_publisher/publisher_lambda on another? I have tried it but the subscriber never gets anything.

Note that I cannot use ros2 run demo_nodes_cpp on one of the machines because it has not been ported yet so that example is not a choice.

Thank you in advance.

edit retag flag offensive close merge delete

Comments

@nickcage: I've changed the title of your question slightly so as to better reflect what you are asking.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-05 05:51:19 -0500 )edit

Note that I cannot use ros2 run demo_nodes_cpp on one of the machines because it has not been ported yet so that example is not a choice.

what do you mean exactly by this? What hasn't been "ported yet"?

gvdhoorn gravatar image gvdhoorn  ( 2019-04-05 05:52:07 -0500 )edit

The thing is one of the machines is an ARM of Texas Instruments SoC, the other one is Intel PC. We have got a ros2 workspace from our clients that we are to use on ARM. Actually the talker and listener demos work on ARM when run locally (from two terminals within the same system) but also output a number of 'Failed to load entry point' messages before they start. They work properly afterwards, though. So maybe they can be used but I have not been able to make them work over network.

nickcage gravatar image nickcage  ( 2019-04-05 07:13:22 -0500 )edit

I'm confused: are you trying to run ARM binaries on an amd64 PC or the other way around?

Edit: O wait, you have an ARM install made available by your client, and have installed ROS2 on an amd64 machine yourself. You're now trying to make those two "see" each other.

Correct?

gvdhoorn gravatar image gvdhoorn  ( 2019-04-05 07:15:12 -0500 )edit

Yes, that is mostly correct. What I mean by that is that we have also been provided a workspace for the PC but I think it was installed by standard procedure. Both distros are bouncy (on ARM and on PC).

nickcage gravatar image nickcage  ( 2019-04-05 07:35:08 -0500 )edit

I would at least replace the PC side of this with a proper install, instead of a "reused workspace". Debugging issues with this sw is hard enough without a lot of things being unknown variables.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-05 10:43:24 -0500 )edit

Hi, thank you for sticking around. Will do that and come back to you with an update.

nickcage gravatar image nickcage  ( 2019-04-08 02:57:48 -0500 )edit

I can't seem to get ROS2 bouncy from the repos, I always end up having crystal after executing 'printenv ROS_DISTRO'. I followed this tutorial https://index.ros.org/doc/ros2/Instal... and only changed the --rosdistro parameter from crystal to bouncy in "Install dependencies using rosdep" section. However, I still got crystal.

nickcage gravatar image nickcage  ( 2019-04-08 03:52:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-10 14:36:19 -0500

nickcage gravatar image

OP here, actually I have solved this issue. The problem was the routing for multicast was not setup correctly on participating machines. The solution was to run the following command on appropriate eth port on both machines:

route add -net 224.0.0.0 netmask 240.0.0.0 dev ethX

That should enable the node discovery mechanism in a local network.

edit flag offensive delete link more

Comments

This worked for me after adding the gw argument with my gateway's IP and properly renamed ethX under what I got from ifconfig.

ljaniec gravatar image ljaniec  ( 2022-07-20 11:04:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-05 03:44:20 -0500

Seen: 1,164 times

Last updated: Jul 10 '19