Updated PCL plugin for ParaView

Hi everyone,

The PCL plugin for ParaView has received a significant update with yesterday’s release. You can find the announcement here and the new Git repo here.

For ParaView users, this update introduces support for much more modular filters. For example, the short demo video in the announcement shows that it is now possible to calculate normals or features in one filter and pass them to another via the ParaView pipeline. This gives users greater control over the PCL workflow and allows them to do things such as visualize intermediate data or swap out one feature descriptor for another with just a few pipeline clicks.

For ParaView and PCL developers, the new plugin provides a framework for rapidly developing new PCL filters. All that is needed is to copy 3 files, search-replace a name, expose some parameters, tweak some xml and implement the ParaView-independent PCL algorithm. This will be covered in detail in a follow-up blog post but anyone who wants to get an idea of the process before then is invited to take a look at the new PCLPassThroughFilter VTK class and XML file. The filter itself is essentially trivial and the code is fully commented so it serves as a good starting point.

The goal is to gradually add filters with a one-to-one correspondence to pure PCL functions so that we eventually cover most if not all of PCL’s functionality. We also plan to provide some filters to encapsulate common workflows either for convenience or to avoid the overhead of redundant data conversions.

Please don’t hesitate to contact me if you have any questions about the plugin or want to give feedback. I will try to follow this thread but email will likely get the quickest reply.

Regards,
Mike

3 Likes

Hi Mike,

I’m not able to build the filters under Windows. I had linking errors to PCL, for example:
unresolved external symbol “public: virtual bool __cdecl pcl::RandomSampleConsensus::computeModel(int)”

I built PCL 1.9.0 from sources with options WITH_VTK:BOOL=OFF and BUILD_visualization:BOOL=OFF and I used Eigen 3.3.6 and Boost 1.68 that has been tested. Also, I tried building them against Paraview 5.6 and 5.7.

I don’t know what’s wrong with my configurations. I wonder if anyone succeeded building the PCL filters under Windows

Hi Gregory,

I’m not sure it has been tested with Windows at all, and certainly not with multiple MSVC versions. What version of msvc are you using?

Bastien Jacquet

Thanks for the answer! I tried MSVC 2019 first and then MSVC 2017 with the same results.

It’s worth mentioning that my CMake PCL_DIR variable points to my PCL install folder (/cmake), I chose it because, when I tried using the build folder, CMake threw errors trying to locate Eigen.

Hi Mike,

I am interested in testing the PLC plugin and seeing what available filters are available (if any). How would you advise best getting started?

Thanks

JT

@Gatien_Ferret @Timothee_Couble

Hi Mathieu, Gatien & Tomothee

I am looking to build this plugin on Windows 10. Is there a step by step guide on how to accomplish this? I have this old guide (link) and I have this new page (link) but not much detail

For example

  • What exactly do I need? QT, PCL, boost, eigen, ParaView etc?
  • Do I need to build everting from a scratch or can I use binaries?
  • What version of the binaries should I use if I can use them?

So basically what is the easiest way to build, test and extend this plugin on windows 10 and then load into Paraview 5.11.1 ?

Thanks

JT

(i can use either visual studio 2019 or 2022 if that helps any)

Hi @JT3d,

This plugin has not been maintained with the latest Paraview and PCL versions, and had not been tested on Windows.
We more recently created another one, starting from scratch and importing filters (and combination of filters for a few functionalities) that make sense for point clouds inside LidarView, the PV-based application specifically made for LiDAR sensors (tested on Windows with VS2019 compiler).
You may find the link to this plugin here : https://gitlab.kitware.com/LidarView/lidarview-core/-/tree/master/Plugins/PCLPlugin

As of now, you may only build it from LidarView build, but it could be added as a Superbuild module to be built alone if needed. No binaries are provided so far.
Instructions for building LidarView may be found here https://gitlab.kitware.com/LidarView/lidarview-superbuild/-/blob/master/README.md
You will need to enable -DENABLE_pcl=True

