RosDevice.cpp
Go to the documentation of this file.
2 
3 #include <sensor_msgs/Image.h>
6 #include <sensor_msgs/CameraInfo.h>
7 
8 #include <string>
9 #include <iostream>
10 
11 #include "util.hpp"
12 #include "tf.hpp"
13 #include "visualization.hpp"
14 #include "point_cloud.hpp"
15 
16 using namespace astra_ros;
17 
18 namespace
19 {
20  // For some reason ros::Publisher and image_transport::Publisher can cast to void * for determining
21  // validity. (void *)1 is valid, (void *)0 is invalid.
22  // T must be a Publisher type
23  template<typename T>
24  bool isPublisherValid(const T &publisher)
25  {
26  return (void *)publisher == (void *)1;
27  }
28 
29  // Wraps a ROS param for a boost::optional
30  template<typename T>
31  bool optionalParam(const ros::NodeHandle &nh, const std::string &key, boost::optional<T> &value)
32  {
33  T raw;
34  if (!nh.getParam(key, raw))
35  {
36  value = boost::none;
37  return false;
38  }
39 
40  value = raw;
41  return true;
42  }
43 
44  // Wraps a ros param for a boost::optional<Parameter>
45  template<typename T>
46  bool liveParam(const ros::NodeHandle &nh, const std::string &key, Parameter<T> &value, const T &default_value)
47  {
48  T raw;
49  if (!nh.getParam(key, raw))
50  {
51  value.set(default_value);
52  return false;
53  }
54 
55  value.set(raw);
56  return true;
57  }
58 
59  // Wraps a ros param for a boost::optional<Parameter>
60  template<typename T>
61  bool optionalLiveParam(const ros::NodeHandle &nh, const std::string &key, boost::optional<Parameter<T>> &value, const T &default_value)
62  {
63  T raw;
64  if (!nh.getParam(key, raw))
65  {
66  value = Parameter<T>(default_value);
67  if (value) value->set(default_value);
68  else value = Parameter<T>(default_value);
69  return false;
70  }
71 
72  if (value) value->set(raw);
73  else value = Parameter<T>(raw);
74 
75  return true;
76  }
77 }
78 
79 const std::string astra_ros::DEVICE_NAMESPACE("devices");
80 
81 RosDevice::RosDevice(const std::string &name, ros::NodeHandle &nh, ros::NodeHandle &pnh)
82  : name_(name)
83  , nh_(nh)
84  , device_nh_(ros::NodeHandle(pnh, DEVICE_NAMESPACE + "/" + name))
85  , pnh_(pnh)
86  , image_transport_(device_nh_)
87  , mut_(std::make_unique<boost::recursive_mutex>())
88  , dynamic_reconfigure_server_(std::make_unique<DeviceConfigServer>(*mut_, device_nh_))
89  , publish_body_markers(false)
90  , publish_body_mask(true)
91  , publish_floor_mask(true)
92  , body_frame_id("/camera")
93 {
94  device_nh_.getParam("body/publish_body_markers", publish_body_markers);
95  device_nh_.getParam("body/publish_body_mask", publish_body_mask);
96  device_nh_.getParam("body/publish_floor_mask", publish_floor_mask);
97  device_nh_.getParam("body/frame_id", body_frame_id);
98 
100  config.on_frame = std::bind(&RosDevice::onFrame, this, std::placeholders::_1);
101  device_ = Device::open(config);
102 
103  camera_parameters_ = device_->getCameraParameters();
104 
105  auto &color_stream = config.color_stream;
106  auto &ir_stream = config.ir_stream;
107  auto &depth_stream = config.depth_stream;
108 
109  // Make sure the dynamic reconfigure configuration is synchronized with
110  // the user-provided static configuration
111  DeviceConfig dyn_config;
112  dyn_config.color_stream_running = color_stream && color_stream->running.get();
113  dyn_config.color_stream_mirrored = color_stream && color_stream->mirrored && color_stream->mirrored->get();
114 
115  dyn_config.ir_stream_running = ir_stream && ir_stream->running.get();
116  dyn_config.ir_stream_mirrored = ir_stream && ir_stream->mirrored && ir_stream->mirrored->get();
117 
118  dyn_config.depth_stream_running = depth_stream && depth_stream->running.get();
119  dyn_config.depth_stream_mirrored = depth_stream && depth_stream->mirrored && depth_stream->mirrored->get();
120 
121  dynamic_reconfigure_server_->updateConfig(dyn_config);
122 
123  dynamic_reconfigure_server_->setCallback(std::bind(&RosDevice::onDynamicReconfigure, this, std::placeholders::_1, std::placeholders::_2));
124 
125  // Configure services
126  if (color_stream)
127  {
134 
135  if (color_stream->mirrored)
136  {
139  }
140  }
141 
142  if (ir_stream)
143  {
148 
151 
152  if (ir_stream->mirrored)
153  {
156  }
157 
158  if (ir_stream->exposure)
159  {
162  }
163 
164  if (ir_stream->gain)
165  {
168  }
169  }
170 
171  if (depth_stream)
172  {
173  // For some reason these are tied to the depth sensor
175 
178 
183 
187 
188  if (depth_stream->mirrored)
189  {
192  }
193  }
194 
195 
196 }
197 
198 const std::string &RosDevice::getName() const noexcept
199 {
200  return name_;
201 }
202 
204 {
205  device_->update();
206 }
207 
209 {
210  using namespace std::string_literals;
211 
212  Device::Configuration config;
213 
214  std::string uri;
215  optionalParam(nh, "uri", config.uri);
216 
217  if (nh.hasParam("color"))
218  {
219  ros::NodeHandle color_nh(nh, "color");
220 
222 
223  liveParam(color_nh, "running", color_stream.running, true);
224  optionalLiveParam(color_nh, "mirrored", color_stream.mirrored, false);
225 
226  config.color_stream = color_stream;
227  }
228 
229  if (nh.hasParam("ir"))
230  {
231  ros::NodeHandle ir_nh(nh, "ir");
232 
234 
235  liveParam(ir_nh, "running", ir_stream.running, true);
236  optionalLiveParam(ir_nh, "mirrored", ir_stream.mirrored, false);
237 
238  config.ir_stream = ir_stream;
239  }
240 
241  if (nh.hasParam("depth"))
242  {
243  ros::NodeHandle depth_nh(nh, "depth");
244 
246 
247  liveParam(depth_nh, "running", depth_stream.running, true);
248  optionalLiveParam(depth_nh, "mirrored", depth_stream.mirrored, false);
249 
250  optionalLiveParam(depth_nh, "d2c_mode", depth_stream.d2c_mode, 0);
251  optionalLiveParam(depth_nh, "registration", depth_stream.registration, true);
252 
253  config.depth_stream = depth_stream;
254  }
255 
256  if (nh.hasParam("body"))
257  {
258  ros::NodeHandle body_nh(nh, "body");
259 
261 
262  liveParam(body_nh, "running", body_stream.running, true);
263  optionalParam(body_nh, "license", body_stream.license);
264 
265  config.body_stream = body_stream;
266  }
267 
268  if (nh.hasParam("colorized_body"))
269  {
270  ros::NodeHandle colorized_body_nh(nh, "colorized_body");
271 
272  Device::Configuration::ColorizedBodyStream colorized_body_stream;
273 
274  liveParam(colorized_body_nh, "running", colorized_body_stream.running, true);
275 
276  config.colorized_body_stream = colorized_body_stream;
277  }
278 
279  if (nh.hasParam("hand"))
280  {
281  ros::NodeHandle hand_nh(nh, "hand");
282 
284 
285  liveParam(hand_nh, "running", hand_stream.running, true);
286 
287  config.hand_stream = hand_stream;
288  }
289 
290  if (nh.hasParam("masked_color"))
291  {
292  ros::NodeHandle masked_color_nh(nh, "masked_color");
293 
294  Device::Configuration::MaskedColorStream masked_color_stream;
295 
296  liveParam(masked_color_nh, "running", masked_color_stream.running, true);
297 
298  config.masked_color_stream = masked_color_stream;
299  }
300 
301  if (nh.hasParam("point"))
302  {
303  ros::NodeHandle point_nh(nh, "point");
304 
306 
307  liveParam(point_nh, "running", point_stream.running, true);
308 
309  config.point_stream = point_stream;
310  }
311 
312  return config;
313 }
314 
316 {
317  const ros::Time now = ros::Time::now();
318 
319  // If all of these are present we attempt to generate point clouds
320  boost::optional<sensor_msgs::Image> color_image;
321  boost::optional<sensor_msgs::Image> depth_image;
322  boost::optional<sensor_msgs::CameraInfo> color_camera_info;
323 
324  if (frame.color)
325  {
326  if (!isPublisherValid(color_image_pub_))
327  {
328  color_image_pub_ = image_transport_.advertise("color/image_color", 1);
329  }
330 
331  if (!isPublisherValid(color_camera_info_pub_))
332  {
333  color_camera_info_pub_ = device_nh_.advertise<sensor_msgs::CameraInfo>("color/camera_info", 1, true);
334  }
335 
336  color_image = toRos(frame.color->data, frame.color->data_length, frame.color->metadata);
337  color_image_pub_.publish(*color_image);
338 
339  // Camera Info
340  // TODO: orbbec_camera_params is undocumented,
341  // so we need to verify this is correct.
342  sensor_msgs::CameraInfo camera_info;
343  camera_info.header.stamp = now;
344  camera_info.header.frame_id = body_frame_id;
345  camera_info.height = frame.color->metadata.height;
346  camera_info.width = frame.color->metadata.width;
347  camera_info.distortion_model = "plumb_bob";
348 
349  camera_info.D.resize(5, 0.0);
350  camera_info.D[0] = camera_parameters_.l_k[0];
351  camera_info.D[1] = camera_parameters_.l_k[1];
352  camera_info.D[2] = camera_parameters_.l_k[2];
353  camera_info.D[3] = camera_parameters_.l_k[3];
354  camera_info.D[4] = camera_parameters_.l_k[4];
355 
356  // camera_info.K.resize(9, 0.0);
357  camera_info.K[0] = camera_parameters_.l_intr_p[0];
358  camera_info.K[2] = camera_parameters_.l_intr_p[2];
359  camera_info.K[4] = camera_parameters_.l_intr_p[1];
360  camera_info.K[5] = camera_parameters_.l_intr_p[3];
361  camera_info.K[8] = 1.0;
362 
363  color_camera_info = camera_info;
364  color_camera_info_pub_.publish(camera_info);
365  }
366  else
367  {
370  }
371 
372  if (frame.ir)
373  {
374  if (!isPublisherValid(ir_image_pub_))
375  {
376  ir_image_pub_ = image_transport_.advertise("ir/image", 1);
377  }
378 
379  ir_image_pub_.publish(toRos(frame.ir->data, frame.ir->data_length, frame.ir->metadata));
380  }
381  else
382  {
384  }
385 
386  if (frame.depth)
387  {
388  if (!isPublisherValid(depth_image_pub_))
389  {
390  depth_image_pub_ = image_transport_.advertise("depth/image", 1);
391  }
392 
393  if (!isPublisherValid(depth_camera_info_pub_))
394  {
395  depth_camera_info_pub_ = device_nh_.advertise<sensor_msgs::CameraInfo>("depth/camera_info", 1, true);
396  }
397 
398 
399  depth_image = toRos(frame.depth->data, frame.depth->data_length, frame.depth->metadata);
400  depth_image_pub_.publish(*depth_image);
401 
402  // Camera Info
403  // TODO: orbbec_camera_params is undocumented,
404  // so we need to verify this is correct.
405  sensor_msgs::CameraInfo camera_info;
406  camera_info.header.stamp = now;
407  camera_info.header.frame_id = body_frame_id;
408  camera_info.height = frame.depth->metadata.height;
409  camera_info.width = frame.depth->metadata.width;
410  camera_info.distortion_model = sensor_msgs::distortion_models::PLUMB_BOB;
411 
412  camera_info.D.resize(5, 0.0);
413  camera_info.D[0] = camera_parameters_.r_k[0];
414  camera_info.D[1] = camera_parameters_.r_k[1];
415  camera_info.D[2] = camera_parameters_.r_k[2];
416  camera_info.D[3] = camera_parameters_.r_k[3];
417  camera_info.D[4] = camera_parameters_.r_k[4];
418 
419  camera_info.K[0] = camera_parameters_.r_intr_p[0];
420  camera_info.K[2] = camera_parameters_.r_intr_p[2];
421  camera_info.K[4] = camera_parameters_.r_intr_p[1];
422  camera_info.K[5] = camera_parameters_.r_intr_p[3];
423  camera_info.K[8] = 1.0;
424 
425  depth_camera_info_pub_.publish(camera_info);
426  }
427  else
428  {
431  }
432 
433  if (frame.body)
434  {
435  if (!isPublisherValid(body_frame_pub_))
436  {
437  body_frame_pub_ = device_nh_.advertise<BodyFrame>("body/frame", 1);
438  }
439 
441  {
442  if (!isPublisherValid(body_markers_pub_))
443  {
444  body_markers_pub_ = device_nh_.advertise<visualization_msgs::MarkerArray>("body/markers", 1);
445  }
446  }
447  else
448  {
450  }
451 
452 
453  if (publish_body_mask)
454  {
455  if (!isPublisherValid(body_mask_image_pub_))
456  {
458  }
459  }
460  else
461  {
463  }
464 
465 
466  if (publish_floor_mask)
467  {
468  if (!isPublisherValid(floor_mask_image_pub_))
469  {
470  floor_mask_image_pub_ = image_transport_.advertise("body/floor_mask", 1);
471  }
472  }
473  else
474  {
476  }
477 
478  std_msgs::Header header;
479  header.stamp = now;
480  header.frame_id = body_frame_id;
481 
482  BodyFrame body_frame;
483  body_frame.bodies = toRos(frame.body->body_list, header);
484  body_frame.floor_detected = frame.body->floor_info->floorDetected;
485  body_frame.floor_plane = toRos(frame.body->floor_info->floorPlane);
486 
487  if (depth_image && color_image && color_camera_info)
488  {
489  const auto &body_mask = frame.body->body_mask;
490 
491  for (auto &body : body_frame.bodies)
492  {
493  const std::uint8_t id = body.id;
494  body.point_cloud = toPointCloud(*color_image, *depth_image, *color_camera_info, [&] (const std::size_t x, const std::size_t y) -> bool {
495  return x < body_mask.width && y < body_mask.height && body_mask.data[y * body_mask.width + x] == id;
496  });
497  }
498  }
499 
500  body_frame_pub_.publish(body_frame);
501 
502  if (isPublisherValid(body_mask_image_pub_)) body_mask_image_pub_.publish(toRos(frame.body->body_mask));
503  if (isPublisherValid(floor_mask_image_pub_)) floor_mask_image_pub_.publish(toRos(frame.body->floor_info->floorMask));
504 
505  if (isPublisherValid(body_markers_pub_)) body_markers_pub_.publish(toMarkerArray(body_frame.bodies));
506 
507  // TF2
508  if (!tf_broadcaster_)
509  {
510  tf_broadcaster_ = std::make_unique<tf2_ros::TransformBroadcaster>();
511  }
512 
513  std::vector<geometry_msgs::TransformStamped> transforms;
514  for (const auto &body : body_frame.bodies)
515  {
516  tf_broadcaster_->sendTransform(bodyTransforms(body));
517  }
518  }
519  else
520  {
525  }
526 
527  if (frame.colorized_body)
528  {
529  if (!isPublisherValid(colorized_body_image_pub_))
530  {
531  colorized_body_image_pub_ = image_transport_.advertise("colorized_body/image", 1);
532  }
533 
534  colorized_body_image_pub_.publish(toRos(frame.colorized_body->data, frame.colorized_body->data_length, frame.colorized_body->metadata));
535  }
536  else
537  {
539  }
540 
541  if (frame.masked_color)
542  {
543  if (!isPublisherValid(colorized_body_image_pub_))
544  {
545  masked_color_image_pub_ = image_transport_.advertise("masked_color/image", 1);
546  }
547 
548  masked_color_image_pub_.publish(toRos(frame.masked_color->data, frame.masked_color->data_length, frame.masked_color->metadata));
549  }
550  else
551  {
553  }
554 
555  if (depth_image && color_image && color_camera_info)
556  {
557  if (!isPublisherValid(point_cloud_pub_))
558  {
559  point_cloud_pub_ = device_nh_.advertise<sensor_msgs::PointCloud>("point_cloud", 1);
560  }
561 
562  // Generate a point cloud
563  auto point_cloud = toPointCloud(*color_image, *depth_image, *color_camera_info);
564  point_cloud.header.stamp = now;
565  point_cloud.header.frame_id = body_frame_id;
566 
567  // std::cout << body_frame_id << std::endl;
568  point_cloud_pub_.publish(point_cloud);
569  }
570  else
571  {
573  }
574 }
575 
576 void RosDevice::onDynamicReconfigure(DeviceConfig &config, uint32_t level)
577 {
578  auto &color_stream = device_->getConfiguration().color_stream;
579  if (color_stream)
580  {
581  color_stream->running.set(config.color_stream_running);
582 
583  if (color_stream->mirrored)
584  {
585  color_stream->mirrored->set(config.color_stream_mirrored);
586  }
587  }
588 
589  auto &ir_stream = device_->getConfiguration().ir_stream;
590  if (ir_stream)
591  {
592  ir_stream->running.set(config.ir_stream_running);
593 
594  if (ir_stream->mirrored)
595  {
596  ir_stream->mirrored->set(config.ir_stream_mirrored);
597  }
598 
599  if (ir_stream->exposure)
600  {
601  ir_stream->exposure->set(config.ir_exposure);
602  }
603  }
604 
605  auto &depth_stream = device_->getConfiguration().depth_stream;
606  if (depth_stream)
607  {
608  depth_stream->running.set(config.depth_stream_running);
609 
610  if (depth_stream->mirrored)
611  {
612  depth_stream->mirrored->set(config.depth_stream_mirrored);
613  }
614  }
615 }
616 
617 bool RosDevice::onGetChipId(GetChipId::Request &req, GetChipId::Response &res)
618 {
619  const auto chip_id = device_->getChipId();
620  if (!chip_id) return false;
621  res.chip_id = *chip_id;
622  return true;
623 }
624 
625 bool RosDevice::onGetDepthRegistration(GetDepthRegistration::Request &req, GetDepthRegistration::Response &res)
626 {
627  const auto &depth_stream = device_->getConfiguration().depth_stream;
628  if (!depth_stream) return false;
629 
630  const auto &registration = depth_stream->registration;
631  if (!registration) return false;
632 
633  res.registration = **registration;
634 
635  return true;
636 }
637 
638 bool RosDevice::onGetColorImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
639 {
640  const auto &color_stream = device_->getConfiguration().color_stream;
641  if (!color_stream) return false;
642 
643  const auto &mode = color_stream->mode;
644  if (!mode) return false;
645 
646  res.image_stream_mode = toRos(**mode);
647 
648  return true;
649 }
650 
651 bool RosDevice::onGetDepthImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
652 {
653  const auto &depth_stream = device_->getConfiguration().depth_stream;
654  if (!depth_stream) return false;
655 
656  const auto &mode = depth_stream->mode;
657  if (!mode) return false;
658 
659  res.image_stream_mode = toRos(**mode);
660 
661  return true;
662 }
663 
664 bool RosDevice::onGetIrImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
665 {
666  const auto &ir_stream = device_->getConfiguration().ir_stream;
667  if (!ir_stream) return false;
668 
669  const auto &mode = ir_stream->mode;
670  if (!mode) return false;
671 
672  res.image_stream_mode = toRos(**mode);
673 
674  return true;
675 }
676 
677 
678 bool RosDevice::onGetColorImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
679 {
680  const auto image_stream_modes = device_->getColorImageStreamModes();
681  if (!image_stream_modes) return false;
682 
683  res.image_stream_modes.reserve(image_stream_modes->size());
684  for (const auto &image_stream_mode : *image_stream_modes)
685  {
686  res.image_stream_modes.push_back(toRos(image_stream_mode));
687  }
688 
689  return true;
690 }
691 
692 bool RosDevice::onGetDepthImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
693 {
694  const auto image_stream_modes = device_->getDepthImageStreamModes();
695  if (!image_stream_modes) return false;
696 
697  res.image_stream_modes.reserve(image_stream_modes->size());
698  for (const auto &image_stream_mode : *image_stream_modes)
699  {
700  res.image_stream_modes.push_back(toRos(image_stream_mode));
701  }
702 
703  return true;
704 }
705 
706 bool RosDevice::onGetIrImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
707 {
708  const auto image_stream_modes = device_->getIrImageStreamModes();
709  if (!image_stream_modes) return false;
710 
711  res.image_stream_modes.reserve(image_stream_modes->size());
712  for (const auto &image_stream_mode : *image_stream_modes)
713  {
714  res.image_stream_modes.push_back(toRos(image_stream_mode));
715  }
716 
717  return true;
718 }
719 
720 bool RosDevice::onGetIrExposure(GetIrExposure::Request &req, GetIrExposure::Response &res)
721 {
722  const auto &ir_stream = device_->getConfiguration().ir_stream;
723  if (!ir_stream) return false;
724 
725  const auto &exposure = ir_stream->exposure;
726  if (!exposure) return false;
727 
728  res.exposure = **exposure;
729 
730  return true;
731 }
732 
733 bool RosDevice::onGetIrGain(GetIrGain::Request &req, GetIrGain::Response &res)
734 {
735  const auto &ir_stream = device_->getConfiguration().ir_stream;
736  if (!ir_stream) return false;
737 
738  const auto &gain = ir_stream->gain;
739  if (!gain) return false;
740 
741  res.gain = **gain;
742 
743  return true;
744 }
745 
746 bool RosDevice::onGetColorMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
747 {
748  const auto &color_stream = device_->getConfiguration().color_stream;
749  if (!color_stream) return false;
750 
751  const auto &mirrored = color_stream->mirrored;
752  if (!mirrored) return false;
753 
754  res.mirrored = **mirrored;
755 
756  return true;
757 }
758 
759 bool RosDevice::onGetDepthMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
760 {
761  const auto &depth_stream = device_->getConfiguration().depth_stream;
762  if (!depth_stream) return false;
763 
764  const auto &mirrored = depth_stream->mirrored;
765  if (!mirrored) return false;
766 
767  res.mirrored = **mirrored;
768 
769  return true;
770 }
771 
772 bool RosDevice::onGetIrMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
773 {
774  const auto &ir_stream = device_->getConfiguration().ir_stream;
775  if (!ir_stream) return false;
776 
777  const auto &mirrored = ir_stream->mirrored;
778  if (!mirrored) return false;
779 
780  res.mirrored = **mirrored;
781 
782  return true;
783 }
784 
785 bool RosDevice::onGetColorRunning(GetRunning::Request &req, GetRunning::Response &res)
786 {
787  const auto &color_stream = device_->getConfiguration().color_stream;
788  if (!color_stream) return false;
789 
790  res.running = *color_stream->running;
791  return true;
792 }
793 
794 bool RosDevice::onGetDepthRunning(GetRunning::Request &req, GetRunning::Response &res)
795 {
796  const auto &depth_stream = device_->getConfiguration().depth_stream;
797  if (!depth_stream) return false;
798 
799  res.running = *depth_stream->running;
800  return true;
801 }
802 
803 bool RosDevice::onGetIrRunning(GetRunning::Request &req, GetRunning::Response &res)
804 {
805  const auto &ir_stream = device_->getConfiguration().ir_stream;
806  if (!ir_stream) return false;
807 
808  res.running = *ir_stream->running;
809  return true;
810 }
811 
812 bool RosDevice::onGetSerial(GetSerial::Request &req, GetSerial::Response &res)
813 {
814  const auto serial_number = device_->getSerialNumber();
815  if (!serial_number) return false;
816  res.serial = *serial_number;
817  return true;
818 }
819 
820 bool RosDevice::onGetColorUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
821 {
822  const auto usb_info = device_->getColorUsbInfo();
823  if (!usb_info) return false;
824  res.usb_info.pid = usb_info->pid;
825  res.usb_info.vid = usb_info->vid;
826  return true;
827 }
828 
829 bool RosDevice::onGetDepthUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
830 {
831  const auto usb_info = device_->getDepthUsbInfo();
832  if (!usb_info) return false;
833  res.usb_info.pid = usb_info->pid;
834  res.usb_info.vid = usb_info->vid;
835  return true;
836 }
837 
838 bool RosDevice::onGetIrUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
839 {
840  const auto usb_info = device_->getIrUsbInfo();
841  if (!usb_info) return false;
842  res.usb_info.pid = usb_info->pid;
843  res.usb_info.vid = usb_info->vid;
844  return true;
845 }
846 
847 bool RosDevice::onSetDepthRegistration(SetDepthRegistration::Request &req, SetDepthRegistration::Response &res)
848 {
849  auto &depth_stream = device_->getConfiguration().depth_stream;
850  if (!depth_stream) return false;
851 
852  auto &registration = depth_stream->registration;
853  if (!registration) return false;
854 
855  registration->set(req.registration);
856 
857  return true;
858 }
859 
860 
861 bool RosDevice::onSetColorImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
862 {
863  auto &color_stream = device_->getConfiguration().color_stream;
864  if (!color_stream) return false;
865 
866  auto &mode = color_stream->mode;
867  if (!mode) return false;
868 
869  mode->set(fromRos(req.image_stream_mode));
870 
871  return true;
872 }
873 
874 bool RosDevice::onSetDepthImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
875 {
876  auto &depth_stream = device_->getConfiguration().depth_stream;
877  if (!depth_stream) return false;
878 
879  auto &mode = depth_stream->mode;
880  if (!mode) return false;
881 
882  mode->set(fromRos(req.image_stream_mode));
883 
884  return true;
885 }
886 
887 bool RosDevice::onSetIrImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
888 {
889  auto &ir_stream = device_->getConfiguration().ir_stream;
890  if (!ir_stream) return false;
891 
892  auto &mode = ir_stream->mode;
893  if (!mode) return false;
894 
895  mode->set(fromRos(req.image_stream_mode));
896 
897  return true;
898 }
899 
900 bool RosDevice::onSetIrExposure(SetIrExposure::Request &req, SetIrExposure::Response &res)
901 {
902  auto &ir_stream = device_->getConfiguration().ir_stream;
903  if (!ir_stream) return false;
904 
905  auto &exposure = ir_stream->exposure;
906  if (!exposure) return false;
907 
908  return exposure->set(req.exposure);
909 }
910 
911 bool RosDevice::onSetIrGain(SetIrGain::Request &req, SetIrGain::Response &res)
912 {
913  auto &ir_stream = device_->getConfiguration().ir_stream;
914  if (!ir_stream) return false;
915 
916  auto &gain = ir_stream->gain;
917  if (!gain) return false;
918 
919  return gain->set(req.gain);
920 }
921 
922 bool RosDevice::onSetColorMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
923 {
924  auto &color_stream = device_->getConfiguration().color_stream;
925  if (!color_stream) return false;
926 
927  auto &mirrored = color_stream->mirrored;
928  if (!mirrored) return false;
929 
930  return mirrored->set(req.mirrored);
931 }
932 
933 bool RosDevice::onSetDepthMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
934 {
935  auto &depth_stream = device_->getConfiguration().depth_stream;
936  if (!depth_stream) return false;
937 
938  auto &mirrored = depth_stream->mirrored;
939  if (!mirrored) return false;
940 
941  return mirrored->set(req.mirrored);
942 }
943 
944 bool RosDevice::onSetIrMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
945 {
946  auto &ir_stream = device_->getConfiguration().ir_stream;
947  if (!ir_stream) return false;
948 
949  auto &mirrored = ir_stream->mirrored;
950  if (!mirrored) return false;
951 
952  return mirrored->set(req.mirrored);
953 }
954 
955 bool RosDevice::onSetColorRunning(SetRunning::Request &req, SetRunning::Response &res)
956 {
957  auto &color_stream = device_->getConfiguration().color_stream;
958  if (!color_stream) return false;
959 
960  return color_stream->running.set(req.running);
961 }
962 
963 bool RosDevice::onSetDepthRunning(SetRunning::Request &req, SetRunning::Response &res)
964 {
965  auto &depth_stream = device_->getConfiguration().depth_stream;
966  if (!depth_stream) return false;
967 
968  return depth_stream->running.set(req.running);
969 }
970 
971 bool RosDevice::onSetIrRunning(SetRunning::Request &req, SetRunning::Response &res)
972 {
973  auto &ir_stream = device_->getConfiguration().ir_stream;
974  if (!ir_stream) return false;
975 
976  return ir_stream->running.set(req.running);
977 }
astra_ros::RosDevice::onSetDepthRegistration
bool onSetDepthRegistration(SetDepthRegistration::Request &req, SetDepthRegistration::Response &res)
Definition: RosDevice.cpp:847
astra_ros::RosDevice::onSetColorImageStreamMode
bool onSetColorImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
Definition: RosDevice.cpp:861
astra_ros::Device::Configuration::MaskedColorStream
Definition: Device.hpp:308
astra_ros::RosDevice::onSetIrExposure
bool onSetIrExposure(SetIrExposure::Request &req, SetIrExposure::Response &res)
Definition: RosDevice.cpp:900
astra_ros::RosDevice::get_depth_image_stream_mode_svc_
ros::ServiceServer get_depth_image_stream_mode_svc_
Definition: RosDevice.hpp:140
ros::Publisher
astra_ros::Device::Configuration::BodyStream::running
Running running
Definition: Device.hpp:286
image_encodings.h
astra_ros::RosDevice::onGetIrUsbInfo
bool onGetIrUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
Definition: RosDevice.cpp:838
astra_ros::toMarkerArray
visualization_msgs::MarkerArray toMarkerArray(const Body &body)
astra_ros::RosDevice::onSetColorMirrored
bool onSetColorMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
Definition: RosDevice.cpp:922
astra_ros::RosDevice::onFrame
void onFrame(const Device::Frame &frame)
Definition: RosDevice.cpp:315
astra_ros::Device::Configuration::depth_stream
boost::optional< DepthStream > depth_stream
Definition: Device.hpp:342
distortion_models.h
astra_ros::RosDevice::image_transport_
image_transport::ImageTransport image_transport_
Definition: RosDevice.hpp:102
astra_ros::Device::Configuration::ColorStream::mirrored
boost::optional< Mirrored > mirrored
Definition: Device.hpp:199
astra_ros::fromRos
Device::ImageStreamMode fromRos(const ImageStreamMode &image_stream_mode)
visualization.hpp
astra_ros::RosDevice::onGetDepthRunning
bool onGetDepthRunning(GetRunning::Request &req, GetRunning::Response &res)
Definition: RosDevice.cpp:794
astra_ros::RosDevice::get_ir_running_svc_
ros::ServiceServer get_ir_running_svc_
Definition: RosDevice.hpp:152
astra_ros::RosDevice::publish_body_mask
bool publish_body_mask
Definition: RosDevice.hpp:113
astra_ros::RosDevice::set_ir_gain_svc_
ros::ServiceServer set_ir_gain_svc_
Definition: RosDevice.hpp:162
astra_ros::RosDevice::onGetColorMirrored
bool onGetColorMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
Definition: RosDevice.cpp:746
ros
ros::NodeHandle::getParam
bool getParam(const std::string &key, bool &b) const
astra_ros::Device::Configuration::PointStream
Definition: Device.hpp:316
astra_ros::RosDevice::getName
const std::string & getName() const noexcept
Definition: RosDevice.cpp:198
astra_ros::bodyTransforms
std::vector< geometry_msgs::TransformStamped > bodyTransforms(const Body &body)
Definition: tf.cpp:90
astra_ros::RosDevice::get_depth_mirrored_svc_
ros::ServiceServer get_depth_mirrored_svc_
Definition: RosDevice.hpp:148
astra_ros::RosDevice::camera_parameters_
orbbec_camera_params camera_parameters_
Definition: RosDevice.hpp:119
astra_ros::Device::Configuration::PointStream::running
Running running
Definition: Device.hpp:319
astra_ros::RosDevice::colorized_body_image_pub_
image_transport::Publisher colorized_body_image_pub_
Definition: RosDevice.hpp:129
astra_ros::Device::Configuration::IrStream
Definition: Device.hpp:212
astra_ros::RosDevice::set_ir_running_svc_
ros::ServiceServer set_ir_running_svc_
Definition: RosDevice.hpp:168
astra_ros::RosDevice::onGetIrMirrored
bool onGetIrMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
Definition: RosDevice.cpp:772
astra_ros::RosDevice::set_ir_exposure_svc_
ros::ServiceServer set_ir_exposure_svc_
Definition: RosDevice.hpp:161
ros::NodeHandle::advertiseService
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
astra_ros::Device::Frame::masked_color
boost::optional< MaskedColor > masked_color
Definition: Device.hpp:170
astra_ros::RosDevice::onGetColorUsbInfo
bool onGetColorUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
Definition: RosDevice.cpp:820
astra_ros::RosDevice::set_depth_mirrored_svc_
ros::ServiceServer set_depth_mirrored_svc_
Definition: RosDevice.hpp:164
boost
astra_ros::RosDevice::onGetDepthUsbInfo
bool onGetDepthUsbInfo(GetUsbInfo::Request &req, GetUsbInfo::Response &res)
Definition: RosDevice.cpp:829
astra_ros::RosDevice::onGetDepthRegistration
bool onGetDepthRegistration(GetDepthRegistration::Request &req, GetDepthRegistration::Response &res)
Definition: RosDevice.cpp:625
astra_ros::RosDevice::get_color_running_svc_
ros::ServiceServer get_color_running_svc_
Definition: RosDevice.hpp:150
astra_ros::RosDevice::set_ir_mirrored_svc_
ros::ServiceServer set_ir_mirrored_svc_
Definition: RosDevice.hpp:165
astra_ros::RosDevice::onSetColorRunning
bool onSetColorRunning(SetRunning::Request &req, SetRunning::Response &res)
Definition: RosDevice.cpp:955
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
astra_ros::Device::Configuration::DepthStream::mirrored
boost::optional< Mirrored > mirrored
Definition: Device.hpp:254
ros::NodeHandle::advertise
Publisher advertise(AdvertiseOptions &ops)
astra_ros::Device::Configuration::BodyStream::license
boost::optional< std::string > license
Definition: Device.hpp:284
astra_ros::RosDevice::masked_color_image_pub_
image_transport::Publisher masked_color_image_pub_
Definition: RosDevice.hpp:130
astra_ros::Device::Configuration::masked_color_stream
boost::optional< MaskedColorStream > masked_color_stream
Definition: Device.hpp:372
astra_ros::Device::Configuration::HandStream::running
Running running
Definition: Device.hpp:305
astra_ros::RosDevice::get_ir_image_stream_mode_svc_
ros::ServiceServer get_ir_image_stream_mode_svc_
Definition: RosDevice.hpp:141
astra_ros::Device::open
static Ptr open(const Configuration &configuration)
Definition: Device.cpp:35
image_transport::ImageTransport::advertise
Publisher advertise(const std::string &base_topic, uint32_t queue_size, bool latch=false)
astra_ros::Device::Configuration::HandStream
Definition: Device.hpp:302
astra_ros::RosDevice::onGetColorImageStreamModes
bool onGetColorImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
Definition: RosDevice.cpp:678
astra_ros::Device::Frame::ir
boost::optional< Ir > ir
Definition: Device.hpp:145
astra_ros::toPointCloud
sensor_msgs::PointCloud toPointCloud(const sensor_msgs::Image &rgb, const sensor_msgs::Image &registered_depth, const sensor_msgs::CameraInfo &camera_info, const std::function< bool(const std::size_t x, const std::size_t y)> &mask=defaultMask)
Definition: point_cloud.cpp:72
astra_ros::Device::Configuration::ColorizedBodyStream::running
Running running
Definition: Device.hpp:299
astra_ros::RosDevice::get_serial_svc_
ros::ServiceServer get_serial_svc_
Definition: RosDevice.hpp:153
astra_ros::RosDevice::depth_image_pub_
image_transport::Publisher depth_image_pub_
Definition: RosDevice.hpp:126
astra_ros::toRos
sensor_msgs::Image toRos(const std::uint8_t *const data, const std::size_t length, const astra_image_metadata_t &metadata)
Definition: util.cpp:75
astra_ros::RosDevice::get_ir_mirrored_svc_
ros::ServiceServer get_ir_mirrored_svc_
Definition: RosDevice.hpp:149
tf.hpp
astra_ros::Parameter
A "live" value that can be changed at runtime. Changes are broadcast to a listener.
Definition: Parameter.hpp:85
astra_ros::Device::Configuration::IrStream::running
Running running
Definition: Device.hpp:222
astra_ros::RosDevice::publish_body_markers
bool publish_body_markers
Definition: RosDevice.hpp:112
astra_ros::RosDevice::onGetIrExposure
bool onGetIrExposure(GetIrExposure::Request &req, GetIrExposure::Response &res)
Definition: RosDevice.cpp:720
astra_ros::RosDevice::tf_broadcaster_
std::unique_ptr< tf2_ros::TransformBroadcaster > tf_broadcaster_
Definition: RosDevice.hpp:110
astra_ros::Device::Configuration::DepthStream::registration
boost::optional< Registration > registration
Definition: Device.hpp:264
astra_ros::RosDevice::set_color_image_stream_mode_svc_
ros::ServiceServer set_color_image_stream_mode_svc_
Definition: RosDevice.hpp:158
astra_ros::RosDevice::color_camera_info_pub_
ros::Publisher color_camera_info_pub_
Definition: RosDevice.hpp:121
astra_ros::RosDevice::body_frame_pub_
ros::Publisher body_frame_pub_
Definition: RosDevice.hpp:132
astra_ros::Parameter::set
bool set(const T &value)
Definition: Parameter.hpp:113
astra_ros::RosDevice::onGetSerial
bool onGetSerial(GetSerial::Request &req, GetSerial::Response &res)
Definition: RosDevice.cpp:812
astra_ros::RosDevice::onGetIrGain
bool onGetIrGain(GetIrGain::Request &req, GetIrGain::Response &res)
Definition: RosDevice.cpp:733
astra_ros::RosDevice::onGetColorImageStreamMode
bool onGetColorImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
Definition: RosDevice.cpp:638
astra_ros::Device::Configuration::DepthStream::running
Running running
Definition: Device.hpp:249
RosDevice.hpp
astra_ros::Device::Frame::colorized_body
boost::optional< ColorizedBody > colorized_body
Definition: Device.hpp:160
point_cloud.hpp
astra_ros::RosDevice::get_ir_usb_info_svc_
ros::ServiceServer get_ir_usb_info_svc_
Definition: RosDevice.hpp:156
astra_ros::Device::Configuration::hand_stream
boost::optional< HandStream > hand_stream
Definition: Device.hpp:364
astra_ros::RosDevice::set_color_running_svc_
ros::ServiceServer set_color_running_svc_
Definition: RosDevice.hpp:166
astra_ros::RosDevice::color_image_pub_
image_transport::Publisher color_image_pub_
Definition: RosDevice.hpp:124
astra_ros::RosDevice::DeviceConfigServer
dynamic_reconfigure::Server< DeviceConfig > DeviceConfigServer
Definition: RosDevice.hpp:104
astra_ros::RosDevice::point_cloud_pub_
ros::Publisher point_cloud_pub_
Definition: RosDevice.hpp:134
astra_ros::RosDevice::onGetIrImageStreamMode
bool onGetIrImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
Definition: RosDevice.cpp:664
astra_ros::Device::Frame::depth
boost::optional< Depth > depth
Definition: Device.hpp:150
astra_ros::Device::Configuration::IrStream::mirrored
boost::optional< Mirrored > mirrored
Definition: Device.hpp:227
astra_ros::RosDevice::onGetColorRunning
bool onGetColorRunning(GetRunning::Request &req, GetRunning::Response &res)
Definition: RosDevice.cpp:785
astra_ros::RosDevice::set_ir_image_stream_mode_svc_
ros::ServiceServer set_ir_image_stream_mode_svc_
Definition: RosDevice.hpp:160
ros::NodeHandle::hasParam
bool hasParam(const std::string &key) const
astra_ros::DEVICE_NAMESPACE
const std::string DEVICE_NAMESPACE
astra_ros::RosDevice::get_ir_exposure_svc_
ros::ServiceServer get_ir_exposure_svc_
Definition: RosDevice.hpp:145
astra_ros::Device::Configuration::MaskedColorStream::running
Running running
Definition: Device.hpp:313
astra_ros::Device::Configuration::on_frame
OnFrame on_frame
Definition: Device.hpp:323
astra_ros::RosDevice::body_frame_id
std::string body_frame_id
Definition: RosDevice.hpp:115
astra_ros::Device::Configuration::ColorizedBodyStream
Definition: Device.hpp:294
astra_ros::RosDevice::set_depth_registration_svc_
ros::ServiceServer set_depth_registration_svc_
Definition: RosDevice.hpp:157
astra_ros::RosDevice::onGetChipId
bool onGetChipId(GetChipId::Request &req, GetChipId::Response &res)
Definition: RosDevice.cpp:617
astra_ros::RosDevice::onGetDepthImageStreamModes
bool onGetDepthImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
Definition: RosDevice.cpp:692
astra_ros::RosDevice::body_mask_image_pub_
image_transport::Publisher body_mask_image_pub_
Definition: RosDevice.hpp:127
astra_ros::RosDevice::body_markers_pub_
ros::Publisher body_markers_pub_
Definition: RosDevice.hpp:133
astra_ros::RosDevice::onSetIrGain
bool onSetIrGain(SetIrGain::Request &req, SetIrGain::Response &res)
Definition: RosDevice.cpp:911
image_transport::Publisher::publish
void publish(const sensor_msgs::Image &message) const
astra_ros::RosDevice::get_depth_running_svc_
ros::ServiceServer get_depth_running_svc_
Definition: RosDevice.hpp:151
astra_ros::RosDevice::get_color_usb_info_svc_
ros::ServiceServer get_color_usb_info_svc_
Definition: RosDevice.hpp:154
astra_ros::Device::Configuration::DepthStream
Definition: Device.hpp:239
astra_ros::RosDevice::onSetDepthRunning
bool onSetDepthRunning(SetRunning::Request &req, SetRunning::Response &res)
Definition: RosDevice.cpp:963
astra_ros::RosDevice::name_
std::string name_
Definition: RosDevice.hpp:97
astra_ros::Device::Configuration::body_stream
boost::optional< BodyStream > body_stream
Definition: Device.hpp:348
astra_ros::Device::Configuration::ColorStream::running
Running running
Definition: Device.hpp:194
astra_ros::RosDevice::onDynamicReconfigure
void onDynamicReconfigure(DeviceConfig &config, uint32_t level)
Definition: RosDevice.cpp:576
astra_ros::RosDevice::get_color_image_stream_modes_svc_
ros::ServiceServer get_color_image_stream_modes_svc_
Definition: RosDevice.hpp:142
astra_ros::RosDevice::dynamic_reconfigure_server_
std::unique_ptr< DeviceConfigServer > dynamic_reconfigure_server_
Definition: RosDevice.hpp:108
astra_ros::Device::Configuration::colorized_body_stream
boost::optional< ColorizedBodyStream > colorized_body_stream
Definition: Device.hpp:356
astra_ros::Device::Configuration
Definition: Device.hpp:178
astra_ros::RosDevice::depth_camera_info_pub_
ros::Publisher depth_camera_info_pub_
Definition: RosDevice.hpp:122
astra_ros::RosDevice::get_depth_usb_info_svc_
ros::ServiceServer get_depth_usb_info_svc_
Definition: RosDevice.hpp:155
astra_ros::RosDevice::set_color_mirrored_svc_
ros::ServiceServer set_color_mirrored_svc_
Definition: RosDevice.hpp:163
astra_ros::RosDevice::onSetIrImageStreamMode
bool onSetIrImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
Definition: RosDevice.cpp:887
astra_ros::RosDevice::onSetDepthMirrored
bool onSetDepthMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
Definition: RosDevice.cpp:933
astra_ros::RosDevice::get_ir_image_stream_modes_svc_
ros::ServiceServer get_ir_image_stream_modes_svc_
Definition: RosDevice.hpp:144
astra_ros::Device::Configuration::DepthStream::d2c_mode
boost::optional< D2CMode > d2c_mode
Definition: Device.hpp:267
ros::Time
astra_ros::Device::Configuration::ir_stream
boost::optional< IrStream > ir_stream
Definition: Device.hpp:336
astra_ros::RosDevice::device_nh_
ros::NodeHandle device_nh_
Definition: RosDevice.hpp:99
astra_ros::Device::Configuration::BodyStream
Definition: Device.hpp:271
astra_ros::RosDevice::onGetIrRunning
bool onGetIrRunning(GetRunning::Request &req, GetRunning::Response &res)
Definition: RosDevice.cpp:803
std
astra_ros::RosDevice::get_chip_id_svc_
ros::ServiceServer get_chip_id_svc_
Definition: RosDevice.hpp:137
image_transport::Publisher
astra_ros::Device::Frame
Definition: Device.hpp:54
astra_ros::RosDevice::onGetDepthMirrored
bool onGetDepthMirrored(GetMirrored::Request &req, GetMirrored::Response &res)
Definition: RosDevice.cpp:759
astra_ros::RosDevice::getConfiguration
static Device::Configuration getConfiguration(ros::NodeHandle &nh)
Definition: RosDevice.cpp:208
astra_ros::RosDevice::onSetDepthImageStreamMode
bool onSetDepthImageStreamMode(SetImageStreamMode::Request &req, SetImageStreamMode::Response &res)
Definition: RosDevice.cpp:874
astra_ros::RosDevice::device_
Device::Ptr device_
Definition: RosDevice.hpp:117
astra_ros::Device::Configuration::uri
boost::optional< std::string > uri
Definition: Device.hpp:322
astra_ros::Device::Frame::body
boost::optional< Body > body
Definition: Device.hpp:155
astra_ros::RosDevice::publish_floor_mask
bool publish_floor_mask
Definition: RosDevice.hpp:114
astra_ros::RosDevice::onSetIrRunning
bool onSetIrRunning(SetRunning::Request &req, SetRunning::Response &res)
Definition: RosDevice.cpp:971
astra_ros::RosDevice::ir_image_pub_
image_transport::Publisher ir_image_pub_
Definition: RosDevice.hpp:125
astra_ros::Device::Configuration::color_stream
boost::optional< ColorStream > color_stream
Definition: Device.hpp:330
sensor_msgs::distortion_models::PLUMB_BOB
const std::string PLUMB_BOB
astra_ros::RosDevice::get_color_mirrored_svc_
ros::ServiceServer get_color_mirrored_svc_
Definition: RosDevice.hpp:147
header
const std::string header
astra_ros::RosDevice::update
void update()
Definition: RosDevice.cpp:203
astra_ros::RosDevice::onGetIrImageStreamModes
bool onGetIrImageStreamModes(GetImageStreamModes::Request &req, GetImageStreamModes::Response &res)
Definition: RosDevice.cpp:706
astra_ros::RosDevice::get_depth_image_stream_modes_svc_
ros::ServiceServer get_depth_image_stream_modes_svc_
Definition: RosDevice.hpp:143
astra_ros::RosDevice::get_ir_gain_svc_
ros::ServiceServer get_ir_gain_svc_
Definition: RosDevice.hpp:146
astra_ros::RosDevice::RosDevice
RosDevice(const std::string &name, ros::NodeHandle &nh, ros::NodeHandle &pnh)
Definition: RosDevice.cpp:81
astra_ros::RosDevice::set_depth_running_svc_
ros::ServiceServer set_depth_running_svc_
Definition: RosDevice.hpp:167
astra_ros::RosDevice::onGetDepthImageStreamMode
bool onGetDepthImageStreamMode(GetImageStreamMode::Request &req, GetImageStreamMode::Response &res)
Definition: RosDevice.cpp:651
astra_ros::Device::Configuration::ColorStream
Definition: Device.hpp:187
astra_ros::RosDevice::get_color_image_stream_mode_svc_
ros::ServiceServer get_color_image_stream_mode_svc_
Definition: RosDevice.hpp:139
astra_ros::RosDevice::set_depth_image_stream_mode_svc_
ros::ServiceServer set_depth_image_stream_mode_svc_
Definition: RosDevice.hpp:159
astra_ros::Device::Configuration::point_stream
boost::optional< PointStream > point_stream
Definition: Device.hpp:380
util.hpp
astra_ros::RosDevice::onSetIrMirrored
bool onSetIrMirrored(SetMirrored::Request &req, SetMirrored::Response &res)
Definition: RosDevice.cpp:944
ros::NodeHandle
astra_ros::RosDevice::floor_mask_image_pub_
image_transport::Publisher floor_mask_image_pub_
Definition: RosDevice.hpp:128
astra_ros::Device::Frame::color
boost::optional< Color > color
Definition: Device.hpp:140
astra_ros
Definition: Device.hpp:14
ros::Time::now
static Time now()
astra_ros::RosDevice::get_depth_registration_svc_
ros::ServiceServer get_depth_registration_svc_
Definition: RosDevice.hpp:138


astra_ros
Author(s): Braden McDorman
autogenerated on Wed Mar 2 2022 00:53:06