Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
realsense_camera::BaseNodelet Class Reference

#include <base_nodelet.h>

Inheritance diagram for realsense_camera::BaseNodelet:
Inheritance graph
[legend]

Classes

struct  CameraOptions
 

Public Member Functions

virtual bool forcePowerCameraService (realsense_camera::ForcePower::Request &req, realsense_camera::ForcePower::Response &res)
 
virtual bool getCameraOptionValues (realsense_camera::CameraConfiguration::Request &req, realsense_camera::CameraConfiguration::Response &res)
 
virtual bool isPoweredCameraService (realsense_camera::IsPowered::Request &req, realsense_camera::IsPowered::Response &res)
 
virtual void onInit ()
 
virtual void setDepthEnable (bool &enable_depth)
 
virtual bool setPowerCameraService (realsense_camera::SetPower::Request &req, realsense_camera::SetPower::Response &res)
 
virtual ~BaseNodelet ()
 
- 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 ()
 

Protected Member Functions

virtual void advertiseServices ()
 
virtual void advertiseTopics ()
 
virtual void checkError ()
 
virtual std::string checkFirmwareValidation (const std::string &fw_type, const std::string &current_fw, const std::string &camera_name, const std::string &camera_serial_number)
 
virtual bool checkForSubscriber ()
 
virtual bool connectToCamera ()
 
virtual void disableStream (rs_stream stream_index)
 
virtual void enableStream (rs_stream stream_index, int width, int height, rs_format format, int fps)
 
virtual void getCameraExtrinsics ()
 
virtual void getCameraOptions ()
 
virtual void getParameters ()
 
virtual void getStreamCalibData (rs_stream stream_index)
 
virtual ros::Time getTimestamp (rs_stream stream_index, double frame_ts)
 
virtual std::vector< intlistCameras (int num_of_camera)
 
virtual void prepareTransforms ()
 
virtual void publishDynamicTransforms ()
 
virtual void publishPCTopic ()
 
virtual void publishStaticTransforms ()
 
virtual void publishTopic (rs_stream stream_index, rs::frame &frame)
 
virtual std::vector< std::stringsetDynamicReconfServer ()
 
virtual void setFrameCallbacks ()
 
virtual void setImageData (rs_stream stream_index, rs::frame &frame)
 
virtual void setStaticCameraOptions (std::vector< std::string > dynamic_params)
 
virtual void setStreams ()
 
virtual std::string startCamera ()
 
virtual void startDynamicReconfCallback ()
 
virtual std::string stopCamera ()
 
virtual void wrappedSystem (const std::vector< std::string > &string_argv)
 
- Protected Member Functions inherited from nodelet::Nodelet
ros::CallbackQueueInterfacegetMTCallbackQueue () const
 
ros::NodeHandlegetMTNodeHandle () const
 
ros::NodeHandlegetMTPrivateNodeHandle () const
 
const V_stringgetMyArgv () const
 
const std::stringgetName () const
 
ros::NodeHandlegetNodeHandle () const
 
ros::NodeHandlegetPrivateNodeHandle () const
 
const M_stringgetRemappingArgs () const
 
ros::CallbackQueueInterfacegetSTCallbackQueue () const
 
std::string getSuffixedName (const std::string &suffix) const
 

Protected Attributes

std::string base_frame_id_
 
sensor_msgs::CameraInfoPtr camera_info_ptr_ [STREAM_COUNT] = {}
 
std::vector< CameraOptionscamera_options_
 
image_transport::CameraPublisher camera_publisher_ [STREAM_COUNT] = {}
 
ros::Time camera_start_ts_
 
std::string camera_type_
 
rs_extrinsics color2depth_extrinsic_
 
rs_extrinsics color2ir_extrinsic_
 
std::function< void(rs::frame f)> color_frame_handler_
 
int cv_type_ [STREAM_COUNT]
 
cv::Mat cvWrapper_
 
std::function< void(rs::frame f)> depth_frame_handler_
 
tf::TransformBroadcaster dynamic_tf_broadcaster_
 
bool enable_ [STREAM_COUNT] = {false}
 
bool enable_pointcloud_
 
bool enable_tf_
 
bool enable_tf_dynamic_
 
std::string encoding_ [STREAM_COUNT]
 
ros::ServiceServer force_power_service_
 
rs_format format_ [STREAM_COUNT]
 
