Getting Started with PCL, using Eclipse

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Started with PCL, using Eclipse

FrankJeroen
Hello,

I'm just started with PCL. But I already like the amount of tutorials. I'm working in Ubuntu (and am not an experienced user, but school wanted running it in Ubuntu).

To get the tutorials running in the terminal wasn't a problem..
But I'm now trying to get PCL running in Eclipse (also in ubuntu). Cause I think it's easier to debug.
I have included the pcl1.1-directory and also the eigen3-directory.
I also added these directories in the library at the CrossG ++ Linker..
But I'm still getting this error.. Seems something is not included correct..

What am I missing? I'm just trying to run the Writing Point Cloud Data-tutorial.

**** Build of configuration Debug_with_Cross GCC for project Test ****

make all
Building target: Test
Invoking: Cross G++ Linker
g++ -L/usr/include/pcl-1.1 -L/usr/include/eigen3 -o "Test"  ./pcd_read.o  
./pcd_read.o: In function `pcl::PCDWriter::write(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool)':
/usr/include/pcl-1.1/pcl/io/pcd_io.h:231: undefined reference to `pcl::PCDWriter::writeBinary(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)'
/usr/include/pcl-1.1/pcl/io/pcd_io.h:233: undefined reference to `pcl::PCDWriter::writeASCII(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sensor_msgs::PointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, int)'
collect2: ld returned 1 exit status
make: *** [Test] Error 1

**** Build Finished ****


Many thanks in advance!

Greetings,
Jeroen  

Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

Jochen Sprickerhof
Administrator
* FrankJeroen <[hidden email]> [2011-08-20 02:02]:
> Hello,

Hi Jeroen,

> I'm just started with PCL. But I already like the amount of tutorials. I'm
> working in Ubuntu (and am not an experienced user, but school wanted running
> it in Ubuntu).
>
> To get the tutorials running in the terminal wasn't a problem..
> But I'm now trying to get PCL running in Eclipse (also in ubuntu). Cause I
> think it's easier to debug.
> I have included the pcl1.1-directory and also the eigen3-directory.
> I also added these directories in the library at the CrossG ++ Linker..
> But I'm still getting this error.. Seems something is not included correct..
>
> What am I missing? I'm just trying to run the Writing Point Cloud
> Data-tutorial.

you don't link against libpcl_io.so.

> **** Build of configuration Debug_with_Cross GCC for project Test ****
>
> make all
> Building target: Test
> Invoking: Cross G++ Linker
> g++ -L/usr/include/pcl-1.1 -L/usr/include/eigen3 -o "Test"  ./pcd_read.o  
> ./pcd_read.o: In function `pcl::PCDWriter::write(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&, bool)':
> /usr/include/pcl-1.1/pcl/io/pcd_io.h:231: undefined reference to
> `pcl::PCDWriter::writeBinary(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&)'
> /usr/include/pcl-1.1/pcl/io/pcd_io.h:233: undefined reference to
> `pcl::PCDWriter::writeASCII(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&, int)'
> collect2: ld returned 1 exit status
> make: *** [Test] Error 1
>
> **** Build Finished ****
>
>
> Many thanks in advance!
>
> Greetings,
> Jeroen  

Cheers,

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

Re: Getting Started with PCL, using Eclipse

aichim
Administrator
In reply to this post by FrankJeroen
Hello Jeroen,


I presume you just manually added the PCL folders to the project. I recommend you use the Eclipse CDT4 Generator, which is an option for the CMake tool. Basically, you just need to do this:
cmake -G"Eclipse CDT4 - Unix Makefiles" <path_to_CMakeLists.txt>

This will generate the .project and .cproject files Eclipse needs. Then you just go to Eclipse and import -> Existing projects to workspace and point it to the pcl folder where you have the .project file generated.
The only problem with this method is that you need to do in-place building, i.e., you cannot have a separate build/ folder => things might get a bit messy. There are some explanations about how to do this online, but I never bothered.
 
This method should have PCL up and running with working debugging symbols and everything.

Have fun!
Cheers,
Alex


On Aug 20, 2011, at 12:02 PM, FrankJeroen wrote:

