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_node and autoware_control_center #73

Closed
wants to merge 131 commits into from
Closed

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented Feb 3, 2023

Signed-off-by: M. Fatih Cırıt mfc@leodrive.ai

Description

Related Discussion: https://github.com/orgs/autowarefoundation/discussions/3194
Old PR: #57

This PR is for creating the base class for all the future Autoware Core nodes to inherit from.

This node will be inheriting from the rclcpp_lifecycle::LifecycleNode with (LifeCycle Readme).

I'll be taking ros2 nav2 stack as reference too while combining Lifecycle and Composable node concepts.

While developing this PR, I am going to explore ideas mentioned in previous conversations in the Autoware community.

Related links

Related links

Communication architecture

Communication architecture

Registration Service

Service server: ACC

Service client: AutowareNode

Roles:

  • Register the AutowareNode in ACC
  • Receive the UUID for the AutowareNode
  • If already registered, return error
sequenceDiagram
    participant acc as Autoware Control Center
    participant node as node_a

    Note right of node: cli_reg
    node ->>+ acc: name: node_a
    Note left of acc: srv_reg

    acc ->> acc: generate a UUID for the node_a
    acc ->> acc: create a bond between acc and node_a


    Note left of acc: srv_reg
    acc -->>- node: UUID and registration success bool
    Note right of node: cli_reg

Heart beat bond

https://github.com/ros/bond_core/blob/ros2/ros2_migration_readme.md Slow

https://github.com/ros-safety/software_watchdogs

https://design.ros2.org/articles/qos_deadline_liveliness_lifespan.html

https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html#qos-events

Roles:

  • As long as the AutowareNode is alive, it reports with this bond
  • If the AutowareNode dies, it triggers the on_broken callback

Reporting service

Service server: ACC

Service client: AutowareNode

Roles:

  • Reporting state of the AutowareNode to the ACC
    • Warning
    • Error

Control service

Service server: AutowareNode

Service client: ACC

Roles:

  • Shutting down the AutowareNode
  • Toggle AutowareNode between active-inactive?

Tasks

  • Implement registration service
    • Define the interface
    • Create the client
    • Create the service
    • Make them communicate
    • Generate UUID
    • Send UUID
  • Implement control service
  • Implement reporting service
  • Implement watchdog - heartbeat

Tests performed

PR Review Items

Notes for reviewers

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

@xmfcx xmfcx added the enhancement New feature or request label Feb 3, 2023
@xmfcx xmfcx self-assigned this Feb 3, 2023
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Attention: Patch coverage is 13.97059% with 351 lines in your changes are missing coverage. Please review.

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

Current head e4f5fca differs from pull request most recent head ed2efdb

Please upload reports for the commit ed2efdb to get more accurate results.

Files Patch % Lines
...are_control_center/src/autoware_control_center.cpp 19.25% 65 Missing and 44 partials ⚠️
common/autoware_node/src/autoware_node.cpp 0.00% 94 Missing ⚠️
...ntrol_center/test/test_autoware_control_center.cpp 14.66% 6 Missing and 58 partials ⚠️
...utoware_control_center/test/test_node_registry.cpp 18.42% 0 Missing and 31 partials ⚠️
common/test_node/src/test_pub.cpp 0.00% 22 Missing ⚠️
...mmon/autoware_control_center/src/node_registry.cpp 56.52% 3 Missing and 7 partials ⚠️
common/test_node/src/test_node.cpp 0.00% 10 Missing ⚠️
...ontrol_center/src/autoware_control_center_node.cpp 0.00% 9 Missing ⚠️
...utoware_control_center/autoware_control_center.hpp 0.00% 1 Missing ⚠️
.../include/autoware_control_center/node_registry.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #73   +/-   ##
=======================================
  Coverage        ?   13.97%           
=======================================
  Files           ?       10           
  Lines           ?      408           
  Branches        ?      189           
=======================================
  Hits            ?       57           
  Misses          ?      211           
  Partials        ?      140           
