28 #include <VirtualRobot/XML/RobotIO.h>
30 #include <Eigen/src/Core/Matrix.h>
38 localCopy_(
VirtualRobot::RobotIO::loadRobot(objectSource.path.toSystemPath()))
40 localCopy_->setName(instanceName);
45 const std::string& newName = simulator->addRobot(
getObjectSource().path.toSystemPath());
51 const PoseBasePtr& poseBase = simulator->getRobotPose(
getInstanceName());
52 Pose p(poseBase->position, poseBase->orientation);
53 localCopy_->setGlobalPose(p.
toEigen());
58 PosePtr pose(
new Pose(localCopy_->getGlobalPose()));
63 const VirtualRobot::SceneObjectSetPtr& objectSet)
65 bool collision =
false;
66 for (
const auto& colModel : localCopy_->getCollisionModels())
68 collision |= col->checkCollision(colModel, objectSet);
75 return std::make_unique<Pose>(localCopy_->getGlobalPose());
80 localCopy_->setGlobalPose(pose->toEigen());