PCL Visualizer with QTCreator and QMAKE

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PCL Visualizer with QTCreator and QMAKE

George Bora
This post was updated on .
Hello, I'm a new user of PCL and I'm trying to use the PCL Visualizer within a QT widget, now my limited experience up to this point with PCL has been with the PCL shiped with ROS and Eclipse as the IDE with CMake as the build system.

I'm starting from this
tutorial as a baseline yet I can't seem to get even the includes to work:

#include <boost/thread/thread.hpp>
#include <pcl/common/common_headers.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/console/parse.h>

Gives me this error:

/home/george/Documents/QT/EditorPCL-build-desktop-Qt_4_8_1_in_PATH__System__Release/../EditorPCL/editor.cpp:7: error: pcl/common/common_headers.h: No such file or directory

Now I've seen that most of the threads dealing with linking use CMake but for the momment I'd like to stay with QMake and QTCreator.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

George Bora
And as a dumbass I forgot to add the relevant portion of the QMAKE file:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_visualization
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_visualizationd
else:symbian: LIBS += -lpcl_visualization
else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_visualization

INCLUDEPATH += $$PWD/../../../../../usr/lib
DEPENDPATH += $$PWD/../../../../../usr/lib

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/release/ -lpcl_common
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/debug/ -lpcl_common
else:symbian: LIBS += -lpcl_common
else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_common

INCLUDEPATH += $$PWD/../../../../../usr/lib
DEPENDPATH += $$PWD/../../../../../usr/lib

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/release/ -lpcl_apps
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../usr/lib/debug/ -lpcl_apps
else:symbian: LIBS += -lpcl_apps
else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_apps

INCLUDEPATH += $$PWD/../../../../../usr/lib
DEPENDPATH += $$PWD/../../../../../usr/lib

I added them through the GUI, went to usr/lib and added each .so file so I'm thinking they are at least syntactically right even if I added the wrong files.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

aichim
Administrator
Hi George,

First of all, please watch your language on the mailing lists.

The solution to your problem is to directly import the CMakeLists.txt of your project as a new project in QtCreator (I think they introduced this in one of their latest versions), and the IDE will figure out all the dependencies for you, without any need to modify the quake files.

Cheers,
Alex

On Nov 11, 2012, at 10:21 AM, George Bora <[hidden email]> wrote:

