62 public yarp::dev::IControlMode,
63 public yarp::dev::IEncodersTimed,
64 public yarp::dev::IPositionControl,
65 public yarp::dev::IVelocityControl,
71 bool open(yarp::os::Searchable & config)
override;
72 bool close()
override;
76 bool getControlMode(
int j,
int * mode)
override;
77 bool getControlModes(
int * modes)
override;
78 bool getControlModes(
int n_joint,
const int * joints,
int * modes)
override;
79 bool setControlMode(
int j,
int mode)
override;
80 bool setControlModes(
int n_joint,
const int * joints,
int * modes)
override;
81 bool setControlModes(
int * modes)
override;
85 bool getEncodersTimed(
double * encs,
double * time)
override;
86 bool getEncoderTimed(
int j,
double * encs,
double * time)
override;
87 bool resetEncoder(
int j)
override;
88 bool resetEncoders()
override;
89 bool setEncoder(
int j,
double val)
override;
90 bool setEncoders(
const double * vals)
override;
91 bool getEncoder(
int j,
double * v)
override;
92 bool getEncoders(
double * encs)
override;
93 bool getEncoderSpeed(
int j,
double * sp)
override;
94 bool getEncoderSpeeds(
double * spds)
override;
95 bool getEncoderAcceleration(
int j,
double * spds)
override;
96 bool getEncoderAccelerations(
double * accs)
override;
100 bool getAxes(
int * ax)
override;
101 bool positionMove(
int j,
double ref)
override;
102 bool positionMove(
const double * refs)
override;
103 bool relativeMove(
int j,
double delta)
override;
104 bool relativeMove(
const double * deltas)
override;
105 bool checkMotionDone(
int j,
bool * flag)
override;
106 bool checkMotionDone(
bool * flag)
override;
107 bool setRefSpeed(
int j,
double sp)
override;
108 bool setRefSpeeds(
const double * spds)
override;
109 bool setRefAcceleration(
int j,
double acc)
override;
110 bool setRefAccelerations(
const double * accs)
override;
111 bool getRefSpeed(
int j,
double * ref)
override;
112 bool getRefSpeeds(
double * spds)
override;
113 bool getRefAcceleration(
int j,
double * acc)
override;
114 bool getRefAccelerations(
double *accs)
override;
115 bool stop(
int j)
override;
116 bool stop()
override;
117 bool positionMove(
int n_joint,
const int * joints,
const double * refs)
override;
118 bool relativeMove(
int n_joint,
const int * joints,
const double * deltas)
override;
119 bool checkMotionDone(
int n_joint,
const int * joints,
bool * flags)
override;
120 bool setRefSpeeds(
int n_joint,
const int * joints,
const double * spds)
override;
121 bool setRefAccelerations(
int n_joint,
const int *joints,
const double * accs)
override;
122 bool getRefSpeeds(
int n_joint,
const int * joints,
double * spds)
override;
123 bool getRefAccelerations(
int n_joint,
const int * joints,
double * accs)
override;
124 bool stop(
int n_joint,
const int * joints)
override;
125 bool getTargetPosition(
int joint,
double * ref)
override;
126 bool getTargetPositions(
double * refs)
override;
127 bool getTargetPositions(
int n_joint,
const int * joints,
double * refs)
override;
131 bool velocityMove(
int j,
double sp)
override;
132 bool velocityMove(
const double * sp)
override;
133 bool velocityMove(
int n_joint,
const int * joints,
const double * spds)
override;
134 bool getRefVelocity(
int joint,
double * vel)
override;
135 bool getRefVelocities(
double * vels)
override;
136 bool getRefVelocities(
int n_joint,
const int *joints,
double * vels)
override;
139 enum jmc_mode { POSITION_MODE, VELOCITY_MODE, POSITION_DIRECT_MODE };
142 unsigned int axes {0};
143 jmc_mode controlMode {POSITION_MODE};
145 std::vector<double> storedPositions;
146 std::vector<yarp::dev::PolyDriver *> controlledDevices;
147 std::vector<roboticslab::ExposedJoint *> exposedJoints;