Intelligent Coordinates


class  FramedDirection
 FramedDirection is a 3 dimensional direction vector with a reference frame. The reference frame can be used to change the coordinate system to which the vector relates. The difference to a FramedPosition is, that on frame changing only the orientation of the vector is changed. The length of the vector remains unchanged. This class is usefull e.g. for forces and tcp velocities. More...
class  FramedOrientation
 The FramedOrientation class. More...
class  FramedPose
 The FramedPose class. More...
class  FramedPosition
 The FramedPosition class. More...
class  LinkedDirection
 The LinkedDirection class. More...
class  LinkedPose
 The LinkedPose class. More...
class  Pose
 The Pose class. More...
class  Quaternion
 The Quaternion class. More...
class  Vector3
 The Vector3 class. More...


const std::string GlobalFrame = "Global"

Detailed Description

ArmarX contains a concept for Intelligent Coordinates that eases transformation into different coordinate frames. Here, we mean with coordinates positions, orientation, and poses. These Intelligent Coordinates exist in 3 levels of "intelligence".

Frames of coordinates

The frame of FramedX or LinkedX is technically just a string. The possible values are the names of the robot nodes (use RobotViewer app of Simox to inspect them). For global poses exists the global constant string variable armarx::GlobalFrame located in the FramedPose.h. Use this variable if you specify global poses and an empty Agent-string. Empty frames should be avoided (though, an empty string is mostly considered as the global frame).

Creation of new FramedPositions

To create a new FramedPosition (FramedOrientation, FramedVector and FramedPose work analogously) one needs to know the position, the coordinate frame name and the agent name. The coordinate frame is usually the name of the RobotNode, e.g. the tcp of the robot. All nodes of a robot can be inspected with the Simox tool RobotViewer. The agent name can be retrieved via the armarx::RobotStateComponent like this:

std::string agentName = robotStateInterfacePrx->getRobotName();

So an example code for creating a new FramedPosition looks like this:

RobotStateComponentInterfacePrx robotStateInterfacePrx = ....; // you need to have this proxy
SharedRobotInterfacePrx robot = robotStateInterfacePrx->getSynchronizedRobot();
std::string agentName = robotStateInterfacePrx->getRobotName();
std::string frame = robot->getRoot()->getName();
Eigen::Vector3f pos;
pos << 100, 0, 0;
armarx::FramedPositionPtr position = new armarx::FramedPosition(pos, frame, agentName);

Refer to the Howto at get a proxy to learn how to obtain a proxy.

Change the frame of a FramedPosition

In ArmarX the most common coordinate type is the FramedX, e.g. FramedPosition. To change the frame in this coordinate type, you can call changeFrame() on the FramedPosition. You need to know the new frame, in which you want to transform the FramedPosition and a proxy to the robot proxy (e.g. armarx::RobotStateComponent::getSynchronizedRobot):

armarx::RobotStateComponentInterfacePrx robotStateInterfacePrx = ....; // you need to have this proxy
armarx::SharedRobotInterfacePrx robot = robotStateInterfacePrx->getSynchronizedRobot();
agentName = robot->getName();
std::string frame = root->getRoot()->getName();
Eigen::Vector3f pos;
pos << 100, 0, 0;
armarx::FramedPositionPtr position = new armarx::FramedPosition(pos, frame, agentName);
position->changeFrame(robot, "TCP L");

Variable Documentation

◆ GlobalFrame

const std::string GlobalFrame = "Global"

#include <RobotAPI/libraries/core/FramedPose.h>

Variable of the global coordinate system. use this if you are specifying a global pose.

Definition at line 62 of file FramedPose.h.

IceInternal::Handle< FramedPosition >
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
Definition: RobotVisuWidget.h:57
::IceInternal::ProxyHandle< ::IceProxy::armarx::SharedRobotInterface > SharedRobotInterfacePrx
Definition: FramedPose.h:57
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
const VariantTypeId FramedPosition
Definition: FramedPose.h:39