Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
libuvc_camera::CameraDriver Class Reference

#include <camera_driver.h>

Public Member Functions

 CameraDriver (ros::NodeHandle nh, ros::NodeHandle priv_nh)
 
bool Start ()
 
void Stop ()
 
 ~CameraDriver ()
 

Private Types

enum  State { kInitial = 0, kStopped = 1, kRunning = 2 }
 

Private Member Functions

void AutoControlsCallback (enum uvc_status_class status_class, int event, int selector, enum uvc_status_attribute status_attribute, void *data, size_t data_len)
 
void CloseCamera ()
 
bool getUVCExposureCb (astra_camera::GetUVCExposureRequest &req, astra_camera::GetUVCExposureResponse &res)
 
bool getUVCGainCb (astra_camera::GetUVCGainRequest &req, astra_camera::GetUVCGainResponse &res)
 
bool getUVCWhiteBalanceCb (astra_camera::GetUVCWhiteBalanceRequest &req, astra_camera::GetUVCWhiteBalanceResponse &res)
 
enum uvc_frame_format GetVideoMode (std::string vmode)
 
void ImageCallback (uvc_frame_t *frame)
 
void OpenCamera (UVCCameraConfig &new_config)
 
void ReconfigureCallback (UVCCameraConfig &config, uint32_t level)
 
bool setUVCExposureCb (astra_camera::SetUVCExposureRequest &req, astra_camera::SetUVCExposureResponse &res)
 
bool setUVCGainCb (astra_camera::SetUVCGainRequest &req, astra_camera::SetUVCGainResponse &res)
 
bool setUVCWhiteBalanceCb (astra_camera::SetUVCWhiteBalanceRequest &req, astra_camera::SetUVCWhiteBalanceResponse &res)
 

Static Private Member Functions

static void AutoControlsCallbackAdapter (enum uvc_status_class status_class, int event, int selector, enum uvc_status_attribute status_attribute, void *data, size_t data_len, void *ptr)
 
static void ImageCallbackAdapter (uvc_frame_t *frame, void *ptr)
 

Private Attributes

image_transport::CameraPublisher cam_pub_
 
sensor_msgs::CameraInfo camera_info_
 
ros::ServiceClient camera_info_client
 
bool camera_info_init_
 
bool camera_info_valid_
 
camera_info_manager::CameraInfoManager cinfo_manager_
 
UVCCameraConfig config_
 
bool config_changed_
 
dynamic_reconfigure::Server< UVCCameraConfig > config_server_
 
uvc_context_t * ctx_
 
uvc_device_t * dev_
 
uvc_device_handle_t * devh_
 
std::string device_type_
 
ros::ServiceClient device_type_client
 
bool device_type_init_
 
OB_DEVICE_NO device_type_no_
 
ros::ServiceServer get_uvc_exposure_server
 
ros::ServiceServer get_uvc_gain_server
 
ros::ServiceServer get_uvc_white_balance_server
 
image_transport::ImageTransport it_
 
boost::recursive_mutex mutex_
 
ros::NodeHandle nh_
 
std::string ns
 
std::string ns_no_slash
 
ros::NodeHandle priv_nh_
 
uvc_frame_t * rgb_frame_
 
ros::ServiceServer set_uvc_exposure_server
 
ros::ServiceServer set_uvc_gain_server
 
ros::ServiceServer set_uvc_white_balance_server
 
State state_
 
int uvc_flip_
 

Static Private Attributes

static const int kReconfigureClose = 3
 
static const int kReconfigureRunning = 0
 
static const int kReconfigureStop = 1
 

Detailed Description

Definition at line 25 of file camera_driver.h.

Member Enumeration Documentation

Enumerator
kInitial 
kStopped 
kRunning 

Definition at line 34 of file camera_driver.h.

Constructor & Destructor Documentation

libuvc_camera::CameraDriver::CameraDriver ( ros::NodeHandle  nh,
ros::NodeHandle  priv_nh 
)

Definition at line 52 of file camera_driver.cpp.

libuvc_camera::CameraDriver::~CameraDriver ( )

Definition at line 86 of file camera_driver.cpp.

Member Function Documentation

void libuvc_camera::CameraDriver::AutoControlsCallback ( enum uvc_status_class  status_class,
int  event,
int  selector,
enum uvc_status_attribute  status_attribute,
void *  data,
size_t  data_len 
)
private

Definition at line 407 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::AutoControlsCallbackAdapter ( enum uvc_status_class  status_class,
int  event,
int  selector,
enum uvc_status_attribute  status_attribute,
void *  data,
size_t  data_len,
void *  ptr 
)
staticprivate

Definition at line 449 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::CloseCamera ( )
private

Definition at line 608 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::getUVCExposureCb ( astra_camera::GetUVCExposureRequest &  req,
astra_camera::GetUVCExposureResponse &  res 
)
private

Definition at line 94 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::getUVCGainCb ( astra_camera::GetUVCGainRequest &  req,
astra_camera::GetUVCGainResponse &  res 
)
private

Definition at line 119 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::getUVCWhiteBalanceCb ( astra_camera::GetUVCWhiteBalanceRequest &  req,
astra_camera::GetUVCWhiteBalanceResponse &  res 
)
private

Definition at line 133 of file camera_driver.cpp.

