diff --git a/control/autoware_shift_decider/CMakeLists.txt b/control/autoware_shift_decider/CMakeLists.txt new file mode 100644 index 0000000000000..269b0fcc33690 --- /dev/null +++ b/control/autoware_shift_decider/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.14) +project(autoware_shift_decider) + +find_package(autoware_cmake REQUIRED) +autoware_package() + +ament_auto_add_library(${PROJECT_NAME}_node SHARED + src/${PROJECT_NAME}.cpp +) + +rclcpp_components_register_node(${PROJECT_NAME}_node + PLUGIN "autoware::shift_decider::ShiftDecider" + EXECUTABLE ${PROJECT_NAME} +) + +ament_auto_package( + INSTALL_TO_SHARE + launch + config +) diff --git a/control/shift_decider/README.md b/control/autoware_shift_decider/README.md similarity index 93% rename from control/shift_decider/README.md rename to control/autoware_shift_decider/README.md index c9fdc20696f0e..84767abceff6b 100644 --- a/control/shift_decider/README.md +++ b/control/autoware_shift_decider/README.md @@ -2,7 +2,7 @@ ## Purpose -`shift_decider` is a module to decide shift from ackermann control command. +`autoware_shift_decider` is a module to decide shift from ackermann control command. ## Inner-workings / Algorithms diff --git a/control/shift_decider/config/shift_decider.param.yaml b/control/autoware_shift_decider/config/shift_decider.param.yaml similarity index 100% rename from control/shift_decider/config/shift_decider.param.yaml rename to control/autoware_shift_decider/config/shift_decider.param.yaml diff --git a/control/shift_decider/include/shift_decider/shift_decider.hpp b/control/autoware_shift_decider/include/autoware_shift_decider/autoware_shift_decider.hpp similarity index 88% rename from control/shift_decider/include/shift_decider/shift_decider.hpp rename to control/autoware_shift_decider/include/autoware_shift_decider/autoware_shift_decider.hpp index b11a0f40625af..f3371a372b800 100644 --- a/control/shift_decider/include/shift_decider/shift_decider.hpp +++ b/control/autoware_shift_decider/include/autoware_shift_decider/autoware_shift_decider.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SHIFT_DECIDER__SHIFT_DECIDER_HPP_ -#define SHIFT_DECIDER__SHIFT_DECIDER_HPP_ +#ifndef AUTOWARE_SHIFT_DECIDER__AUTOWARE_SHIFT_DECIDER_HPP_ +#define AUTOWARE_SHIFT_DECIDER__AUTOWARE_SHIFT_DECIDER_HPP_ #include @@ -24,6 +24,9 @@ #include +namespace autoware::shift_decider +{ + class ShiftDecider : public rclcpp::Node { public: @@ -52,5 +55,6 @@ class ShiftDecider : public rclcpp::Node bool park_on_goal_; }; +} // namespace autoware::shift_decider -#endif // SHIFT_DECIDER__SHIFT_DECIDER_HPP_ +#endif // AUTOWARE_SHIFT_DECIDER__AUTOWARE_SHIFT_DECIDER_HPP_ diff --git a/control/shift_decider/launch/shift_decider.launch.xml b/control/autoware_shift_decider/launch/shift_decider.launch.xml similarity index 55% rename from control/shift_decider/launch/shift_decider.launch.xml rename to control/autoware_shift_decider/launch/shift_decider.launch.xml index 73ed434ade7f6..d04af22ec828d 100644 --- a/control/shift_decider/launch/shift_decider.launch.xml +++ b/control/autoware_shift_decider/launch/shift_decider.launch.xml @@ -1,7 +1,7 @@ - + - + diff --git a/control/shift_decider/package.xml b/control/autoware_shift_decider/package.xml similarity index 89% rename from control/shift_decider/package.xml rename to control/autoware_shift_decider/package.xml index 885e780c90bcc..7ab292662bf96 100644 --- a/control/shift_decider/package.xml +++ b/control/autoware_shift_decider/package.xml @@ -1,9 +1,9 @@ - shift_decider + autoware_shift_decider 0.1.0 - The shift_decider package + The autoware_shift_decider package Takamasa Horibe Apache License 2.0 diff --git a/control/shift_decider/schema/shift_decider.schema.json b/control/autoware_shift_decider/schema/shift_decider.schema.json similarity index 100% rename from control/shift_decider/schema/shift_decider.schema.json rename to control/autoware_shift_decider/schema/shift_decider.schema.json diff --git a/control/shift_decider/src/shift_decider.cpp b/control/autoware_shift_decider/src/autoware_shift_decider.cpp similarity index 94% rename from control/shift_decider/src/shift_decider.cpp rename to control/autoware_shift_decider/src/autoware_shift_decider.cpp index f003513060a34..4df45d6ccdb26 100644 --- a/control/shift_decider/src/shift_decider.cpp +++ b/control/autoware_shift_decider/src/autoware_shift_decider.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "shift_decider/shift_decider.hpp" +#include "autoware_shift_decider/autoware_shift_decider.hpp" #include @@ -21,6 +21,9 @@ #include #include +namespace autoware::shift_decider +{ + ShiftDecider::ShiftDecider(const rclcpp::NodeOptions & node_options) : Node("shift_decider", node_options) { @@ -104,6 +107,7 @@ void ShiftDecider::initTimer(double period_s) timer_ = rclcpp::create_timer(this, get_clock(), period_ns, std::bind(&ShiftDecider::onTimer, this)); } +} // namespace autoware::shift_decider #include -RCLCPP_COMPONENTS_REGISTER_NODE(ShiftDecider) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::shift_decider::ShiftDecider) diff --git a/control/shift_decider/CMakeLists.txt b/control/shift_decider/CMakeLists.txt deleted file mode 100644 index ca6f4af74f8ca..0000000000000 --- a/control/shift_decider/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(shift_decider) - -find_package(autoware_cmake REQUIRED) -autoware_package() - -ament_auto_add_library(shift_decider_node SHARED - src/shift_decider.cpp -) - -rclcpp_components_register_node(shift_decider_node - PLUGIN "ShiftDecider" - EXECUTABLE shift_decider -) - -ament_auto_package( - INSTALL_TO_SHARE - launch - config -) diff --git a/launch/tier4_control_launch/control_launch.drawio.svg b/launch/tier4_control_launch/control_launch.drawio.svg index 5d13b84a0b34b..66050f7b06759 100644 --- a/launch/tier4_control_launch/control_launch.drawio.svg +++ b/launch/tier4_control_launch/control_launch.drawio.svg @@ -282,17 +282,17 @@ >
- shift_decider + autoware_shift_decider

- package: shift_decider + package: autoware_shift_decider
- shift_decider... + autoware_shift_decider... diff --git a/launch/tier4_control_launch/launch/control.launch.py b/launch/tier4_control_launch/launch/control.launch.py index 77140b0e0f630..5008560aa5620 100644 --- a/launch/tier4_control_launch/launch/control.launch.py +++ b/launch/tier4_control_launch/launch/control.launch.py @@ -122,9 +122,9 @@ def launch_setup(context, *args, **kwargs): # shift decider shift_decider_component = ComposableNode( - package="shift_decider", - plugin="ShiftDecider", - name="shift_decider", + package="autoware_shift_decider", + plugin="autoware::shift_decider::ShiftDecider", + name="autoware_shift_decider", remappings=[ ("input/control_cmd", "/control/trajectory_follower/control_cmd"), ("input/state", "/autoware/state"), diff --git a/launch/tier4_control_launch/package.xml b/launch/tier4_control_launch/package.xml index 801fa274dd086..0c02672783be4 100644 --- a/launch/tier4_control_launch/package.xml +++ b/launch/tier4_control_launch/package.xml @@ -11,11 +11,11 @@ ament_cmake_auto autoware_cmake + autoware_shift_decider control_evaluator external_cmd_converter external_cmd_selector lane_departure_checker - shift_decider trajectory_follower_node vehicle_cmd_gate