YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IRGBDSensor.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IRGBDSENSOR_H
7#define YARP_DEV_IRGBDSENSOR_H
8
9#include <yarp/os/Stamp.h>
10#include <yarp/os/Property.h>
11#include <yarp/sig/Image.h>
12#include <yarp/sig/Matrix.h>
13#include <yarp/dev/api.h>
17
18namespace yarp::dev {
19
37 public IRgbVisualParams,
39{
40public:
41
42 // We should distinguish between rgb and depth sensors, which one is working
43 // and which one isn't. Maybe a specific function with two separated values is better.
44 // Here values are referred to the sensor as a whole.
46 {
47 RGBD_SENSOR_NOT_READY = 0,
48 RGBD_SENSOR_OK_STANDBY = 1,
49 RGBD_SENSOR_OK_IN_USE = 2,
50 RGB_SENSOR_ERROR = 3,
51 DEPTH_SENSOR_ERROR = 4,
52 RGBD_SENSOR_GENERIC_ERROR = 5,
53 RGBD_SENSOR_TIMEOUT = 6
54 };
55
56 virtual ~IRGBDSensor();
57
58 /*
59 * IRGBDSensor specific interface methods
60 */
61
69
76 virtual yarp::dev::ReturnValue getLastErrorMsg(std::string& message, yarp::os::Stamp *timeStamp = nullptr) = 0;
77
90 virtual yarp::dev::ReturnValue getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp = nullptr) = 0;
91
100
112 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;
113
122};
123
124} // namespace yarp::dev
125
126#endif // YARP_DEV_IRGBDSENSOR_H
contains the definition of a Matrix type
An interface for retrieving intrinsic parameter from a depth camera.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
Definition IRGBDSensor.h:39
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 getLastErrorMsg(std::string &message, yarp::os::Stamp *timeStamp=nullptr)=0
Return an error message in case of error.
virtual yarp::dev::ReturnValue getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp=nullptr)=0
Get the rgb frame from the device.
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 getSensorStatus(RGBDSensor_status &status)=0
Get the current status of the sensor, using enum type.
virtual yarp::dev::ReturnValue getExtrinsicParam(yarp::sig::Matrix &extrinsic)=0
Get the extrinsic parameters from the device.
An interface for retrieving intrinsic parameter from a rgb camera.
An abstraction for a time stamp and/or sequence number.
Definition Stamp.h:21
Image class with user control of representation details.
Definition Image.h:361
Typed image class.
Definition Image.h:603
A class for a Matrix.
Definition Matrix.h:39
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18