Commit 2b53b4a0 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Device::configSpace does not merge the vector spaces and uses SE(n)

parent bdfdb4b1
......@@ -263,7 +263,7 @@ namespace hpp {
static void algo(const se3::JointModelBase<JointModel> &,
LiegroupSpace& space)
{
typedef typename LieGroupTpl::operation<JointModel>::type LG_t;
typedef typename DefaultLieGroupMap::operation<JointModel>::type LG_t;
space *= LiegroupSpace::create (LG_t());
}
......@@ -300,7 +300,6 @@ namespace hpp {
ConfigSpaceVisitor::run(m.joints[i], args);
if (extraConfigSpace_.dimension() > 0)
*configSpace_ *= LiegroupSpace::create (extraConfigSpace_.dimension());
configSpace_->mergeVectorSpaces();
}
bool Device::
......
......@@ -70,17 +70,20 @@ BOOST_AUTO_TEST_CASE (computeAABB)
BOOST_AUTO_TEST_CASE (unit_test_device)
{
DevicePtr_t robot;
LiegroupSpaceConstPtr_t space;
LiegroupSpacePtr_t space;
robot = makeDeviceSafe (unittest::HumanoidRomeo);
space = robot->configSpace();
BOOST_CHECK_EQUAL (space->name(), "R^3*SO(3)*R^31");
space = LiegroupSpace::createCopy(robot->configSpace());
space->mergeVectorSpaces();
BOOST_CHECK_EQUAL (space->name(), "SE(3)*R^31");
robot = makeDeviceSafe (unittest::CarLike);
space = robot->configSpace();
BOOST_CHECK_EQUAL (space->name(), "R^2*SO(2)*R^2");
space = LiegroupSpace::createCopy(robot->configSpace());
space->mergeVectorSpaces();
BOOST_CHECK_EQUAL (space->name(), "SE(2)*R^2");
robot = makeDeviceSafe (unittest::ManipulatorArm2);
space = robot->configSpace();
space = LiegroupSpace::createCopy(robot->configSpace());
space->mergeVectorSpaces();
BOOST_CHECK_EQUAL (space->name(), "R^19");
}
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