Formatting fixes. (#130)

master
Wolfgang Hess 2016-11-17 15:46:29 +01:00 committed by GitHub
parent 03c8e8d195
commit 8f58efe79b
4 changed files with 15 additions and 15 deletions

View File

@ -32,7 +32,8 @@ namespace cartographer {
namespace io {
template <typename PointsProcessorType>
void RegisterPlainPointsProcessor(PointsProcessorPipelineBuilder* const builder) {
void RegisterPlainPointsProcessor(
PointsProcessorPipelineBuilder* const builder) {
builder->Register(
PointsProcessorType::kConfigurationFileActionName,
[](common::LuaParameterDictionary* const dictionary,

View File

@ -85,23 +85,22 @@ sensor::LaserFan LocalTrajectoryBuilder::TransformAndFilterLaserFan(
for (const Eigen::Vector3f& return_ : laser_fan.returns) {
const float range = (return_ - laser_fan.origin).norm();
if (range >= options_.laser_min_range()) {
if (range <= options_.laser_max_range()) {
returns_and_misses.returns.push_back(return_);
} else {
returns_and_misses.misses.push_back(
laser_fan.origin +
options_.laser_missing_echo_ray_length() *
(return_ - laser_fan.origin).normalized());
}
if (range <= options_.laser_max_range()) {
returns_and_misses.returns.push_back(return_);
} else {
returns_and_misses.misses.push_back(
laser_fan.origin +
options_.laser_missing_echo_ray_length() *
(return_ - laser_fan.origin).normalized());
}
}
}
const sensor::LaserFan cropped = sensor::CropLaserFan(
sensor::TransformLaserFan(returns_and_misses, tracking_to_tracking_2d),
options_.laser_min_z(), options_.laser_max_z());
return sensor::LaserFan{
cropped.origin,
sensor::VoxelFiltered(cropped.returns,
options_.laser_voxel_filter_size()),
cropped.origin, sensor::VoxelFiltered(cropped.returns,
options_.laser_voxel_filter_size()),
sensor::VoxelFiltered(cropped.misses,
options_.laser_voxel_filter_size())};
}

View File

@ -40,7 +40,7 @@ void Collator::FinishTrajectory(const int trajectory_id) {
}
void Collator::AddSensorData(const int trajectory_id, const string& sensor_id,
std::unique_ptr<Data> data) {
std::unique_ptr<Data> data) {
queue_.Add(QueueKey{trajectory_id, sensor_id}, std::move(data));
}

View File

@ -161,8 +161,8 @@ class OrderedMultiQueue {
// common start time has been reached.
if (common_start_time_ == common::Time::min()) {
for (auto& entry : queues_) {
common_start_time_ =
std::max(common_start_time_, entry.second.queue.Peek<Data>()->time);
common_start_time_ = std::max(common_start_time_,
entry.second.queue.Peek<Data>()->time);
}
LOG(INFO) << "All sensor data is available starting at '"
<< common_start_time_ << "'.";