Skip to content
Snippets Groups Projects
Commit 86e44552 authored by Mirko Wächter's avatar Mirko Wächter
Browse files

updated pose howtos

parent 5c74d8b2
No related branches found
No related tags found
No related merge requests found
......@@ -7,18 +7,33 @@
\page RobotAPI-HowTos-Eigen-From-Pose How to convert a Variant pose into an Eigen Matrix
\ingroup RobotAPI-HowTos
If you have a armarx::Pose or armarx::FramedPose or armarx::LinkedPose:
\code
#include <RobotAPI/libraries/robotstate/remote/ArmarPose.h>
#include <VirtualRobot/LinkedCoordinate.h>
#include <Eigen/Core>
#include <RobotAPI/libraries/core/LinkedPose.h>
std::string refFrame = "Base";
FramedPositionPtr position = getInput<FramedPosition>("position");
FramedOrientationPtr orientation = getInput<FramedOrientation>("orientation");
FramedPosePtr pose = getInput<FramedPose>("pose"); // if you are in a statechart
Eigen::Matrix4f matrix = pose->toEigen();
VirtualRobot::LinkedCoordinate pose = ArmarPose::createLinkedCoordinate(context->remoteRobot, position, orientation);
\endcode
If you only have a armarx::FramedPosition and armarx::FramedOrientation:
\code
#include <RobotAPI/libraries/core/LinkedPose.h>
std::string refFrame = "Base";
FramedPositionPtr position = getInput<FramedPosition>("position"); // if you are in a statechart
FramedOrientationPtr orientation = getInput<FramedOrientation>("orientation"); // if you are in a statechart
Eigen::Matrix4f matrix = pose.getInFrame(refFrame);
PosePtr pose = new Pose(position, orientation);
Eigen::Matrix4f matrix = pose->toEigen();
\endcode
For more information refer to \ref RobotAPI-FramedPose.
\page RobotAPI-HowTos-Change-Pose-Frame How to change a frame of a coordinate/pose
\ingroup RobotAPI-HowTos
Refer to \ref RobotAPI-FramedPose.
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment