Linear motion

Linear motions can be considered the most basic Cartesian motions. The MCP performs movement along a linear path in space from its current position to the given goal position. The MCPs orientation will be interpolated during the motion to match the goal orientation, unless otherwise specified (see fig. 2.2).


PIC
Figure 2.2: Linear motion with orientation interpolation

The following example illustrates the usage of linear motions:

// lwr is a robot of type LWR 
LinInterface linInterface = lwr.use(LinInterface.class); 
 
// (re-)set MCP to lwr flange (optional) 
Frame flange = lwr.getFlange(); 
linInterface.addDefaultParameters(new MotionCenterParameters(flange)); 
 
// do a ptp first, as linear motions from home position cause singularity problems 
lwr.use(PtpInterface.class).ptp(lwr.getBase().plus(0, 0.5, 0.5, 0, 0, Math.PI)).execute(); 
 
// create a motion goal frame 
Frame goal = lwr.getFlange().plus(0.3, 0, 0, 0, 0, Math.PI/2f); 
 
// fix the goal to lwr base, otherwise motion will try to track a moving target 
Frame fixedGoal = goal.snapshot(lwr.getBase()); 
 
// cartesian ptp motion 
linInterface.lin(fixedGoal).execute();

__________________________________________________________________



Robotics API support for: Linear motion


Provided by:

LinearMotionInterface



Also available in:

MotionInterface, LinInterface, CartesianPathMotionInterface



Method(s):

lin(Frame, DeviceParameters...)
lin(Frame, double[], DeviceParameters...)



Valid DeviceParameters:

OverrideParameter, MotionCenterParameter, CartesianParameters, ControllerParameter, RedundancyDeviceParameter, RobotToolParameter, AlphaParameter