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: apply autoware prefix for component_state_monitor and its dependencies #9961

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bdc58f8
feat: apply `autoware_` prefix for following packages:
sasakisasaki Jan 19, 2025
bb3895f
fix(topic_state_monitor): organize header file paths
sasakisasaki Jan 19, 2025
76152cc
rename: as follows (see below):
sasakisasaki Jan 19, 2025
29ad95f
style(pre-commit): autofix
pre-commit-ci[bot] Jan 19, 2025
086cbd2
bug: revert wrongly updated copyrights
sasakisasaki Jan 21, 2025
0adb2d1
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
sasakisasaki Jan 21, 2025
de27e5d
bug: `autoware_` prefix is not needed here
sasakisasaki Jan 21, 2025
01f9118
bug: fix dependency bugs
sasakisasaki Jan 21, 2025
2f85294
update(autoware_diagnostic_graph_aggregator): `README.md`
sasakisasaki Jan 21, 2025
7fe4117
update: `CODEOWNERS`
sasakisasaki Jan 21, 2025
16a6c44
Merge branch 'feat-apply-autoware-prefix-for-system-component-state-m…
sasakisasaki Jan 21, 2025
c493425
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
sasakisasaki Jan 22, 2025
c548269
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
sasakisasaki Jan 22, 2025
2dd72c5
bug(autoware_system_diagnostic_monitor): fix a wrongly renamed one
sasakisasaki Jan 22, 2025
232ab7c
Merge branch 'feat-apply-autoware-prefix-for-system-component-state-m…
sasakisasaki Jan 22, 2025
ade2308
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
isamu-takagi Jan 23, 2025
3453816
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
sasakisasaki Jan 23, 2025
ea3888b
Merge branch 'feat-apply-autoware-prefix-for-system-component-state-m…
sasakisasaki Jan 23, 2025
40f41a5
fix recursive launch include
isamu-takagi Jan 23, 2025
78c840a
Merge branch 'feat-apply-autoware-prefix-for-system-component-state-m…
isamu-takagi Jan 23, 2025
bee8309
fix node name
isamu-takagi Jan 23, 2025
ac2fb89
fix component plugin
isamu-takagi Jan 23, 2025
2b78732
Merge branch 'main' into feat-apply-autoware-prefix-for-system-compon…
sasakisasaki Jan 23, 2025
f564b2b
docs: add autoware_ prefix to componet_state_monitor in docs
mitsudome-r Jan 24, 2025
3768aa9
fix: add autoware_ prefix to diagnostic_graph_aggregator for the rema…
mitsudome-r Jan 24, 2025
f7c9c25
docs(autoware_system_diagnostic_monitor): add autoware_ prefix to the…
mitsudome-r Jan 24, 2025
e5a3b42
docs(autoware_topic_state_monitor): add autoware_ prefix to the packa…
mitsudome-r Jan 24, 2025
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
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ system/autoware_component_monitor/** [email protected] [email protected] yavuz@l
system/autoware_default_adapi/** [email protected] [email protected] [email protected]
system/autoware_processing_time_checker/** [email protected] [email protected]
system/autoware_bluetooth_monitor/** [email protected] [email protected]
system/component_state_monitor/** [email protected]
system/autoware_default_adapi_helpers/autoware_adapi_adaptors/** [email protected] [email protected] [email protected]
system/autoware_default_adapi_helpers/autoware_adapi_visualizers/** [email protected] [email protected] [email protected]
system/autoware_default_adapi_helpers/autoware_automatic_pose_initializer/** [email protected] [email protected] [email protected]
system/diagnostic_graph_aggregator/** [email protected]
system/autoware_component_state_monitor/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
system/autoware_default_ad_api_helpers/autoware_ad_api_adaptors/** [email protected] [email protected] yukihiro.saito@tier4.jp junya.sasaki@tier4.jp
system/autoware_default_ad_api_helpers/autoware_ad_api_visualizers/** [email protected] [email protected] yukihiro.saito@tier4.jp junya.sasaki@tier4.jp
system/autoware_default_ad_api_helpers/autoware_automatic_pose_initializer/** [email protected] [email protected] yukihiro.saito@tier4.jp junya.sasaki@tier4.jp
system/autoware_diagnostic_graph_aggregator/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
system/diagnostic_graph_utils/** [email protected]
system/autoware_dummy_diag_publisher/** [email protected] [email protected]
system/autoware_dummy_infrastructure/** [email protected]
Expand All @@ -224,9 +224,9 @@ system/hazard_status_converter/** [email protected]
system/mrm_comfortable_stop_operator/** [email protected] [email protected]
system/mrm_emergency_stop_operator/** [email protected] [email protected]
system/mrm_handler/** [email protected] [email protected] [email protected]
system/system_diagnostic_monitor/** [email protected]
system/autoware_system_diagnostic_monitor/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
system/system_monitor/** [email protected] [email protected]
system/topic_state_monitor/** [email protected]
system/autoware_topic_state_monitor/** ryohsuke.mitsudome@tier4.jp junya.sasaki@tier4.jp
system/velodyne_monitor/** [email protected]
tools/reaction_analyzer/** [email protected]
vehicle/autoware_accel_brake_map_calibrator/** [email protected] [email protected] [email protected] [email protected]
Expand Down
4 changes: 2 additions & 2 deletions launch/tier4_system_launch/launch/system.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<!-- Component State Monitor -->
<group>
<include file="$(find-pkg-share component_state_monitor)/launch/component_state_monitor.launch.py">
<include file="$(find-pkg-share autoware_component_state_monitor)/launch/component_state_monitor.launch.py">
<arg name="mode" value="$(var run_mode)"/>
<arg name="file" value="$(var component_state_monitor_topic_path)"/>
</include>
Expand All @@ -92,7 +92,7 @@

<!-- Diagnostic Graph Aggregator -->
<group>
<include file="$(find-pkg-share system_diagnostic_monitor)/launch/system_diagnostic_monitor.launch.xml">
<include file="$(find-pkg-share autoware_system_diagnostic_monitor)/launch/system_diagnostic_monitor.launch.xml">
<arg name="param_file" value="$(var diagnostic_graph_aggregator_param_path)"/>
<arg name="graph_file" value="$(var diagnostic_graph_aggregator_graph_path)"/>
</include>
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_system_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<exec_depend>component_state_monitor</exec_depend>
<exec_depend>autoware_component_state_monitor</exec_depend>
<exec_depend>system_monitor</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package component_state_monitor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package autoware_component_state_monitor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.40.0 (2024-12-12)
-------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(component_state_monitor)
project(autoware_component_state_monitor)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand All @@ -9,7 +9,7 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
)

rclcpp_components_register_nodes(${PROJECT_NAME}
"component_state_monitor::StateMonitor"
"autoware::component_state_monitor::StateMonitor"
)

ament_auto_package(INSTALL_TO_SHARE config launch)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# component_state_monitor
# autoware_component_state_monitor

The component state monitor checks the state of each component using topic state monitor.
This is an implementation for backward compatibility with the AD service state monitor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_topic_monitor_name(row):

def create_topic_monitor_node(row):
tf_mode = "" if "topic_type" in row["args"] else "_tf"
package = FindPackageShare("topic_state_monitor")
package = FindPackageShare("autoware_topic_state_monitor")
include = PathJoinSubstitution([package, f"launch/topic_state_monitor{tf_mode}.launch.xml"])
diag_name = create_diagnostic_name(row)
arguments = [("diag_name", diag_name)] + [(k, str(v)) for k, v in row["args"].items()]
Expand All @@ -60,10 +60,10 @@ def launch_setup(context, *args, **kwargs):

# create component
component = ComposableNode(
namespace="component_state_monitor",
namespace="autoware_component_state_monitor",
name="component",
package="component_state_monitor",
plugin="component_state_monitor::StateMonitor",
package="autoware_component_state_monitor",
plugin="autoware::component_state_monitor::StateMonitor",
parameters=[{"topic_monitor_names": topic_monitor_names}, topic_monitor_param],
)
container = ComposableNodeContainer(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>component_state_monitor</name>
<name>autoware_component_state_monitor</name>
<version>0.40.0</version>
<description>The component_state_monitor package</description>
<description>The autoware_component_state_monitor package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
Expand All @@ -15,7 +16,7 @@
<depend>rclcpp_components</depend>
<depend>tier4_system_msgs</depend>

<exec_depend>topic_state_monitor</exec_depend>
<exec_depend>autoware_topic_state_monitor</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <unordered_map>
#include <vector>

namespace component_state_monitor
namespace autoware::component_state_monitor
{

// clang-format off
Expand Down Expand Up @@ -129,7 +129,7 @@
}
}

} // namespace component_state_monitor
} // namespace autoware::component_state_monitor

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(component_state_monitor::StateMonitor)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::component_state_monitor::StateMonitor)

Check warning on line 135 in system/autoware_component_state_monitor/src/main.cpp

View check run for this annotation

Codecov / codecov/patch

system/autoware_component_state_monitor/src/main.cpp#L135

Added line #L135 was not covered by tests
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <unordered_map>
#include <vector>

namespace component_state_monitor
namespace autoware::component_state_monitor
{

// clang-format off
Expand Down Expand Up @@ -73,6 +73,6 @@ class StateMonitor : public rclcpp::Node
void on_diag(const DiagnosticArray::ConstSharedPtr msg);
};

} // namespace component_state_monitor
} // namespace autoware::component_state_monitor

#endif // MAIN_HPP_
2 changes: 1 addition & 1 deletion system/autoware_default_adapi/document/autoware-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Overview

Since `/autoware/state` was so widely used, this packages creates it from the states of AD API for backwards compatibility.
The diagnostic checks that ad_service_state_monitor used to perform have been replaced by component_state_monitor.
The diagnostic checks that ad_service_state_monitor used to perform have been replaced by autoware_component_state_monitor.
The service `/autoware/shutdown` to change autoware state to finalizing is also supported for compatibility.

![autoware-state-architecture](images/autoware-state-architecture.drawio.svg)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package diagnostic_graph_aggregator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package autoware_diagnostic_graph_aggregator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.40.0 (2024-12-12)
-------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(diagnostic_graph_aggregator)
project(autoware_diagnostic_graph_aggregator)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down Expand Up @@ -30,8 +30,8 @@ ament_auto_add_library(aggregator SHARED
target_include_directories(aggregator PRIVATE src/common)

rclcpp_components_register_node(aggregator
PLUGIN "diagnostic_graph_aggregator::AggregatorNode"
EXECUTABLE aggregator_node
PLUGIN "autoware::diagnostic_graph_aggregator::AggregatorNode"
EXECUTABLE ${PROJECT_NAME}_node
)

if(BUILD_TESTING)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# diagnostic_graph_aggregator
# autoware_diagnostic_graph_aggregator

## Overview

Expand Down Expand Up @@ -66,15 +66,15 @@ This is an example of a diagnostic graph configuration. The configuration can be
- [module2.yaml](./example/graph/module2.yaml)

```bash
ros2 launch diagnostic_graph_aggregator example-main.launch.xml
ros2 launch autoware_diagnostic_graph_aggregator example-main.launch.xml
```

You can reuse the graph by making partial edits. For example, disable hardware checks for simulation.

- [edit.yaml](./example/graph/edit.yaml)

```bash
ros2 launch diagnostic_graph_aggregator example-edit.launch.xml
ros2 launch autoware_diagnostic_graph_aggregator example-edit.launch.xml
```

## Debug tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This tool displays the graph structure of the configuration file in tree format.
## Usage

```bash
ros2 run diagnostic_graph_aggregator tree <graph-config-path>
ros2 run autoware_diagnostic_graph_aggregator tree <graph-config-path>
```

## Examples

```bash
ros2 run diagnostic_graph_aggregator tree '$(find-pkg-share diagnostic_graph_aggregator)/example/graph/main.yaml'
ros2 run autoware_diagnostic_graph_aggregator tree '$(find-pkg-share autoware_diagnostic_graph_aggregator)/example/graph/main.yaml'
```

```txt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<include file="$(find-pkg-share autoware_diagnostic_graph_aggregator)/launch/aggregator.launch.xml">
<arg name="graph_file" value="$(find-pkg-share autoware_diagnostic_graph_aggregator)/example/graph/edit.yaml"/>
</include>
<executable cmd="python3 $(find-pkg-share autoware_diagnostic_graph_aggregator)/example/dummy-diags.py"/>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<launch>
<include file="$(find-pkg-share autoware_diagnostic_graph_aggregator)/launch/aggregator.launch.xml">
<arg name="graph_file" value="$(find-pkg-share autoware_diagnostic_graph_aggregator)/example/graph/main.yaml"/>
</include>
<executable cmd="python3 $(find-pkg-share autoware_diagnostic_graph_aggregator)/example/dummy-diags.py"/>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<launch>
<arg name="param_file" default="$(find-pkg-share autoware_diagnostic_graph_aggregator)/config/default.param.yaml"/>
<arg name="graph_file"/>
<node pkg="autoware_diagnostic_graph_aggregator" exec="autoware_diagnostic_graph_aggregator_node">
<param from="$(var param_file)"/>
<param name="graph_file" value="$(var graph_file)"/>
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>diagnostic_graph_aggregator</name>
<name>autoware_diagnostic_graph_aggregator</name>
<version>0.40.0</version>
<description>The diagnostic_graph_aggregator package</description>
<maintainer email="[email protected]">Takagi, Isamu</maintainer>
<maintainer email="[email protected]">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <utility>
#include <vector>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

std::string resolve_substitution(const std::string & substitution, const TreeData & data)
Expand Down Expand Up @@ -309,4 +309,4 @@ FileConfig TreeLoader::construct()
return config;
}

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string>
#include <vector>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

struct PathConfig
Expand Down Expand Up @@ -98,6 +98,6 @@ class TreeLoader
std::vector<FileLoader> files_;
};

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator

#endif // COMMON__GRAPH__CONFIG_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <string>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

TreeData TreeData::Load(const std::string & path)
Expand Down Expand Up @@ -96,4 +96,4 @@ double TreeData::real(double fail)
return yaml_.as<double>(fail);
}

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string>
#include <vector>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

class TreeData
Expand Down Expand Up @@ -51,6 +51,6 @@ class TreeData
TreePath path_;
};

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator

#endif // COMMON__GRAPH__DATA_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <string>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

TreePath::TreePath(const std::string & file)
Expand Down Expand Up @@ -57,4 +57,4 @@ std::string TreePath::text() const
return " (" + file_ + sep + node_ + ")";
}

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <stdexcept>
#include <string>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

struct TreePath
Expand Down Expand Up @@ -127,6 +127,6 @@ struct GraphStructure : public Exception
using Exception::Exception;
};

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator

#endif // COMMON__GRAPH__ERROR_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <string>
#include <unordered_map>

namespace diagnostic_graph_aggregator
namespace autoware::diagnostic_graph_aggregator
{

void Graph::create(const std::string & file, const std::string & id)
Expand Down Expand Up @@ -77,4 +77,4 @@ DiagGraphStatus Graph::create_status(const rclcpp::Time & stamp) const
Graph::Graph() = default;
Graph::~Graph() = default;

} // namespace diagnostic_graph_aggregator
} // namespace autoware::diagnostic_graph_aggregator
Loading
Loading