32 #include <android/log.h> 37 #include <pcl/point_cloud.h> 38 #include <pcl/point_types.h> 39 #include <pcl/Vertices.h> 40 #include <pcl/pcl_base.h> 88 1.0
f, 0.0
f, 0.0
f, 0.0
f,
89 0.0
f, -1.0
f, 0.0
f, 0.0
f,
90 0.0
f, 0.0
f, -1.0
f, 0.0
f);
93 1.0
f, 0.0
f, 0.0
f, 0.0
f,
94 0.0
f, 0.0
f, 1.0
f, 0.0
f,
95 0.0
f, -1.0
f, 0.0
f, 0.0
f);
98 0.0
f, 1.0
f, 0.0
f, 0.0
f,
99 -1.0
f, 0.0
f, 0.0
f, 0.0
f,
100 0.0
f, 0.0
f, 1.0
f, 0.0
f);
103 0.0
f, -1.0
f, 0.0
f, 0.0
f,
104 0.0
f, 0.0
f, 1.0
f, 0.0
f,
105 -1.0
f, 0.0
f, 0.0
f, 0.0
f);
108 0.0
f, -1.0
f, 0.0
f, 0.0
f,
109 1.0
f, 0.0
f, 0.0
f, 0.0
f,
110 0.0
f, 0.0
f, 1.0
f, 0.0
f);
113 0.0
f, -1.0
f, 0.0
f, 0.0
f,
114 0.0
f, 0.0
f, 1.0
f, 0.0
f,
115 -1.0
f, 0.0
f, 0.0
f, 0.0
f);
118 0.0
f, 0.0
f,-1.0
f, 0.0
f,
119 -1.0
f, 0.0
f, 0.0
f, 0.0
f,
120 0.0
f, 1.0
f, 0.0
f, 0.0
f);
126 mat[0][0] = transform(0,0);
127 mat[1][0] = transform(0,1);
128 mat[2][0] = transform(0,2);
129 mat[0][1] = transform(1,0);
130 mat[1][1] = transform(1,1);
131 mat[2][1] = transform(1,2);
132 mat[0][2] = transform(2,0);
133 mat[1][2] = transform(2,1);
134 mat[2][2] = transform(2,2);
136 mat[3][0] = transform(0,3);
137 mat[3][1] = transform(1,3);
138 mat[3][2] = transform(2,3);
146 transform(0,0) = mat[0][0];
147 transform(0,1) = mat[1][0];
148 transform(0,2) = mat[2][0];
149 transform(1,0) = mat[0][1];
150 transform(1,1) = mat[1][1];
151 transform(1,2) = mat[2][1];
152 transform(2,0) = mat[0][2];
153 transform(2,1) = mat[1][2];
154 transform(2,2) = mat[2][2];
156 transform(0,3) = mat[3][0];
157 transform(1,3) = mat[3][1];
158 transform(2,3) = mat[3][2];
167 cloud(new
pcl::PointCloud<
pcl::PointXYZRGB>),
168 normals(new
pcl::PointCloud<
pcl::Normal>),
169 indices(new
std::vector<int>),
172 gains[0] = gains[1] = gains[2] = 1.0f;
175 pcl::PointCloud<pcl::PointXYZRGB>::Ptr
cloud;
184 #if PCL_VERSION_COMPARE(>=, 1, 8, 0) 185 std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > texCoords;
211 switch (camera_rotation) {
241 int ret =
static_cast<int>(display_rotation) - color_camera_n;
260 int display_rotation,
int color_camera_rotation) {
264 r, color_camera_rotation);
static void setPrintThreadId(bool printThreadId)
glm::mat4 glmFromTransform(const rtabmap::Transform &transform)
static const rtabmap::Transform tango_device_T_rtabmap_world(0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f)
rtabmap::CameraModel cameraModel
std::vector< Eigen::Vector2f > texCoords
0 degree rotation (natural orientation)
rtabmap::Transform glmToTransform(const glm::mat4 &mat)
static const rtabmap::Transform rtabmap_world_T_tango_world(0.0f, 1.0f, 0.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f)
static const rtabmap::Transform optical_T_opengl(1.0f, 0.0f, 0.0f, 0.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f,-1.0f, 0.0f)
pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud
ScreenRotation GetAndroidRotationFromColorCameraToDisplay(ScreenRotation display_rotation, int color_camera_rotation)
int NormalizedColorCameraRotation(int camera_rotation)
std::vector< pcl::Vertices > polygonsLowRes
static void setLevel(ULogger::Level level)
std::vector< pcl::Vertices > polygons
static const rtabmap::Transform opengl_world_T_tango_world(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,-1.0f, 0.0f, 0.0f)
static const rtabmap::Transform opengl_world_T_rtabmap_world(0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f)
virtual std::string getClassName() const =0
pcl::PointCloud< pcl::Normal >::Ptr normals
static void setEventLevel(ULogger::Level eventSentLevel)
static const rtabmap::Transform tango_world_T_rtabmap_world(0.0f,-1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f)
void registerToEventsManager()
static const rtabmap::Transform rtabmap_world_T_opengl_world(0.0f, 0.0f,-1.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)
ULogger class and convenient macros.
virtual bool handleEvent(UEvent *event)
const std::string & getMsg() const