Commit Graph

838 Commits (d7b4656741bbf99f922c5ea7dddf15a1a74aec0f)

Author SHA1 Message Date
Kevin Daun d7b4656741 Initialize RangeData in TSDF tests. (#1520)
* Explicitly initialize RangeData.

* Use auto to remove redundancy.

* Ran clang-format.
2019-02-13 15:40:37 +01:00
Michael Grupp 2adeb1f3be Add gauge metrics for submaps in pose graph. (#1511)
Adds a metric family that monitors:

- the number of submaps in frozen trajectories
- the number of submaps in active trajectories
- the number of deleted/trimmed submaps
2019-02-05 17:15:45 +01:00
Wolfgang Hess 07b92072a0 Add serialization for TimestampedTransform. (#1495) 2019-01-18 17:10:43 +01:00
Jonathan Huber fd67975761 Allow introduction of new landmarks into loaded (frozen) map (#1475)
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
2019-01-17 16:57:30 +01:00
Alex Millane eec7af0a4f Fix TSD converter include location (#1500)
* Moved value converter include out of internal folder.

* Ran clang-format.
2019-01-16 10:04:57 +01:00
Wolfgang Hess e816ce01b5 Implement PixelDataMatrix. (#1494)
Eigen::Matrix (or Eigen::Array) with custom scalar types is
not intended for arbitrary structs:
https://eigen.tuxfamily.org/dox/TopicCustomizing_CustomScalar.html

This implements a simple class as a replacement.
2019-01-08 17:01:44 +01:00
Michael Grupp 53a1f6c2f7 Small fixes for PoseExtrapolator::UpdateVelocitiesFromPoses() (#1492)
- 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
2019-01-03 10:03:48 +01:00
Andre Gaschler 752fb9507f Use efficient string concatenation (#1488)
std::string::operator+ is very inefficient
2019-01-02 13:57:02 +01:00
Andre Gaschler 5182dd1bf9
Correct spelling to bandwidth (#1490)
Previously, two config values were spelled "bandwith".
The assumption is that these values are not used in other
repositories so the rename is harmless.
2019-01-02 13:12:26 +01:00
Christoph Schütte f73758e3a5
Upgrade all dependencies to new Starlark syntax. (#1483)
The update of the prometheus library requires some fixes in the test.
2018-12-18 14:19:29 +01:00
Juraj Oršulić c370d221d0 Windows build fixes & Azure CI (#1463)
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`.
2018-12-16 17:04:23 +01:00
Michael Grupp 2abe1c72a6 Configurable miss_per_hit_limit in outlier removing processor. (#1476)
Was hardcoded to 3 before, but it makes sense to make this a parameter.
2018-12-16 00:06:09 +01:00
Michael Grupp e0b2196cec Add gauge metrics for inter-submap constraints. (#1465)
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.
2018-11-22 10:25:43 +01:00
gaschler f806ac5de0 Add missing include to TaskTest (#1460) 2018-11-12 04:30:24 -08:00
amikholap b7fb299d1a Better Abseil library order (#1458)
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
2018-11-06 17:50:19 +01:00
gaschler f060815a7f
Fix locking while modifying counter (#1454)
Clang with thread safety does not compile because
num_nodes_since_last_loop_closure_
is modified without holding a mutex.
This fixes it.
2018-10-25 15:30:06 +02:00
gaschler 5253186cbe Fix virtual destructors (#1453)
This is necessary because otherwise derived classes
are potentially deleted incompletely, using the destructor
of the interface.
2018-10-24 18:45:58 +02:00
gaschler ceddabbcbb Improve portability (#1452)
This change improves the portability of Cartographer.
2018-10-24 18:04:55 +02:00
Alexander Belyaev 1905b6bb59 Inline calls to Trim() in id_test. (#1451) 2018-10-24 16:38:41 +02:00
Juraj Oršulić 6ad7b87b67 Inline a couple of 2D grid cell access functions (#1420)
Noticed ToFlatIndex during profiling. Inline a couple of other short functions as well.
2018-10-18 15:21:56 +02:00
Alexander Belyaev ccc25862bf
[GenericPoseGraph] Add a helper func to add PoseGraphData. (#1443) 2018-10-10 13:38:58 +02:00
Kevin Daun de4886ea4e Read missing option fix_z_in_3d in OptimizationProblemOptions. (#1440) 2018-10-10 11:33:22 +02:00
Alexander Belyaev 5e11365749
[ABSL] Use flat_hash_set instead of unordered_set. (#1442) 2018-10-08 12:43:17 +02:00
Alexander Belyaev bdb6f2db4a
[ABSL] Use flat_hash_map instead of unordered_map. (#1439) 2018-10-08 10:47:28 +02:00
Alexander Belyaev 8285673abb [GenericPoseGraph] Add 'group_id' field to NodeId. (#1438) 2018-10-02 17:07:03 +02:00
Alexander Belyaev fa35a21493 [GenericPoseGraph]: How could I forget it?! Facepalm. (#1437) 2018-10-02 12:10:10 +02:00
Alexander Belyaev 607de03d6b
[GenericPoseGraph] Proto for pose graph solver config. (#1436) 2018-10-01 16:16:44 +02:00
Alexander Belyaev 64062ee720 [GenericPoseGraph] Rename class Optimizer -> Solver. (#1435) 2018-10-01 13:48:52 +02:00
Michael Grupp ba859a6ed5 Add WriteStateToFileResponse. (#1428)
Changes the public map builder API, but is required to not break the ROS API.
See also https://github.com/googlecartographer/cartographer_ros/pull/1014 and #1422
2018-09-15 00:03:30 +02:00
gaschler 2e8df42f88 Increase gRPC timeout for AddTrajectory (#1426)
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.
2018-09-14 10:32:47 +02:00
gaschler 601fc3c7d0 Increase gRPC message size (#1425)
ISSUE=#1422
2018-09-13 15:35:59 +02:00
Christoph Schütte f995744c63 Implement MapBuilderService.WriteStateToFile() (#1424) 2018-09-13 14:53:51 +02:00
Michael Grupp a21ecf9b99 Add load_frozen_state also to LoadStateFromFile gRPC requests. (#1423) 2018-09-13 10:13:16 +02:00
Steve Wolter d6772cf274 Replace token file with Google auth in MapBuilder. (#1417)
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.
2018-09-12 09:14:58 +02:00
Michael Grupp 1d20cef33e Check output stream in pbstream migration tool. (#1416)
Avoids failing silently, e.g. when file permissions are lacking.
2018-09-10 14:55:33 +02:00
gaschler 1ddfd9c6d3
Fix LocalTrajectoryUploader recovery (#1415)
Make sure no data is uploaded to an interrupted uplink trajectory,
but create a new uplink trajectory to upload to that one.
2018-09-10 12:03:10 +02:00
Michael Grupp a351a8e3b4 Include all trajectory nodes when serializing without unfinished submaps. (#1410) 2018-09-05 16:59:16 +02:00
gaschler e318751329 Graceful LocalTrajectoryUploader::AddTrajectory (#1409)
FIXES=#1407
2018-09-05 10:38:48 +02:00
Martin Schwörer 3b511aa1ba Store histogram in submap (#1277)
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
2018-09-04 12:02:57 +02:00
Michael Grupp b1dfa30ee3 Recover gRPC channel from connection dropouts. (#1406)
- 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
2018-09-04 11:17:51 +02:00
Christoph Schütte 153952ddf0 Move OverlappingSubmapTrimmerOptions to PoseGraphOptions (#1408) 2018-09-04 10:12:19 +02:00
Martin Schwörer a4ff055d8f Store histogram in submaps: prepare for backward compatiblity (#1405)
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.
2018-09-03 17:33:34 +02:00
Michael Grupp 4c2104473c Support gRPC requests for loading unfrozen states. (#1379) 2018-08-29 10:55:55 +02:00
danielsievers 81b75da9f4 Fix gravity alignment of submaps in local SLAM (#1398)
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.
2018-08-24 12:28:31 +02:00
Kevin Daun 1c00e8a970 Add TSDF support for RealTimeCorrelativeScanMatcher. (#1389)
Continues https://github.com/googlecartographer/cartographer/pull/1376.
[RFC=0019](https://github.com/googlecartographer/rfcs/blob/master/text/0019-probability-grid-and-submap2d-restructuring.md)
2018-08-16 14:04:09 +02:00
Alexander Belyaev 5261c90c34 [GenericPoseGraph] Add parameterization. (#1385) 2018-08-14 14:37:27 +02:00
Rodrigo Queiro 05f2c6caed Various Bazel improvements (#1390)
- `--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.
2018-08-14 12:14:06 +02:00
gaschler 213882a9b3 Rename submap finished flags (#1384) 2018-08-13 10:38:33 +02:00
gaschler 811f2e8e8f Graceful LocalTrajectoryUploader (#1381)
* Graceful LocalTrajectoryUploader

FIXES=#1370
2018-08-12 13:46:13 +02:00
Alexander Belyaev fe59278286
Fix indentation in repositories.bzl and header in point_batch.h. (#1386) 2018-08-11 21:05:00 +02:00