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

feat: add autoware_control_center and autoware_node #84

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented May 17, 2024

Description

Goals for the v1:

  • Lifecycle
  • Register/Deregister
    • List potential cases that are handled
  • Heartbeat monitoring
    • Error/Warning/Healthy states are part of the heartbeat
  • Basic ACC features
    • Report faulty nodes

Remaining tasks

  • Write down the AutowareNode.
    • Create tests for it.
      • Init / Shutdown
      • Register
        • AN is launched first
        • ACC is launched first
        • Duplicate registering with same name
      • Heartbeat
        • Success case
        • Dead upon being late
        • Alive upon coming back

Edge cases

Support:

  • ACC runs, AN runs, ACC dies, another ACC comes, AN should register to it.
  • AN dies, ACC still has an entry, after a grace period, it should deregister it automatically.

Related links

🖱️Click to expand

Continuation from:

Nav2 references

Autoware.Auto discussions

Tests performed

WIP

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@xmfcx xmfcx added the enhancement New feature or request label May 17, 2024
@xmfcx xmfcx self-assigned this May 17, 2024
@esteve
Copy link

esteve commented May 21, 2024

@xmfcx I found this about using Kubernetes to ensure a singleton instance:

https://medium.com/@fahed.dorgaa/kubernetes-singleton-pattern-84a88a06727a

And this for integrating Kubernetes with ROS 2:

https://github.com/fujitatomoya/ros_k8s

Hope this helps, let me know if I can help

@xmfcx
Copy link
Contributor Author

xmfcx commented May 21, 2024

@esteve I've read the medium post and it aims to solve the same problem I had. I've also read the slides and looked into implementations from https://github.com/fujitatomoya/ros_k8s as well.

Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications.

But k8s works with containers and I would assume this would have meant that /autoware/control_center node would need to be in its own container? I don't know it too well. But if yes, this is not the solution I'm looking for. I would like to be able to run the entire Autoware in a single container or without any.

I think current solution is enough for now, since in the deployment stage, this would not occur anyways, it is just to prevent adding another thing to debug for developers by making sure there is only one instance of the /autoware/control_center.

@esteve
Copy link

esteve commented May 21, 2024

@xmfcx yeah, for something like this,, Kubernetes is overkill, I thought it was more about making sure that nodes in a distributed system were only instantiated only. But if it's a tool that runs locally, a lock and a file is more than enough.

@xmfcx xmfcx force-pushed the feat/add-autoware-control-center branch from 7628800 to a1b7090 Compare July 19, 2024 11:41
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 33.93393% with 220 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@9989140). Learn more about missing BASE report.

Files Patch % Lines
...utoware_control_center/src/control_center_node.cpp 43.10% 18 Missing and 48 partials ⚠️
...utoware_control_center/src/control_center_main.cpp 0.00% 41 Missing ⚠️
...autoware_control_center/test/test_cc_heartbeat.cpp 22.44% 3 Missing and 35 partials ⚠️
...toware_control_center/test/test_cc_registering.cpp 27.65% 3 Missing and 31 partials ⚠️
...mmon/autoware_control_center/test/test_utility.hpp 45.90% 3 Missing and 30 partials ⚠️
...ware_control_center/test/test_cc_init_shutdown.cpp 61.11% 0 Missing and 7 partials ⚠️
...control_center/src/include/control_center_node.hpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage        ?   33.93%           
=======================================
  Files           ?        7           
  Lines           ?      333           
  Branches        ?      169           
=======================================
  Hits            ?      113           
  Misses          ?       68           
  Partials        ?      152           
Flag Coverage Δ
differential 33.93% <33.93%> (?)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xmfcx xmfcx force-pushed the feat/add-autoware-control-center branch from a1b7090 to dc0fb55 Compare July 19, 2024 11:47
Copy link

stale bot commented Sep 29, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale label Sep 29, 2024
@mitsudome-r mitsudome-r mentioned this pull request Oct 29, 2024
14 tasks
Copy link

github-actions bot commented Nov 7, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx force-pushed the feat/add-autoware-control-center branch from 1c2748f to 185343f Compare November 17, 2024 22:59
@stale stale bot removed the stale label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants