RainerKuemmerle / g2o

g2o: A General Framework for Graph Optimization
3.1k stars 1.11k forks source link

Possible to do inequality constraint with G2o? #804

Open TBdt38 opened 5 months ago

TBdt38 commented 5 months ago

I am looking for a way to implement inequality constraint with G2o tool. Is it possible? i haven't found what could be used. Basically, i would like to have for constraint a basic inequality. For instance, keeping a state scalar X lower than an hardcoded threshold value. Any way to do it with G2O or we have to deal with equalities only?

felixendres commented 4 months ago

I haven't tried it, but I would guess you can write your own edge with a custom computeError() function and linearizeOplus() that behaves as you say.