The plugin can then be imported in ParaView (Through Tools->Manage Plugins)

It is still in progress and not everything has been imported (you may find additional filters in the LidarView merge requests https://gitlab.kitware.com/LidarView/lidarview-core/-/merge_requests)

What PCL filters would you be interested in importing and in which context?

Thanks,

1 Like

Hi Timothee,

Many thanks for the reply. Ok that makes a little more sense. I’m finding it difficult to figure out if I should be using ParaView, Lidarview or VeloView to get the most from the latest / supported PCL plugin. The documentation looks to be outdated so it’s hard to know where to best start. You might be able to point me in the right direction based upon future development.

Here are some of the filters I am looking to create (if they haven’t been already!)

  • Plane segmentation,
  • Fit a plane, cylinder, sphere etc. (sample consensus)
  • Creating normals.
  • Features
  • Recognition
  • Voxel grid
  • Filter noise etc…

I also need to have some interaction with the point cloud so that I could select areas of the point cloud. For example, I would need to to fit a plane to a number of selected points with the mouse, then select another group of points, fit a plane to it, show both planes in the view, and create a measurement that says the distance between the two planes, all in ParaView pipeline. Think of a point cloud that has a number of different heights and I need to check the heights of the planes relative to each other. Would this be possible?

A few more questions if that is ok?

  1. Is LidarView the same as VeloView but with more support for Lidar sensor manufacturers?
  2. What functionality is in LidarView that is not possible to bring into ParaView?
  3. What filters are available in the LidarView PCL plugin at present? ( I could only see same consensus)
  4. When a new version of ParaView comes out how and when is LidarView upgraded?
  5. Based upon my use case what would you recommend at a high level? Should I just use ParaView but use Lidarview to build the pcl plugin or does it make more sense to use LidarView and remove the functionality not applicable to my use case?

Thanks in advance

JT

Hi Timothee,

I followed the instructions on the link you sent to build (https://gitlab.kitware.com/LidarView/lidarview-superbuild/-/blob/master/README.md) and was successfully able to build it but I faced two problems

  1. Not long after trying to launch LidarView.exe it crashes. Is there a log available that can help me pinpoint why it is crashing. I see the splash screen and the start of the main window. (The binary works fine)
  2. The build created the PCL plugin and I tried to import it into Paraview 5.11.1 but it errored on import giving the following error message

ERROR: In vtkPVPluginLoader.cxx, line 536
vtkPVPluginLoader (000001899082DC70): C:\Users\JT\Downloads\LidarView-4.4.0-Windows-AMD64\LidarView-4.4.0\bin\lidarview\plugins\PCLPlugin\PCLPlugin.dll: The specified module could not be found.

Any ideas?

(Separately I could build paraview and launch it with no problems if that helps any?)

Thanks in advance

JT

Hi Timothee,

I can pay for support if this would help accelerate the development cycle. I filled out this form yesterday so hopefully someone in Kitware can reply

https://www.kitware.com/contact/advanced-support/

Thanks

JT

Hi @JT3d ,

Concerning ParaView, LidarView and VeloView, I think it comes down to which data you want to manipulate - if this is lidar temporal data (pcap), LidarView is the best otherwise if this only point cloud data in a .vtk or .las format you may also use ParaView.

They all share the same base so it does not have an impact on the pcl plugin. (Note: VeloView is not based on the latest ParaView so it will not work importing the plugin)

Regarding the others questions:

  1. Yes, they share the same base but VeloView is not updated with the latest ParaView. It is specific to Velodyne sensors, but handles some velodyne sensors that LidarView does not (Velarray and Alpha Prime APF format, see https://www.kitware.com/veloview-5-1-released/ for more details). On the other hand LidarView handles some Hesai sensors.
  1. Lidar PCAP reading, some point cloud specific filters and temporal filters (including SLAM algorithm : https://www.kitware.com/lidar-slam-spotlight-on-kitwares-open-source-library/).
  1. For now sample consensus filters (fitting model, plane alignment), normal space sampling, outlier removal, voxel grid. And soon a indoor wall fitting filter.
  1. The new ParaView version will come out in September, LidarView shall be updated with the latest ParaView version later that year.
  1. If you’re using (or plan to use) Lidar data (in particular in pcap format) and want to use filters we specifically made for it (including voxel grid, SLAM or point accumulation for instance), I would advise to use LidarView, otherwise you may also use ParaView. Regarding the build system, we could update to make it easier if you want to use it with ParaView.

Regarding the build issue:

  • I’m not sure what is happening, the windows nightly is working fine on my side. You could try theses instructions to debug LidarView on Windows
  • This is because windows needs the pcl dll next to paraview otherwise it doesn’t find it / search it and it can’t load the plugin. Could you try with the paraview built with lidarview-superbuild? (in install/bin)
  • Thank you for your trust, we’ll get back to you from there as well to check out the priorities and how we can support.

Timothée Couble

Thanks for all the replies. Very much appreciated

Just on the crash

  • This is because windows needs the pcl dll next to paraview otherwise it doesn’t find it / search it and it can’t load the plugin. Could you try with the paraview built with lidarview-superbuild? (in install/bin)
    [/quote]

The ParaView.exe in install/bin doesn’t launch at all so something weird going on. I’ll try and build with debug info and see if I can attach to the process and see what is going on?

Should I be able to bring the PCL plugin into Paraview 5.11.1 binary install? (It fails to load too)

Thanks again

JT

Yes please.

It might be tricky as you will need to copy all pcl dlls + pcl dependencies dlls ( flann eigen boost png zlib qhull) in paraview binary folder.

Hi Timothee,

I attached the debugger and both LidarView.exe & Paraview.exe are crashing on line

PythonQt::init(PythonQt::PythonAlreadyInitialized);

See full function below and attached screenshot

Any ideas - seems to be some sort or write violation. Permissions of some sort?

(I am using Python 3.9.13)

void pqPythonQtPlugin::initialize()
{
  vtkPythonInterpreter::Initialize();

  PythonQt::init(PythonQt::PythonAlreadyInitialized);
#if WITH_QtAll
  PythonQt_QtAll::init();
#else
  PythonQt_init_QtBindings();
#endif
  PythonQt::self()->addWrapperFactory(new pqPythonQtWrapperFactory);
  PythonQt::self()->addDecorators(new pqPluginDecorators());
}

Hi @JT3d,

Did you use you’re python system or the python that come with the superbuild? (option USE_SYSTEM_python3) Could you try with that option on OFF?

Hi Timothee,

I used the python that comes with the superbuild. I’ll try and build with that option off and see how I get on

Thanks

Hi Timothee,

I just tried a new build on a fresh install of windows and I am still getting the crash. I tried setting the python flag to not use system python

I am using QT 5.15.2 on windows 10 to build against. Is that correct? Can’t see much else that can be going wrong. I had to add the python path to my path “C:\lv\build\install\Python” Anything else you can think that is going wrong? Admin mode perhaps etc…?

See screenshot - may be hepful

Thanks

JT

Hi Tomothee,

Just tried building ParaView on the new build of Windows 10 and used the python 3.9 included with LidarView and it built and launched fine so it’s not a python issue per say.

Would it be possible to quickly test this yourselves and see that LidarView superbuild does build and launch on a fresh install of windows 10.

Thanks

JT

Hi @JT3d,

LidarView superbuild builds and runs on our Windows machine with Qt5.12 and Qt5.15 (I’ve tried with different machines) - are you using another version of Qt?

As only the PythonQt plugin makes ParaView crash, you could disable the autoload of this plugin by modifying the bin/paraview-5.11/plugins/paraview.plugins.xml file and changing <Plugin name="PythonQtPlugin" auto_load="1"/> to 0. (LidarView needs this plugin to work).

We could also send you one of our nighlty LidarView build.

Best regards,
Timothée