0
$\begingroup$

Show activity on this post.

for a project, I have a robot that is running Ubuntu 18.04 with ROS1 Melodic and a desktop that is running Ubuntu 22.04 with ROS2 Humble. In order to use the ROS1 bridge I am using Docker with 3 containers as follows:

Container 1 -> ROS2 Humble Container 2 -> ros1_bridge Container 3 -> ROS1 Melodic (only used to SSH to the robot and change files on the internal computer, namely the Raspberry Pi and Jetson Nano)

The communication between the docker containers (without the robot) works, and was tested by using the examples from the ros1_bridge GitHub (https://github.com/ros2/ros1_bridge#example-1-run-the-bridge-and-the-example-talker-and-listener).

Now I connected my robot to my desktop. the containers all run on the network from the robot (connection through an Ethernet connection), namely: IP address containers = 192.168.123.51 IP address raspberrypi = 192.168.123.161

I changed the .bashrc file of the computer to include the following lines of code: export ROS_MASTER_URI=://192.168.123.161:11311 export ROS_IP=192.168.123.51

The .bashrc file of the robot was also changed to include the following lines of code: export ROS_MASTER_URI=://raspberrypi:11311 export ROS_IP=192.168.123.161

The problem I have found is that when I start my ros1_bridge I get the following error:

[ERROR] [1700558900.455340475]: couldn't resolve publisher host [raspberrypi] Failed to connect to raspberrypi:55903 
[ERROR] [1700558900.461922158]: couldn't resolve publisher host [192.168.123.15 192.168.11.110] Failed to connect to 192.168.123.15

Before starting the ros1_bridge i have first sourced the env and then exported the ROS_MASTER_URL (tried different ROS_MASTER_URL's like ROS_MASTER_URL://raspberrypi:11311 or ROS_MASTER_URL://192.168.123.15:11311 or ROS_MASTER_URL://192.168.123.51)

What I expected to happen was that the topics would be bridged between the different ROS version, like it was done with the example

Any help would be really helpful.

$\endgroup$

1 Answer 1

0
$\begingroup$

I had similar issues long time ago, so I don't remember exactly what I did from the top of my head:

  • are you sure your ROS2 nodes is compatible with the rosbridge (ROS1) that you are using
  • configuring docker to have a special network configuration is always problematic, perhaps try first using the "host" mode
  • When running ROS2 docker images on "host" network mode you should also set PID and PIC to "host", although this was maybe not recommended and only meant to test and debug.
$\endgroup$
2
  • $\begingroup$ thanks for the reply. i am already using the "host". i can ping the ip of the robot, but i still get the same error when running the bridge. $\endgroup$
    – D_scholten
    Nov 21, 2023 at 14:52
  • $\begingroup$ I also remember that on ROS2 you don't set ROS_MASTER_URI or ROS_IP the ROS1 way. sorry I cannot be more precise, this was long time ago, but I hope this can give you some clues where to look for answers $\endgroup$
    – fabioDFKI
    Nov 21, 2023 at 14:58

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.