Closed JoaoCostaIFG closed 1 year ago
Important note: In order for this to work, we had to manually set the correct policy in Rviz too. For the map example, it is a dropdown under map settings. The selected policy should be changed toTRANSCIENT LOCAL
.
This fix seems fine. In a production context I'd be a little worried about massive debug messages hanging around, but for the simulator I think it's acceptable.
A problem showed up during the migration of the
turtlebot_flatland
project to Ros2: the World layer wasn't showing up.Apparently, in Ros1 the last x published messages would be saved for late-joining subscribers (not sure about the exact mechanic). In Ros2, this is a configurable setting managed with the new QoS settings, more specifically, the Durability setting.
The problem is caused by the
flatland_server
publishing the layers' markers too fast for rviz to catch them.The small change in this commit (setting the durability QoS policy) fixes the problem, without resorting to always re-publishing layer information (currently it only publishes when there's a change).