Commit Graph

1156 Commits (dddb2f110252b6243a007130279461e35f29eff8)

Author SHA1 Message Date
Kevin Daun bb380ae947 Make kSqrtTwoPi const. (#1259) 2018-07-11 13:02:11 +02:00
Wolfgang Hess 88850ec2d7 Add .clang-format file. (#1249)
This adds a .clang-format file, so that git clang-format uses
Google style without the need to remember the commandline flag.

Moreover, this ensures correct formatting if the Cartographer
code is in a subtree of a repo.
2018-07-11 12:28:53 +02:00
Christoph Schütte 35abfccc6b Introduce client_id in cartographer grpc (#1241) 2018-07-10 20:41:00 +02:00
Susanne Pielawa 120c216c47 Measure accumulation_duration from last accumulation stop (#1251)
[PR 946](https://github.com/googlecartographer/cartographer/pull/946) introduced metrics in local trajectory builder. The accumulation duration was measured from accumulation_start to accumulation_stop. 

This PR changes this to measure the entire time elapsed between two accumulations (i.e. from accumulation_stop to the next accumulation_stop). 

Mostly the two measurements result in roughly the same, with the new way measuring slightly larger durations, as expected. But occasionally the measurements differ significantly. This is probably due to a lock contention somewhere outside of what was measured previously. Since we are interested in real time metrics, we need to track the entire time passed.
2018-07-10 16:24:57 +02:00
Susanne Pielawa a04b6cbc48 use common::ToSeconds in local_trajectory_builder and rate_timer.h (#1248)
use the new overload of ToSeconds (introduced in 
[PR1244](https://github.com/googlecartographer/cartographer/pull/1244/files)) in local_trajectory_builder.
2018-07-10 13:14:54 +02:00
Wolfgang Hess afa3ba5336 Fix the name of real_time_correlative metric in 2D. (#1247)
This was called fast_correlative before, but the metric was about
the score of the real-time correlative scan matcher in local SLAM.
2018-07-10 10:53:23 +02:00
Martin Schwörer 1fed98727d extracted ScanMatch method in LocalTrajectoryBuilder3D (#1245)
Extracted the ScanMatch method in the LocalTrajectoryBuilder3D.

This is a short refactoring. With that change, the code of LocalTrajectoryBuilder3D resembles LocalTrajectoryBuilder2D more. (see LocalTrajectoryBuilder2D::ScanMatch)
2018-07-10 10:19:25 +02:00
Susanne Pielawa 3ee7c6710f Adding metrics (#1240)
to measure fraction of sensor time that is taken up by voxel filter, scan matcher, and inserting into submap.
2018-07-09 21:20:58 +02:00
Martin Schwörer aa3ac7e837 Removed redundant 2d voxel filtering (#1243)
Removed redundant adaptive voxel fitering in trajectory builder 2d.

Adaptive voxel filtering of the lidar point cloud was performed in InsertIntoSubmap and ScanMatch. Both methods are called from AddAccumulatedRangeData. Now, adaptive voxel filtering is done only once in AddAccumulatedRangeData and the filtered point cloud is then forwarded to InsertIntoSubmap and ScanMatch.
2018-07-09 20:45:55 +02:00
Arno Fleck 9e54a981c6 Introduce common::ToSeconds for std::chrono::steady_clock::duration. (#1244)
Introduce a new overload of ToSeconds for std::chrono::steady_clock and use it for the work queue delay metric.
2018-07-09 20:13:17 +02:00
Michael Grupp eff103f663 Ignore initial poses on gRPC server side. (#1234)
Fixes a crash if a client initializes with an initial pose inside a frozen map
that isn't known to the server.
2018-07-09 15:03:40 +02:00
Kevin Daun 7dfe404278 Add TSDF RangeDataInserter (#1236)
Adds TSDF RangeDataInserter, tests and integrates the configuration files.
2018-07-09 13:46:46 +02:00
Juraj Oršulić 3bf9ba0a69 Ensure async_grpc is find_packaged() for Cartographer users (#1105) 2018-07-09 13:11:51 +02:00
Arno Fleck 8b2c755a13 Remove "_internal" from the metric family names. (#1237)
As discussed and requested in #1218, this PR removes the substring "_internal" from all the metric family names.
2018-07-07 00:20:20 +02:00
Martin Schwörer 044f53735c removed unused member matching_submap_index (ActiveSubmaps3D,ActiveSubmaps2D) (#1238)
Removed the unused member matching_submap_index of ActiveSubmaps3D and ActiveSubmaps2D.
Adjusted the test accordingly.
2018-07-06 11:48:25 +02:00
Martin Schwörer 902459e95c fixed casting of high_resolution_max_range (SubmapsOptions3D) (#1239)
Fixed unintentional casting of high_resolution_max_range from double to int, to float

In SubmapsOptions3D the parameter "high_resolution_max_range" is defined as double. In the code it gets casted to int when calling Submap3D::InsertRangeData and to float when calling FilterRangeDataByMaxRange.
2018-07-06 11:02:38 +02:00
Arno Fleck 627ebb39b9 Add function to get the work queue delay from PoseGraph. (#1218) 2018-07-06 09:40:44 +02:00
Christoph Schütte bad8c96bc6
Add token_file_path parameter and enable auth (#1235) 2018-07-05 13:14:11 +02:00
Kevin Daun cc9fc75757 Separate raycast and grid update (#1216)
Separate raycast and grid update logic.
Rename raycast to ray_to_pixel_mask.
2018-07-03 19:51:39 +02:00
Wolfgang Hess d2f3c1ea31 Fix the local SLAM latency metric. (#1231)
Before, the metric was in integer seconds and since measurements
are usually quite small, it was mostly outputting 0.
2018-07-03 16:35:58 +02:00
Alexander Belyaev ddce76d9fb Make old pbstreams compatible with the new pure_localization_trimmer options. (#1230) 2018-07-03 14:27:38 +02:00
Alexander Belyaev ffb5034390 Mark TSDF::ToProto with override. (#1227) 2018-07-03 12:46:30 +02:00
Alexander Belyaev 0a253d24f6 Remove unnecessary std::move. (#1228) 2018-07-03 10:56:33 +02:00
Alexander Belyaev 3540996e91
Add options to (not)collate fixed-frame/landmarks data. (#1224) 2018-07-02 21:49:00 +02:00
Alexander Reimann 0981620d8f Add max_submaps_with_pure_localization parameter (#1141)
Adds a parameter for the currently hard coded `kSubmapsToKeep` in `pure_localization` mode.

The new parameter `max_submaps_with_pure_localization` allows to specify the history size of submaps in `pure_localization` mode.

Closes #1116
2018-07-02 20:32:23 +02:00
gaschler d5ed8a9ded Add further tests for MapById (#1226)
Adds tests for MapById for the cases: empty MapById, invalid trajectory_id, deleting all entries for a trajectory.
2018-07-02 19:37:44 +02:00
gaschler 7839f3f216 Avoid uninitialized NodeId, SubmapId (#1223)
Previously, NodeId and SubmapId could be (partially) uninitialized,
for instance like this:

```
NodeId node_id;
SubmapId submap{0}; // uninitialized submap_index
```

This introduces constructors to prevent this.
2018-07-02 14:51:48 +02:00
Arno Fleck 7fcc4576a8 Add use_online_imu_extrinsics_in_3d parameter and set it to true by default. (#1217)
Add the parameter `OptimizationProblemOptions.use_online_imu_extrinsincs_in_3d`. Set it to true by default to not change existing behavior.

Using online IMU extrinsics is not always desirable, and particularly during localization, we have determined that it is preferable to turn this feature off.
2018-07-02 13:40:21 +02:00
gaschler 22ea782fad
Handle invalid requests. (#1222)
FIXES=#1221
2018-07-02 13:05:28 +02:00
Arno Fleck eed07d2f80 Extract ground truth generation into a library. (#1215)
Extract ground truth generation from `autogenerate_ground_truth_main.cc` into a library function in `ground_truth.h/cc`, so it can be reused outside that binary.

Tested with Cartographer ROS.
`cartographer_autogenerate_ground_truth -pose_graph_filename=/home/afleck/Downloads/b3-2016-04-05-15-51-36.bag.pbstream -output_filename=/home/afleck/Downloads/ground_truth.pb`
still runs as before.
2018-06-29 12:48:29 +02:00
Kevin Daun b4594bcdbd Add Normal Estimation (#1213)
Adds Normal Estimation needed for TSDF RangeDataInserter.
2018-06-26 14:22:16 +02:00
Sebastian Klose 2bd987ffb4 Fix serialization for deleted trajectories. (#1214)
* update TrajectoryState of trajectories that got 'trimmed' away to be
 deleted in the PureLocalizationTrimmer
 * update serialization to only serialize 'undeleted' trajectories and
 corresponding options.

#1111
2018-06-26 13:36:42 +02:00
Kevin Daun 15ecb88a92 Add TSDF2D Grid (#1209)
- Adds TSDF2D Grid
- Adds tests for TSDF2D Grid
- Introduces Grid2D::GrowLimits(...) for multiple grids to reduce code duplication between TSDF2D and Grid2D
2018-06-25 11:40:12 +02:00
Alexander Belyaev b5279532ce Add a link to the new open house slides. (#1210) 2018-06-21 16:39:51 +02:00
gaschler 41b642d92b check trajectory remapping in test (#1208) 2018-06-20 13:55:09 +02:00
gaschler 5e96bfaeea
Endpoints for GetTrajectoryStates (#1206)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-20 12:30:56 +02:00
gaschler 984553ee15 LoadState(FromFile) endpoints (#1203)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-19 18:01:39 +02:00
gaschler c249a9901d Endpoints for DeleteTrajectory (#1207)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-19 16:59:17 +02:00
Kevin Daun d36cbc39b8 Truncated Signed Distance Value Converter (#1204)
Introduces conversions between float and uint16 representations for truncated signed distance values and weights.
2018-06-19 16:19:46 +02:00
gaschler 4c5e6dc0fb Remove ChannelArguments (#1198)
This was introduced by #1179 but seems unused.
2018-06-19 14:16:30 +02:00
gaschler 54041d76eb DeleteTrajectory (#1205)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-19 13:41:55 +02:00
Kevin Daun ecaa95f3b0 Move occupied space cost function to .cc (#1200) 2018-06-19 12:31:11 +02:00
gaschler a9045fa375
Introduce TrajectoryState (#1201)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-19 11:48:09 +02:00
gaschler 5d26742bfa
LoadStateFromFile (#1202)
[RFC=0023](https://github.com/googlecartographer/rfcs/blob/master/text/0023-delete-load.md)
2018-06-19 11:00:41 +02:00
Christoph Schütte 42c1288e66 Add LoadState() test case to ClientServerTest. (#1189) 2018-06-15 14:31:18 +02:00
gaschler 849f2a66ac clarify comment (#1196) 2018-06-15 13:06:02 +02:00
Wolfgang Hess 0e25fafc47 Fixes display of IMU correction angle. (#1193)
When the 'imu_calibration' quaternion has a negative real part,
correction angles above 180 degrees were displayed. This fixes
the issue.
2018-06-12 17:10:19 +02:00
gaschler de22b9c311 Rename to TrimSubmap (#1192)
Trimmable::MarkSubmapAsTrimmed was incorrectly named and commented.
It really trims the submap.
2018-06-12 16:01:14 +02:00
gaschler f79c6afee7 Rename namespace to testing (#1191)
We commonly use the namespace testing for test helpers,
so rename similar namespaces to "testing" for consistency.
2018-06-12 15:18:20 +02:00
gaschler 29f6ea9ea3 Test LoadState and pure localization (#1190) 2018-06-12 12:49:07 +02:00