-
Notifications
You must be signed in to change notification settings - Fork 128
Unexpected behavior of reconnection example #912
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
Comments
Which version of the library and the agentt are you using? |
I just updated my version of the agent. For the library, I import it using platformio as it is also stated on the README of this repository:
I also just tried creating a new blank project and then adding the reconnection example code, but the issue remains. Could it be related to the fact that we are using ROS2 foxy and not galactic? |
no, but make sure that you are using the latest commit of the foxy branch. @Acuadros95 does the last release (2.0.4) includes the modifications on the XRCE ping behavior? |
Can you give a try to this reimplementation of the reconnection example? #913 I have tried both (old and #913) using serial transport, a Teensy 4 and launching the agent with: docker run -it --rm -v /dev:/dev --privileged microros/micro-ros-agent:foxy serial --dev /dev/serial/by-id/usb-Teensyduino_USB_Serial_8224100-if00 -b 115200 -v6 And both works, can you test this? |
Thanks, this works now for me. Also with both the old and new version of it. So I think it is the way that I started up the agent normally I just run it without the docker using
Can you tell me what the difference is, please? |
Well, using this command you are using a local workspace where the agent is built. Probably you need to recreate the micro-ROS Agent and rebuild it in order to have the latest version. The docker usually has the latest version precompiled. I'm closing please reopen if you have any other questions. |
Hello,
I tried out the reconnection example because I want to use something similar for my application, but it is not working as I would expect it to work.
What is happening for me is that rmw_uros_ping_agent only returns RMW_RET_OK when the entities have not yet been created. As soon as I create the entities, rmw_uros_ping_agent returns an error, even thought the agent is still running. Running the example this way causes just a continuous creation and destruction of the entities and the system never starts spinning the executor.
What I would expect is that rmw_uros_ping_agent returns a true value as long as the agent is connected, then creates the entities once and at each later iteration spins the executor. The entities should only be destroyed once the connection to the agent is actually lost.
Please let me know if I understand correct that this behavior is not desired and if you have any ideas on how to fix this issue. I already tried increasing the timeout and number of connection tries but that does not change the behavior. I also tried modifying the colcon.meta as suggested here , but that also did not change anything.
Thanks!
The text was updated successfully, but these errors were encountered: