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

improved remote robot sync performance

parent 7b399cc5
No related branches found
No related tags found
No related merge requests found
......@@ -472,6 +472,12 @@ namespace armarx
return result;
}
NameValueMap SharedRobotServant::getConfigAndPose(PoseBasePtr& globalPose, const Current& current)
{
globalPose = getGlobalPose(current);
return getConfig(current);
}
TimestampBasePtr SharedRobotServant::getTimestamp(const Current&) const
{
return new TimestampVariant(updateTimestamp);
......
......@@ -138,6 +138,7 @@ namespace armarx
virtual PoseBasePtr getGlobalPose(const Ice::Current& current = Ice::Current());
NameValueMap getConfig(const Ice::Current& current = Ice::Current());
NameValueMap getConfigAndPose(PoseBasePtr& globalPose, const Ice::Current& current = Ice::Current());
virtual void setGlobalPose(const PoseBasePtr& pose, const Ice::Current& current = Ice::Current());
virtual float getScaling(const Ice::Current& = Ice::Current());
......
......@@ -162,6 +162,7 @@ module armarx
void setGlobalPose(PoseBase globalPose);
PoseBase getGlobalPose();
NameValueMap getConfig();
NameValueMap getConfigAndPose(out PoseBase globalPose);
float getScaling();
};
......
......@@ -462,9 +462,9 @@ namespace armarx
ARMARX_ERROR_S << "NULL data. Aborting..." << endl;
return false;
}
PoseBasePtr globalPose;
RobotConfigPtr c(new RobotConfig(robot, "synchronizeLocalClone"));
NameValueMap jv = sharedRobotPrx->getConfig();
NameValueMap jv = sharedRobotPrx->getConfigAndPose(globalPose);
for (NameValueMap::const_iterator it = jv.begin(); it != jv.end(); it++)
{
......@@ -479,7 +479,7 @@ namespace armarx
}
robot->setConfig(c);
auto pose = PosePtr::dynamicCast(sharedRobotPrx->getGlobalPose());
auto pose = PosePtr::dynamicCast(globalPose);
robot->setGlobalPose(pose->toEigen());
return true;
}
......
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