Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
gazebo::GazeboRosOpenniKinect Class Reference

#include <gazebo_ros_openni_kinect.h>

Inheritance diagram for gazebo::GazeboRosOpenniKinect:
Inheritance graph
[legend]

Public Member Functions

virtual void Advertise ()
 Advertise point cloud and depth image. More...
 
 GazeboRosOpenniKinect ()
 Constructor. More...
 
virtual void Load (sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
 Load the plugin. More...
 
 ~GazeboRosOpenniKinect ()
 Destructor. More...
 

Protected Member Functions

virtual void OnNewDepthFrame (const float *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
 Update the controller. More...
 
virtual void OnNewImageFrame (const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
 Update the controller. More...
 
void PublishCameraInfo ()
 
virtual void PublishCameraInfo ()
 
void PublishCameraInfo (common::Time &last_update_time)
 
void PublishCameraInfo (ros::Publisher camera_info_publisher)
 Publish CameraInfo to the ROS topic. More...
 

Protected Attributes

ros::Publisher depth_image_camera_info_pub_
 

Private Member Functions

void DepthImageConnect ()
 
void DepthImageDisconnect ()
 
void DepthInfoConnect ()
 
void DepthInfoDisconnect ()
 
void FillDepthImage (const float *_src)
 push depth image data into ros topic More...
 
bool FillDepthImageHelper (sensor_msgs::Image &image_msg, uint32_t height, uint32_t width, uint32_t step, void *data_arg)
 
bool FillPointCloudHelper (sensor_msgs::PointCloud2 &point_cloud_msg, uint32_t rows_arg, uint32_t cols_arg, uint32_t step_arg, void *data_arg)
 
void FillPointdCloud (const float *_src)
 push point cloud data into ros topic More...
 
void PointCloudConnect ()
 
void PointCloudDisconnect ()
 
- Private Member Functions inherited from gazebo::GazeboRosCameraUtils
 GazeboRosCameraUtils ()
 Constructor. More...
 
void Load (sensors::SensorPtr _parent, sdf::ElementPtr _sdf, const std::string &_camera_name_suffix, double _hack_baseline)
 Load the plugin. More...
 
void Load (sensors::SensorPtr _parent, sdf::ElementPtr _sdf, const std::string &_camera_name_suffix="")
 Load the plugin. More...
 
event::ConnectionPtr OnLoad (const boost::function< void()> &)
 
 ~GazeboRosCameraUtils ()
 Destructor. More...
 
void CameraQueueThread ()
 
virtual bool CanTriggerCamera ()
 
void ImageConnect ()
 
void ImageDisconnect ()
 
void PublishCameraInfo ()
 
void PublishCameraInfo (common::Time &last_update_time)
 
void PublishCameraInfo (ros::Publisher camera_info_publisher)
 Publish CameraInfo to the ROS topic. More...
 
void PutCameraData (const unsigned char *_src)
 Put camera data to the ROS topic. More...
 
void PutCameraData (const unsigned char *_src, common::Time &last_update_time)
 
virtual void TriggerCamera ()
 

Private Attributes

std::string depth_image_camera_info_topic_name_
 
int depth_image_connect_count_
 Keep track of number of connctions for point clouds. More...
 
sensor_msgs::Image depth_image_msg_
 
ros::Publisher depth_image_pub_
 
std::string depth_image_topic_name_
 image where each pixel contains the depth data More...
 
int depth_info_connect_count_
 
common::Time depth_sensor_update_time_
 
common::Time last_depth_image_camera_info_update_time_
 
event::ConnectionPtr load_connection_
 
int point_cloud_connect_count_
 Keep track of number of connctions for point clouds. More...
 
double point_cloud_cutoff_
 Minimum range of the point cloud. More...
 
double point_cloud_cutoff_max_
 Maximum range of the point cloud. More...
 
sensor_msgs::PointCloud2 point_cloud_msg_
 PointCloud2 point cloud message. More...
 
ros::Publisher point_cloud_pub_
 A pointer to the ROS node. A node will be instantiated if it does not exist. More...
 
std::string point_cloud_topic_name_
 ROS image topic name. More...
 
bool use_depth_image_16UC1_format_
 
- Private Attributes inherited from gazebo::GazeboRosCameraUtils
bool auto_distortion_
 
bool border_crop_
 
boost::thread callback_queue_thread_
 
rendering::CameraPtr camera_
 
boost::shared_ptr< camera_info_manager::CameraInfoManagercamera_info_manager_
 
ros::Publisher camera_info_pub_
 camera info More...
 
std::string camera_info_topic_name_
 
ros::CallbackQueue camera_queue_
 
double cx_
 
double cx_prime_
 
double cy_
 
unsigned int depth_
 
double distortion_k1_
 
double distortion_k2_
 
double distortion_k3_
 
double distortion_t1_
 
double distortion_t2_
 
double focal_length_
 
std::string format_
 
std::string frame_name_
 ROS frame transform name to use in the image message header. This should typically match the link name the sensor is attached. More...
 
double hack_baseline_
 
unsigned int height_
 
boost::shared_ptr< int > image_connect_count_
 Keep track of number of image connections. More...
 
boost::shared_ptr< boost::mutex > image_connect_count_lock_
 A mutex to lock access to image_connect_count_. More...
 
sensor_msgs::Image image_msg_
 ROS image message. More...
 
image_transport::Publisher image_pub_
 
std::string image_topic_name_
 ROS image topic name. More...
 
bool initialized_
 True if camera util is initialized. More...
 
common::Time last_info_update_time_
 
common::Time last_update_time_
 
boost::mutex lock_
 A mutex to lock access to fields that are used in ROS message callbacks. More...
 
sensors::SensorPtr parentSensor_
 
ros::NodeHandlerosnode_
 A pointer to the ROS node. A node will be instantiated if it does not exist. More...
 
common::Time sensor_update_time_
 
int skip_
 
std::string trigger_topic_name_
 ROS trigger topic name. More...
 
std::string type_
 size of image buffer More...
 
double update_period_
 
double update_rate_
 update rate of this sensor More...
 
boost::shared_ptr< bool > was_active_
 Keep track when we activate this camera through ros subscription, was it already active? resume state when unsubscribed. More...
 
unsigned int width_
 
physics::WorldPtr world
 
physics::WorldPtr world_
 

Detailed Description

Definition at line 60 of file gazebo_ros_openni_kinect.h.

Constructor & Destructor Documentation

◆ GazeboRosOpenniKinect()

gazebo::GazeboRosOpenniKinect::GazeboRosOpenniKinect ( )

Constructor.

Parameters
parentThe parent entity, must be a Model or a Sensor

Definition at line 50 of file gazebo_ros_openni_kinect.cpp.

◆ ~GazeboRosOpenniKinect()

gazebo::GazeboRosOpenniKinect::~GazeboRosOpenniKinect ( )

Destructor.

Definition at line 60 of file gazebo_ros_openni_kinect.cpp.

Member Function Documentation

◆ Advertise()

void gazebo::GazeboRosOpenniKinect::Advertise ( )
virtual

Advertise point cloud and depth image.

Definition at line 120 of file gazebo_ros_openni_kinect.cpp.

◆ DepthImageConnect()

void gazebo::GazeboRosOpenniKinect::DepthImageConnect ( )
private

Definition at line 167 of file gazebo_ros_openni_kinect.cpp.

◆ DepthImageDisconnect()

void gazebo::GazeboRosOpenniKinect::DepthImageDisconnect ( )
private

Definition at line 174 of file gazebo_ros_openni_kinect.cpp.

◆ DepthInfoConnect()

void gazebo::GazeboRosOpenniKinect::DepthInfoConnect ( )
private

Definition at line 181 of file gazebo_ros_openni_kinect.cpp.

◆ DepthInfoDisconnect()

void gazebo::GazeboRosOpenniKinect::DepthInfoDisconnect ( )
private

Definition at line 187 of file gazebo_ros_openni_kinect.cpp.

◆ FillDepthImage()

void gazebo::GazeboRosOpenniKinect::FillDepthImage ( const float *  _src)
private

push depth image data into ros topic

copy from depth to depth image message

Definition at line 302 of file gazebo_ros_openni_kinect.cpp.

◆ FillDepthImageHelper()

bool gazebo::GazeboRosOpenniKinect::FillDepthImageHelper ( sensor_msgs::Image &  image_msg,
uint32_t  height,
uint32_t  width,
uint32_t  step,
void *  data_arg 
)
private

Definition at line 413 of file gazebo_ros_openni_kinect.cpp.

◆ FillPointCloudHelper()

bool gazebo::GazeboRosOpenniKinect::FillPointCloudHelper ( sensor_msgs::PointCloud2 &  point_cloud_msg,
uint32_t  rows_arg,
uint32_t  cols_arg,
uint32_t  step_arg,
void *  data_arg 
)
private

Definition at line 324 of file gazebo_ros_openni_kinect.cpp.

◆ FillPointdCloud()

void gazebo::GazeboRosOpenniKinect::FillPointdCloud ( const float *  _src)
private

push point cloud data into ros topic

copy from depth to point cloud message

Definition at line 277 of file gazebo_ros_openni_kinect.cpp.

◆ Load()

void gazebo::GazeboRosOpenniKinect::Load ( sensors::SensorPtr  _parent,
sdf::ElementPtr  _sdf 
)
virtual

Load the plugin.

Parameters
takein SDF root element

Definition at line 66 of file gazebo_ros_openni_kinect.cpp.

◆ OnNewDepthFrame()

void gazebo::GazeboRosOpenniKinect::OnNewDepthFrame ( const float *  _image,
unsigned int  _width,
unsigned int  _height,
unsigned int  _depth,
const std::string &  _format 
)
protectedvirtual

Update the controller.

Definition at line 194 of file gazebo_ros_openni_kinect.cpp.

◆ OnNewImageFrame()

void gazebo::GazeboRosOpenniKinect::OnNewImageFrame ( const unsigned char *  _image,
unsigned int  _width,
unsigned int  _height,
unsigned int  _depth,
const std::string &  _format 
)
protectedvirtual

Update the controller.

Definition at line 243 of file gazebo_ros_openni_kinect.cpp.

◆ PointCloudConnect()

void gazebo::GazeboRosOpenniKinect::PointCloudConnect ( )
private

Definition at line 149 of file gazebo_ros_openni_kinect.cpp.

◆ PointCloudDisconnect()

void gazebo::GazeboRosOpenniKinect::PointCloudDisconnect ( )
private

Definition at line 157 of file gazebo_ros_openni_kinect.cpp.

◆ PublishCameraInfo() [1/4]

void gazebo::GazeboRosCameraUtils::PublishCameraInfo
protected

Definition at line 674 of file gazebo_ros_camera_utils.cpp.

◆ PublishCameraInfo() [2/4]

void gazebo::GazeboRosOpenniKinect::PublishCameraInfo ( )
protectedvirtual

Definition at line 474 of file gazebo_ros_openni_kinect.cpp.

◆ PublishCameraInfo() [3/4]

void gazebo::GazeboRosCameraUtils::PublishCameraInfo
protected

Definition at line 665 of file gazebo_ros_camera_utils.cpp.

◆ PublishCameraInfo() [4/4]

void gazebo::GazeboRosCameraUtils::PublishCameraInfo
protected

Publish CameraInfo to the ROS topic.

Definition at line 690 of file gazebo_ros_camera_utils.cpp.

Member Data Documentation

◆ depth_image_camera_info_pub_

ros::Publisher gazebo::GazeboRosOpenniKinect::depth_image_camera_info_pub_
protected

Definition at line 138 of file gazebo_ros_openni_kinect.h.

◆ depth_image_camera_info_topic_name_

std::string gazebo::GazeboRosOpenniKinect::depth_image_camera_info_topic_name_
private

Definition at line 132 of file gazebo_ros_openni_kinect.h.

◆ depth_image_connect_count_

int gazebo::GazeboRosOpenniKinect::depth_image_connect_count_
private

Keep track of number of connctions for point clouds.

Definition at line 98 of file gazebo_ros_openni_kinect.h.

◆ depth_image_msg_

sensor_msgs::Image gazebo::GazeboRosOpenniKinect::depth_image_msg_
private

Definition at line 116 of file gazebo_ros_openni_kinect.h.

◆ depth_image_pub_

ros::Publisher gazebo::GazeboRosOpenniKinect::depth_image_pub_
private

Definition at line 112 of file gazebo_ros_openni_kinect.h.

◆ depth_image_topic_name_

std::string gazebo::GazeboRosOpenniKinect::depth_image_topic_name_
private

image where each pixel contains the depth data

Definition at line 128 of file gazebo_ros_openni_kinect.h.

◆ depth_info_connect_count_

int gazebo::GazeboRosOpenniKinect::depth_info_connect_count_
private

Definition at line 133 of file gazebo_ros_openni_kinect.h.

◆ depth_sensor_update_time_

common::Time gazebo::GazeboRosOpenniKinect::depth_sensor_update_time_
private

Definition at line 129 of file gazebo_ros_openni_kinect.h.

◆ last_depth_image_camera_info_update_time_

common::Time gazebo::GazeboRosOpenniKinect::last_depth_image_camera_info_update_time_
private

Definition at line 136 of file gazebo_ros_openni_kinect.h.

◆ load_connection_

event::ConnectionPtr gazebo::GazeboRosOpenniKinect::load_connection_
private

Definition at line 143 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_connect_count_

int gazebo::GazeboRosOpenniKinect::point_cloud_connect_count_
private

Keep track of number of connctions for point clouds.

Definition at line 93 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_cutoff_

double gazebo::GazeboRosOpenniKinect::point_cloud_cutoff_
private

Minimum range of the point cloud.

Definition at line 119 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_cutoff_max_

double gazebo::GazeboRosOpenniKinect::point_cloud_cutoff_max_
private

Maximum range of the point cloud.

Definition at line 121 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_msg_

sensor_msgs::PointCloud2 gazebo::GazeboRosOpenniKinect::point_cloud_msg_
private

PointCloud2 point cloud message.

Definition at line 115 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_pub_

ros::Publisher gazebo::GazeboRosOpenniKinect::point_cloud_pub_
private

A pointer to the ROS node. A node will be instantiated if it does not exist.

Definition at line 111 of file gazebo_ros_openni_kinect.h.

◆ point_cloud_topic_name_

std::string gazebo::GazeboRosOpenniKinect::point_cloud_topic_name_
private

ROS image topic name.

Definition at line 124 of file gazebo_ros_openni_kinect.h.

◆ use_depth_image_16UC1_format_

bool gazebo::GazeboRosOpenniKinect::use_depth_image_16UC1_format_
private

Definition at line 137 of file gazebo_ros_openni_kinect.h.


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


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Sep 5 2024 02:49:55