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

nodes can't communicate with each other on Docker macOS

asked 2023-03-20 04:53:18 -0500

Oro8lu gravatar image

Hello! I'm using an M1 Pro MacBook Pro 14' using Docker desktop version 4.17.0.

I've followed the official tutorial at https://docs.ros.org/en/humble/How-To... but to no avail: the listener can't "hear" the talker.

Also, (and I think it is related) if I fire up, say, turtlesim turtlesim_node, and then I try to list the nodes nothing shows up. Following the same exact steps on a Linux machine works flawlessly, so I believe it is something related to macOS or with its version of docker.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-21 10:27:13 -0500

Per Edwardsson gravatar image

Networking is a little different on macOS, it is for instance not possible to use --network=host on mac. Possible that your example relies on something which is disabled on macOS. You can get around it by creating a network with docker network create <name> and use docker run --network=<name> [...].

edit flag offensive delete link more

Comments

1

Thank you for your reply! I tried creating a network with docker and specifying it in the run command but no luck. Speaking of luck: I stumbled upon a different docker image called ros:humble (as opposed to osrf/ros:humble-desktop proposed in the aforementioned tutorial). Not only does it work but it is native for arm, giving me much better performance (the osrf/ros:humble-desktop image was for linux/amd64). I think there should be a big red box in the tutorial saying "if you're running on Apple Silicon, download this instead" XD.

Oro8lu gravatar image Oro8lu  ( 2023-03-21 10:38:46 -0500 )edit

By default, docker engine should only download image manifests with matching platform architecture as the host. Is docker for mac running two linux kernel VMs, or relying on static qemu in only a arm64v8 linux VM to emulate amd64 instructions for amd64 containers?

ruffsl gravatar image ruffsl  ( 2023-04-07 11:05:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-03-20 04:53:18 -0500

Seen: 1,140 times

Last updated: Mar 21 '23