ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Robot_localization services /toLL and /fromLL respond with different result

asked 2021-01-14 09:41:46 -0500

kosmastsk gravatar image

I am using the robot_localization package and in the terminal, I run the services /fromLL and /toLL for the same position. But the results do not agree. Specifically, running:

rosservice call /robot/fromLL "ll_point:
  latitude: 40.5665059791
  longitude: 22.9989873398
  altitude: 122.0"


  x: 140892.72962
  y: 5405179.36945
  z: 0.0

And when I run:

rosservice call /robot/toLL "map_point:
  x: 0.0
  y: 0.0
  z: 0.0"

I get

  latitude: 40.5665059791
  longitude: 22.9989873398
  altitude: 122.375866815

which is the same position as the first one.
I believe that this is not normal, but why is this happening?

edit retag flag offensive close merge delete


Are your frame_id's the same? If the map point is in a different frame, you will have to do a tf_lookup and transform the point before using it.

Akhil Kurup gravatar image Akhil Kurup  ( 2021-01-14 09:53:08 -0500 )edit

I am running these services through the terminal, when running the node, so there is not a way to define in which frame each point is. For the first case, fromLL in what frame are we expecting the result to be for example?

kosmastsk gravatar image kosmastsk  ( 2021-01-14 13:51:16 -0500 )edit

I'm guessing that first LL position that you used in the service call was not random. Where did you get it?

Tom Moore gravatar image Tom Moore  ( 2021-01-25 11:18:24 -0500 )edit

Yes, it was the current Lat/Long of the robot. If I'm not wrong there was a UTM->map transform at that time, using the navsat_transform.

kosmastsk gravatar image kosmastsk  ( 2021-01-25 13:33:38 -0500 )edit

Can I ask what version you're using?

Tom Moore gravatar image Tom Moore  ( 2021-01-29 08:07:55 -0500 )edit

I am on ROS melodic and robot_localization has been installed using apt-get. Version 2.6.9 as mentioned in the package.xml file

kosmastsk gravatar image kosmastsk  ( 2021-01-29 08:09:27 -0500 )edit

Can you please head over to the GH repo and repost this as an issue, and please include your full config file, as well as maybe a bag?

Tom Moore gravatar image Tom Moore  ( 2021-01-29 08:21:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-29 08:27:34 -0500

Tom Moore gravatar image

That's a bug. This line has the cartesian_x and cartesian_y parameters backwards (cartesian_y should come first). Please file a ticket and I'll fix it. Thank you!

edit flag offensive delete link more


Alright, I will file an issue asap. Thanks a lot!

kosmastsk gravatar image kosmastsk  ( 2021-01-29 08:32:23 -0500 )edit

Question Tools



Asked: 2021-01-14 09:41:46 -0500

Seen: 524 times

Last updated: Jan 29 '21