Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
openni2_wrapper::OpenNI2Driver Class Reference

#include <openni2_driver.h>

Public Member Functions

 OpenNI2Driver (ros::NodeHandle &n, ros::NodeHandle &pnh)
 

Private Types

typedef openni2_camera::OpenNI2Config Config
 
typedef dynamic_reconfigure::Server< ConfigReconfigureServer
 

Private Member Functions

void advertiseROSTopics ()
 
void applyConfigToOpenNIDevice ()
 
void colorConnectCb ()
 
void configCb (Config &config, uint32_t level)
 
void depthConnectCb ()
 
int extractBusID (const std::string &uri) const
 
void forceSetExposure ()
 
void genVideoModeTableMap ()
 
sensor_msgs::CameraInfoPtr getColorCameraInfo (int width, int height, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getDefaultCameraInfo (int width, int height, double f) const
 
sensor_msgs::CameraInfoPtr getDepthCameraInfo (int width, int height, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getIRCameraInfo (int width, int height, ros::Time time) const
 
sensor_msgs::CameraInfoPtr getProjectorCameraInfo (int width, int height, ros::Time time) const
 
bool getSerialCb (openni2_camera::GetSerialRequest &req, openni2_camera::GetSerialResponse &res)
 
void initDevice ()
 
void irConnectCb ()
 
bool isConnected () const
 
int lookupVideoModeFromDynConfig (int mode_nr, OpenNI2VideoMode &video_mode)
 
void monitorConnection (const ros::TimerEvent &event)
 
void newColorFrameCallback (sensor_msgs::ImagePtr image)
 
void newDepthFrameCallback (sensor_msgs::ImagePtr image)
 
void newIRFrameCallback (sensor_msgs::ImagePtr image)
 
sensor_msgs::ImageConstPtr rawToFloatingPointConversion (sensor_msgs::ImageConstPtr raw_image)
 
void readConfigFromParameterServer ()
 
std::string resolveDeviceURI (const std::string &device_id) throw (OpenNI2Exception)
 
void setColorVideoMode (const OpenNI2VideoMode &color_video_mode)
 
void setDepthVideoMode (const OpenNI2VideoMode &depth_video_mode)
 
void setIRVideoMode (const OpenNI2VideoMode &ir_video_mode)
 

Private Attributes

bool auto_exposure_
 
bool auto_white_balance_
 
int bus_id_
 
bool color_depth_synchronization_
 
std::string color_frame_id_
 
boost::shared_ptr< camera_info_manager::CameraInfoManagercolor_info_manager_
 Camera info manager objects. More...
 
std::string color_info_url_
 
bool color_subscribers_
 
ros::Duration color_time_offset_
 
OpenNI2VideoMode color_video_mode_
 
bool config_init_
 
boost::mutex connect_mutex_
 
int data_skip_
 
int data_skip_color_counter_
 
int data_skip_depth_counter_
 
int data_skip_ir_counter_
 
std::string depth_frame_id_
 
double depth_ir_offset_x_
 
double depth_ir_offset_y_
 
bool depth_raw_subscribers_
 
bool depth_registration_
 
bool depth_subscribers_
 
ros::Duration depth_time_offset_
 
OpenNI2VideoMode depth_video_mode_
 
boost::shared_ptr< OpenNI2Devicedevice_
 
std::string device_id_
 
boost::shared_ptr< OpenNI2DeviceManagerdevice_manager_
 
bool enable_reconnect_
 indicates if reconnect logic is enabled. More...
 
int exposure_
 
ros::ServiceServer get_serial_server
 get_serial server More...
 
std::string ir_frame_id_
 
boost::shared_ptr< camera_info_manager::CameraInfoManagerir_info_manager_
 
std::string ir_info_url_
 
bool ir_subscribers_
 
ros::Duration ir_time_offset_
 
OpenNI2VideoMode ir_video_mode_
 
ros::NodeHandlenh_
 
Config old_config_
 
ros::NodeHandlepnh_
 
bool projector_info_subscribers_
 
image_transport::CameraPublisher pub_color_
 
image_transport::CameraPublisher pub_depth_
 
image_transport::CameraPublisher pub_depth_raw_
 
image_transport::CameraPublisher pub_ir_
 
ros::Publisher pub_projector_info_
 
boost::shared_ptr< ReconfigureServerreconfigure_server_
 reconfigure server More...
 
bool serialnumber_as_name_
 indicates if the serialnumber is used in the camera names. Default is false. The name is based on the device and vendor name. This produces non-unique camera names, if multiple camaras of the same type are used on the same machine. Set to true, to get names with serialnumber. The names will always be unique. This matches the 'openni' behaviour. More...
 
ros::Timer timer_
 timer for connection monitoring thread More...
 
bool use_device_time_
 
std::map< int, OpenNI2VideoModevideo_modes_lookup_
 
int z_offset_mm_
 
double z_scaling_
 

Detailed Description

Definition at line 61 of file openni2_driver.h.

Member Typedef Documentation

typedef openni2_camera::OpenNI2Config openni2_wrapper::OpenNI2Driver::Config
private

Definition at line 67 of file openni2_driver.h.

typedef dynamic_reconfigure::Server<Config> openni2_wrapper::OpenNI2Driver::ReconfigureServer
private

Definition at line 68 of file openni2_driver.h.

Constructor & Destructor Documentation

openni2_wrapper::OpenNI2Driver::OpenNI2Driver ( ros::NodeHandle n,
ros::NodeHandle pnh 
)

Definition at line 44 of file openni2_driver.cpp.

Member Function Documentation

void openni2_wrapper::OpenNI2Driver::advertiseROSTopics ( )
private

Definition at line 91 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::applyConfigToOpenNIDevice ( )
private

Definition at line 268 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::colorConnectCb ( )
private

Definition at line 374 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::configCb ( Config config,
uint32_t  level 
)
private

Definition at line 169 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::depthConnectCb ( )
private

Definition at line 427 of file openni2_driver.cpp.

int openni2_wrapper::OpenNI2Driver::extractBusID ( const std::string &  uri) const
private

Definition at line 875 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::forceSetExposure ( )
private

Definition at line 350 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::genVideoModeTableMap ( )
private

Definition at line 981 of file openni2_driver.cpp.

sensor_msgs::CameraInfoPtr openni2_wrapper::OpenNI2Driver::getColorCameraInfo ( int  width,
int  height,
ros::Time  time 
) const
private
Todo:
Use binning/ROI properly in publishing camera infos

Definition at line 616 of file openni2_driver.cpp.

sensor_msgs::CameraInfoPtr openni2_wrapper::OpenNI2Driver::getDefaultCameraInfo ( int  width,
int  height,
double  f 
) const
private

Definition at line 581 of file openni2_driver.cpp.

sensor_msgs::CameraInfoPtr openni2_wrapper::OpenNI2Driver::getDepthCameraInfo ( int  width,
int  height,
ros::Time  time 
) const
private
Todo:
Could put this in projector frame so as to encode the baseline in P[3]

Definition at line 671 of file openni2_driver.cpp.

sensor_msgs::CameraInfoPtr openni2_wrapper::OpenNI2Driver::getIRCameraInfo ( int  width,
int  height,
ros::Time  time 
) const
private

Definition at line 644 of file openni2_driver.cpp.

sensor_msgs::CameraInfoPtr openni2_wrapper::OpenNI2Driver::getProjectorCameraInfo ( int  width,
int  height,
ros::Time  time 
) const
private

Definition at line 689 of file openni2_driver.cpp.

bool openni2_wrapper::OpenNI2Driver::getSerialCb ( openni2_camera::GetSerialRequest &  req,
openni2_camera::GetSerialResponse &  res 
)
private

Definition at line 164 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::initDevice ( )
private

Definition at line 840 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::irConnectCb ( )
private

Definition at line 456 of file openni2_driver.cpp.

bool openni2_wrapper::OpenNI2Driver::isConnected ( ) const
private

Definition at line 886 of file openni2_driver.cpp.

int openni2_wrapper::OpenNI2Driver::lookupVideoModeFromDynConfig ( int  mode_nr,
OpenNI2VideoMode video_mode 
)
private

Definition at line 1090 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::monitorConnection ( const ros::TimerEvent event)
private

Definition at line 904 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::newColorFrameCallback ( sensor_msgs::ImagePtr  image)
private

Definition at line 505 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::newDepthFrameCallback ( sensor_msgs::ImagePtr  image)
private

Definition at line 521 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::newIRFrameCallback ( sensor_msgs::ImagePtr  image)
private

Definition at line 489 of file openni2_driver.cpp.

sensor_msgs::ImageConstPtr openni2_wrapper::OpenNI2Driver::rawToFloatingPointConversion ( sensor_msgs::ImageConstPtr  raw_image)
private

Definition at line 1107 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::readConfigFromParameterServer ( )
private

Definition at line 700 of file openni2_driver.cpp.

std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI ( const std::string &  device_id)
throw (OpenNI2Exception
)
private

Definition at line 726 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::setColorVideoMode ( const OpenNI2VideoMode color_video_mode)
private

Definition at line 239 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::setDepthVideoMode ( const OpenNI2VideoMode depth_video_mode)
private

Definition at line 253 of file openni2_driver.cpp.

void openni2_wrapper::OpenNI2Driver::setIRVideoMode ( const OpenNI2VideoMode ir_video_mode)
private

Definition at line 224 of file openni2_driver.cpp.

Member Data Documentation

bool openni2_wrapper::OpenNI2Driver::auto_exposure_
private

Definition at line 187 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::auto_white_balance_
private

Definition at line 188 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::bus_id_
private

Definition at line 121 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::color_depth_synchronization_
private

Definition at line 166 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::color_frame_id_
private

Definition at line 161 of file openni2_driver.h.

boost::shared_ptr<camera_info_manager::CameraInfoManager> openni2_wrapper::OpenNI2Driver::color_info_manager_
private

Camera info manager objects.

Definition at line 154 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::color_info_url_
private

Definition at line 164 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::color_subscribers_
private

Definition at line 192 of file openni2_driver.h.

ros::Duration openni2_wrapper::OpenNI2Driver::color_time_offset_
private

Definition at line 178 of file openni2_driver.h.

OpenNI2VideoMode openni2_wrapper::OpenNI2Driver::color_video_mode_
private

Definition at line 157 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::config_init_
private

Definition at line 140 of file openni2_driver.h.

boost::mutex openni2_wrapper::OpenNI2Driver::connect_mutex_
private

Definition at line 142 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::data_skip_
private

Definition at line 181 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::data_skip_color_counter_
private

Definition at line 184 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::data_skip_depth_counter_
private

Definition at line 185 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::data_skip_ir_counter_
private

Definition at line 183 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::depth_frame_id_
private

Definition at line 162 of file openni2_driver.h.

double openni2_wrapper::OpenNI2Driver::depth_ir_offset_x_
private

Definition at line 172 of file openni2_driver.h.

double openni2_wrapper::OpenNI2Driver::depth_ir_offset_y_
private

Definition at line 173 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::depth_raw_subscribers_
private

Definition at line 194 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::depth_registration_
private

Definition at line 167 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::depth_subscribers_
private

Definition at line 193 of file openni2_driver.h.

ros::Duration openni2_wrapper::OpenNI2Driver::depth_time_offset_
private

Definition at line 179 of file openni2_driver.h.

OpenNI2VideoMode openni2_wrapper::OpenNI2Driver::depth_video_mode_
private

Definition at line 158 of file openni2_driver.h.

boost::shared_ptr<OpenNI2Device> openni2_wrapper::OpenNI2Driver::device_
private

Definition at line 118 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::device_id_
private

Definition at line 120 of file openni2_driver.h.

boost::shared_ptr<OpenNI2DeviceManager> openni2_wrapper::OpenNI2Driver::device_manager_
private

Definition at line 117 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::enable_reconnect_
private

indicates if reconnect logic is enabled.

Definition at line 124 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::exposure_
private

Definition at line 189 of file openni2_driver.h.

ros::ServiceServer openni2_wrapper::OpenNI2Driver::get_serial_server
private

get_serial server

Definition at line 136 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::ir_frame_id_
private

Definition at line 160 of file openni2_driver.h.

boost::shared_ptr<camera_info_manager::CameraInfoManager> openni2_wrapper::OpenNI2Driver::ir_info_manager_
private

Definition at line 154 of file openni2_driver.h.

std::string openni2_wrapper::OpenNI2Driver::ir_info_url_
private

Definition at line 164 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::ir_subscribers_
private

Definition at line 191 of file openni2_driver.h.

ros::Duration openni2_wrapper::OpenNI2Driver::ir_time_offset_
private

Definition at line 177 of file openni2_driver.h.

OpenNI2VideoMode openni2_wrapper::OpenNI2Driver::ir_video_mode_
private

Definition at line 156 of file openni2_driver.h.

ros::NodeHandle& openni2_wrapper::OpenNI2Driver::nh_
private

Definition at line 114 of file openni2_driver.h.

Config openni2_wrapper::OpenNI2Driver::old_config_
private

Definition at line 199 of file openni2_driver.h.

ros::NodeHandle& openni2_wrapper::OpenNI2Driver::pnh_
private

Definition at line 115 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::projector_info_subscribers_
private

Definition at line 195 of file openni2_driver.h.

image_transport::CameraPublisher openni2_wrapper::OpenNI2Driver::pub_color_
private

Definition at line 144 of file openni2_driver.h.

image_transport::CameraPublisher openni2_wrapper::OpenNI2Driver::pub_depth_
private

Definition at line 145 of file openni2_driver.h.

image_transport::CameraPublisher openni2_wrapper::OpenNI2Driver::pub_depth_raw_
private

Definition at line 146 of file openni2_driver.h.

image_transport::CameraPublisher openni2_wrapper::OpenNI2Driver::pub_ir_
private

Definition at line 147 of file openni2_driver.h.

ros::Publisher openni2_wrapper::OpenNI2Driver::pub_projector_info_
private

Definition at line 148 of file openni2_driver.h.

boost::shared_ptr<ReconfigureServer> openni2_wrapper::OpenNI2Driver::reconfigure_server_
private

reconfigure server

Definition at line 139 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::serialnumber_as_name_
private

indicates if the serialnumber is used in the camera names. Default is false. The name is based on the device and vendor name. This produces non-unique camera names, if multiple camaras of the same type are used on the same machine. Set to true, to get names with serialnumber. The names will always be unique. This matches the 'openni' behaviour.

Definition at line 133 of file openni2_driver.h.

ros::Timer openni2_wrapper::OpenNI2Driver::timer_
private

timer for connection monitoring thread

Definition at line 151 of file openni2_driver.h.

bool openni2_wrapper::OpenNI2Driver::use_device_time_
private

Definition at line 197 of file openni2_driver.h.

std::map<int, OpenNI2VideoMode> openni2_wrapper::OpenNI2Driver::video_modes_lookup_
private

Definition at line 169 of file openni2_driver.h.

int openni2_wrapper::OpenNI2Driver::z_offset_mm_
private

Definition at line 174 of file openni2_driver.h.

double openni2_wrapper::OpenNI2Driver::z_scaling_
private

Definition at line 175 of file openni2_driver.h.


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


openni2_camera
Author(s): Julius Kammerl
autogenerated on Wed Feb 3 2021 03:18:41