In the current implementation, as soon as one trajectory is frozen it is not possible to use new landmarks anymore.
In this PR a suggest a change, that allows introducing new landmarks also in the presence of a frozen trajectory. This is done with the following steps:
- Store set of frozen landmarks
- Landmarks that are loaded from a pbstream, with the flag ` load_frozen_state=true` are inserted into the set of frozen landmarks via `setLandmarkPose` function
- frozen landmarks are set constant in the optimization problem
- new landmarks can be introduced and will be optimized in the optimization problem
Motivated by and closes#1470
- use `pose_queue_duration_` instead of hardcoded "0.001"
(cartographer_ros sets this to 0.001, probably that's why this
wasn't noticed)
- queue_delta is in seconds, log message said milliseconds
The introduced changes are not compatible with CMake < 3.6 if the
FindProtobuf.cmake bundled with CMake is used.
Since our minimum required version is 3.2, I consider this to be a bug.
- camel-case variables names weren't used before 3.6
(upper-case is lowered in CMake > 3.6 for backwards compatibility)
- the `CONFIG` search for the Windows build logs a warning even if the
`REQUIRED` search succeeds, should be quiet
Protobuf 3.5 would require a Bazel flag
bazel build --incompatible_package_name_is_a_function=false
for Bazel 0.21 because its bazel syntax is old.
Rather than building with this flag, let's just update
the protobuf version.
Also, fix lint.
Previously, two config values were spelled "bandwith".
The assumption is that these values are not used in other
repositories so the rename is harmless.
This PR makes libcartographer build on Windows (including tests). Abseil was bumped to avoid a MSVC compiler bug.
I have observed two tests failing:
`MapBuilderTestByGridType/MapBuilderTestByGridType.GlobalSlam2D/1` and `MapBuilderTestByGridType/MapBuilderTestByGridType.LocalizationOnFrozenTrajectory2D/1`.
Since the constraint builder metrics are ever-increasing, it makes sense
to add gauges that monitor the current counts of constraints in the pose
graph. The main advantages are that they also take trimming into account
and distinguish constraints within or across trajectories.
Got linker error for Abseil in the build env due to imprecise library order.
Worked fine on the dev machine though.
Maybe helps someone.
https://pastebin.com/raw/AEKPBt1n
A common use case is that a gRPC server and a gRPC--ROS bridge node
are started at the same time.
Setting the timeout of the stub higher ensures that these can connect
even when the gRPC server starts up slowly.
This allows Cartographer to use normal Application Default Credentials
(ADC) instead of a hand-generated format.
Google-internally, we'll only use ADC going forward. At your option, I
can keep the old code for the token files around if you think it would
be generally useful. Many OSS programs follow the same approach.
The histogram of a submap is now stored in the submap (class and proto) itself. This change allows to accumulate the histogram of a submap in local SLAM by adding up the histogram of each new scan.
The main advantage is that the background thread doesn't have to loop over all `TrajectoryNode`s of a finished submap to compute the submap histogram for the `RotationalScanMatcher`. Instead this chunk of work is moved to the local SLAM thread but is split up into a few computations for each new scan. When running localization, the histogram of a submap can just be read from a map pbstream and does not have to be computed from the nodes.
In summary:
- This change improved the CPU time of offline SLAM by ~7%.
- Increases the readability of the code and performance of the background thread. (see `PoseGraph3D::ComputeConstraint`)
- No negative performance impacts on accuracy or finding loop-closures
However:
- With this change to the submap proto, old maps (pbstreams) are no longer supported and need to be re-created by running offline slam
- check and recover channel connection in `TryRecovery()`
- fixes an infinite loop in the unlimited retry strategy by adding `grpc::UNAVAILABLE`,
`DEADLINE_EXCEEDED` to the unrecoverable status codes.
- server restart leads to `UNAVAILABLE`
- connection loss leads to `DEADLINE_EXCEEDED`
- fixes repeated recovery attempts