42 #include <visp/vpRobot.h>
43 #include <visp/vpRobotException.h>
44 #include <visp/vpDebug.h>
56 maxTranslationVelocity (maxTranslationVelocityDefault),
57 maxRotationVelocity (maxRotationVelocityDefault)
118 unsigned int size = v_in.
size();
119 if (size != v_max.
size())
123 for (
unsigned int i = 0; i < size; i++)
125 double v_i = fabs(v_in[i]);
126 double v_max_i = fabs(v_max[i]);
129 double scale_i = v_max_i/v_i;
134 std::cout <<
"Excess velocity " << v_in[i] <<
" axis nr. " << i << std::endl;
139 v_sat = v_in * scale;
156 stateRobot = newState ;
163 frameRobot = newFrame ;
174 this ->getPosition (frame, r);
193 this ->maxTranslationVelocity = v_max;
205 return this ->maxTranslationVelocity;
217 this ->maxRotationVelocity = w_max;
230 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)