Remove unused code. (#287)

master
Wolfgang Hess 2017-05-15 16:57:02 +02:00 committed by GitHub
parent 8392a7e62c
commit 690d1893a7
8 changed files with 10 additions and 24 deletions

View File

@ -138,8 +138,8 @@ string MapBuilder::SubmapToProto(const int trajectory_id,
}
response->set_submap_version(submaps->Get(submap_index)->num_range_data);
submaps->SubmapToProto(submap_index, sparse_pose_graph_->GetTrajectoryNodes(),
submap_transforms[submap_index], response);
submaps->SubmapToProto(submap_index, submap_transforms[submap_index],
response);
return "";
}

View File

@ -34,8 +34,7 @@ class FakeSubmaps : public Submaps {
int size() const override { LOG(FATAL) << "Not implemented."; }
void SubmapToProto(int, const std::vector<mapping::TrajectoryNode>&,
const transform::Rigid3d&,
void SubmapToProto(int, const transform::Rigid3d&,
proto::SubmapQuery::Response*) const override {
LOG(FATAL) << "Not implemented.";
}

View File

@ -113,8 +113,7 @@ class Submaps {
virtual int size() const = 0;
// Fills data about the Submap with 'index' into the 'response'.
virtual void SubmapToProto(
int index, const std::vector<mapping::TrajectoryNode>& trajectory_nodes,
virtual void SubmapToProto(int index,
const transform::Rigid3d& global_submap_pose,
proto::SubmapQuery::Response* response) const = 0;

View File

@ -58,14 +58,6 @@ struct TrajectoryNode {
transform::Rigid3d pose;
};
// Users will only be interested in 'trajectory_nodes'. But 'constant_data'
// is referenced by 'trajectory_nodes'. This struct guarantees that their
// lifetimes are bound.
struct TrajectoryNodes {
std::deque<mapping::TrajectoryNode::ConstantData> constant_data;
std::vector<mapping::TrajectoryNode> trajectory_nodes;
};
} // namespace mapping
} // namespace cartographer

View File

@ -135,8 +135,7 @@ const Submap* Submaps::Get(int index) const {
int Submaps::size() const { return submaps_.size(); }
void Submaps::SubmapToProto(
const int index, const std::vector<mapping::TrajectoryNode>&,
const transform::Rigid3d&,
const int index, const transform::Rigid3d&,
mapping::proto::SubmapQuery::Response* const response) const {
AddProbabilityGridToResponse(Get(index)->local_pose(),
Get(index)->probability_grid, response);

View File

@ -58,8 +58,7 @@ class Submaps : public mapping::Submaps {
const Submap* Get(int index) const override;
int size() const override;
void SubmapToProto(
int index, const std::vector<mapping::TrajectoryNode>& trajectory_nodes,
const transform::Rigid3d& global_submap_pose,
int index, const transform::Rigid3d& global_submap_pose,
mapping::proto::SubmapQuery::Response* response) const override;
// Inserts 'range_data' into the Submap collection.

View File

@ -239,8 +239,7 @@ const Submap* Submaps::Get(int index) const {
int Submaps::size() const { return submaps_.size(); }
void Submaps::SubmapToProto(
int index, const std::vector<mapping::TrajectoryNode>& trajectory_nodes,
const transform::Rigid3d& global_submap_pose,
int index, const transform::Rigid3d& global_submap_pose,
mapping::proto::SubmapQuery::Response* const response) const {
// Generate an X-ray view through the 'hybrid_grid', aligned to the xy-plane
// in the global map frame.

View File

@ -67,8 +67,7 @@ class Submaps : public mapping::Submaps {
const Submap* Get(int index) const override;
int size() const override;
void SubmapToProto(
int index, const std::vector<mapping::TrajectoryNode>& trajectory_nodes,
const transform::Rigid3d& global_submap_pose,
int index, const transform::Rigid3d& global_submap_pose,
mapping::proto::SubmapQuery::Response* response) const override;
// Inserts 'range_data' into the Submap collection.