Skip to content

Commit

Permalink
fix(autoware_dummy_diag_publisher): add autowre prefix (#9958)
Browse files Browse the repository at this point in the history
* fic: add autoare_ prefix

Signed-off-by: TetsuKawa <[email protected]>

* fix: add autoare_ prefix codeowner

Signed-off-by: TetsuKawa <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: TetsuKawa <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
TetsuKawa and pre-commit-ci[bot] authored Jan 22, 2025
1 parent f36d072 commit b132a88
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ system/default_ad_api_helpers/ad_api_visualizers/** [email protected] ryohsu
system/default_ad_api_helpers/automatic_pose_initializer/** [email protected] [email protected] [email protected]
system/diagnostic_graph_aggregator/** [email protected]
system/diagnostic_graph_utils/** [email protected]
system/dummy_diag_publisher/** [email protected] [email protected]
system/autoware_dummy_diag_publisher/** [email protected] [email protected]
system/dummy_infrastructure/** [email protected]
system/duplicated_node_checker/** [email protected] [email protected] [email protected]
system/hazard_status_converter/** [email protected]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(dummy_diag_publisher)
project(autoware_dummy_diag_publisher)

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

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "DummyDiagPublisher"
PLUGIN "autoware::dummy_diag_publisher::DummyDiagPublisher"
EXECUTABLE ${PROJECT_NAME}_node
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TBD.
### launch

```sh
ros2 launch dummy_diag_publisher dummy_diag_publisher.launch.xml
ros2 launch autoware_dummy_diag_publisher dummy_diag_publisher.launch.xml
```

### reconfigure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_
#define DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_
#ifndef AUTOWARE__DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_
#define AUTOWARE__DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_

#include <rclcpp/rclcpp.hpp>

Expand All @@ -23,6 +23,8 @@
#include <string>
#include <vector>

namespace autoware::dummy_diag_publisher
{
struct DiagConfig
{
std::string hardware_id;
Expand Down Expand Up @@ -75,5 +77,6 @@ class DummyDiagPublisher : public rclcpp::Node
rclcpp::TimerBase::SharedPtr timer_;
rclcpp::Publisher<diagnostic_msgs::msg::DiagnosticArray>::SharedPtr pub_;
};
} // namespace autoware::dummy_diag_publisher

#endif // DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_
#endif // AUTOWARE__DUMMY_DIAG_PUBLISHER__DUMMY_DIAG_PUBLISHER_CORE_HPP_
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<launch>
<arg name="config_file" default="$(find-pkg-share dummy_diag_publisher)/config/_empty.param.yaml"/>
<arg name="extra_config_file_sensor" default="$(find-pkg-share dummy_diag_publisher)/config/_empty.param.yaml"/>
<arg name="config_file" default="$(find-pkg-share autoware_dummy_diag_publisher)/config/_empty.param.yaml"/>
<arg name="extra_config_file_sensor" default="$(find-pkg-share autoware_dummy_diag_publisher)/config/_empty.param.yaml"/>
<arg name="update_rate" default="10.0"/>

<arg name="launch_rqt_reconfigure" default="true"/>
Expand All @@ -26,7 +26,7 @@
</node>
</group>

<include file="$(find-pkg-share dummy_diag_publisher)/launch/dummy_diag_publisher_node.launch.xml">
<include file="$(find-pkg-share autoware_dummy_diag_publisher)/launch/dummy_diag_publisher_node.launch.xml">
<arg name="config_file" value="$(var config_file)"/>
<arg name="extra_config_file_sensor" value="$(var extra_config_file_sensor)"/>
<arg name="update_rate" value="$(var update_rate)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<launch>
<arg name="config_file" default="$(find-pkg-share autoware_dummy_diag_publisher)/config/dummy_diag_publisher.param.yaml"/>
<arg name="extra_config_file_sensor" default="$(find-pkg-share autoware_dummy_diag_publisher)/config/extra.param.yaml"/>
<arg name="update_rate" default="10.0"/>

<group>
<node pkg="autoware_dummy_diag_publisher" exec="autoware_dummy_diag_publisher_node" name="dummy_diag_publisher" output="screen">
<param from="$(var config_file)"/>
<param from="$(var extra_config_file_sensor)"/>
<param name="update_rate" value="$(var update_rate)"/>
</node>
</group>
</launch>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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>dummy_diag_publisher</name>
<name>autoware_dummy_diag_publisher</name>
<version>0.40.0</version>
<description>The dummy_diag_publisher ROS 2 package</description>
<maintainer email="[email protected]">Fumihito Ito</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "dummy_diag_publisher/dummy_diag_publisher_core.hpp"
#include "autoware/dummy_diag_publisher/dummy_diag_publisher_core.hpp"

#include <set>
#include <string>
Expand All @@ -24,7 +24,7 @@

#include <sstream>

namespace
namespace autoware::dummy_diag_publisher
{
std::vector<std::string> split(const std::string & str, const char delim)
{
Expand All @@ -36,7 +36,6 @@ std::vector<std::string> split(const std::string & str, const char delim)
}
return elems;
}
} // namespace

std::optional<DummyDiagPublisher::Status> DummyDiagPublisher::convertStrToStatus(
const std::string & status_str)
Expand Down Expand Up @@ -226,6 +225,7 @@ DummyDiagPublisher::DummyDiagPublisher(const rclcpp::NodeOptions & options)
param_callback_handle_ = this->add_on_set_parameters_callback(
std::bind(&DummyDiagPublisher::onSetParams, this, std::placeholders::_1));
}
} // namespace autoware::dummy_diag_publisher

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(DummyDiagPublisher)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::dummy_diag_publisher::DummyDiagPublisher)

This file was deleted.

0 comments on commit b132a88

Please sign in to comment.