> And as a dumbass I forgot to add the relevant portion of the QMAKE file:
>
> win32:CONFIG(release, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/ -lpcl_visualization
> else:win32:CONFIG(debug, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/ -lpcl_visualizationd
> else:symbian: LIBS += -lpcl_visualization
> else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_visualization
>
> INCLUDEPATH += $$PWD/../../../../../usr/lib
> DEPENDPATH += $$PWD/../../../../../usr/lib
>
> win32:CONFIG(release, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/release/ -lpcl_common
> else:win32:CONFIG(debug, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/debug/ -lpcl_common
> else:symbian: LIBS += -lpcl_common
> else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_common
>
> INCLUDEPATH += $$PWD/../../../../../usr/lib
> DEPENDPATH += $$PWD/../../../../../usr/lib
>
> win32:CONFIG(release, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/release/ -lpcl_apps
> else:win32:CONFIG(debug, debug|release): LIBS +=
> -L$$PWD/../../../../../usr/lib/debug/ -lpcl_apps
> else:symbian: LIBS += -lpcl_apps
> else:unix: LIBS += -L$$PWD/../../../../../usr/lib/ -lpcl_apps
>
> INCLUDEPATH += $$PWD/../../../../../usr/lib
> DEPENDPATH += $$PWD/../../../../../usr/lib
>
> I added them through the GUI, went to usr/lib and added each .so file so I'm
> thinking they are at least syntactically right even if I added the wrong
> files.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/PCL-Visualizer-with-QTCreator-and-QMAKE-tp4023721p4023722.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

George Bora
Oops sorry, this project is separate from my old ROS and PCL project I just mentioned it to give people a ideea of my experience level, 1 project in total, I have the old project but since it worked with the PCL included in ROS I think 1.4 I don't think it will solve my problem.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

aichim
Administrator
George,


If you have a project using CMake and everything works fine from the command line, then importing it in QtCreator will produce the same behavior + you get all the good things an IDE brings.


Cheers,
Alex

On Nov 11, 2012, at 12:42 PM, George Bora <[hidden email]> wrote:

> Oops sorry, this project is separate from my old ROS and PCL project I just
> mentioned it to give people a ideea of my experience level, 1 project in
> total, I have the old project but since it worked with the PCL included in
> ROS I think 1.4 I don't think it will solve my problem.
>
>
>
> --
> View this message in context: http://www.pcl-users.org/PCL-Visualizer-with-QTCreator-and-QMAKE-tp4023721p4023725.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

George Bora
Aichim thank you for your help but starting from the old CMake file is not a option, but this project is significantly different I am not using ROS only PCL in this furthermore the version of PCL I used back then is a old one which was integrated with ROS a ROS installation I do not have on mu PC any more.

I appreciate your replies but using that old CMake file is just not a option for me, I only mentioned it to give people a ideea of my experience with PCL the ROS project used a different version of PCL, a older version which was uninstalled with ROS.

For this project I want to use the most up to date PCL (1.6) which I have installed separately I want to do this with QTCreator and QMake.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

blorgggg
" I want to use the most up to date PCL (1.6) which I have
installed separately I want to do this with QTCreator and QMake."
--Seconded! This would be great!



On Mon, Nov 12, 2012 at 2:24 AM, George Bora <[hidden email]> wrote:
I want to use the most up to date PCL (1.6) which I have
installed separately I want to do this with QTCreator and QMake.


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

George Bora
In reply to this post by George Bora
Hello I'm not sure if this is quite by the rules but I wanted to leave a post in case someone has a similar problem in the future.

First off sadly I could not get qmake to work properly, so I switched over to cmake in QT.

What I did, and sorry if this too step by step but I couldn't find any explicit tutorials on cmake in QT and this may be of further use to somebody else:

1) In your project folder create a file named CMakeLists.txt give it this exact name.
2) Go to File and select Open file or Project and open the CMakeLists.txt this will start the QTCreator cmake wizard.
3) Chose your build directory and any additional arguments for cmake, if you feel the need to use any, and press the final run cmake button.

A problem I ran into since I used cmake was that now PCL was properly included, I started from the cmake files listed in the tutorials, but I had to add the QT libraries to the makefile.

This tutorial and the example here-in  was what I used as the basis adding QT files and classes to cmake.

And of course once cmake is finished don't forget to build.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

blorgggg
This is great! thanks for leaving this detailed account of your success!





On Wed, Dec 5, 2012 at 5:21 PM, George Bora <[hidden email]> wrote:
Hello I'm not sure if this is quite by the rules but I wanted to leave a post
in case someone has a similar problem in the future.

First off sadly I could not get qmake to work properly, so I switched over
to cmake in QT.

What I did, and sorry if this too step by step but I couldn't find any
explicit tutorials on cmake in QT and this may be of further use to somebody
else:

1) In your project folder create a file named CMakeLists.txt give it this
exact name.
2) Go to File and select Open file or Project and open the CMakeLists.txt
this will start the QTCreator cmake wizard.
3) Chose your build directory and any additional arguments for cmake, if you
feel the need to use any, and press the final run cmake button.

A problem I ran into since I used cmake was that now PCL was properly
included, I started from the cmake files listed in the tutorials, but I had
to add the QT libraries to the makefile.

This  tutorial
<http://umanga.wordpress.com/2010/12/25/configuring-cmake-for-qt-development/>
and the example here-in  was what I used as the basis adding QT files and
classes to cmake.

And of course once cmake is finished don't forget to build.



--
View this message in context: http://www.pcl-users.org/PCL-Visualizer-with-QTCreator-and-QMAKE-tp4023721p4024423.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PCL Visualizer with QTCreator and QMAKE

Ramya
This post has NOT been accepted by the mailing list yet.
In reply to this post by George Bora
Hello sir,
 Can you give me initial details , how to setup cmake configurations in qt creator,I want to use pcl with qt creator in windows?I am new to pcl and cmake. Please guide me.  
Loading...