Friday, December 13, 2013

Boost linking error and its solution in ROS

Error


/usr/bin/ld: note: 'boost::signals::connection::~connection()' is defined in DSO /usr/lib/libboost_signals.so.1.46.1 so try adding it to the linker command line
  /usr/lib/libboost_signals.so.1.46.1: could not read symbols: Invalid operation
  collect2: ld returned 1 exit status



Solution

# Put this line before the executable or library in your CMakeLists.txt
   rosbuild_add_boost_directories()
   # assuming that my_target is your executable
   rosbuild_add_executable(my_target my_srcs/my_target.cpp)
   # Put this line after the executable or library:
   rosbuild_link_boost(my_target signals)

If the above steps does not solve the issue then add
target_link_libraries(my_target libboost_system.so)

Thursday, December 12, 2013

OMP Error: /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h:93: undefined reference to `omp_get_num_threads' ---> Solution to this error

Error:


  /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h:93: undefined reference to `omp_get_num_threads'
  CMakeFiles/ndt_feature_eval.dir/src/ndt_feature_eval.o: In function `void Eigen::internal::parallelize_gemm, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> >, int>(Eigen::internal::gemm_functor, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> > const&, int, int, bool)':
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:105: undefined reference to `omp_get_num_threads'
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: undefined reference to `GOMP_parallel_start'
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: undefined reference to `GOMP_parallel_end'
  CMakeFiles/ndt_feature_eval.dir/src/ndt_feature_eval.o: In function `nbThreads':
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:47: undefined reference to `omp_get_max_threads'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/ndt_feature_eval] Error 1
  make[3]: Leaving directory `/home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_feature_reg/build'
  make[2]: *** [CMakeFiles/ndt_feature_eval.dir/all] Error 2
  make[2]: *** Waiting for unfinished jobs....
  Linking CXX executable ../bin/ndt_feature_reg_node
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `lslgeneric::NDTMatcherD2D::derivativesNDT(std::vector*, std::allocator*> > const&, lslgeneric::NDTMap const&, Eigen::Matrix&, Eigen::Matrix&, bool) [clone ._omp_fn.0]':
  /home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_registration/include/impl/ndt_matcher_d2d.hpp:1476: undefined reference to `omp_get_num_threads'
  /home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_registration/include/impl/ndt_matcher_d2d.hpp:1476: undefined reference to `omp_get_thread_num'
  /home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_registration/include/impl/ndt_matcher_d2d.hpp:1476: undefined reference to `GOMP_barrier'
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `void Eigen::internal::parallelize_gemm, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> >, int>(Eigen::internal::gemm_functor, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> > const&, int, int, bool) [clone ._omp_fn.1]':
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: undefined reference to `omp_get_num_threads'
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:131: undefined reference to `omp_get_thread_num'
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `lslgeneric::NDTMatcherD2D::derivativesNDT(std::vector*, std::allocator*> > const&, lslgeneric::NDTMap const&, Eigen::Matrix&, Eigen::Matrix&, bool)':
  /home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_registration/include/impl/ndt_matcher_d2d.hpp:1550: undefined reference to `GOMP_parallel_start'
  /home/sai/fuerte_workspace/oru-ros-pkg-read-only/perception_oru/ndt_registration/include/impl/ndt_matcher_d2d.hpp:1550: undefined reference to `GOMP_parallel_end'
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `Eigen::internal::general_matrix_matrix_product::run(int, int, int, double const*, int, double const*, int, double*, int, double, Eigen::internal::level3_blocking&, Eigen::internal::GemmParallelInfo*)':
  /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h:92: undefined reference to `omp_get_thread_num'
  /usr/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h:93: undefined reference to `omp_get_num_threads'
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `void Eigen::internal::parallelize_gemm, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> >, int>(Eigen::internal::gemm_functor, Eigen::Transpose const>, Eigen::Matrix, Eigen::Matrix, Eigen::internal::gemm_blocking_space<0 -1="" double="" false=""> > const&, int, int, bool)':
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:105: undefined reference to `omp_get_num_threads'
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: undefined reference to `GOMP_parallel_start'
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:145: undefined reference to `GOMP_parallel_end'
  CMakeFiles/ndt_feature_reg_node.dir/src/ndt_feature_reg_node.o: In function `nbThreads':
  /usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:47: undefined reference to `omp_get_max_threads'
  collect2: ld returned 1 exit status



