If I see it right, the only option to move the robot via FRI cartesian, is though a little workaround, by using the transformationProvider.
In this case you send a transformation matrix like :
{ 1, 0, 0, 10},
{ 0, 1, 0, 10},
{ 0, 0, 1, 10}
So the code on the client side would look like:
void TransformationProviderClient::provide()
{
// Change the translational vector of the transformation matrix (all values in mm)
double x = _transformationMatrix[0][3];
_transformationMatrix[0][3] = 1;
double y = _transformationMatrix[1][3];
_transformationMatrix[1][3] = -400;
double z = _transformationMatrix[2][3];
_transformationMatrix[2][3] = 560;
// Set new transformation matrix for frame with identifier"PBase"
setTransformation("PBase", _transformationMatrix, getTimestampSec(), getTimestampNanoSec());
}
Display More
on the Robot side (not the whole program. just the important sections)
// Select the frame from the scene graph whose transformation is changed by the client application.
friConfiguration.registerTransformationProvider("PBase", objectBase);
temp_frame = _lbr.getCurrentCartesianPosition(_lbr.getFlange());
temp_frame.setAlphaRad(objectBase.getAlphaRad() + temp_frame.getAlphaRad()) ;
temp_frame.setBetaRad(objectBase.getBetaRad() + temp_frame.getBetaRad()) ;
temp_frame.setGammaRad(objectBase.getGammaRad() + temp_frame.getGammaRad()) ;
temp_frame.setX(objectBase.getX());
temp_frame.setY(objectBase.getY());
temp_frame.setZ(objectBase.getZ());
_lbr.move(ptp(temp_frame).setJointVelocityRel(0.1));
Display More
for me that "solution" is very unpractical. One problem is, that you do not get the current axes values from the robot though the FRI back on the client side.
I would be very happy to get better ideas to make that a little bit more smart.