29 using namespace GraspingPipelineGroup;
53 TrajectoryPlayerInterfacePrx trajectoryPlayer = getTrajectoryPlayer();
56 TrajectoryPtr trajectory = TrajectoryPtr::dynamicCast(in.getTrajectory());
57 if (trajectory->size() == 0)
66 json->setVariant(
"trajectory",
new Variant(trajectory));
68 trajectoryPlayer->resetTrajectoryPlayer(
false);
69 trajectoryPlayer->loadJointTraj(trajectory);
70 trajectoryPlayer->loadBasePoseTraj(trajectory);
71 trajectoryPlayer->setIsVelocityControl(
true);
73 if (!in.getIsTimeOptimal())
75 size_t dim = trajectory->dim();
78 for (
size_t i = 0; i < dim; i++)
80 double tempLength = trajectory->getLength(i, 0);
81 if (tempLength > length)
86 double speed = length * in.getPlayTimePer1Rad();
89 trajectoryPlayer->setEndTime(trajectory->begin()->getTimestamp() + trajectory->getTimeLength() * speed);
93 trajectoryPlayer->startTrajectoryPlayer();
98 while (!isRunningTaskStopped())
100 if (this->getTrajectoryPlayer()->getCurrentTime() >= this->getTrajectoryPlayer()->getEndTime())