Intel® RealSense™ Cross Platform API
Intel Realsense Cross-platform API
rs_sensor.hpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #ifndef LIBREALSENSE_RS2_SENSOR_HPP
5 #define LIBREALSENSE_RS2_SENSOR_HPP
6 
7 #include "rs_types.hpp"
8 #include "rs_frame.hpp"
9 #include "rs_processing.hpp"
10 #include "rs_options.hpp"
11 namespace rs2
12 {
13 
15  {
16  public:
18  {
19  rs2_error* e = nullptr;
20  _description = rs2_get_notification_description(nt, &e);
21  error::handle(e);
22  _timestamp = rs2_get_notification_timestamp(nt, &e);
23  error::handle(e);
24  _severity = rs2_get_notification_severity(nt, &e);
25  error::handle(e);
26  _category = rs2_get_notification_category(nt, &e);
27  error::handle(e);
28  _serialized_data = rs2_get_notification_serialized_data(nt, &e);
29  error::handle(e);
30  }
31 
32  notification() = default;
33 
39  {
40  return _category;
41  }
46  std::string get_description() const
47  {
48  return _description;
49  }
50 
55  double get_timestamp() const
56  {
57  return _timestamp;
58  }
59 
65  {
66  return _severity;
67  }
68 
73  std::string get_serialized_data() const
74  {
75  return _serialized_data;
76  }
77 
78  private:
79  std::string _description;
80  double _timestamp = -1;
83  std::string _serialized_data;
84  };
85 
86  template<class T>
88  {
89  T on_notification_function;
90  public:
91  explicit notifications_callback(T on_notification) : on_notification_function(on_notification) {}
92 
93  void on_notification(rs2_notification* _notification) override
94  {
95  on_notification_function(notification{ _notification });
96  }
97 
98  void release() override { delete this; }
99  };
100 
101 
102 
103  class sensor : public options
104  {
105  public:
106 
107  using options::supports;
112  void open(const stream_profile& profile) const
113  {
114  rs2_error* e = nullptr;
115  rs2_open(_sensor.get(),
116  profile.get(),
117  &e);
118  error::handle(e);
119  }
120 
126  bool supports(rs2_camera_info info) const
127  {
128  rs2_error* e = nullptr;
129  auto is_supported = rs2_supports_sensor_info(_sensor.get(), info, &e);
130  error::handle(e);
131  return is_supported > 0;
132  }
133 
139  const char* get_info(rs2_camera_info info) const
140  {
141  rs2_error* e = nullptr;
142  auto result = rs2_get_sensor_info(_sensor.get(), info, &e);
143  error::handle(e);
144  return result;
145  }
146 
152  void open(const std::vector<stream_profile>& profiles) const
153  {
154  rs2_error* e = nullptr;
155 
156  std::vector<const rs2_stream_profile*> profs;
157  profs.reserve(profiles.size());
158  for (auto& p : profiles)
159  {
160  profs.push_back(p.get());
161  }
162 
164  profs.data(),
165  static_cast<int>(profiles.size()),
166  &e);
167  error::handle(e);
168  }
169 
174  void close() const
175  {
176  rs2_error* e = nullptr;
177  rs2_close(_sensor.get(), &e);
178  error::handle(e);
179  }
180 
185  template<class T>
186  void start(T callback) const
187  {
188  rs2_error* e = nullptr;
189  rs2_start_cpp(_sensor.get(), new frame_callback<T>(std::move(callback)), &e);
190  error::handle(e);
191  }
192 
196  void stop() const
197  {
198  rs2_error* e = nullptr;
199  rs2_stop(_sensor.get(), &e);
200  error::handle(e);
201  }
202 
207  template<class T>
208  void set_notifications_callback(T callback) const
209  {
210  rs2_error* e = nullptr;
212  new notifications_callback<T>(std::move(callback)), &e);
213  error::handle(e);
214  }
215 
216 
221  std::vector<stream_profile> get_stream_profiles() const
222  {
223  std::vector<stream_profile> results{};
224 
225  rs2_error* e = nullptr;
226  std::shared_ptr<rs2_stream_profile_list> list(
227  rs2_get_stream_profiles(_sensor.get(), &e),
229  error::handle(e);
230 
231  auto size = rs2_get_stream_profiles_count(list.get(), &e);
232  error::handle(e);
233 
234  for (auto i = 0; i < size; i++)
235  {
236  stream_profile profile(rs2_get_stream_profile(list.get(), i, &e));
237  error::handle(e);
238  results.push_back(profile);
239  }
240 
241  return results;
242  }
243 
248  std::vector<filter> get_recommended_filters() const
249  {
250  std::vector<filter> results{};
251 
252  rs2_error* e = nullptr;
253  std::shared_ptr<rs2_processing_block_list> list(
256  error::handle(e);
257 
258  auto size = rs2_get_recommended_processing_blocks_count(list.get(), &e);
259  error::handle(e);
260 
261  for (auto i = 0; i < size; i++)
262  {
263  auto f = std::shared_ptr<rs2_processing_block>(
264  rs2_get_processing_block(list.get(), i, &e),
266  error::handle(e);
267  results.push_back(f);
268  }
269 
270  return results;
271  }
272 
273  sensor& operator=(const std::shared_ptr<rs2_sensor> other)
274  {
275  options::operator=(other);
276  _sensor.reset();
277  _sensor = other;
278  return *this;
279  }
280 
281  sensor& operator=(const sensor& other)
282  {
283  *this = nullptr;
285  _sensor = other._sensor;
286  return *this;
287  }
288  sensor() : _sensor(nullptr) {}
289 
290  operator bool() const
291  {
292  return _sensor != nullptr;
293  }
294 
295  const std::shared_ptr<rs2_sensor>& get() const
296  {
297  return _sensor;
298  }
299 
300  template<class T>
301  bool is() const
302  {
303  T extension(*this);
304  return extension;
305  }
306 
307  template<class T>
308  T as() const
309  {
310  T extension(*this);
311  return extension;
312  }
313 
314  explicit sensor(std::shared_ptr<rs2_sensor> dev)
315  :options((rs2_options*)dev.get()), _sensor(dev)
316  {
317  }
318  explicit operator std::shared_ptr<rs2_sensor>() { return _sensor; }
319 
320  protected:
321  friend context;
322  friend device_list;
323  friend device;
324  friend device_base;
325  friend roi_sensor;
326 
327  std::shared_ptr<rs2_sensor> _sensor;
328 
329 
330  };
331 
332  inline std::shared_ptr<sensor> sensor_from_frame(frame f)
333  {
334  std::shared_ptr<rs2_sensor> psens(f.get_sensor(), rs2_delete_sensor);
335  return std::make_shared<sensor>(psens);
336  }
337 
338  inline bool operator==(const sensor& lhs, const sensor& rhs)
339  {
342  return false;
343 
344  return std::string(lhs.get_info(RS2_CAMERA_INFO_NAME)) == rhs.get_info(RS2_CAMERA_INFO_NAME)
346  }
347 
348  class roi_sensor : public sensor
349  {
350  public:
352  : sensor(s.get())
353  {
354  rs2_error* e = nullptr;
355  if(rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_ROI, &e) == 0 && !e)
356  {
357  _sensor.reset();
358  }
359  error::handle(e);
360  }
361 
363  {
364  rs2_error* e = nullptr;
365  rs2_set_region_of_interest(_sensor.get(), roi.min_x, roi.min_y, roi.max_x, roi.max_y, &e);
366  error::handle(e);
367  }
368 
370  {
371  region_of_interest roi {};
372  rs2_error* e = nullptr;
373  rs2_get_region_of_interest(_sensor.get(), &roi.min_x, &roi.min_y, &roi.max_x, &roi.max_y, &e);
374  error::handle(e);
375  return roi;
376  }
377 
378  operator bool() const { return _sensor.get() != nullptr; }
379  };
380 
381  class depth_sensor : public sensor
382  {
383  public:
385  : sensor(s.get())
386  {
387  rs2_error* e = nullptr;
389  {
390  _sensor.reset();
391  }
392  error::handle(e);
393  }
394 
398  float get_depth_scale() const
399  {
400  rs2_error* e = nullptr;
401  auto res = rs2_get_depth_scale(_sensor.get(), &e);
402  error::handle(e);
403  return res;
404  }
405 
406  operator bool() const { return _sensor.get() != nullptr; }
407  explicit depth_sensor(std::shared_ptr<rs2_sensor> dev) : depth_sensor(sensor(dev)) {}
408  };
409 
411  {
412  public:
414  {
415  rs2_error* e = nullptr;
417  {
418  _sensor.reset();
419  }
420  error::handle(e);
421  }
422 
426  float get_stereo_baseline() const
427  {
428  rs2_error* e = nullptr;
429  auto res = rs2_get_stereo_baseline(_sensor.get(), &e);
430  error::handle(e);
431  return res;
432  }
433 
434  operator bool() const { return _sensor.get() != nullptr; }
435  };
436 
437 
438  class pose_sensor : public sensor
439  {
440  public:
442  : sensor(s.get())
443  {
444  rs2_error* e = nullptr;
446  {
447  _sensor.reset();
448  }
449  error::handle(e);
450  }
451 
461  bool import_localization_map(const std::vector<uint8_t>& lmap_buf) const
462  {
463  rs2_error* e = nullptr;
464  auto res = rs2_import_localization_map(_sensor.get(), lmap_buf.data(), uint32_t(lmap_buf.size()), &e);
465  error::handle(e);
466  return !!res;
467  }
468 
474  std::vector<uint8_t> export_localization_map() const
475  {
476  rs2_error* e = nullptr;
477  std::shared_ptr<const rs2_raw_data_buffer> loc_map(
480  error::handle(e);
481 
482  auto start = rs2_get_raw_data(loc_map.get(), &e);
483  error::handle(e);
484 
485  std::vector<uint8_t> results;
486  if (start)
487  {
488  auto size = rs2_get_raw_data_size(loc_map.get(), &e);
489  error::handle(e);
490 
491  results = std::vector<uint8_t>(start, start + size);
492  }
493  return results;
494  }
495 
506  bool set_static_node(const std::string& guid, const rs2_vector& pos, const rs2_quaternion& orient) const
507  {
508  rs2_error* e = nullptr;
509  auto res = rs2_set_static_node(_sensor.get(), guid.c_str(), pos, orient, &e);
510  error::handle(e);
511  return !!res;
512  }
513 
514 
526  bool get_static_node(const std::string& guid, rs2_vector& pos, rs2_quaternion& orient) const
527  {
528  rs2_error* e = nullptr;
529  auto res = rs2_get_static_node(_sensor.get(), guid.c_str(), &pos, &orient, &e);
530  error::handle(e);
531  return !!res;
532  }
533 
534  operator bool() const { return _sensor.get() != nullptr; }
535  explicit pose_sensor(std::shared_ptr<rs2_sensor> dev) : pose_sensor(sensor(dev)) {}
536  };
537 
538  class wheel_odometer : public sensor
539  {
540  public:
542  : sensor(s.get())
543  {
544  rs2_error* e = nullptr;
546  {
547  _sensor.reset();
548  }
549  error::handle(e);
550  }
551 
556  bool load_wheel_odometery_config(const std::vector<uint8_t>& odometry_config_buf) const
557  {
558  rs2_error* e = nullptr;
559  auto res = rs2_load_wheel_odometry_config(_sensor.get(), odometry_config_buf.data(), uint32_t(odometry_config_buf.size()), &e);
560  error::handle(e);
561  return !!res;
562  }
563 
570  bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector& translational_velocity)
571  {
572  rs2_error* e = nullptr;
573  auto res = rs2_send_wheel_odometry(_sensor.get(), wo_sensor_id, frame_num, translational_velocity, &e);
574  error::handle(e);
575  return !!res;
576  }
577 
578  operator bool() const { return _sensor.get() != nullptr; }
579  explicit wheel_odometer(std::shared_ptr<rs2_sensor> dev) : wheel_odometer(sensor(dev)) {}
580  };
581 }
582 #endif // LIBREALSENSE_RS2_SENSOR_HPP
rs2::sensor_from_frame
std::shared_ptr< sensor > sensor_from_frame(frame f)
Definition: rs_sensor.hpp:332
rs2_get_region_of_interest
void rs2_get_region_of_interest(const rs2_sensor *sensor, int *min_x, int *min_y, int *max_x, int *max_y, rs2_error **error)
gets the active region of interest to be used by auto-exposure algorithm
rs2_get_static_node
int rs2_get_static_node(const rs2_sensor *sensor, const char *guid, rs2_vector *pos, rs2_quaternion *orient, rs2_error **error)
rs2_is_sensor_extendable_to
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
rs2_vector
3D vector in Euclidean coordinate space
Definition: rs_types.h:97
rs2::depth_sensor::get_depth_scale
float get_depth_scale() const
Definition: rs_sensor.hpp:398
rs2_get_stereo_baseline
float rs2_get_stereo_baseline(rs2_sensor *sensor, rs2_error **error)
rs2::depth_stereo_sensor::get_stereo_baseline
float get_stereo_baseline() const
Definition: rs_sensor.hpp:426
rs2_get_raw_data
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs2::sensor::open
void open(const stream_profile &profile) const
Definition: rs_sensor.hpp:112
RS2_NOTIFICATION_CATEGORY_COUNT
@ RS2_NOTIFICATION_CATEGORY_COUNT
Definition: rs_types.h:25
rs2_get_notification_category
rs2_notification_category rs2_get_notification_category(rs2_notification *notification, rs2_error **error)
rs2_quaternion
Quaternion used to represent rotation
Definition: rs_types.h:103
rs2::frame
Definition: rs_frame.hpp:336
rs2::wheel_odometer
Definition: rs_sensor.hpp:538
rs2::sensor::roi_sensor
friend roi_sensor
Definition: rs_sensor.hpp:325
rs2::stream_profile
Definition: rs_frame.hpp:22
RS2_EXTENSION_POSE_SENSOR
@ RS2_EXTENSION_POSE_SENSOR
Definition: rs_types.h:169
rs2::frame::get_sensor
rs2_sensor * get_sensor()
Definition: rs_frame.hpp:438
RS2_CAMERA_INFO_SERIAL_NUMBER
@ RS2_CAMERA_INFO_SERIAL_NUMBER
Definition: rs_sensor.h:24
rs2::depth_stereo_sensor
Definition: rs_sensor.hpp:410
rs2::region_of_interest::min_x
int min_x
Definition: rs_types.hpp:170
rs2::sensor::get_stream_profiles
std::vector< stream_profile > get_stream_profiles() const
Definition: rs_sensor.hpp:221
rs2::sensor::supports
bool supports(rs2_camera_info info) const
Definition: rs_sensor.hpp:126
rs2::sensor::sensor
sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:314
rs2_set_notifications_callback_cpp
void rs2_set_notifications_callback_cpp(const rs2_sensor *sensor, rs2_notifications_callback *callback, rs2_error **error)
rs2_get_processing_block
rs2_processing_block * rs2_get_processing_block(const rs2_processing_block_list *list, int index, rs2_error **error)
rs2::pose_sensor::set_static_node
bool set_static_node(const std::string &guid, const rs2_vector &pos, const rs2_quaternion &orient) const
Definition: rs_sensor.hpp:506
rs2::sensor::set_notifications_callback
void set_notifications_callback(T callback) const
Definition: rs_sensor.hpp:208
rs2::options
Definition: rs_options.hpp:11
rs2::sensor::device_list
friend device_list
Definition: rs_sensor.hpp:322
rs2_set_static_node
int rs2_set_static_node(const rs2_sensor *sensor, const char *guid, const rs2_vector pos, const rs2_quaternion orient, rs2_error **error)
rs2_get_sensor_info
const char * rs2_get_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
rs2::wheel_odometer::wheel_odometer
wheel_odometer(sensor s)
Definition: rs_sensor.hpp:541
rs2::sensor::open
void open(const std::vector< stream_profile > &profiles) const
Definition: rs_sensor.hpp:152
rs2_delete_raw_data
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
rs2::notification::get_category
rs2_notification_category get_category() const
Definition: rs_sensor.hpp:38
rs2_close
void rs2_close(const rs2_sensor *sensor, rs2_error **error)
rs2::notifications_callback
Definition: rs_sensor.hpp:87
rs2::depth_sensor::depth_sensor
depth_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:407
rs2::roi_sensor::set_region_of_interest
void set_region_of_interest(const region_of_interest &roi)
Definition: rs_sensor.hpp:362
rs2_notifications_callback
Definition: rs_types.hpp:39
rs2::sensor::device
friend device
Definition: rs_sensor.hpp:323
rs2::notification::notification
notification(rs2_notification *nt)
Definition: rs_sensor.hpp:17
rs2_get_raw_data_size
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
rs2::sensor::close
void close() const
Definition: rs_sensor.hpp:174
rs2_log_severity
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:121
rs2::wheel_odometer::wheel_odometer
wheel_odometer(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:579
rs2::region_of_interest::max_y
int max_y
Definition: rs_types.hpp:173
rs2_get_stream_profiles
rs2_stream_profile_list * rs2_get_stream_profiles(rs2_sensor *device, rs2_error **error)
RS2_CAMERA_INFO_NAME
@ RS2_CAMERA_INFO_NAME
Definition: rs_sensor.h:23
rs2_delete_recommended_processing_blocks
void rs2_delete_recommended_processing_blocks(rs2_processing_block_list *list)
rs2_open_multiple
void rs2_open_multiple(rs2_sensor *device, const rs2_stream_profile **profiles, int count, rs2_error **error)
rs2_start_cpp
void rs2_start_cpp(const rs2_sensor *sensor, rs2_frame_callback *callback, rs2_error **error)
rs2_set_region_of_interest
void rs2_set_region_of_interest(const rs2_sensor *sensor, int min_x, int min_y, int max_x, int max_y, rs2_error **error)
sets the active region of interest to be used by auto-exposure algorithm
rs2::roi_sensor::get_region_of_interest
region_of_interest get_region_of_interest() const
Definition: rs_sensor.hpp:369
rs2::notification::get_serialized_data
std::string get_serialized_data() const
Definition: rs_sensor.hpp:73
rs2::wheel_odometer::send_wheel_odometry
bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector &translational_velocity)
Definition: rs_sensor.hpp:570
rs2::sensor::device_base
friend device_base
Definition: rs_sensor.hpp:324
rs2_notification
struct rs2_notification rs2_notification
Definition: rs_types.h:238
rs2_get_notification_serialized_data
const char * rs2_get_notification_serialized_data(rs2_notification *notification, rs2_error **error)
rs2::sensor::sensor
sensor()
Definition: rs_sensor.hpp:288
rs_options.hpp
rs2_get_recommended_processing_blocks_count
int rs2_get_recommended_processing_blocks_count(const rs2_processing_block_list *list, rs2_error **error)
RS2_EXTENSION_ROI
@ RS2_EXTENSION_ROI
Definition: rs_types.h:141
rs2::sensor::operator=
sensor & operator=(const std::shared_ptr< rs2_sensor > other)
Definition: rs_sensor.hpp:273
rs2_delete_sensor
void rs2_delete_sensor(rs2_sensor *sensor)
rs2::wheel_odometer::load_wheel_odometery_config
bool load_wheel_odometery_config(const std::vector< uint8_t > &odometry_config_buf) const
Definition: rs_sensor.hpp:556
rs2_options
struct rs2_options rs2_options
Definition: rs_types.h:235
rs2::depth_sensor
Definition: rs_sensor.hpp:381
rs2::notifications_callback::on_notification
void on_notification(rs2_notification *_notification) override
Definition: rs_sensor.hpp:93
rs2::sensor::context
friend context
Definition: rs_sensor.hpp:321
rs2::options::supports
bool supports(rs2_option option) const
Definition: rs_options.hpp:19
RS2_EXTENSION_DEPTH_STEREO_SENSOR
@ RS2_EXTENSION_DEPTH_STEREO_SENSOR
Definition: rs_types.h:152
rs2::pose_sensor::get_static_node
bool get_static_node(const std::string &guid, rs2_vector &pos, rs2_quaternion &orient) const
Definition: rs_sensor.hpp:526
rs2
Definition: rs_context.hpp:11
rs2::sensor::is
bool is() const
Definition: rs_sensor.hpp:301
rs2::sensor
Definition: rs_sensor.hpp:103
rs2_delete_processing_block
void rs2_delete_processing_block(rs2_processing_block *block)
rs2::notification
Definition: rs_sensor.hpp:14
rs2::sensor::get_recommended_filters
std::vector< filter > get_recommended_filters() const
Definition: rs_sensor.hpp:248
rs2::depth_stereo_sensor::depth_stereo_sensor
depth_stereo_sensor(sensor s)
Definition: rs_sensor.hpp:413
rs2::region_of_interest
Definition: rs_types.hpp:168
rs_frame.hpp
rs2::stream_profile::get
const rs2_stream_profile * get() const
Definition: rs_frame.hpp:137
rs2::roi_sensor::roi_sensor
roi_sensor(sensor s)
Definition: rs_sensor.hpp:351
rs2_get_recommended_processing_blocks
rs2_processing_block_list * rs2_get_recommended_processing_blocks(rs2_sensor *sensor, rs2_error **error)
RS2_EXTENSION_DEPTH_SENSOR
@ RS2_EXTENSION_DEPTH_SENSOR
Definition: rs_types.h:142
rs2::operator==
bool operator==(const sensor &lhs, const sensor &rhs)
Definition: rs_sensor.hpp:338
rs2::pose_sensor::pose_sensor
pose_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:535
rs_processing.hpp
rs2::sensor::operator=
sensor & operator=(const sensor &other)
Definition: rs_sensor.hpp:281
rs2::options::operator=
options & operator=(const options &other)
Definition: rs_options.hpp:135
rs2::sensor::stop
void stop() const
Definition: rs_sensor.hpp:196
rs2::sensor::get_info
const char * get_info(rs2_camera_info info) const
Definition: rs_sensor.hpp:139
rs2::sensor::get
const std::shared_ptr< rs2_sensor > & get() const
Definition: rs_sensor.hpp:295
rs2_camera_info
rs2_camera_info
Read-only strings that can be queried from the device. Not all information attributes are available o...
Definition: rs_sensor.h:22
RS2_EXTENSION_WHEEL_ODOMETER
@ RS2_EXTENSION_WHEEL_ODOMETER
Definition: rs_types.h:170
rs2::region_of_interest::min_y
int min_y
Definition: rs_types.hpp:171
rs2::pose_sensor::pose_sensor
pose_sensor(sensor s)
Definition: rs_sensor.hpp:441
rs2::sensor::_sensor
std::shared_ptr< rs2_sensor > _sensor
Definition: rs_sensor.hpp:327
rs2_supports_sensor_info
int rs2_supports_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
rs2_get_stream_profile
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
rs2_get_notification_severity
rs2_log_severity rs2_get_notification_severity(rs2_notification *notification, rs2_error **error)
rs2_open
void rs2_open(rs2_sensor *device, const rs2_stream_profile *profile, rs2_error **error)
rs2_get_notification_timestamp
rs2_time_t rs2_get_notification_timestamp(rs2_notification *notification, rs2_error **error)
rs2_import_localization_map
int rs2_import_localization_map(const rs2_sensor *sensor, const unsigned char *lmap_blob, unsigned int blob_size, rs2_error **error)
rs2_get_depth_scale
float rs2_get_depth_scale(rs2_sensor *sensor, rs2_error **error)
rs2::sensor::as
T as() const
Definition: rs_sensor.hpp:308
rs2::notifications_callback::notifications_callback
notifications_callback(T on_notification)
Definition: rs_sensor.hpp:91
rs2::pose_sensor
Definition: rs_sensor.hpp:438
rs2_send_wheel_odometry
int rs2_send_wheel_odometry(const rs2_sensor *sensor, char wo_sensor_id, unsigned int frame_num, const rs2_vector translational_velocity, rs2_error **error)
rs2::error::handle
static void handle(rs2_error *e)
Definition: rs_types.hpp:128
rs2::pose_sensor::export_localization_map
std::vector< uint8_t > export_localization_map() const
Definition: rs_sensor.hpp:474
rs2::frame_callback
Definition: rs_frame.hpp:1123
rs2_load_wheel_odometry_config
int rs2_load_wheel_odometry_config(const rs2_sensor *sensor, const unsigned char *odometry_config_buf, unsigned int blob_size, rs2_error **error)
rs2_export_localization_map
const rs2_raw_data_buffer * rs2_export_localization_map(const rs2_sensor *sensor, rs2_error **error)
rs2::notification::get_timestamp
double get_timestamp() const
Definition: rs_sensor.hpp:55
rs2_delete_stream_profiles_list
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
rs2_get_notification_description
const char * rs2_get_notification_description(rs2_notification *notification, rs2_error **error)
RS2_LOG_SEVERITY_COUNT
@ RS2_LOG_SEVERITY_COUNT
Definition: rs_types.h:128
rs2::pose_sensor::import_localization_map
bool import_localization_map(const std::vector< uint8_t > &lmap_buf) const
Definition: rs_sensor.hpp:461
rs2::notifications_callback::release
void release() override
Definition: rs_sensor.hpp:98
rs2::notification::get_description
std::string get_description() const
Definition: rs_sensor.hpp:46
rs2::sensor::start
void start(T callback) const
Definition: rs_sensor.hpp:186
rs2::notification::notification
notification()=default
rs2::region_of_interest::max_x
int max_x
Definition: rs_types.hpp:172
rs2_stop
void rs2_stop(const rs2_sensor *sensor, rs2_error **error)
rs2_get_stream_profiles_count
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)
rs2_error
struct rs2_error rs2_error
Definition: rs_types.h:211
rs2::roi_sensor
Definition: rs_sensor.hpp:348
rs2_notification_category
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
rs2::depth_sensor::depth_sensor
depth_sensor(sensor s)
Definition: rs_sensor.hpp:384
rs2::notification::get_severity
rs2_log_severity get_severity() const
Definition: rs_sensor.hpp:64
rs_types.hpp