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

Attitude Logging (ANG) #28059

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Attitude Logging (ANG) #28059

merged 6 commits into from
Sep 17, 2024

Conversation

andyp1per
Copy link
Collaborator

@andyp1per andyp1per commented Sep 10, 2024

Introduces a new high rate attitude message - ANG - to replace the use of ATT for the attitude controller.

Copy link
Contributor

@lthall lthall left a comment

Choose a reason for hiding this comment

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

Love it.

libraries/AC_AttitudeControl/LogStructure.h Show resolved Hide resolved
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

  • rename method
  • fix test

@peterbarker
Copy link
Contributor

Perhaps a test to make sure ATT.DesRoll and ANG.DesRoll match in normal operation

Could use

        dfreader = self.dfreader_for_current_onboard_log()

ArduPlane/quadplane.cpp Outdated Show resolved Hide resolved
@andyp1per
Copy link
Collaborator Author

andyp1per commented Sep 11, 2024

Here is a log from a quadplane mission
00000002.zip

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

LGTM

ArduPlane/quadplane.cpp Outdated Show resolved Hide resolved
@@ -566,7 +566,9 @@ void Copter::loop_rate_logging()
// should be run at 10hz
void Copter::ten_hz_logging_loop()
{
// log attitude data if we're not already logging at the higher rate
// always write AHRS attitude at 10Hz
ahrs.Write_Attitude(attitude_control->get_att_target_euler_rad() * RAD_TO_DEG);
Copy link
Member

Choose a reason for hiding this comment

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

I think I would vote to still log ATT at 25hz if medium logging is selected, but it make sense to drop it from 400Hz logging.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My understanding from the dev call was to log at 10Hz only. I'm not going to open that can of worms again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the consensus was that ATT should be logged at a fixed rate of 10 Hz.

The idea is to move away from the ATT message. Why do you want to log ATT faster?

Copy link
Contributor

Choose a reason for hiding this comment

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

The current behaviour is to log ATT at 10 Hz if MASK_LOG_ATTITUDE_MED is on and not logging it at all if MASK_LOG_ATTITUDE_MED is off.

It looks like MASK_LOG_ATTITUDE_FAST is being used to log EKF_POS at 10 Hz.

These are a bit of a mess.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that ATT is not currently logged at 25Hz. Other things are but not ATT, at least not in copter.

libraries/AC_AttitudeControl/LogStructure.h Outdated Show resolved Hide resolved
libraries/AC_AttitudeControl/LogStructure.h Outdated Show resolved Hide resolved
@andyp1per
Copy link
Collaborator Author

Tested on my 5"

@tridge tridge merged commit 71e2b75 into ArduPilot:master Sep 17, 2024
95 checks passed
@andyp1per andyp1per deleted the pr-ang-log branch September 17, 2024 07:10
@rmackay9
Copy link
Contributor

rmackay9 commented Nov 6, 2024

I guess I wasn't involved in the review of this (probably my fault for not paying attention) but I think it's a bit odd that we now have both ATT and ANG messages with nearly exactly the same information in them. It's hard to imagine what argument would not allow increasing the rate of the ATT message but would allow a duplicate message

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.

7 participants