Offboard Error: MavSDK


I’m trying to compile a code on sitl using the Offboard’s plugin and the set_position_global class, because i wanna stabilize the drone. I takeoff the vehicle using the AttitudeRate and it begins to fly fordward having all the attributes on 0, I’m only changing the thrust value, so I assigned some attribute values to GlobalPsitionYaw looking for correct the position using the gps, but I got an error with the AltitudeType.

AltitudeType altitude_type {} - altitude type for this position

AttributeError: ‘int’ object has no attribute ‘translate_to_rpc’

I have tryed to use the recomend values on the code

but it doesn’t work.

Thank you for any advice.

Could you paste the code that doesn’t work?