Skip to content

feat(autoware_adapi_v1_msgs): update diag messages #92

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autoware_adapi_v1_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ament_auto_find_build_dependencies()

rosidl_generate_interfaces(${PROJECT_NAME}
common/msg/ResponseStatus.msg
common/msg/KvString.msg
localization/msg/LocalizationInitializationState.msg
localization/srv/InitializeLocalization.srv
manual/msg/PedalsCommand.msg
Expand Down Expand Up @@ -61,9 +62,12 @@ rosidl_generate_interfaces(${PROJECT_NAME}
system/msg/Heartbeat.msg
system/msg/DiagGraphStruct.msg
system/msg/DiagGraphStatus.msg
system/msg/DiagLinkStruct.msg
system/msg/DiagLeafStruct.msg
system/msg/DiagLeafStatus.msg
system/msg/DiagNodeStruct.msg
system/msg/DiagNodeStatus.msg
system/msg/DiagLinkStruct.msg
system/srv/ResetDiagGraph.srv
vehicle/msg/DoorCommand.msg
vehicle/msg/DoorLayout.msg
vehicle/msg/DoorStatus.msg
Expand Down
2 changes: 2 additions & 0 deletions autoware_adapi_v1_msgs/common/msg/KvString.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string key
string value
1 change: 1 addition & 0 deletions autoware_adapi_v1_msgs/system/msg/DiagGraphStatus.msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
builtin_interfaces/Time stamp
string id
autoware_adapi_v1_msgs/DiagNodeStatus[] nodes
autoware_adapi_v1_msgs/DiagLeafStatus[] diags
1 change: 1 addition & 0 deletions autoware_adapi_v1_msgs/system/msg/DiagGraphStruct.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
builtin_interfaces/Time stamp
string id
autoware_adapi_v1_msgs/DiagNodeStruct[] nodes
autoware_adapi_v1_msgs/DiagLeafStruct[] diags
autoware_adapi_v1_msgs/DiagLinkStruct[] links
Comment on lines +4 to 5
Copy link
Member

Choose a reason for hiding this comment

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

It might be better for backward compatibility?

Suggested change
autoware_adapi_v1_msgs/DiagLeafStruct[] diags
autoware_adapi_v1_msgs/DiagLinkStruct[] links
autoware_adapi_v1_msgs/DiagLinkStruct[] links
autoware_adapi_v1_msgs/DiagLeafStruct[] diags

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From the code perspective there is no difference. From the binary perspective there are no guarantees and there should be no guarantees. For example, if a DiagNodeStruct is changed, compatibility will be lost even if the order is kept.

Copy link
Member

Choose a reason for hiding this comment

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

Was it added second to maintain alignment with DiagGraphStatus? If there's no guarantee, I'd prefer keeping it at the end to make its addition more obvious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To match the order of fields in DiagGraphStruct and DiagGraphStatus.

6 changes: 6 additions & 0 deletions autoware_adapi_v1_msgs/system/msg/DiagLeafStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# The level of diagnostic_msgs/msg/DiagnosticStatus.
byte level
byte input_level
string message
string hardware_id
autoware_adapi_v1_msgs/KvString[] values
1 change: 1 addition & 0 deletions autoware_adapi_v1_msgs/system/msg/DiagLeafStruct.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
string name
3 changes: 3 additions & 0 deletions autoware_adapi_v1_msgs/system/msg/DiagNodeStatus.msg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# The level of diagnostic_msgs/msg/DiagnosticStatus.
byte level
byte input_level
byte latch_level
bool is_dependent
2 changes: 2 additions & 0 deletions autoware_adapi_v1_msgs/system/srv/ResetDiagGraph.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
autoware_adapi_v1_msgs/ResponseStatus status
Loading