depth_image_octomap_updater.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Ioan Sucan, Suat Gedikli */
36 
40 #include <tf2/LinearMath/Vector3.h>
44 #include <XmlRpcException.h>
45 #include <stdint.h>
46 
47 #include <memory>
48 
49 namespace occupancy_map_monitor
50 {
51 static const std::string LOGNAME = "depth_image_octomap_updater";
52 
54  : OccupancyMapUpdater("DepthImageUpdater")
55  , nh_("~")
56  , input_depth_transport_(nh_)
57  , model_depth_transport_(nh_)
58  , filtered_depth_transport_(nh_)
59  , filtered_label_transport_(nh_)
60  , image_topic_("depth")
61  , queue_size_(5)
62  , near_clipping_plane_distance_(0.3)
63  , far_clipping_plane_distance_(5.0)
64  , shadow_threshold_(0.04)
65  , padding_scale_(0.0)
66  , padding_offset_(0.02)
67  , max_update_rate_(0)
68  , skip_vertical_pixels_(4)
69  , skip_horizontal_pixels_(6)
70  , image_callback_count_(0)
71  , average_callback_dt_(0.0)
72  , good_tf_(5)
73  , // start optimistically, so we do not output warnings right from the beginning
74  failed_tf_(0)
75  , K0_(0.0)
76  , K2_(0.0)
77  , K4_(0.0)
78  , K5_(0.0)
79 {
80 }
81 
82 DepthImageOctomapUpdater::~DepthImageOctomapUpdater()
83 {
84  stopHelper();
85 }
86 
87 bool DepthImageOctomapUpdater::setParams(XmlRpc::XmlRpcValue& params)
88 {
89  try
90  {
91  sensor_type_ = (std::string)params["sensor_type"];
92  if (params.hasMember("image_topic"))
93  image_topic_ = (std::string)params["image_topic"];
94  if (params.hasMember("queue_size"))
95  queue_size_ = (int)params["queue_size"];
96 
97  readXmlParam(params, "near_clipping_plane_distance", &near_clipping_plane_distance_);
98  readXmlParam(params, "far_clipping_plane_distance", &far_clipping_plane_distance_);
99  readXmlParam(params, "shadow_threshold", &shadow_threshold_);
100  readXmlParam(params, "padding_scale", &padding_scale_);
101  readXmlParam(params, "padding_offset", &padding_offset_);
102  if (params.hasMember("max_update_rate"))
103  readXmlParam(params, "max_update_rate", &max_update_rate_);
104  readXmlParam(params, "skip_vertical_pixels", &skip_vertical_pixels_);
105  readXmlParam(params, "skip_horizontal_pixels", &skip_horizontal_pixels_);
106  if (params.hasMember("filtered_cloud_topic"))
107  filtered_cloud_topic_ = static_cast<const std::string&>(params["filtered_cloud_topic"]);
108  if (params.hasMember("ns"))
109  ns_ = static_cast<const std::string&>(params["ns"]);
110  }
111  catch (XmlRpc::XmlRpcException& ex)
112  {
113  ROS_ERROR_STREAM_NAMED(LOGNAME, "XmlRpc Exception: " << ex.getMessage());
114  return false;
115  }
116 
117  return true;
118 }
119 
120 bool DepthImageOctomapUpdater::initialize()
121 {
122  tf_buffer_ = monitor_->getTFClient();
123  free_space_updater_ = std::make_unique<LazyFreeSpaceUpdater>(tree_);
124 
125  // create our mesh filter
126  mesh_filter_ = std::make_unique<mesh_filter::MeshFilter<mesh_filter::StereoCameraModel>>(
128  mesh_filter_->parameters().setDepthRange(near_clipping_plane_distance_, far_clipping_plane_distance_);
129  mesh_filter_->setShadowThreshold(shadow_threshold_);
130  mesh_filter_->setPaddingOffset(padding_offset_);
131  mesh_filter_->setPaddingScale(padding_scale_);
132  mesh_filter_->setTransformCallback(
133  [this](mesh_filter::MeshHandle mesh, Eigen::Isometry3d& tf) { return getShapeTransform(mesh, tf); });
134 
135  return true;
136 }
137 
138 void DepthImageOctomapUpdater::start()
139 {
141 
142  std::string prefix = "";
143  if (!ns_.empty())
144  prefix = ns_ + "/";
145 
146  pub_model_depth_image_ = model_depth_transport_.advertiseCamera(prefix + "model_depth", 1);
147  if (!filtered_cloud_topic_.empty())
148  pub_filtered_depth_image_ = filtered_depth_transport_.advertiseCamera(prefix + filtered_cloud_topic_, 1);
149  else
150  pub_filtered_depth_image_ = filtered_depth_transport_.advertiseCamera(prefix + "filtered_depth", 1);
151 
152  pub_filtered_label_image_ = filtered_label_transport_.advertiseCamera(prefix + "filtered_label", 1);
153 
154  sub_depth_image_ = input_depth_transport_.subscribeCamera(image_topic_, queue_size_,
155  &DepthImageOctomapUpdater::depthImageCallback, this, hints);
156 }
157 
158 void DepthImageOctomapUpdater::stop()
159 {
160  stopHelper();
161 }
162 
163 void DepthImageOctomapUpdater::stopHelper()
164 {
165  sub_depth_image_.shutdown();
166 }
167 
168 mesh_filter::MeshHandle DepthImageOctomapUpdater::excludeShape(const shapes::ShapeConstPtr& shape)
169 {
171  if (mesh_filter_)
172  {
173  if (shape->type == shapes::MESH)
174  h = mesh_filter_->addMesh(static_cast<const shapes::Mesh&>(*shape));
175  else
176  {
177  std::unique_ptr<shapes::Mesh> m(shapes::createMeshFromShape(shape.get()));
178  if (m)
179  h = mesh_filter_->addMesh(*m);
180  }
181  }
182  else
183  ROS_ERROR_NAMED(LOGNAME, "Mesh filter not yet initialized!");
184  return h;
185 }
186 
187 void DepthImageOctomapUpdater::forgetShape(mesh_filter::MeshHandle handle)
188 {
189  if (mesh_filter_)
190  mesh_filter_->removeMesh(handle);
191 }
192 
193 bool DepthImageOctomapUpdater::getShapeTransform(mesh_filter::MeshHandle h, Eigen::Isometry3d& transform) const
194 {
195  ShapeTransformCache::const_iterator it = transform_cache_.find(h);
196  if (it == transform_cache_.end())
197  {
198  ROS_ERROR_NAMED(LOGNAME, "Internal error. Mesh filter handle %u not found", h);
199  return false;
200  }
201  transform = it->second;
202  return true;
203 }
204 
205 namespace
206 {
207 bool host_is_big_endian()
208 {
209  union
210  {
211  uint32_t i;
212  char c[sizeof(uint32_t)];
213  } bint = { 0x01020304 };
214  return bint.c[0] == 1;
215 }
216 } // namespace
217 
218 static const bool HOST_IS_BIG_ENDIAN = host_is_big_endian();
219 
220 void DepthImageOctomapUpdater::depthImageCallback(const sensor_msgs::ImageConstPtr& depth_msg,
221  const sensor_msgs::CameraInfoConstPtr& info_msg)
222 {
223  ROS_DEBUG_NAMED(LOGNAME, "Received a new depth image message (frame = '%s', encoding='%s')",
224  depth_msg->header.frame_id.c_str(), depth_msg->encoding.c_str());
226 
227  if (max_update_rate_ > 0)
228  {
229  // ensure we are not updating the octomap representation too often
230  if (ros::Time::now() - last_update_time_ <= ros::Duration(1.0 / max_update_rate_))
231  return;
232  last_update_time_ = ros::Time::now();
233  }
234 
235  // measure the frequency at which we receive updates
236  if (image_callback_count_ < 1000)
237  {
238  if (image_callback_count_ > 0)
239  {
240  const double dt_start = (start - last_depth_callback_start_).toSec();
241  if (image_callback_count_ < 2)
242  average_callback_dt_ = dt_start;
243  else
244  average_callback_dt_ =
245  ((image_callback_count_ - 1) * average_callback_dt_ + dt_start) / (double)image_callback_count_;
246  }
247  }
248  else
249  // every 1000 updates we reset the counter almost to the beginning (use 2 so we don't have so much of a ripple in
250  // the measured average)
251  image_callback_count_ = 2;
252  last_depth_callback_start_ = start;
253  ++image_callback_count_;
254 
255  if (monitor_->getMapFrame().empty())
256  monitor_->setMapFrame(depth_msg->header.frame_id);
257 
258  /* get transform for cloud into map frame */
259  tf2::Stamped<tf2::Transform> map_h_sensor;
260  if (monitor_->getMapFrame() == depth_msg->header.frame_id)
261  map_h_sensor.setIdentity();
262  else
263  {
264  if (tf_buffer_)
265  {
266  // wait at most 50ms
267  static const double TEST_DT = 0.005;
268  const int nt = (int)(0.5 + average_callback_dt_ / TEST_DT) * std::max(1, ((int)queue_size_ / 2));
269  bool found = false;
270  std::string err;
271  for (int t = 0; t < nt; ++t)
272  try
273  {
274  tf2::fromMsg(tf_buffer_->lookupTransform(monitor_->getMapFrame(), depth_msg->header.frame_id,
275  depth_msg->header.stamp),
276  map_h_sensor);
277  found = true;
278  break;
279  }
280  catch (tf2::TransformException& ex)
281  {
282  static const ros::Duration D(TEST_DT);
283  err = ex.what();
284  D.sleep();
285  }
286  static const unsigned int MAX_TF_COUNTER = 1000; // so we avoid int overflow
287  if (found)
288  {
289  good_tf_++;
290  if (good_tf_ > MAX_TF_COUNTER)
291  {
292  const unsigned int div = MAX_TF_COUNTER / 10;
293  good_tf_ /= div;
294  failed_tf_ /= div;
295  }
296  }
297  else
298  {
299  failed_tf_++;
300  if (failed_tf_ > good_tf_)
302  "More than half of the image messages discared due to TF being unavailable (%u%%). "
303  "Transform error of sensor data: %s; quitting callback.",
304  (100 * failed_tf_) / (good_tf_ + failed_tf_), err.c_str());
305  else
306  ROS_DEBUG_THROTTLE_NAMED(1, LOGNAME, "Transform error of sensor data: %s; quitting callback", err.c_str());
307  if (failed_tf_ > MAX_TF_COUNTER)
308  {
309  const unsigned int div = MAX_TF_COUNTER / 10;
310  good_tf_ /= div;
311  failed_tf_ /= div;
312  }
313  return;
314  }
315  }
316  else
317  return;
318  }
319 
320  if (!updateTransformCache(depth_msg->header.frame_id, depth_msg->header.stamp))
321  return;
322 
323  if (depth_msg->is_bigendian && !HOST_IS_BIG_ENDIAN)
324  ROS_ERROR_THROTTLE_NAMED(1, LOGNAME, "endian problem: received image data does not match host");
325 
326  const int w = depth_msg->width;
327  const int h = depth_msg->height;
328 
329  // call the mesh filter
330  mesh_filter::StereoCameraModel::Parameters& params = mesh_filter_->parameters();
331  params.setCameraParameters(info_msg->K[0], info_msg->K[4], info_msg->K[2], info_msg->K[5]);
332  params.setImageSize(w, h);
333 
334  const bool is_u_short = depth_msg->encoding == sensor_msgs::image_encodings::TYPE_16UC1;
335  if (is_u_short)
336  mesh_filter_->filter(&depth_msg->data[0], GL_UNSIGNED_SHORT);
337  else
338  {
339  if (depth_msg->encoding != sensor_msgs::image_encodings::TYPE_32FC1)
340  {
341  ROS_ERROR_THROTTLE_NAMED(1, LOGNAME, "Unexpected encoding type: '%s'. Ignoring input.",
342  depth_msg->encoding.c_str());
343  return;
344  }
345  mesh_filter_->filter(&depth_msg->data[0], GL_FLOAT);
346  }
347 
348  // the mesh filter runs in background; compute extra things in the meantime
349 
350  // Use correct principal point from calibration
351  const double px = info_msg->K[2];
352  const double py = info_msg->K[5];
353 
354  // if the camera parameters have changed at all, recompute the cache we had
355  if (w >= static_cast<int>(x_cache_.size()) || h >= static_cast<int>(y_cache_.size()) || K2_ != px || K5_ != py ||
356  K0_ != info_msg->K[0] || K4_ != info_msg->K[4])
357  {
358  K2_ = px;
359  K5_ = py;
360  K0_ = info_msg->K[0];
361  K4_ = info_msg->K[4];
362 
363  inv_fx_ = 1.0 / K0_;
364  inv_fy_ = 1.0 / K4_;
365 
366  // if there are any NaNs, discard data
367  if (!(px == px && py == py && inv_fx_ == inv_fx_ && inv_fy_ == inv_fy_))
368  return;
369 
370  // Pre-compute some constants
371  if (static_cast<int>(x_cache_.size()) < w)
372  x_cache_.resize(w);
373  if (static_cast<int>(y_cache_.size()) < h)
374  y_cache_.resize(h);
375 
376  for (int x = 0; x < w; ++x)
377  x_cache_[x] = (x - px) * inv_fx_;
378 
379  for (int y = 0; y < h; ++y)
380  y_cache_[y] = (y - py) * inv_fy_;
381  }
382 
383  const octomap::point3d sensor_origin(map_h_sensor.getOrigin().getX(), map_h_sensor.getOrigin().getY(),
384  map_h_sensor.getOrigin().getZ());
385 
386  octomap::KeySet* occupied_cells_ptr = new octomap::KeySet();
387  octomap::KeySet* model_cells_ptr = new octomap::KeySet();
388  octomap::KeySet& occupied_cells = *occupied_cells_ptr;
389  octomap::KeySet& model_cells = *model_cells_ptr;
390 
391  // allocate memory if needed
392  std::size_t img_size = h * w;
393  if (filtered_labels_.size() < img_size)
394  filtered_labels_.resize(img_size);
395 
396  // get the labels of the filtered data
397  const unsigned int* labels_row = &filtered_labels_[0];
398  mesh_filter_->getFilteredLabels(&filtered_labels_[0]);
399 
400  // publish debug information if needed
401  if (debug_info_)
402  {
403  sensor_msgs::Image debug_msg;
404  debug_msg.header = depth_msg->header;
405  debug_msg.height = h;
406  debug_msg.width = w;
407  debug_msg.is_bigendian = HOST_IS_BIG_ENDIAN;
408  debug_msg.encoding = sensor_msgs::image_encodings::TYPE_32FC1;
409  debug_msg.step = w * sizeof(float);
410  debug_msg.data.resize(img_size * sizeof(float));
411  mesh_filter_->getModelDepth(reinterpret_cast<float*>(&debug_msg.data[0]));
412  pub_model_depth_image_.publish(debug_msg, *info_msg);
413 
414  sensor_msgs::Image filtered_depth_msg;
415  filtered_depth_msg.header = depth_msg->header;
416  filtered_depth_msg.height = h;
417  filtered_depth_msg.width = w;
418  filtered_depth_msg.is_bigendian = HOST_IS_BIG_ENDIAN;
419  filtered_depth_msg.encoding = sensor_msgs::image_encodings::TYPE_32FC1;
420  filtered_depth_msg.step = w * sizeof(float);
421  filtered_depth_msg.data.resize(img_size * sizeof(float));
422  mesh_filter_->getFilteredDepth(reinterpret_cast<float*>(&filtered_depth_msg.data[0]));
423  pub_filtered_depth_image_.publish(filtered_depth_msg, *info_msg);
424 
425  sensor_msgs::Image label_msg;
426  label_msg.header = depth_msg->header;
427  label_msg.height = h;
428  label_msg.width = w;
429  label_msg.is_bigendian = HOST_IS_BIG_ENDIAN;
430  label_msg.encoding = sensor_msgs::image_encodings::RGBA8;
431  label_msg.step = w * sizeof(unsigned int);
432  label_msg.data.resize(img_size * sizeof(unsigned int));
433  mesh_filter_->getFilteredLabels(reinterpret_cast<unsigned int*>(&label_msg.data[0]));
434 
435  pub_filtered_label_image_.publish(label_msg, *info_msg);
436  }
437 
438  if (!filtered_cloud_topic_.empty())
439  {
440  sensor_msgs::Image filtered_msg;
441  filtered_msg.header = depth_msg->header;
442  filtered_msg.height = h;
443  filtered_msg.width = w;
444  filtered_msg.is_bigendian = HOST_IS_BIG_ENDIAN;
445  filtered_msg.encoding = sensor_msgs::image_encodings::TYPE_16UC1;
446  filtered_msg.step = w * sizeof(unsigned short);
447  filtered_msg.data.resize(img_size * sizeof(unsigned short));
448 
449  // reuse float buffer across callbacks
450  static std::vector<float> filtered_data;
451  if (filtered_data.size() < img_size)
452  filtered_data.resize(img_size);
453 
454  mesh_filter_->getFilteredDepth(reinterpret_cast<float*>(&filtered_data[0]));
455  unsigned short* msg_data = reinterpret_cast<unsigned short*>(&filtered_msg.data[0]);
456  for (std::size_t i = 0; i < img_size; ++i)
457  {
458  // rescale depth to millimeter to work with `unsigned short`
459  msg_data[i] = static_cast<unsigned short>(filtered_data[i] * 1000 + 0.5);
460  }
461  pub_filtered_depth_image_.publish(filtered_msg, *info_msg);
462  }
463 
464  // figure out occupied cells and model cells
465  tree_->lockRead();
466 
467  try
468  {
469  const int h_bound = h - skip_vertical_pixels_;
470  const int w_bound = w - skip_horizontal_pixels_;
471 
472  if (is_u_short)
473  {
474  const uint16_t* input_row = reinterpret_cast<const uint16_t*>(&depth_msg->data[0]);
475 
476  for (int y = skip_vertical_pixels_; y < h_bound; ++y, labels_row += w, input_row += w)
477  for (int x = skip_horizontal_pixels_; x < w_bound; ++x)
478  {
479  // not filtered
480  if (labels_row[x] == mesh_filter::MeshFilterBase::BACKGROUND)
481  {
482  float zz = (float)input_row[x] * 1e-3; // scale from mm to m
483  float yy = y_cache_[y] * zz;
484  float xx = x_cache_[x] * zz;
485  /* transform to map frame */
486  tf2::Vector3 point_tf = map_h_sensor * tf2::Vector3(xx, yy, zz);
487  occupied_cells.insert(tree_->coordToKey(point_tf.getX(), point_tf.getY(), point_tf.getZ()));
488  }
489  // on far plane or a model point -> remove
490  else if (labels_row[x] >= mesh_filter::MeshFilterBase::FAR_CLIP)
491  {
492  float zz = input_row[x] * 1e-3;
493  float yy = y_cache_[y] * zz;
494  float xx = x_cache_[x] * zz;
495  /* transform to map frame */
496  tf2::Vector3 point_tf = map_h_sensor * tf2::Vector3(xx, yy, zz);
497  // add to the list of model cells
498  model_cells.insert(tree_->coordToKey(point_tf.getX(), point_tf.getY(), point_tf.getZ()));
499  }
500  }
501  }
502  else
503  {
504  const float* input_row = reinterpret_cast<const float*>(&depth_msg->data[0]);
505 
506  for (int y = skip_vertical_pixels_; y < h_bound; ++y, labels_row += w, input_row += w)
507  for (int x = skip_horizontal_pixels_; x < w_bound; ++x)
508  {
509  if (labels_row[x] == mesh_filter::MeshFilterBase::BACKGROUND)
510  {
511  float zz = input_row[x];
512  float yy = y_cache_[y] * zz;
513  float xx = x_cache_[x] * zz;
514  /* transform to map frame */
515  tf2::Vector3 point_tf = map_h_sensor * tf2::Vector3(xx, yy, zz);
516  occupied_cells.insert(tree_->coordToKey(point_tf.getX(), point_tf.getY(), point_tf.getZ()));
517  }
518  else if (labels_row[x] >= mesh_filter::MeshFilterBase::FAR_CLIP)
519  {
520  float zz = input_row[x];
521  float yy = y_cache_[y] * zz;
522  float xx = x_cache_[x] * zz;
523  /* transform to map frame */
524  tf2::Vector3 point_tf = map_h_sensor * tf2::Vector3(xx, yy, zz);
525  // add to the list of model cells
526  model_cells.insert(tree_->coordToKey(point_tf.getX(), point_tf.getY(), point_tf.getZ()));
527  }
528  }
529  }
530  }
531  catch (...)
532  {
533  tree_->unlockRead();
534  ROS_ERROR_NAMED(LOGNAME, "Internal error while parsing depth data");
535  return;
536  }
537  tree_->unlockRead();
538 
539  /* cells that overlap with the model are not occupied */
540  for (const octomap::OcTreeKey& model_cell : model_cells)
541  occupied_cells.erase(model_cell);
542 
543  // mark occupied cells
544  tree_->lockWrite();
545  try
546  {
547  /* now mark all occupied cells */
548  for (const octomap::OcTreeKey& occupied_cell : occupied_cells)
549  tree_->updateNode(occupied_cell, true);
550  }
551  catch (...)
552  {
553  ROS_ERROR_NAMED(LOGNAME, "Internal error while updating octree");
554  }
555  tree_->unlockWrite();
556  tree_->triggerUpdateCallback();
557 
558  // at this point we still have not freed the space
559  free_space_updater_->pushLazyUpdate(occupied_cells_ptr, model_cells_ptr, sensor_origin);
560 
561  ROS_DEBUG_NAMED(LOGNAME, "Processed depth image in %lf ms", (ros::WallTime::now() - start).toSec() * 1000.0);
562 }
563 } // namespace occupancy_map_monitor
shapes::createMeshFromShape
Mesh * createMeshFromShape(const Box &box)
ROS_ERROR_THROTTLE_NAMED
#define ROS_ERROR_THROTTLE_NAMED(period, name,...)
image_encodings.h
ROS_DEBUG_THROTTLE_NAMED
#define ROS_DEBUG_THROTTLE_NAMED(period, name,...)
XmlRpc::XmlRpcException::getMessage
const std::string & getMessage() const
tf2::fromMsg
void fromMsg(const A &, B &b)
sensor_msgs::image_encodings::RGBA8
const std::string RGBA8
ros::TransportHints
shape_operations.h
tf2::Stamped
ROS_ERROR_NAMED
#define ROS_ERROR_NAMED(name,...)
mesh_filter::SensorModel::Parameters::setImageSize
void setImageSize(unsigned width, unsigned height)
sets the image size
Definition: sensor_model.cpp:53
Vector3.h
transform
template Halfspace< double > transform(const Halfspace< double > &a, const Transform3< double > &tf)
shapes::Mesh
shapes::MESH
MESH
sensor_msgs::image_encodings::TYPE_16UC1
const std::string TYPE_16UC1
octomath::Vector3
octomap::KeySet
unordered_ns::unordered_set< OcTreeKey, OcTreeKey::KeyHash > KeySet
ROS_DEBUG_NAMED
#define ROS_DEBUG_NAMED(name,...)
y
double y
ros::WallTime::now
static WallTime now()
ROS_ERROR_STREAM_NAMED
#define ROS_ERROR_STREAM_NAMED(name, args)
depth_image_octomap_updater.h
octomap::OcTreeKey
ros::WallTime
ROS_WARN_THROTTLE_NAMED
#define ROS_WARN_THROTTLE_NAMED(period, name,...)
XmlRpc::XmlRpcException
mesh_filter::StereoCameraModel::Parameters::setCameraParameters
void setCameraParameters(float fx, float fy, float cx, float cy)
sets the camera parameters of the pinhole camera where the disparities were obtained....
Definition: stereo_camera_model.cpp:63
occupancy_map_monitor.h
start
ROSCPP_DECL void start()
XmlRpc::XmlRpcValue::hasMember
bool hasMember(const std::string &name) const
mesh_filter::MeshFilterBase::TransformCallback
std::function< bool(MeshHandle, Eigen::Isometry3d &)> TransformCallback
Definition: mesh_filter_base.h:67
mesh_filter::MeshHandle
unsigned int MeshHandle
Definition: mesh_filter_base.h:60
sensor_msgs::image_encodings::TYPE_32FC1
const std::string TYPE_32FC1
mesh_filter::StereoCameraModel::REGISTERED_PSDK_PARAMS
static const StereoCameraModel::Parameters & REGISTERED_PSDK_PARAMS
predefined sensor model for OpenNI compatible devices (e.g., PrimeSense, Kinect, Asus Xtion)
Definition: stereo_camera_model.h:215
mesh_filter::MeshFilterBase::FAR_CLIP
@ FAR_CLIP
Definition: mesh_filter_base.h:76
occupancy_map_monitor::DepthImageOctomapUpdater::DepthImageOctomapUpdater
DepthImageOctomapUpdater()
Definition: depth_image_octomap_updater.cpp:85
mesh_filter::MeshFilterBase::BACKGROUND
@ BACKGROUND
Definition: mesh_filter_base.h:73
occupancy_map_monitor::LOGNAME
static const std::string LOGNAME
occupancy_map_monitor
tf2_geometry_msgs.h
shapes::ShapeConstPtr
std::shared_ptr< const Shape > ShapeConstPtr
x
double x
XmlRpcException.h
ros::Duration::sleep
bool sleep() const
image_transport::TransportHints
tf2::TransformException
ros::Duration
t
geometry_msgs::TransformStamped t
Transform.h
XmlRpc::XmlRpcValue
ros::Time::now
static Time now()
mesh_filter::StereoCameraModel::Parameters
Parameters for Stereo-like devices.
Definition: stereo_camera_model.h:119
occupancy_map_monitor::HOST_IS_BIG_ENDIAN
static const bool HOST_IS_BIG_ENDIAN
Definition: depth_image_octomap_updater.cpp:250


perception
Author(s): Ioan Sucan , Jon Binney , Suat Gedikli
autogenerated on Wed Feb 21 2024 03:26:19