Hi,
I am trying to use iiwa7 do position trajectory following task.
I had just finished all setup as mentioned in https://github.com/epfl-lasa/iiwa_ros using FRI .
the JAVA CODE in the robot side is
Code
// configure and start FRI session
FRIConfiguration friConfiguration = FRIConfiguration.createRemoteConfiguration(_lbr, _clientName);
// for torque mode, there has to be a command value at least all 5ms
friConfiguration.setSendPeriodMilliSec(5);
friConfiguration.setReceiveMultiplier(1);
getLogger().info("Creating FRI connection to " + friConfiguration.getHostName());
getLogger().info("SendPeriod: " + friConfiguration.getSendPeriodMilliSec() + "ms |"
+ " ReceiveMultiplier: " + friConfiguration.getReceiveMultiplier());
FRISession friSession = new FRISession(friConfiguration);
// wait until FRI session is ready to switch to command mode
try
{
friSession.await(10, TimeUnit.SECONDS);
}
catch (final TimeoutException e)
{
getLogger().error(e.getLocalizedMessage());
friSession.close();
return;
}
getLogger().info("FRI connection established.");
ClientCommandMode mode = ClientCommandMode.POSITION;
FRIJointOverlay jointOverlay = new FRIJointOverlay(friSession, mode);
double stiffness = 500.;
// start PositionHold with overlay
JointImpedanceControlMode ctrMode = new JointImpedanceControlMode(stiffness, stiffness, stiffness, stiffness, stiffness, stiffness, stiffness);
try {
PositionHold posHold = new PositionHold(ctrMode, -1, TimeUnit.SECONDS);
getLogger().info("Robot is ready for ROS control.");
_lbr.move(posHold.addMotionOverlay(jointOverlay));
}
catch(final CommandInvalidException e) {
getLogger().error("ROS has been disconnected.");
}
// done
friSession.close();
Display More
Now, I can use moveit in Rivz to drag the robot and the real iiwa can follow the drag trajectory.
The question is : the robot is not actually in Pure Postion Mode, even the stiffness is set to high value, and the robot was not accurate acchieve the goal which effected by the gravity.
How can I just use pure postion mode to do position trajectory task?