> Hello,
>
> I'm just started with PCL. But I already like the amount of tutorials. I'm
> working in Ubuntu (and am not an experienced user, but school wanted running
> it in Ubuntu).
>
> To get the tutorials running in the terminal wasn't a problem..
> But I'm now trying to get PCL running in Eclipse (also in ubuntu). Cause I
> think it's easier to debug.
> I have included the pcl1.1-directory and also the eigen3-directory.
> I also added these directories in the library at the CrossG ++ Linker..
> But I'm still getting this error.. Seems something is not included correct..
>
> What am I missing? I'm just trying to run the Writing Point Cloud
> Data-tutorial.
>
> **** Build of configuration Debug_with_Cross GCC for project Test ****
>
> make all
> Building target: Test
> Invoking: Cross G++ Linker
> g++ -L/usr/include/pcl-1.1 -L/usr/include/eigen3 -o "Test"  ./pcd_read.o  
> ./pcd_read.o: In function `pcl::PCDWriter::write(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&, bool)':
> /usr/include/pcl-1.1/pcl/io/pcd_io.h:231: undefined reference to
> `pcl::PCDWriter::writeBinary(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&)'
> /usr/include/pcl-1.1/pcl/io/pcd_io.h:233: undefined reference to
> `pcl::PCDWriter::writeASCII(std::basic_string&lt;char,
> std::char_traits&lt;char&gt;, std::allocator<char> > const&,
> sensor_msgs::PointCloud2 const&, Eigen::Matrix&lt;float, 4, 1, 0, 4, 1&gt;
> const&, Eigen::Quaternion&lt;float, 0&gt; const&, int)'
> collect2: ld returned 1 exit status
> make: *** [Test] Error 1
>
> **** Build Finished ****
>
>
> Many thanks in advance!
>
> Greetings,
> Jeroen  
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Getting-Started-with-PCL-using-Eclipse-tp3270182p3270182.html
> Sent from the Point Cloud Library (PCL) Users 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
|

Re: Getting Started with PCL, using Eclipse

Florin
Hello,

I've successfully imported the project, unfortunately I get 'symbol/function could not be resolved' for pcl and boost items.
I'm running standalone Eclipse indigo with cdt version 8 under ubuntu 10.04.
Do you have any idea why it would behave this way?
the CMakeLists.txt looks like this:

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(kft)

find_package(PCL 1.3 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable(kft main.cpp)
target_link_libraries(kft ${PCL_LIBRARIES})

I can cmake and make successfully both in shell as well as eclipse.

I'm building in-source eg. /path/to/project/* CMakeLists.txt main.cpp ... etc all in one place.
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

Florin
This post was updated on .
I think I had an error in the CMakeLists.txt file. Apparently cmake didn't care about it, but eclipse did. So now it works.
Edit:
It was actually the fact that I was running eclipse in terminal which let eclipse know ${PCL_LIBRARIES} .
When u run eclipse binary by mouse-click add ${PCL_LIBRARIES} to your path variables.
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

berker
Hi,

I am having the same problem with Florin.

symbol/function could not be resolved.

I am able to build from both eclipse and shell but eclipse shows problems/errors.

My CMakeLists.txt looks like this.

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(PCL_denemeIO)
find_package(PCL 1.0 REQUIRED COMPONENTS io)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(write_test write_test.cpp)
target_link_libraries(write_test ${PCL_LIBRARIES})

I am calling the cmake inside the project folder in eclipse.


~/workspace/PCL_denemeIO> cmake -G "Eclipse CDT4 - Unix Makefiles" CMakeLists.txt
Middle East Technical University
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

berker
This post was updated on .
The problem is solved if you call cmake in another directory, then import this project to the one in workspace.

Is there an easier way?
Middle East Technical University
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

vlitomsk
In reply to this post by Florin
Does `path variables` equals $PATH in linux? And how could I get value of ${PCL_LIBRARIES}?
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

vlitomsk
In reply to this post by berker
Eclipse says, that all includes are OK. When I Ctrl-click, for example, to `#include <pcl/point_types.h>`, Eclipse opens header from /usr/include/pcl-1.6. May be something happened with eclipse index? I ran cmake -G "..." outside the project folder, and Eclipse successfully opened project.
My CMakeLists.txt:
   cmake_minimum_required(VERSION 2.8 FATAL_ERROR) 
    
   project(pclpart) 
   
   find_package(PCL 1.2 REQUIRED)
   
   include_directories(${PCL_INCLUDE_DIRS})
   link_directories(${PCL_LIBRARY_DIRS})
   add_definitions(${PCL_DEFINITIONS})
  
   add_executable (pclpart src/collector.cpp src/main.cpp)
   target_link_libraries (pclpart ${PCL_LIBRARIES})
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

