15#include <catch2/catch_amalgamated.hpp>
22TEST_CASE(
"dev::ControlBoardCouplingHandlerTest",
"[yarp::dev]")
29 Network::setLocalMode(
true);
31 SECTION(
"Test the controlboard coupling handler")
42 p_cfg.put(
"device",
"fakeMotionControl");
52 p_cfg.put(
"device",
"controlBoardCouplingHandler");
53 p_cfg.put(
"coupling_device",
"fakeJointCoupling");
103 std::vector<double> physJointsPos;
104 physJointsPos.resize(4);
105 CHECK(
iet->getEncoders(physJointsPos.data()));
106 CHECK(physJointsPos[0] == 10);
107 CHECK(physJointsPos[1] == 20);
108 CHECK(physJointsPos[2] == 15);
109 CHECK(physJointsPos[3] == 15);
121 std::vector<double> physJointsVel,physJointsAcc;
122 physJointsVel.resize(4);
123 physJointsAcc.resize(4);
124 CHECK(
iet->getEncoderSpeeds(physJointsVel.data()));
125 CHECK(
iet->getEncoderAccelerations(physJointsAcc.data()));
126 CHECK(physJointsVel[0] == 0);
127 CHECK(physJointsVel[1] == 0);
128 CHECK(physJointsVel[2] == 15);
129 CHECK(physJointsVel[3] == 15);
130 CHECK(physJointsAcc[0] == 0);
131 CHECK(physJointsAcc[1] == 0);
132 CHECK(physJointsAcc[2] == 15);
133 CHECK(physJointsAcc[3] == 15);
138 Network::setLocalMode(
false);
TEST_CASE("dev::ControlBoardCouplingHandlerTest", "[yarp::dev]")
define control board standard interfaces
Interface for getting information about specific axes, if available.
Control board, extend encoder interface with timestamps.
Interface for a generic control board device implementing position control.
A container for a device driver.
Helper interface for an object that can wrap/or "attach" to a single other device.
A mini-server for performing network communication in the background.
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.
For streams capable of holding different kinds of content, check what they actually have.
void delay(double seconds)
Wait for a certain number of seconds.
An interface to the operating system, including Port based communication.