- changed title to Iterator over Values Container returns (1,0,0) for Pose2D object
Iterator over Values Container returns (1,0,0) for Pose2D object
Issue #366
invalid
Good day,
I am having trouble with the following block of code:
else if (NLopt)
{
result = NonlinearConjugateGradientOptimizer(graph,initialEstimate).optimize();
result.print("Final Result NL:\n");
}
for(Values::iterator resultKV = result.begin(); resultKV != result.end(); ++resultKV)
{
cout << ((Pose2*)(&resultKV->value))->x() << " " << endl;
}
When I call result.print, the estimated values for the unknown poses are printed. Loop over the values container, the ->x() returns 1 for all elements. Use of t() rather than x() returns (1,0) for all elements.
Any help would be appreciated.
Comments (3)
-
reporter -
-
assigned issue to
-
assigned issue to
-
- changed status to invalid
Should use type specific filters as defined in Values
- Log in to comment