Closed CaiHuFan closed 2 years ago
Which operating system do you use? Which PCL version? And how did you install it? How do you compile your own program? If you use CMake, please post the CMakeLists.txt here.
windows+pcl1.9.1+vs2017 Release x64
Which operating system do you use? Which PCL version? And how did you install it? How do you compile your own program? If you use CMake, please post the CMakeLists.txt here. I don't know why this function doesn't work. Is there a problem with the input parameters or something
include <pcl/surface/3rdparty/opennurbs/opennurbs_curve.h>
ON_3dVector CurvatureAt( double t ) const;
How did you install PCL? Do you use CMake? If yes, please post the CMakeLists.txt. There is probably something wrong with how you link to the PCL libraries
How did you install PCL? Do you use CMake? If yes, please post the CMakeLists.txt. There is probably something wrong with how you link to the PCL libraries
I just used PCL-1.9.1-AllInOne-msvc2017-win64.exe and don't used CMake
@CaiHuFan If you don't use CMake, how do you build your own project/your own code? With Visual Studio (Code)? Then please show screenshots of your project configuration.
My best guess is that the on-nurbs stuff is not included in the all-in-one installer: https://pcl.readthedocs.io/projects/tutorials/en/master/bspline_fitting.html#pcl-installation-settings
include <pcl/surface/on_nurbs/fitting_curve_2d.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_pdm.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_tdm.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_sdm.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_apdm.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_asdm.h>
include <pcl/surface/on_nurbs/fitting_curve_2d_atdm.h>
include <pcl/surface/on_nurbs/triangulation.h>
include <pcl/surface/3rdparty/opennurbs/opennurbs_nurbscurve.h>
include <pcl/surface/3rdparty/opennurbs/opennurbs_curve.h>
include <pcl/io/ply_io.h>
include <pcl/visualization/pcl_visualizer.h>
pcl::visualization::PCLVisualizer viewer("Curve Fitting 2D");
void PointCloud2Vector2d(pcl::PointCloud::Ptr cloud, pcl::on_nurbs::vector_vec2d &data)
{
for (const auto &p : *cloud)
{
if (!std::isnan(p.x) && !std::isnan(p.y))
data.emplace_back(p.x, p.y);
}
}
void VisualizeCurve(ON_NurbsCurve &curve, double r, double g, double b, bool show_cps) { ON_Curve* curve_1; pcl::PointCloud::Ptr cloud1(new pcl::PointCloud);
pcl::PointCloud::Ptr cloud3(new pcl::PointCloud);
pcl::PointCloud::Ptr cloud4(new pcl::PointCloud);
curve_1=curve.DuplicateCurve();
}
int main(int argc, char *argv[]) { std::string pcd_file;
}