This PR introduces a new option that specifies the number of seconds
after which global matcher searches are performed if no recent global
constraints have been found between the submap's and the node's
trajectory.
This changes submap_visualization.proto that multiple textures can be provided.
As of now, the first texture is generated from the high resolution
grid, which is the same as before.
The second texture is generated from the low resolution grid.
Updating the connectivity needs the data of nodes for which
constraints were added, so we postpone trimming to after the
connectivity update.
Also makes sure the mutex is held as necessary.
This PR fixes a crash when cartographer is run in localization mode due
to the map trajectory not having been properly added to the
ConnectedComponents.
* Introduce TrajectoryConnectivityState.
This class will be used to track the connectivity state (including the
last connection time) between pairs of trajectories.
* Remove connected_components_ from SPG.
This PR removes connected_components_ from the SparsePoseGraph. Since
the connectivity structure is no longer updated by the
ConstraintBuilders it is no longer necessary for SPG to keep a copy of
the connected components for data consistency.
Remove reverse_connected_components from SparsePoseGraphs and update
TrajectoryConnectivity to return "connected" for the reflexive case even
if trajectories are unknown.
This modifies the ConstraintBuilder interface so that Maybe*Constraint
is not responsible anymore for updating the TrajectoryConnectivity
member of SparsePoseGraph and moves this responsibility into the
WhenDone callback.
This changes the trajectory nodes to contain the complete 'pose'
including 'tracking_to_tracking_2d' applied already. Similar for
the 'zbar_ij' as it is returned by 'constraints()'. This allows
2D and 3D to be handled in the same way.
This PR unifies GlobalTrajectoryBuilder across 2D and 3D by templating
it with the LocalTrajectoryBuilder and the SparsePoseGraph. It thus
includes small changes to interfaces in LocalTrajectoryBuilder and
SparsePoseGraph.
This reduces the amount of code that needs to be written when a
new type of sensor data is introduced by a tiny bit.
Rangefinder data is not yet following this pattern.