Solution:


Add these lines in your CMakeLists.txt

#check for OpenMP
find_package(OpenMP)
if(OPENMP_FOUND)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  if(MSVC90 OR MSVC10)
    if(MSVC90)
      set(OPENMP_DLL VCOMP90)
    elseif(MSVC10)
      set(OPENMP_DLL VCOMP100)
    endif(MSVC90)
    set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
    set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
  endif(MSVC)
else(OPENMP_FOUND)
  message (STATUS "OpenMP not found")
endif()

if (MSVC)
  Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /O2 ${SSE_FLAGS}")
else (MSVC)
  set(CMAKE_CXX_FLAGS "-O3 ${CMAKE_CXX_FLAGS} ${SSE_FLAGS}")
  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g ${SSE_FLAGS}")
  set(CMAKE_CXX_FLAGS_RELEASE " ${CMAKE_CXX_FLAGS} -O3 ${SSE_FLAGS}")
endif (MSVC)

Thursday, December 5, 2013

pcl17 in ROS . Error " undefined referenced to "

Error 

Built target ROSBUILD_gensrv_lisp
  Built target ROSBUILD_gensrv_cpp
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  [ 88%] Built target rospack_gensrv
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  [ 88%] [ 88%] Built target rosbuild_precompile
  Built target rospack_gensrv_all
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  Linking CXX executable ../bin/depth_odometry_node
  /usr/bin/ld: skipping incompatible /usr/lib/Lib/libOpenNI.so when searching for -lOpenNI
  /usr/bin/ld: skipping incompatible /usr/lib/Lib/libOpenNI.so when searching for -lOpenNI
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::resetLockingPermissions(std::basic_string, std::allocator > const&, boost::interprocess::file_lock&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::nearestKSearch(pcl17::PointXYZ const&, int, std::vector >&, std::vector >&) const'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PassThrough::applyFilterIndices(std::vector >&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::radiusSearch(pcl17::PointXYZ const&, double, std::vector >&, std::vector >&, unsigned int) const'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::KdTreeFLANN(bool)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::search::KdTree::KdTree(bool)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::writeASCII(std::basic_string, std::allocator > const&, sensor_msgs::PointCloud2_ > const&, Eigen::Matrix const&, Eigen::Quaternion const&, int)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::writeBinary(std::basic_string, std::allocator > const&, sensor_msgs::PointCloud2_ > const&, Eigen::Matrix const&, Eigen::Quaternion const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::search::KdTree::setPointRepresentation(boost::shared_ptr const> const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::VoxelGrid::applyFilter(pcl17::PointCloud&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PassThrough::applyFilter(pcl17::PointCloud&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::setLockingPermissions(std::basic_string, std::allocator > const&, boost::interprocess::file_lock&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::cleanup()'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::setEpsilon(float)'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/depth_odometry_node] Error 1
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[2]: *** [CMakeFiles/depth_odometry_node.dir/all] Error 2
  make[2]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package depth_odometry written to:
[ rosmake ]    /home/sai/.ros/rosmake/rosmake_output-20131205-164150/depth_odometry/build_output.log
[rosmake-2] Finished <<< depth_odometry [FAIL] [ 3.10 seconds ]                                                                                      
[ rosmake ] Halting due to failure in package depth_odometry.
[ rosmake ] Waiting for other threads to complete.                                    
[ rosmake ] Results:                                                                                                                                
[ rosmake ] Built 36 packages with 1 failures.                                                                                                      
[ rosmake ] Summary output to directory                                                                                                              
[ rosmake ] /home/sai/.ros/rosmake/rosmake_output-20131205-164150                                                                                    
sai@sai-HP-EliteBook-8460w:~/fuerte_workspace$ rosmake depth_odometry


Solution

Add the lines given below in the CMakeLists.txt

include_directories(/home/sai/fuerte_workspace/pcl17/include/pcl-1.7/)
include_directories(/home/sai/fuerte_workspace/pcl17/lib/)
link_libraries(pcl17_2d ; pcl17_surface ; pcl_io_ply  ;   pcl_people  ; pcl_stereo ;pcl17_common ; pcl17_tracking.so ; pcl_io ;        pcl_people  ;  pcl_stereo; pcl17_features;pcl17_visualization.so  ;pcl_io;pcl_recognition   ;        pcl_stereo ;pcl17_filters    ;       pcl_2d    ;           pcl_io   ;      pcl_recognition;        pcl_surface;pcl17_io_ply    ;       pcl_2d      ;     pcl_kdtree;     pcl_recognition   ;    pcl_surface ;pcl17_io    ;            pcl_2d    ;     pcl_kdtree ;     pcl_registration ;           pcl_surface ;pcl17_kdtree  ;         pcl_common   ;       pcl_kdtree  ;   pcl_registration ;      pcl_tracking ;pcl17_keypoints ;       pcl_common   ;   pcl_keypoints  ;     pcl_registration   ;  pcl_tracking;pcl17_ml    ;    pcl_common;     pcl_keypoints ;   pcl_sample_consensus  ;     pcl_tracking; pcl17_octree  ;         pcl_features ;     pcl_keypoints ; pcl_sample_consensus ;  pcl_visualization; pcl17_people   ;         pcl_features;  pcl_ml  ;           pcl_sample_consensus ; pcl_visualization ;pcl17_recognition   ;   pcl_features  ; pcl_ml   ;     pcl_search  ;               pcl_visualization ;pcl17_registration  ;   pcl_filters   ;     pcl_ml;       pcl_search   ;    pcl17_sample_consensus;  pcl_filters;     pcl_octree   ;        pcl_search; pcl17_search      ;   pcl_filters ;   pcl_octree ;     pcl_segmentation ;pcl17_segmentation;     pcl_io_ply ;        pcl_octree ;    pcl_segmentation; pcl17_stereo;          pcl_io_ply;      pcl_people ;         pcl_segmentation ) 

Tuesday, December 3, 2013

How to use PCL 1.7 in ROS

copied from an answer at

source :  http://answers.ros.org/question/44821/updating-to-pcl-17-in-ros-fuerte/


Ok, I believe I figured out the update for using pcl17.
change directories to your ROS_PACAKGE_PATH

Download the packages from the link below
once you have these checked out change folders,

do

rosdep install
and
rosmake

on each pcl17 and pcl17_ros. Side note, it took a while to run rosmake on pcl17 so make sure you give it enough time.
If you are planning to use these in your package for say a pcl tutorial you have to change your 'manifest.xml'

depend package  = pcl17

and

depend package = pcl17_ros
Once you've done this make sure to update all your references from pcl::  to pcl17::  in your code

Wednesday, November 27, 2013

How to rename an external hdd in ubuntu ?

1. Connect the HDD to computer.
2. Use the Disk Utility too that ships with ubuntu to find out its partition

for example /dev/sdc1 in this case.



3. Unmount the volume.
4. Use this command where hdd is the new name.

sudo ntfslabel /dev/sdc1 hdd


Thats it !

Tuesday, November 19, 2013

Profit on Education

How can a country have better future if government and or private educational institutions make money out of education ?

Good Morning Ppl,

I was trying the Normal Estimation tutorial. The code and errors are given below. I am using the input cloud captured from kinect.

Code

pcl::PointCloud::Ptr cloud1(new pcl::PointCloud);
 if (pcl::io::loadPCDFile ("test1.pcd", *cloud1) == -1) //* load the file
  {
    PCL_ERROR ("Couldn't read file test_pcd.pcd \n");
    return (-1);
  }
  std::cout << "Loaded "
            << cloud1->width * cloud1->height
            << " data points from test_pcd.pcd with the following fields: "
            << std::endl;
     pcl::PointCloud::Ptr normals (new pcl::PointCloud);

             pcl::IntegralImageNormalEstimation ne;
             ne.setNormalEstimationMethod (ne.AVERAGE_3D_GRADIENT);
             ne.setMaxDepthChangeFactor(0.02f);
             ne.setNormalSmoothingSize(10.0f);
             ne.setInputCloud(cloud1);
             ne.compute(*normals);


Error:

 [100%] Building CXX object CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o
  In file included from /usr/include/c++/4.6/backward/strstream:52:0,
                   from /usr/include/vtk-5.8/vtkIOStream.h:112,
                   from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
                   from /usr/include/vtk-5.8/vtkIndent.h:24,
                   from /usr/include/vtk-5.8/vtkObjectBase.h:43,
                   from /usr/include/vtk-5.8/vtkCommand.h:205,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/common/common.h:39,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/pcl_visualizer.h:49,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/cloud_viewer.h:39,
                   from /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp:10:
  /usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
  Linking CXX executable ../bin/iss_on_cloud
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o: In function `pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)':
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)]+0x88): undefined reference to `pcl::search::OrganizedNeighbor::estimateFocalLengthFromInputCloud(pcl::PointCloud const&)'
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)]+0xa2): undefined reference to `pcl::search::OrganizedNeighbor::generateRadiusLookupTable(unsigned int, unsigned int)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o: In function `pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)':
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)]+0xd8): undefined reference to `pcl::search::OrganizedNeighbor::estimateFocalLengthFromInputCloud(pcl::PointCloud const&)'
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)]+0xf2): undefined reference to `pcl::search::OrganizedNeighbor::generateRadiusLookupTable(unsigned int, unsigned int)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x24): undefined reference to `pcl::search::OrganizedNeighbor::nearestKSearch(pcl::PointCloud const&, int, int, std::vector >&, std::vector >&)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x28): undefined reference to `pcl::search::OrganizedNeighbor::nearestKSearch(int, int, std::vector >&, std::vector >&)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x30): undefined reference to `pcl::search::OrganizedNeighbor::radiusSearch(pcl::PointXYZ const&, double, std::vector >&, std::vector >&, int) const'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x38): undefined reference to `pcl::search::OrganizedNeighbor::radiusSearch(int, double, std::vector >&, std::vector >&, int) const'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/iss_on_cloud] Error 1
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[2]: *** [CMakeFiles/iss_on_cloud.dir/all] Error 2
  make[2]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
