42 #include <visp/vpRobot.h>
43 #include <visp/vpRobotException.h>
44 #include <visp/vpDebug.h>
56 maxTranslationVelocity (maxTranslationVelocityDefault),
57 maxRotationVelocity (maxRotationVelocityDefault)
116 unsigned int size = v_in.
size();
117 if (size != v_max.
size())
121 for (
unsigned int i = 0; i < size; i++)
123 double v_i = fabs(v_in[i]);
124 double v_max_i = fabs(v_max[i]);
127 double scale_i = v_max_i/v_i;
132 std::cout <<
"Excess velocity " << v_in[i] <<
" axis nr. " << i << std::endl;
137 v_sat = v_in * scale;
154 stateRobot = newState ;
161 frameRobot = newFrame ;
179 this ->getPosition (repere, r);
198 this ->maxTranslationVelocity = maxVt;
210 return this ->maxTranslationVelocity;
222 this ->maxRotationVelocity = maxVr;
235 return this ->maxRotationVelocity;
Error that can be emited by the vpRobot class and its derivates.
void setMaxTranslationVelocity(const double maxVt)
double getMaxTranslationVelocity(void) const
static vpColVector saturateVelocities(const vpColVector &v_in, const vpColVector &v_max, bool verbose=false)
double getMaxRotationVelocity(void) const
virtual vpRobotStateType setRobotState(const vpRobot::vpRobotStateType newState)
unsigned int size() const
static const double maxTranslationVelocityDefault
virtual void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &q)=0
Get the robot position (frame has to be specified).
static const double maxRotationVelocityDefault
void setMaxRotationVelocity(const double maxVr)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
vpControlFrameType setRobotFrame(vpRobot::vpControlFrameType newFrame)