-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[global_position] 'gp_origin' and 'set_gp_origin' mismatching #1381
Comments
@standmit you have the answer for that in https://github.com/mavlink/mavros/blob/master/mavros/src/plugins/global_position.cpp#L237 and in https://www.ros.org/reps/rep-0105.html#id17. If you want a topic that just serves as feedback, you can always add it and propose a PR. |
I'm sorry to dig up this 2 year old issue, but i agree with @standmit regarding the confusing message type and i believe @TSC21 might have misunderstood the intention of the issue. It is highly counter intuitive to send ECEF coordinates in a ROS message, that is only intended to be used with LLA coordinates: http://docs.ros.org/en/noetic/api/geographic_msgs/html/msg/GeoPoint.html Either a different message type should be choosen or the ECEF transformation should be removed. Edit: By having a deeper look into the code and Rep 105 I personally think that this comment https://github.com/mavlink/mavros/blob/master/mavros/src/plugins/global_position.cpp#L70 is not valid. The frame_id just specifies the reference point of the coordinates that are transmitted in the message, which is identical in case of ECEF and WGS84 LLA coordinates, as also depicted in the attached image in Rep 105. Setting the frame_id to "earth" gives no indication of the coordinate type (if cartesian or spherical). The coordinate type itself is determined by the variables that are transmitted in the message (e.g. lat, lon, alt). That's why I would suggest to remove the ECEF transformation completely, instead of changing the message type. |
I just ran into this as well and agree that it is very confusing and probably wrong to use ECEF in a This topic has recently become important for ArduPilot, which now defines defines its local coordinate system relative to the EKF origin (published in the |
I agree, the current implementation is rather misleading. Expecting LLA, when it's really ECEF surely will make something break at some point. |
gps_global_origin is being published as geographic_msgs::GeoPointStamped message, which wants LLA format https://docs.ros.org/en/api/geographic_msgs/html/msg/GeoPointStamped.html FIX mavlink#1381 Signed-off-by: Beniamino Pozzan <b.pozzan@archangel.im>
gps_global_origin is being published as geographic_msgs::GeoPointStamped message, which wants LLA format https://docs.ros.org/en/api/geographic_msgs/html/msg/GeoPointStamped.html FIX #1381 Signed-off-by: Beniamino Pozzan <b.pozzan@archangel.im>
Issue details
I found some mismatching in global_position plugin.
When I send coordinates (LLA) to topic
mavros/global_position/set_gp_origin
, the plugin accepts this coordinates as LLA and sends it to FCU as is.Then FCU confirms this with GPS_GLOBAL_ORIGIN message containing the same coordinates as LLA. But plugin transforms it to ECEF and sends to topic
mavros/global_position/gp_origin
.Topic
mavros/global_position/gp_origin
has typegeographic_msgs/GeoPointStamped
and must contain coordinates in LLA. When I send a request containing LLA, I expect to receive a response containing LLA too in order to compare it and ensure that global_origin has been successfully set. Why global_position plugin transforms global_origin to ECEF?MAVROS version and platform
Mavros: 1.0.0
ROS: Melodic
Ubuntu: 18.04
Autopilot type and version
[ X ] ArduPilot
[ ] PX4
Version: ArduCopter V4.0.0-dev (8c413d3c)
The text was updated successfully, but these errors were encountered: