micro_ros_arduino icon indicating copy to clipboard operation
micro_ros_arduino copied to clipboard

No ROS2 topics and nodes on example publisher

Open MrOCW opened this issue 2 years ago • 10 comments

Issue template

  • Hardware description: ESP32
  • RTOS: NA
  • Installation type: Docker
  • Version or commit hash: humble

Steps to reproduce the issue

Upload micro-ros_publisher.ino onto an ESP32 Run docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyUSB0 -v6 Enter the container and run ros2 topic list

Expected behavior

Topics and Nodes appear as expected

Actual behavior

No communication with ros2

Additional information

image

MrOCW avatar Jan 21 '23 13:01 MrOCW

Where are you running the ros2 command? in another docker?

pablogs9 avatar Jan 23 '23 07:01 pablogs9

@pablogs9 yes, its in the exact same container running docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyUSB0 -v6

MrOCW avatar Jan 23 '23 15:01 MrOCW

Are you setting some domain in the micro-ROS Client?

pablogs9 avatar Jan 24 '23 06:01 pablogs9

no. everything is default

MrOCW avatar Jan 25 '23 03:01 MrOCW

Does it works in a local ROS 2 installation or in a separate docker running ROS 2?

pablogs9 avatar Jan 25 '23 06:01 pablogs9

I have not tried a local ROS2 installation. everything is running in docker. the containers are launched with privileged and --net=host args

MrOCW avatar Jan 25 '23 07:01 MrOCW

Well, it seems to be something related to Fast DDS communication between the micro-ROS Agent and ROS 2 because the communication between micro-ROS Client and Agent is correct as far as you can see outcoming DDS packets in the agent log <<DDS>>.

With the provided information I cannot determine which can be the cause.

pablogs9 avatar Jan 25 '23 07:01 pablogs9

In any case, try to add --ipc=host in the docker launch, to check if it related with Shared Memory discovery between Fast DDS Instances.

pablogs9 avatar Jan 25 '23 07:01 pablogs9

i run it on my host machine but i didn't see the topic. Could you help me?

Franklein20 avatar Feb 01 '23 21:02 Franklein20

Hello, I had the same issue but not running docker. I used the simple way and the topic and node were not showing. The workaround is to add the ros domain ID by typing : "export ROS_DOMAIN_ID=0"

anasderkaoui avatar Jan 03 '24 08:01 anasderkaoui