symao / PnPL

Perspective n Point and Line for camera pose estimation.
135 stars 47 forks source link

buildSystem(): NaN within Jacobian for edge 0x56163c2901e0 for vertex 1 #8

Open weiningwei opened 3 years ago

weiningwei commented 3 years ago

Hi, thank you for sharing the code! I can run your code on my own computer. But when I modify the initial value of the translation part to 0, that is Eigen::Vector3d trans(0.0, 0.0, 0.0); in the line 148 of src/pnpnl.cpp file, I met this following error: buildSystem(): NaN within Jacobian for edge 0x56163c2901e0 for vertex 1 And when I use Google to find this error, they said this reason is that the wrong order of the function setVertex(). But the error I met has nothing to do with the function setVertex().

Sherlock-hh commented 2 years ago

hello! have you solved this problem? I met the same problem, looking for your reply, I'll be very appreciate it

weiningwei commented 2 years ago

I'm sorry to tell you, I didn't solve this problem. But I think you can give a small initial value, such as 0.001, which should not affect the solution of the PnPL problem.