YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
fakeLaserWithMotor_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#include <yarp/os/Network.h>
13
14#include <catch2/catch_amalgamated.hpp>
15#include <harness.h>
16
17using namespace yarp::dev;
18using namespace yarp::sig;
19using namespace yarp::os;
20
21TEST_CASE("dev::FakeLaserWithMotorTest", "[yarp::dev]")
22{
23 YARP_REQUIRE_PLUGIN("fakeLaserWithMotor", "device");
24
25 Network::setLocalMode(true);
26
27 SECTION("Checking FakeLaserTest device")
28 {
30 IRangefinder2D* irng = nullptr;
31 IPositionControl* ipos = nullptr;
32 IControlMode* icmd = nullptr;
33
35 {
37 las_cfg.put("device", "fakeLaserWithMotor");
38 las_cfg.put("test", "use_constant");
39 Property& cm_cfg = las_cfg.addGroup("CONSTANT_MODE");
40 cm_cfg.put("const_distance", 0.5);
43 REQUIRE(fakelaserdev.view(ipos));
44 REQUIRE(fakelaserdev.view(icmd));
45 }
46
47 //execute tests
50
51 //"Close all polydrivers and check"
53 }
54
55 Network::setLocalMode(false);
56}
Interface for setting control mode in control board.
Interface for a generic control board device implementing position control.
A generic interface for planar laser range finders.
A container for a device driver.
Definition PolyDriver.h:23
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A class for storing options and configuration information.
Definition Property.h:33
TEST_CASE("dev::FakeLaserWithMotorTest", "[yarp::dev]")
void exec_iPositionControl_test_1(IPositionControl *ipos, IControlMode *icmd)
void exec_iRangefinder2D_test_1(IRangefinder2D *irf)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.