本文整理汇总了C++中Pose2::localCoordinates方法的典型用法代码示例。如果您正苦于以下问题:C++ Pose2::localCoordinates方法的具体用法?C++ Pose2::localCoordinates怎么用?C++ Pose2::localCoordinates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pose2
的用法示例。
在下文中一共展示了Pose2::localCoordinates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
/* ************************************************************************* */
int main()
{
int n = 50000000;
cout << "NOTE: Times are reported for " << n << " calls" << endl;
// create a random pose:
double x = 4.0, y = 2.0, r = 0.3;
Vector v = (Vector(3) << x, y, r).finished();
Pose2 X = Pose2(3,2,0.4), X2 = X.retract(v), X3(5,6,0.3);
TEST(Expmap, Pose2::Expmap(v));
TEST(Retract, X.retract(v));
TEST(Logmap, Pose2::Logmap(X2));
TEST(localCoordinates, X.localCoordinates(X2));
Matrix H1, H2;
Matrix3 H1f, H2f;
TEST(Pose2BetweenFactorEvaluateErrorDefault, Pose2BetweenFactorEvaluateErrorDefault(X3, X, X2, H1, H2));
TEST(Pose2BetweenFactorEvaluateErrorOptimizedBetween, Pose2BetweenFactorEvaluateErrorOptimizedBetween(X3, X, X2, H1, H2));
TEST(Pose2BetweenFactorEvaluateErrorOptimizedBetweenFixed, Pose2BetweenFactorEvaluateErrorOptimizedBetweenFixed(X3, X, X2, H1f, H2f));
// Print timings
tictoc_print_();
return 0;
}
示例2: Pose2BetweenFactorEvaluateErrorDefault
/* ************************************************************************* */
Vector Pose2BetweenFactorEvaluateErrorDefault(const Pose2& measured, const Pose2& p1, const Pose2& p2,
boost::optional<Matrix&> H1, boost::optional<Matrix&> H2)
{
Pose2 hx = p1.between(p2, H1, H2); // h(x)
// manifold equivalent of h(x)-z -> log(z,h(x))
return measured.localCoordinates(hx);
}