Public Member Functions | Private Member Functions | Private Attributes | List of all members
rtabmap::CameraThread Class Reference

#include <CameraThread.h>

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

Public Member Functions

Cameracamera ()
 
 CameraThread (Camera *camera, const ParametersMap &parameters=ParametersMap())
 
 CameraThread (Camera *camera, Camera *odomSensor, const Transform &extrinsics, double poseTimeOffset=0.0, float poseScaleFactor=1.0f, bool odomAsGt=false, const ParametersMap &parameters=ParametersMap())
 
 CameraThread (Camera *camera, bool odomAsGt, const ParametersMap &parameters=ParametersMap())
 
void disableBilateralFiltering ()
 
void disableIMUFiltering ()
 
void enableBilateralFiltering (float sigmaS, float sigmaR)
 
void enableIMUFiltering (int filteringStrategy=1, const ParametersMap &parameters=ParametersMap(), bool baseFrameConversion=false)
 
bool isCapturing () const
 
bool isPaused () const
 
bool odomProvided () const
 
CameraodomSensor ()
 
void postUpdate (SensorData *data, CameraInfo *info=0) const
 
 RTABMAP_DEPRECATED (void setScanParameters(bool fromDepth, int downsampleStep, float rangeMin, float rangeMax, float voxelSize, int normalsK, int normalsRadius, bool forceGroundNormalsUp), "Use new version of this function with groundNormalsUp=0.8 for forceGroundNormalsUp=True and groundNormalsUp=0.0 for forceGroundNormalsUp=False.")
 
void setColorOnly (bool colorOnly)
 
void setDistortionModel (const std::string &path)
 
void setImageDecimation (int decimation)
 
void setImageRate (float imageRate)
 
void setMirroringEnabled (bool enabled)
 
void setScanParameters (bool fromDepth, int downsampleStep=1, float rangeMin=0.0f, float rangeMax=0.0f, float voxelSize=0.0f, int normalsK=0, int normalsRadius=0.0f, float groundNormalsUp=0.0f)
 
void setStereoExposureCompensation (bool enabled)
 
void setStereoToDepth (bool enabled)
 
virtual ~CameraThread ()
 
- Public Member Functions inherited from UThread
Handle getThreadHandle () const
 
unsigned long getThreadId () const
 
bool isCreating () const
 
bool isIdle () const
 
bool isKilled () const
 
bool isRunning () const
 
void join (bool killFirst=false)
 
void kill ()
 
void setAffinity (int cpu=0)
 
void setPriority (Priority priority)
 
void start ()
 
 UThread (Priority priority=kPNormal)
 
virtual ~UThread ()
 
- Public Member Functions inherited from UThreadC< void >
int Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
int Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const
 
virtual ~UThreadC ()
 
virtual ~UThreadC ()
 
- Public Member Functions inherited from UEventsSender
 UEventsSender ()
 
virtual ~UEventsSender ()
 

Private Member Functions

virtual void mainLoop ()
 
virtual void mainLoopBegin ()
 
virtual void mainLoopKill ()
 

Private Attributes

bool _bilateralFiltering
 
float _bilateralSigmaR
 
float _bilateralSigmaS
 
Camera_camera
 
bool _colorOnly
 
clams::DiscreteDepthDistortionModel_distortionModel
 
Transform _extrinsicsOdomToCamera
 
int _imageDecimation
 
bool _imuBaseFrameConversion
 
IMUFilter_imuFilter
 
bool _mirroring
 
bool _odomAsGt
 
Camera_odomSensor
 
float _poseScaleFactor
 
double _poseTimeOffset
 
int _scanDownsampleStep
 
float _scanForceGroundNormalsUp
 
bool _scanFromDepth
 
int _scanNormalsK
 
float _scanNormalsRadius
 
float _scanRangeMax
 
float _scanRangeMin
 
float _scanVoxelSize
 
StereoDense_stereoDense
 
bool _stereoExposureCompensation
 
bool _stereoToDepth
 

Additional Inherited Members

- Public Types inherited from UThread
enum  Priority {
  kPLow, kPBelowNormal, kPNormal, kPAboveNormal,
  kPRealTime
}
 
- Public Types inherited from UThreadC< void >
typedef THREAD_HANDLE Handle
 
typedef THREAD_HANDLE Handle
 
typedef void(* Handler) ()
 
typedef void(* Handler) ()
 
- Static Public Member Functions inherited from UThread
static unsigned long currentThreadId ()
 
- Static Public Member Functions inherited from UThreadC< void >
static int Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false)
 
static int Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false)
 
static int Detach (Handle H)
 
static int Detach (const Handle &H)
 
static int Join (const Handle &H)
 
static int Join (Handle H)
 
static int Kill (Handle H)
 
static int Kill (const Handle &H)
 
- Protected Member Functions inherited from UThreadC< void >
 UThreadC ()
 
 UThreadC ()
 
- Protected Member Functions inherited from UEventsSender
void post (UEvent *event, bool async=true) const
 
