Formatting fixes. (#130)
parent
03c8e8d195
commit
8f58efe79b
|
@ -32,7 +32,8 @@ namespace cartographer {
|
||||||
namespace io {
|
namespace io {
|
||||||
|
|
||||||
template <typename PointsProcessorType>
|
template <typename PointsProcessorType>
|
||||||
void RegisterPlainPointsProcessor(PointsProcessorPipelineBuilder* const builder) {
|
void RegisterPlainPointsProcessor(
|
||||||
|
PointsProcessorPipelineBuilder* const builder) {
|
||||||
builder->Register(
|
builder->Register(
|
||||||
PointsProcessorType::kConfigurationFileActionName,
|
PointsProcessorType::kConfigurationFileActionName,
|
||||||
[](common::LuaParameterDictionary* const dictionary,
|
[](common::LuaParameterDictionary* const dictionary,
|
||||||
|
|
|
@ -85,23 +85,22 @@ sensor::LaserFan LocalTrajectoryBuilder::TransformAndFilterLaserFan(
|
||||||
for (const Eigen::Vector3f& return_ : laser_fan.returns) {
|
for (const Eigen::Vector3f& return_ : laser_fan.returns) {
|
||||||
const float range = (return_ - laser_fan.origin).norm();
|
const float range = (return_ - laser_fan.origin).norm();
|
||||||
if (range >= options_.laser_min_range()) {
|
if (range >= options_.laser_min_range()) {
|
||||||
if (range <= options_.laser_max_range()) {
|
if (range <= options_.laser_max_range()) {
|
||||||
returns_and_misses.returns.push_back(return_);
|
returns_and_misses.returns.push_back(return_);
|
||||||
} else {
|
} else {
|
||||||
returns_and_misses.misses.push_back(
|
returns_and_misses.misses.push_back(
|
||||||
laser_fan.origin +
|
laser_fan.origin +
|
||||||
options_.laser_missing_echo_ray_length() *
|
options_.laser_missing_echo_ray_length() *
|
||||||
(return_ - laser_fan.origin).normalized());
|
(return_ - laser_fan.origin).normalized());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const sensor::LaserFan cropped = sensor::CropLaserFan(
|
const sensor::LaserFan cropped = sensor::CropLaserFan(
|
||||||
sensor::TransformLaserFan(returns_and_misses, tracking_to_tracking_2d),
|
sensor::TransformLaserFan(returns_and_misses, tracking_to_tracking_2d),
|
||||||
options_.laser_min_z(), options_.laser_max_z());
|
options_.laser_min_z(), options_.laser_max_z());
|
||||||
return sensor::LaserFan{
|
return sensor::LaserFan{
|
||||||
cropped.origin,
|
cropped.origin, sensor::VoxelFiltered(cropped.returns,
|
||||||
sensor::VoxelFiltered(cropped.returns,
|
options_.laser_voxel_filter_size()),
|
||||||
options_.laser_voxel_filter_size()),
|
|
||||||
sensor::VoxelFiltered(cropped.misses,
|
sensor::VoxelFiltered(cropped.misses,
|
||||||
options_.laser_voxel_filter_size())};
|
options_.laser_voxel_filter_size())};
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ void Collator::FinishTrajectory(const int trajectory_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Collator::AddSensorData(const int trajectory_id, const string& sensor_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));
|
queue_.Add(QueueKey{trajectory_id, sensor_id}, std::move(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,8 +161,8 @@ class OrderedMultiQueue {
|
||||||
// common start time has been reached.
|
// common start time has been reached.
|
||||||
if (common_start_time_ == common::Time::min()) {
|
if (common_start_time_ == common::Time::min()) {
|
||||||
for (auto& entry : queues_) {
|
for (auto& entry : queues_) {
|
||||||
common_start_time_ =
|
common_start_time_ = std::max(common_start_time_,
|
||||||
std::max(common_start_time_, entry.second.queue.Peek<Data>()->time);
|
entry.second.queue.Peek<Data>()->time);
|
||||||
}
|
}
|
||||||
LOG(INFO) << "All sensor data is available starting at '"
|
LOG(INFO) << "All sensor data is available starting at '"
|
||||||
<< common_start_time_ << "'.";
|
<< common_start_time_ << "'.";
|
||||||
|
|
Loading…
Reference in New Issue