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;
21  error::handle(e);
23  error::handle(e);
25  error::handle(e);
27  error::handle(e);
29  error::handle(e);
30  }
31 
32  notification() = default;
33 
39  {
40  return _category;
41  }
47  {
48  return _description;
49  }
50 
55  double get_timestamp() const
56  {
57  return _timestamp;
58  }
59 
65  {
66  return _severity;
67  }
68 
74  {
75  return _serialized_data;
76  }
77 
78  private:
80  double _timestamp = -1;
84  };
85 
86  template<class T>
88  {
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  class sensor : public options
103  {
104  public:
105 
106  using options::supports;
111  void open(const stream_profile& profile) const
112  {
113  rs2_error* e = nullptr;
114  rs2_open(_sensor.get(),
115  profile.get(),
116  &e);
117  error::handle(e);
118  }
119 
126  {
127  rs2_error* e = nullptr;
128  auto is_supported = rs2_supports_sensor_info(_sensor.get(), info, &e);
129  error::handle(e);
130  return is_supported > 0;
131  }
132 
138  const char* get_info(rs2_camera_info info) const
139  {
140  rs2_error* e = nullptr;
141  auto result = rs2_get_sensor_info(_sensor.get(), info, &e);
142  error::handle(e);
143  return result;
144  }
145 
151  void open(const std::vector<stream_profile>& profiles) const
152  {
153  rs2_error* e = nullptr;
154 
155  std::vector<const rs2_stream_profile*> profs;
156  profs.reserve(profiles.size());
157  for (auto& p : profiles)
158  {
159  profs.push_back(p.get());
160  }
161 
162  rs2_open_multiple(_sensor.get(),
163  profs.data(),
164  static_cast<int>(profiles.size()),
165  &e);
166  error::handle(e);
167  }
168 
173  void close() const
174  {
175  rs2_error* e = nullptr;
176  rs2_close(_sensor.get(), &e);
177  error::handle(e);
178  }
179 
184  template<class T>
185  void start(T callback) const
186  {
187  rs2_error* e = nullptr;
188  rs2_start_cpp(_sensor.get(), new frame_callback<T>(std::move(callback)), &e);
189  error::handle(e);
190  }
191 
195  void stop() const
196  {
197  rs2_error* e = nullptr;
198  rs2_stop(_sensor.get(), &e);
199  error::handle(e);
200  }
201 
206  template<class T>
208  {
209  rs2_error* e = nullptr;
211  new notifications_callback<T>(std::move(callback)), &e);
212  error::handle(e);
213  }
214 
219  std::vector<stream_profile> get_stream_profiles() const
220  {
221  std::vector<stream_profile> results{};
222 
223  rs2_error* e = nullptr;
224  std::shared_ptr<rs2_stream_profile_list> list(
225  rs2_get_stream_profiles(_sensor.get(), &e),
227  error::handle(e);
228 
229  auto size = rs2_get_stream_profiles_count(list.get(), &e);
230  error::handle(e);
231 
232  for (auto i = 0; i < size; i++)
233  {
235  error::handle(e);
236  results.push_back(profile);
237  }
238 
239  return results;
240  }
241 
246  std::vector<stream_profile> get_active_streams() const
247  {
248  std::vector<stream_profile> results{};
249 
250  rs2_error* e = nullptr;
251  std::shared_ptr<rs2_stream_profile_list> list(
252  rs2_get_active_streams(_sensor.get(), &e),
254  error::handle(e);
255 
256  auto size = rs2_get_stream_profiles_count(list.get(), &e);
257  error::handle(e);
258 
259  for (auto i = 0; i < size; i++)
260  {
262  error::handle(e);
263  results.push_back(profile);
264  }
265 
266  return results;
267  }
268 
273  std::vector<filter> get_recommended_filters() const
274  {
275  std::vector<filter> results{};
276 
277  rs2_error* e = nullptr;
278  std::shared_ptr<rs2_processing_block_list> list(
279  rs2_get_recommended_processing_blocks(_sensor.get(), &e),
281  error::handle(e);
282 
284  error::handle(e);
285 
286  for (auto i = 0; i < size; i++)
287  {
288  auto f = std::shared_ptr<rs2_processing_block>(
289  rs2_get_processing_block(list.get(), i, &e),
291  error::handle(e);
292  results.push_back(f);
293  }
294 
295  return results;
296  }
297 
298  sensor& operator=(const std::shared_ptr<rs2_sensor> other)
299  {
300  options::operator=(other);
301  _sensor.reset();
302  _sensor = other;
303  return *this;
304  }
305 
306  sensor& operator=(const sensor& other)
307  {
308  *this = nullptr;
310  _sensor = other._sensor;
311  return *this;
312  }
313  sensor() : _sensor(nullptr) {}
314 
315  operator bool() const
316  {
317  return _sensor != nullptr;
318  }
319 
320  const std::shared_ptr<rs2_sensor>& get() const
321  {
322  return _sensor;
323  }
324 
325  template<class T>
326  bool is() const
327  {
328  T extension(*this);
329  return extension;
330  }
331 
332  template<class T>
333  T as() const
334  {
335  T extension(*this);
336  return extension;
337  }
338 
339  explicit sensor(std::shared_ptr<rs2_sensor> dev)
340  :options((rs2_options*)dev.get()), _sensor(dev)
341  {
342  }
343  explicit operator std::shared_ptr<rs2_sensor>() { return _sensor; }
344 
345  protected:
346  friend context;
347  friend device_list;
348  friend device;
349  friend device_base;
350  friend roi_sensor;
351 
352  std::shared_ptr<rs2_sensor> _sensor;
353 
354 
355  };
356 
357  inline std::shared_ptr<sensor> sensor_from_frame(frame f)
358  {
359  std::shared_ptr<rs2_sensor> psens(f.get_sensor(), rs2_delete_sensor);
360  return std::make_shared<sensor>(psens);
361  }
362 
363  inline bool operator==(const sensor& lhs, const sensor& rhs)
364  {
367  return false;
368 
371  }
372 
373  class color_sensor : public sensor
374  {
375  public:
377  : sensor(s.get())
378  {
379  rs2_error* e = nullptr;
380  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_COLOR_SENSOR, &e) == 0 && !e)
381  {
382  _sensor.reset();
383  }
384  error::handle(e);
385  }
386  operator bool() const { return _sensor.get() != nullptr; }
387  };
388 
389  class motion_sensor : public sensor
390  {
391  public:
393  : sensor(s.get())
394  {
395  rs2_error* e = nullptr;
396  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_MOTION_SENSOR, &e) == 0 && !e)
397  {
398  _sensor.reset();
399  }
400  error::handle(e);
401  }
402  operator bool() const { return _sensor.get() != nullptr; }
403  };
404 
405  class fisheye_sensor : public sensor
406  {
407  public:
409  : sensor(s.get())
410  {
411  rs2_error* e = nullptr;
412  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_FISHEYE_SENSOR, &e) == 0 && !e)
413  {
414  _sensor.reset();
415  }
416  error::handle(e);
417  }
418  operator bool() const { return _sensor.get() != nullptr; }
419  };
420 
421  class roi_sensor : public sensor
422  {
423  public:
425  : sensor(s.get())
426  {
427  rs2_error* e = nullptr;
428  if(rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_ROI, &e) == 0 && !e)
429  {
430  _sensor.reset();
431  }
432  error::handle(e);
433  }
434 
436  {
437  rs2_error* e = nullptr;
438  rs2_set_region_of_interest(_sensor.get(), roi.min_x, roi.min_y, roi.max_x, roi.max_y, &e);
439  error::handle(e);
440  }
441 
443  {
444  region_of_interest roi {};
445  rs2_error* e = nullptr;
446  rs2_get_region_of_interest(_sensor.get(), &roi.min_x, &roi.min_y, &roi.max_x, &roi.max_y, &e);
447  error::handle(e);
448  return roi;
449  }
450 
451  operator bool() const { return _sensor.get() != nullptr; }
452  };
453 
454  class depth_sensor : public sensor
455  {
456  public:
458  : sensor(s.get())
459  {
460  rs2_error* e = nullptr;
461  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_DEPTH_SENSOR, &e) == 0 && !e)
462  {
463  _sensor.reset();
464  }
465  error::handle(e);
466  }
467 
471  float get_depth_scale() const
472  {
473  rs2_error* e = nullptr;
474  auto res = rs2_get_depth_scale(_sensor.get(), &e);
475  error::handle(e);
476  return res;
477  }
478 
479  operator bool() const { return _sensor.get() != nullptr; }
480  explicit depth_sensor(std::shared_ptr<rs2_sensor> dev) : depth_sensor(sensor(dev)) {}
481  };
482 
484  {
485  public:
487  {
488  rs2_error* e = nullptr;
489  if (_sensor && rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_DEPTH_STEREO_SENSOR, &e) == 0 && !e)
490  {
491  _sensor.reset();
492  }
493  error::handle(e);
494  }
495 
499  float get_stereo_baseline() const
500  {
501  rs2_error* e = nullptr;
502  auto res = rs2_get_stereo_baseline(_sensor.get(), &e);
503  error::handle(e);
504  return res;
505  }
506 
507  operator bool() const { return _sensor.get() != nullptr; }
508  };
509 
510 
511  class pose_sensor : public sensor
512  {
513  public:
515  : sensor(s.get())
516  {
517  rs2_error* e = nullptr;
518  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_POSE_SENSOR, &e) == 0 && !e)
519  {
520  _sensor.reset();
521  }
522  error::handle(e);
523  }
524 
534  bool import_localization_map(const std::vector<uint8_t>& lmap_buf) const
535  {
536  rs2_error* e = nullptr;
537  auto res = rs2_import_localization_map(_sensor.get(), lmap_buf.data(), uint32_t(lmap_buf.size()), &e);
538  error::handle(e);
539  return !!res;
540  }
541 
547  std::vector<uint8_t> export_localization_map() const
548  {
549  std::vector<uint8_t> results;
550  rs2_error* e = nullptr;
551  const rs2_raw_data_buffer *map = rs2_export_localization_map(_sensor.get(), &e);
552  error::handle(e);
553  std::shared_ptr<const rs2_raw_data_buffer> loc_map(map, rs2_delete_raw_data);
554 
555  auto start = rs2_get_raw_data(loc_map.get(), &e);
556  error::handle(e);
557 
558  if (start)
559  {
560  auto size = rs2_get_raw_data_size(loc_map.get(), &e);
561  error::handle(e);
562 
563  results = std::vector<uint8_t>(start, start + size);
564  }
565  return results;
566  }
567 
578  bool set_static_node(const std::string& guid, const rs2_vector& pos, const rs2_quaternion& orient) const
579  {
580  rs2_error* e = nullptr;
581  auto res = rs2_set_static_node(_sensor.get(), guid.c_str(), pos, orient, &e);
582  error::handle(e);
583  return !!res;
584  }
585 
586 
598  bool get_static_node(const std::string& guid, rs2_vector& pos, rs2_quaternion& orient) const
599  {
600  rs2_error* e = nullptr;
601  auto res = rs2_get_static_node(_sensor.get(), guid.c_str(), &pos, &orient, &e);
602  error::handle(e);
603  return !!res;
604  }
605 
610  bool remove_static_node(const std::string& guid) const
611  {
612  rs2_error* e = nullptr;
613  auto res = rs2_remove_static_node(_sensor.get(), guid.c_str(), &e);
614  error::handle(e);
615  return !!res;
616  }
617 
618  operator bool() const { return _sensor.get() != nullptr; }
619  explicit pose_sensor(std::shared_ptr<rs2_sensor> dev) : pose_sensor(sensor(dev)) {}
620  };
621 
622  class wheel_odometer : public sensor
623  {
624  public:
626  : sensor(s.get())
627  {
628  rs2_error* e = nullptr;
629  if (rs2_is_sensor_extendable_to(_sensor.get(), RS2_EXTENSION_WHEEL_ODOMETER, &e) == 0 && !e)
630  {
631  _sensor.reset();
632  }
633  error::handle(e);
634  }
635 
640  bool load_wheel_odometery_config(const std::vector<uint8_t>& odometry_config_buf) const
641  {
642  rs2_error* e = nullptr;
643  auto res = rs2_load_wheel_odometry_config(_sensor.get(), odometry_config_buf.data(), uint32_t(odometry_config_buf.size()), &e);
644  error::handle(e);
645  return !!res;
646  }
647 
654  bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector& translational_velocity)
655  {
656  rs2_error* e = nullptr;
657  auto res = rs2_send_wheel_odometry(_sensor.get(), wo_sensor_id, frame_num, translational_velocity, &e);
658  error::handle(e);
659  return !!res;
660  }
661 
662  operator bool() const { return _sensor.get() != nullptr; }
663  explicit wheel_odometer(std::shared_ptr<rs2_sensor> dev) : wheel_odometer(sensor(dev)) {}
664  };
665 
666  class calibrated_sensor : public sensor
667  {
668  public:
670  : sensor( s.get() )
671  {
672  rs2_error* e = nullptr;
673  if( rs2_is_sensor_extendable_to( _sensor.get(), RS2_EXTENSION_CALIBRATED_SENSOR, &e ) == 0 && !e )
674  {
675  _sensor.reset();
676  }
677  error::handle( e );
678  }
679 
680  operator bool() const { return _sensor.get() != nullptr; }
681 
684  {
685  rs2_error* e = nullptr;
686  rs2_override_intrinsics( _sensor.get(), &intr, &e );
687  error::handle( e );
688  }
689 
692  {
693  rs2_error* e = nullptr;
694  rs2_override_extrinsics( _sensor.get(), &extr, &e );
695  error::handle( e );
696  }
697 
700  {
701  rs2_error* e = nullptr;
703  rs2_get_dsm_params( _sensor.get(), &params, &e );
704  error::handle( e );
705  return params;
706  }
707 
712  {
713  rs2_error* e = nullptr;
714  rs2_override_dsm_params( _sensor.get(), &params, &e );
715  error::handle( e );
716  }
717 
721  {
722  rs2_error* e = nullptr;
723  rs2_reset_sensor_calibration( _sensor.get(), &e );
724  error::handle( e );
725  }
726  };
727 
729  {
730  public:
732  : sensor(s.get())
733  {
734  rs2_error* e = nullptr;
736  {
737  _sensor.reset();
738  }
739  error::handle(e);
740  }
741 
742  operator bool() const { return _sensor.get() != nullptr; }
743 
748  {
749  rs2_error* e = nullptr;
750  auto res = rs2_get_max_usable_depth_range(_sensor.get(), &e);
751  error::handle(e);
752  return res;
753  }
754  };
755 
757  {
758  public:
760  : sensor( s.get() )
761  {
762  rs2_error * e = nullptr;
763  if( rs2_is_sensor_extendable_to( _sensor.get(), RS2_EXTENSION_DEBUG_STREAM_SENSOR, &e ) == 0 && ! e )
764  {
765  _sensor.reset();
766  }
767  error::handle( e );
768  }
769 
770  operator bool() const { return _sensor.get() != nullptr; }
771 
776  std::vector< stream_profile > get_debug_stream_profiles() const
777  {
778  std::vector< stream_profile > results;
779 
780  rs2_error * e = nullptr;
781  std::shared_ptr< rs2_stream_profile_list > list(
782  rs2_get_debug_stream_profiles( _sensor.get(), &e ),
784  error::handle( e );
785 
786  auto size = rs2_get_stream_profiles_count( list.get(), &e );
787  error::handle( e );
788 
789  for( auto i = 0; i < size; i++ )
790  {
791  stream_profile profile( rs2_get_stream_profile( list.get(), i, &e ) );
792  error::handle( e );
793  results.push_back( profile );
794  }
795 
796  return results;
797  }
798  };
799 }
800 #endif // LIBREALSENSE_RS2_SENSOR_HPP
notification(rs2_notification *nt)
Definition: rs_sensor.hpp:17
std::vector< uint8_t > export_localization_map() const
Definition: rs_sensor.hpp:547
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
pose_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:619
float rs2_get_depth_scale(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2312
float get_depth_scale() const
Definition: rs_sensor.hpp:471
calibrated_sensor(sensor s)
Definition: rs_sensor.hpp:669
friend device
Definition: rs_sensor.hpp:348
std::string get_serialized_data() const
Definition: rs_sensor.hpp:73
bool operator==(const plane &lhs, const plane &rhs)
Definition: rendering.h:134
GLdouble s
fisheye_sensor(sensor s)
Definition: rs_sensor.hpp:408
std::vector< stream_profile > get_active_streams() const
Definition: rs_sensor.hpp:246
void on_notification(rs2_notification *_notification) override
Definition: rs_sensor.hpp:93
GLfloat GLfloat p
Definition: glext.h:12687
int rs2_get_static_node(const rs2_sensor *sensor, const char *guid, rs2_vector *pos, rs2_quaternion *orient, rs2_error **error)
Definition: rs.cpp:2852
float rs2_get_max_usable_depth_range(rs2_sensor const *sensor, rs2_error **error)
Definition: rs.cpp:2320
void override_intrinsics(rs2_intrinsics const &intr)
Definition: rs_sensor.hpp:683
Video DSM (Digital Sync Module) parameters for calibration (same layout as in FW ac_depth_params) Thi...
Definition: rs_types.h:74
void set_notifications_callback(T callback) const
Definition: rs_sensor.hpp:207
std::vector< filter > get_recommended_filters() const
Definition: rs_sensor.hpp:273
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
Definition: rs.cpp:1224
rs2_log_severity get_severity() const
Definition: rs_sensor.hpp:64
depth_sensor(sensor s)
Definition: rs_sensor.hpp:457
const unsigned char * rs2_get_raw_data(const rs2_raw_data_buffer *buffer, rs2_error **error)
Definition: rs.cpp:567
int rs2_import_localization_map(const rs2_sensor *sensor, const unsigned char *lmap_blob, unsigned int blob_size, rs2_error **error)
Definition: rs.cpp:2815
friend context
Definition: rs_sensor.hpp:346
void rs2_stop(const rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:831
float get_max_usable_depth_range() const
Definition: rs_sensor.hpp:747
void release() override
Definition: rs_sensor.hpp:98
const char * rs2_get_notification_serialized_data(rs2_notification *notification, rs2_error **error)
Definition: rs.cpp:882
Definition: cah-model.h:10
GLsizei const GLchar *const * string
std::string get_description() const
Definition: rs_sensor.hpp:46
rs2_log_severity rs2_get_notification_severity(rs2_notification *notification, rs2_error **error)
Definition: rs.cpp:868
notification()=default
void rs2_delete_raw_data(const rs2_raw_data_buffer *buffer)
Definition: rs.cpp:581
sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:339
unsigned char uint8_t
Definition: stdint.h:78
friend roi_sensor
Definition: rs_sensor.hpp:350
e
Definition: rmse.py:177
void set_region_of_interest(const region_of_interest &roi)
Definition: rs_sensor.hpp:435
rs2_stream_profile_list * rs2_get_active_streams(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:344
int rs2_get_raw_data_size(const rs2_raw_data_buffer *buffer, rs2_error **error)
Definition: rs.cpp:574
rs2_stream_profile_list * rs2_get_stream_profiles(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:327
void rs2_open(rs2_sensor *device, const rs2_stream_profile *profile, rs2_error **error)
Definition: rs.cpp:588
notifications_callback(T on_notification)
Definition: rs_sensor.hpp:91
std::string _description
Definition: rs_sensor.hpp:79
def info(name, value, persistent=False)
Definition: test.py:301
Quaternion used to represent rotation.
Definition: rs_types.h:135
rs2_stream_profile_list * rs2_get_debug_stream_profiles(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:334
GLdouble f
region_of_interest get_region_of_interest() const
Definition: rs_sensor.hpp:442
GLsizeiptr size
std::string _serialized_data
Definition: rs_sensor.hpp:83
void rs2_override_dsm_params(rs2_sensor const *sensor, rs2_dsm_params const *p_params, rs2_error **error)
Definition: rs.cpp:1156
std::shared_ptr< rs2_sensor > _sensor
Definition: rs_sensor.hpp:352
float get_stereo_baseline() const
Definition: rs_sensor.hpp:499
float rs2_get_stereo_baseline(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2330
friend device_base
Definition: rs_sensor.hpp:349
int rs2_get_recommended_processing_blocks_count(const rs2_processing_block_list *list, rs2_error **error)
Definition: rs.cpp:2781
void rs2_delete_sensor(rs2_sensor *sensor)
Definition: rs.cpp:320
rs2_notification_category _category
Definition: rs_sensor.hpp:82
unsigned int uint32_t
Definition: stdint.h:80
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
Definition: rs.cpp:1238
rs2_time_t rs2_get_notification_timestamp(rs2_notification *notification, rs2_error **error)
Definition: rs.cpp:861
int rs2_remove_static_node(const rs2_sensor *sensor, const char *guid, rs2_error **error)
Definition: rs.cpp:2879
depth_sensor(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:480
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
Definition: rs.cpp:351
T as() const
Definition: rs_sensor.hpp:333
rs2_dsm_params get_dsm_params() const
Definition: rs_sensor.hpp:699
void rs2_set_notifications_callback_cpp(const rs2_sensor *sensor, rs2_notifications_callback *callback, rs2_error **error)
Definition: rs.cpp:806
void rs2_reset_sensor_calibration(rs2_sensor const *sensor, rs2_error **error)
Definition: rs.cpp:1166
def callback(frame)
Definition: t265_stereo.py:91
GLuint start
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
pose_sensor(sensor s)
Definition: rs_sensor.hpp:514
void rs2_delete_processing_block(rs2_processing_block *block)
Definition: rs.cpp:2106
GLenum const GLfloat * params
int rs2_supports_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
Definition: rs.cpp:736
void rs2_delete_recommended_processing_blocks(rs2_processing_block_list *list)
Definition: rs.cpp:2788
bool supports(rs2_camera_info info) const
Definition: rs_sensor.hpp:125
bool supports(rs2_option option) const
Definition: rs_options.hpp:19
rs2_log_severity _severity
Definition: rs_sensor.hpp:81
static void handle(rs2_error *e)
Definition: rs_types.hpp:144
rs2_sensor * get_sensor()
Definition: rs_frame.hpp:445
void rs2_override_extrinsics(const rs2_sensor *sensor, const rs2_extrinsics *extrinsics, rs2_error **error)
Override extrinsics of a given sensor that supports calibrated_sensor.
Definition: rs.cpp:1136
rs2_notification_category get_category() const
Definition: rs_sensor.hpp:38
void open(const std::vector< stream_profile > &profiles) const
Definition: rs_sensor.hpp:151
std::vector< stream_profile > get_debug_stream_profiles() const
Definition: rs_sensor.hpp:776
bool load_wheel_odometery_config(const std::vector< uint8_t > &odometry_config_buf) const
Definition: rs_sensor.hpp:640
wheel_odometer(sensor s)
Definition: rs_sensor.hpp:625
Cross-stream extrinsics: encodes the topology describing how the different devices are oriented...
Definition: rs_sensor.h:96
void override_extrinsics(rs2_extrinsics const &extr)
Definition: rs_sensor.hpp:691
void rs2_get_dsm_params(rs2_sensor const *sensor, rs2_dsm_params *p_params_out, rs2_error **error)
Definition: rs.cpp:1146
int rs2_is_sensor_extendable_to(const rs2_sensor *sensor, rs2_extension extension, rs2_error **error)
Definition: rs.cpp:1394
3D vector in Euclidean coordinate space
Definition: rs_types.h:129
bool set_static_node(const std::string &guid, const rs2_vector &pos, const rs2_quaternion &orient) const
Definition: rs_sensor.hpp:578
rs2_notification_category
Category of the librealsense notification.
Definition: rs_types.h:17
rs2_extrinsics extr
Definition: test-pose.cpp:258
bool import_localization_map(const std::vector< uint8_t > &lmap_buf) const
Definition: rs_sensor.hpp:534
const rs2_stream_profile * get() const
Definition: rs_frame.hpp:137
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
Definition: rs.cpp:367
void rs2_close(const rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:614
motion_sensor(sensor s)
Definition: rs_sensor.hpp:392
bool is() const
Definition: rs_sensor.hpp:326
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
Video stream intrinsics.
Definition: rs_types.h:58
options & operator=(const options &other)
Definition: rs_options.hpp:134
void open(const stream_profile &profile) const
Definition: rs_sensor.hpp:111
void rs2_open_multiple(rs2_sensor *device, const rs2_stream_profile **profiles, int count, rs2_error **error)
Definition: rs.cpp:599
void rs2_start_cpp(const rs2_sensor *sensor, rs2_frame_callback *callback, rs2_error **error)
Definition: rs.cpp:798
float rs2_vector::* pos
friend device_list
Definition: rs_sensor.hpp:347
rs2_notification_category rs2_get_notification_category(rs2_notification *notification, rs2_error **error)
Definition: rs.cpp:875
double get_timestamp() const
Definition: rs_sensor.hpp:55
rs2_processing_block * rs2_get_processing_block(const rs2_processing_block_list *list, int index, rs2_error **error)
Definition: rs.cpp:2772
bool send_wheel_odometry(uint8_t wo_sensor_id, uint32_t frame_num, const rs2_vector &translational_velocity)
Definition: rs_sensor.hpp:654
int rs2_set_static_node(const rs2_sensor *sensor, const char *guid, const rs2_vector pos, const rs2_quaternion orient, rs2_error **error)
Definition: rs.cpp:2840
int i
GLuint res
Definition: glext.h:8856
void close() const
Definition: rs_sensor.hpp:173
bool get_static_node(const std::string &guid, rs2_vector &pos, rs2_quaternion &orient) const
Definition: rs_sensor.hpp:598
const rs2_raw_data_buffer * rs2_export_localization_map(const rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2828
const char * get_info(rs2_camera_info info) const
Definition: rs_sensor.hpp:138
const char * rs2_get_sensor_info(const rs2_sensor *sensor, rs2_camera_info info, rs2_error **error)
Definition: rs.cpp:724
sensor & operator=(const sensor &other)
Definition: rs_sensor.hpp:306
const char * rs2_get_notification_description(rs2_notification *notification, rs2_error **error)
Definition: rs.cpp:854
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)
Definition: rs.cpp:360
int rs2_load_wheel_odometry_config(const rs2_sensor *sensor, const unsigned char *odometry_config_buf, unsigned int blob_size, rs2_error **error)
Definition: rs.cpp:2891
bool remove_static_node(const std::string &guid) const
Definition: rs_sensor.hpp:610
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:153
std::vector< stream_profile > get_stream_profiles() const
Definition: rs_sensor.hpp:219
rs2_processing_block_list * rs2_get_recommended_processing_blocks(rs2_sensor *sensor, rs2_error **error)
Definition: rs.cpp:2765
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)
Definition: rs.cpp:2907
color_sensor(sensor s)
Definition: rs_sensor.hpp:376
GLuint64EXT * result
Definition: glext.h:10921
void rs2_override_intrinsics(const rs2_sensor *sensor, const rs2_intrinsics *intrinsics, rs2_error **error)
Override intrinsics of a given sensor that supports calibrated_sensor.
Definition: rs.cpp:2688
sensor & operator=(const std::shared_ptr< rs2_sensor > other)
Definition: rs_sensor.hpp:298
YYCODETYPE lhs
Definition: sqlite3.c:132469
GeneratorWrapper< T > map(Func &&function, GeneratorWrapper< U > &&generator)
Definition: catch.hpp:4271
wheel_odometer(std::shared_ptr< rs2_sensor > dev)
Definition: rs_sensor.hpp:663
std::shared_ptr< sensor > sensor_from_frame(frame f)
Definition: rs_sensor.hpp:357
void start(T callback) const
Definition: rs_sensor.hpp:185
void stop() const
Definition: rs_sensor.hpp:195
roi_sensor(sensor s)
Definition: rs_sensor.hpp:424
void override_dsm_params(rs2_dsm_params const &params)
Definition: rs_sensor.hpp:711


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:41