integrate graph optimization with g2o
various changes for success compilation