draw_trajectories.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_IO_DRAW_TRAJECTORIES_H_
18 #define CARTOGRAPHER_IO_DRAW_TRAJECTORIES_H_
19 
20 #include "cairo/cairo.h"
21 #include "cartographer/io/color.h"
22 #include "cartographer/mapping/proto/trajectory.pb.h"
24 
25 namespace cartographer {
26 namespace io {
27 
28 using PoseToPixelFunction =
29  std::function<Eigen::Array2i(const transform::Rigid3d& pose)>;
30 
31 // Draws the 'trajectory' with the given 'color' onto 'surface'. The
32 // 'pose_to_pixel' function must translate a trajectory node's position into the
33 // pixel on 'surface'.
34 void DrawTrajectory(const mapping::proto::Trajectory& trajectory,
35  const FloatColor& color,
36  const PoseToPixelFunction& pose_to_pixel,
37  cairo_surface_t* surface);
38 
39 } // namespace io
40 } // namespace cartographer
41 
42 #endif // CARTOGRAPHER_IO_DRAW_TRAJECTORIES_H_
std::array< float, 3 > FloatColor
Definition: color.h:29
std::function< Eigen::Array2i(const transform::Rigid3d &pose)> PoseToPixelFunction
void DrawTrajectory(const mapping::proto::Trajectory &trajectory, const FloatColor &color, const PoseToPixelFunction &pose_to_pixel, cairo_surface_t *surface)


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58