YARP
Yet Another Robot Platform
ControlBoardWrapperPositionControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPOSITIONCONTROL_H
10 #define YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPOSITIONCONTROL_H
11 
13 
15 
16 
18  virtual public ControlBoardWrapperCommon,
20 {
21 public:
22  inline bool getAxes(int* ax) override
23  {
25  }
26  bool positionMove(int j, double ref) override;
27  bool positionMove(const double* refs) override;
28  bool positionMove(const int n_joints, const int* joints, const double* refs) override;
29  bool getTargetPosition(const int joint, double* ref) override;
30  bool getTargetPositions(double* refs) override;
31  bool getTargetPositions(const int n_joint, const int* joints, double* refs) override;
32  bool relativeMove(int j, double delta) override;
33  bool relativeMove(const double* deltas) override;
34  bool relativeMove(const int n_joints, const int* joints, const double* deltas) override;
35  bool checkMotionDone(int j, bool* flag) override;
36  bool checkMotionDone(bool* flag) override;
37  bool checkMotionDone(const int n_joints, const int* joints, bool* flags) override;
38  bool setRefSpeed(int j, double sp) override;
39  bool setRefSpeeds(const double* spds) override;
40  bool setRefSpeeds(const int n_joints, const int* joints, const double* spds) override;
41  inline bool setRefAcceleration(int j, double acc) override { return ControlBoardWrapperCommon::setRefAcceleration(j, acc); }
42  inline bool setRefAccelerations(const double* accs) override { return ControlBoardWrapperCommon::setRefAccelerations(accs); }
43  inline bool setRefAccelerations(const int n_joints, const int* joints, const double* accs) override { return ControlBoardWrapperCommon::setRefAccelerations(n_joints, joints, accs); }
44  bool getRefSpeed(int j, double* ref) override;
45  bool getRefSpeeds(double* spds) override;
46  bool getRefSpeeds(const int n_joints, const int* joints, double* spds) override;
47  inline bool getRefAcceleration(int j, double* acc) override { return ControlBoardWrapperCommon::getRefAcceleration(j, acc); }
48  inline bool getRefAccelerations(double* accs) override { return ControlBoardWrapperCommon::getRefAccelerations(accs); }
49  inline bool getRefAccelerations(const int n_joints, const int* joints, double* accs) override { return ControlBoardWrapperCommon::getRefAccelerations(n_joints, joints, accs); }
50  inline bool stop(int j) override { return ControlBoardWrapperCommon::stop(j); }
51  inline bool stop() override { return ControlBoardWrapperCommon::stop(); }
52  inline bool stop(const int n_joints, const int* joints) override { return ControlBoardWrapperCommon::stop(n_joints, joints); }
53 };
54 
55 #endif // YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERPOSITIONCONTROL_H
ControlBoardWrapperPositionControl::setRefAccelerations
bool setRefAccelerations(const int n_joints, const int *joints, const double *accs) override
Set reference acceleration on all joints.
Definition: ControlBoardWrapperPositionControl.h:43
ControlBoardWrapperCommon::stop
bool stop()
Definition: ControlBoardWrapperCommon.cpp:236
ControlBoardWrapperPositionControl::getRefAccelerations
bool getRefAccelerations(double *accs) override
Get reference acceleration of all joints.
Definition: ControlBoardWrapperPositionControl.h:48
ControlBoardWrapperPositionControl::getTargetPosition
bool getTargetPosition(const int joint, double *ref) override
Get the last position reference for the specified axis.
Definition: ControlBoardWrapperPositionControl.cpp:107
ControlBoardWrapperPositionControl::positionMove
bool positionMove(int j, double ref) override
Set new reference point for a single axis.
Definition: ControlBoardWrapperPositionControl.cpp:14
ControlBoardWrapperPositionControl::setRefAcceleration
bool setRefAcceleration(int j, double acc) override
Set reference acceleration for a joint.
Definition: ControlBoardWrapperPositionControl.h:41
ControlBoardWrapperPositionControl::getRefAccelerations
bool getRefAccelerations(const int n_joints, const int *joints, double *accs) override
Get reference acceleration for a joint.
Definition: ControlBoardWrapperPositionControl.h:49
ControlBoardWrapperPositionControl::stop
bool stop(const int n_joints, const int *joints) override
Stop motion for subset of joints.
Definition: ControlBoardWrapperPositionControl.h:52
ControlBoardWrapperPositionControl::setRefSpeed
bool setRefSpeed(int j, double sp) override
Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
Definition: ControlBoardWrapperPositionControl.cpp:383
ControlBoardWrapperCommon::getRefAcceleration
bool getRefAcceleration(int j, double *acc)
Definition: ControlBoardWrapperCommon.cpp:113
ControlBoardWrapperPositionControl::getTargetPositions
bool getTargetPositions(double *refs) override
Get the last position reference for all axes.
Definition: ControlBoardWrapperPositionControl.cpp:133
ControlBoardWrapperPositionControl::setRefAccelerations
bool setRefAccelerations(const double *accs) override
Set reference acceleration on all joints.
Definition: ControlBoardWrapperPositionControl.h:42
ControlBoardWrapperCommon.h
ControlBoardWrapperPositionControl::getRefSpeed
bool getRefSpeed(int j, double *ref) override
Get reference speed for a joint.
Definition: ControlBoardWrapperPositionControl.cpp:473
ControlBoardWrapperCommon
Definition: ControlBoardWrapperCommon.h:19
ControlBoardWrapperPositionControl::stop
bool stop() override
Stop motion, multiple joints.
Definition: ControlBoardWrapperPositionControl.h:51
ControlBoardWrapperPositionControl
Definition: ControlBoardWrapperPositionControl.h:20
IPositionControl.h
ControlBoardWrapperPositionControl::getAxes
bool getAxes(int *ax) override
Get the number of controlled axes.
Definition: ControlBoardWrapperPositionControl.h:22
ControlBoardWrapperPositionControl::getRefAcceleration
bool getRefAcceleration(int j, double *acc) override
Get reference acceleration for a joint.
Definition: ControlBoardWrapperPositionControl.h:47
ControlBoardWrapperPositionControl::getRefSpeeds
bool getRefSpeeds(double *spds) override
Get reference speed of all joints.
Definition: ControlBoardWrapperPositionControl.cpp:498
ControlBoardWrapperPositionControl::stop
bool stop(int j) override
Stop motion, single joint.
Definition: ControlBoardWrapperPositionControl.h:50
ControlBoardWrapperPositionControl::setRefSpeeds
bool setRefSpeeds(const double *spds) override
Set reference speed on all joints.
Definition: ControlBoardWrapperPositionControl.cpp:406
ControlBoardWrapperCommon::setRefAcceleration
bool setRefAcceleration(int j, double acc)
Definition: ControlBoardWrapperCommon.cpp:21
ControlBoardWrapperPositionControl::relativeMove
bool relativeMove(int j, double delta) override
Set relative position.
Definition: ControlBoardWrapperPositionControl.cpp:205
ControlBoardWrapperCommon::getAxes
bool getAxes(int *ax)
Definition: ControlBoardWrapperCommon.cpp:14
ControlBoardWrapperCommon::setRefAccelerations
bool setRefAccelerations(const double *accs)
Definition: ControlBoardWrapperCommon.cpp:45
ControlBoardWrapperCommon::getRefAccelerations
bool getRefAccelerations(double *accs)
Definition: ControlBoardWrapperCommon.cpp:138
yarp::dev::IPositionControl
Interface for a generic control board device implementing position control.
Definition: IPositionControl.h:257
ControlBoardWrapperPositionControl::checkMotionDone
bool checkMotionDone(int j, bool *flag) override
Check if the current trajectory is terminated.
Definition: ControlBoardWrapperPositionControl.cpp:282