#include <gazebo_ros_depth_camera.h>
Public Member Functions | |
GazeboRosDepthCamera () | |
Constructor. | |
void | Load (sensors::SensorPtr _parent, sdf::ElementPtr _sdf) |
Load the plugin. | |
~GazeboRosDepthCamera () | |
Destructor. | |
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. | |
virtual void | OnNewImageFrame (const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format) |
Update the controller. | |
virtual void | OnNewRGBPointCloud (const float *_pcd, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format) |
Update the controller. | |
Protected Attributes | |
ros::Publisher | depth_image_camera_info_pub_ |
Private Member Functions | |
bool | FillDepthImageHelper (sensor_msgs::Image &image_msg, uint32_t rows_arg, uint32_t cols_arg, uint32_t step_arg, 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) |
Put camera data to the ROS topic. | |
void | InfoConnect () |
void | InfoDisconnect () |
void | PointCloudConnect () |
void | PointCloudDisconnect () |
void | PublishCameraInfo () |
Private Attributes | |
std::string | depth_image_camera_info_topic_name_ |
sensor_msgs::Image | depth_image_msg_ |
ros::Publisher | depth_image_pub_ |
std::string | depth_image_topic_name_ |
image where each pixel contains the depth information | |
common::Time | depth_sensor_update_time_ |
int | point_cloud_connect_count_ |
Keep track of number of connctions for point clouds. | |
double | point_cloud_cutoff_ |
sensor_msgs::PointCloud2 | point_cloud_msg_ |
PCL point cloud message. | |
ros::Publisher | point_cloud_pub_ |
A pointer to the ROS node. A node will be instantiated if it does not exist. | |
std::string | point_cloud_topic_name_ |
ROS image topic name. |
Definition at line 67 of file gazebo_ros_depth_camera.h.
Constructor.
parent | The parent entity, must be a Model or a Sensor |
Definition at line 52 of file gazebo_ros_depth_camera.cpp.
Destructor.
Definition at line 59 of file gazebo_ros_depth_camera.cpp.
bool gazebo::GazeboRosDepthCamera::FillDepthImageHelper | ( | sensor_msgs::Image & | image_msg, |
uint32_t | rows_arg, | ||
uint32_t | cols_arg, | ||
uint32_t | step_arg, | ||
void * | data_arg | ||
) | [private] |
Definition at line 388 of file gazebo_ros_depth_camera.cpp.
bool gazebo::GazeboRosDepthCamera::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 306 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::FillPointdCloud | ( | const float * | _src | ) | [private] |
Put camera data to the ROS topic.
copy from depth to pointCloudMsg
copy from depth to depth image message
Definition at line 267 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::InfoConnect | ( | ) | [private] |
Reimplemented from gazebo::GazeboRosCameraUtils.
Definition at line 65 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::InfoDisconnect | ( | ) | [private] |
Reimplemented from gazebo::GazeboRosCameraUtils.
Definition at line 71 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::Load | ( | sensors::SensorPtr | _parent, |
sdf::ElementPtr | _sdf | ||
) |
Load the plugin.
take | in SDF root element |
Reimplemented from gazebo::GazeboRosCameraUtils.
Definition at line 78 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::OnNewDepthFrame | ( | const float * | _image, |
unsigned int | _width, | ||
unsigned int | _height, | ||
unsigned int | _depth, | ||
const std::string & | _format | ||
) | [protected, virtual] |
Update the controller.
Definition at line 166 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::OnNewImageFrame | ( | const unsigned char * | _image, |
unsigned int | _width, | ||
unsigned int | _height, | ||
unsigned int | _depth, | ||
const std::string & | _format | ||
) | [protected, virtual] |
Update the controller.
Definition at line 245 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::OnNewRGBPointCloud | ( | const float * | _pcd, |
unsigned int | _width, | ||
unsigned int | _height, | ||
unsigned int | _depth, | ||
const std::string & | _format | ||
) | [protected, virtual] |
Update the controller.
Definition at line 186 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::PointCloudConnect | ( | ) | [private] |
Definition at line 148 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::PointCloudDisconnect | ( | ) | [private] |
Definition at line 156 of file gazebo_ros_depth_camera.cpp.
void gazebo::GazeboRosDepthCamera::PublishCameraInfo | ( | ) | [private] |
Reimplemented from gazebo::GazeboRosCameraUtils.
Definition at line 429 of file gazebo_ros_depth_camera.cpp.
Definition at line 135 of file gazebo_ros_depth_camera.h.
std::string gazebo::GazeboRosDepthCamera::depth_image_camera_info_topic_name_ [private] |
Definition at line 131 of file gazebo_ros_depth_camera.h.
sensor_msgs::Image gazebo::GazeboRosDepthCamera::depth_image_msg_ [private] |
Definition at line 117 of file gazebo_ros_depth_camera.h.
Definition at line 113 of file gazebo_ros_depth_camera.h.
std::string gazebo::GazeboRosDepthCamera::depth_image_topic_name_ [private] |
image where each pixel contains the depth information
Definition at line 130 of file gazebo_ros_depth_camera.h.
common::Time gazebo::GazeboRosDepthCamera::depth_sensor_update_time_ [private] |
Definition at line 134 of file gazebo_ros_depth_camera.h.
int gazebo::GazeboRosDepthCamera::point_cloud_connect_count_ [private] |
Keep track of number of connctions for point clouds.
Definition at line 99 of file gazebo_ros_depth_camera.h.
double gazebo::GazeboRosDepthCamera::point_cloud_cutoff_ [private] |
Definition at line 119 of file gazebo_ros_depth_camera.h.
sensor_msgs::PointCloud2 gazebo::GazeboRosDepthCamera::point_cloud_msg_ [private] |
PCL point cloud message.
Definition at line 116 of file gazebo_ros_depth_camera.h.
A pointer to the ROS node. A node will be instantiated if it does not exist.
Definition at line 112 of file gazebo_ros_depth_camera.h.
std::string gazebo::GazeboRosDepthCamera::point_cloud_topic_name_ [private] |
ROS image topic name.
Definition at line 122 of file gazebo_ros_depth_camera.h.