Petrobras, Brazil's state-run oil firm, has finished the work required to get an environmental permit in order to drill offshore.