$search
GazeboRosOpenniKinect Controller. More...
#include <gazebo_ros_openni_kinect.h>
Public Member Functions | |
GazeboRosOpenniKinect (Entity *parent) | |
Constructor. | |
virtual | ~GazeboRosOpenniKinect () |
Destructor. | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | |
Protected Member Functions | |
virtual void | FiniChild () |
Finalize the controller, unadvertise topics. | |
virtual void | InitChild () |
Init the controller. | |
virtual void | LoadChild (XMLConfigNode *node) |
Load the controller. | |
virtual void | UpdateChild () |
Update the controller. | |
Protected Attributes | |
ros::Publisher | depth_image_camera_info_pub_ |
Private Member Functions | |
void | CameraQueueThread () |
void | configCallback (gazebo_plugins::GazeboRosOpenniKinectConfig &config, uint32_t level) |
void | convertImageFormat (unsigned char *dst, const unsigned char *src) |
void | DepthImageConnect () |
void | DepthImageDisconnect () |
void | DepthInfoConnect () |
void | DepthInfoDisconnect () |
bool | FillDepthImageHelper (sensor_msgs::Image &image_msg, uint32_t height, uint32_t width, uint32_t step, void *data_arg) |
bool | FillPointCloudHelper (pcl::PointCloud< pcl::PointXYZ > &point_cloud, uint32_t rows_arg, uint32_t cols_arg, uint32_t step_arg, void *data_arg) |
void | ImageConnect () |
void | ImageDisconnect () |
void | InfoConnect () |
void | InfoDisconnect () |
void | PointCloudConnect () |
void | PointCloudDisconnect () |
void | PublishCameraInfo (ros::Publisher camera_info_publisher) |
Publish CameraInfo to the ROS topic. | |
void | PutCameraData () |
Put camera data to the ROS topic. | |
void | SetHFOV (const std_msgs::Float64::ConstPtr &hfov) |
void | SetUpdateRate (const std_msgs::Float64::ConstPtr &update_rate) |
Private Attributes | |
boost::thread | callback_queue_thread_ |
ros::Publisher | camera_info_pub_ |
ros::CallbackQueue | camera_queue_ |
ros::Subscriber | cameraHFOVSubscriber_ |
std::string | cameraInfoTopicName |
ROS camera_info topic name. | |
ParamT< std::string > * | cameraInfoTopicNameP |
std::string | cameraName |
ROS camera name. | |
ParamT< std::string > * | cameraNameP |
ros::Subscriber | cameraUpdateRateSubscriber_ |
double | Cx |
ParamT< double > * | CxP |
double | CxPrime |
ParamT< double > * | CxPrimeP |
double | Cy |
ParamT< double > * | CyP |
int | depth |
sensor_msgs::Image | depth_image_msg_ |
depth image | |
ros::Publisher | depth_image_pub_ |
std::string | depthImageCameraInfoTopicName |
ParamT< std::string > * | depthImageCameraInfoTopicNameP |
int | depthImageConnectCount |
Keep track of number of connctions for point clouds. | |
std::string | depthImageTopicName |
ParamT< std::string > * | depthImageTopicNameP |
int | depthInfoConnectCount |
double | distortion_k1 |
ParamT< double > * | distortion_k1P |
double | distortion_k2 |
ParamT< double > * | distortion_k2P |
double | distortion_k3 |
ParamT< double > * | distortion_k3P |
double | distortion_t1 |
ParamT< double > * | distortion_t1P |
double | distortion_t2 |
ParamT< double > * | distortion_t2P |
dynamic_reconfigure::Server < gazebo_plugins::GazeboRosOpenniKinectConfig > * | dyn_srv_ |
std::string | dynamicReconfigureName |
double | focal_length |
ParamT< double > * | focal_lengthP |
std::string | frameName |
ROS frame transform name to use in the image message header. This should typically match the link name the sensor is attached. | |
ParamT< std::string > * | frameNameP |
double | hack_baseline |
ParamT< double > * | hack_baselineP |
int | height |
size of image buffer | |
image_transport::Publisher | image_pub_ |
int | imageConnectCount |
Keep track of number of connctions. | |
sensor_msgs::Image | imageMsg |
ROS image message. | |
std::string | imageTopicName |
ROS image topic name. | |
ParamT< std::string > * | imageTopicNameP |
Parameters. | |
int | infoConnectCount |
Keep track of number of connctions for CameraInfo. | |
image_transport::ImageTransport * | itnode_ |
Time | last_camera_info_pub_time_ |
Time | last_image_pub_time_ |
Time | last_point_cloud_pub_time_ |
boost::mutex | lock |
A mutex to lock access to fields that are used in ROS message callbacks. | |
nodelet::Loader * | manager_ |
ros::NodeHandle * | managernode_ |
MonoCameraSensor * | myParent |
A pointer to the parent camera sensor. | |
ros::Publisher | point_cloud_pub_ |
int | pointCloudConnectCount |
Keep track of number of connctions for point clouds. | |
double | pointCloudCutoff |
ParamT< double > * | pointCloudCutoffP |
pcl::PointCloud< pcl::PointXYZ > | pointCloudMsg |
std::string | pointCloudTopicName |
ROS point cloud topic name. | |
ParamT< std::string > * | pointCloudTopicNameP |
std::string | robotNamespace |
ParamT< std::string > * | robotNamespaceP |
for setting ROS name space | |
ros::NodeHandle * | rosnode_ |
A pointer to the ROS node. A node will be instantiated if it does not exist. | |
int | skip |
std::string | type |
int | width |
GazeboRosOpenniKinect Controller.
<model:physical name="camera_model"> <body:empty name="camera_body_name"> <sensor:camera name="camera_sensor"> <controller:gazebo_ros_camera name="controller-name" plugin="libgazebo_ros_camera.so"> <alwaysOn>true</alwaysOn> <updateRate>15.0</updateRate> <imageTopicName>camera_name/image_raw</imageTopicName> <cameraInfoTopicName>camera_name/camera_info</cameraInfoTopicName> <frameName>camera_body_name</frameName> </controller:gazebo_ros_camera> </sensor:camera> </body:empty> </model:phyiscal>
Definition at line 108 of file gazebo_ros_openni_kinect.h.
gazebo::GazeboRosOpenniKinect::GazeboRosOpenniKinect | ( | Entity * | parent | ) |
Constructor.
parent | The parent entity, must be a Model or a Sensor |
Definition at line 65 of file gazebo_ros_openni_kinect.cpp.
gazebo::GazeboRosOpenniKinect::~GazeboRosOpenniKinect | ( | ) | [virtual] |
Destructor.
Definition at line 119 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::CameraQueueThread | ( | ) | [private] |
Definition at line 873 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::configCallback | ( | gazebo_plugins::GazeboRosOpenniKinectConfig & | config, | |
uint32_t | level | |||
) | [private] |
Definition at line 110 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::convertImageFormat | ( | unsigned char * | dst, | |
const unsigned char * | src | |||
) | [private] |
Definition at line 642 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::DepthImageConnect | ( | ) | [private] |
Definition at line 345 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::DepthImageDisconnect | ( | ) | [private] |
Definition at line 353 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::DepthInfoConnect | ( | ) | [private] |
Definition at line 275 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::DepthInfoDisconnect | ( | ) | [private] |
Definition at line 281 of file gazebo_ros_openni_kinect.cpp.
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 601 of file gazebo_ros_openni_kinect.cpp.
bool gazebo::GazeboRosOpenniKinect::FillPointCloudHelper | ( | pcl::PointCloud< pcl::PointXYZ > & | point_cloud, | |
uint32_t | rows_arg, | |||
uint32_t | cols_arg, | |||
uint32_t | step_arg, | |||
void * | data_arg | |||
) | [private] |
Definition at line 750 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::FiniChild | ( | ) | [protected, virtual] |
Finalize the controller, unadvertise topics.
Definition at line 473 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::ImageConnect | ( | ) | [private] |
Definition at line 302 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::ImageDisconnect | ( | ) | [private] |
Definition at line 309 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::InfoConnect | ( | ) | [private] |
Definition at line 262 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::InfoDisconnect | ( | ) | [private] |
Definition at line 268 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::InitChild | ( | ) | [protected, virtual] |
Init the controller.
Compute camera parameters if set to 0
Definition at line 367 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::LoadChild | ( | XMLConfigNode * | node | ) | [protected, virtual] |
Load the controller.
node | XML config node |
Definition at line 146 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::PointCloudConnect | ( | ) | [private] |
Definition at line 323 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::PointCloudDisconnect | ( | ) | [private] |
Definition at line 331 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::PublishCameraInfo | ( | ros::Publisher | camera_info_publisher | ) | [private] |
Publish CameraInfo to the ROS topic.
Definition at line 811 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::PutCameraData | ( | ) | [private] |
Put camera data to the ROS topic.
copy from depth to pointCloudMsg
copy from depth to depth image message
Definition at line 487 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::SetHFOV | ( | const std_msgs::Float64::ConstPtr & | hfov | ) | [private] |
Definition at line 288 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::SetUpdateRate | ( | const std_msgs::Float64::ConstPtr & | update_rate | ) | [private] |
Definition at line 295 of file gazebo_ros_openni_kinect.cpp.
void gazebo::GazeboRosOpenniKinect::UpdateChild | ( | ) | [protected, virtual] |
Update the controller.
publish CameraInfo
Definition at line 450 of file gazebo_ros_openni_kinect.cpp.
boost::thread gazebo::GazeboRosOpenniKinect::callback_queue_thread_ [private] |
Definition at line 267 of file gazebo_ros_openni_kinect.h.
Definition at line 175 of file gazebo_ros_openni_kinect.h.
Definition at line 265 of file gazebo_ros_openni_kinect.h.
Definition at line 251 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::cameraInfoTopicName [private] |
ROS camera_info topic name.
Definition at line 224 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::cameraInfoTopicNameP [private] |
Definition at line 194 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::cameraName [private] |
ROS camera name.
Definition at line 220 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::cameraNameP [private] |
Definition at line 198 of file gazebo_ros_openni_kinect.h.
Definition at line 252 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::Cx [private] |
Definition at line 232 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::CxP [private] |
Definition at line 204 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::CxPrime [private] |
Definition at line 231 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::CxPrimeP [private] |
Definition at line 203 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::Cy [private] |
Definition at line 233 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::CyP [private] |
Definition at line 205 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::depth [private] |
Definition at line 247 of file gazebo_ros_openni_kinect.h.
Definition at line 183 of file gazebo_ros_openni_kinect.h.
depth image
Definition at line 190 of file gazebo_ros_openni_kinect.h.
Definition at line 176 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::depthImageCameraInfoTopicName [private] |
Definition at line 201 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::depthImageCameraInfoTopicNameP [private] |
Definition at line 195 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::depthImageConnectCount [private] |
Keep track of number of connctions for point clouds.
Definition at line 146 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::depthImageTopicName [private] |
Definition at line 200 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::depthImageTopicNameP [private] |
Definition at line 197 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::depthInfoConnectCount [private] |
Definition at line 180 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::distortion_k1 [private] |
Definition at line 237 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::distortion_k1P [private] |
Definition at line 209 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::distortion_k2 [private] |
Definition at line 238 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::distortion_k2P [private] |
Definition at line 210 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::distortion_k3 [private] |
Definition at line 239 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::distortion_k3P [private] |
Definition at line 211 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::distortion_t1 [private] |
Definition at line 240 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::distortion_t1P [private] |
Definition at line 212 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::distortion_t2 [private] |
Definition at line 241 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::distortion_t2P [private] |
Definition at line 213 of file gazebo_ros_openni_kinect.h.
dynamic_reconfigure::Server<gazebo_plugins::GazeboRosOpenniKinectConfig>* gazebo::GazeboRosOpenniKinect::dyn_srv_ [private] |
Definition at line 258 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::dynamicReconfigureName [private] |
Definition at line 263 of file gazebo_ros_openni_kinect.h.
Definition at line 269 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::focal_length [private] |
Definition at line 234 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::focal_lengthP [private] |
Definition at line 206 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::frameName [private] |
ROS frame transform name to use in the image message header. This should typically match the link name the sensor is attached.
Definition at line 229 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::frameNameP [private] |
Definition at line 199 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::hack_baseline [private] |
Definition at line 235 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::hack_baselineP [private] |
Definition at line 207 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::height [private] |
size of image buffer
Definition at line 247 of file gazebo_ros_openni_kinect.h.
Definition at line 177 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::imageConnectCount [private] |
Keep track of number of connctions.
Definition at line 136 of file gazebo_ros_openni_kinect.h.
ROS image message.
Definition at line 186 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::imageTopicName [private] |
ROS image topic name.
Definition at line 222 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::imageTopicNameP [private] |
Parameters.
Definition at line 193 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::infoConnectCount [private] |
Keep track of number of connctions for CameraInfo.
Definition at line 151 of file gazebo_ros_openni_kinect.h.
Definition at line 178 of file gazebo_ros_openni_kinect.h.
Time gazebo::GazeboRosOpenniKinect::last_camera_info_pub_time_ [private] |
Definition at line 255 of file gazebo_ros_openni_kinect.h.
Time gazebo::GazeboRosOpenniKinect::last_image_pub_time_ [private] |
Definition at line 255 of file gazebo_ros_openni_kinect.h.
Time gazebo::GazeboRosOpenniKinect::last_point_cloud_pub_time_ [private] |
Definition at line 255 of file gazebo_ros_openni_kinect.h.
boost::mutex gazebo::GazeboRosOpenniKinect::lock [private] |
A mutex to lock access to fields that are used in ROS message callbacks.
Definition at line 244 of file gazebo_ros_openni_kinect.h.
Definition at line 174 of file gazebo_ros_openni_kinect.h.
Definition at line 173 of file gazebo_ros_openni_kinect.h.
MonoCameraSensor* gazebo::GazeboRosOpenniKinect::myParent [private] |
A pointer to the parent camera sensor.
Definition at line 169 of file gazebo_ros_openni_kinect.h.
Definition at line 175 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::pointCloudConnectCount [private] |
Keep track of number of connctions for point clouds.
Definition at line 141 of file gazebo_ros_openni_kinect.h.
double gazebo::GazeboRosOpenniKinect::pointCloudCutoff [private] |
Definition at line 236 of file gazebo_ros_openni_kinect.h.
ParamT<double>* gazebo::GazeboRosOpenniKinect::pointCloudCutoffP [private] |
Definition at line 208 of file gazebo_ros_openni_kinect.h.
pcl::PointCloud<pcl::PointXYZ> gazebo::GazeboRosOpenniKinect::pointCloudMsg [private] |
Definition at line 187 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::pointCloudTopicName [private] |
ROS point cloud topic name.
Definition at line 226 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::pointCloudTopicNameP [private] |
Definition at line 196 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::robotNamespace [private] |
Definition at line 217 of file gazebo_ros_openni_kinect.h.
ParamT<std::string>* gazebo::GazeboRosOpenniKinect::robotNamespaceP [private] |
for setting ROS name space
Definition at line 216 of file gazebo_ros_openni_kinect.h.
A pointer to the ROS node. A node will be instantiated if it does not exist.
Definition at line 172 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::skip [private] |
Definition at line 249 of file gazebo_ros_openni_kinect.h.
std::string gazebo::GazeboRosOpenniKinect::type [private] |
Definition at line 248 of file gazebo_ros_openni_kinect.h.
int gazebo::GazeboRosOpenniKinect::width [private] |
Definition at line 247 of file gazebo_ros_openni_kinect.h.