MCPcopy Create free account
hub / github.com/atenpas/gpd / plotFrame

Method plotFrame

src/gpd/util/plot.cpp:428–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void Plot::plotFrame(PCLVisualizer &viewer, const Eigen::Vector3d &translation,
429 const Eigen::Matrix3d &rotation, const std::string &id,
430 double axis_length) {
431 const Eigen::Matrix3d pts = axis_length * rotation;
432 const std::string names[3] = {"normal_" + id, "binormal_" + id,
433 "curvature_" + id};
434 const double colors[3][3] = {
435 {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}};
436 pcl::PointXYZ p;
437 p.getVector3fMap() = translation.cast<float>();
438 for (int i = 0; i < 3; i++) {
439 pcl::PointXYZ q;
440 q.getVector3fMap() = (translation + pts.col(i)).cast<float>();
441 viewer->addLine<pcl::PointXYZ>(p, q, colors[i][0], colors[i][1],
442 colors[i][2], names[i]);
443 viewer->setShapeRenderingProperties(
444 pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 5, names[i]);
445 }
446}
447
448void Plot::plotSamples(const std::vector<int> &index_list,
449 const PointCloudRGBA::Ptr &cloud) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected