Skip to content
Snippets Groups Projects
Commit 4f7882df authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Register creator "H" for homogeneous

parent 4cb33ec5
No related branches found
No related tags found
1 merge request!363Resolve "Factory for state blocks"
Pipeline #5290 failed
......@@ -66,6 +66,7 @@ WOLF_REGISTER_STATEBLOCK(StateBlock);
WOLF_REGISTER_STATEBLOCK(StateQuaternion);
WOLF_REGISTER_STATEBLOCK(StateAngle);
WOLF_REGISTER_STATEBLOCK(StateHomogeneous3d);
WOLF_REGISTER_STATEBLOCK_WITH_KEY(H, StateHomogeneous3d);
StateBlockPtr create_orientation(const Eigen::VectorXd& _state, bool _fixed)
{
......
......@@ -111,6 +111,15 @@ TEST(FactoryStateBlock, creator_Homogeneous3d)
ASSERT_TRUE(sbh->hasLocalParametrization());
}
TEST(FactoryStateBlock, creator_H)
{
auto sbh = FactoryStateBlock::get().create("H", Eigen::Vector4d(1,2,3,4), false);
ASSERT_EQ(sbh->getSize() , 4);
ASSERT_EQ(sbh->getLocalSize(), 3);
ASSERT_TRUE(sbh->hasLocalParametrization());
}
TEST(FactoryStateBlock, creator_O_is_quaternion)
{
auto sbq = FactoryStateBlock::get().create("O", Eigen::Vector4d(1,2,3,4), false);
......
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