enum uvc_frame_format libuvc_camera::CameraDriver::GetVideoMode ( std::string  vmode)
private

Definition at line 462 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::ImageCallback ( uvc_frame_t *  frame)
private

Definition at line 250 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::ImageCallbackAdapter ( uvc_frame_t *  frame,
void *  ptr 
)
staticprivate

Definition at line 401 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::OpenCamera ( UVCCameraConfig &  new_config)
private

Definition at line 486 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::ReconfigureCallback ( UVCCameraConfig &  config,
uint32_t  level 
)
private

Definition at line 188 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::setUVCExposureCb ( astra_camera::SetUVCExposureRequest &  req,
astra_camera::SetUVCExposureResponse &  res 
)
private

Definition at line 102 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::setUVCGainCb ( astra_camera::SetUVCGainRequest &  req,
astra_camera::SetUVCGainResponse &  res 
)
private

Definition at line 127 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::setUVCWhiteBalanceCb ( astra_camera::SetUVCWhiteBalanceRequest &  req,
astra_camera::SetUVCWhiteBalanceResponse &  res 
)
private

Definition at line 141 of file camera_driver.cpp.

bool libuvc_camera::CameraDriver::Start ( )

Definition at line 153 of file camera_driver.cpp.

void libuvc_camera::CameraDriver::Stop ( )

Definition at line 172 of file camera_driver.cpp.

Member Data Documentation

image_transport::CameraPublisher libuvc_camera::CameraDriver::cam_pub_
private

Definition at line 84 of file camera_driver.h.

sensor_msgs::CameraInfo libuvc_camera::CameraDriver::camera_info_
private

Definition at line 107 of file camera_driver.h.

ros::ServiceClient libuvc_camera::CameraDriver::camera_info_client
private

Definition at line 102 of file camera_driver.h.

bool libuvc_camera::CameraDriver::camera_info_init_
private

Definition at line 105 of file camera_driver.h.

bool libuvc_camera::CameraDriver::camera_info_valid_
private

Definition at line 110 of file camera_driver.h.

camera_info_manager::CameraInfoManager libuvc_camera::CameraDriver::cinfo_manager_
private

Definition at line 90 of file camera_driver.h.

UVCCameraConfig libuvc_camera::CameraDriver::config_
private

Definition at line 87 of file camera_driver.h.

bool libuvc_camera::CameraDriver::config_changed_
private

Definition at line 88 of file camera_driver.h.

dynamic_reconfigure::Server<UVCCameraConfig> libuvc_camera::CameraDriver::config_server_
private

Definition at line 86 of file camera_driver.h.

uvc_context_t* libuvc_camera::CameraDriver::ctx_
private

Definition at line 78 of file camera_driver.h.

uvc_device_t* libuvc_camera::CameraDriver::dev_
private

Definition at line 79 of file camera_driver.h.

uvc_device_handle_t* libuvc_camera::CameraDriver::devh_
private

Definition at line 80 of file camera_driver.h.

std::string libuvc_camera::CameraDriver::device_type_
private

Definition at line 106 of file camera_driver.h.

ros::ServiceClient libuvc_camera::CameraDriver::device_type_client
private

Definition at line 101 of file camera_driver.h.

bool libuvc_camera::CameraDriver::device_type_init_
private

Definition at line 104 of file camera_driver.h.

OB_DEVICE_NO libuvc_camera::CameraDriver::device_type_no_
private

Definition at line 109 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::get_uvc_exposure_server
private

Definition at line 94 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::get_uvc_gain_server
private

Definition at line 96 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::get_uvc_white_balance_server
private

Definition at line 98 of file camera_driver.h.

image_transport::ImageTransport libuvc_camera::CameraDriver::it_
private

Definition at line 83 of file camera_driver.h.

const int libuvc_camera::CameraDriver::kReconfigureClose = 3
staticprivate

Definition at line 41 of file camera_driver.h.

const int libuvc_camera::CameraDriver::kReconfigureRunning = 0
staticprivate

Definition at line 43 of file camera_driver.h.

const int libuvc_camera::CameraDriver::kReconfigureStop = 1
staticprivate

Definition at line 42 of file camera_driver.h.

boost::recursive_mutex libuvc_camera::CameraDriver::mutex_
private

Definition at line 76 of file camera_driver.h.

ros::NodeHandle libuvc_camera::CameraDriver::nh_
private

Definition at line 73 of file camera_driver.h.

std::string libuvc_camera::CameraDriver::ns
private

Definition at line 91 of file camera_driver.h.

std::string libuvc_camera::CameraDriver::ns_no_slash
private

Definition at line 92 of file camera_driver.h.

ros::NodeHandle libuvc_camera::CameraDriver::priv_nh_
private

Definition at line 73 of file camera_driver.h.

uvc_frame_t* libuvc_camera::CameraDriver::rgb_frame_
private

Definition at line 81 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::set_uvc_exposure_server
private

Definition at line 95 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::set_uvc_gain_server
private

Definition at line 97 of file camera_driver.h.

ros::ServiceServer libuvc_camera::CameraDriver::set_uvc_white_balance_server
private

Definition at line 99 of file camera_driver.h.

State libuvc_camera::CameraDriver::state_
private

Definition at line 75 of file camera_driver.h.

int libuvc_camera::CameraDriver::uvc_flip_
private

Definition at line 108 of file camera_driver.h.


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


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34