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
This makes the map builder backwards compatible to the current map pbstream (version 1). The PR prepares for #1277, where pbstream version 2 will be introduced. Backwards compatibility was discussed in #1277.
When a map with pbstream version 1 is loaded, a rotational scan matcher histogram is generated for each submap using the histograms of all nodes that were inserted to the submap during local SLAM. Once this backwards compatibility is in place, I would like to introduce the new format with #1277.
We were passing the gravity estimate of the current tracking frame
to intialize the local submap pose. Fixing this improves the alignment
of submaps in the global (and approx. gravity-aligned) frame.
- `--force_pic` speeds up the build ~1.5x on my machine.
- Marking internal_client_server_test as flaky avoids misleading
failures in some environments.
- Updating rules_boost avoids spamming stdout with configure script
messages.
* Move tools/bazel.rc to prepare for bazel 0.17
Bazel 0.17 will no longer import the legacy "tools/bazel.rc" config
file. This change ensures compatibility with the new versions.
For users on bazel 0.16 and earlier who have a ~/.bazelrc, this change
will cause bazel to ignore their ~/.bazelrc and load this one instead.
Hopefully this won't break anyone. (famous last words)
The uplink server only receives the grid content of a submap after
that submap is finished for efficiency. Therefore, constraint
searches against that submap need to be skipped.
Also add checks to avoid this in the future.
FIXES=#1360
Makes `common::Mutex` an alias for `absl::Mutex` and replaces the logic inside `common::MutexLocker` with `absl::MutexLock`.
A future PR can then remove these classes entirely and replace references to it across the Cartographer code base with the Abseil classes directly.
This implements a frequently used function (two times in cartographer_ros).
Also, it corrects a wrong repeated proto field access,
so we can fix cartographer_ros/issues/944.
Adds a boolean argument to MapBuilderInterface::SerializeState() to indicate whether the caller wants to include unfinished submaps in the serialized state.
For cartographer_grpc this argument will be set to false since unfinished submaps do not have a Grid which would lead to a crash in the Submap::ToProto() function.
@pifon2a I've noticed the `BUILD_COMMAND` is broken. You're setting `ABSL_BUILD_COMMAND`, but using `ABSEIL_BUILD_COMMAND` (effectively empty). Somehow this doesn't confuse newer CMakes, but the one you install on Trusty gets confused and interprets this as a no-op build step. This causes the indigo pipeline in cartographer_ros to fail.
Use the cross-platform build command instead:
https://cmake.org/cmake/help/latest/module/ExternalProject.html#obtaining-project-properties (just above the linked paragraph)