2021-01-04 21:26:09 +08:00
|
|
|
#include "lidar_visualizer_utils.h"
|
|
|
|
|
2021-02-08 17:09:52 +08:00
|
|
|
namespace common {
|
|
|
|
|
|
|
|
void AddTrajectory(const Trajectory &trajectory, const Color &color,
|
|
|
|
const std::string &id, PCLVisualizer *const viewer) {
|
2021-02-18 14:05:33 +08:00
|
|
|
const auto &points = trajectory.GetPointSeq();
|
|
|
|
PointCloudPtr cloud(new PointCloud);
|
|
|
|
for (const auto &p : points) cloud->points.emplace_back(p.x(), p.y(), p.z());
|
|
|
|
AddPointCloud<Point>(cloud, color, id, viewer, 5);
|
2021-02-08 17:09:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace common
|