15#include <catch2/catch_amalgamated.hpp>
25 "AxisName (\"axisA1\" \"axisA2\") \n";
31 "AxisName (\"axisB1\" \"axisB2\" \"axisB3\") \n";
37 "AxisName (\"axisC1\" \"axisC2\" \"axisC3\" \"axisC4\") \n";
43 "AxisName (\"axisA1\" \"axisA2\") \n";
49 "AxisName (\"axisB1\" \"axisB2\" \"axisB3\") \n";
55 "AxisName (\"axisC1\" \"axisC2\" \"axisC3\" \"axisC4\") \n";
58 "name /testRemapperRobot/a\n"
62 "name /testRemapperRobot/b\n"
66 "name /testRemapperRobot/c\n"
100 setPosition[
i] =
i*100.0+50.0 +
rand;
101 setRefSpeeds[
i] =
i*10.0+5 +
rand;
192 setPosition[
i] =
i*100.0+50.0 +
rand;
193 setRefSpeeds[
i] =
i*10.0+5 +
rand;
234TEST_CASE(
"dev::ControlBoardRemapperTest",
"[yarp::dev]")
242 Network::setLocalMode(
true);
244 SECTION(
"Test the controlboard remapper")
248 std::vector<PolyDriver *>
fmcbs;
269 for(
int i=0;
i < 3;
i++)
311 for(
int i=0;
i < 3;
i++)
329 axesListWN.addString(
"thisIsAnAxisNameThatDoNotExist");
346 pRemapper.put(
"device",
"controlboardremapper");
389 pRemoteRemapper.put(
"localPortPrefix",
"/test/remoteControlBoardRemapper");
392 opts.put(
"writeStrict",
"on");
404 for(
int i=0;
i < 3;
i++)
415 SECTION(
"Test the controlboard remapper micro")
419 std::vector<PolyDriver *>
fmcbs;
430 fmcbsNames.push_back(
"fakeControlBoardAMicro");
431 fmcbsNames.push_back(
"fakeControlBoardBMicro");
432 fmcbsNames.push_back(
"fakeControlBoardCMicro");
440 for(
int i=0;
i < 3;
i++)
486 for(
int i=0;
i < 3;
i++)
504 axesListWN.addString(
"thisIsAnAxisNameThatDoNotExist");
521 pRemapper.put(
"device",
"controlboardremapper");
564 pRemoteRemapper.put(
"localPortPrefix",
"/test/remoteControlBoardRemapper");
567 opts.put(
"writeStrict",
"on");
579 for(
int i=0;
i < 3;
i++)
590 Network::setLocalMode(
false);
define control board standard interfaces
constexpr yarp::conf::vocab32_t VOCAB_CM_POSITION
constexpr yarp::conf::vocab32_t VOCAB_CM_POSITION_DIRECT
Interface for getting information about specific axes, if available.
Interface for setting control mode in control board.
Control board, encoder interface.
Interface for an object that can wrap/attach to to another.
Interface for a generic control board device implementing position control.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool setRefSpeeds(const double *spds)=0
Set reference speed on all joints.
Interface for a generic control board device implementing position control.
A container for a device driver.
A simple collection of objects that can be described and transmitted in a portable way.
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.
const char * wrapperC_file_content
static void checkRemapperMicro(yarp::dev::PolyDriver &ddRemapper, int rand, size_t nrOfRemappedAxes)
TEST_CASE("dev::ControlBoardRemapperTest", "[yarp::dev]")
const char * fmcA_file_content_micro
const char * fmcA_file_content
const char * fmcB_file_content_micro
const char * fmcB_file_content
const char * fmcC_file_content_micro
const char * fmcC_file_content
static void checkRemapper(yarp::dev::PolyDriver &ddRemapper, int rand, size_t nrOfRemappedAxes)
const char * wrapperA_file_content
const char * wrapperB_file_content
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.