30 #include <VirtualRobot/math/Helpers.h>
31 #include <VirtualRobot/MathTools.h>
36 : posController(tcp), velocityControllerHelper(velocityControllerHelper), currentWaypointIndex(0)
42 : posController(tcp), velocityControllerHelper(velocityControllerHelper), waypoints(waypoints), currentWaypointIndex(0)
47 : posController(tcp), velocityControllerHelper(velocityControllerHelper), currentWaypointIndex(0)
51 this->waypoints.push_back(pose->toEigen());
105 this->waypoints.clear();
108 this->waypoints.push_back(pose->toEigen());
197 float dist = FLT_MAX;
199 for (
size_t i = 0; i <
waypoints.size(); i++)
203 float d = posErr + oriErr * rad2mmFactor;
221 std::stringstream ss;
238 float eps = args.
eps;
240 std::vector<float> initialJointAngles = rns->getJointValues();
242 for (
int i = 0; i < args.
loops; i++)
245 Eigen::VectorXf nullspaceVel = cartesianVelocityController->calculateJointLimitAvoidance();
246 float nullspaceLen = nullspaceVel.norm();
247 if (nullspaceLen > stepLength)
249 nullspaceVel = nullspaceVel / nullspaceLen * stepLength;
255 if (len > stepLength)
260 for (
size_t n = 0; n < rns->getSize(); n++)
262 rns->getNode(n)->setJointValue(rns->getNode(n)->getJointValue() +
jointVelocities(n));
272 if (errorOriAfter < errorOriInitial + 1.f / 180 *
M_PI && errorPosAfter < errorPosInitial + 1.f)
278 rns->setJointValues(initialJointAngles);