Reinforcement Learning Compensated Filter for Position and Orientation Estimation