Rename trajectory and submap visualization protos. (#101)
parent
4917dd65ce
commit
651a7a23e7
|
@ -18,6 +18,5 @@ add_subdirectory("kalman_filter")
|
|||
add_subdirectory("mapping")
|
||||
add_subdirectory("mapping_2d")
|
||||
add_subdirectory("mapping_3d")
|
||||
add_subdirectory("proto")
|
||||
add_subdirectory("sensor")
|
||||
add_subdirectory("transform")
|
||||
|
|
|
@ -140,7 +140,7 @@ google_library(mapping_submaps
|
|||
common_port
|
||||
mapping_2d_probability_grid
|
||||
mapping_probability_values
|
||||
mapping_proto_submaps
|
||||
mapping_proto_submap_visualization
|
||||
mapping_trajectory_node
|
||||
transform_transform
|
||||
)
|
||||
|
@ -179,7 +179,7 @@ google_library(mapping_trajectory_node
|
|||
trajectory_node.h
|
||||
DEPENDS
|
||||
common_time
|
||||
proto_trajectory
|
||||
mapping_proto_trajectory
|
||||
sensor_laser
|
||||
transform_rigid_transform
|
||||
transform_transform
|
||||
|
|
|
@ -30,7 +30,7 @@ google_proto_library(mapping_proto_sparse_pose_graph
|
|||
SRCS
|
||||
sparse_pose_graph.proto
|
||||
DEPENDS
|
||||
proto_trajectory
|
||||
mapping_proto_trajectory
|
||||
transform_proto_transform
|
||||
)
|
||||
|
||||
|
@ -42,9 +42,16 @@ google_proto_library(mapping_proto_sparse_pose_graph_options
|
|||
mapping_sparse_pose_graph_proto_optimization_problem_options
|
||||
)
|
||||
|
||||
google_proto_library(mapping_proto_submaps
|
||||
google_proto_library(mapping_proto_submap_visualization
|
||||
SRCS
|
||||
submaps.proto
|
||||
submap_visualization.proto
|
||||
DEPENDS
|
||||
transform_proto_transform
|
||||
)
|
||||
|
||||
google_proto_library(mapping_proto_trajectory
|
||||
SRCS
|
||||
trajectory.proto
|
||||
DEPENDS
|
||||
transform_proto_transform
|
||||
)
|
||||
|
|
|
@ -16,8 +16,8 @@ syntax = "proto2";
|
|||
|
||||
package cartographer.mapping.proto;
|
||||
|
||||
import "cartographer/mapping/proto/trajectory.proto";
|
||||
import "cartographer/transform/proto/transform.proto";
|
||||
import "cartographer/proto/trajectory.proto";
|
||||
|
||||
message SparsePoseGraph {
|
||||
message Constraint {
|
||||
|
@ -50,5 +50,5 @@ message SparsePoseGraph {
|
|||
}
|
||||
|
||||
repeated Constraint constraint = 2;
|
||||
repeated .cartographer.proto.Trajectory trajectory = 4;
|
||||
repeated Trajectory trajectory = 4;
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
syntax = "proto2";
|
||||
|
||||
import "cartographer/transform/proto/transform.proto";
|
||||
package cartographer.mapping.proto;
|
||||
|
||||
package cartographer.proto;
|
||||
import "cartographer/transform/proto/transform.proto";
|
||||
|
||||
option java_outer_classname = "TrajectoryOuterClass";
|
||||
|
|
@ -121,7 +121,7 @@ proto::SparsePoseGraph SparsePoseGraph::ToProto() {
|
|||
}
|
||||
|
||||
// TODO(whess): Support multi-trajectory.
|
||||
::cartographer::proto::Trajectory* const trajectory = proto.add_trajectory();
|
||||
proto::Trajectory* const trajectory = proto.add_trajectory();
|
||||
*trajectory = mapping::ToProto(GetTrajectoryNodes());
|
||||
const std::vector<std::vector<const Submaps*>> components =
|
||||
GetConnectedTrajectories();
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "cartographer/common/math.h"
|
||||
#include "cartographer/common/port.h"
|
||||
#include "cartographer/mapping/probability_values.h"
|
||||
#include "cartographer/mapping/proto/submaps.pb.h"
|
||||
#include "cartographer/mapping/proto/submap_visualization.pb.h"
|
||||
#include "cartographer/mapping/trajectory_node.h"
|
||||
#include "cartographer/mapping_2d/probability_grid.h"
|
||||
#include "glog/logging.h"
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
#include "cartographer/mapping/trajectory_node.h"
|
||||
|
||||
#include "cartographer/common/time.h"
|
||||
#include "cartographer/proto/trajectory.pb.h"
|
||||
#include "cartographer/transform/transform.h"
|
||||
|
||||
namespace cartographer {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "Eigen/Core"
|
||||
#include "cartographer/common/time.h"
|
||||
#include "cartographer/proto/trajectory.pb.h"
|
||||
#include "cartographer/mapping/proto/trajectory.pb.h"
|
||||
#include "cartographer/sensor/laser.h"
|
||||
#include "cartographer/transform/rigid_transform.h"
|
||||
|
||||
|
@ -67,8 +67,7 @@ struct TrajectoryNodes {
|
|||
std::vector<mapping::TrajectoryNode> trajectory_nodes;
|
||||
};
|
||||
|
||||
::cartographer::proto::Trajectory ToProto(
|
||||
const std::vector<TrajectoryNode>& nodes);
|
||||
proto::Trajectory ToProto(const std::vector<TrajectoryNode>& nodes);
|
||||
|
||||
} // namespace mapping
|
||||
} // namespace cartographer
|
||||
|
|
|
@ -150,7 +150,7 @@ google_library(mapping_2d_submaps
|
|||
mapping_2d_map_limits
|
||||
mapping_2d_probability_grid
|
||||
mapping_2d_proto_submaps_options
|
||||
mapping_proto_submaps
|
||||
mapping_proto_submap_visualization
|
||||
mapping_submaps
|
||||
mapping_trajectory_node
|
||||
sensor_laser
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "Eigen/Core"
|
||||
#include "cartographer/common/lua_parameter_dictionary.h"
|
||||
#include "cartographer/mapping/proto/submaps.pb.h"
|
||||
#include "cartographer/mapping/proto/submap_visualization.pb.h"
|
||||
#include "cartographer/mapping/submaps.h"
|
||||
#include "cartographer/mapping/trajectory_node.h"
|
||||
#include "cartographer/mapping_2d/laser_fan_inserter.h"
|
||||
|
|
|
@ -265,7 +265,7 @@ google_library(mapping_3d_submaps
|
|||
mapping_3d_hybrid_grid
|
||||
mapping_3d_laser_fan_inserter
|
||||
mapping_3d_proto_submaps_options
|
||||
mapping_sparse_pose_graph
|
||||
mapping_proto_submap_visualization
|
||||
mapping_submaps
|
||||
sensor_laser
|
||||
transform_transform
|
||||
|
|
|
@ -53,7 +53,6 @@ google_library(mapping_3d_sparse_pose_graph_optimization_problem
|
|||
optimization_problem.h
|
||||
DEPENDS
|
||||
common_ceres_solver_options
|
||||
common_lua_parameter_dictionary
|
||||
common_make_unique
|
||||
common_math
|
||||
common_port
|
||||
|
@ -64,6 +63,7 @@ google_library(mapping_3d_sparse_pose_graph_optimization_problem
|
|||
mapping_3d_rotation_cost_function
|
||||
mapping_3d_sparse_pose_graph_spa_cost_function
|
||||
mapping_3d_submaps
|
||||
mapping_sparse_pose_graph
|
||||
mapping_sparse_pose_graph_proto_optimization_problem_options
|
||||
transform_transform
|
||||
)
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
#include "Eigen/Core"
|
||||
#include "Eigen/Geometry"
|
||||
#include "cartographer/common/lua_parameter_dictionary.h"
|
||||
#include "cartographer/common/port.h"
|
||||
#include "cartographer/common/time.h"
|
||||
#include "cartographer/mapping/sparse_pose_graph.h"
|
||||
#include "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.pb.h"
|
||||
#include "cartographer/mapping_3d/imu_integration.h"
|
||||
#include "cartographer/mapping_3d/submaps.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "Eigen/Geometry"
|
||||
#include "cartographer/common/port.h"
|
||||
#include "cartographer/mapping/sparse_pose_graph.h"
|
||||
#include "cartographer/mapping/proto/submap_visualization.pb.h"
|
||||
#include "cartographer/mapping/submaps.h"
|
||||
#include "cartographer/mapping_2d/laser_fan_inserter.h"
|
||||
#include "cartographer/mapping_2d/probability_grid.h"
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# Copyright 2016 The Cartographer Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
google_proto_library(proto_trajectory
|
||||
SRCS
|
||||
trajectory.proto
|
||||
DEPENDS
|
||||
transform_proto_transform
|
||||
)
|
|
@ -58,7 +58,7 @@ google_library(transform_transform_interpolation_buffer
|
|||
DEPENDS
|
||||
common_make_unique
|
||||
common_time
|
||||
proto_trajectory
|
||||
mapping_proto_trajectory
|
||||
transform_rigid_transform
|
||||
transform_transform
|
||||
)
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include "Eigen/Core"
|
||||
#include "Eigen/Geometry"
|
||||
#include "cartographer/common/make_unique.h"
|
||||
#include "cartographer/common/time.h"
|
||||
#include "cartographer/proto/trajectory.pb.h"
|
||||
#include "cartographer/transform/transform.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
|
@ -87,10 +85,10 @@ bool TransformInterpolationBuffer::empty() const { return deque_.empty(); }
|
|||
|
||||
std::unique_ptr<TransformInterpolationBuffer>
|
||||
TransformInterpolationBuffer::FromTrajectory(
|
||||
const cartographer::proto::Trajectory& trajectory) {
|
||||
const mapping::proto::Trajectory& trajectory) {
|
||||
auto interpolation_buffer =
|
||||
common::make_unique<TransformInterpolationBuffer>();
|
||||
for (const cartographer::proto::Trajectory::Node& node : trajectory.node()) {
|
||||
for (const mapping::proto::Trajectory::Node& node : trajectory.node()) {
|
||||
interpolation_buffer->Push(common::FromUniversal(node.timestamp()),
|
||||
transform::ToRigid3(node.pose()));
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include "cartographer/common/time.h"
|
||||
#include "cartographer/proto/trajectory.pb.h"
|
||||
#include "cartographer/mapping/proto/trajectory.pb.h"
|
||||
#include "cartographer/transform/rigid_transform.h"
|
||||
|
||||
namespace cartographer {
|
||||
|
@ -31,7 +31,7 @@ namespace transform {
|
|||
class TransformInterpolationBuffer {
|
||||
public:
|
||||
static std::unique_ptr<TransformInterpolationBuffer> FromTrajectory(
|
||||
const cartographer::proto::Trajectory& trajectory);
|
||||
const mapping::proto::Trajectory& trajectory);
|
||||
|
||||
// Adds a new transform to the buffer and removes the oldest transform if the
|
||||
// buffer size limit is exceeded.
|
||||
|
|
Loading…
Reference in New Issue