Skip to content

Commit

Permalink
refactor(external cmd converter)!: add autoware_ prefix (#7361)
Browse files Browse the repository at this point in the history
* add prefix to the code

Signed-off-by: Yuki Takagi <[email protected]>

* rename

Signed-off-by: Yuki Takagi <[email protected]>

* fix

Signed-off-by: Yuki Takagi <[email protected]>

* fix

Signed-off-by: Yuki Takagi <[email protected]>

* fix

Signed-off-by: Yuki Takagi <[email protected]>

* Update .github/CODEOWNERS

---------

Signed-off-by: Yuki Takagi <[email protected]>
Co-authored-by: Takayuki Murooka <[email protected]>
  • Loading branch information
2 people authored and KhalilSelyan committed Jul 22, 2024
1 parent c50743d commit e438fc5
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 38 deletions.
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,8 @@ system/system_monitor/** [email protected] [email protected]
system/topic_state_monitor/** [email protected]
system/velodyne_monitor/** [email protected]
tools/reaction_analyzer/** [email protected]
vehicle/autoware_steer_offset_estimator/** [email protected]
vehicle/autoware_accel_brake_map_calibrator/** [email protected] [email protected] [email protected]
vehicle/external_cmd_converter/** [email protected]
vehicle/autoware_external_cmd_converter/** [email protected]
vehicle/autoware_raw_vehicle_cmd_converter/** [email protected] [email protected] [email protected]
vehicle/autoware_steer_offset_estimator/** [email protected]
vehicle/autoware_vehicle_info_utils/** [email protected] [email protected] [email protected]
Expand Down
5 changes: 4 additions & 1 deletion launch/tier4_control_launch/launch/control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ def launch_setup(context, *args, **kwargs):
# external cmd converter
external_cmd_converter_loader = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[FindPackageShare("external_cmd_converter"), "/launch/external_cmd_converter.launch.py"]
[
FindPackageShare("autoware_external_cmd_converter"),
"/launch/external_cmd_converter.launch.py",
]
),
launch_arguments=[
("use_intra_process", LaunchConfiguration("use_intra_process")),
Expand Down
3 changes: 2 additions & 1 deletion launch/tier4_control_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<buildtool_depend>autoware_cmake</buildtool_depend>

<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_vehicle_cmd_gate</exec_depend>
<exec_depend>control_evaluator</exec_depend>
<exec_depend>external_cmd_converter</exec_depend>
<exec_depend>external_cmd_selector</exec_depend>
<exec_depend>shift_decider</exec_depend>
<exec_depend>trajectory_follower_node</exec_depend>

Expand Down
19 changes: 19 additions & 0 deletions vehicle/autoware_external_cmd_converter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_external_cmd_converter)

find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(autoware_external_cmd_converter SHARED
src/node.cpp
)

rclcpp_components_register_node(autoware_external_cmd_converter
PLUGIN "autoware::external_cmd_converter::ExternalCmdConverterNode"
EXECUTABLE external_cmd_converter_node
)

ament_auto_package(INSTALL_TO_SHARE
launch
config
)
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 EXTERNAL_CMD_CONVERTER__NODE_HPP_
#define EXTERNAL_CMD_CONVERTER__NODE_HPP_
#ifndef AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_
#define AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_

#include "tier4_autoware_utils/ros/polling_subscriber.hpp"

Expand All @@ -32,7 +32,7 @@
#include <memory>
#include <string>

namespace external_cmd_converter
namespace autoware::external_cmd_converter
{
using GearCommand = autoware_vehicle_msgs::msg::GearCommand;
using autoware_control_msgs::msg::Control;
Expand Down Expand Up @@ -104,6 +104,6 @@ class ExternalCmdConverterNode : public rclcpp::Node
double get_shift_velocity_sign(const GearCommand & cmd);
};

} // namespace external_cmd_converter
} // namespace autoware::external_cmd_converter

#endif // EXTERNAL_CMD_CONVERTER__NODE_HPP_
#endif // AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def generate_launch_description():
]

component = ComposableNode(
package="external_cmd_converter",
plugin="external_cmd_converter::ExternalCmdConverterNode",
package="autoware_external_cmd_converter",
plugin="autoware::external_cmd_converter::ExternalCmdConverterNode",
name="external_cmd_converter",
remappings=[
_create_mapping_tuple("in/external_control_cmd"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<launch>
<arg name="external_cmd_converter_param" default="$(find-pkg-share external_cmd_converter)/config/external_cmd_converter.param.yaml"/>
<arg name="external_cmd_converter_param" default="$(find-pkg-share autoware_external_cmd_converter)/config/external_cmd_converter.param.yaml"/>
<!-- map file -->
<arg name="csv_path_accel_map" default="$(find-pkg-share autoware_raw_vehicle_cmd_converter)/data/default/accel_map.csv"/>
<arg name="csv_path_brake_map" default="$(find-pkg-share autoware_raw_vehicle_cmd_converter)/data/default/brake_map.csv"/>
Expand All @@ -24,7 +24,7 @@
<arg name="out/latest_external_control_cmd" default="/api/external/get/command/selected/control"/>

<!-- node -->
<node pkg="external_cmd_converter" exec="external_cmd_converter_node" name="external_cmd_converter" output="screen">
<node pkg="autoware_external_cmd_converter" exec="external_cmd_converter_node" name="external_cmd_converter" output="screen">
<param from="$(var external_cmd_converter_param)" allow_substs="true"/>
<remap from="in/external_control_cmd" to="$(var in/external_control_cmd)"/>
<remap from="in/shift_cmd" to="$(var in/shift_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>external_cmd_converter</name>
<name>autoware_external_cmd_converter</name>
<version>0.1.0</version>
<description>The external_cmd_converter package</description>
<description>The autoware_external_cmd_converter package</description>
<maintainer email="[email protected]">Takamasa Horibe</maintainer>
<maintainer email="[email protected]">Eiki Nagata</maintainer>
<license>Apache License 2.0</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "external_cmd_converter/node.hpp"
#include "autoware_external_cmd_converter/node.hpp"

#include <algorithm>
#include <memory>
#include <string>
#include <utility>

namespace external_cmd_converter
namespace autoware::external_cmd_converter
{
ExternalCmdConverterNode::ExternalCmdConverterNode(const rclcpp::NodeOptions & node_options)
: Node("external_cmd_converter", node_options)
Expand Down Expand Up @@ -226,7 +226,7 @@ bool ExternalCmdConverterNode::check_remote_topic_rate()

return true;
}
} // namespace external_cmd_converter
} // namespace autoware::external_cmd_converter

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(external_cmd_converter::ExternalCmdConverterNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::external_cmd_converter::ExternalCmdConverterNode)
19 changes: 0 additions & 19 deletions vehicle/external_cmd_converter/CMakeLists.txt

This file was deleted.

0 comments on commit e438fc5

Please sign in to comment.