Point Cloud Library (PCL) 1.13.0
Loading...
Searching...
No Matches
particle_filter.h
1#pragma once
2
3#include <pcl/pcl_macros.h>
4#include <pcl/gpu/containers/device_array.h>
5
6#include <pcl/point_types.h>
7#include <pcl/point_cloud.h>
8#include <pcl/PointIndices.h>
9#include <pcl/pcl_macros.h>
10
11#include <pcl/gpu/kinfu/pixel_rgb.h>
12#include <pcl/tracking/particle_filter.h>
13
14#include "internal.h"
15
16namespace pcl
17{
18 namespace gpu
19 {
21 {
22 public:
23 /** \brief Point type supported */
25 //using NormalType = pcl::Normal;
27
30
32
33 /** \brief Empty constructor. */
35 //: ParticleFilterTracker<PointInT, StateT> ()
36 {
37 tracker_name_ = "ParticleFilterGPUTracker";
38 }
39
40 /** \brief set the number of the particles.
41 * \param particle_num the number of the particles.
42 */
43 inline void
44 setParticleNum (const int particle_num) { particle_num_ = particle_num; }
45
46 /** \brief get the number of the particles. */
47 inline int
48 getParticleNum () const { return particle_num_; }
49
50 /** \brief set a pointer to a reference dataset to be tracked.
51 * \param ref a pointer to a PointCloud message
52 */
53 inline void
55
56 /** \brief get a pointer to a reference dataset to be tracked. */
57 inline DeviceArray2D<PointType> const
58 getReferenceCloud () { return ref_; }
59
60 int
61 cols ();
62
63 int
64 rows ();
65
66 virtual bool
68 {
69
70 }
71
72 virtual void
74 { motion_ = motion; }
75
76 virtual StateType
78
79 protected:
80 std::string tracker_name_;
81
82 virtual bool
84 {
85
86 //pcl::device::initParticles(particle_num_, particle_xyz_, particle_rpy_, particle_weight_ );
87 }
88
89 virtual void
91 {
92
93 }
94
95 virtual void
97 {
98 particles_.create( particle_num_ );
99
100 random_number_generator_.create( particle_num_ );
101
102 }
103
104 // reference point cloud
106
108
109 //DeviceArray2D<NormalType> ref_normals_;
110
111 // input point cloud
113
115
116 //DeviceArray2D<NormalType> input_normals_;
117
118 //StateCloud particles_;
120
121 // random number generate state
123
125
126 std::vector<float> step_noise_covariance_;
127
128 std::vector<float> initial_noise_covariance_;
129
130 std::vector<float> initial_noise_mean_;
131
133
135
137
139
140 /** \brief Height of input depth image. */
141 int rows_;
142 /** \brief Width of input depth image. */
143 int cols_;
144
145 };
146 }
147}
DeviceArray2D class
DeviceArray class
DeviceArray< curandState > rng_states
virtual bool operator()(const DeviceArray2D< PointType > &input, const DeviceArray2D< PixelRGB > &input_colors)
void setParticleNum(const int particle_num)
set the number of the particles.
ParticleFilterGPUTracker()
Empty constructor.
pcl::tracking::ParticleXYZRPY StateType
DeviceArray< StateType > particles_
DeviceArray2D< PointType > const getReferenceCloud()
get a pointer to a reference dataset to be tracked.
void setReferenceCloud(const DeviceArray2D< PointType > &ref)
set a pointer to a reference dataset to be tracked.
int rows_
Height of input depth image.
DeviceArray2D< PointType > input_
DeviceArray2D< PointType > ref_
int getParticleNum() const
get the number of the particles.
DeviceArray2D< PixelRGB > ref_colors_
virtual void setMotion(StateType motion)
DeviceArray2D< PixelRGB > input_colors_
std::vector< float > initial_noise_covariance_
std::vector< float > step_noise_covariance_
int cols_
Width of input depth image.
std::vector< float > initial_noise_mean_
Defines all the PCL implemented PointT point type structures.
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates.
A structure representing RGB color information.