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

robot ik gui now displays the poses in root frame

parent cd44d916
No related branches found
No related tags found
No related merge requests found
......@@ -305,7 +305,7 @@ armarx::StringList armarx::RobotIKWidgetController::getIncludePaths()
StringList packages = robotStateComponentPrx->getArmarXPackages();
packages.push_back(Application::GetProjectName());
for (const std::string & projectName : packages)
for (const std::string& projectName : packages)
{
if (projectName.empty())
{
......@@ -416,16 +416,18 @@ void armarx::RobotIKWidgetController::textFieldUpdateTimerCB(void* data, SoSenso
if (controller->visualization->getIsVisualizing())
{
Eigen::Matrix4f tcpMatrix = controller->robot->getRobotNodeSet(controller->ui.comboBox->currentText().toStdString())->getTCP()->getGlobalPose();
Eigen::Matrix4f tcpMatrix = controller->robot->getRobotNodeSet(controller->ui.comboBox->currentText().toStdString())->getTCP()->getPoseInRootFrame();
FramedPose actualPose(tcpMatrix,
controller->robot->getRootNode()->getName(),
controller->robot->getName());
//Set text label to tcp matrix
std::stringstream buffer;
buffer << tcpMatrix;
std::string matrixText = buffer.str();
controller->ui.currentPoseMatrix->setText(QString::fromStdString(matrixText));
controller->ui.currentPoseMatrix->setText(QString::fromStdString(actualPose.output()));
//Set text label for desired tcp pose
controller->ui.desiredPoseMatrix->setText(QString::fromStdString(controller->visualization->getUserDesiredPoseString()));
FramedPose desired(controller->robot->getRootNode()->toLocalCoordinateSystem(controller->visualization->getUserDesiredPose()),
controller->robot->getRootNode()->getName(),
controller->robot->getName());
controller->ui.desiredPoseMatrix->setText(QString::fromStdString(desired.output()));
}
}
......
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