int fps_ [STREAM_COUNT]
 
std::string frame_id_ [STREAM_COUNT]
 
std::mutex frame_mutex_ [STREAM_COUNT]
 
ros::ServiceServer get_options_service_
 
int height_ [STREAM_COUNT]
 
cv::Mat image_ [STREAM_COUNT] = {}
 
const uint16_t * image_depth16_
 
std::function< void(rs::frame f)> ir_frame_handler_
 
ros::ServiceServer is_powered_service_
 
float max_z_ = -1.0f
 
std::string mode_
 
ros::NodeHandle nh_
 
std::string nodelet_name_
 
std::string optical_frame_id_ [STREAM_COUNT]
 
ros::NodeHandle pnh_
 
ros::Publisher pointcloud_publisher_
 
rs_contextrs_context_ = NULL
 
rs_devicers_device_
 
rs_errorrs_error_ = NULL
 
rs_source rs_source_ = RS_SOURCE_VIDEO
 
std::string serial_no_
 
ros::ServiceServer set_power_service_
 
bool start_camera_ = true
 
bool start_stop_srv_called_ = false
 
tf2_ros::StaticTransformBroadcaster static_tf_broadcaster_
 
int step_ [STREAM_COUNT]
 
std::queue< pid_t > system_proc_groups_
 
double tf_publication_rate_
 
boost::shared_ptr< boost::thread > transform_thread_
 
ros::Time transform_ts_
 
double ts_ [STREAM_COUNT]
 
int unit_step_size_ [STREAM_COUNT]
 
std::string usb_port_id_
 
int width_ [STREAM_COUNT]
 

Detailed Description

Definition at line 77 of file base_nodelet.h.

Constructor & Destructor Documentation

realsense_camera::BaseNodelet::~BaseNodelet ( )
virtual

Definition at line 50 of file base_nodelet.cpp.

Member Function Documentation

void realsense_camera::BaseNodelet::advertiseServices ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet.

Definition at line 391 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::advertiseTopics ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::R200Nodelet.

Definition at line 372 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::checkError ( )
protectedvirtual

Definition at line 1250 of file base_nodelet.cpp.

std::string realsense_camera::BaseNodelet::checkFirmwareValidation ( const std::string fw_type,
const std::string current_fw,
const std::string camera_name,
const std::string camera_serial_number 
)
protectedvirtual

Definition at line 1311 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::checkForSubscriber ( )
protectedvirtual

Definition at line 428 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::connectToCamera ( )
protectedvirtual

Definition at line 197 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::disableStream ( rs_stream  stream_index)
protectedvirtual

Definition at line 764 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::enableStream ( rs_stream  stream_index,
int  width,
int  height,
rs_format  format,
int  fps 
)
protectedvirtual

Definition at line 649 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::forcePowerCameraService ( realsense_camera::ForcePower::Request &  req,
realsense_camera::ForcePower::Response &  res 
)
virtual

Definition at line 500 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::getCameraExtrinsics ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::R200Nodelet.

Definition at line 1048 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::getCameraOptions ( )
protectedvirtual

Definition at line 512 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::getCameraOptionValues ( realsense_camera::CameraConfiguration::Request &  req,
realsense_camera::CameraConfiguration::Response &  res 
)
virtual

Definition at line 406 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::getParameters ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::R200Nodelet.

Definition at line 158 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::getStreamCalibData ( rs_stream  stream_index)
protectedvirtual

Definition at line 680 of file base_nodelet.cpp.

ros::Time realsense_camera::BaseNodelet::getTimestamp ( rs_stream  stream_index,
double  frame_ts 
)
protectedvirtual

Definition at line 877 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::isPoweredCameraService ( realsense_camera::IsPowered::Request &  req,
realsense_camera::IsPowered::Response &  res 
)
virtual

Definition at line 447 of file base_nodelet.cpp.

std::vector< int > realsense_camera::BaseNodelet::listCameras ( int  num_of_camera)
protectedvirtual

Definition at line 289 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::onInit ( )
virtual
void realsense_camera::BaseNodelet::prepareTransforms ( )
protectedvirtual

Definition at line 1229 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::publishDynamicTransforms ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::R200Nodelet.

Definition at line 1174 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::publishPCTopic ( )
protectedvirtual

Definition at line 934 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::publishStaticTransforms ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::R200Nodelet.

Definition at line 1070 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::publishTopic ( rs_stream  stream_index,
rs::frame frame 
)
protectedvirtual

Definition at line 885 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::setDepthEnable ( bool &  enable_depth)
virtual

Definition at line 853 of file base_nodelet.cpp.

virtual std::vector<std::string> realsense_camera::BaseNodelet::setDynamicReconfServer ( )
inlineprotectedvirtual
void realsense_camera::BaseNodelet::setFrameCallbacks ( )
protectedvirtual

Reimplemented in realsense_camera::ZR300Nodelet, and realsense_camera::SyncNodelet.

Definition at line 589 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::setImageData ( rs_stream  stream_index,
rs::frame frame 
)
protectedvirtual

Definition at line 825 of file base_nodelet.cpp.

bool realsense_camera::BaseNodelet::setPowerCameraService ( realsense_camera::SetPower::Request &  req,
realsense_camera::SetPower::Response &  res 
)
virtual

Definition at line 464 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::setStaticCameraOptions ( std::vector< std::string dynamic_params)
protectedvirtual

Definition at line 535 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::setStreams ( )
protectedvirtual
std::string realsense_camera::BaseNodelet::startCamera ( )
protectedvirtual

Definition at line 777 of file base_nodelet.cpp.

virtual void realsense_camera::BaseNodelet::startDynamicReconfCallback ( )
inlineprotectedvirtual
std::string realsense_camera::BaseNodelet::stopCamera ( )
protectedvirtual

Definition at line 802 of file base_nodelet.cpp.

void realsense_camera::BaseNodelet::wrappedSystem ( const std::vector< std::string > &  string_argv)
protectedvirtual

Definition at line 1262 of file base_nodelet.cpp.

Member Data Documentation

std::string realsense_camera::BaseNodelet::base_frame_id_
protected

Definition at line 126 of file base_nodelet.h.

sensor_msgs::CameraInfoPtr realsense_camera::BaseNodelet::camera_info_ptr_[STREAM_COUNT] = {}
protected

Definition at line 125 of file base_nodelet.h.

std::vector<CameraOptions> realsense_camera::BaseNodelet::camera_options_
protected

Definition at line 151 of file base_nodelet.h.

image_transport::CameraPublisher realsense_camera::BaseNodelet::camera_publisher_[STREAM_COUNT] = {}
protected

Definition at line 124 of file base_nodelet.h.

ros::Time realsense_camera::BaseNodelet::camera_start_ts_
protected

Definition at line 97 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::camera_type_
protected

Definition at line 109 of file base_nodelet.h.

rs_extrinsics realsense_camera::BaseNodelet::color2depth_extrinsic_
protected

Definition at line 140 of file base_nodelet.h.

rs_extrinsics realsense_camera::BaseNodelet::color2ir_extrinsic_
protected

Definition at line 141 of file base_nodelet.h.

std::function<void(rs::frame f)> realsense_camera::BaseNodelet::color_frame_handler_
protected

Definition at line 187 of file base_nodelet.h.

int realsense_camera::BaseNodelet::cv_type_[STREAM_COUNT]
protected

Definition at line 117 of file base_nodelet.h.

cv::Mat realsense_camera::BaseNodelet::cvWrapper_
protected

Definition at line 133 of file base_nodelet.h.

std::function<void(rs::frame f)> realsense_camera::BaseNodelet::depth_frame_handler_
protected

Definition at line 187 of file base_nodelet.h.

tf::TransformBroadcaster realsense_camera::BaseNodelet::dynamic_tf_broadcaster_
protected

Definition at line 139 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::enable_[STREAM_COUNT] = {false}
protected

Definition at line 111 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::enable_pointcloud_
protected

Definition at line 128 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::enable_tf_
protected

Definition at line 129 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::enable_tf_dynamic_
protected

Definition at line 130 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::encoding_[STREAM_COUNT]
protected

Definition at line 116 of file base_nodelet.h.

ros::ServiceServer realsense_camera::BaseNodelet::force_power_service_
protected

Definition at line 101 of file base_nodelet.h.

rs_format realsense_camera::BaseNodelet::format_[STREAM_COUNT]
protected

Definition at line 115 of file base_nodelet.h.

int realsense_camera::BaseNodelet::fps_[STREAM_COUNT]
protected

Definition at line 114 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::frame_id_[STREAM_COUNT]
protected

Definition at line 121 of file base_nodelet.h.

std::mutex realsense_camera::BaseNodelet::frame_mutex_[STREAM_COUNT]
protected

Definition at line 134 of file base_nodelet.h.

ros::ServiceServer realsense_camera::BaseNodelet::get_options_service_
protected

Definition at line 99 of file base_nodelet.h.

int realsense_camera::BaseNodelet::height_[STREAM_COUNT]
protected

Definition at line 113 of file base_nodelet.h.

cv::Mat realsense_camera::BaseNodelet::image_[STREAM_COUNT] = {}
protected

Definition at line 123 of file base_nodelet.h.

const uint16_t* realsense_camera::BaseNodelet::image_depth16_
protected

Definition at line 132 of file base_nodelet.h.

std::function<void(rs::frame f)> realsense_camera::BaseNodelet::ir_frame_handler_
protected

Definition at line 187 of file base_nodelet.h.

ros::ServiceServer realsense_camera::BaseNodelet::is_powered_service_
protected

Definition at line 102 of file base_nodelet.h.

float realsense_camera::BaseNodelet::max_z_ = -1.0f
protected

Definition at line 127 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::mode_
protected

Definition at line 110 of file base_nodelet.h.

ros::NodeHandle realsense_camera::BaseNodelet::nh_
protected

Definition at line 95 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::nodelet_name_
protected

Definition at line 106 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::optical_frame_id_[STREAM_COUNT]
protected

Definition at line 122 of file base_nodelet.h.

ros::NodeHandle realsense_camera::BaseNodelet::pnh_
protected

Definition at line 96 of file base_nodelet.h.

ros::Publisher realsense_camera::BaseNodelet::pointcloud_publisher_
protected

Definition at line 98 of file base_nodelet.h.

rs_context* realsense_camera::BaseNodelet::rs_context_ = NULL
protected

Definition at line 104 of file base_nodelet.h.

rs_device* realsense_camera::BaseNodelet::rs_device_
protected

Definition at line 105 of file base_nodelet.h.

rs_error* realsense_camera::BaseNodelet::rs_error_ = NULL
protected

Definition at line 103 of file base_nodelet.h.

rs_source realsense_camera::BaseNodelet::rs_source_ = RS_SOURCE_VIDEO
protected

Definition at line 142 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::serial_no_
protected

Definition at line 107 of file base_nodelet.h.

ros::ServiceServer realsense_camera::BaseNodelet::set_power_service_
protected

Definition at line 100 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::start_camera_ = true
protected

Definition at line 143 of file base_nodelet.h.

bool realsense_camera::BaseNodelet::start_stop_srv_called_ = false
protected

Definition at line 144 of file base_nodelet.h.

tf2_ros::StaticTransformBroadcaster realsense_camera::BaseNodelet::static_tf_broadcaster_
protected

Definition at line 138 of file base_nodelet.h.

int realsense_camera::BaseNodelet::step_[STREAM_COUNT]
protected

Definition at line 119 of file base_nodelet.h.

std::queue<pid_t> realsense_camera::BaseNodelet::system_proc_groups_
protected

Definition at line 153 of file base_nodelet.h.

double realsense_camera::BaseNodelet::tf_publication_rate_
protected

Definition at line 131 of file base_nodelet.h.

boost::shared_ptr<boost::thread> realsense_camera::BaseNodelet::transform_thread_
protected

Definition at line 136 of file base_nodelet.h.

ros::Time realsense_camera::BaseNodelet::transform_ts_
protected

Definition at line 137 of file base_nodelet.h.

double realsense_camera::BaseNodelet::ts_[STREAM_COUNT]
protected

Definition at line 120 of file base_nodelet.h.

int realsense_camera::BaseNodelet::unit_step_size_[STREAM_COUNT]
protected

Definition at line 118 of file base_nodelet.h.

std::string realsense_camera::BaseNodelet::usb_port_id_
protected

Definition at line 108 of file base_nodelet.h.

int realsense_camera::BaseNodelet::width_[STREAM_COUNT]
protected

Definition at line 112 of file base_nodelet.h.


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


realsense_camera
Author(s): Rajvi Jingar , Reagan Lopez , Matt Hansen , Mark Horn
autogenerated on Mon Jun 10 2019 14:40:37