- Static Protected Member Functions inherited from UThreadC< void >
static void Exit ()
 
static void Exit ()
 
static Handle Self ()
 
static int Self ()
 
static void TestCancel ()
 
static void TestCancel ()
 

Detailed Description

Class CameraThread

Definition at line 55 of file CameraThread.h.

Constructor & Destructor Documentation

◆ CameraThread() [1/3]

rtabmap::CameraThread::CameraThread ( Camera camera,
const ParametersMap parameters = ParametersMap() 
)

Definition at line 50 of file CameraThread.cpp.

◆ CameraThread() [2/3]

rtabmap::CameraThread::CameraThread ( Camera camera,
Camera odomSensor,
const Transform extrinsics,
double  poseTimeOffset = 0.0,
float  poseScaleFactor = 1.0f,
bool  odomAsGt = false,
const ParametersMap parameters = ParametersMap() 
)
Parameters
camerathe camera to take images from
odomSensoran odometry sensor to get a pose
extrinsicsthe static transform between odometry sensor's left lens frame to camera's left lens frame

Definition at line 81 of file CameraThread.cpp.

◆ CameraThread() [3/3]

rtabmap::CameraThread::CameraThread ( Camera camera,
bool  odomAsGt,
const ParametersMap parameters = ParametersMap() 
)

Definition at line 124 of file CameraThread.cpp.

◆ ~CameraThread()

rtabmap::CameraThread::~CameraThread ( )
virtual

Definition at line 158 of file CameraThread.cpp.

Member Function Documentation

◆ camera()

Camera* rtabmap::CameraThread::camera ( )
inline

Definition at line 117 of file CameraThread.h.

◆ disableBilateralFiltering()

void rtabmap::CameraThread::disableBilateralFiltering ( )
inline

Definition at line 87 of file CameraThread.h.

◆ disableIMUFiltering()

void rtabmap::CameraThread::disableIMUFiltering ( )

Definition at line 211 of file CameraThread.cpp.

◆ enableBilateralFiltering()

void rtabmap::CameraThread::enableBilateralFiltering ( float  sigmaS,
float  sigmaR 
)

Definition at line 196 of file CameraThread.cpp.

◆ enableIMUFiltering()

void rtabmap::CameraThread::enableIMUFiltering ( int  filteringStrategy = 1,
const ParametersMap parameters = ParametersMap(),
bool  baseFrameConversion = false 
)

Definition at line 204 of file CameraThread.cpp.

◆ isCapturing()

bool rtabmap::CameraThread::isCapturing ( ) const
inline

Definition at line 114 of file CameraThread.h.

◆ isPaused()

bool rtabmap::CameraThread::isPaused ( ) const
inline

Definition at line 113 of file CameraThread.h.

◆ mainLoop()

void rtabmap::CameraThread::mainLoop ( )
privatevirtual

Pure virtual method mainLoop(). The inner loop of the thread. This method is called repetitively until the thread is killed. Note that if kill() is called in mainLoopBegin(), mainLoop() is not called, terminating immediately the thread.

See also
mainLoop()
kill()

Implements UThread.

Definition at line 261 of file CameraThread.cpp.

◆ mainLoopBegin()

void rtabmap::CameraThread::mainLoopBegin ( )
privatevirtual

Virtual method mainLoopBegin(). User can implement this function to add a behavior before the main loop is started. It is called once (before entering mainLoop()).

Reimplemented from UThread.

Definition at line 255 of file CameraThread.cpp.

◆ mainLoopKill()

void rtabmap::CameraThread::mainLoopKill ( )
privatevirtual

Virtual method mainLoopKill(). User can implement this function to add a behavior before the thread is killed. When this function is called, the state of the thread is set to kSKilled. It is useful to wake up a sleeping thread to finish his loop and to avoid a deadlock.

Reimplemented from UThread.

Definition at line 325 of file CameraThread.cpp.

◆ odomProvided()

bool rtabmap::CameraThread::odomProvided ( ) const

Definition at line 250 of file CameraThread.cpp.

◆ odomSensor()

Camera* rtabmap::CameraThread::odomSensor ( )
inline

Definition at line 118 of file CameraThread.h.

◆ postUpdate()

void rtabmap::CameraThread::postUpdate ( SensorData data,
CameraInfo info = 0 
) const

Definition at line 350 of file CameraThread.cpp.

◆ RTABMAP_DEPRECATED()

rtabmap::CameraThread::RTABMAP_DEPRECATED ( void   setScanParametersbool fromDepth, int downsampleStep, float rangeMin, float rangeMax, float voxelSize, int normalsK, int normalsRadius, bool forceGroundNormalsUp)

◆ setColorOnly()

void rtabmap::CameraThread::setColorOnly ( bool  colorOnly)
inline

Definition at line 81 of file CameraThread.h.

◆ setDistortionModel()

void rtabmap::CameraThread::setDistortionModel ( const std::string path)

Definition at line 176 of file CameraThread.cpp.

◆ setImageDecimation()

