Error in mavros/global_position/local NEED HELP

hey guys,

I am subscribing mavros/global_position/local to get the local position in gazebo but the values are absolutely wrong. I expect something like 0 for x and y but when i do rostopic echo mavros/global_position/local i get this:

header: 
  seq: 3213
  stamp: 
    secs: 67
    nsecs: 920002608
  frame_id: "map"
child_frame_id: "base_link"
pose: 
  pose: 
    position: 
      x: 656765.007341          <---------------------------------
      y: 5113924.31783          <---------------------------------
      z: 2.586
    orientation: 
      x: 0.00789155862839
      y: -0.0127050240855
      z: 0.0439645999403
      w: -0.998921150004
  covariance: [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 99999.0]
twist: 
  twist: 
    linear: 
      x: 0.01
      y: 0.04
      z: 0.07
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

What might cause this? I already uninstalled ros, px4, gazebo, … and installed it again. Same behavior :frowning:
Please help!

Hello, I believe those are in UTM coordinates as per mavros message documentation: http://wiki.ros.org/mavros#mavros.2FPlugins.global_position

If you want local coordinates use mavros/local_position/local

Hey,

thanks for the reply. The position I get:

    position: 
      x: 656765.007341          <---------------------------------
      y: 5113924.31783          <---------------------------------

is not a UTM position. It looks like ECEF.

I think what you are looking for is local position: https://wiki.ros.org/mavros#mavros.2FPlugins.local_position

Yes, I am using local_position/pose now. Thanks.