com.kuka.roboticsAPI.controllerModel.sunrise.mapping
Class RobotMapper

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.mapping.AbstractMapper<SunriseMappingToken>
      extended by com.kuka.roboticsAPI.controllerModel.sunrise.mapping.SunriseMapper
          extended by com.kuka.roboticsAPI.controllerModel.sunrise.mapping.RobotMapper
Direct Known Subclasses:
CartesianImpedanceControlModeMapper, JointImpedanceControlModeMapper, PositionControlModeMapper

public abstract class RobotMapper
extends SunriseMapper

Mapper for robot objects.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Nested Class Summary
static class RobotMapper.ValueType
          Which type of measurement to use by default.
 
Field Summary
protected static String DEVICE_MAPPING_ALPHA_INPORT
          Key used to identify alpha inport of device.
protected static String DEVICE_MAPPING_PORTS_KEY
          Key used to identify the device mapping ports data.
protected static String DEVICE_MAPPING_TYPE_KEY
          Key used to identify the device mapping type data.
static String IGNORE_MASTERING_STATE
          If this key is set, the motion will not be stopped if the robot is unmastered.
static String NO_AXIS_LIMIT
          If this key is set validator module will not take axis limit into account.
static String NO_DEFAULT_STOP_STRATEGY
          If this key is set, no default mapping of the safety stop signal will be applied.
 
Constructor Summary
RobotMapper()
           
 
Method Summary
protected  boolean addAxisValidator(ISunriseRobot robot)
          Indicates that the axis validator should be included and assigned to the resulting SPR.
static RobotObserver createObserver(Robot robot, SPR spr)
          Creates an observer for the given robot.
static IMotionControlMode getCurrentMotionControlMode(Device currentRobot)
          Gets the current motion control mode of the given robot.
protected static OutPort getObserverAlphaOutport(Robot robot, RobotObserver observer)
          Gets the alpha output port of the observer depending on the last motion.
protected static OutPort getObserverCartPositionOutport(Robot robot, RobotObserver observer)
          Gets the cartesian position output port of the observer depending on the last motion.
protected static String getPipeName(ISunriseRobot robot, IMotionControlMode mode)
          Gets the name of the pipe for the specified device and controlMode.
 void map(SunriseMappingToken info)
          This method is called when the mapper should map a command for which it is registered.
protected abstract  void mapControlMode(SunriseMappingToken info, IMotionControlMode mode, DeviceMappingResult mapResult)
          Specialized control mode mapping.
protected abstract  IMotionControlMode normalizeControlMode(SunriseMappingToken info, IMotionControlMode originalMode)
          Normalizes the control mode that will be mapped.
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.sunrise.mapping.SunriseMapper
beforeMap
 
Methods inherited from class com.kuka.roboticsAPI.controllerModel.mapping.AbstractMapper
getMapperTable, getMappingTypes, performMapping, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_AXIS_LIMIT

public static final String NO_AXIS_LIMIT
If this key is set validator module will not take axis limit into account.

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

NO_DEFAULT_STOP_STRATEGY

public static final String NO_DEFAULT_STOP_STRATEGY
If this key is set, no default mapping of the safety stop signal will be applied. This can be used to apply your own (safety) mapping (note: You have to assign the InPort 'StopRequest' of the pipe, otherwise the SPR will fail).

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

IGNORE_MASTERING_STATE

public static final String IGNORE_MASTERING_STATE
If this key is set, the motion will not be stopped if the robot is unmastered. The default behavior is that a motion will be stopped with an error as soon as the robot is unmastered.

See Also:
Constant Field Values
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

DEVICE_MAPPING_TYPE_KEY

protected static final String DEVICE_MAPPING_TYPE_KEY
Key used to identify the device mapping type data.

See Also:
Constant Field Values

DEVICE_MAPPING_PORTS_KEY

protected static final String DEVICE_MAPPING_PORTS_KEY
Key used to identify the device mapping ports data.

See Also:
Constant Field Values

DEVICE_MAPPING_ALPHA_INPORT

protected static final String DEVICE_MAPPING_ALPHA_INPORT
Key used to identify alpha inport of device.

See Also:
Constant Field Values
Constructor Detail

RobotMapper

public RobotMapper()
Method Detail

map

public final void map(SunriseMappingToken info)
This method is called when the mapper should map a command for which it is registered. It is to be overridden by the descendant mappers.

Specified by:
map in class AbstractMapper<SunriseMappingToken>
Parameters:
info - The mapping information for the current mapping process.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

normalizeControlMode

protected abstract IMotionControlMode normalizeControlMode(SunriseMappingToken info,
                                                           IMotionControlMode originalMode)
Normalizes the control mode that will be mapped. Usually this returns a copy of the original control mode, with context dependent parameters set to the concrete value used for this mapping.

Parameters:
info - mapping token
originalMode - the original control mode
Returns:
the control mode that should be used for mapping

mapControlMode

protected abstract void mapControlMode(SunriseMappingToken info,
                                       IMotionControlMode mode,
                                       DeviceMappingResult mapResult)
Specialized control mode mapping.

Parameters:
info - mapping token
mode - The control mode. This mode should be the result of a prior call to normalizeControlMode(SunriseMappingToken, IMotionControlMode) .
mapResult - Contains the result of a device mapping.

addAxisValidator

protected boolean addAxisValidator(ISunriseRobot robot)
Indicates that the axis validator should be included and assigned to the resulting SPR.

Parameters:
robot - Robot name
Returns:
true if the axis validator should be included, false otherwise.

getPipeName

protected static String getPipeName(ISunriseRobot robot,
                                    IMotionControlMode mode)
Gets the name of the pipe for the specified device and controlMode.

Parameters:
robot - the robot that executes the motion.
mode - motion control mode for the motion.
Returns:
the name of the pipe to be used for the control mode.

getObserverCartPositionOutport

protected static OutPort getObserverCartPositionOutport(Robot robot,
                                                        RobotObserver observer)
Gets the cartesian position output port of the observer depending on the last motion.

Parameters:
robot - the robot for the motion
observer - the used observer
Returns:
the measured or commanded cartesian position output port.

getObserverAlphaOutport

protected static OutPort getObserverAlphaOutport(Robot robot,
                                                 RobotObserver observer)
Gets the alpha output port of the observer depending on the last motion.

Parameters:
robot - the robot for the motion
observer - the used observer
Returns:
the measured or commanded alpha output port.

getCurrentMotionControlMode

public static IMotionControlMode getCurrentMotionControlMode(Device currentRobot)
Gets the current motion control mode of the given robot.

Parameters:
currentRobot - robot for which the control mode is used.
Returns:
the current control mode.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

createObserver

public static RobotObserver createObserver(Robot robot,
                                           SPR spr)
Creates an observer for the given robot.

Parameters:
robot - The robot.
spr - SPR for which created observer should be used.
Returns:
The created observer.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.