Commit Graph

1158 Commits (fdcf0eb0df72b2eb7ae30c08c873b5ab2b855239)

Author SHA1 Message Date
Wolfgang Hess fdcf0eb0df
Move PoseGraph::GetSubmapData to the PoseGraphInterface. (#1783)
Related to #1413.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-23 11:02:39 +01:00
Wolfgang Hess 605838855f
Removed unused code. (#1781)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-18 16:06:53 +01:00
Wolfgang Hess dddb2f1102
Improve CONTRIBUTING.md and the pull request template. (#1780)
We refer to CONTRIBUTING.md from the PR template now
which is now the single place containing all information.

Reference to the bot is removed since it is currently
not being used.

We point contributors to using clang-format.

We link to PR and code review best practices now.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-17 10:56:38 +01:00
Wolfgang Hess b1ce24d3f8
Clean up use of MapBuilderInterface. (#1776)
Moves options next to the interface like we do for other interfaces.
Adds a factory function to remove the need for direct use of MapBuilder.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-06 11:31:49 +01:00
Wolfgang Hess 38dcf65d8f
Clean up the public headers in `common`. (#1775)
In common, BlockingQueue and RateTimer are not used
in any public API and are made internal.

`common/utils.h` is unused code and removed.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-04 16:35:02 +01:00
Michael Grupp 6715afe70c
Optional motion-filter for adding odometry data to the pose graph. (#1757)
This introduces an option to control the amount of odometry data that
enters the pose graph by motion-filtering it. This is very useful to
bound memory when standing still for longer periods of time.

If the new option is not configured, all odometry data goes unfiltered
into the pose graph as usual.

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-11-04 14:55:13 +01:00
Wolfgang Hess 4d90a29877
Make unusable public headers internal. (#1772)
pose_graph_data.h and io test_helpers.h are currently public,
i.e. get installed, but cannot possibly be used since they refer
to internal headers.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-11-04 12:16:51 +01:00
Wolfgang Hess e7f98f3e09
Add intensities to LocalTrajectoryBuilder3D. (#1766)
Disabled by default.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-26 14:47:07 +01:00
Chris Lalancette 1f69b83e8a
Minor fixes for Cartographer from ROS (#1705)
* restrict boost dependencies to the ones used
* Also add googletest as a build dependency.
* Set GMOCK_INCLUDE_DIRS when doing src fallback.

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Co-authored-by: Mikael Arguedas <mikael.arguedas@gmail.com>
2020-10-23 15:38:58 +02:00
Wolfgang Hess a9ad813c26
Use intensities in `Submap3D` and `RangeDataInserter3D`. (#1765)
`Submap3D` now also stores a pointer to `IntensityHybridGrid`.
Adapted `RangeDataInserter3D` to also insert intensities.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-22 09:24:47 +02:00
Christian Clauss aeb8a10c01
Undefined name: preceding_comments -> preceding_comments.message. (#1720)
Signed-off-by: Christian Clauss <cclauss@me.com>
2020-10-19 14:38:41 +02:00
Wolfgang Hess d3473fca4a
Keep intensities in the voxel filter. (#1764)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-19 12:14:50 +02:00
Wolfgang Hess 952f59d499
Take intensities into account in PointCloud transforms and filters. (#1763)
Adds a new method to sensor::PointCloud, copy_if, which copies all
points satisfying a provided condition, together with the associated
intensities (if they exist).

Adapts transforms/filters to use this new method.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-16 10:52:28 +02:00
Wolfgang Hess 81d34ef185
Add intensity cost function to the Ceres scan matcher. (#1761)
Not yet used.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-14 18:04:12 +02:00
Wolfgang Hess cad3378929
Add a cost function to take intensities into account. (#1760)
Adds (optional) intensities to sensor::PointCloud and
uses it in a cost function. Not yet in use.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-14 11:36:47 +02:00
Wolfgang Hess ee98a92845
Add new sensor::PointCloud interface. (#1759)
These changes are necessary in order to later add intensities.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-13 15:57:45 +02:00
Wolfgang Hess 8ac967a50d
Add per-submap sampling. (#1758)
This changes which submaps we select to attempt loop closing.
The subsampling of candidates is changing from randomly sampling
submap and node pairs to per-submap sampling. This enforces a
better distribution of loop closure attempts across the submaps.
This sampling achieves a much better performance which indicates
that the approach used before was sub-optimal.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-09 09:30:27 +02:00
Wolfgang Hess ca8a866996
Constrain gravity to be positive. (#1756)
This makes sure gravity never flips the sign and becomes negative.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-07 11:48:53 +02:00
Wolfgang Hess 1b31c017c4
Use adaptive IMU weights in the PGO. (#1755)
This weights IMU based on the time between nodes in the
pose graph optimization.

When moving slowly or stopping, IMU weights are reduced.
This improves quality in these cases. The parameters are
changed to approximately get the same behavior while
moving as before for the examples.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-10-07 10:49:08 +02:00
Michael Grupp af00de3b3f
Don't add IMU data to 2D optimization problem. (#1754)
It was constantly added regardless of motion filtering. Since it's not
used it can be just ignored. The method still needs to be there to
satisfy the interface.

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-10-06 19:45:03 +02:00
Michael Grupp 9675d63926
Delete submap scan matchers that are unconstrained after trimming. (#1745)
This improves the memory issue in pure localization mode as
mentioned in issue #1737.

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-10-06 15:41:04 +02:00
Wolfgang Hess c84da8ec0f
Random voxel filtering. (#1753)
This leads to slightly slower performance but better quality.
Also replaces the VoxelFilter class by free standing functions.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-09-30 18:32:39 +02:00
Wolfgang Hess 1ad6398bce
Depend on libceres-dev in package.xml for ROS. (#1750)
This changes cartographer_ros to no longer build
Ceres and instead uses libceres-dev for which a
suitable version is provided by ROS for Kinetic.

Related to #1705.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-09-24 11:32:40 +02:00
Wolfgang Hess c5416068dd
Move proto files out of 2d/3d directories. (#1749)
This is to make it possible to use the proto definitions
from Python where the directory structure otherwise
prevents them from being imported in the usual way.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-09-14 12:17:15 +02:00
Yannic f2035b0877
Upgrade Protobuf to v3.13.0 (#1746)
This makes cartographer compatible with
`--incompatible_blacklisted_protos_requires_proto_info`.
See https://github.com/bazelbuild/bazel/issues/11694

Signed-off-by: Yannic Bonenberger <contact@yannic-bonenberger.com>
2020-09-14 11:42:59 +02:00
Sean Yen 2137b8477e
Updated the ROS on Windows feed URL (#1743)
Signed-off-by: seanyen <seanyen@microsoft.com>
2020-08-31 11:23:47 +02:00
Wolfgang Hess a28e24a37d
Remove unused and untested CropTimedPointCloud. (#1744)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-08-28 11:23:50 +02:00
Wolfgang Hess a20db758cd
Add intensity data to TimedPointCloudData. (#1742)
Adds a new field intensities to TimedPointCloudData.
RangeDataCollator now also takes intensities into account.
AddRangeData now takes a point cloud by value instead of
const reference as we would later make a copy of it anyway.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-08-28 10:12:04 +02:00
Wolfgang Hess da779339fa
Add IntensityHybridGrid. (#1739)
Adds a new structure IntensityHybridGrid, similar to HybridGrid
but which stores intensities instead of probabilities.
InterpolatedGrid is adapted to handle both types of HybridGrids.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-08-26 14:35:20 +02:00
Michael Grupp 01cb6b1d6f
Add gauge metric for current number of submap scan matchers. (#1738)
Useful for analyzing memory-related issues.
See: #1737

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-08-25 11:04:59 +02:00
Michael Grupp 98d957ae43
Remove legacy compatibility proto files. (#1736)
Not needed anymore after the recent removal of that feature, see #1709.

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-08-21 14:20:31 +02:00
Wolfgang Hess 1c8c1d144e
Remove struct TimedRangeData. (#1735)
It was only used in a unit test which can be improved
by removing it.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-08-20 11:07:25 +02:00
Michael Grupp 9b405c3dc8
Deactivate memory-critical histogram backwards compatibility. (#1710)
It's essentially leading to buffering all submaps twice, which
is a high (~2x) peak in memory consumption during deserialization.

Don't convert anymore since this affects _all_ pbstreams and not only
the (probably few) old pbstreams that require the conversion.

Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-08-17 19:34:35 +02:00
Wolfgang Hess 19a6eab07a
Change pbstream migrate to support new submap format. (#1733)
This changes the migration support to:
1. Remove migration from old files from before version 1.0.
   If this is still needed by someone, they can use the tool
   as it was before this change.
2. Adds migration of maps without submap histograms. These
   were so far migrated on-the-fly, but #1710 aims to remove
   this.

See also #1709.

This was tested by converting a serialized 3D map and verifying
it can still be used for localization. The file changed a little
bit, but it seems to be good enough.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-08-14 11:08:53 +02:00
Martin Schwörer 6c889490e2
Integrate imu based extrapolator (#1732)
This integrates the imu based extrapolator implementation, adds lua configuration and conversions from lua to proto. Note that the parameters of the imu based extrapolator are not tuned yet and the default is still the constant-velocity extrapolator.

Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-30 13:52:08 +02:00
Martin Schwörer d3794a420a
Extrapolator Result for motion compensation (#1731)
This makes use of the ExtrapolationResult returned by the pose extrapolator. ExtrapolationResult contains poses corresponding to the timestamps of range data measurements to be used for motion compensation. When using the PoseExtrapolator implementation there is no functional difference. This PR prepares the integration of ImuBasedPoseExtrapolator, which requires using ExtrapolationResult returned by ExtrapolatePosesWithGravity to run efficiently.

Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-30 09:14:02 +02:00
Martin Schwörer efc64934d6
use extrapolator interface (#1730)
This integrates the extrapolator interface into the 3D trajectory builder. The construction is now done within the interface and local trajectory builder 3D just makes use of the interface. No functional changes.

Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-29 19:15:15 +02:00
Martin Schwörer 23351be571
added imu based extrapolator impl (#1728)
This adds an alternative implementation for pose extrapolation which uses imu integration as well as past local SLAM results (and odometry data) to predict a pose. This allows to perform motion compensation and initialize scan matching afterwards.

Using imu data for pose extrapolation and motion compensation is more accurate, because it does not make a constant velocity assumption like the PoseExtrapolator implementation. Next steps are the integration into local trajectory builder as well as tuning the parameters for existing datasets.

This PR is quite large but was already reviewed in smaller chunks internally and combines contributions from @danielsievers, @wohe and @schwoere.

Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-29 14:48:01 +02:00
Martin Schwörer 32dad63edd
extracted eigen quaterniond from 2 vectors for faster compilation (#1729)
Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-29 14:08:40 +02:00
Michael Grupp 1cae11593d
Add gauge metric for pose graph work queue size. (#1727)
Signed-off-by: Michael Grupp <grupp@magazino.eu>
2020-07-29 11:53:14 +02:00
Martin Schwörer 340a9ac21a
add pose extrapolator interface and extrapolator options (#1726)
This adds an interface around the extrapolator without further integration into any call sides.

Currently there is only a constant-velocity extrapolator implementation. The next step is to add an extrapolator implementation which integrates imu measurements for pose extrapolation.

Signed-off-by: mschworer <mschworer@lyft.com>
2020-07-28 22:53:12 +02:00
Wolfgang Hess 3611b52e90
Only set C++11 explicitly for old versions of GCC. (#1724)
Starting with GCC 6.1, C++14 became the default.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-23 11:46:59 +02:00
Wolfgang Hess a62fb739af
Update package.xml for ROS Noetic. (#1723)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-23 10:12:11 +02:00
Wolfgang Hess 92f2a67146
Remove unused code. (#1718)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-10 11:07:59 +02:00
Wolfgang Hess de76ed9fdc
Add Debian Buster to the install script and CI. (#1715)
Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-09 14:54:16 +02:00
Wolfgang Hess 595ffba0ce
Small improvements to 2D fixed frame pose support. (#1714)
This is a follow up to #1580.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-08 14:50:02 +02:00
Jihoon Lee 5899bff425
FixedFramePose in optimization 2d (#1580) 2020-07-07 13:18:53 +02:00
Wolfgang Hess d7016fdbbc
Remove Debian Jessie from CI. (#1713)
It has reached end-of-life with the
end of LTS on June 30, 2020.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-07-06 16:08:49 +02:00
Wolfgang Hess e5894cce1f
Small Abseil fixes for dependents. (#1711)
Enable PIC so that shared libraries can use the Cartographer
library.

Fixes the config so that dependent builds can find Abseil.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
2020-06-25 09:35:57 +02:00
Alexander Belyaev ade7605fac
Use installed Abseil. (#1570) 2020-06-24 10:53:03 +02:00