6#ifndef IPOSITIONDIRECTTEST_H
7#define IPOSITIONDIRECTTEST_H
16#include <catch2/catch_amalgamated.hpp>
36 for (
size_t i = 0; i <
ax; i++)
52 auto refs = std::vector<double>(
ax);
54 auto joints = std::vector<int>(
ax);
57 b =
ipdir->setPosition(0, ref);
61 b =
ipdir->getRefPosition(0, ref);
68 b =
ipdir->setPositions(refs);
72 b =
ipdir->getRefPositions(refs);
79 b =
ipdir->setPositions(joints, refs);
83 b =
ipdir->getRefPositions(joints, refs);
91 auto refs = std::vector<double>(
ax);
93 auto joints = std::vector<int>(
ax);
96 b =
ipdir->setPosition(0, ref);
100 b =
ipdir->getRefPosition(0, &ref);
107 b =
ipdir->setPositions(refs.data());
111 b =
ipdir->getRefPositions(refs.data());
118 b =
ipdir->setPositions(
ax, joints.data(), refs.data());
122 b =
ipdir->getRefPositions(
ax, joints.data(), refs.data());
Interface for setting control mode in control board.
virtual yarp::dev::ReturnValue getControlMode(int j, yarp::dev::ControlModeEnum &mode)=0
Get the current control mode.
virtual yarp::dev::ReturnValue setControlMode(int j, yarp::dev::SelectableControlModeEnum mode)=0
Set the current control mode.
Interface for a generic control board device implementing position control.
A mini-server for performing network communication in the background.
bool vectors_equal(const std::vector< double > &a, const std::vector< double > &b)
void exec_iPositionDirect_test_1(IPositionDirect *ipdir, IControlMode *icmd)
void set_vector_crescent(std::vector< double > &a, double val)
void wait_safe(const double seconds)
For streams capable of holding different kinds of content, check what they actually have.
@ VOCAB_CM_POSITION_DIRECT
@ VOCAB_CM_POSITION_DIRECT
An interface to the operating system, including Port based communication.