Unverified Commit 0bd86b8f authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Fix creation of devices for unit tests

romeo_description and hpp_environments are only runtime dependencies (and not compile time dependencies).
parent 8ba9fb49
......@@ -52,7 +52,6 @@ namespace hpp {
{
(void)prefix;
switch (type) {
#ifdef HPP_ENVIRONMENTS
case CarLike:
{
DevicePtr_t robot = Device::create("carlike");
......@@ -70,14 +69,7 @@ namespace hpp {
"_simple", "_simple");
return robot;
}
#else
case CarLike:
case ManipulatorArm2:
throw std::invalid_argument("hpp-pinocchio was compiled without HPP_ENVIRONMENTS");
#endif
break;
case HumanoidRomeo:
#ifdef ROMEO_DESCRIPTION
{
HumanoidRobotPtr_t robot = HumanoidRobot::create("romeo");
urdf::loadRobotModel (robot, 0, prefix, "freeflyer",
......@@ -88,10 +80,6 @@ namespace hpp {
robot->model().upperPositionLimit.head<3>().setOnes();
return robot;
}
#else
throw std::invalid_argument("hpp-pinocchio was compiled without ROMEO_DESCRIPTION");
#endif
break;
default:
throw std::invalid_argument("Unknown robot type.");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment