Re: [ros-users] Linking problems with pcl

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Linking problems with pcl
Hi Lorenz,

you were right. After "make clean" and "make", the linking error is gone.

Thank you!

Sabrina

Zitat von Lorenz Mösenlechner <>:

> Hi Sabrina,
>
> can you try a 'make clean' in pcl and then remake it? Maybe something
> went wrong while building the pcl library you are linking against.
>
> Lorenz
>
>> Hi Lorenz, hi Radu,
>>
>> thank you for your answers.
>>
>> I am using revision 32800 of the point_cloud_perception stack, which
>> we checked out yesterday after the new release.
>>
>> I even tried a very minimalistic example, which now is similar to the
>> example in test/test_io.cpp
>> void cloudCallback(const sensor_msgs::PointCloud2ConstPtr& cloud)
>> {
>>     sensor_msgs::PointCloud2 cloud_test;
>>     Eigen3::MatrixXf points;
>>     pcl::getPointCloudAsEigen (cloud_test, points);
>> }

>>
>> But even here I get the mentioned linking error.
>>
>> As a workaround I copied the function getPointCloudAsEigen into my own
>> source file, which seems to work fine.
>>
>> Regards,
>> Sabrina
>>
>> Zitat von Radu Bogdan Rusu <>:
>>
>> > Sabrina, you can look at test/test_io.cpp in PCL for an example on
>> > how getPointCloudAsEigen is used, in case you haven't
>> > figured out what the error was.
>> >
>> > Cheers,
>> > Radu.
>> >
>> >
>> > On 09/21/2010 06:48 AM, wrote:
>> >> Hi everybody,
>> >>
>> >> I get this error:
>> >>
>> CMakeFiles/geometry_based_obstacle_detector.dir/src/geometry_based_obstacle_detector.o: In function `cloudCallback(boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void>
>> >
>> >> const>
>> >> const&)':
>> >>
>> /home/skliegl/GETbot/svn/ros/pcl_tools/src/geometry_based_obstacle_detector.cpp:19: undefined reference to `pcl::getPointCloudAsEigen(sensor_msgs::PointCloud2_<std::allocator<void> > const&, Eigen3::Matrix<float, -1, -1,
>> 0,
>> >> -1,
>> >> -1>&)'
>> >>
>> >> The mentioned function is:
>> >> void cloudCallback(const sensor_msgs::PointCloud2ConstPtr&  cloud)
>> >> {
>> >>     Eigen3::MatrixXf points;
>> >>     pcl::getPointCloudAsEigen (*cloud, points);

>> >>
>> >> }
>> >>
>> >> The corresponding part of the CMakeLists.txt:
>> >> rosbuild_add_executable( geometry_based_obstacle_detector
>> >> src/geometry_based_obstacle_detector.cpp)
>> >> target_link_libraries(geometry_based_obstacle_detector pcl_io)
>> >>
>> >> Any ideas?
>> >>
>> >> Thank you,
>> >> Sabrina
>> >>
>> >>
>> >> _______________________________________________
>> >> ros-users mailing list
>> >>
>> >> https://code.ros.org/mailman/listinfo/ros-users
>> > _______________________________________________
>> > ros-users mailing list
>> >
>> > https://code.ros.org/mailman/listinfo/ros-users
>> >
>> >
>>
>>
>>
>>
>> _______________________________________________
>> ros-users mailing list
>>
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>
> --
> Lorenz Mösenlechner            | 
> Technische Universität München | Boltzmannstr. 3
> 85748 Garching bei München     | Germany
> http://ias.cs.tum.edu/         | Tel: +49 (89) 289-26910
> _______________________________________________
> ros-users mailing list
> 
> https://code.ros.org/mailman/listinfo/ros-users

>