void rtabmap::CameraThread::setImageDecimation ( int  decimation)
inline

Definition at line 82 of file CameraThread.h.

◆ setImageRate()

void rtabmap::CameraThread::setImageRate ( float  imageRate)

Definition at line 168 of file CameraThread.cpp.

◆ setMirroringEnabled()

void rtabmap::CameraThread::setMirroringEnabled ( bool  enabled)
inline

Definition at line 79 of file CameraThread.h.

◆ setScanParameters()

void rtabmap::CameraThread::setScanParameters ( bool  fromDepth,
int  downsampleStep = 1,
float  rangeMin = 0.0f,
float  rangeMax = 0.0f,
float  voxelSize = 0.0f,
int  normalsK = 0,
int  normalsRadius = 0.0f,
float  groundNormalsUp = 0.0f 
)

Definition at line 217 of file CameraThread.cpp.

◆ setStereoExposureCompensation()

void rtabmap::CameraThread::setStereoExposureCompensation ( bool  enabled)
inline

Definition at line 80 of file CameraThread.h.

◆ setStereoToDepth()

void rtabmap::CameraThread::setStereoToDepth ( bool  enabled)
inline

Definition at line 83 of file CameraThread.h.

Member Data Documentation

◆ _bilateralFiltering

bool rtabmap::CameraThread::_bilateralFiltering
private

Definition at line 147 of file CameraThread.h.

◆ _bilateralSigmaR

float rtabmap::CameraThread::_bilateralSigmaR
private

Definition at line 149 of file CameraThread.h.

◆ _bilateralSigmaS

float rtabmap::CameraThread::_bilateralSigmaS
private

Definition at line 148 of file CameraThread.h.

◆ _camera

Camera* rtabmap::CameraThread::_camera
private

Definition at line 126 of file CameraThread.h.

◆ _colorOnly

bool rtabmap::CameraThread::_colorOnly
private

Definition at line 134 of file CameraThread.h.

◆ _distortionModel

clams::DiscreteDepthDistortionModel* rtabmap::CameraThread::_distortionModel
private

Definition at line 146 of file CameraThread.h.

◆ _extrinsicsOdomToCamera

Transform rtabmap::CameraThread::_extrinsicsOdomToCamera
private

Definition at line 128 of file CameraThread.h.

◆ _imageDecimation

int rtabmap::CameraThread::_imageDecimation
private

Definition at line 135 of file CameraThread.h.

◆ _imuBaseFrameConversion

bool rtabmap::CameraThread::_imuBaseFrameConversion
private

Definition at line 151 of file CameraThread.h.

◆ _imuFilter

IMUFilter* rtabmap::CameraThread::_imuFilter
private

Definition at line 150 of file CameraThread.h.

◆ _mirroring

bool rtabmap::CameraThread::_mirroring
private

Definition at line 132 of file CameraThread.h.

◆ _odomAsGt

bool rtabmap::CameraThread::_odomAsGt
private

Definition at line 129 of file CameraThread.h.

◆ _odomSensor

Camera* rtabmap::CameraThread::_odomSensor
private

Definition at line 127 of file CameraThread.h.

◆ _poseScaleFactor

float rtabmap::CameraThread::_poseScaleFactor
private

Definition at line 131 of file CameraThread.h.

◆ _poseTimeOffset

double rtabmap::CameraThread::_poseTimeOffset
private

Definition at line 130 of file CameraThread.h.

◆ _scanDownsampleStep

int rtabmap::CameraThread::_scanDownsampleStep
private

Definition at line 138 of file CameraThread.h.

◆ _scanForceGroundNormalsUp

float rtabmap::CameraThread::_scanForceGroundNormalsUp
private

Definition at line 144 of file CameraThread.h.

◆ _scanFromDepth

bool rtabmap::CameraThread::_scanFromDepth
private

Definition at line 137 of file CameraThread.h.

◆ _scanNormalsK

int rtabmap::CameraThread::_scanNormalsK
private

Definition at line 142 of file CameraThread.h.

◆ _scanNormalsRadius

float rtabmap::CameraThread::_scanNormalsRadius
private

Definition at line 143 of file CameraThread.h.

◆ _scanRangeMax

float rtabmap::CameraThread::_scanRangeMax
private

Definition at line 140 of file CameraThread.h.

◆ _scanRangeMin

float rtabmap::CameraThread::_scanRangeMin
private

Definition at line 139 of file CameraThread.h.

◆ _scanVoxelSize

float rtabmap::CameraThread::_scanVoxelSize
private

Definition at line 141 of file CameraThread.h.

◆ _stereoDense

StereoDense* rtabmap::CameraThread::_stereoDense
private

Definition at line 145 of file CameraThread.h.

◆ _stereoExposureCompensation

bool rtabmap::CameraThread::_stereoExposureCompensation
private

Definition at line 133 of file CameraThread.h.

◆ _stereoToDepth

bool rtabmap::CameraThread::_stereoToDepth
private

Definition at line 136 of file CameraThread.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00