6 #include <VirtualRobot/XML/BaseIO.h>
7 #include <VirtualRobot/XML/RobotIO.h>
15 #include <RobotAPI/libraries/ArmarXObjects/aron/ObjectPose.aron.generated.h>
21 #include <RobotAPI/libraries/armem_robot_state/aron/Robot.aron.generated.h>
31 const std::optional<std::string>& providerName,
32 const std::string& instanceName,
33 VirtualRobot::RobotIO::RobotDescription loadMode)
37 ARMARX_INFO <<
"Found " << descriptions.size() <<
" articulated object descriptions";
39 const auto it = std::find_if(
43 { return desc.name == typeName; });
45 if (it == descriptions.end())
47 ARMARX_WARNING <<
"Description for articulate object with type <" << typeName
48 <<
"> not (yet) available!";
52 ARMARX_DEBUG <<
"Description for articulate object with type <" << typeName
55 auto obj = VirtualRobot::RobotIO::loadRobot(it->xml.toSystemPath(), loadMode);
59 ARMARX_WARNING <<
"Failed to load description for articulated object <" << typeName
64 obj->setName(instanceName);
65 obj->setType(it->name);
74 const std::optional<std::string>& providerName)
76 const auto objectState =
77 queryState(
object.getType() +
"/" +
object.getName(), timestamp, providerName);
81 <<
object.getName() <<
"` " <<
"(type `" <<
object.getType() <<
"`)!";
85 object.setJointValues(objectState->jointMap);
86 object.setGlobalPose(objectState->globalPose.matrix());