Skip to content
Snippets Groups Projects
Commit 0b0fbb28 authored by Fabian Reister's avatar Fabian Reister
Browse files

VirtualRobotReader: synchronizing robot when new robot is requested

parent eaf0bbd5
No related branches found
No related tags found
2 merge requests!157armem/dev => master,!154armem_robot_state: updates
This commit is part of merge request !157. Comments created here will be created in the context of that merge request.
......@@ -6,6 +6,7 @@
#include <VirtualRobot/XML/RobotIO.h>
#include "ArmarXCore/core/PackagePath.h"
#include "ArmarXCore/core/logging/Logging.h"
#include "ArmarXCore/core/system/ArmarXDataPath.h"
#include "ArmarXCore/core/system/cmake/CMakePackageFinder.h"
......@@ -41,6 +42,7 @@ namespace armarx::armem::robot_state
const auto robotState = queryState(robotDescription, timestamp);
if (not robotState)
{
ARMARX_WARNING << "Querying robot state failed!";
return false;
}
......@@ -65,8 +67,11 @@ namespace armarx::armem::robot_state
const std::string xmlFilename = ArmarXDataPath::resolvePath(description->xml.serialize().path);
ARMARX_INFO << "Loading (virtual) robot '" << description->name << "' from XML file '" << xmlFilename << "'";
return VirtualRobot::RobotIO::loadRobot(xmlFilename, loadMode);
auto robot = VirtualRobot::RobotIO::loadRobot(xmlFilename, loadMode);
synchronizeRobot(*robot, timestamp);
return robot;
}
......
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