Robot_localization services /toLL and /fromLL respond with different result
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"
returns:
map_point:
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
ll_point:
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?
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.
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?
I'm guessing that first LL position that you used in the service call was not random. Where did you get it?
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.
Can I ask what version you're using?
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
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?