YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
realsense2Driver.cpp File Reference
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstdint>
#include <yarp/os/LogComponent.h>
#include <yarp/os/Value.h>
#include <yarp/sig/ImageUtils.h>
#include <librealsense2/rsutil.h>
#include "realsense2Driver.h"
+ Include dependency graph for realsense2Driver.cpp:

Go to the source code of this file.

Functions

static std::string get_device_information (const rs2::device &dev)
 
static void print_supported_options (const rs2::sensor &sensor)
 
static bool isSupportedFormat (const rs2::sensor &sensor, const int width, const int height, const int fps, bool verbose=false)
 
static bool optionPerc2Value (rs2_option option, const rs2::sensor *sensor, const float &perc, float &value)
 
static bool optionValue2Perc (rs2_option option, const rs2::sensor *sensor, float &perc, const float &value)
 
static bool setOption (rs2_option option, const rs2::sensor *sensor, float value)
 
static bool getOption (rs2_option option, const rs2::sensor *sensor, float &value)
 
static int pixFormatToCode (const rs2_format p)
 
static size_t bytesPerPixel (const rs2_format format)
 
static YarpDistortion rsDistToYarpDist (const rs2_distortion dist, const rs2_intrinsics &values)
 
static void settingErrorMsg (const string &error, bool &ret)
 
static bool setIntrinsic (Property &intrinsic, const rs2_intrinsics &values)
 
static bool setExtrinsicParam (Matrix &extrinsic, const rs2_extrinsics &values)
 

Variables

constexpr char accuracy [] = "accuracy"
 
constexpr char clipPlanes [] = "clipPlanes"
 
constexpr char depthRes [] = "depthResolution"
 
constexpr char rgbRes [] = "rgbResolution"
 
constexpr char framerate [] = "framerate"
 
constexpr char enableEmitter [] = "enableEmitter"
 
constexpr char needAlignment [] = "needAlignment"
 
constexpr char alignmentFrame [] = "alignmentFrame"
 
static std::map< std::string, RGBDSensorParamParser::RGBDParamparams_map
 
static const std::map< std::string, rs2_streamstringRSStreamMap
 

Function Documentation

◆ bytesPerPixel()

static size_t bytesPerPixel ( const rs2_format  format)
static

Definition at line 331 of file realsense2Driver.cpp.

◆ get_device_information()

static std::string get_device_information ( const rs2::device &  dev)
static

Definition at line 61 of file realsense2Driver.cpp.

◆ getOption()

static bool getOption ( rs2_option  option,
const rs2::sensor *  sensor,
float value 
)
static

Definition at line 263 of file realsense2Driver.cpp.

◆ isSupportedFormat()

static bool isSupportedFormat ( const rs2::sensor &  sensor,
const int  width,
const int  height,
const int  fps,
bool  verbose = false 
)
static

Definition at line 121 of file realsense2Driver.cpp.

◆ optionPerc2Value()

static bool optionPerc2Value ( rs2_option  option,
const rs2::sensor *  sensor,
const float perc,
float value 
)
static

Definition at line 185 of file realsense2Driver.cpp.

◆ optionValue2Perc()

static bool optionValue2Perc ( rs2_option  option,
const rs2::sensor *  sensor,
float perc,
const float value 
)
static

Definition at line 208 of file realsense2Driver.cpp.

◆ pixFormatToCode()

static int pixFormatToCode ( const rs2_format  p)
static

Definition at line 292 of file realsense2Driver.cpp.

◆ print_supported_options()

static void print_supported_options ( const rs2::sensor &  sensor)
static

Definition at line 81 of file realsense2Driver.cpp.

◆ rsDistToYarpDist()

static YarpDistortion rsDistToYarpDist ( const rs2_distortion  dist,
const rs2_intrinsics values 
)
static

Definition at line 360 of file realsense2Driver.cpp.

◆ setExtrinsicParam()

static bool setExtrinsicParam ( Matrix extrinsic,
const rs2_extrinsics values 
)
static

Definition at line 406 of file realsense2Driver.cpp.

◆ setIntrinsic()

static bool setIntrinsic ( Property intrinsic,
const rs2_intrinsics values 
)
static

Definition at line 388 of file realsense2Driver.cpp.

◆ setOption()

static bool setOption ( rs2_option  option,
const rs2::sensor *  sensor,
float  value 
)
static

Definition at line 233 of file realsense2Driver.cpp.

◆ settingErrorMsg()

static void settingErrorMsg ( const string &  error,
bool ret 
)
static

Definition at line 382 of file realsense2Driver.cpp.

Variable Documentation

◆ accuracy

constexpr char accuracy[] = "accuracy"
constexpr

Definition at line 32 of file realsense2Driver.cpp.

◆ alignmentFrame

constexpr char alignmentFrame[] = "alignmentFrame"
constexpr

Definition at line 39 of file realsense2Driver.cpp.

◆ clipPlanes

constexpr char clipPlanes[] = "clipPlanes"
constexpr

Definition at line 33 of file realsense2Driver.cpp.

◆ depthRes

constexpr char depthRes[] = "depthResolution"
constexpr

Definition at line 34 of file realsense2Driver.cpp.

◆ enableEmitter

constexpr char enableEmitter[] = "enableEmitter"
constexpr

Definition at line 37 of file realsense2Driver.cpp.

◆ framerate

constexpr char framerate[] = "framerate"
constexpr

Definition at line 36 of file realsense2Driver.cpp.

◆ needAlignment

constexpr char needAlignment[] = "needAlignment"
constexpr

Definition at line 38 of file realsense2Driver.cpp.

◆ params_map

◆ rgbRes

constexpr char rgbRes[] = "rgbResolution"
constexpr

Definition at line 35 of file realsense2Driver.cpp.

◆ stringRSStreamMap

const std::map<std::string, rs2_stream> stringRSStreamMap
static
Initial value:
{
{"None", RS2_STREAM_ANY},
{"RGB", RS2_STREAM_COLOR},
{"Depth", RS2_STREAM_DEPTH}
}
A mini-server for performing network communication in the background.

Definition at line 54 of file realsense2Driver.cpp.