|
const char * | get_name () const |
| Retrieves human-readable device model string. More...
|
|
const char * | get_serial () const |
| Retrieves unique serial number of device. More...
|
|
const char * | get_usb_port_id () const |
| Retrieves USB port number of device. More...
|
|
const char * | get_firmware_version () const |
| Retrieves version of firmware currently installed on device. More...
|
|
const char * | get_info (camera_info info) const |
| Retrieves camera-specific information such as versions of various components. More...
|
|
extrinsics | get_extrinsics (stream from_stream, stream to_stream) const |
| Retrieves extrinsic transformation between viewpoints of two different streams. More...
|
|
extrinsics | get_motion_extrinsics_from (stream from_stream) const |
| Retrieves extrinsic transformation between viewpoints of specific stream and motion module. More...
|
|
float | get_depth_scale () const |
| Retrieves mapping between units of depth image and meters. More...
|
|
bool | supports_option (option option) const |
| Determines if device allows specific option to be queried and set. More...
|
|
int | get_stream_mode_count (stream stream) const |
| Determines number of streaming modes available for given stream. More...
|
|
void | get_stream_mode (stream stream, int index, int &width, int &height, format &format, int &framerate) const |
| Determines properties of specific streaming mode. More...
|
|
void | enable_stream (stream stream, int width, int height, format format, int framerate, output_buffer_format output_buffer_type=output_buffer_format::continous) |
| Enables specific stream and requests specific properties. More...
|
|
void | enable_stream (stream stream, preset preset) |
| Enables specific stream and requests properties using preset. More...
|
|
void | disable_stream (stream stream) |
| Disables specific stream. More...
|
|
bool | is_stream_enabled (stream stream) const |
| Determines if specific stream is enabled. More...
|
|
int | get_stream_width (stream stream) const |
| Retrieves width, in pixels, of a specific stream, equivalent to the width field from the stream's intrinsic. More...
|
|
int | get_stream_height (stream stream) const |
| Retrieves height, in pixels, of a specific stream, equivalent to the height field from the stream's intrinsic. More...
|
|
format | get_stream_format (stream stream) const |
| Retrieves pixel format for specific stream. More...
|
|
int | get_stream_framerate (stream stream) const |
| Retrieves frame rate for specific stream. More...
|
|
intrinsics | get_stream_intrinsics (stream stream) const |
| Retrieves intrinsic camera parameters for specific stream. More...
|
|
motion_intrinsics | get_motion_intrinsics () const |
| Retrieves intrinsic camera parameters for motion module. More...
|
|
void | set_frame_callback (rs::stream stream, std::function< void(frame)> frame_handler) |
| Sets callback for frame arrival event. More...
|
|
void | enable_motion_tracking (std::function< void(motion_data)> motion_handler, std::function< void(timestamp_data)> timestamp_handler) |
| Sets callback for motion module event. More...
|
|
void | enable_motion_tracking (std::function< void(motion_data)> motion_handler) |
| Sets the callback for motion module event. More...
|
|
void | disable_motion_tracking (void) |
| Disables events polling. More...
|
|
int | is_motion_tracking_active () |
| Checks if data acquisition is active. More...
|
|
void | start (rs::source source=rs::source::video) |
| Begins streaming on all enabled streams for this device. More...
|
|
void | stop (rs::source source=rs::source::video) |
| Ends streaming on all streams for this device. More...
|
|
bool | is_streaming () const |
| Determines if device is currently streaming. More...
|
|
void | get_option_range (option option, double &min, double &max, double &step) |
| Retrieves available range of values of supported option. More...
|
|
void | get_option_range (option option, double &min, double &max, double &step, double &def) |
| Retrieves available range of values of supported option. More...
|
|
void | get_options (const option *options, size_t count, double *values) |
| Efficiently retrieves value of arbitrary number of options, using minimal hardware IO. More...
|
|
void | set_options (const option *options, size_t count, const double *values) |
| Efficiently sets value of arbitrary number of options, using minimal hardware IO. More...
|
|
double | get_option (option option) |
| Retrieves current value of single option. More...
|
|
const char * | get_option_description (option option) |
| Retrieves device-specific option description. More...
|
|
void | set_option (option option, double value) |
| Sets current value of single option. More...
|
|
void | wait_for_frames () |
| Blocks until new frames are available. More...
|
|
bool | poll_for_frames () |
| Checks if new frames are available, without blocking. More...
|
|
bool | supports (capabilities capability) const |
| Determines device capabilities. More...
|
|
bool | supports (camera_info info_param) const |
| Determines device capabilities. More...
|
|
double | get_frame_timestamp (stream stream) const |
| Retrieves time at which the latest frame on a stream was captured. More...
|
|
unsigned long long | get_frame_number (stream stream) const |
| Retrieves frame number. More...
|
|
const void * | get_frame_data (stream stream) const |
| Retrieves contents of latest frame on a stream. More...
|
|
void | send_blob_to_device (rs::blob_type type, void *data, int size) |
| Sends device-specific data to device. More...
|
|
Provides convenience methods relating to devices.
void rs::device::enable_motion_tracking |
( |
std::function< void(motion_data)> |
motion_handler, |
|
|
std::function< void(timestamp_data)> |
timestamp_handler |
|
) |
| |
|
inline |
Sets callback for motion module event.
The provided callback will be called the instant new motion or timestamp event is available. Note:
The rs_enable_motion_tracking_cpp()
method is responsible for activating the motion module on-board the device. One of the services it provides is to produce shared and high-resolution timestamps for all components that are connected to it. For Depth, IR, Color and Fisheye sensors, librealsense takes care of that and copies the timestamps on the relevant frames.
However, when you have an external device (such as a compass, magnetometer, light sensor, or other) and wish to synchronize it precisely with image and motion streams, you can connect that sensor to a GPIO that is available on some devices. Every time the sensor signals, you get a timestamp callback with a frame number, source ID, and a timestamp. This timestamp callback allows advanced users to synchronize compass events (presumably coming though I2C or some other method) with RealSense data.
- Parameters
-
[in] | motion_handler | Frame callback to be invoke on every new motion event |
[in] | timestamp_handler | Frame callback to be invoke on every new timestamp event (can be left-out) |
- Returns
- Frame rate of the stream, in frames per second