Skip to content

Commit

Permalink
feat: apply autoware_ prefix for mrm_handler (#9974)
Browse files Browse the repository at this point in the history
* feat(mrm_handler): apply `autoware_` prefix (see below):

  Note:
    * In this commit, I did not organize a folder structure.
      The folder structure will be organized in the next some commits.
    * The changes will follow the Autoware's guideline as below:
        - https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/directory-structure/#package-folder

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* rename(mrm_handler): move a header under `include/autoware`:

  * Fixes due to this changes for .hpp/.cpp files will be applied in the next commit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix(mrm_handler): fix include header path

  * To follow the previous commit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* rename: `mrm_handler` => `autoware_mrm_handler`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug(tier4_system_launch): fix a missing `autoware_` for `mrm_handler`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug(mrm_handler): revert wrongly updated copyrights

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* update(mrm_handler): `README.md`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug(autoware_mrm_handler): fix a critical bug that contaminates topic name

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

---------

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
  • Loading branch information
sasakisasaki authored Jan 23, 2025
1 parent f0c8170 commit dbfee16
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion launch/tier4_system_launch/launch/system.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

<!-- MRM Handler -->
<group>
<include file="$(find-pkg-share mrm_handler)/launch/mrm_handler.launch.xml">
<include file="$(find-pkg-share autoware_mrm_handler)/launch/mrm_handler.launch.xml">
<arg name="config_file" value="$(var mrm_handler_param_path)"/>
</include>
</group>
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(mrm_handler)
project(autoware_mrm_handler)

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 "MrmHandler"
PLUGIN "autoware::mrm_handler::MrmHandler"
EXECUTABLE ${PROJECT_NAME}_node
EXECUTOR MultiThreadedExecutor
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MRM Handler is a node to select a proper MRM from a system failure state contain

## Parameters

{{ json_to_markdown("system/mrm_handler/schema/mrm_handler.schema.json") }}
{{ json_to_markdown("system/autoware_mrm_handler/schema/mrm_handler.schema.json") }}

## Assumptions / Known limits

Expand Down
File renamed without changes
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 MRM_HANDLER__MRM_HANDLER_CORE_HPP_
#define MRM_HANDLER__MRM_HANDLER_CORE_HPP_
#ifndef AUTOWARE__MRM_HANDLER__MRM_HANDLER_CORE_HPP_
#define AUTOWARE__MRM_HANDLER__MRM_HANDLER_CORE_HPP_

// Core
#include <memory>
Expand Down Expand Up @@ -41,6 +41,9 @@
#include <diagnostic_msgs/msg/diagnostic_array.hpp>
#include <nav_msgs/msg/odometry.hpp>

namespace autoware::mrm_handler
{

struct HazardLampPolicy
{
bool emergency;
Expand Down Expand Up @@ -162,4 +165,6 @@ class MrmHandler : public rclcpp::Node
bool isArrivedAtGoal();
};

#endif // MRM_HANDLER__MRM_HANDLER_CORE_HPP_
} // namespace autoware::mrm_handler

#endif // AUTOWARE__MRM_HANDLER__MRM_HANDLER_CORE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<arg name="output_mrm_comfortable_stop_operate" default="/system/mrm/comfortable_stop/operate"/>
<arg name="output_mrm_emergency_stop_operate" default="/system/mrm/emergency_stop/operate"/>

<arg name="config_file" default="$(find-pkg-share mrm_handler)/config/mrm_handler.param.yaml"/>
<arg name="config_file" default="$(find-pkg-share autoware_mrm_handler)/config/mrm_handler.param.yaml"/>

<!-- mrm_handler -->
<node pkg="mrm_handler" exec="mrm_handler_node" name="mrm_handler" output="screen">
<node pkg="autoware_mrm_handler" exec="autoware_mrm_handler_node" name="mrm_handler" output="screen">
<remap from="~/input/operation_mode_availability" to="$(var input_operation_mode_availability)"/>
<remap from="~/input/odometry" to="$(var input_odometry)"/>
<remap from="~/input/control_mode" to="$(var input_control_mode)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?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>mrm_handler</name>
<name>autoware_mrm_handler</name>
<version>0.40.0</version>
<description>The mrm_handler ROS 2 package</description>
<maintainer email="makoto.kurihara@tier4.jp">Makoto Kurihara</maintainer>
<maintainer email="ryuta.kambe@tier4.jp">Ryuta Kambe</maintainer>
<maintainer email="tetsuhiro.kawaguchi@tier4.jp">Tetsuhiro Kawaguchi</maintainer>
<maintainer email="junya.sasaki@tier4.jp">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 @@ -11,13 +11,16 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
// governing permissions and limitations under the License.

#include "mrm_handler/mrm_handler_core.hpp"
#include "autoware/mrm_handler/mrm_handler_core.hpp"

#include <chrono>
#include <memory>
#include <string>
#include <utility>

namespace autoware::mrm_handler
{

MrmHandler::MrmHandler(const rclcpp::NodeOptions & options) : Node("mrm_handler", options)
{
// Parameter
Expand Down Expand Up @@ -583,5 +586,7 @@ bool MrmHandler::isArrivedAtGoal()
return state->mode == OperationModeState::STOP;
}

} // namespace autoware::mrm_handler

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(MrmHandler)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::mrm_handler::MrmHandler)

0 comments on commit dbfee16

Please sign in to comment.