Skip to content

Commit

Permalink
refactor(shift_decider): prefix package and namespace with autoware_ (#…
Browse files Browse the repository at this point in the history
…7310)

* RT1-6684 add autoware prefix and namespace

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* RT1-6684 Revert svg

This reverts commit 4e0569e.

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Co-authored-by: Takayuki Murooka <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 and takayuki5168 authored Jun 11, 2024
1 parent 822519d commit 687ead9
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 34 deletions.
20 changes: 20 additions & 0 deletions control/autoware_shift_decider/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 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 <rclcpp/rclcpp.hpp>

Expand All @@ -24,6 +24,9 @@

#include <memory>

namespace autoware::shift_decider
{

class ShiftDecider : public rclcpp::Node
{
public:
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<launch>
<arg name="config_file" default="$(find-pkg-share shift_decider)/config/shift_decider.param.yaml"/>
<arg name="config_file" default="$(find-pkg-share autoware_shift_decider)/config/shift_decider.param.yaml"/>

<node pkg="shift_decider" exec="shift_decider" name="shift_decider" output="screen">
<node pkg="autoware_shift_decider" exec="autoware_shift_decider" name="autoware_shift_decider" output="screen">
<remap from="input/control_cmd" to="/control/trajectory_follower/control_cmd"/>
<remap from="input/state" to="/autoware/state"/>
<remap from="output/gear_cmd" to="/control/shift_decider/gear_cmd"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?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>shift_decider</name>
<name>autoware_shift_decider</name>
<version>0.1.0</version>
<description>The shift_decider package</description>
<description>The autoware_shift_decider package</description>
<maintainer email="[email protected]">Takamasa Horibe</maintainer>
<maintainer email="[email protected]">Takayuki Murooka</maintainer>
<license>Apache License 2.0</license>
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 "shift_decider/shift_decider.hpp"
#include "autoware_shift_decider/autoware_shift_decider.hpp"

#include <rclcpp/timer.hpp>

Expand All @@ -21,6 +21,9 @@
#include <memory>
#include <utility>

namespace autoware::shift_decider
{

ShiftDecider::ShiftDecider(const rclcpp::NodeOptions & node_options)
: Node("shift_decider", node_options)
{
Expand Down Expand Up @@ -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_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(ShiftDecider)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::shift_decider::ShiftDecider)
20 changes: 0 additions & 20 deletions control/shift_decider/CMakeLists.txt

This file was deleted.

6 changes: 3 additions & 3 deletions launch/tier4_control_launch/launch/control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion launch/tier4_control_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<exec_depend>autoware_external_cmd_converter</exec_depend>
<exec_depend>autoware_external_cmd_selector</exec_depend>
<exec_depend>autoware_lane_departure_checker</exec_depend>
<exec_depend>autoware_shift_decider</exec_depend>
<exec_depend>autoware_vehicle_cmd_gate</exec_depend>
<exec_depend>control_evaluator</exec_depend>
<exec_depend>shift_decider</exec_depend>
<exec_depend>trajectory_follower_node</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down

0 comments on commit 687ead9

Please sign in to comment.