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
9#include <yarp/os/Network.h>
10#include <yarp/dev/PolyDriver.h>
16
17#include <catch2/catch_amalgamated.hpp>
18#include <harness.h>
19
20using namespace yarp::dev;
21using namespace yarp::sig;
22using namespace yarp::os;
23
24TEST_CASE("dev::FakeLaserWithMotorTest", "[yarp::dev]")
25{
26 YARP_REQUIRE_PLUGIN("fakeLaserWithMotor", "device");
27
28 Network::setLocalMode(true);
29
30 SECTION("Checking FakeLaserTest device")
31 {
33 IRangefinder2D* irng = nullptr;
34 IPositionControl* ipos = nullptr;
35 IControlMode* icmd = nullptr;
36 IAxisInfo* iinfo = nullptr;
37
39 {
41 las_cfg.put("device", "fakeLaserWithMotor");
42 las_cfg.put("test", "use_constant");
43 Property& cm_cfg = las_cfg.addGroup("CONSTANT_MODE");
44 cm_cfg.put("const_distance", 0.5);
47
49 REQUIRE(fakelaserdev.view(ipos));
50 REQUIRE(fakelaserdev.view(icmd));
52 }
53
54 //execute tests
57 //yarp::dev::tests::exec_iControlMode_test_1(icmd,iinfo);
58
59 //"Close all polydrivers and check"
61 }
62
63 Network::setLocalMode(false);
64}
Interface for getting information about specific axes, if available.
Definition IAxisInfo.h:37
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:32
TEST_CASE("dev::FakeLaserWithMotorTest", "[yarp::dev]")
void exec_iRangefinder2D_test_1(IRangefinder2D *irf, const ValuestoCheck &v=ValuestoCheck())
void exec_params_test(yarp::dev::PolyDriver *pdrv)
void exec_iPositionControl_test_1(IPositionControl *ipos, IControlMode *icmd)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.