Linear Movement Using Robot Movement CalBack

Below you can find my code used for testing a robot position stored in datamodel.

verifyOverEoat.addActionListener(new ActionListener() {

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		JointPositions nullPose=null;
		int i=combo.getSelectedIndex();
		JointPositions j;
		try {
			j=contribution.fromStringToJointPositions(contribution.dataModel.get("overToolJoints"+i, ""));

			contribution.apiProvider.getUserInterfaceAPI().getUserInteraction().getRobotMovement().requestUserToMoveRobot(j, new RobotMovementCallback() {

				@Override
				public void onComplete(MovementCompleteEvent event) {
					// TODO Auto-generated method stub
					System.out.println("movimento finito");
				}
			});
		}catch (Exception e1){
			popup.setErrorPopup( "Set the OVER EOAT Position", "EOAT Position ERROR!");
		}
	}
});

This movement is Joint movent my question is : Can i obtain a linear movement in a similar way.
Thank for the attencion.

I don’t believe this it is possible to perform a linear move using RobotMovementCallback, rather you would have to code your own “Move Here” button that sent a MoveL() command to the secondary client, as demonstrated in this post

Hope this helps

In the Javadoc of the requestUserToMoveRobot(Pose, ...) call says that;

The Automove function will move the robot TCP to the target position linearly in Cartesian space. If this it not possible, the robot will move to the target linearly in joint space.

Linearly in Cartesian space is equivalent to MoveL, which will be done if possible.
Linearly in joint space is equivalent to MoveJ, which is the fallback option.

If specifying the JointPositions vector (as your code mentions), this will always be MoveJ.
Our recommendation will be to use the Pose option, instead of doing a workaround yourself, if you prefer a linear movement.

1 Like