Skip to content
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

Support specified frames of reference in landing target module #2011

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

pryre
Copy link
Contributor

@pryre pryre commented Dec 18, 2024

This change implements a check to support the set landing target frame of reference when using the "~/landing_target/raw" interface.

  • The transformations for the MAV_FRAME::LOCAL_NED case are the same as the previous implementation
  • The transformations for the MAV_FRAME::BODY_FRD case have been derived by myself, and seem to work as expected under my testing. A cross-check is probably a good idea.

One issue with this commit is in regards to handling the case where a use does not want to use the position data at all, and in doing so, is likely to not set the frame parameter. It is expected that this would result in a value of "0" being set, which aligns to MAV_FRAME::GLOBAL. This is not a valid setting for any autopilots I'm aware of, so I've used this is a selector for whether to use the position data or not.

Ideally this would be addressed by exposing "position_valid" in the mavros_msgs/LandingTarget, and going from there. An alternative could be to check if a valid quaternion is set.

Another contentious point is the use of MAV_FRAME to interpret the frame from the message. This does not align with the enum in mavros_msgs/LandingTarget, however, I don't think this enum is well-aligned with either ROS options (which a user's perspective would be) or the MavLink options, which have the same names, but with different values for some.

This could all probably be addressed in this pull request, I was just hesitant to break any message functionality. without some input. Ideas welcome!

@pryre
Copy link
Contributor Author

pryre commented Dec 19, 2024

I've just realised that this patch should also include similar functionality when receiving from the drone on L385:

    /** @todo these transforms should be applied according to the MAV_FRAME */

I will update the pull request with these additions shortly.

Copy link
Member

@vooon vooon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@vooon vooon merged commit 3eb44b9 into mavlink:ros2 Jan 9, 2025
0 of 4 checks passed
@vooon vooon added this to the Version 2.10 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: TODO
Development

Successfully merging this pull request may close these issues.

2 participants