Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xiaoqiang_freenect_camera::DriverNodelet Class Reference

#include <driver.h>

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

Public Member Functions

virtual ~DriverNodelet ()
 
- Public Member Functions inherited from nodelet::Nodelet
void init (const std::string &name, const M_string &remapping_args, const V_string &my_argv, ros::CallbackQueueInterface *st_queue=NULL, ros::CallbackQueueInterface *mt_queue=NULL)
 
 Nodelet ()
 
virtual ~Nodelet ()
 

Private Types

typedef FreenectConfig Config
 
typedef diagnostic_updater::FrequencyStatusParam FrequencyStatusParam
 
typedef dynamic_reconfigure::Server< ConfigReconfigureServer
 
typedef diagnostic_updater::HeaderlessTopicDiagnostic TopicDiagnostic
 
typedef boost::shared_ptr< TopicDiagnosticTopicDiagnosticPtr
 

Private Member Functions

void checkFrameCounters ()
 
void configCb (Config &config, uint32_t level)
 
void depthCb (const ImageBuffer &depth_image, void *cookie)
 
void depthConnectCb ()
 
sensor_msgs::CameraInfoPtr getDefaultCameraInfo (int width, int height, double f) const
 
sensor_msgs::CameraInfoPtr getDepthCameraInfo (const ImageBuffer &image, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getIrCameraInfo (const ImageBuffer &image, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getProjectorCameraInfo (const ImageBuffer &image, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getRgbCameraInfo (const ImageBuffer &image, ros::Time time) const
 
void irCb (const ImageBuffer &_image, void *cookie)
 
void irConnectCb ()
 
OutputMode mapConfigMode2OutputMode (int mode) const
 
int mapMode2ConfigMode (const OutputMode &output_mode) const
 
virtual void onInit ()
 Nodelet initialization routine. More...
 
void onInitImpl ()
 
void publishDepthImage (const ImageBuffer &depth, ros::Time time) const
 
void publishIrImage (const ImageBuffer &ir, ros::Time time) const
 
void publishRgbImage (const ImageBuffer &image, ros::Time time) const
 
void rgbCb (const ImageBuffer &image, void *cookie)
 
void rgbConnectCb ()
 
void setupDevice ()
 
void startSynchronization ()
 
void stopSynchronization ()
 
void updateDiagnostics ()
 
void updateModeMaps ()
 
void watchDog (const ros::TimerEvent &event)
 

Private Attributes

bool audio_processing_
 
bool close_diagnostics_
 
bool close_tiltThread_
 
std::map< int, OutputModeconfig2mode_map_
 
Config config_
 
boost::mutex connect_mutex_
 
boost::mutex counter_mutex_
 
int depth_frame_counter_
 
std::string depth_frame_id_
 
double depth_ir_offset_x_
 
double depth_ir_offset_y_
 
bool depth_processing_
 
ros::Time depth_time_stamp_
 
boost::shared_ptr< FreenectDevicedevice_
 the actual openni device More...
 
boost::shared_ptr< diagnostic_updater::Updaterdiagnostic_updater_
 
boost::thread diagnostics_thread_
 
bool enable_depth_diagnostics_
 
bool enable_ir_diagnostics_
 
bool enable_rgb_diagnostics_
 
boost::thread init_thread_
 
int ir_frame_counter_
 
boost::shared_ptr< camera_info_manager::CameraInfoManagerir_info_manager_
 
bool ir_processing_
 
ros::Time ir_time_stamp_
 
bool libfreenect_debug_
 enable libfreenect debugging More...
 
std::map< OutputMode, int > mode2config_map_
 
bool motor_processing_
 
unsigned int num_frame_
 
image_transport::CameraPublisher pub_depth_
 
TopicDiagnosticPtr pub_depth_freq_
 
image_transport::CameraPublisher pub_depth_registered_
 
double pub_freq_max_
 
double pub_freq_min_
 
image_transport::CameraPublisher pub_ir_
 
TopicDiagnosticPtr pub_ir_freq_
 
ros::Publisher pub_projector_info_
 
image_transport::CameraPublisher pub_rgb_
 
TopicDiagnosticPtr pub_rgb_freq_
 
bool publish_depth_
 
bool publish_ir_
 
bool publish_rgb_
 
boost::shared_ptr< ReconfigureServerreconfigure_server_
 reconfigure server More...
 
int rgb_frame_counter_
 
std::string rgb_frame_id_
 
boost::shared_ptr< camera_info_manager::CameraInfoManagerrgb_info_manager_
 Camera info manager objects. More...
 
bool rgb_processing_
 
ros::Time rgb_time_stamp_
 
freenect_device_flags subdevs_
 
boost::thread tilt_thread_
 
TiltDriver tiltDriver_
 
double time_out_
 timeout value in seconds to throw TIMEOUT exception More...
 
ros::Time time_stamp_
 
ros::Timer watch_dog_timer_
 
int z_offset_mm_
 

Additional Inherited Members

- Protected Member Functions inherited from nodelet::Nodelet
ros::CallbackQueueInterfacegetMTCallbackQueue () const
 
ros::NodeHandlegetMTNodeHandle () const
 
ros::NodeHandlegetMTPrivateNodeHandle () const
 
const V_stringgetMyArgv () const
 
const std::string & getName () const
 
ros::NodeHandlegetNodeHandle () const
 
ros::NodeHandlegetPrivateNodeHandle () const
 
const M_stringgetRemappingArgs () const
 
ros::CallbackQueueInterfacegetSTCallbackQueue () const
 
std::string getSuffixedName (const std::string &suffix) const
 

Detailed Description

Definition at line 63 of file driver.h.

Member Typedef Documentation

typedef FreenectConfig xiaoqiang_freenect_camera::DriverNodelet::Config
private

Definition at line 68 of file driver.h.

Definition at line 70 of file driver.h.

typedef dynamic_reconfigure::Server<Config> xiaoqiang_freenect_camera::DriverNodelet::ReconfigureServer
private

Definition at line 69 of file driver.h.

Definition at line 71 of file driver.h.

Definition at line 72 of file driver.h.

Constructor & Destructor Documentation

xiaoqiang_freenect_camera::DriverNodelet::~DriverNodelet ( )
virtual
Todo:
Test watchdog timer for race conditions. May need to use a separate callback queue controlled by the driver nodelet.

Definition at line 50 of file driver.cpp.

Member Function Documentation

void xiaoqiang_freenect_camera::DriverNodelet::checkFrameCounters ( )
private

Definition at line 493 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::configCb ( Config config,
uint32_t  level 
)
private

Definition at line 780 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::depthCb ( const ImageBuffer depth_image,
void cookie 
)
private

Definition at line 530 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::depthConnectCb ( )
private
Todo:
pub_projector_info_? Probably also subscribed to a depth image if you need it
Todo:
Warn if requested topics don't agree with Freenect registration setting

Definition at line 440 of file driver.cpp.

sensor_msgs::CameraInfoPtr xiaoqiang_freenect_camera::DriverNodelet::getDefaultCameraInfo ( int  width,
int  height,
double  f 
) const
private

Definition at line 676 of file driver.cpp.

sensor_msgs::CameraInfoPtr xiaoqiang_freenect_camera::DriverNodelet::getDepthCameraInfo ( const ImageBuffer image,
ros::Time  time 
) const
private
Todo:
Could put this in projector frame so as to encode the baseline in P[3]

Definition at line 753 of file driver.cpp.

sensor_msgs::CameraInfoPtr xiaoqiang_freenect_camera::DriverNodelet::getIrCameraInfo ( const ImageBuffer image,
ros::Time  time 
) const
private

Definition at line 732 of file driver.cpp.

sensor_msgs::CameraInfoPtr xiaoqiang_freenect_camera::DriverNodelet::getProjectorCameraInfo ( const ImageBuffer image,
ros::Time  time 
) const
private

Definition at line 769 of file driver.cpp.

sensor_msgs::CameraInfoPtr xiaoqiang_freenect_camera::DriverNodelet::getRgbCameraInfo ( const ImageBuffer image,
ros::Time  time 
) const
private
Todo:
Use binning/ROI properly in publishing camera infos

Definition at line 711 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::irCb ( const ImageBuffer _image,
void cookie 
)
private

Definition at line 557 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::irConnectCb ( )
private

Definition at line 466 of file driver.cpp.

OutputMode xiaoqiang_freenect_camera::DriverNodelet::mapConfigMode2OutputMode ( int  mode) const
private

Definition at line 899 of file driver.cpp.

int xiaoqiang_freenect_camera::DriverNodelet::mapMode2ConfigMode ( const OutputMode output_mode) const
private
Todo:
Consolidate all the mode stuff, maybe even in different class/header

Definition at line 886 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::onInit ( )
privatevirtual

Nodelet initialization routine.

Implements nodelet::Nodelet.

Definition at line 71 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::onInitImpl ( )
private
Todo:
Make it ir instead?

Definition at line 79 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::publishDepthImage ( const ImageBuffer depth,
ros::Time  time 
) const
private

Definition at line 612 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::publishIrImage ( const ImageBuffer ir,
ros::Time  time 
) const
private

Definition at line 657 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::publishRgbImage ( const ImageBuffer image,
ros::Time  time 
) const
private

Definition at line 578 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::rgbCb ( const ImageBuffer image,
void cookie 
)
private

Definition at line 508 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::rgbConnectCb ( )
private

Definition at line 403 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::setupDevice ( )
private

Definition at line 321 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::startSynchronization ( )
private

Definition at line 853 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::stopSynchronization ( )
private

Definition at line 864 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::updateDiagnostics ( )
private

Definition at line 314 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::updateModeMaps ( )
private

Definition at line 873 of file driver.cpp.

void xiaoqiang_freenect_camera::DriverNodelet::watchDog ( const ros::TimerEvent event)
private

Definition at line 911 of file driver.cpp.

Member Data Documentation

bool xiaoqiang_freenect_camera::DriverNodelet::audio_processing_
private

Definition at line 127 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::close_diagnostics_
private

Definition at line 120 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::close_tiltThread_
private

Definition at line 122 of file driver.h.

std::map<int, OutputMode> xiaoqiang_freenect_camera::DriverNodelet::config2mode_map_
private

Definition at line 178 of file driver.h.

Config xiaoqiang_freenect_camera::DriverNodelet::config_
private

Definition at line 144 of file driver.h.

boost::mutex xiaoqiang_freenect_camera::DriverNodelet::connect_mutex_
private

Definition at line 140 of file driver.h.

boost::mutex xiaoqiang_freenect_camera::DriverNodelet::counter_mutex_
private

Definition at line 155 of file driver.h.

int xiaoqiang_freenect_camera::DriverNodelet::depth_frame_counter_
private

Definition at line 157 of file driver.h.

std::string xiaoqiang_freenect_camera::DriverNodelet::depth_frame_id_
private

Definition at line 149 of file driver.h.

double xiaoqiang_freenect_camera::DriverNodelet::depth_ir_offset_x_
private

Definition at line 150 of file driver.h.

double xiaoqiang_freenect_camera::DriverNodelet::depth_ir_offset_y_
private

Definition at line 151 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::depth_processing_
private

Definition at line 130 of file driver.h.

ros::Time xiaoqiang_freenect_camera::DriverNodelet::depth_time_stamp_
private

Definition at line 169 of file driver.h.

boost::shared_ptr<FreenectDevice> xiaoqiang_freenect_camera::DriverNodelet::device_
private

the actual openni device

Definition at line 138 of file driver.h.

boost::shared_ptr<diagnostic_updater::Updater> xiaoqiang_freenect_camera::DriverNodelet::diagnostic_updater_
private

Definition at line 110 of file driver.h.

boost::thread xiaoqiang_freenect_camera::DriverNodelet::diagnostics_thread_
private

Definition at line 118 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::enable_depth_diagnostics_
private

Definition at line 115 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::enable_ir_diagnostics_
private

Definition at line 117 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::enable_rgb_diagnostics_
private

Definition at line 113 of file driver.h.

boost::thread xiaoqiang_freenect_camera::DriverNodelet::init_thread_
private

Definition at line 139 of file driver.h.

int xiaoqiang_freenect_camera::DriverNodelet::ir_frame_counter_
private

Definition at line 158 of file driver.h.

boost::shared_ptr<camera_info_manager::CameraInfoManager> xiaoqiang_freenect_camera::DriverNodelet::ir_info_manager_
private

Definition at line 147 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::ir_processing_
private

Definition at line 129 of file driver.h.

ros::Time xiaoqiang_freenect_camera::DriverNodelet::ir_time_stamp_
private

Definition at line 170 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::libfreenect_debug_
private

enable libfreenect debugging

Definition at line 175 of file driver.h.

std::map<OutputMode, int> xiaoqiang_freenect_camera::DriverNodelet::mode2config_map_
private

Definition at line 177 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::motor_processing_
private

Definition at line 126 of file driver.h.

unsigned int xiaoqiang_freenect_camera::DriverNodelet::num_frame_
private

Definition at line 179 of file driver.h.

image_transport::CameraPublisher xiaoqiang_freenect_camera::DriverNodelet::pub_depth_
private

Definition at line 105 of file driver.h.

TopicDiagnosticPtr xiaoqiang_freenect_camera::DriverNodelet::pub_depth_freq_
private

Definition at line 114 of file driver.h.

image_transport::CameraPublisher xiaoqiang_freenect_camera::DriverNodelet::pub_depth_registered_
private

Definition at line 105 of file driver.h.

double xiaoqiang_freenect_camera::DriverNodelet::pub_freq_max_
private

Definition at line 111 of file driver.h.

double xiaoqiang_freenect_camera::DriverNodelet::pub_freq_min_
private

Definition at line 111 of file driver.h.

image_transport::CameraPublisher xiaoqiang_freenect_camera::DriverNodelet::pub_ir_
private

Definition at line 106 of file driver.h.

TopicDiagnosticPtr xiaoqiang_freenect_camera::DriverNodelet::pub_ir_freq_
private

Definition at line 116 of file driver.h.

ros::Publisher xiaoqiang_freenect_camera::DriverNodelet::pub_projector_info_
private

Definition at line 107 of file driver.h.

image_transport::CameraPublisher xiaoqiang_freenect_camera::DriverNodelet::pub_rgb_
private

Definition at line 104 of file driver.h.

TopicDiagnosticPtr xiaoqiang_freenect_camera::DriverNodelet::pub_rgb_freq_
private

Definition at line 112 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::publish_depth_
private

Definition at line 161 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::publish_ir_
private

Definition at line 160 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::publish_rgb_
private

Definition at line 159 of file driver.h.

boost::shared_ptr<ReconfigureServer> xiaoqiang_freenect_camera::DriverNodelet::reconfigure_server_
private

reconfigure server

Definition at line 143 of file driver.h.

int xiaoqiang_freenect_camera::DriverNodelet::rgb_frame_counter_
private

Definition at line 156 of file driver.h.

std::string xiaoqiang_freenect_camera::DriverNodelet::rgb_frame_id_
private

Definition at line 148 of file driver.h.

boost::shared_ptr<camera_info_manager::CameraInfoManager> xiaoqiang_freenect_camera::DriverNodelet::rgb_info_manager_
private

Camera info manager objects.

Definition at line 147 of file driver.h.

bool xiaoqiang_freenect_camera::DriverNodelet::rgb_processing_
private

Definition at line 128 of file driver.h.

ros::Time xiaoqiang_freenect_camera::DriverNodelet::rgb_time_stamp_
private

Definition at line 168 of file driver.h.

freenect_device_flags xiaoqiang_freenect_camera::DriverNodelet::subdevs_
private

Definition at line 131 of file driver.h.

boost::thread xiaoqiang_freenect_camera::DriverNodelet::tilt_thread_
private

Definition at line 123 of file driver.h.

TiltDriver xiaoqiang_freenect_camera::DriverNodelet::tiltDriver_
private

Definition at line 124 of file driver.h.

double xiaoqiang_freenect_camera::DriverNodelet::time_out_
private

timeout value in seconds to throw TIMEOUT exception

Definition at line 167 of file driver.h.

ros::Time xiaoqiang_freenect_camera::DriverNodelet::time_stamp_
private

Definition at line 171 of file driver.h.

ros::Timer xiaoqiang_freenect_camera::DriverNodelet::watch_dog_timer_
private

Definition at line 172 of file driver.h.

int xiaoqiang_freenect_camera::DriverNodelet::z_offset_mm_
private

Definition at line 152 of file driver.h.


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


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