Publish point-cloud map more frequently and trigger by NDT
Description
The point-cloud map is published once a second in the /localization/viz_ndt_map
topic to allow display in rviz
. The map is static in the map frame but if the target frame is e.g. Baselink
in rviz
, then transforms are needed to display it correctly. At a rate of 1 Hz, the map is updated at a much lower rate than e.g. lidar produced at 10 Hz, leading to sudden big jumps and a lagging display.
The bandwidth is
ros2 topic bw /localization/viz_ndt_map
average: 1.36MB/s
mean: 1.31MB min: 1.31MB max: 1.31MB window: 13
Possible solutions
The point of this ticket is to discuss which of these makes the most sense for the demo.
Increase publishing rate [hack]
In the map publisher, create a subscription to /localization/ndt_pose
and publish the map each time.
Could we afford to increase from 1 Hz to 10 Hz? What would be the effect on the overall system?
Make RViz smarter
Since only transforms change over time, it would be great if RViz just stored the points once, and redisplays them if a new transform is available after NDT is done processing the current lidar scan. Not sure if this would require hacking Rviz, or if it supports such an operation out of the box @mitsudome-r
base_link
fixed frame, or do not require an up-to-date map visualization
Do not use the Maybe a janky map visualization is enough, or maybe we always set the fixed frame to map
, in which case see #647 (closed).
Expected behavior
The display of the map doesn't lag.
Definition of Done
-
In RViz, the point-cloud map always reflects the current localization information.