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

ft obs: creating real local robot clone from file

parent 3242b0a0
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ void ForceTorqueObserver::onInitObserver()
offeringTopic("DebugDrawerUpdates");
auto sensorRobotNodeSplit = armarx::Split(getProperty<std::string>("SensorRobotNodeMapping").getValue(), ",");
for (auto & elem : sensorRobotNodeSplit)
for (auto& elem : sensorRobotNodeSplit)
{
boost::trim(elem);
auto split = armarx::Split(elem, ":");
......@@ -97,7 +97,7 @@ void ForceTorqueObserver::onInitObserver()
void ForceTorqueObserver::onConnectObserver()
{
robot = getProxy<RobotStateComponentInterfacePrx>(getProperty<std::string>("RobotStateComponentName").getValue());
localRobot = RemoteRobot::createLocalClone(robot);
localRobot = RemoteRobot::createLocalCloneFromFile(robot, VirtualRobot::RobotIO::eStructure);
debugDrawer = getTopic<DebugDrawerInterfacePrx>("DebugDrawerUpdates");
if (getProperty<bool>("VisualizeForce").getValue())
{
......@@ -125,7 +125,7 @@ void ForceTorqueObserver::visualizerFunction()
ScopedLock lock(dataMutex);
std::set<std::string> frameAlreadyReported;
for (auto & channel : channels)
for (auto& channel : channels)
{
try
{
......@@ -140,7 +140,7 @@ void ForceTorqueObserver::visualizerFunction()
}
frameAlreadyReported.insert(value->frame);
auto force = value->toGlobal(localRobot);
// ARMARX_INFO << deactivateSpam(5,channel.first) << "new force" << channel.first << " : " << force->toEigen();
ARMARX_DEBUG << deactivateSpam(5, channel.first) << "new force " << channel.first << " : " << force->toEigen() << " original frame: " << value->frame;
float forceMag = force->toEigen().norm() * forceFactor;
Vector3Ptr pos = new Vector3(localRobot->getRobotNode(value->frame)->getGlobalPose());
......
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