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

#include <CameraTango.h>

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

Public Member Functions

 CameraTango (bool colorCamera, int decimation, bool publishRawScan, bool smoothing)
 
void close ()
 
void cloudReceived (const cv::Mat &cloud, double timestamp)
 
const CameraModelgetCameraModel () const
 
virtual std::string getSerial () const
 
virtual bool init (const std::string &calibrationFolder=".", const std::string &cameraName="")
 
virtual bool isCalibrated () const
 
void poseReceived (const Transform &pose)
 
void resetOrigin ()
 
void rgbReceived (const cv::Mat &tangoImage, int type, double timestamp)
 
void setColorCamera (bool enabled)
 
void setDecimation (int value)
 
void setGPS (const GPS &gps)
 
void setRawScanPublished (bool enabled)
 
void setScreenRotation (TangoSupportRotation colorCameraToDisplayRotation)
 
void setSmoothing (bool enabled)
 
void tangoEventReceived (int type, const char *key, const char *value)
 
rtabmap::Transform tangoPoseToTransform (const TangoPoseData *tangoPose) const
 
virtual ~CameraTango ()
 
- Public Member Functions inherited from rtabmap::Camera
float getImageRate () const
 
const TransformgetLocalTransform () const
 
virtual bool odomProvided () const
 
void resetTimer ()
 
void setImageRate (float imageRate)
 
void setLocalTransform (const Transform &localTransform)
 
SensorData takeImage (CameraInfo *info=0)
 
virtual ~Camera ()
 
- 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 ()
 

Static Public Attributes

static const float bilateralFilteringSigmaR = 0.075f
 
static const float bilateralFilteringSigmaS = 2.0f
 

Protected Member Functions

virtual SensorData captureImage (CameraInfo *info=0)
 
- Protected Member Functions inherited from rtabmap::Camera
 Camera (float imageRate=0, const Transform &localTransform=Transform::getIdentity())
 
int getNextSeqID ()
 
- Protected Member Functions inherited from UThreadC< void >
 UThreadC ()
 
 UThreadC ()
 
- Protected Member Functions inherited from UEventsSender
void post (UEvent *event, bool async=true) const
 

Private Member Functions

rtabmap::Transform getPoseAtTimestamp (double timestamp)
 
virtual void mainLoop ()
 
virtual void mainLoopBegin ()
 

Private Attributes

UTimer cameraStartedTime_
 
cv::Mat cloud_
 
double cloudStamp_
 
bool colorCamera_
 
TangoSupportRotation colorCameraToDisplayRotation_
 
boost::mutex dataMutex_
 
USemaphore dataReady_
 
int decimation_
 
Transform deviceTColorCamera_
 
cv::Mat fisheyeRectifyMapX_
 
cv::Mat fisheyeRectifyMapY_
 
GPS lastKnownGPS_
 
CameraModel model_
 
Transform originOffset_
 
bool originUpdate_
 
Transform previousPose_
 
double previousStamp_
 
bool rawScanPublished_
 
bool smoothing_
 
double stampEpochOffset_
 
void * tango_config_
 
cv::Mat tangoColor_
 
double tangoColorStamp_
 
int tangoColorType_
 

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)
 
- 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

Definition at line 73 of file CameraTango.h.

Constructor & Destructor Documentation

rtabmap::CameraTango::CameraTango ( bool  colorCamera,
int  decimation,
bool  publishRawScan,
bool  smoothing 
)

Definition at line 110 of file CameraTango.cpp.

rtabmap::CameraTango::~CameraTango ( )
virtual

Definition at line 128 of file CameraTango.cpp.

Member Function Documentation

SensorData rtabmap::CameraTango::captureImage ( CameraInfo info = 0)
protectedvirtual

returned rgb and depth images should be already rectified if calibration was loaded

Implements rtabmap::Camera.

Definition at line 597 of file CameraTango.cpp.

void rtabmap::CameraTango::close ( )

Definition at line 426 of file CameraTango.cpp.

void rtabmap::CameraTango::cloudReceived ( const cv::Mat &  cloud,
double  timestamp 
)

Definition at line 450 of file CameraTango.cpp.

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

Definition at line 87 of file CameraTango.h.

rtabmap::Transform rtabmap::CameraTango::getPoseAtTimestamp ( double  timestamp)
private

Definition at line 565 of file CameraTango.cpp.

std::string rtabmap::CameraTango::getSerial ( ) const
virtual

Implements rtabmap::Camera.

Definition at line 538 of file CameraTango.cpp.

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

Implements rtabmap::Camera.

