Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
rtabmap::CameraMobile Class Reference

#include <CameraMobile.h>

Inheritance diagram for rtabmap::CameraMobile:
Inheritance graph
[legend]

Public Member Functions

void addEnvSensor (int type, float value)
 
 CameraMobile (bool smoothing=false)
 
virtual void close ()
 
const CameraModelgetCameraModel () const
 
const TransformgetDeviceTColorCamera () const
 
const cv::MatgetOcclusionImage (CameraModel *model=0) const
 
const TransformgetOriginOffset () const
 
virtual bool getPose (double epochStamp, Transform &pose, cv::Mat &covariance, double maxWaitTime=0.06)
 
ScreenRotation getScreenRotation () const
 
virtual std::string getSerial () const
 
double getStampEpochOffset () const
 
GLuint getTextureId ()
 
void getVPMatrices (glm::mat4 &view, glm::mat4 &projection) const
 
virtual bool init (const std::string &calibrationFolder=".", const std::string &cameraName="")
 
virtual bool isCalibrated () const
 
virtual bool odomProvided () const
 
void poseReceived (const Transform &pose, double deviceStamp)
 
void resetOrigin ()
 
void setGPS (const GPS &gps)
 
void setOcclusionImage (const cv::Mat &image, const CameraModel &model)
 
virtual void setScreenRotationAndSize (ScreenRotation colorCameraToDisplayRotation, int width, int height)
 
void setSmoothing (bool enabled)
 
void update (const SensorData &data, const Transform &pose, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix, const float *texCoord)
 
void updateOnRender ()
 
bool uvsInitialized () const
 
const floatuvsTransformed () const
 
virtual ~CameraMobile ()
 
- Public Member Functions inherited from rtabmap::Camera
float getImageRate () const
 
bool initFromFile (const std::string &calibrationPath)
 
bool isInterIMUPublishing () const
 
void setImageRate (float imageRate)
 
void setInterIMUPublishing (bool enabled, IMUFilter *filter=0)
 
SensorData takeImage (SensorCaptureInfo *info=0)
 
virtual ~Camera ()
 
- Public Member Functions inherited from rtabmap::SensorCapture
float getFrameRate () const
 
const TransformgetLocalTransform () const
 
void resetTimer ()
 
void setFrameRate (float frameRate)
 
void setLocalTransform (const Transform &localTransform)
 
SensorData takeData (SensorCaptureInfo *info=0)
 
virtual ~SensorCapture ()
 
- Public Member Functions inherited from UEventsSender
 UEventsSender ()
 
virtual ~UEventsSender ()
 

Static Public Member Functions

static LaserScan scanFromPointCloudData (const cv::Mat &pointCloudData, int points, const Transform &pose, const CameraModel &model, const cv::Mat &rgb, std::vector< cv::KeyPoint > *kpts=0, std::vector< cv::Point3f > *kpts3D=0, int kptsSize=3)
 

Static Public Attributes

static const float bilateralFilteringSigmaR = 0.075f
 
static const float bilateralFilteringSigmaS = 2.0f
 
static const rtabmap::Transform opticalRotation
 
static const rtabmap::Transform opticalRotationInv
 

Protected Member Functions

virtual SensorData updateDataOnRender (Transform &pose)
 
