YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
controlBoardRemapper_t4_test.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026-2026 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
11#include <yarp/dev/IAxisInfo.h>
14#include <yarp/dev/IMotor.h>
21#include <yarp/os/Network.h>
22#include <yarp/dev/PolyDriver.h>
41
42#include <catch2/catch_amalgamated.hpp>
43#include <harness.h>
44
45using namespace yarp::dev;
46using namespace yarp::os;
47
48TEST_CASE("dev::ControlBoardRemapperTest4", "[yarp::dev]")
49{
50 YARP_REQUIRE_PLUGIN("fakeMotionControl", "device");
51 YARP_REQUIRE_PLUGIN("controlboardremapper", "device");
52 YARP_REQUIRE_PLUGIN("controlBoard_nws_yarp", "device");
53
54 Network::setLocalMode(true);
55
56 SECTION("Testing an invalid configuration (invalid set of joints)")
57 {
61
62 {
64 p_cfg.put("device", "fakeMotionControl");
65 p_cfg.put("name", "fakeboard1");
66 Property& grp = p_cfg.addGroup("GENERAL");
67 grp.put("Joints", 2);
69 }
70 {
72 p_cfg.put("device", "controlboardremapper");
73 yarp::os::Value* jlist = yarp::os::Value::makeList("joint0 joint1 joint2 joint3");
74 p_cfg.put("axesNames", jlist);
76 }
77 {
79 p_cfg.put("device", "controlBoard_nws_yarp");
80 p_cfg.put("name", "/alljoints");
82 }
83 {
87 bool result_att = ww_rem->attachAll(pdlist);
88 //This must fail because the remapper requires 4 joints,
89 //but the fake board only has two.
91 }
92 //"Close all polydrivers and check"
93 {
96 }
97 }
98
99 Network::setLocalMode(false);
100}
define control board standard interfaces
define control board standard interfaces
Interface for an object that can wrap/attach to to another.
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
A single value (typically within a Bottle).
Definition Value.h:44
static Value * makeList()
Create a list Value.
Definition Value.cpp:431
TEST_CASE("dev::ControlBoardRemapperTest4", "[yarp::dev]")
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.