YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
controlBoardRemapper_t2_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
6#include <yarp/os/Network.h>
26
27#include <catch2/catch_amalgamated.hpp>
28#include <harness.h>
29
30using namespace yarp::dev;
31using namespace yarp::os;
32
33TEST_CASE("dev::ControlBoardRemapperTest2", "[yarp::dev]")
34{
35 YARP_REQUIRE_PLUGIN("fakeMotionControl", "device");
36 YARP_REQUIRE_PLUGIN("controlboardremapper", "device");
37
38 Network::setLocalMode(true);
39
40 SECTION("Checking controlboardremapper device")
41 {
44
45 IPositionControl* ipos = nullptr;
46 IVelocityControl* ivel = nullptr;
47 ITorqueControl* itrq = nullptr;
48 IAxisInfo* iinfo = nullptr;
49 IEncodersTimed* ienc = nullptr;
50 IControlMode* icmd = nullptr;
51 IInteractionMode* iint = nullptr;
52 IMotor* imot = nullptr;
53 IMotorEncoders* imotenc = nullptr;
54 IPidControl* ipid = nullptr;
55 IPWMControl* ipwm = nullptr;
56 ICurrentControl* icurr = nullptr;
57 IJointFault* ifault = nullptr;
58 IControlLimits* ilims = nullptr;
59 IJointBrake* ibrake = nullptr;
60 IVelocityDirect* ivelDir = nullptr;
61 //IRemoteCalibrator* iremotecalib = nullptr;
62
64 {
66 p_cfg.put("device", "fakeMotionControl");
67 Property& grp = p_cfg.addGroup("GENERAL");
68 grp.put("Joints", 2);
70 }
71 {
73 p_cfg.put("device", "controlboardremapper");
75 p_cfg.put("axesNames", jlist);
77 }
78 {
81 yarp::dev::PolyDriverList pdlist; pdlist.push(&ddmc,"fakeboard1");
82 bool result_att = ww_nws->attachAll(pdlist);
84 }
85
86 ddremapper.view(ipos); REQUIRE(ipos);
89 ddremapper.view(iinfo); REQUIRE(iinfo);
90 ddremapper.view(ienc); REQUIRE(ienc);
91 ddremapper.view(icmd); REQUIRE(icmd);
102 //ddremapper.view(iremotecalib); REQUIRE(iremotecalib);
103
117 //yarp::dev::tests::exec_iRemoteCalibrator_test_1(iremotecalib);
122
123 //"Close all polydrivers and check"
124 {
126 CHECK(ddmc.close());
127 }
128 }
129
130 Network::setLocalMode(false);
131}
Interface for getting information about specific axes, if available.
Definition IAxisInfo.h:36
Interface for control devices, commands to get/set position and veloity limits.
Interface for setting control mode in control board.
Interface for control boards implementing current control.
Control board, extend encoder interface with timestamps.
Interface settings the way the robot interacts with the environment: basic interaction types are Stif...
Interface for controlling a joint equipped with brakes (hardware or simulated).
Definition IJointBrake.h:23
Interface for getting info about the fault which may occur on a robot.
Definition IJointFault.h:23
Control board, encoder interface.
Control board, encoder interface.
Definition IMotor.h:94
Interface for an object that can wrap/attach to to another.
Interface for controlling an axis, by sending directly a PWM reference signal to a motor.
Definition IPWMControl.h:23
Interface for a generic control board device implementing a PID controller, with scaled arguments.
Interface for a generic control board device implementing position control.
Interface for control boards implementing torque control.
Interface for control boards implementing velocity control.
Interface for control boards implementing direct velocity control.
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
A single value (typically within a Bottle).
Definition Value.h:44
static Value * makeList()
Create a list Value.
Definition Value.cpp:452
TEST_CASE("dev::ControlBoardRemapperTest2", "[yarp::dev]")
void exec_iMotorEncoders_test_1(IMotorEncoders *imotenc)
void exec_iAxisInfo_test_1(IAxisInfo *iinfo)
void exec_iControlLimits_test1(IControlLimits *ilims, IAxisInfo *iinfo)
void exec_iMotor_test_1(IMotor *imot)
Definition IMotorTest.h:17
void exec_iCurrentControl_test_1(ICurrentControl *icurr, IControlMode *icmd)
void exec_iTorqueControl_test_1(ITorqueControl *itrq, IControlMode *icmd)
void exec_iInteractionMode_test_1(IInteractionMode *iint, IAxisInfo *iinfo)
void exec_iJointBrake_test1(IJointBrake *ibrake)
void exec_iPidControl_test_1(IPidControl *ipid, IAxisInfo *iaxis)
void exec_iPositionControl_test_1(IPositionControl *ipos, IControlMode *icmd)
void exec_iVelocityDirect_test_1(IVelocityDirect *ivdir, IControlMode *icmd)
void exec_iPwmControl_test_1(IPWMControl *ipwm, IControlMode *icmd)
void exec_iJointFault_test_1(IJointFault *ifault)
void exec_iEncodersTimed_test_1(IEncodersTimed *ienc)
void exec_iControlMode_test_1(IControlMode *icmd, IAxisInfo *iinfo)
void exec_iVelocityControl_test_1(IVelocityControl *ivel, IControlMode *icmd)
void exec_iPidControl_test_2(IPidControl *ipid)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.