Public Member Functions | Protected Member Functions | Private Attributes | List of all members
depth_sensor_pose::DepthSensorPoseNode Class Reference

#include <depth_sensor_pose_node.h>

Public Member Functions

 DepthSensorPoseNode (ros::NodeHandle &pnh)
 
 DepthSensorPoseNode (const DepthSensorPoseNode &)=delete
 
float getNodeRate ()
 getNodeRate gets rate of data processing loop in node. More...
 
DepthSensorPoseNodeoperator= (const DepthSensorPoseNode &)=delete
 
void setNodeRate (const float rate)
 setNodeRate sets rate of processing data loop in node. More...
 
 ~DepthSensorPoseNode ()
 

Protected Member Functions

void connectCallback ()
 connectCb is callback which is called when new subscriber connected. More...
 
void depthCallback (const sensor_msgs::ImageConstPtr &depth_msg, const sensor_msgs::CameraInfoConstPtr &info_msg)
 depthCb is callback which is called when new depth image appear More...
 
void disconnectCallback ()
 disconnectCb is called when a subscriber stop subscribing More...
 
void reconfigureCallback (depth_sensor_pose::DepthSensorPoseConfig &config, uint32_t level)
 reconfigureCb is dynamic reconfigure callback More...
 

Private Attributes

std::mutex connection_mutex_
 Prevents the connectCb and disconnectCb from being called until everything is initialized. More...
 
dynamic_reconfigure::Server< depth_sensor_pose::DepthSensorPoseConfig > dyn_rec_srv_
 Dynamic reconfigure server. More...
 
depth_sensor_pose::DepthSensorPose estimator_
 Object which contain estimation methods. More...
 
image_transport::ImageTransport it_
 Subscribes to synchronized Image CameraInfo pairs. More...
 
float node_rate_hz_ {1}
 Node loop frequency in Hz. More...
 
ros::NodeHandle pnh_
 Private node handler. More...
 
image_transport::Publisher pub_
 Publisher for image_transport. More...
 
ros::Publisher pub_angle_
 Publisher for estimated sensor tilt angle. More...
 
ros::Publisher pub_height_
 Publisher for estimated sensor height. More...
 
image_transport::CameraSubscriber sub_
 Subscriber for image_transport. More...
 

Detailed Description

Definition at line 21 of file depth_sensor_pose_node.h.

Constructor & Destructor Documentation

DepthSensorPoseNode::DepthSensorPoseNode ( ros::NodeHandle pnh)

Definition at line 9 of file depth_sensor_pose_node.cpp.

DepthSensorPoseNode::~DepthSensorPoseNode ( )

Definition at line 34 of file depth_sensor_pose_node.cpp.

depth_sensor_pose::DepthSensorPoseNode::DepthSensorPoseNode ( const DepthSensorPoseNode )
delete

Member Function Documentation

void DepthSensorPoseNode::connectCallback ( )
protected

connectCb is callback which is called when new subscriber connected.

It allow to subscribe depth image and publish prepared message only when is subscriber appear.

Parameters
pubPublisher which subscribers are checked.

Definition at line 77 of file depth_sensor_pose_node.cpp.

void DepthSensorPoseNode::depthCallback ( const sensor_msgs::ImageConstPtr &  depth_msg,
const sensor_msgs::CameraInfoConstPtr &  info_msg 
)
protected

depthCb is callback which is called when new depth image appear

Callback for depth image and camera info. It runs sensor mount parameters estimation algorithms

Parameters
depth_msgDepth image provided by image_transport.
info_msgCameraInfo provided by image_transport.

Definition at line 50 of file depth_sensor_pose_node.cpp.

void DepthSensorPoseNode::disconnectCallback ( )
protected

disconnectCb is called when a subscriber stop subscribing

When no one subscribers subscribe topics, then it stop to subscribe depth image.

Parameters
pubPublisher which subscribers are checked.

Definition at line 87 of file depth_sensor_pose_node.cpp.

float DepthSensorPoseNode::getNodeRate ( )

getNodeRate gets rate of data processing loop in node.

Returns
Returns data processing loop rate in Hz.

Definition at line 46 of file depth_sensor_pose_node.cpp.

DepthSensorPoseNode& depth_sensor_pose::DepthSensorPoseNode::operator= ( const DepthSensorPoseNode )
delete
void DepthSensorPoseNode::reconfigureCallback ( depth_sensor_pose::DepthSensorPoseConfig &  config,
uint32_t  level 
)
protected

reconfigureCb is dynamic reconfigure callback

Callback is necessary to set ROS parameters with dynamic reconfigure server.

Parameters
configDynamic Reconfigure object.
levelDynamic Reconfigure level.

Definition at line 96 of file depth_sensor_pose_node.cpp.

void DepthSensorPoseNode::setNodeRate ( const float  rate)

setNodeRate sets rate of processing data loop in node.

Parameters
rateFrequency of data processing loop in Hz.

Definition at line 38 of file depth_sensor_pose_node.cpp.

Member Data Documentation

std::mutex depth_sensor_pose::DepthSensorPoseNode::connection_mutex_
private

Prevents the connectCb and disconnectCb from being called until everything is initialized.

Definition at line 102 of file depth_sensor_pose_node.h.

dynamic_reconfigure::Server<depth_sensor_pose::DepthSensorPoseConfig> depth_sensor_pose::DepthSensorPoseNode::dyn_rec_srv_
private

Dynamic reconfigure server.

Definition at line 96 of file depth_sensor_pose_node.h.

depth_sensor_pose::DepthSensorPose depth_sensor_pose::DepthSensorPoseNode::estimator_
private

Object which contain estimation methods.

Definition at line 99 of file depth_sensor_pose_node.h.

image_transport::ImageTransport depth_sensor_pose::DepthSensorPoseNode::it_
private

Subscribes to synchronized Image CameraInfo pairs.

Definition at line 88 of file depth_sensor_pose_node.h.

float depth_sensor_pose::DepthSensorPoseNode::node_rate_hz_ {1}
private

Node loop frequency in Hz.

Definition at line 85 of file depth_sensor_pose_node.h.

ros::NodeHandle depth_sensor_pose::DepthSensorPoseNode::pnh_
private

Private node handler.

Definition at line 86 of file depth_sensor_pose_node.h.

image_transport::Publisher depth_sensor_pose::DepthSensorPoseNode::pub_
private

Publisher for image_transport.

Definition at line 93 of file depth_sensor_pose_node.h.

ros::Publisher depth_sensor_pose::DepthSensorPoseNode::pub_angle_
private

Publisher for estimated sensor tilt angle.

Definition at line 92 of file depth_sensor_pose_node.h.

ros::Publisher depth_sensor_pose::DepthSensorPoseNode::pub_height_
private

Publisher for estimated sensor height.

Definition at line 91 of file depth_sensor_pose_node.h.

image_transport::CameraSubscriber depth_sensor_pose::DepthSensorPoseNode::sub_
private

Subscriber for image_transport.

Definition at line 89 of file depth_sensor_pose_node.h.


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


depth_sensor_pose
Author(s): Michal Drwiega (http://www.mdrwiega.com)
autogenerated on Wed May 5 2021 02:56:10