Open wohe opened 6 years ago
Maybe this deserves an rfc, but here are some ideas:
A quick fix would be simply reducing the trajectory publishing period. @wohe what do you think?
@wohe ping, would love to have some discussion on this. Do you want me to write an RFC?
Since this ideally would just improve performance and not introduce new concepts I'm not sure it needs an RFC. It definitely needs one or more PRs.
Adding a new plugin is possible but might not be necessary, given that the RViz markers to my understanding already allow sending updates.
I see two easy ways to improve performance without adding an RViz plugin:
Is signalling that optimization changed the trajectory a new concept for libcartographer? AFAIK we are not signalling this anywhere to the library user (right now they would have to compare older trajectory node poses by themselves to see if they changed).
E.g. we could introduce a GlobalSlamResult
callback, similar how we have a callback for LocalSlamResult
.
@wohe do you plan to work on this?
One thing that is also affecting performance are high publish frequencies. The trajectory marker period is currently set to 30e-3
, which is probably not needed. https://github.com/cartographer-project/cartographer_ros/blob/6296d41cd5a2a82bcb9d23e628ce02f0435c9006/cartographer_ros/configuration_files/backpack_3d.lua#L38
@MichaelGrupp I would not say I have a plan to work on this. Assigned it to myself so it is not forgotten. Not sure whether/when I will find the time, though.
When running the 3D demo at https://google-cartographer-ros.readthedocs.io/en/latest/#running-the-demos, performance is much worse as long as trajectory visualization is enabled.
On my machine wall clock time is 1321.99 s with the trajectory shown, 1009.06 s when it is hidden. Command line:
Also bandwidth of
/trajectory_node_list
is huge, 17 MB/s at the end, compared to about 3 MB/s for/scan_matched_points2
.