Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
tracking
tracker.h
1
/*
2
* Software License Agreement (BSD License)
3
*
4
* Point Cloud Library (PCL) - www.pointclouds.org
5
* Copyright (c) 2010-2012, Willow Garage, Inc.
6
*
7
* All rights reserved.
8
*
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions
11
* are met:
12
*
13
* * Redistributions of source code must retain the above copyright
14
* notice, this list of conditions and the following disclaimer.
15
* * Redistributions in binary form must reproduce the above
16
* copyright notice, this list of conditions and the following
17
* disclaimer in the documentation and/or other materials provided
18
* with the distribution.
19
* * Neither the name of Willow Garage, Inc. nor the names of its
20
* contributors may be used to endorse or promote products derived
21
* from this software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
* POSSIBILITY OF SUCH DAMAGE.
35
*
36
* $Id: point_cloud.h 4696 2012-02-23 06:12:55Z rusu $
37
*
38
*/
39
40
#pragma once
41
42
#include <pcl/search/search.h>
43
#include <pcl/tracking/tracking.h>
44
#include <
pcl/memory.h
>
45
#include <pcl/pcl_base.h>
46
#include <
pcl/pcl_macros.h
>
47
48
namespace
pcl
{
49
namespace
tracking
{
50
/** \brief @b Tracker represents the base tracker class.
51
* \author Ryohei Ueda
52
* \ingroup tracking
53
*/
54
template
<
typename
Po
int
InT,
typename
StateT>
55
class
Tracker
:
public
PCLBase
<PointInT> {
56
protected
:
57
using
PCLBase
<PointInT>
::deinitCompute
;
58
59
public
:
60
using
PCLBase
<PointInT>
::indices_
;
61
using
PCLBase
<PointInT>
::input_
;
62
63
using
BaseClass
=
PCLBase<PointInT>
;
64
using
Ptr
= shared_ptr<Tracker<PointInT, StateT>>;
65
using
ConstPtr
= shared_ptr<const Tracker<PointInT, StateT>>;
66
67
using
SearchPtr
=
typename
pcl::search::Search<PointInT>::Ptr
;
68
using
SearchConstPtr
=
typename
pcl::search::Search<PointInT>::ConstPtr
;
69
70
using
PointCloudIn
=
pcl::PointCloud<PointInT>
;
71
using
PointCloudInPtr
=
typename
PointCloudIn::Ptr
;
72
using
PointCloudInConstPtr
=
typename
PointCloudIn::ConstPtr
;
73
74
using
PointCloudState
=
pcl::PointCloud<StateT>
;
75
using
PointCloudStatePtr
=
typename
PointCloudState::Ptr
;
76
using
PointCloudStateConstPtr
=
typename
PointCloudState::ConstPtr
;
77
78
public
:
79
/** \brief Empty constructor. */
80
Tracker
() :
search_
() {}
81
82
/** \brief Base method for tracking for all points given in
83
* <setInputCloud (), setIndices ()> using the indices in setIndices ()
84
*/
85
void
86
compute
();
87
88
protected
:
89
/** \brief The tracker name. */
90
std::string
tracker_name_
;
91
92
/** \brief A pointer to the spatial search object. */
93
SearchPtr
search_
;
94
95
/** \brief Get a string representation of the name of this class. */
96
inline
const
std::string&
97
getClassName
()
const
98
{
99
return
(
tracker_name_
);
100
}
101
102
/** \brief This method should get called before starting the actual
103
* computation. */
104
virtual
bool
105
initCompute
();
106
107
/** \brief Provide a pointer to a dataset to add additional information
108
* to estimate the features for every point in the input dataset. This
109
* is optional, if this is not set, it will only use the data in the
110
* input cloud to estimate the features. This is useful when you only
111
* need to compute the features for a downsampled cloud.
112
* \param search a pointer to a PointCloud message
113
*/
114
inline
void
115
setSearchMethod
(
const
SearchPtr
&
search
)
116
{
117
search_
=
search
;
118
}
119
120
/** \brief Get a pointer to the point cloud dataset. */
121
inline
SearchPtr
122
getSearchMethod
()
123
{
124
return
(
search_
);
125
}
126
127
/** \brief Get an instance of the result of tracking. */
128
virtual
StateT
129
getResult
()
const
= 0;
130
131
private
:
132
/** \brief Abstract tracking method. */
133
virtual
void
134
computeTracking() = 0;
135
136
public
:
137
PCL_MAKE_ALIGNED_OPERATOR_NEW
138
};
139
}
// namespace tracking
140
}
// namespace pcl
141
142
#include <pcl/tracking/impl/tracker.hpp>
pcl::PCLBase< PointInT >::input_
PointCloudConstPtr input_
Definition
pcl_base.h:147
pcl::PCLBase< PointInT >::indices_
IndicesPtr indices_
Definition
pcl_base.h:150
pcl::PCLBase< PointInT >::PCLBase
PCLBase()
pcl::PCLBase< PointInT >::deinitCompute
bool deinitCompute()
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition
point_cloud.h:174
pcl::PointCloud< PointInT >::Ptr
shared_ptr< PointCloud< PointInT > > Ptr
Definition
point_cloud.h:414
pcl::PointCloud< PointInT >::ConstPtr
shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition
point_cloud.h:415
pcl::search::Search::ConstPtr
shared_ptr< const pcl::search::Search< PointT > > ConstPtr
Definition
search.h:82
pcl::search::Search::Ptr
shared_ptr< pcl::search::Search< PointT > > Ptr
Definition
search.h:81
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::Ptr
shared_ptr< Tracker< PointInT, Eigen::Affine3f > > Ptr
Definition
tracker.h:64
pcl::tracking::Tracker::getClassName
const std::string & getClassName() const
Get a string representation of the name of this class.
Definition
tracker.h:97
pcl::tracking::Tracker::compute
void compute()
Base method for tracking for all points given in <setInputCloud (), setIndices ()> using the indices ...
Definition
tracker.hpp:30
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::search_
SearchPtr search_
Definition
tracker.h:93
pcl::tracking::Tracker::setSearchMethod
void setSearchMethod(const SearchPtr &search)
Provide a pointer to a dataset to add additional information to estimate the features for every point...
Definition
tracker.h:115
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudStateConstPtr
typename PointCloudState::ConstPtr PointCloudStateConstPtr
Definition
tracker.h:76
pcl::tracking::Tracker::getSearchMethod
SearchPtr getSearchMethod()
Get a pointer to the point cloud dataset.
Definition
tracker.h:122
pcl::tracking::Tracker::getResult
virtual StateT getResult() const =0
Get an instance of the result of tracking.
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::SearchConstPtr
typename pcl::search::Search< PointInT >::ConstPtr SearchConstPtr
Definition
tracker.h:68
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::tracker_name_
std::string tracker_name_
Definition
tracker.h:90
pcl::tracking::Tracker::Tracker
Tracker()
Empty constructor.
Definition
tracker.h:80
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::BaseClass
PCLBase< PointInT > BaseClass
Definition
tracker.h:63
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudInPtr
typename PointCloudIn::Ptr PointCloudInPtr
Definition
tracker.h:71
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudInConstPtr
typename PointCloudIn::ConstPtr PointCloudInConstPtr
Definition
tracker.h:72
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudStatePtr
typename PointCloudState::Ptr PointCloudStatePtr
Definition
tracker.h:75
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::SearchPtr
typename pcl::search::Search< PointInT >::Ptr SearchPtr
Definition
tracker.h:67
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudIn
pcl::PointCloud< PointInT > PointCloudIn
Definition
tracker.h:70
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::ConstPtr
shared_ptr< const Tracker< PointInT, Eigen::Affine3f > > ConstPtr
Definition
tracker.h:65
pcl::tracking::Tracker::initCompute
virtual bool initCompute()
This method should get called before starting the actual computation.
Definition
tracker.hpp:10
pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::PointCloudState
pcl::PointCloud< Eigen::Affine3f > PointCloudState
Definition
tracker.h:74
PCL_MAKE_ALIGNED_OPERATOR_NEW
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition
memory.h:86
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::search
Definition
brute_force.h:45
pcl::tracking
Definition
approx_nearest_pair_point_cloud_coherence.h:7
pcl
Definition
convolution.h:46
pcl_macros.h
Defines all the PCL and non-PCL macros used.