Flag Coverage Δ
differential 13.97% <13.97%> (?)

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

@stale
Copy link

stale bot commented May 15, 2023

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

@stale stale bot added the stale label May 15, 2023
@stale stale bot removed the stale label May 29, 2023
@xmfcx
Copy link
Contributor Author

xmfcx commented May 29, 2023

@JianKangEgon I've also added you as an assignee too, after talking with @liuXinGangChina
If you have any questions, please let me know.

@JianKangEgon
Copy link

@JianKangEgon I've also added you as an assignee too, after talking with @liuXinGangChina If you have any questions, please let me know.

OK, thanks @xmfcx

@xmfcx
Copy link
Contributor Author

xmfcx commented Jun 13, 2023

@Tom-Li-Lee to be assigned too.

xmfcx and others added 5 commits July 17, 2023 14:52
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Copy link

stale bot commented Nov 9, 2023

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

@stale stale bot added the stale label Nov 9, 2023
@stale stale bot removed the stale label Dec 8, 2023
@xmfcx
Copy link
Contributor Author

xmfcx commented Dec 12, 2023

Priority list:

  1. Registering the node to ACC
    1. De-register / Re-register
    2. Handle different orders of launching
  2. Heartbeat/liveliness for the nodes, reports in last call milliseconds
  3. Receive error states in ACC (through a service call) (Node can report something is wrong with itself)
  4. Monitored Sub
    1. Creates a deadline callback which can either send (info/warning/error) through the previously implemented error handling
  5. Lifecycle
    1. delayed/controlled activate
    2. shutdown
    3. activate/deactivate cycles

lexavtanke and others added 4 commits April 19, 2024 15:29
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
…imer

Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
@lexavtanke
Copy link
Collaborator

@xmfcx It seems like we have an issue with cpplint related to cpplint/cpplint#184 after we suppress clang-tidy with // NOLINTNEXTLINE(performance-unnecessary-value-param)

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@xmfcx
Copy link
Contributor Author

xmfcx commented Apr 22, 2024

It seems they have added clang-analyzer- to the list of ignored prefixes for cpplint.

https://github.com/cpplint/cpplint/blob/e3a1938af916506c1cd658c2f464b2837597b81c/cpplint.py#L382-L408

But ours is has a performance- prefix.

Which is not in the error categories listed here:

https://github.com/cpplint/cpplint/blob/e3a1938af916506c1cd658c2f464b2837597b81c/cpplint.py#L295-L364

I couldn't find a way to add our check to this list. Easiest solution is to just add it as // NOLINTNEXTLINE without the name.

Another could be to disable cpplint altogether but I won't do that for now.

Edit:

Oh it seems they have added performance- to the list too with cpplint/cpplint@8eeaf23

will try to use this version.

We can keep it as // NOLINTNEXTLINE for now and when updated to 1.7.0 or 2.0.0 we can bring it back.

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@lexavtanke
Copy link
Collaborator

@xmfcx
DCO behaves a bit strange on two commits 8ec287d and 5c03cbb
image
As both of them have Signed-off-by
image
image

@xmfcx
Copy link
Contributor Author

xmfcx commented Apr 24, 2024

@lexavtanke we can ignore the DCO checks, as long as the squashed commit has the correct signatures, it is alright. I set it to pass.

Is this ready for review again?

@lexavtanke
Copy link
Collaborator

@xmfcx Yes, it is ready. I've changed the info level to debug and remove the startup timer from ACC.

@xmfcx xmfcx assigned xmfcx and unassigned lexavtanke May 16, 2024
@xmfcx xmfcx marked this pull request as draft May 16, 2024 18:07
@xmfcx xmfcx removed the request for review from yukkysaito May 16, 2024 18:07
xmfcx and others added 10 commits May 16, 2024 21:42
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@xmfcx xmfcx closed this May 17, 2024
@xmfcx xmfcx deleted the autoware_node branch May 17, 2024 15:50
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: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants