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
Timeout for map saver CLI too short / subscription not transient local #1864
Comments
A param for the saver to use that QoS would be a good move. Can you submit a PR letting the QoS be parameterized? |
Yes. Just to be clear, a volatile subscriber + transient local publisher will act like a volatile topic overall, right? Should I just add something like the |
https://index.ros.org/doc/ros2/Concepts/About-Quality-of-Service-Settings/ see the charts for compatible QoS profiles. You could add that param, yes. |
I read through that before and it does say that the publisher is responsible for persisting samples when set to transient local. If that was true though then this would not be an issue which is why I am a bit confused. Do only transient local subscribers ask for the the persisted message and therefore requiring both the subscriber and publisher to be transient local in order to get the latching effect? |
Look at the charts for the QoS profiles that are compatible. Not all publishers profiles are valid for all subscribers profiles. |
It says they are compatible
But doesn't say exactly what the behavior should be. |
It seems like then its working and maybe we just need to set another timeout if its not parameterized for your uses. |
I made the PR which basically tells me that the "latching" behavior does require both the publisher and subscriber to be transient local. |
@SteveMacenski
Operating System:
ROS2 Version:
Version or commit hash:
|
Update
|
@Mohit-Ak Did you manage to solve the problem? I still get the same problem now. I tried to increase the timeout time but it doesn't work as well. |
It is still frequent in smaller systems but try using a beast PC configuration. Also, play around with image magick libraries. I actually found a workaround of taking a screenshot of the map from RVIZ2 and doing some math on it to convert it into the required PGM using GIMP. |
Bug report
Required Info:
Steps to reproduce issue
Running slam toolbox on the commit at this PR SteveMacenski/slam_toolbox#223 and attempting to save the map through the cli by calling the /save_map service. To verify /map was being published to correctly I ran a ros2 topic hz which settled out with around the following output.
Given a call to the /save_map service I found that saving the map only succeeds about 1/3rd of the time, the rest of the time it outputs:
Expected behavior
The timeout is easily configurable / longer when using slam_toolbox than the current 2 seconds or proper QoS configuration sets up the communications to be transient local (so they act like latching in ROS1) so that the last message is immediately sent over given that is hasn't expired past its deadline.
Additional Notes
I am not yet completely familiar with how different QoS combinations for the pub/subs behave but I would guess the best solution is to get the QoS configured so that it receives the last published map within a given time period. I know the slam_toolbox /map has the configuration of reliable and transient local but the map_saver /map subscription looks to be reliable and volatile (system defaults). Does that mean the map saver will not get the transient local behavior when subscribed to the /map topic? Potentially related to this, I noticed that after restarting slam_toolbox while keeping the same Rviz instance open it would not receive any new maps while it had the QoS profile of reliable and transient local. In order to get RViz to subscribe to the new slam_toolbox instance's /map topic correctly, I had to change the QoS on it to best effort and transient local.
The text was updated successfully, but these errors were encountered: