added pose estimation and reading of parameters in main code