-
Notifications
You must be signed in to change notification settings - Fork 26
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
rmw_uros_ping_agent always adds 100 ms delay #306
Comments
Sorry but as far as we do not support Pop OS 22.04 for Renesas RA6M5 I'm not sure about the behaviour of your system. Could you confirm that it behaves the same with a supported configuration? |
Pop OS is the practically the same as Ubuntu, with drivers pre-installed and customized GNOME features. I find it hard to believe that that could be the issue. So this additional 100 ms is not something that is implemented by design? |
I thought that Pop OS was some sort of RTOS running in the RA6M5, sorry for the confusion. Which transport are you using to communicate the micro-ROS Client with the micro-ROS Agent? |
I am using Serial USB to communicate between the Agent and the microcontroller based on this example. |
Could you check if changing the timeout here: https://github.com/micro-ROS/micro_ros_renesas2estudio_component/blob/a99ccd815ebe6de4b53b02189cedd36bb1847c7d/extra_sources/microros_transports/usb_transport.c#L136 solves the issue? Not sure right now if you can set it to return handle_usb(USB_WRITE, (uint8_t *) buf, len, 0); but maybe something less than WRITE_TIMEOUT (that is 100 ms). |
Thank you. This was indeed the cause of the 100 ms delay. |
Describe the bug
The
rmw_uros_ping_agent
function adds 100 ms of delay to the function'stimeout_ms
input argument when the Micro-ROS Agent is not found or not connected.For example, when measuring the time it takes to evaluate
rmw_uros_ping_agent(10, 1)
, the result is 110 ms.Similarly,
rmw_uros_ping_agent(100, 1)
takes 200 ms.rmw_uros_ping_agent(10, 2)
results in 210 ms.To Reproduce
I am using the micro-ros_reconnection_example to reconnect to the Agent in the case that a connection is lost, or when my microcontroller boots before the PC which runs the Micro-ROS Agent boots.
Expected behaviour
I expect the delay to be equal to
timeout_ms
. We are controlling electric motors with the microcontroller, so adding a 100 ms delay to our system makes our robot uncontrollable.System information:
The text was updated successfully, but these errors were encountered: