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

logger: add logger_status orb message #14050

Merged
merged 2 commits into from
Jan 29, 2020
Merged

logger: add logger_status orb message #14050

merged 2 commits into from
Jan 29, 2020

Conversation

dagar
Copy link
Member

@dagar dagar commented Jan 28, 2020

Resurrecting this old branch I never finished. The idea is to expose logger status over orb both for the simplicity of monitoring over a regular flight and for deeper integration with the state machine (optional arming requirements, #13200).

WORK IN PROGRESS

@dagar dagar force-pushed the pr-logger_status_uorb branch 2 times, most recently from 2af6a68 to 4bb6b5c Compare January 28, 2020 20:37
@dagar
Copy link
Member Author

dagar commented Jan 28, 2020

I had some other questions and ideas here about things like broadcasting status (eg is logger ready to start before arming) and capturing dropout duration differently for the log rather than the way it's reset with logger status now, but I'd rather get some basic in now we can continue to improve incrementally.

@dagar dagar requested a review from bkueng January 28, 2020 20:42
@dagar dagar changed the title [WIP] logger: add logger_status orb message logger: add logger_status orb message Jan 28, 2020
@PX4 PX4 deleted a comment from codecov bot Jan 28, 2020
@dagar dagar marked this pull request as ready for review January 28, 2020 20:42
@dagar dagar force-pushed the pr-logger_status_uorb branch from 4bb6b5c to e302e54 Compare January 28, 2020 20:50
@codecov
Copy link

codecov bot commented Jan 28, 2020

Codecov Report

Merging #14050 into master will decrease coverage by 0.73%.
The diff coverage is 84.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14050      +/-   ##
==========================================
- Coverage   53.63%   52.89%   -0.74%     
==========================================
  Files         605      605              
  Lines       51327    51346      +19     
==========================================
- Hits        27528    27162     -366     
- Misses      23799    24184     +385
Flag Coverage Δ
#mavsdk ?
#python 3.15% <0%> (-0.01%) ⬇️
#sitl_mission_FW 29.38% <78.64%> (+0.04%) ⬆️
#sitl_mission_MC_box 29.76% <78.64%> (+0.06%) ⬆️
#sitl_mission_MC_offboard_att 28.31% <78.64%> (+0.1%) ⬆️
#sitl_mission_MC_offboard_pos 28.52% <78.64%> (+0.07%) ⬆️
#sitl_mission_Rover 26.23% <78.64%> (+0.06%) ⬆️
#sitl_mission_VTOL_standard 33.98% <80.58%> (+0.07%) ⬆️
#sitl_mission_VTOL_tailsitter 33.98% <81.55%> (+0.08%) ⬆️
#sitl_python_FW 29.45% <78.64%> (+0.04%) ⬆️
#sitl_python_MC_box 29.84% <78.64%> (+0.06%) ⬆️
#sitl_python_MC_offboard_att 28.38% <78.64%> (+0.1%) ⬆️
#sitl_python_MC_offboard_pos 28.6% <78.64%> (+0.07%) ⬆️
#sitl_python_Rover 26.31% <78.64%> (+0.06%) ⬆️
#sitl_python_VTOL_standard 34.05% <80.58%> (+0.07%) ⬆️
#sitl_python_VTOL_tailsitter 34.05% <81.55%> (+0.08%) ⬆️
#unittest 34.81% <13.59%> (-0.03%) ⬇️
Impacted Files Coverage Δ
src/modules/simulator/simulator.h 34.61% <ø> (-2.43%) ⬇️
src/lib/drivers/accelerometer/PX4Accelerometer.hpp 66.66% <ø> (-8.34%) ⬇️
src/lib/drivers/gyroscope/PX4Gyroscope.hpp 100% <ø> (ø) ⬆️
...ehicle_angular_velocity/VehicleAngularVelocity.hpp 100% <ø> (ø) ⬆️
...nsors/vehicle_acceleration/VehicleAcceleration.hpp 100% <100%> (ø) ⬆️
...nsors/vehicle_acceleration/VehicleAcceleration.cpp 85.6% <100%> (+4.79%) ⬆️
...ehicle_angular_velocity/VehicleAngularVelocity.cpp 87.5% <100%> (+0.23%) ⬆️
src/lib/drivers/accelerometer/PX4Accelerometer.cpp 43.71% <39.13%> (-3%) ⬇️
src/modules/uORB/PublicationQueuedMulti.hpp 84.61% <84.61%> (ø)
src/modules/navigator/takeoff.cpp 3.92% <0%> (-76.48%) ⬇️
... and 26 more

Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Adding a status is ok, but it won't help with #13200, and most information you're adding is redundant and can already be inferred from the log.

@dagar
Copy link
Member Author

dagar commented Jan 29, 2020

Adding a status is ok, but it won't help with #13200,

I know, I addressed that above. Next I'll extend this to publish status pre-logging to handle things like #13200 (it's actually a fairly common request).

I also think it's going to be worth it to casually monitor logging rate and buffer usage over time across a large range of configurations and different phases of flight. Yes we could get it from the log itself, but we largely don't.

Somewhat related, I've seen a number of logs that look like data was missed, but don't have dropouts. I'm wondering about tracking generation gaps in full rate topics (no interval configured) and exposing it here. The overall priorities need a review.

@dagar dagar merged commit 931a3f2 into master Jan 29, 2020
@dagar dagar deleted the pr-logger_status_uorb branch January 29, 2020 22:29
// update buffer statistics
for (int i = 0; i < (int)LogType::Count; ++i) {
if (!_statistics[i].dropout_start && (_writer.get_buffer_fill_count_file((LogType)i) > _statistics[i].high_water)) {
_statistics[i].high_water = _writer.get_buffer_fill_count_file((LogType)i);
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove this? This is now broken.

Please don't just merge PR's w/o review.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ouch, yes it's clearly bogus, I have it fixed in the wip followup, but I can bring it to master sooner if needed. I apparently screwed up the rebase.

I would much prefer everything goes into master with a real review, but at the moment quite a lot goes ignored. I'd be up for establishing a more thorough system, but we'd need to do something like figure out code owners (and backups), commit to reasonable response times, etc. I also don't want to encourage more "rubber stamp" code reviews where we have the illusion of good process with the overhead and bureaucracy, but hardly any of the actual benefit.

dagar added a commit that referenced this pull request Feb 10, 2020
 - this was accidentally dropped during a rebase of #14050
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.

2 participants