Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
xiaoqiang_freenect_camera::FreenectDevice Class Reference

#include <freenect_device.hpp>

Inheritance diagram for xiaoqiang_freenect_camera::FreenectDevice:
Inheritance graph
[legend]

Public Member Functions

bool findCompatibleDepthMode (const OutputMode &mode, OutputMode &compatible_mode) const
 
bool findCompatibleImageMode (const OutputMode &mode, OutputMode &compatible_mode) const
 
void flushDeviceStreams ()
 
 FreenectDevice (freenect_context *driver, std::string serial)
 
unsigned getAddress () const
 
float getBaseline () const
 
unsigned getBus () const
 
OutputMode getDefaultDepthMode () const
 
OutputMode getDefaultImageMode () const
 
OutputMode getDepthOutputMode ()
 
OutputMode getImageOutputMode ()
 
const char * getProductName () const
 
const char * getSerialNumber () const
 
bool hasDepthStream () const
 
bool hasImageStream () const
 
bool hasIRStream () const
 
bool isDepthRegistered ()
 
bool isDepthRegistrationSupported () const
 
bool isDepthStreamRunning ()
 
bool isImageStreamRunning ()
 
bool isIRStreamRunning ()
 
bool isSynchronizationSupported () const
 
bool isSynchronized () const
 
void openDevice (freenect_context *driver, std::string serial)
 
void publishersAreReady ()
 
template<typename T >
void registerDepthCallback (void(T::*callback)(const ImageBuffer &depth_image, void *cookie), T &instance, void *cookie=NULL)
 
template<typename T >
void registerImageCallback (void(T::*callback)(const ImageBuffer &image, void *cookie), T &instance, void *cookie=NULL)
 
template<typename T >
void registerIRCallback (void(T::*callback)(const ImageBuffer &ir_image, void *cookie), T &instance, void *cookie=NULL)
 
void setDepthOutputMode (OutputMode mode)
 
void setDepthRegistration (bool enable)
 
void setImageOutputMode (OutputMode mode)
 
bool setSynchronization (bool on_off) const
 
void shutdown ()
 
void startDepthStream ()
 
void startImageStream ()
 
void startIRStream ()
 
void stopDepthStream ()
 
void stopImageStream ()
 
void stopIRStream ()
 
 ~FreenectDevice ()
 

Static Public Member Functions

static void freenectDepthCallback (freenect_device *dev, void *depth, uint32_t timestamp)
 
static void freenectVideoCallback (freenect_device *dev, void *video, uint32_t timestamp)
 

Private Member Functions

bool _isImageModeEnabled ()
 
void depthCallback (void *depth)
 
void executeChanges ()
 
void videoCallback (void *video)
 

Private Attributes

ImageBuffer depth_buffer_
 
boost::function< void(const ImageBuffer &)> depth_callback_
 
freenect_devicedevice_
 
bool device_flush_enabled_
 
boost::posix_time::ptime device_flush_start_time_
 
std::string device_serial_
 
freenect_contextdriver_
 
boost::function< void(const ImageBuffer &)> image_callback_
 
boost::function< void(const ImageBuffer &)> ir_callback_
 
boost::recursive_mutex m_settings_
 
freenect_depth_format new_depth_format_
 
freenect_resolution new_depth_resolution_
 
freenect_video_format new_video_format_
 
freenect_resolution new_video_resolution_
 
bool publishers_ready_
 
freenect_registration registration_
 
bool should_stream_depth_
 
bool should_stream_video_
 
bool streaming_depth_
 
bool streaming_video_
 
ImageBuffer video_buffer_
 

Friends

class FreenectDriver
 
class TiltDriver
 

Detailed Description

Definition at line 30 of file freenect_device.hpp.

Constructor & Destructor Documentation

xiaoqiang_freenect_camera::FreenectDevice::FreenectDevice ( freenect_context driver,
std::string  serial 
)
inline

Definition at line 34 of file freenect_device.hpp.

xiaoqiang_freenect_camera::FreenectDevice::~FreenectDevice ( )
inline

Definition at line 62 of file freenect_device.hpp.

Member Function Documentation

bool xiaoqiang_freenect_camera::FreenectDevice::_isImageModeEnabled ( )
inlineprivate

