-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The micro_ros_agent does not relay topic messages #175
Comments
Environment
This problem only exists while using UDP protocol (UART is normal). Logs
|
We will take a look |
Thanks again for your help. I tested MicroROS on RT-Thread using Cortex M3, M4, M7 via UART, and they were very stable (pub, sub , service examples). While for UDP connection, the MCU could publish topics and host services, but failed to receive messages from subscribed topics (/int32). After running several tests, I noticed that the micro_ros_agent did not relay subscribed messages to the MCU. If the UDP subscription example is successful, we are very close to the full support of MicroROS on RT-Thread. Best regards, |
Are you using Fast DDS as middleware in ROS 2 Galactic? micro-ROS is not compatible with Cyclone DDS (the default middleware in Galactic) |
I just checked the RMW:
The implementation of UDP transport on RT-Thread is OK because we can publish topics and provide services. We can see the node ( Occationally, the micro_ros_agent printed further info, and then the MCU could receive the subscribed message. Thus, I assume the problem happens when the agent fails to relay topics (via UDP), but I dont't know why the agent does not relay messages sometimes. |
Are ROS 2 and the micro-ROS Agent running in the same computer? |
I did not run ROS2 on the computer. The topics were published from the |
Can you check if running both the agent and ROS 2 command in the very same machine (or inside the same docker) has the same problem? |
Yes, the problem occured when I used the same docker container for the micro-ros-agent and the topic publication. And we had the same problem on another PC that did not use container (The same PC that ran agent and topic publication natively without docker). |
Can you test the first use case running the docker with the flag edit: for reference this is my docker command for ROS 2:
|
Thank you, I'll try this, on my way to the Lab. Previously, I used:
|
Hi, I tried The same problem occurred on M3, M4, and M7, but only when UDP was used (UART was normal). Thus, I think the problem is related to UDP communication. Since the MCU can set up and publish topics to the PC, I then realize that the agent did not relay messages to the MCU. I recorded my terminal here: UDP Sub Int32 (no message) UDP Pub Int32 (Success) |
Make sure that the docker where you are launching the ROS 2 commands also are initialized with Also, make sure that you are using the latest micro-ROS Agent docker version. In any case, this seems to be a ROS 2 / DDS network issue between the Fast DDS in the micro-ROS Agent and the Fast DDS in your ROS 2 installation, not a micro-ROS issue. I have been testing your scenario and I have been able to:
|
I connected to the same container running micro-ros-agent using
I used the docker image you pushed last month.
I agree this is a network issue (UDP). The ROS 2 installation I used is inside the same container where micro-ros agent was initialized ( Thanks for your help. I need to do more testing to pinpoint the exact location of the network issue. |
One more thing, can you provide the same videos you prepare but using the flag |
Sure, I recorded the terminal with the flag Full log:
No new message received after
Does this mean the MCU failed to respond to the last message sent out by the agent? |
Not at all, the communication between the client and the agent is correct. The point is that the DDS side of the agent (no related to this log) is not matching with the DDS side of ROS 2. |
Thanks for confirming the communication between the client and the agent is correct, since I did not find documentations about the protocol between the agent and the client. I'll make sure all ROS2 installations use FastRTPS.
|
The protocol between the client and the agent is XRCE-DDS and it is documented here: https://micro-xrce-dds.docs.eprosima.com/en/latest/ |
Thank you. I'll check the DDS communication and try to pinpoint the cause of the problem. |
I have the same issue, I cannot see any of the data topics (imu etc) coming from a PX4 pixracer running the client. This is on Ubuntu 20.04 running ROS2 Galactic, but with fastrtps. This is all compiled from source, on a single host computer and no virtual machine or docker container used. In one terminal on the host running the agent:
And in another terminal:
|
Describe the bug
Hi, I tried this example micro-ros_subscriber_twist using UDP on STM32F407 (Ethernet), but the micro_ros_agent only relays the message to MCU if
If I exchange step 2 with step 3, I cannot receive the message on MCU:
I'm wondering is this an expected behavior or a BUG?
Besides, the micro-ros_publisher.ino example cannot receive the int32 message under both scenarios.
To Reproduce
Scenario 1 (BUG):
Scenario 1 (Normal):
The text was updated successfully, but these errors were encountered: