Skip to content

Commit

Permalink
feat: apply autoware_ prefix for mrm_emergency_stop_operator (#9973)
Browse files Browse the repository at this point in the history
* feat(mrm_emergency_stop_operator): 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 <[email protected]>

* rename(mrm_emergency_stop_operator): 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 <[email protected]>

* fix(mrm_emergency_stop_operator): fix include header path

  * To follow the previous commit

Signed-off-by: Junya Sasaki <[email protected]>

* rename: `mrm_emergency_stop_operator` => `autoware_mrm_emergency_stop_operator`

Signed-off-by: Junya Sasaki <[email protected]>

* bug(autoware_mrm_emergency_stop_operator): revert wrongly updated copyrights

Signed-off-by: Junya Sasaki <[email protected]>

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

Signed-off-by: Junya Sasaki <[email protected]>

* bug(autoware_mrm_emergency_stop_operator): fix critical bugs that contaminate topic names

Signed-off-by: Junya Sasaki <[email protected]>

---------

Signed-off-by: Junya Sasaki <[email protected]>
  • Loading branch information
sasakisasaki authored Jan 23, 2025
1 parent dbfee16 commit c53af8a
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 32 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 @@ -85,7 +85,7 @@
</include>
</group>
<group>
<include file="$(find-pkg-share mrm_emergency_stop_operator)/launch/mrm_emergency_stop_operator.launch.py">
<include file="$(find-pkg-share autoware_mrm_emergency_stop_operator)/launch/mrm_emergency_stop_operator.launch.py">
<arg name="config_file" value="$(var mrm_emergency_stop_operator_param_path)"/>
</include>
</group>
Expand Down
19 changes: 19 additions & 0 deletions system/autoware_mrm_emergency_stop_operator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_mrm_emergency_stop_operator)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(${PROJECT_NAME}_component SHARED
src/mrm_emergency_stop_operator/mrm_emergency_stop_operator_core.cpp
)

rclcpp_components_register_node(${PROJECT_NAME}_component
PLUGIN "autoware::mrm_emergency_stop_operator::MrmEmergencyStopOperator"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package(INSTALL_TO_SHARE
launch
config
)
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_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_
#define MRM_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_
#ifndef AUTOWARE__MRM_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_
#define AUTOWARE__MRM_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_

// Core
#include <functional>
Expand All @@ -28,7 +28,7 @@
#include <rclcpp/rclcpp.hpp>

#include <vector>
namespace mrm_emergency_stop_operator
namespace autoware::mrm_emergency_stop_operator
{
using autoware_control_msgs::msg::Control;
using tier4_system_msgs::msg::MrmBehaviorStatus;
Expand Down Expand Up @@ -86,6 +86,6 @@ class MrmEmergencyStopOperator : public rclcpp::Node
Control calcTargetAcceleration(const Control & prev_control_cmd) const;
};

} // namespace mrm_emergency_stop_operator
} // namespace autoware::mrm_emergency_stop_operator

#endif // MRM_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_
#endif // AUTOWARE__MRM_EMERGENCY_STOP_OPERATOR__MRM_EMERGENCY_STOP_OPERATOR_CORE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def launch_setup(context, *args, **kwargs):
params = yaml.safe_load(f)["/**"]["ros__parameters"]

component = ComposableNode(
package="mrm_emergency_stop_operator",
plugin="mrm_emergency_stop_operator::MrmEmergencyStopOperator",
package="autoware_mrm_emergency_stop_operator",
plugin="autoware::mrm_emergency_stop_operator::MrmEmergencyStopOperator",
name="mrm_emergency_stop_operator",
parameters=[
params,
Expand Down Expand Up @@ -61,7 +61,7 @@ def generate_launch_description():
DeclareLaunchArgument(
"config_file",
default_value=[
FindPackageShare("mrm_emergency_stop_operator"),
FindPackageShare("autoware_mrm_emergency_stop_operator"),
"/config/mrm_emergency_stop_operator.param.yaml",
],
description="path to the parameter file of mrm_emergency_stop_operator",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?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_emergency_stop_operator</name>
<name>autoware_mrm_emergency_stop_operator</name>
<version>0.40.0</version>
<description>The MRM emergency stop operator package</description>
<maintainer email="[email protected]">Makoto Kurihara</maintainer>
<maintainer email="[email protected]">Tomohito Ando</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 @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "mrm_emergency_stop_operator/mrm_emergency_stop_operator_core.hpp"
#include "autoware/mrm_emergency_stop_operator/mrm_emergency_stop_operator_core.hpp"

#include <autoware/universe_utils/ros/update_param.hpp>

#include <vector>

namespace mrm_emergency_stop_operator
namespace autoware::mrm_emergency_stop_operator
{

MrmEmergencyStopOperator::MrmEmergencyStopOperator(const rclcpp::NodeOptions & node_options)
Expand Down Expand Up @@ -150,7 +150,7 @@ Control MrmEmergencyStopOperator::calcTargetAcceleration(const Control & prev_co
return control_cmd;
}

} // namespace mrm_emergency_stop_operator
} // namespace autoware::mrm_emergency_stop_operator

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(mrm_emergency_stop_operator::MrmEmergencyStopOperator)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::mrm_emergency_stop_operator::MrmEmergencyStopOperator)
18 changes: 0 additions & 18 deletions system/mrm_emergency_stop_operator/CMakeLists.txt

This file was deleted.

0 comments on commit c53af8a

Please sign in to comment.