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); response->set_submap_version(submaps->Get(submap_index)->num_range_data);
submaps->SubmapToProto(submap_index, sparse_pose_graph_->GetTrajectoryNodes(), submaps->SubmapToProto(submap_index, submap_transforms[submap_index],
submap_transforms[submap_index], response); response);
return ""; return "";
} }

View File

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

View File

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

View File

@ -58,14 +58,6 @@ struct TrajectoryNode {
transform::Rigid3d pose; 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 mapping
} // namespace cartographer } // namespace cartographer

View File

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

View File

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

View File

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