code for ptam poses