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

MAV_CMD_DO_SET_HOME - add home position roll/pitch #1849

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

hamishwillee
Copy link
Collaborator

The vehicle outputs a quaternion of vehicle roll/pitch/yaw in the HOME_POSITION message.
As discussed in #1843, the expectation is that either the quaternion outputs accurate values or NaNs for all value (even if you have a value for the yaw, you can't output it in the form of a quaternion unless you also have "some" roll and pitch value).

The proposal here is that we allow the MAV_CMD_DO_SET_HOME to also specify a roll and pitch of the home position.

Note, there is no way to say "I don't know the pitch, roll" of the surface at home - if you don't know you're saying it's flat. Is that OK?

@hamishwillee
Copy link
Collaborator Author

This follows on from #1843 (comment)
The affected PX4 PR is PX4/PX4-Autopilot#19717

@julianoes
Copy link
Collaborator

I'd like to talk about this at the next meeting and either close it or get it in.

@hamishwillee
Copy link
Collaborator Author

Makes sense. @auturgy FYI. I have added to the next agenda https://github.com/mavlink/mavlink/wiki/20231122-Dev-Meeting . If you guys have an opinion on this would be good to present that before the meeting

@julianoes
Copy link
Collaborator

My vote is to get this in.

@hamishwillee
Copy link
Collaborator Author

Mine too.

@auturgy
Copy link
Collaborator

auturgy commented Nov 22, 2023

Need to define ranges

@hamishwillee
Copy link
Collaborator Author

20231122-Dev-Meeting - agreed to get this in but need to define ranges on the fields (at least the new ones). OK for it to be zero and NaN for "unknown. Think the 0.1 value should be used to represent 0.

Ping me to look when you're done.

julianoes and others added 2 commits November 23, 2023 13:28
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Signed-off-by: Julian Oes <julian@oes.ch>
<param index="4" label="Yaw" units="deg">Yaw angle. NaN to use default heading</param>
<param index="2" label="Roll" units="deg" minValue="-180" maxValue="180">Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.</param>
<param index="3" label="Pitch" units="deg" minValue="-90" maxValue="90">Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.</param>
<param index="4" label="Yaw" units="deg">Yaw angle. NaN to use default heading. Range: -180..180 degrees.</param>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@auturgy This looks like what we asked for except possibly this Yaw. Does ardupilot allow this constraint to be applied?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@auturgy Julian is going to add a range. Can you look at this tomorrow - otherwise I will merge this as "what we were talking about AFAIK"

Signed-off-by: Julian Oes <julian@oes.ch>
@hamishwillee
Copy link
Collaborator Author

I am self merging following the discussions on this in MAV call etc.

@hamishwillee hamishwillee merged commit 5f85bd7 into master Dec 7, 2023
13 checks passed
@hamishwillee hamishwillee deleted the hamishwillee-MAV_CMD_DO_SET_HOME branch December 7, 2023 04:09
@julianoes
Copy link
Collaborator

Thanks @hamishwillee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants