ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Lag between goal publish, accept, and feedback

asked 2019-01-06 20:40:29 -0500

clgwoe gravatar image

Hello! Using ROS melodic and Rosbridge Server, I'm seeing on average a delay of about 115-130ms between the time that I publish my goal, receive a status message that is accepted, and then receive my first feedback message through the websocket. Unfortunately, our robot is capturing events that occur so quickly that this represents a pretty significant amount of time for us, so I need to find a way to bring it down.

The breakdown is about 100ms between goal submit and status and then from status to feedback it's around 15-30ms. I'm not sure that the status and feedback messages are related, since the status topic publishes at 100hz, but the feedback topic should have no such delay. There are no sleep commands in the code that would have an impact here and nothing in the code jumps out at me, which leads me to believe that this is just the way it's expected to behave or something is misconfigured or... I should be using C++ instead of Python? I'm not sure but I'd love advice.

I'm using ROS melodic but saw this in Kinetic as well. My server is written in Python and it's setup as a Simple Action Server. The client is JS using the latest roslibjs. Connection is via websocket, I'm using Rosbridge Server. Open to any and all recommendations, happy to provide any more information that may be needed.

edit retag flag offensive close merge delete

Comments

Did you check the system load? If for example all of the system's CPUs are fully loaded, this delay seems normal.

kosmastsk gravatar image kosmastsk  ( 2019-01-07 10:49:55 -0500 )edit

System gets hit pretty hard but everything else is perfectly zippy. It is possible, though. I'd love to do a trace and see call times, I'll see if I can figure that out but any chance you or anyone can point me in the right direction?

clgwoe gravatar image clgwoe  ( 2019-01-07 11:46:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-29 11:13:43 -0500

clgwoe gravatar image

This is far from an answer but I thought I'd share how I worked around this issue.

The reason that solving that delay was necessary was because I was relying on data that was provided as part of the goal's feedback message. This feedback was always available in the system and didn't need to be the goal's responsibility, so I exposed a new node that streams the same data. I now subscribe to that all the time and only rely on the goal for its result message, which always arrives right when we expect it. The goal still has a delay in init but this is no longer a bottleneck.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2019-01-06 20:40:29 -0500

Seen: 778 times

Last updated: Jan 29 '19