Public Member Functions | |
realsense2withIMUDriver () | |
~realsense2withIMUDriver () override=default | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
size_t | getNrOfThreeAxisGyroscopes () const override |
Get the number of three axis gyroscopes exposed by this sensor. | |
yarp::dev::MAS_status | getThreeAxisGyroscopeStatus (size_t sens_index) const override |
Get the status of the specified sensor. | |
bool | getThreeAxisGyroscopeName (size_t sens_index, std::string &name) const override |
Get the name of the specified sensor. | |
bool | getThreeAxisGyroscopeFrameName (size_t sens_index, std::string &frameName) const override |
Get the name of the frame of the specified sensor. | |
bool | getThreeAxisGyroscopeMeasure (size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override |
Get the last reading of the gyroscope. | |
size_t | getNrOfThreeAxisLinearAccelerometers () const override |
Get the number of three axis linear accelerometers exposed by this device. | |
yarp::dev::MAS_status | getThreeAxisLinearAccelerometerStatus (size_t sens_index) const override |
Get the status of the specified sensor. | |
bool | getThreeAxisLinearAccelerometerName (size_t sens_index, std::string &name) const override |
Get the name of the specified sensor. | |
bool | getThreeAxisLinearAccelerometerFrameName (size_t sens_index, std::string &frameName) const override |
Get the name of the frame of the specified sensor. | |
bool | getThreeAxisLinearAccelerometerMeasure (size_t sens_index, yarp::sig::Vector &out, double ×tamp) const override |
Get the last reading of the specified sensor. | |
size_t | getNrOfOrientationSensors () const override |
Get the number of orientation sensors exposed by this device. | |
yarp::dev::MAS_status | getOrientationSensorStatus (size_t sens_index) const override |
Get the status of the specified sensor. | |
bool | getOrientationSensorName (size_t sens_index, std::string &name) const override |
Get the name of the specified sensor. | |
bool | getOrientationSensorFrameName (size_t sens_index, std::string &frameName) const override |
Get the name of the frame of the specified sensor. | |
bool | getOrientationSensorMeasureAsRollPitchYaw (size_t sens_index, yarp::sig::Vector &rpy, double ×tamp) const override |
Get the last reading of the orientation sensor as roll pitch yaw. | |
![]() | |
realsense2Driver () | |
~realsense2Driver () override=default | |
int | getRgbHeight () override |
Return the height of each frame. | |
int | getRgbWidth () override |
Return the width of each frame. | |
bool | getRgbSupportedConfigurations (yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) override |
bool | getRgbResolution (int &width, int &height) override |
Get the resolution of the rgb image from the camera. | |
bool | setRgbResolution (int width, int height) override |
Set the resolution of the rgb image from the camera. | |
bool | getRgbFOV (double &horizontalFov, double &verticalFov) override |
Get the field of view (FOV) of the rgb camera. | |
bool | setRgbFOV (double horizontalFov, double verticalFov) override |
Set the field of view (FOV) of the rgb camera. | |
bool | getRgbMirroring (bool &mirror) override |
Get the mirroring setting of the sensor. | |
bool | setRgbMirroring (bool mirror) override |
Set the mirroring setting of the sensor. | |
bool | getRgbIntrinsicParam (Property &intrinsic) override |
Get the intrinsic parameters of the rgb camera. | |
int | getDepthHeight () override |
Return the height of each frame. | |
int | getDepthWidth () override |
Return the height of each frame. | |
bool | setDepthResolution (int width, int height) override |
Set the resolution of the depth image from the camera. | |
bool | getDepthFOV (double &horizontalFov, double &verticalFov) override |
Get the field of view (FOV) of the depth camera. | |
bool | setDepthFOV (double horizontalFov, double verticalFov) override |
Set the field of view (FOV) of the depth camera. | |
bool | getDepthIntrinsicParam (Property &intrinsic) override |
Get the intrinsic parameters of the depth camera. | |
double | getDepthAccuracy () override |
bool | setDepthAccuracy (double accuracy) override |
Set the minimum detectable variation in distance [meter] when possible. | |
bool | getDepthClipPlanes (double &nearPlane, double &farPlane) override |
Get the clipping planes of the sensor. | |
bool | setDepthClipPlanes (double nearPlane, double farPlane) override |
Set the clipping planes of the sensor. | |
bool | getDepthMirroring (bool &mirror) override |
Get the mirroring setting of the sensor. | |
bool | setDepthMirroring (bool mirror) override |
Set the mirroring setting of the sensor. | |
bool | getExtrinsicParam (yarp::sig::Matrix &extrinsic) override |
Get the extrinsic parameters from the device. | |
bool | getRgbImage (FlexImage &rgbImage, Stamp *timeStamp=nullptr) override |
Get the rgb frame from the device. | |
bool | getDepthImage (depthImage &depthImage, Stamp *timeStamp=nullptr) override |
bool | getImages (FlexImage &colorFrame, depthImage &depthFrame, Stamp *colorStamp=NULL, Stamp *depthStamp=NULL) override |
RGBDSensor_status | getSensorStatus () override |
std::string | getLastErrorMsg (Stamp *timeStamp=NULL) override |
bool | getCameraDescription (CameraDescriptor *camera) override |
bool | hasFeature (int feature, bool *hasFeature) override |
bool | setFeature (int feature, double value) override |
bool | getFeature (int feature, double *value) override |
bool | setFeature (int feature, double value1, double value2) override |
bool | getFeature (int feature, double *value1, double *value2) override |
bool | hasOnOff (int feature, bool *HasOnOff) override |
bool | setActive (int feature, bool onoff) override |
bool | getActive (int feature, bool *isActive) override |
bool | hasAuto (int feature, bool *hasAuto) override |
bool | hasManual (int feature, bool *hasManual) override |
bool | hasOnePush (int feature, bool *hasOnePush) override |
bool | setMode (int feature, FeatureMode mode) override |
bool | getMode (int feature, FeatureMode *mode) override |
bool | setOnePush (int feature) override |
bool | getImage (yarp::sig::ImageOf< yarp::sig::PixelMono > &image) override |
Get an image from the frame grabber. | |
int | height () const override |
Return the height of each frame. | |
int | width () const override |
Return the width of each frame. | |
![]() | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
![]() | |
virtual | ~IFrameGrabberControls () |
Destructor. | |
std::string | busType2String (BusType type) |
FeatureMode | toFeatureMode (bool _auto) |
virtual yarp::dev::ReturnValue | getCameraDescription (CameraDescriptor &camera)=0 |
Get a basic description of the camera hw. | |
virtual yarp::dev::ReturnValue | hasFeature (cameraFeature_id_t, bool &hasFeature)=0 |
Check if camera has the requested feature (saturation, brightness ... ) | |
virtual yarp::dev::ReturnValue | setFeature (cameraFeature_id_t feature, double value)=0 |
Set the requested feature to a value (saturation, brightness ... ) | |
virtual yarp::dev::ReturnValue | getFeature (cameraFeature_id_t feature, double &value)=0 |
Get the current value for the requested feature. | |
virtual yarp::dev::ReturnValue | setFeature (cameraFeature_id_t feature, double value1, double value2)=0 |
Set the requested feature to a value using 2 params (like white balance) | |
virtual yarp::dev::ReturnValue | getFeature (cameraFeature_id_t feature, double &value1, double &value2)=0 |
Get the current value for the requested feature. | |
virtual yarp::dev::ReturnValue | hasOnOff (cameraFeature_id_t feature, bool &HasOnOff)=0 |
Check if the camera has the ability to turn on/off the requested feature. | |
virtual yarp::dev::ReturnValue | setActive (cameraFeature_id_t feature, bool onoff)=0 |
Set the requested feature on or off. | |
virtual yarp::dev::ReturnValue | getActive (cameraFeature_id_t feature, bool &isActive)=0 |
Get the current status of the feature, on or off. | |
virtual yarp::dev::ReturnValue | hasAuto (cameraFeature_id_t feature, bool &hasAuto)=0 |
Check if the requested feature has the 'auto' mode. | |
virtual yarp::dev::ReturnValue | hasManual (cameraFeature_id_t feature, bool &hasManual)=0 |
Check if the requested feature has the 'manual' mode. | |
virtual yarp::dev::ReturnValue | hasOnePush (cameraFeature_id_t feature, bool &hasOnePush)=0 |
Check if the requested feature has the 'onePush' mode. | |
virtual yarp::dev::ReturnValue | setMode (cameraFeature_id_t feature, FeatureMode mode)=0 |
Set the requested mode for the feature. | |
virtual yarp::dev::ReturnValue | getMode (cameraFeature_id_t feature, FeatureMode &mode)=0 |
Get the current mode for the feature. | |
virtual yarp::dev::ReturnValue | setOnePush (cameraFeature_id_t feature)=0 |
Set the requested feature to a value (saturation, brightness ... ) | |
![]() | |
virtual yarp::dev::ReturnValue | getImageCrop (yarp::dev::cropType_id_t cropType, std::vector< vertex_t > vertices, yarp::sig::ImageOf< yarp::sig::PixelMono > &image) |
Get a crop of the image from the frame grabber. | |
![]() | |
virtual | ~IFrameGrabberImageBase () |
Destructor. | |
![]() | |
virtual | ~IRGBDSensor () |
virtual yarp::dev::ReturnValue | getLastErrorMsg (std::string &message, yarp::os::Stamp *timeStamp=nullptr)=0 |
Return an error message in case of error. | |
virtual yarp::dev::ReturnValue | getDepthImage (yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr)=0 |
Get the depth frame from the device. | |
virtual yarp::dev::ReturnValue | getImages (yarp::sig::FlexImage &colorFrame, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthFrame, yarp::os::Stamp *colorStamp=nullptr, yarp::os::Stamp *depthStamp=nullptr)=0 |
Get the both the color and depth frame in a single call. | |
virtual yarp::dev::ReturnValue | getSensorStatus (RGBDSensor_status &status)=0 |
Get the current status of the sensor, using enum type. | |
![]() | |
virtual | ~IRgbVisualParams () |
virtual yarp::dev::ReturnValue | getRgbSupportedConfigurations (std::vector< yarp::dev::CameraConfig > &configurations)=0 |
Get the possible configurations of the camera. | |
![]() | |
virtual | ~IDepthVisualParams () |
virtual yarp::dev::ReturnValue | getDepthResolution (int &width, int &height)=0 |
Get the resolution of the depth image from the camera. | |
virtual yarp::dev::ReturnValue | getDepthAccuracy (double &accuracy)=0 |
Get the minimum detectable variation in distance [meter]. | |
![]() | |
virtual | ~IThreeAxisGyroscopes () |
![]() | |
virtual | ~IThreeAxisLinearAccelerometers () |
![]() | |
virtual | ~IOrientationSensors () |
Protected Attributes | |
rs2_vector | m_last_gyro |
rs2_vector | m_last_accel |
rs2_pose | m_last_pose |
rotation_estimator * | m_rotation_estimator |
bool | m_sensor_has_orientation_estimator |
std::string | m_inertial_sensor_name_prefix |
const std::string | m_accel_sensor_tag = "accelerations_sensor" |
const std::string | m_gyro_sensor_tag = "gyro_sensor" |
const std::string | m_orientation_sensor_tag = "orientation_sensor" |
const std::string | m_position_sensor_tag = "position_sensor" |
std::string | m_gyroFrameName |
std::string | m_accelFrameName |
std::string | m_orientationFrameName |
std::string | m_positionFrameName |
std::string | m_lastError |
![]() | |
std::mutex | m_mutex |
rs2::context | m_ctx |
rs2::config | m_cfg |
rs2::pipeline | m_pipeline |
rs2::pipeline_profile | m_profile |
rs2::device | m_device |
std::vector< rs2::sensor > | m_sensors |
rs2::sensor * | m_depth_sensor |
rs2::sensor * | m_color_sensor |
rs2_intrinsics | m_depth_intrin {} |
rs2_intrinsics | m_color_intrin {} |
rs2_intrinsics | m_infrared_intrin {} |
rs2_extrinsics | m_depth_to_color {} |
rs2_extrinsics | m_color_to_depth {} |
rs2_stream | m_alignment_stream {RS2_STREAM_COLOR} |
bool | m_depthQuantizationEnabled {false} |
int | m_depthDecimalNum {0} |
yarp::os::Stamp | m_rgb_stamp |
yarp::os::Stamp | m_depth_stamp |
std::string | m_lastError |
yarp::dev::RGBDSensorParamParser | m_paramParser |
bool | m_verbose |
bool | m_initialized |
bool | m_stereoMode |
bool | m_needAlignment |
int | m_fps |
float | m_scale |
bool | m_rotateImage180 {false} |
std::vector< cameraFeature_id_t > | m_supportedFeatures |
Additional Inherited Members | |
![]() | |
enum | RGBDSensor_status { RGBD_SENSOR_NOT_READY = 0 , RGBD_SENSOR_OK_STANDBY = 1 , RGBD_SENSOR_OK_IN_USE = 2 , RGB_SENSOR_ERROR = 3 , DEPTH_SENSOR_ERROR = 4 , RGBD_SENSOR_GENERIC_ERROR = 5 , RGBD_SENSOR_TIMEOUT = 6 } |
![]() | |
bool | initializeRealsenseDevice () |
bool | setParams () |
bool | getImage (FlexImage &Frame, Stamp *timeStamp, rs2::frameset &sourceFrame) |
bool | getImage (depthImage &Frame, Stamp *timeStamp, const rs2::frameset &sourceFrame) |
void | updateTransformations () |
bool | pipelineStartup () |
bool | pipelineShutdown () |
bool | pipelineRestart () |
bool | setFramerate (const int _fps) |
void | fallback () |
Definition at line 31 of file realsense2withIMUDriver.h.
realsense2withIMUDriver::realsense2withIMUDriver | ( | ) |
Definition at line 230 of file realsense2withIMUDriver.cpp.
|
overridedefault |
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from realsense2Driver.
Definition at line 328 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the number of orientation sensors exposed by this device.
Implements yarp::dev::IOrientationSensors.
Definition at line 444 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the number of three axis gyroscopes exposed by this sensor.
Implements yarp::dev::IThreeAxisGyroscopes.
Definition at line 336 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the number of three axis linear accelerometers exposed by this device.
Implements yarp::dev::IThreeAxisLinearAccelerometers.
Definition at line 392 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the frame of the specified sensor.
Implements yarp::dev::IOrientationSensors.
Definition at line 468 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the last reading of the orientation sensor as roll pitch yaw.
If
with
,
and
where
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfOrientationSensors()-1). |
[out] | out | The requested measure. The vector should be 3-dimensional. The measure is expressed in degrees . |
[out] | timestamp | The timestamp of the requested measure, expressed in seconds. |
Implements yarp::dev::IOrientationSensors.
Definition at line 480 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the specified sensor.
Implements yarp::dev::IOrientationSensors.
Definition at line 457 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the status of the specified sensor.
Implements yarp::dev::IOrientationSensors.
Definition at line 450 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the frame of the specified sensor.
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1). |
Implements yarp::dev::IThreeAxisGyroscopes.
Definition at line 354 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the last reading of the gyroscope.
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1). |
[out] | out | The requested measure. The vector should be 3-dimensional. The measure is expressed in degrees/seconds. |
[out] | timestamp | The timestamp of the requested measure, expressed in seconds. |
Implements yarp::dev::IThreeAxisGyroscopes.
Definition at line 361 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the specified sensor.
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1). |
Implements yarp::dev::IThreeAxisGyroscopes.
Definition at line 347 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the status of the specified sensor.
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfThreeAxisGyroscopes()-1). |
Implements yarp::dev::IThreeAxisGyroscopes.
Definition at line 341 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the frame of the specified sensor.
Implements yarp::dev::IThreeAxisLinearAccelerometers.
Definition at line 410 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the last reading of the specified sensor.
[in] | sens_index | The index of the specified sensor (should be between 0 and getNrOfThreeAxisLinearAccelerometers()-1). |
[out] | out | The requested measure. The vector should be 3-dimensional. The measure is expressed in meters^2/seconds. |
[out] | timestamp | The timestamp of the requested measure, expressed in seconds. |
Implements yarp::dev::IThreeAxisLinearAccelerometers.
Definition at line 417 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the name of the specified sensor.
Implements yarp::dev::IThreeAxisLinearAccelerometers.
Definition at line 403 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Get the status of the specified sensor.
Implements yarp::dev::IThreeAxisLinearAccelerometers.
Definition at line 397 of file realsense2withIMUDriver.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from realsense2Driver.
Definition at line 283 of file realsense2withIMUDriver.cpp.
|
protected |
Definition at line 94 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 99 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 95 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 98 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 93 of file realsense2withIMUDriver.h.
|
mutableprotected |
Definition at line 86 of file realsense2withIMUDriver.h.
|
mutableprotected |
Definition at line 85 of file realsense2withIMUDriver.h.
|
mutableprotected |
Definition at line 87 of file realsense2withIMUDriver.h.
|
mutableprotected |
Definition at line 102 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 96 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 100 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 97 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 101 of file realsense2withIMUDriver.h.
|
mutableprotected |
Definition at line 88 of file realsense2withIMUDriver.h.
|
protected |
Definition at line 90 of file realsense2withIMUDriver.h.