Open wxt-github opened 4 years ago
I guess you mean vertices should not change. Set them to fixed by calling setFixed. If edges should not be taken into account have a look at the different methods to initialize the optimization.
Cheers Rainer
Am 10.10.2020 um 11:18 schrieb wxt-github notifications@github.com:
Hello, if there are some vertices connected by edges, but some of the edges I want to remain unchanged before and after optimization, what should I do? @RainerKuemmerle
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Not exactly the same,setFixed means absolutely unchanged before and after optimization, but what I want is that certain vertices change before and after optimization, but the relative position between vertices and vertices remains unchanged.Is there any way to achieve this?
There isn't an edge type which ensures equality constraints. You could create an edge type which specifies the relative translation and says the covariance is small (information matrix is very big). However, this tends to introduce large gradients which I think slows the optimiser down.
What's the feasibility of not having a "real" vertex but create a "virtual" one?
Suppose you had two vertices v0 and v1, where v1=v0+dv, where dv is fixed and known. Can you just keep a single vertex v0 in the graph, and wherever you'd reference v1, replace it by v0+dv where dv is, say, a fixed parameter value?
I would try to address it by using an offset between the two vertices. There are several examples that provide this concept. For example: https://github.com/RainerKuemmerle/g2o/blob/master/g2o/types/slam3d/edge_se3_pointxyz.cpp which implements observations to 3D points from a pose whereas an offset would represent the equality between "two" poses. You will only have the vertex once in the optimization but express equality by the offset.
Hello, if there are some vertices connected by edges, but some of the edges I want to remain unchanged before and after optimization, what should I do? @RainerKuemmerle