ctu-mrs / mrs_uav_system

The entry point to the MRS UAV system.
https://ctu-mrs.github.io/
BSD 3-Clause "New" or "Revised" License
436 stars 86 forks source link

Offset in position of drone #28

Closed PhilPhal closed 3 years ago

PhilPhal commented 3 years ago

Hello,

During the simulations I noticed the position of the drone always has a certain offset from the demanded position. In my situation, I make the drone go to the origin. But it never reaches it and stays at an offset of approximately 20cm (from the center of mass of the drone). Do you have an idea how to get rid of this offset?

Thank you in advance.

Best, Philippe

klaxalk commented 3 years ago

Hey, this is due to the GPS inaccuracy which is modeled in the GPS plugin. It is actually modeled quite optimistically. The real-world offset would be anywhere within 2 meters.

If you want to get rid of it, you can use the "RTK GPS" estimator (in the real-world, this needs an RTK GPS base station and receiver). In the simulation, it is slightly simpler:

  1. spawn the drone with --enable-ground-truth which enables a publisher of the ground truth position of the UAV.
  2. export ODOMETRY_TYPE="rtk" which should be done in the pre_window section of the tmuxinator session.yaml file. This will tell the odometry fusion node to expect the ground truth.
  3. Test it in flight. The mrs_status should show the RTK as the horizontal estimator. Selection_059
PhilPhal commented 3 years ago

Hello,

Thank you for the explanation and tips. Everything works fine now.

Best regards, Philippe