cerebro icon indicating copy to clipboard operation
cerebro copied to clipboard

change to ceres error

Open Natalie-ZG opened this issue 6 years ago • 1 comments

Hi. Thanks for your excellent work firstly.

I have tried to modify "#if 1" to "#if 0" at this part below to change to ceres instead of Theia sfm. But I got different results comparing to using Theia sfm with the same ros bag. It can pass the makeLoopEdgeMsgWithConsistencyCheck with Theia, but not with ceres. I'm confused whether I was wrong to switch the dependence.

cerebro/src/Cerebro.cpp

   #if 1
   //--
   float pnp_goodness = StaticTheiaPoseCompute::PNP( world_point_uv, feature_position_uv_d, op1__b_T_a, pnp__msg  );
   //--END
   #else
   //--
   op1__b_T_a = odom_b_T_a; // setting initial guess as odometry rel pose with translation as zero
   // op1__b_T_a(0,3) = 0.0; op1__b_T_a(1,3) = 0.0; op1__b_T_a(2,3) = 0.0;
   float pnp_goodness = StaticCeresPoseCompute::PNP( world_point_uv, feature_position_uv_d, op1__b_T_a, pnp__msg  );
   //--END
   #endif

Would you please help me with this issue? Thanks again.

Natalie-ZG avatar Nov 08 '19 06:11 Natalie-ZG

actually you are better off using the theia pose computation for now. For that to work you need theia.

Here is why the standard ceres based method fails: The theia's pose computation is a 2 step process a) closed form computation of the pose b) non-linear refinement stage.

In my ceres based method, it is only refining the input pose. If the initial estimate of the pose is bad it won't work as expected. This is especially the case under kidnap, when the poses from odometry is really a bad guess for relative pose computation at loop candidates.

I am working to eliminate the dependence on theia. Look at my branch: robust-pose-computation However it is not ready yet.

Let me know if this answers your question.

mpkuse avatar Nov 08 '19 08:11 mpkuse