\section Overview Overview of the implemented functionality in MotionControl
All functionality is implemented with State to provide a convenient interface
for the non-instant move functions (States receive events when desired targets
are reached).<br/>
The following functionality is available in the MotionControl:
- Direct kinematics: move joints to a desired configuration (armarx::MotionControl::MoveJoints)
- Velocity control: set the desired velocities for joints (armarx::MotionControl::MoveJointsVelocityControl)
- Inverse kinematics: move the TCP of a kinematic chain to a desired pose (armarx::MotionControl::MoveTCPPoseIK)
- Trajectory: move the TCP of a kinematic chain along a trajectory defined by a list of poses (armarx::MotionControl::MoveTCPTrajectory)
- Stop: stop all motion of the robot (armarx::MotionControl::StopRobot)
\section HowTo How to use the states
To use one of the MotionControl states, you have to make it a substate of your own state (see ArmarXCore::Statechart). To set its parameters,
map them from you own state to it. The standard configuration is set in file ${ArmarX_Home}/data/HumanoidRobotAPIConfigs/stateconfigs/MotionControl.xml.
Two kinds of kinematic entities are controlled using the MotionControl: single joints and kinematic chains. A kinematic chain is a list of joints
that usually belong to a part of the robot, e.g. an arm. The joints and the kinematic chains are all defined in the xml files that describe the
kinematic model of the robot (e.g. ${ArmarX_Home/data/ArmarIV/RobotModel/ArmarIV.xml and the files for the subparts). Look in these files to find out the name of
the joint or kinematic chain you want to move.
\subsection UsingMoveJoints Using armarx::MotionControl::MoveJoints
This state moves the specified joints to the desired configuration.
Input parameters:
- jointNames: the names of the joints to be moved
- targetJointValues: the desired joint values
- targetTolerance: tolerance defining how precisely the joint position has to be reached
- timeoutInMs: a timeout after which the attempt to move is aborted
Output parameters:
- jointDistancesToTargets: the distance of each joint to the desired configuration
\subsection UsingMoveJointsVelocityControl Using armarx::MotionControl::MoveJointsVelocityControl
This state moves the specified joints with the desired velocity.
Input parameters:
- jointNames: the names of the joints to be moved
- targetJointVelocities: the desired joint velocities
- targetJointVelocityTolerance: tolerance defining how precisely the joint velocity has to be reached
- timeoutInMs: a timeout after which the attempt is aborted
Output parameters:
- jointVelocitiesDistancesToTargets: the difference between the desired and actual joint velocities
\subsection UsingMoveTCPPoseIK Using armarx::MotionControl::MoveTCPPoseIK
Moves the TCP of the specified kinematic chain to the desired pose if possible.
Input parameters:
- kinematicChainName: the name of the kinematic chain that is used
- targetTCPPosition: the target position for the TCP
- targetTCPOrientation: the target orientation
- targetPositionDistanceTolerance: tolerance for the position to decide if the motion was successfull
- targetOrientationDistanceTolerance: tolerance for the orientation to decide if the motion was successfull
- ikWithOrientation: Consider orientation for IK computation. if false, the rotation of the TCP is not considered.
- timeoutInMs: a timeout after which the motion is aborted
Output parameters:
- TCPDistanceToTarget: kartesian distance between TCP and target position
- TCPOrientationDistanceToTarget: the difference between desired and actual orientation of the TCP
\subsection UsingMoveTCPTrajectory Using armarx::MotionControl::MoveTCPTrajectory
Moves the TCP of the specified kinematic chain along the defined poses.
Input parameters:
- kinematicChainName: the name of the kinematic chain that is used
- targetTCPPositions: the list of target positions for the TCP
- targetTCPOrientations: the list of target orientations
- targetPositionDistanceTolerance: tolerance for the position to decide if the motion was successfull
- targetOrientationDistanceTolerance: tolerance for the orientation to decide if the motion was successfull
- ikWithOrientation: Consider orientation for IK computation. if false, the rotation of the TCP is not considered.
- timeoutInMs: a timeout after which the motion is aborted
Output parameters:
- TCPDistanceToTarget: kartesian distance between TCP and target position
- TCPOrientationDistanceToTarget: the difference between desired and actual orientation of the TCP
\subsection UsingStopRobot Using armarx::MotionControl::StopRobot