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

Handle and log onboard_computer_status messages #13169

Merged
merged 13 commits into from
Oct 27, 2019
Merged

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Oct 12, 2019

Describe problem solved by the proposed pull request
A new mavlink message has been introduced to monitor the status of the companion computer mavlink/mavlink#1186 However, the message was not handled from the firmware and therefore not logged into the message.

This PR copies the message to a uORB topic and logs it as part of the flight log.

Information of the companion computer (e.g. cpu load, memory usage ) can be very useful in checking the health of the overall system, especially for applications that run critical processes on the companion computer (such as obstacle avoidance)

Describe your preferred solution
Adds a message handler in mavlink_receiver and logs it as part of the vision and avoidance topics.

@Jaeyoung-Lim Jaeyoung-Lim requested a review from baumanta October 12, 2019 18:00
@Jaeyoung-Lim Jaeyoung-Lim requested a review from jkflying October 12, 2019 18:02
@Jaeyoung-Lim
Copy link
Member Author

@dagar Any ideas how I should solve the flash space problem with fmuv2?

@Jaeyoung-Lim Jaeyoung-Lim marked this pull request as ready for review October 13, 2019 11:50
@dagar
Copy link
Member

dagar commented Oct 15, 2019

@dagar Any ideas how I should solve the flash space problem with fmuv2?

Either of these PRs will save more than enough. #12601 #12191

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.

This is ok, but going forward I think we need a better approach than pushing data into the flight controller and then pushing it right back out again only for logging.

msg/onboard_computer_status.msg Outdated Show resolved Hide resolved
msg/onboard_computer_status.msg Outdated Show resolved Hide resolved
msg/onboard_computer_status.msg Outdated Show resolved Hide resolved
@Jaeyoung-Lim
Copy link
Member Author

@bkueng Thanks for the input! I totally agree, but in the short term this would be useful on evaluating the performance of the system with companion computers

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Oct 26, 2019

Now flash space is solved, but the test fails on rtps.

@TSC21 Are the rtps message IDs just assigned arbitrarily? I couldn't find any documentation on how the message IDs are defined

@TSC21
Copy link
Member

TSC21 commented Oct 26, 2019

Now flash space is solved, but the test fails on rtps.

@TSC21 Are the rtps message IDs just assigned arbitrarily? I couldn't find any documentation on how the message IDs are defined

There's no magic behind it. Just follow the numeration, and make sure you don't add base msgs to the multitopic ID space.

@Jaeyoung-Lim
Copy link
Member Author

@TSC21 Thanks! All is good now :)

Copy link
Member

@TSC21 TSC21 left a comment

Choose a reason for hiding this comment

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

So are we just using this msg for logging purposes? I see some more useful usage for it.

src/modules/logger/logger.cpp Show resolved Hide resolved
@TSC21
Copy link
Member

TSC21 commented Oct 27, 2019

So are we just using this msg for logging purposes? I see some more useful usage for it.

@Jaeyoung-Lim can you advance more on what will be the usages for this, besides logging?

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Oct 27, 2019

@TSC21 As explained in the description, the main reason is to monitor the companion computer status and log it.

This is a crucial part on enabling advanced computer vision systems, as we will be able identify problems that are caused by companion computers such as high CPU loads / high temperature / low memory availability.

For the future work, as this PR adds a uORB topic for the onboard computer status, we would also be able to add failsafe behaviors triggered from the companion computer status.

But for now, logging the status of the companion will already enable us to identify a lot of problems much faster that is coming from the companion

@TSC21
Copy link
Member

TSC21 commented Oct 27, 2019

@TSC21 As explained in the description, the main reason is to monitor the companion computer status and log it.

This is a crucial part on enabling advanced computer vision systems, as we will be able identify problems that are caused by companion computers such as high CPU loads / high temperature / low memory availability.

For the future work, as this PR adds a uORB topic for the onboard computer status, we would also be able to add failsafe behaviors triggered from the companion computer status.

But for now, logging the status of the companion will already enable us to identify a lot of problems much faster that is coming from the companion

Thanks! That seems to be the way to go. Merging

@TSC21 TSC21 merged commit dcfe226 into master Oct 27, 2019
@TSC21 TSC21 deleted the pr-onboardcomputer-status branch October 27, 2019 11:47
@Jaeyoung-Lim
Copy link
Member Author

@TSC21 Thanks!

@Jaeyoung-Lim Jaeyoung-Lim restored the pr-onboardcomputer-status branch October 27, 2019 16:15
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-onboardcomputer-status branch October 27, 2019 16:16
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.

4 participants