-------------------------------------------------------------------------------}


Solution

If any one gets a solution please let me know

saimanoj18@gmail.com



How to save files in a loop ?

source: http://stackoverflow.com/questions/4232842/how-to-dynamically-change-filename-while-writing-in-a-loop

How to save pcdfiles in a loop ?

In the code segment below, count increments as the new point cloud comes in...


char file_name[64];

sprintf (file_name, "file%d.pcd", count);

pcl::io::savePCDFile(file_name, *cloud);

How to upgrade GCC/G++ to a newer version

Steps to update gcc/g++



sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50


source: http://askubuntu.com/questions/271388/how-to-install-gcc-4-8-in-ubuntu-12-04-from-the-terminal

Solution to cc1plus: error: unrecognized command line option ‘-std=c++11’

If you get an error like this

cc1plus: error: unrecognized command line option ‘-std=c++11’

Then 

Step 1 : Update your gcc/g++ compiler to the latest version

Step 2 :

Change the line 

SET( CMAKE_CXX_FLAGS         "-std=c++11 -Wall -Wno-deprecated -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -DUNIX_ENVIRONMENT -DHAVE_NAMESPACES -DHAVE_STD " )


SET( CMAKE_CXX_FLAGS         "-std=c++11 -Wall " )

SET( CMAKE_CXX_FLAGS         "-Wno-deprecated -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -DUNIX_ENVIRONMENT -DHAVE_NAMESPACES -DHAVE_STD " )


Hope this solve the issue.

If it doesnt,
 then 

Step 3 : GOOGLE :)