micro_ros_arduino: Error using micro-ROS on Foxy without docker

Issue template

Hardware description: Arduino Due RTOS: NO micro-ros-Agent: I was followed micro-ros instruction Version or commit hash: foxy OS: Ubuntu 20.04

Steps to reproduce the issue

I using Foxy pre-compile released and use micro-ros instruction to create micro-ROS agent Then, I put foxy repo in Arduino library and upload micro-ros_publisher example.

I use docker version sudo docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy serial --dev /dev/ttyACM0 -v6 It’s work fine. the topic is have when I using sudo docker run -ti --rm --net=host ros:foxy ros2 topic list command.

But when I build the Micro-ROS on my computer and run the command ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 -v6 The results in the terminal is same as docker version. But when I use ros2 topic list it shown only /parameter_events and /rosout topic

I try follow #196 Issue and use generate_lib options to create Micro-ROS Agent but I not working.

I don’t know what exactly the main issue of this. Do I need to compile the Micro-ROS Agent by my self. Or compile the Micro-ROS Arduino.

I want to use the ROS on Raspberry Pi 4 and when using docker version is very slow and complicated to use.

Thank you.

Expected behavior

The topic is shown.

Actual behavior

Topic not shown.

Additional information

It’s my first actual robot build in ROS, I don’t know that I choose wrong for ROS2 Version it’s seem have a lot of problem. So I want to know from robotic professionals. If I can communicate ROS with MCU the next step for building ROS2 Robot (Ex. NAVIGATION, SLAM and AUTONOMOUS DRIVING) it’s will be a lot of bug or not, If It does have a lot of bug. So, I will switch back to ROS1 that have everything. Thank you. I feel I am lost to build the ROBOT NOW. TT

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

The ROS_DOMAIN_ID environment variable sets the ROS2 domain id used, which can be used to isolate nodes from each other. From the docs:

As explained elsewhere, the default middleware that ROS 2 uses for communication is DDS. In DDS, the primary mechanism for having different logical networks share a physical network is known as the Domain ID. ROS 2 nodes on the same domain can freely discover and send messages to each other, while ROS 2 nodes on different domains cannot. All ROS 2 nodes use domain ID 0 by default. To avoid interference between different groups of computers running ROS 2 on the same network, a different domain ID should be set for each group.

I am closing this, Glad to hear it worked!

@Acuadros95 You are my life saver! After I use export ROS_DOMAIN_ID=0 before ros2 topic list my topic was shown. image What does the export ROS_DOMAIN_ID=0 do?