Definition at line 192 of file CameraTango.cpp.

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

Implements rtabmap::Camera.

Definition at line 533 of file CameraTango.cpp.

void rtabmap::CameraTango::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 929 of file CameraTango.cpp.

void rtabmap::CameraTango::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 920 of file CameraTango.cpp.

void rtabmap::CameraTango::poseReceived ( const Transform pose)

Definition at line 506 of file CameraTango.cpp.

void rtabmap::CameraTango::resetOrigin ( )

Definition at line 445 of file CameraTango.cpp.

void rtabmap::CameraTango::rgbReceived ( const cv::Mat &  tangoImage,
int  type,
double  timestamp 
)

Definition at line 488 of file CameraTango.cpp.

void rtabmap::CameraTango::setColorCamera ( bool  enabled)
inline

Definition at line 89 of file CameraTango.h.

void rtabmap::CameraTango::setDecimation ( int  value)
inline

Definition at line 90 of file CameraTango.h.

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

Definition at line 543 of file CameraTango.cpp.

void rtabmap::CameraTango::setRawScanPublished ( bool  enabled)
inline

Definition at line 92 of file CameraTango.h.

void rtabmap::CameraTango::setScreenRotation ( TangoSupportRotation  colorCameraToDisplayRotation)
inline

Definition at line 93 of file CameraTango.h.

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

Definition at line 91 of file CameraTango.h.

void rtabmap::CameraTango::tangoEventReceived ( int  type,
const char *  key,
const char *  value 
)

Definition at line 528 of file CameraTango.cpp.

rtabmap::Transform rtabmap::CameraTango::tangoPoseToTransform ( const TangoPoseData *  tangoPose) const

Definition at line 548 of file CameraTango.cpp.

Member Data Documentation

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

Definition at line 76 of file CameraTango.h.

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

Definition at line 75 of file CameraTango.h.

UTimer rtabmap::CameraTango::cameraStartedTime_
private

Definition at line 114 of file CameraTango.h.

cv::Mat rtabmap::CameraTango::cloud_
private

Definition at line 120 of file CameraTango.h.

double rtabmap::CameraTango::cloudStamp_
private

Definition at line 121 of file CameraTango.h.

bool rtabmap::CameraTango::colorCamera_
private

Definition at line 116 of file CameraTango.h.

TangoSupportRotation rtabmap::CameraTango::colorCameraToDisplayRotation_
private

Definition at line 129 of file CameraTango.h.

boost::mutex rtabmap::CameraTango::dataMutex_
private

Definition at line 125 of file CameraTango.h.

USemaphore rtabmap::CameraTango::dataReady_
private

Definition at line 126 of file CameraTango.h.

int rtabmap::CameraTango::decimation_
private

Definition at line 117 of file CameraTango.h.

Transform rtabmap::CameraTango::deviceTColorCamera_
private

Definition at line 128 of file CameraTango.h.

cv::Mat rtabmap::CameraTango::fisheyeRectifyMapX_
private

Definition at line 130 of file CameraTango.h.

cv::Mat rtabmap::CameraTango::fisheyeRectifyMapY_
private

Definition at line 131 of file CameraTango.h.

GPS rtabmap::CameraTango::lastKnownGPS_
private

Definition at line 132 of file CameraTango.h.

CameraModel rtabmap::CameraTango::model_
private

Definition at line 127 of file CameraTango.h.

Transform rtabmap::CameraTango::originOffset_
private

Definition at line 133 of file CameraTango.h.

bool rtabmap::CameraTango::originUpdate_
private

Definition at line 134 of file CameraTango.h.

Transform rtabmap::CameraTango::previousPose_
private

Definition at line 112 of file CameraTango.h.

double rtabmap::CameraTango::previousStamp_
private

Definition at line 113 of file CameraTango.h.

bool rtabmap::CameraTango::rawScanPublished_
private

Definition at line 118 of file CameraTango.h.

bool rtabmap::CameraTango::smoothing_
private

Definition at line 119 of file CameraTango.h.

double rtabmap::CameraTango::stampEpochOffset_
private

Definition at line 115 of file CameraTango.h.

void* rtabmap::CameraTango::tango_config_
private

Definition at line 111 of file CameraTango.h.

cv::Mat rtabmap::CameraTango::tangoColor_
private

Definition at line 122 of file CameraTango.h.

double rtabmap::CameraTango::tangoColorStamp_
private

Definition at line 124 of file CameraTango.h.

int rtabmap::CameraTango::tangoColorType_
private

Definition at line 123 of file CameraTango.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:42