You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I observed RViz getting slower over time when a certain Display is active. Running a profiler shows that ros::TimeBase<ros::Time, ros::Duration>::operator<= takes about 1/3 of the RViz's processing time (over 2 minutes).
It turns out that, in my case, there are published sensor messages before the first tf message. Therefore, on each new message, the MessageFilter tries to find a transform for its cached messages (which in our case will never be transformable ever). See testMessage() in message_filter.h:341. I believe, this search for a suitable transform takes up a lot of the time (considering that RViz uses a transform cache length of 10 minutes, frame_manager.cpp:44.) After 10 minutes, the messages get thrown out of the message cache and RViz is not that slow anymore. (https://github.com/ros/geometry/blob/indigo-devel/tf/include/tf/message_filter.h#L341)
I am unsure what a good solution for this would look like
Is this a misuse by RViz considering a 10 minute cache length?
Should there be a second cache time for messages vs. transforms?
Should BufferCore::canTransform be faster in realizing that the requested time is not in its cache (i.e., requestedTime < earliestKnownTime) . (Not sure about this one. I have not looked at the implementation)
I am happy for any suggestions and might be able to provide a pull request once a proper solution has been identified.
Approximately how many messages do you think are queuing up before transforms become available?
canTransform is generally pretty fast. I'm surprised to see most of the time is in the time/duration operator<=
Also what plugin are you using to render? Looking at a few random plugins they create their own MessageFilter and can populate the queue size. And I notice that common queue sizes are below 10.
I observed RViz getting slower over time when a certain Display is active. Running a profiler shows that
ros::TimeBase<ros::Time, ros::Duration>::operator<=
takes about 1/3 of the RViz's processing time (over 2 minutes).It turns out that, in my case, there are published sensor messages before the first tf message. Therefore, on each new message, the MessageFilter tries to find a transform for its cached messages (which in our case will never be transformable ever). See testMessage() in message_filter.h:341. I believe, this search for a suitable transform takes up a lot of the time (considering that RViz uses a transform cache length of 10 minutes, frame_manager.cpp:44.) After 10 minutes, the messages get thrown out of the message cache and RViz is not that slow anymore. (https://github.com/ros/geometry/blob/indigo-devel/tf/include/tf/message_filter.h#L341)
I am unsure what a good solution for this would look like
BufferCore::canTransform
be faster in realizing that the requested time is not in its cache (i.e., requestedTime < earliestKnownTime) . (Not sure about this one. I have not looked at the implementation)I am happy for any suggestions and might be able to provide a pull request once a proper solution has been identified.
Here's the call stack:
The text was updated successfully, but these errors were encountered: