Point Cloud Library (PCL)  1.8.1
particle_filter.h
1 #ifndef PCL_GPU_TRACKING_PARTICLE_FILTER_H_
2 #define PCL_GPU_TRACKING_PARTICLE_FILTER_H_
3 
4 #include <pcl/pcl_macros.h>
5 #include <pcl/gpu/containers/device_array.h>
6 
7 #include <pcl/point_types.h>
8 #include <pcl/point_cloud.h>
9 #include <pcl/PointIndices.h>
10 #include <pcl/pcl_macros.h>
11 
12 #include <pcl/gpu/kinfu/pixel_rgb.h>
13 #include <pcl/tracking/particle_filter.h>
14 
15 #include <Eigen/Dense>
16 
17 #include "internal.h"
18 
19 namespace pcl
20 {
21  namespace gpu
22  {
24  {
25  public:
26  /** \brief Point type supported */
28  //typedef pcl::Normal NormalType;
29  typedef pcl::RGB PixelRGB;
30 
33 
35 
36  /** \brief Empty constructor. */
38  //: ParticleFilterTracker<PointInT, StateT> ()
39  {
40  tracker_name_ = "ParticleFilterGPUTracker";
41  }
42 
43  /** \brief set the number of the particles.
44  * \param particle_num the number of the particles.
45  */
46  inline void
47  setParticleNum (const int particle_num) { particle_num_ = particle_num; }
48 
49  /** \brief get the number of the particles. */
50  inline int
51  getParticleNum () const { return particle_num_; }
52 
53  /** \brief set a pointer to a reference dataset to be tracked.
54  * \param ref a pointer to a PointCloud message
55  */
56  inline void
58 
59  /** \brief get a pointer to a reference dataset to be tracked. */
60  inline DeviceArray2D<PointType> const
61  getReferenceCloud () { return ref_; }
62 
63  int
64  cols ();
65 
66  int
67  rows ();
68 
69  virtual bool
71  {
72 
73  }
74 
75  virtual void
76  setMotion (StateType motion)
77  { motion_ = motion; }
78 
79  virtual StateType
80  getResult();
81 
82  protected:
83  std::string tracker_name_;
84 
85  virtual bool
87  {
88 
89  //pcl::device::initParticles(particle_num_, particle_xyz_, particle_rpy_, particle_weight_ );
90  }
91 
92  virtual void
94  {
95 
96  }
97 
98  virtual void
100  {
101  particles_.create( particle_num_ );
102 
103  random_number_generator_.create( particle_num_ );
104 
105  }
106 
107  // reference point cloud
109 
111 
112  //DeviceArray2D<NormalType> ref_normals_;
113 
114  // input point cloud
116 
118 
119  //DeviceArray2D<NormalType> input_normals_;
120 
121  //StateCloud particles_;
123 
124  // random number generate state
126 
128 
129  std::vector<float> step_noise_covariance_;
130 
131  std::vector<float> initial_noise_covariance_;
132 
133  std::vector<float> initial_noise_mean_;
134 
135  StateType motion_;
136 
138 
140 
142 
143  /** \brief Height of input depth image. */
144  int rows_;
145  /** \brief Width of input depth image. */
146  int cols_;
147 
148  };
149  }
150 }
151 
152 #endif // PCL_GPU_TRACKING_PARTICLE_FILTER_H_
virtual bool operator()(const DeviceArray2D< PointType > &input, const DeviceArray2D< PixelRGB > &input_colors)
void setReferenceCloud(const DeviceArray2D< PointType > &ref)
set a pointer to a reference dataset to be tracked.
DeviceArray< StateType > particles_
void setParticleNum(const int particle_num)
set the number of the particles.
DeviceArray2D class
Definition: device_array.h:154
std::vector< float > initial_noise_mean_
DeviceArray2D< PixelRGB > input_colors_
DeviceArray2D< PointType > input_
pcl::PointXYZ PointType
Point type supported.
A structure representing RGB color information.
DeviceArray class
Definition: device_array.h:57
int getParticleNum() const
get the number of the particles.
Defines all the PCL implemented PointT point type structures.
A point structure representing Euclidean xyz coordinates.
DeviceArray2D< PointType > ref_
int cols_
Width of input depth image.
int rows_
Height of input depth image.
DeviceArray2D< PixelRGB > ref_colors_
std::vector< float > initial_noise_covariance_
virtual void setMotion(StateType motion)
std::vector< float > step_noise_covariance_
DeviceArray< curandState > rng_states
ParticleFilterGPUTracker()
Empty constructor.
pcl::tracking::ParticleXYZRPY StateType
DeviceArray2D< PointType > const getReferenceCloud()
get a pointer to a reference dataset to be tracked.