Radu B. Rusu
Administrator
Working with PCL in Eclipse should be no different than working with any other CMake-based project in Eclipse. Perhaps
you could try to see if everything works well on your machine using just cmake/make first, and only then try to use
Eclipse? Just a thought.

Cheers,
Radu.
--
http://openperception.org

On 01/09/2013 06:34 AM, vlitomsk wrote:

> Eclipse says, that all includes are OK. When I Ctrl-click, for example, to
> `#include <pcl/point_types.h>`, Eclipse opens header from
> /usr/include/pcl-1.6. May be something happened with eclipse index? I ran
> cmake -G "..." outside the project folder, and Eclipse successfully opened
> project.
> My CMakeLists.txt:
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Getting-Started-with-PCL-using-Eclipse-tp3270182p4025285.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
|

Re: Getting Started with PCL, using Eclipse

yeshasvi
This post has NOT been accepted by the mailing list yet.
In reply to this post by FrankJeroen
Hello,

I am trying to work with pcl in eclipse but I have resolution issues in eclipse. I tried index rebuilding but nothing improved

I am following this tutorial
http://pointclouds.org/documentation/tutorials/using_pcl_with_eclipse.php#id4 

and i noticed that in my cmake output i get the following

Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Using CATKIN_DEVEL_PREFIX: /home/yeshi/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/yeshi/catkin_ws/build/kinect_sample/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Could NOT find openni (missing:  OPENNI_INCLUDE_DIRS)
** WARNING ** io features related to openni will be disabled
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Could NOT find openni (missing:  OPENNI_INCLUDE_DIRS)
** WARNING ** visualization features related to openni will be disabled
-- looking for PCL_COMMON
-- looking for PCL_KDTREE
-- looking for PCL_OCTREE
-- looking for PCL_SEARCH
-- looking for PCL_SAMPLE_CONSENSUS
-- looking for PCL_IO
-- looking for PCL_GEOMETRY
-- looking for PCL_FEATURES
-- looking for PCL_FILTERS
-- looking for PCL_KEYPOINTS
-- looking for PCL_SURFACE
-- looking for PCL_REGISTRATION
-- looking for PCL_SEGMENTATION
-- looking for PCL_VISUALIZATION
-- looking for PCL_TRACKING
-- Configuring done
-- Generating done

It cannot find OPENNI include directories or libopenni.so files.
is this the reason for functions not being resolved in eclipse and how do i fix the openni includes
Please let me know

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

Sergey
Administrator
Hi,

Do you have `libopenni-dev` package installed?

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

yeshasvi
This post has NOT been accepted by the mailing list yet.

No

On Aug 21, 2014 6:19 PM, "Sergey [via Point Cloud Library (PCL) Users mailing list]" <[hidden email]> wrote:
Hi,

Do you have `libopenni-dev` package installed?

Regards,
Sergey


If you reply to this email, your message will be added to the discussion below:
http://www.pcl-users.org/Getting-Started-with-PCL-using-Eclipse-tp3270182p4035223.html
To unsubscribe from Getting Started with PCL, using Eclipse, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Getting Started with PCL, using Eclipse

yeshasvi
This post has NOT been accepted by the mailing list yet.
In reply to this post by Sergey

I figured out the solution I am using FindopenNI.CMake and find package for openni in CMake lists

On Aug 21, 2014 6:19 PM, "Sergey [via Point Cloud Library (PCL) Users mailing list]" <[hidden email]> wrote:
Hi,

Do you have `libopenni-dev` package installed?

Regards,
Sergey


If you reply to this email, your message will be added to the discussion below:
http://www.pcl-users.org/Getting-Started-with-PCL-using-Eclipse-tp3270182p4035223.html
To unsubscribe from Getting Started with PCL, using Eclipse, click here.
NAML