6#ifndef IPOSITIONCONTROLTEST_H
7#define IPOSITIONCONTROLTEST_H
15#include <catch2/catch_amalgamated.hpp>
35 for (
size_t i = 0; i <
ax; i++)
49 auto refs = std::vector<double>(
ax);
50 auto joints = std::vector<int>(
ax);
51 std::iota(joints.begin(), joints.end(), 0);
73 auto refs = std::vector<double>(
ax);
74 auto joints = std::vector<int>(
ax);
75 std::iota(joints.begin(), joints.end(), 0);
107 auto refs = std::vector<double>(
ax);
108 auto joints = std::vector<int>(
ax);
109 std::iota(joints.begin(), joints.end(), 0);
132 auto joints = std::vector<int>(
ax);
133 std::iota(joints.begin(), joints.end(), 0);
162 for (
size_t i = 0; i <
ax; i++)
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.
virtual yarp::dev::ReturnValue getTargetPosition(const int joint, double *ref)=0
Get the last position reference for the specified axis.
virtual yarp::dev::ReturnValue setTrajSpeed(int j, double sp)=0
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
virtual yarp::dev::ReturnValue getTargetPositions(double *refs)=0
Get the last position reference for all axes.
virtual yarp::dev::ReturnValue setTrajAcceleration(int j, double acc)=0
Set reference acceleration for a joint.
virtual yarp::dev::ReturnValue relativeMove(int j, double delta)=0
Set relative position.
virtual yarp::dev::ReturnValue getTrajSpeeds(double *spds)=0
Get reference speed of all joints.
virtual yarp::dev::ReturnValue setTrajSpeeds(const double *spds)=0
Set reference speed on all joints.
virtual yarp::dev::ReturnValue positionMove(int j, double ref)=0
Set new reference point for a single axis.
virtual yarp::dev::ReturnValue getTrajAccelerations(double *accs)=0
Get reference acceleration of all joints.
virtual yarp::dev::ReturnValue checkMotionDone(int j, bool &flag)=0
Check if the current trajectory is terminated.
virtual yarp::dev::ReturnValue getAxes(size_t &ax)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue getTrajSpeed(int j, double *ref)=0
Get reference speed for a joint.
virtual yarp::dev::ReturnValue setTrajAccelerations(const double *accs)=0
Set reference acceleration on all joints.
virtual yarp::dev::ReturnValue stop(int j)=0
Stop motion, single joint.
virtual yarp::dev::ReturnValue getTrajAcceleration(int j, double *acc)=0
Get reference acceleration for a joint.
A mini-server for performing network communication in the background.
void wait_safe(const double seconds)
void exec_iPositionControl_test_1(IPositionControl *ipos, IControlMode *icmd)
void exec_iPositionControl_test_unimplemented_interface(IPositionControl *ipos, IControlMode *icmd)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.