YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
fakeDepthCamera_test.cpp
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
8
9#include <yarp/os/Network.h>
10#include <yarp/sig/Image.h>
11#include <yarp/sig/Vector.h>
12#include <yarp/dev/PolyDriver.h>
13#include <yarp/os/Time.h>
14
15#include <array>
16#include <string>
17
18#include <catch2/catch_amalgamated.hpp>
19#include <harness.h>
20
21using namespace yarp::os;
22using namespace yarp::dev;
23using namespace yarp::sig;
24
25
26TEST_CASE("dev::fakeDepthCameraTest", "[yarp::dev]")
27{
28 YARP_REQUIRE_PLUGIN("fakeDepthCamera", "device");
29
30 Network::setLocalMode(true);
31
32 SECTION("Test the IFrameGrabberImage interface")
33 {
34 // Open the device
35 PolyDriver dd;
36 Property p;
37 p.put("device", "fakeDepthCamera");
38 REQUIRE(dd.open(p));
39
40 // Get the IFrameGrabberImage interface
41 IRGBDSensor* irgbd = nullptr;
42 REQUIRE(dd.view(irgbd));
43
45
46 // Close the device
47 CHECK(dd.close());
48 }
49
50 Network::setLocalMode(false);
51}
contains the definition of a Vector type
bool view(T *&x)
Get an interface to the device driver.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
Definition IRGBDSensor.h:39
A container for a device driver.
Definition PolyDriver.h:23
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Definition Property.h:33
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Definition Property.cpp:987
TEST_CASE("dev::fakeDepthCameraTest", "[yarp::dev]")
void exec_iRGBDSensor_test_1(IRGBDSensor *irgbd)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.