Skip to content

Commit

Permalink
simplified and sped up the compilation of @pcl_tracking@
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@8364 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
rbrusu committed Jan 2, 2013
1 parent f6e13e3 commit 1882a45
Show file tree
Hide file tree
Showing 22 changed files with 125 additions and 89 deletions.
8 changes: 1 addition & 7 deletions tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ if(build)
set(srcs
src/tracking.cpp
src/particle_filter.cpp
src/particle_filter_omp.cpp
src/kld_adaptive_particle_filter.cpp
src/kld_adaptive_particle_filter_omp.cpp
src/nearest_pair_point_cloud_coherence.cpp
src/approx_nearest_pair_point_cloud_coherence.cpp
src/distance_coherence.cpp
src/normal_coherence.cpp
src/hsv_color_coherence.cpp
src/coherence.cpp
)

set(incs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define PCL_TRACKING_IMPL_APPROX_NEAREST_PAIR_POINT_CLOUD_COHERENCE_H_

#include <pcl/search/octree.h>
#include <pcl/tracking/approx_nearest_pair_point_cloud_coherence.h>

namespace pcl
{
Expand Down
3 changes: 3 additions & 0 deletions tracking/include/pcl/tracking/impl/coherence.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef PCL_TRACKING_IMPL_COHERENCE_H_
#define PCL_TRACKING_IMPL_COHERENCE_H_

#include <pcl/console/print.h>
#include <pcl/tracking/coherence.h>

namespace pcl
{
namespace tracking
Expand Down
1 change: 1 addition & 0 deletions tracking/include/pcl/tracking/impl/distance_coherence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define PCL_TRACKING_IMPL_DISTANCE_COHERENCE_H_

#include <Eigen/Dense>
#include <pcl/tracking/distance_coherence.h>

namespace pcl
{
Expand Down
19 changes: 5 additions & 14 deletions tracking/include/pcl/tracking/impl/hsv_color_coherence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@
#ifndef PCL_TRACKING_IMPL_HSV_COLOR_COHERENCE_H_
#define PCL_TRACKING_IMPL_HSV_COLOR_COHERENCE_H_

#include <Eigen/Dense>

#ifdef BUILD_Maintainer
# if defined __GNUC__
# pragma GCC system_header
# elif defined _MSC_VER
# pragma warning(push, 1)
# endif
#if defined __GNUC__
# pragma GCC system_header
#endif

#include <pcl/tracking/hsv_color_coherence.h>
#include <Eigen/Dense>

namespace pcl
{
namespace tracking
Expand Down Expand Up @@ -176,10 +173,4 @@ namespace pcl

#define PCL_INSTANTIATE_HSVColorCoherence(T) template class PCL_EXPORTS pcl::tracking::HSVColorCoherence<T>;

#ifdef BUILD_Maintainer
# if defined _MSC_VER
# pragma warning(pop)
# endif
#endif

#endif
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_FILTER_H_
#define PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_FILTER_H_

#include <pcl/tracking/kld_adaptive_particle_filter.h>

template <typename PointInT, typename StateT> bool
pcl::tracking::KLDAdaptiveParticleFilterTracker<PointInT, StateT>::initCompute ()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_OMP_FILTER_H_
#define PCL_TRACKING_IMPL_KLD_ADAPTIVE_PARTICLE_OMP_FILTER_H_

#include <pcl/tracking/kld_adaptive_particle_filter_omp.h>

template <typename PointInT, typename StateT> void
pcl::tracking::KLDAdaptiveParticleFilterOMPTracker<PointInT, StateT>::weight ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <pcl/search/kdtree.h>
#include <pcl/search/organized.h>
#include <pcl/tracking/nearest_pair_point_cloud_coherence.h>

namespace pcl
{
Expand Down
2 changes: 2 additions & 0 deletions tracking/include/pcl/tracking/impl/normal_coherence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define PCL_TRACKING_IMPL_NORMAL_COHERENCE_H_

#include <pcl/common/common.h>
#include <pcl/console/print.h>
#include <pcl/tracking/normal_coherence.h>

template <typename PointInT> double
pcl::tracking::NormalCoherence<PointInT>::computeCoherence (PointInT &source, PointInT &target)
Expand Down
1 change: 1 addition & 0 deletions tracking/include/pcl/tracking/impl/particle_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <pcl/common/eigen.h>
#include <pcl/common/transforms.h>
#include <pcl/tracking/boost.h>
#include <pcl/tracking/particle_filter.h>

template <typename PointInT, typename StateT> bool
pcl::tracking::ParticleFilterTracker<PointInT, StateT>::initCompute ()
Expand Down
2 changes: 2 additions & 0 deletions tracking/include/pcl/tracking/impl/particle_filter_omp.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef PCL_TRACKING_IMPL_PARTICLE_OMP_FILTER_H_
#define PCL_TRACKING_IMPL_PARTICLE_OMP_FILTER_H_

#include <pcl/tracking/particle_filter_omp.h>

template <typename PointInT, typename StateT> void
pcl::tracking::ParticleFilterOMPTracker<PointInT, StateT>::weight ()
{
Expand Down
1 change: 1 addition & 0 deletions tracking/include/pcl/tracking/impl/tracker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <pcl/common/eigen.h>
#include <ctime>
#include <pcl/tracking/boost.h>
#include <pcl/tracking/tracker.h>

template <typename PointInT, typename StateT> bool
pcl::tracking::Tracker<PointInT, StateT>::initCompute ()
Expand Down
1 change: 1 addition & 0 deletions tracking/include/pcl/tracking/tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define PCL_TRACKING_TRACKER_H_

#include <pcl/tracking/tracking.h>
#include <pcl/pcl_base.h>
#include <pcl/search/search.h>

namespace pcl
Expand Down
8 changes: 0 additions & 8 deletions tracking/src/approx_nearest_pair_point_cloud_coherence.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand All @@ -16,7 +16,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage, Inc. nor the names of its
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
Expand All @@ -33,15 +33,20 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#include <pcl/tracking/impl/approx_nearest_pair_point_cloud_coherence.hpp>
#include <pcl/tracking/impl/distance_coherence.hpp>
#include <pcl/tracking/impl/hsv_color_coherence.hpp>
#include <pcl/tracking/impl/nearest_pair_point_cloud_coherence.hpp>
#include <pcl/tracking/impl/normal_coherence.hpp>

#ifndef PCL_NO_PRECOMPILE
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>

#include <pcl/tracking/nearest_pair_point_cloud_coherence.h>
#include <pcl/tracking/impl/nearest_pair_point_cloud_coherence.hpp>
PCL_INSTANTIATE(ApproxNearestPairPointCloudCoherence, PCL_XYZ_POINT_TYPES)
PCL_INSTANTIATE(DistanceCoherence, PCL_XYZ_POINT_TYPES)
PCL_INSTANTIATE(HSVColorCoherence, (pcl::PointXYZRGB)(pcl::PointXYZRGBNormal)(pcl::PointXYZRGBA))
PCL_INSTANTIATE(NearestPairPointCloudCoherence, PCL_XYZ_POINT_TYPES)
PCL_INSTANTIATE(NormalCoherence, PCL_NORMAL_POINT_TYPES)
#endif // PCL_NO_PRECOMPILE

PCL_INSTANTIATE_PRODUCT(NearestPairPointCloudCoherence, (PCL_XYZ_POINT_TYPES))
8 changes: 0 additions & 8 deletions tracking/src/distance_coherence.cpp

This file was deleted.

8 changes: 0 additions & 8 deletions tracking/src/hsv_color_coherence.cpp

This file was deleted.

47 changes: 44 additions & 3 deletions tracking/src/kld_adaptive_particle_filter.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#include <pcl/tracking/kld_adaptive_particle_filter.h>
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <pcl/tracking/impl/kld_adaptive_particle_filter.hpp>
#include <pcl/tracking/impl/kld_adaptive_particle_filter_omp.hpp>

#ifndef PCL_NO_PRECOMPILE
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#define PCL_TRACKING_NORMAL_SUPPORTED
PCL_INSTANTIATE_PRODUCT(KLDAdaptiveParticleFilterTracker, ((pcl::PointNormal) (pcl::PointXYZINormal) (pcl::PointXYZRGBNormal))(PCL_STATE_POINT_TYPES))
PCL_INSTANTIATE_PRODUCT(KLDAdaptiveParticleFilterOMPTracker, ((pcl::PointNormal) (pcl::PointXYZINormal) (pcl::PointXYZRGBNormal))(PCL_STATE_POINT_TYPES))
#undef PCL_TRACKING_NORMAL_SUPPORTED
PCL_INSTANTIATE_PRODUCT(KLDAdaptiveParticleFilterOMPTracker, ((pcl::PointXYZ) (pcl::PointXYZI) (pcl::PointXYZRGBA) (pcl::PointXYZRGB) (pcl::InterestPoint) (pcl::PointWithRange) (pcl::PointWithViewpoint) (pcl::PointWithScale))(PCL_STATE_POINT_TYPES))
PCL_INSTANTIATE_PRODUCT(KLDAdaptiveParticleFilterTracker, ((pcl::PointXYZ) (pcl::PointXYZI) (pcl::PointXYZRGBA) (pcl::PointXYZRGB) (pcl::InterestPoint) (pcl::PointWithRange) (pcl::PointWithViewpoint) (pcl::PointWithScale))(PCL_STATE_POINT_TYPES))
#endif // PCL_NO_PRECOMPILE

10 changes: 0 additions & 10 deletions tracking/src/kld_adaptive_particle_filter_omp.cpp

This file was deleted.

8 changes: 0 additions & 8 deletions tracking/src/normal_coherence.cpp

This file was deleted.

46 changes: 43 additions & 3 deletions tracking/src/particle_filter.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#include <pcl/tracking/particle_filter.h>
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <pcl/tracking/impl/particle_filter.hpp>
#include <pcl/tracking/impl/particle_filter_omp.hpp>

#ifndef PCL_NO_PRECOMPILE
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#define PCL_TRACKING_NORMAL_SUPPORTED
PCL_INSTANTIATE_PRODUCT(ParticleFilterTracker, ((pcl::PointNormal) (pcl::PointXYZINormal) (pcl::PointXYZRGBNormal))(PCL_STATE_POINT_TYPES))
PCL_INSTANTIATE_PRODUCT(ParticleFilterOMPTracker, ((pcl::PointNormal) (pcl::PointXYZINormal) (pcl::PointXYZRGBNormal))(PCL_STATE_POINT_TYPES))
#undef PCL_TRACKING_NORMAL_SUPPORTED
PCL_INSTANTIATE_PRODUCT(ParticleFilterTracker, ((pcl::PointXYZ) (pcl::PointXYZI) (pcl::PointXYZRGBA) (pcl::PointXYZRGB) (pcl::InterestPoint) (pcl::PointWithRange) (pcl::PointWithViewpoint) (pcl::PointWithScale))(PCL_STATE_POINT_TYPES))
PCL_INSTANTIATE_PRODUCT(ParticleFilterOMPTracker, ((pcl::PointXYZ) (pcl::PointXYZI) (pcl::PointXYZRGBA) (pcl::PointXYZRGB) (pcl::InterestPoint) (pcl::PointWithRange) (pcl::PointWithViewpoint) (pcl::PointWithScale))(PCL_STATE_POINT_TYPES))
#endif // PCL_NO_PRECOMPILE

10 changes: 0 additions & 10 deletions tracking/src/particle_filter_omp.cpp

This file was deleted.

0 comments on commit 1882a45

Please sign in to comment.