- Protected Member Functions inherited from rtabmap::Camera
 Camera (float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
void postInterIMU (const IMU &imu, double stamp)
 
- Protected Member Functions inherited from rtabmap::SensorCapture
int getNextSeqID ()
 
 SensorCapture (float frameRate=0, const Transform &localTransform=Transform::getIdentity())
 
- Protected Member Functions inherited from UEventsSender
void post (UEvent *event, bool async=true) const
 

Protected Attributes

Transform deviceTColorCamera_
 
CameraModel model_
 
glm::mat4 projectionMatrix_
 
GLuint textureId_
 
float transformed_uvs_ [8]
 
bool uvs_initialized_ = false
 
glm::mat4 viewMatrix_
 

Private Member Functions

virtual SensorData captureImage (SensorCaptureInfo *info=0)
 
void postUpdate ()
 

Private Attributes

ScreenRotation colorCameraToDisplayRotation_
 
SensorData data_
 
UMutex dataMutex_
 
Transform dataPose_
 
USemaphore dataReady_
 
bool firstFrame_
 
EnvSensors lastEnvSensors_
 
GPS lastKnownGPS_
 
cv::Mat occlusionImage_
 
CameraModel occlusionModel_
 
Transform originOffset_
 
bool originUpdate_
 
std::map< double, TransformposeBuffer_
 
UMutex poseMutex_
 
bool smoothing_
 
double stampEpochOffset_
 

Detailed Description

Definition at line 71 of file CameraMobile.h.

Constructor & Destructor Documentation

◆ CameraMobile()

rtabmap::CameraMobile::CameraMobile ( bool  smoothing = false)

Definition at line 55 of file CameraMobile.cpp.

◆ ~CameraMobile()

rtabmap::CameraMobile::~CameraMobile ( )
virtual

Definition at line 67 of file CameraMobile.cpp.

Member Function Documentation

◆ addEnvSensor()

void rtabmap::CameraMobile::addEnvSensor ( int  type,
float  value 
)

Definition at line 211 of file CameraMobile.cpp.

◆ captureImage()

SensorData rtabmap::CameraMobile::captureImage ( SensorCaptureInfo info = 0)
privatevirtual

Implements rtabmap::Camera.

Definition at line 424 of file CameraMobile.cpp.

◆ close()

void rtabmap::CameraMobile::close ( )
virtual

Reimplemented in rtabmap::CameraARCore, rtabmap::CameraAREngine, and rtabmap::CameraTango.

Definition at line 78 of file CameraMobile.cpp.

◆ getCameraModel()

const CameraModel& rtabmap::CameraMobile::getCameraModel ( ) const
inline

Definition at line 111 of file CameraMobile.h.

◆ getDeviceTColorCamera()

const Transform& rtabmap::CameraMobile::getDeviceTColorCamera ( ) const
inline

Definition at line 112 of file CameraMobile.h.

◆ getOcclusionImage()

const cv::Mat& rtabmap::CameraMobile::getOcclusionImage ( CameraModel model = 0) const
inline

Definition at line 125 of file CameraMobile.h.

◆ getOriginOffset()

const Transform& rtabmap::CameraMobile::getOriginOffset ( ) const
inline

Definition at line 102 of file CameraMobile.h.

◆ getPose()

bool rtabmap::CameraMobile::getPose ( double  epochStamp,
Transform pose,
cv::Mat covariance,
double  maxWaitTime = 0.06 
)
virtual

Reimplemented from rtabmap::SensorCapture.

Definition at line 105 of file CameraMobile.cpp.

◆ getScreenRotation()

ScreenRotation rtabmap::CameraMobile::getScreenRotation ( ) const
inline

Definition at line 122 of file CameraMobile.h.

◆ getSerial()

virtual std::string rtabmap::CameraMobile::getSerial ( ) const
inlinevirtual

Implements rtabmap::SensorCapture.

Reimplemented in rtabmap::CameraARCore, rtabmap::CameraAREngine, and rtabmap::CameraTango.

Definition at line 97 of file CameraMobile.h.

◆ getStampEpochOffset()

double rtabmap::CameraMobile::getStampEpochOffset ( ) const
inline

Definition at line 109 of file CameraMobile.h.

◆ getTextureId()

GLuint rtabmap::CameraMobile::getTextureId ( )
inline

Definition at line 118 of file CameraMobile.h.

◆ getVPMatrices()

void rtabmap::CameraMobile::getVPMatrices ( glm::mat4 view,
glm::mat4 projection 
) const
inline

Definition at line 121 of file CameraMobile.h.

◆ init()

bool rtabmap::CameraMobile::init ( const std::string calibrationFolder = ".",
const std::string cameraName = "" 
)
virtual

Implements rtabmap::SensorCapture.

Reimplemented in rtabmap::CameraARCore, rtabmap::CameraAREngine, and rtabmap::CameraTango.

Definition at line 72 of file CameraMobile.cpp.

◆ isCalibrated()

bool rtabmap::CameraMobile::isCalibrated ( ) const
virtual

Implements rtabmap::Camera.

Definition at line 201 of file CameraMobile.cpp.

◆ odomProvided()

virtual bool rtabmap::CameraMobile::odomProvided ( ) const
inlinevirtual

Reimplemented from rtabmap::SensorCapture.

Definition at line 106 of file CameraMobile.h.

◆ poseReceived()

void rtabmap::CameraMobile::poseReceived ( const Transform pose,
double  deviceStamp 
)

Definition at line 164 of file CameraMobile.cpp.

◆ postUpdate()

void rtabmap::CameraMobile::postUpdate ( )
private

Definition at line 308 of file CameraMobile.cpp.

◆ resetOrigin()

void rtabmap::CameraMobile::resetOrigin ( )

Definition at line 95 of file CameraMobile.cpp.

◆ scanFromPointCloudData()

LaserScan rtabmap::CameraMobile::scanFromPointCloudData ( const cv::Mat pointCloudData,
int  points,
const Transform pose,
const CameraModel model,
const cv::Mat rgb,
std::vector< cv::KeyPoint > *  kpts = 0,
std::vector< cv::Point3f > *  kpts3D = 0,
int  kptsSize = 3 
)
static

Definition at line 461 of file CameraMobile.cpp.

◆ setGPS()

void rtabmap::CameraMobile::setGPS ( const GPS gps)

Definition at line 206 of file CameraMobile.cpp.

◆ setOcclusionImage()

void rtabmap::CameraMobile::setOcclusionImage ( const cv::Mat image,
const CameraModel model 
)
inline

Definition at line 124 of file CameraMobile.h.

◆ setScreenRotationAndSize()

virtual void rtabmap::CameraMobile::setScreenRotationAndSize ( ScreenRotation  colorCameraToDisplayRotation,
int  width,
int  height 
)
inlinevirtual

Reimplemented in rtabmap::CameraARCore, and rtabmap::CameraAREngine.

Definition at line 114 of file CameraMobile.h.

◆ setSmoothing()

void rtabmap::CameraMobile::setSmoothing ( bool  enabled)
inline

Definition at line 113 of file CameraMobile.h.

◆ update()

void rtabmap::CameraMobile::update ( const SensorData data,
const Transform pose,
const glm::mat4 viewMatrix,
const glm::mat4 projectionMatrix,
const float texCoord 
)

Definition at line 216 of file CameraMobile.cpp.

◆ updateDataOnRender()

SensorData rtabmap::CameraMobile::updateDataOnRender ( Transform pose)
protectedvirtual

Reimplemented in rtabmap::CameraARCore, rtabmap::CameraTango, and rtabmap::CameraAREngine.

Definition at line 301 of file CameraMobile.cpp.

◆ updateOnRender()

void rtabmap::CameraMobile::updateOnRender ( )

Definition at line 283 of file CameraMobile.cpp.

◆ uvsInitialized()

bool rtabmap::CameraMobile::uvsInitialized ( ) const
inline

Definition at line 119 of file CameraMobile.h.

◆ uvsTransformed()

const float* rtabmap::CameraMobile::uvsTransformed ( ) const
inline

Definition at line 120 of file CameraMobile.h.

Member Data Documentation

◆ bilateralFilteringSigmaR

const float rtabmap::CameraMobile::bilateralFilteringSigmaR = 0.075f
static

Definition at line 74 of file CameraMobile.h.

◆ bilateralFilteringSigmaS

const float rtabmap::CameraMobile::bilateralFilteringSigmaS = 2.0f
static

Definition at line 73 of file CameraMobile.h.

◆ colorCameraToDisplayRotation_

ScreenRotation rtabmap::CameraMobile::colorCameraToDisplayRotation_
private

Definition at line 148 of file CameraMobile.h.

◆ data_

SensorData rtabmap::CameraMobile::data_
private

Definition at line 156 of file CameraMobile.h.

◆ dataMutex_

UMutex rtabmap::CameraMobile::dataMutex_
private

Definition at line 155 of file CameraMobile.h.

◆ dataPose_

Transform rtabmap::CameraMobile::dataPose_
private

Definition at line 157 of file CameraMobile.h.

◆ dataReady_

USemaphore rtabmap::CameraMobile::dataReady_
private

Definition at line 154 of file CameraMobile.h.

◆ deviceTColorCamera_

Transform rtabmap::CameraMobile::deviceTColorCamera_
protected

Definition at line 136 of file CameraMobile.h.

◆ firstFrame_

bool rtabmap::CameraMobile::firstFrame_
private

Definition at line 145 of file CameraMobile.h.

◆ lastEnvSensors_

EnvSensors rtabmap::CameraMobile::lastEnvSensors_
private

Definition at line 150 of file CameraMobile.h.

◆ lastKnownGPS_

GPS rtabmap::CameraMobile::lastKnownGPS_
private

Definition at line 149 of file CameraMobile.h.

◆ model_

CameraModel rtabmap::CameraMobile::model_
protected

Definition at line 135 of file CameraMobile.h.

◆ occlusionImage_

cv::Mat rtabmap::CameraMobile::occlusionImage_
private

Definition at line 162 of file CameraMobile.h.

◆ occlusionModel_

CameraModel rtabmap::CameraMobile::occlusionModel_
private

Definition at line 163 of file CameraMobile.h.

◆ opticalRotation

const rtabmap::Transform rtabmap::CameraMobile::opticalRotation
static
Initial value:
= Transform(
0.0f, 0.0f, 1.0f, 0.0f,
-1.0f, 0.0f, 0.0f, 0.0f,
0.0f, -1.0f, 0.0f, 0.0f)

Definition at line 76 of file CameraMobile.h.

◆ opticalRotationInv

const rtabmap::Transform rtabmap::CameraMobile::opticalRotationInv
static
Initial value:
= Transform(
0.0f, -1.0f, 0.0f, 0.0f,
0.0f, 0.0f, -1.0f, 0.0f,
1.0f, 0.0f, 0.0f, 0.0f)

Definition at line 77 of file CameraMobile.h.

◆ originOffset_

Transform rtabmap::CameraMobile::originOffset_
private

Definition at line 151 of file CameraMobile.h.

◆ originUpdate_

bool rtabmap::CameraMobile::originUpdate_
private

Definition at line 152 of file CameraMobile.h.

◆ poseBuffer_

std::map<double, Transform> rtabmap::CameraMobile::poseBuffer_
private

Definition at line 160 of file CameraMobile.h.

◆ poseMutex_

UMutex rtabmap::CameraMobile::poseMutex_
private

Definition at line 159 of file CameraMobile.h.

◆ projectionMatrix_

glm::mat4 rtabmap::CameraMobile::projectionMatrix_
protected

Definition at line 140 of file CameraMobile.h.

◆ smoothing_

bool rtabmap::CameraMobile::smoothing_
private

Definition at line 147 of file CameraMobile.h.

◆ stampEpochOffset_

double rtabmap::CameraMobile::stampEpochOffset_
private

Definition at line 146 of file CameraMobile.h.

◆ textureId_

GLuint rtabmap::CameraMobile::textureId_
protected

Definition at line 138 of file CameraMobile.h.

◆ transformed_uvs_

float rtabmap::CameraMobile::transformed_uvs_[8]
protected

Definition at line 141 of file CameraMobile.h.

◆ uvs_initialized_

bool rtabmap::CameraMobile::uvs_initialized_ = false
protected

Definition at line 142 of file CameraMobile.h.

◆ viewMatrix_

glm::mat4 rtabmap::CameraMobile::viewMatrix_
protected

Definition at line 139 of file CameraMobile.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:27