28 #include <ArmarXCore/interface/core/PackagePath.h>
30 #include <VirtualRobot/XML/ObjectIO.h>
38 const armarx::data::PackagePath& pp = objectSource.
path.
serialize();
39 std::filesystem::path relPath(pp.path);
40 ARMARX_CHECK(!relPath.empty()) <<
"Relative path to object should not be empty";
41 if (!relPath.empty() && relPath.begin()->string() == pp.package)
43 relPath = relPath.lexically_relative(*relPath.begin());
47 localCopy_ = VirtualRobot::ObjectIO::loadManipulationObject(newPackagePath.
toSystemPath());
48 localCopy_->setName(instanceName);
53 PosePtr pose(
new Pose(localCopy_->getGlobalPose()));
59 const PoseBasePtr& poseBase = simulator->getObjectPose(
getInstanceName());
60 Pose p(poseBase->position, poseBase->orientation);
61 localCopy_->setGlobalPose(p.
toEigen());
66 PosePtr pose(
new Pose(localCopy_->getGlobalPose()));
71 const VirtualRobot::SceneObjectSetPtr& objectSet)
73 return col->checkCollision(localCopy_->getCollisionModel(), objectSet);
78 return std::make_unique<Pose>(localCopy_->getGlobalPose());
83 localCopy_->setGlobalPose(pose->toEigen());