Skip to content

Commit

Permalink
refactor(pose_instability_detector)!: prefix package and namespace wi…
Browse files Browse the repository at this point in the history
…th autoware (autowarefoundation#8568)

* add autoware_ prefix

Signed-off-by: a-maumau <[email protected]>

* add autoware_ prefix

Signed-off-by: a-maumau <[email protected]>

---------

Signed-off-by: a-maumau <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
  • Loading branch information
a-maumau and SakodaShintaro committed Sep 2, 2024
1 parent 1800001 commit 8ac725d
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ localization/localization_util/** [email protected] [email protected]
localization/ndt_scan_matcher/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/pose_estimator_arbiter/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/pose_initializer/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/pose_instability_detector/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/autoware_pose_instability_detector/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_common/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_image_processing/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
localization/yabloc/yabloc_monitor/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
</group>

<group>
<include file="$(find-pkg-share pose_instability_detector)/launch/pose_instability_detector.launch.xml">
<include file="$(find-pkg-share autoware_pose_instability_detector)/launch/pose_instability_detector.launch.xml">
<arg name="input_odometry" value="/localization/kinematic_state"/>
<arg name="input_twist" value="/localization/twist_estimator/twist_with_covariance"/>
<arg name="param_file" value="$(find-pkg-share pose_instability_detector)/config/pose_instability_detector.param.yaml"/>
<arg name="param_file" value="$(find-pkg-share autoware_pose_instability_detector)/config/pose_instability_detector.param.yaml"/>
</include>
</group>
</launch>
2 changes: 1 addition & 1 deletion launch/tier4_localization_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
<exec_depend>autoware_gyro_odometer</exec_depend>
<exec_depend>autoware_pointcloud_preprocessor</exec_depend>
<exec_depend>autoware_pose_estimator_arbiter</exec_depend>
<exec_depend>autoware_pose_instability_detector</exec_depend>
<exec_depend>eagleye_geo_pose_fusion</exec_depend>
<exec_depend>eagleye_gnss_converter</exec_depend>
<exec_depend>eagleye_rt</exec_depend>
<exec_depend>ekf_localizer</exec_depend>
<exec_depend>ndt_scan_matcher</exec_depend>
<exec_depend>pose_initializer</exec_depend>
<exec_depend>pose_instability_detector</exec_depend>
<exec_depend>topic_tools</exec_depend>
<exec_depend>yabloc_common</exec_depend>
<exec_depend>yabloc_image_processing</exec_depend>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(pose_instability_detector)
project(autoware_pose_instability_detector)

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 "PoseInstabilityDetector"
PLUGIN "autoware::pose_instability_detector::PoseInstabilityDetector"
EXECUTABLE ${PROJECT_NAME}_node
EXECUTOR SingleThreadedExecutor
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pose_instability_detector
# autoware_pose_instability_detector

The `pose_instability_detector` is a node designed to monitor the stability of `/localization/kinematic_state`, which is an output topic of the Extended Kalman Filter (EKF).

Expand Down Expand Up @@ -109,7 +109,7 @@ $$

## Parameters

{{ json_to_markdown("localization/pose_instability_detector/schema/pose_instability_detector.schema.json") }}
{{ json_to_markdown("localization/autoware_pose_instability_detector/schema/pose_instability_detector.schema.json") }}

## Input

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <tuple>
#include <vector>

namespace autoware::pose_instability_detector
{
class PoseInstabilityDetector : public rclcpp::Node
{
using Quaternion = geometry_msgs::msg::Quaternion;
Expand Down Expand Up @@ -93,5 +95,6 @@ class PoseInstabilityDetector : public rclcpp::Node
std::optional<Odometry> prev_odometry_ = std::nullopt;
std::deque<TwistWithCovarianceStamped> twist_buffer_;
};
} // namespace autoware::pose_instability_detector

#endif // AUTOWARE__POSE_INSTABILITY_DETECTOR__POSE_INSTABILITY_DETECTOR_HPP_
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<launch>
<arg name="node_name" default="pose_instability_detector"/>
<arg name="param_file" default="$(find-pkg-share pose_instability_detector)/config/pose_instability_detector.param.yaml"/>
<arg name="param_file" default="$(find-pkg-share autoware_pose_instability_detector)/config/pose_instability_detector.param.yaml"/>

<!-- Topics -->
<arg name="input_odometry" default="~/input/odometry"/>
<arg name="input_twist" default="~/input/twist"/>

<node pkg="pose_instability_detector" exec="pose_instability_detector_node" name="$(var node_name)" output="both">
<node pkg="autoware_pose_instability_detector" exec="autoware_pose_instability_detector_node" name="$(var node_name)" output="both">
<remap from="~/input/odometry" to="$(var input_odometry)"/>
<remap from="~/input/twist" to="$(var input_twist)"/>
<param from="$(var param_file)"/>
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>pose_instability_detector</name>
<name>autoware_pose_instability_detector</name>
<version>0.1.0</version>
<description>The pose_instability_detector package</description>
<description>The autoware_pose_instability_detector package</description>
<maintainer email="[email protected]">Yamato Ando</maintainer>
<maintainer email="[email protected]">Kento Yabuuchi</maintainer>
<maintainer email="[email protected]">Masahiro Sakamoto</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <memory>
#include <string>

namespace autoware::pose_instability_detector
{
PoseInstabilityDetector::PoseInstabilityDetector(const rclcpp::NodeOptions & options)
: rclcpp::Node("pose_instability_detector", options),
timer_period_(this->declare_parameter<double>("timer_period")),
Expand Down Expand Up @@ -409,6 +411,7 @@ PoseInstabilityDetector::clip_out_necessary_twist(
}
return result_deque;
}
} // namespace autoware::pose_instability_detector

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(PoseInstabilityDetector)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::pose_instability_detector::PoseInstabilityDetector)
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TestPoseInstabilityDetector : public ::testing::Test
void SetUp() override
{
const std::string yaml_path =
ament_index_cpp::get_package_share_directory("pose_instability_detector") +
ament_index_cpp::get_package_share_directory("autoware_pose_instability_detector") +
"/config/pose_instability_detector.param.yaml";

rcl_params_t * params_st = rcl_yaml_node_struct_init(rcl_get_default_allocator());
Expand All @@ -53,7 +53,8 @@ class TestPoseInstabilityDetector : public ::testing::Test
}
}

subject_ = std::make_shared<PoseInstabilityDetector>(node_options);
subject_ =
std::make_shared<autoware::pose_instability_detector::PoseInstabilityDetector>(node_options);
executor_.add_node(subject_);

helper_ = std::make_shared<TestMessageHelperNode>();
Expand All @@ -69,7 +70,7 @@ class TestPoseInstabilityDetector : public ::testing::Test
}

rclcpp::executors::SingleThreadedExecutor executor_;
std::shared_ptr<PoseInstabilityDetector> subject_;
std::shared_ptr<autoware::pose_instability_detector::PoseInstabilityDetector> subject_;
std::shared_ptr<TestMessageHelperNode> helper_;
};

Expand Down

0 comments on commit 8ac725d

Please sign in to comment.