Intelligent Coordinates

ArmarX contains a concept for Intelligent Coordinates that eases transformation into different coordinate frames. More...

Classes

class  FramedDirection
 FramedDirection is a 3 dimensional direction vector with a reference frame. More...
 
class  FramedOrientation
 The FramedOrientation class. More...
 
class  FramedPose
 The FramedPose class. More...
 
class  FramedPosition
 The FramedPosition class. More...
 
class  LinkedDirection
 direction vector (NOT a position vector) with an attached robotstate proxy for frame changes. 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...
 

Variables

std::string const GlobalFrame = "Global"
 Variable of the global coordinate system.
 

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 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);
The FramedPosition class.
Definition FramedPose.h:158
IceInternal::Handle< FramedPosition > FramedPositionPtr
Definition FramedPose.h:149

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. 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");
::IceInternal::ProxyHandle<::IceProxy::armarx::SharedRobotInterface > SharedRobotInterfacePrx
Definition FramedPose.h:59
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx

Variable Documentation

◆ GlobalFrame

std::string const 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 65 of file FramedPose.h.