Fix Lint and ClangTidy warnings. (#485)

master
jie 2017-08-31 04:39:47 -07:00 committed by Wolfgang Hess
parent 3215035c1c
commit e2c67a7bde
5 changed files with 8 additions and 6 deletions

View File

@ -23,7 +23,8 @@ namespace cartographer {
namespace io {
void DrawTrajectory(const mapping::proto::Trajectory& trajectory,
const FloatColor& color, PoseToPixelFunction pose_to_pixel,
const FloatColor& color,
const PoseToPixelFunction& pose_to_pixel,
cairo_surface_t* surface) {
if (trajectory.node_size() == 0) {
return;

View File

@ -32,7 +32,8 @@ using PoseToPixelFunction =
// 'pose_to_pixel' function must translate a trajectory node's position into the
// pixel on 'surface'.
void DrawTrajectory(const mapping::proto::Trajectory& trajectory,
const FloatColor& color, PoseToPixelFunction pose_to_pixel,
const FloatColor& color,
const PoseToPixelFunction& pose_to_pixel,
cairo_surface_t* surface);
} // namespace io

View File

@ -26,9 +26,9 @@ namespace cartographer {
namespace mapping {
PoseExtrapolator::PoseExtrapolator(const common::Duration pose_queue_duration,
double gravity_time_constant)
double imu_gravity_time_constant)
: pose_queue_duration_(pose_queue_duration),
gravity_time_constant_(gravity_time_constant) {}
gravity_time_constant_(imu_gravity_time_constant) {}
std::unique_ptr<PoseExtrapolator> PoseExtrapolator::InitializeWithImu(
const common::Duration pose_queue_duration,

View File

@ -131,7 +131,7 @@ LocalTrajectoryBuilder::AddAccumulatedRangeData(
const sensor::PointCloud filtered_point_cloud_in_tracking =
adaptive_voxel_filter.Filter(filtered_range_data.returns);
if (options_.use_online_correlative_scan_matching()) {
// We take a copy since we use 'intial_ceres_pose' as an output argument.
// We take a copy since we use 'initial_ceres_pose' as an output argument.
const transform::Rigid3d initial_pose = initial_ceres_pose;
real_time_correlative_scan_matcher_->Match(
initial_pose, filtered_point_cloud_in_tracking,

View File

@ -37,7 +37,7 @@ class FastCorrelativeScanMatcherTest : public ::testing::Test {
protected:
FastCorrelativeScanMatcherTest()
: range_data_inserter_(CreateRangeDataInserterTestOptions()),
options_(CreateFastCorrelativeScanMatcherTestOptions(5)){};
options_(CreateFastCorrelativeScanMatcherTestOptions(5)) {}
void SetUp() override {
point_cloud_ = {