Skip to content
Snippets Groups Projects
Commit 8b3b7984 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Add RobotStateComponentPlugin::transformFromTo

parent 16c2af44
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
* GNU General Public License
*/
#include <RobotAPI/libraries/core/remoterobot/RemoteRobot.h>
#include <RobotAPI/libraries/core/FramedPose.h>
#include "RobotStateComponentPlugin.h"
......@@ -272,6 +273,17 @@ namespace armarx::plugins
{
return _robotStateComponentName;
}
Eigen::Matrix4f RobotStateComponentPlugin::transformFromTo(
const std::string& from,
const std::string& to,
const VirtualRobot::RobotPtr& rob)
{
ARMARX_CHECK_NOT_NULL(rob);
armarx::FramedPose fp{Eigen::Matrix4f::Identity(), from, rob.full->getName()};
fp.changeFrame(rob, to);
return fp.toEigen();
}
}
namespace armarx
......
......@@ -88,9 +88,14 @@ namespace armarx::plugins
RobotData getRobotData(const std::string& id) const;
void setRobotRNSAndNode(const std::string& id, const std::string& rnsName, const std::string& nodeName);
//querry
public:
const RobotStateComponentInterfacePrx& getRobotStateComponent() const;
const RobotNameHelper& getRobotNameHelper() const;
Eigen::Matrix4f transformFromTo(const std::string& from,
const std::string& to,
const VirtualRobot::RobotPtr& rob);
//sync
public:
bool synchronizeLocalClone(const VirtualRobot::RobotPtr& robot) const;
......
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