Definition at line 445 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::depthCallback ( void depth)
inlineprivate

Definition at line 450 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::executeChanges ( )
inlineprivate

ROS_INFO("change video called %i", should_stream_video_);

Definition at line 339 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::findCompatibleDepthMode ( const OutputMode mode,
OutputMode compatible_mode 
) const
inline

Definition at line 251 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::findCompatibleImageMode ( const OutputMode mode,
OutputMode compatible_mode 
) const
inline

Definition at line 188 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::flushDeviceStreams ( )
inline

Definition at line 66 of file freenect_device.hpp.

static void xiaoqiang_freenect_camera::FreenectDevice::freenectDepthCallback ( freenect_device dev,
void depth,
uint32_t  timestamp 
)
inlinestatic

Definition at line 290 of file freenect_device.hpp.

static void xiaoqiang_freenect_camera::FreenectDevice::freenectVideoCallback ( freenect_device dev,
void video,
uint32_t  timestamp 
)
inlinestatic

Definition at line 298 of file freenect_device.hpp.

unsigned xiaoqiang_freenect_camera::FreenectDevice::getAddress ( ) const
inline

Unsupported

Definition at line 101 of file freenect_device.hpp.

float xiaoqiang_freenect_camera::FreenectDevice::getBaseline ( ) const
inline

Get the baseline (distance between rgb/depth sensor)

Definition at line 144 of file freenect_device.hpp.

unsigned xiaoqiang_freenect_camera::FreenectDevice::getBus ( ) const
inline

Unsupported

Definition at line 96 of file freenect_device.hpp.

OutputMode xiaoqiang_freenect_camera::FreenectDevice::getDefaultDepthMode ( ) const
inline

Definition at line 247 of file freenect_device.hpp.

OutputMode xiaoqiang_freenect_camera::FreenectDevice::getDefaultImageMode ( ) const
inline

Definition at line 184 of file freenect_device.hpp.

OutputMode xiaoqiang_freenect_camera::FreenectDevice::getDepthOutputMode ( )
inline

Definition at line 237 of file freenect_device.hpp.

OutputMode xiaoqiang_freenect_camera::FreenectDevice::getImageOutputMode ( )
inline

Definition at line 174 of file freenect_device.hpp.

const char* xiaoqiang_freenect_camera::FreenectDevice::getProductName ( ) const
inline

Definition at line 105 of file freenect_device.hpp.

const char* xiaoqiang_freenect_camera::FreenectDevice::getSerialNumber ( ) const
inline

Definition at line 109 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::hasDepthStream ( ) const
inline

Definition at line 117 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::hasImageStream ( ) const
inline

Definition at line 113 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::hasIRStream ( ) const
inline

Definition at line 121 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isDepthRegistered ( )
inline

Definition at line 262 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isDepthRegistrationSupported ( ) const
inline

Definition at line 125 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isDepthStreamRunning ( )
inline

Definition at line 283 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isImageStreamRunning ( )
inline

Definition at line 213 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isIRStreamRunning ( )
inline

Definition at line 230 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isSynchronizationSupported ( ) const
inline

Definition at line 129 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::isSynchronized ( ) const
inline

Definition at line 133 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::openDevice ( freenect_context driver,
std::string  serial 
)
inline

Definition at line 72 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::publishersAreReady ( )
inline

Definition at line 168 of file freenect_device.hpp.

template<typename T >
void xiaoqiang_freenect_camera::FreenectDevice::registerDepthCallback ( void(T::*)(const ImageBuffer &depth_image, void *cookie)  callback,
T &  instance,
void cookie = NULL 
)
inline

Definition at line 156 of file freenect_device.hpp.

template<typename T >
void xiaoqiang_freenect_camera::FreenectDevice::registerImageCallback ( void(T::*)(const ImageBuffer &image, void *cookie)  callback,
T &  instance,
void cookie = NULL 
)
inline

Definition at line 150 of file freenect_device.hpp.

template<typename T >
void xiaoqiang_freenect_camera::FreenectDevice::registerIRCallback ( void(T::*)(const ImageBuffer &ir_image, void *cookie)  callback,
T &  instance,
void cookie = NULL 
)
inline

Definition at line 162 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::setDepthOutputMode ( OutputMode  mode)
inline

Definition at line 242 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::setDepthRegistration ( bool  enable)
inline

Definition at line 267 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::setImageOutputMode ( OutputMode  mode)
inline

Definition at line 179 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::setSynchronization ( bool  on_off) const
inline

Definition at line 137 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::shutdown ( )
inline

Definition at line 88 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::startDepthStream ( )
inline

Definition at line 278 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::startImageStream ( )
inline

Definition at line 206 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::startIRStream ( )
inline

Definition at line 224 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::stopDepthStream ( )
inline

Definition at line 273 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::stopImageStream ( )
inline

Definition at line 199 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::stopIRStream ( )
inline

Definition at line 218 of file freenect_device.hpp.

void xiaoqiang_freenect_camera::FreenectDevice::videoCallback ( void video)
inlineprivate

Definition at line 458 of file freenect_device.hpp.

Friends And Related Function Documentation

friend class FreenectDriver
friend

Definition at line 308 of file freenect_device.hpp.

friend class TiltDriver
friend

Definition at line 309 of file freenect_device.hpp.

Member Data Documentation

ImageBuffer xiaoqiang_freenect_camera::FreenectDevice::depth_buffer_
private

Definition at line 325 of file freenect_device.hpp.

boost::function<void(const ImageBuffer&)> xiaoqiang_freenect_camera::FreenectDevice::depth_callback_
private

Definition at line 316 of file freenect_device.hpp.

freenect_device* xiaoqiang_freenect_camera::FreenectDevice::device_
private

Definition at line 311 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::device_flush_enabled_
private

Definition at line 336 of file freenect_device.hpp.

boost::posix_time::ptime xiaoqiang_freenect_camera::FreenectDevice::device_flush_start_time_
private

Definition at line 335 of file freenect_device.hpp.

std::string xiaoqiang_freenect_camera::FreenectDevice::device_serial_
private

Definition at line 312 of file freenect_device.hpp.

freenect_context* xiaoqiang_freenect_camera::FreenectDevice::driver_
private

Definition at line 310 of file freenect_device.hpp.

boost::function<void(const ImageBuffer&)> xiaoqiang_freenect_camera::FreenectDevice::image_callback_
private

Definition at line 315 of file freenect_device.hpp.

boost::function<void(const ImageBuffer&)> xiaoqiang_freenect_camera::FreenectDevice::ir_callback_
private

Definition at line 317 of file freenect_device.hpp.

boost::recursive_mutex xiaoqiang_freenect_camera::FreenectDevice::m_settings_
private

Definition at line 333 of file freenect_device.hpp.

freenect_depth_format xiaoqiang_freenect_camera::FreenectDevice::new_depth_format_
private

Definition at line 329 of file freenect_device.hpp.

freenect_resolution xiaoqiang_freenect_camera::FreenectDevice::new_depth_resolution_
private

Definition at line 328 of file freenect_device.hpp.

freenect_video_format xiaoqiang_freenect_camera::FreenectDevice::new_video_format_
private

Definition at line 323 of file freenect_device.hpp.

freenect_resolution xiaoqiang_freenect_camera::FreenectDevice::new_video_resolution_
private

Definition at line 322 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::publishers_ready_
private

Definition at line 337 of file freenect_device.hpp.

freenect_registration xiaoqiang_freenect_camera::FreenectDevice::registration_
private

Definition at line 313 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::should_stream_depth_
private

Definition at line 327 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::should_stream_video_
private

Definition at line 321 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::streaming_depth_
private

Definition at line 326 of file freenect_device.hpp.

bool xiaoqiang_freenect_camera::FreenectDevice::streaming_video_
private

Definition at line 320 of file freenect_device.hpp.

ImageBuffer xiaoqiang_freenect_camera::FreenectDevice::video_buffer_
private

Definition at line 319 of file freenect_device.hpp.


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


xiaoqiang_freenect_camera
Author(s): Patrick Mihelich, Suat Gedikli, Radu Bogdan Rusu (original openni_camera driver)., Piyush Khandelwal (libfreenect port).
autogenerated on Mon Jun 10 2019 15:53:18