16#include <catch2/catch_amalgamated.hpp>
23TEST_CASE(
"dev::ControlBoardCouplingHandlerTest",
"[yarp::dev]")
30 Network::setLocalMode(
true);
32 SECTION(
"Test the controlboard coupling handler")
43 p_cfg.put(
"device",
"fakeMotionControl");
53 p_cfg.put(
"device",
"controlBoardCouplingHandler");
54 p_cfg.put(
"coupling_device",
"fakeJointCoupling");
105 std::vector<double> physJointsPos;
106 physJointsPos.resize(4);
107 CHECK(
iet->getEncoders(physJointsPos.data()));
108 CHECK(physJointsPos[0] == 10);
109 CHECK(physJointsPos[1] == 20);
110 CHECK(physJointsPos[2] == 15);
111 CHECK(physJointsPos[3] == 15);
123 std::vector<double> physJointsVel,physJointsAcc;
124 physJointsVel.resize(4);
125 physJointsAcc.resize(4);
126 CHECK(
iet->getEncoderSpeeds(physJointsVel.data()));
127 CHECK(
iet->getEncoderAccelerations(physJointsAcc.data()));
128 CHECK(physJointsVel[0] == 0);
129 CHECK(physJointsVel[1] == 0);
130 CHECK(physJointsVel[2] == 15);
131 CHECK(physJointsVel[3] == 15);
132 CHECK(physJointsAcc[0] == 0);
133 CHECK(physJointsAcc[1] == 0);
134 CHECK(physJointsAcc[2] == 15);
135 CHECK(physJointsAcc[3] == 15);
140 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.
void exec_params_test(yarp::dev::PolyDriver *pdrv)
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.