Skip to content
Snippets Groups Projects
Commit 833fed30 authored by Your Name's avatar Your Name
Browse files

SimpleVirtualRobot component: can now specify global pose

parent 6f996128
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,10 @@ namespace armarx::simple_virtual_robot ...@@ -56,6 +56,10 @@ namespace armarx::simple_virtual_robot
defs->optional(properties.robot.jointValues, "p.robot.jointValues", "Specify a certain joint configuration."); defs->optional(properties.robot.jointValues, "p.robot.jointValues", "Specify a certain joint configuration.");
defs->optional(properties.robot.globalPositionX, "p.robot.globalPositionX", "");
defs->optional(properties.robot.globalPositionY, "p.robot.globalPositionY", "");
defs->optional(properties.robot.globalPositionYaw, "p.robot.globalPositionYaw", "");
return defs; return defs;
} }
...@@ -125,7 +129,8 @@ namespace armarx::simple_virtual_robot ...@@ -125,7 +129,8 @@ namespace armarx::simple_virtual_robot
robot->setJointValues(jointValues); robot->setJointValues(jointValues);
} }
const Eigen::Isometry3f global_T_robot = Eigen::Translation3f{properties.robot.globalPositionX, properties.robot.globalPositionY, 0} * Eigen::AngleAxisf{properties.robot.globalPositionYaw, Eigen::Vector3f::UnitZ()};
robot->setGlobalPose(global_T_robot.matrix());
if (not p.name.empty()) if (not p.name.empty())
{ {
......
...@@ -62,6 +62,10 @@ namespace armarx::simple_virtual_robot ...@@ -62,6 +62,10 @@ namespace armarx::simple_virtual_robot
std::string path; std::string path;
std::string jointValues; // json-style map<std::string, float> std::string jointValues; // json-style map<std::string, float>
float globalPositionX = 0;
float globalPositionY = 0;
float globalPositionYaw = 0;
}; };
Robot robot; Robot 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