Skip to content

Commit 240c976

Browse files
authored
refactor(path_smoother)!: prefix package and namespace with autoware (#7381)
* git mv Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix launch Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * rever a part of prefix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix test Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix static_centerline_optimizer Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> * fix Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com> --------- Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
1 parent a082e64 commit 240c976

30 files changed

+97
-95
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ planning/objects_of_interest_marker_interface/** fumiya.watanabe@tier4.jp kosuke
194194
planning/obstacle_cruise_planner/** kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp takayuki.murooka@tier4.jp yuki.takagi@tier4.jp
195195
planning/obstacle_stop_planner/** berkay@leodrive.ai bnk@leodrive.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp
196196
planning/obstacle_velocity_limiter/** maxime.clement@tier4.jp
197-
planning/path_smoother/** maxime.clement@tier4.jp takayuki.murooka@tier4.jp
197+
planning/autoware_path_smoother/** maxime.clement@tier4.jp takayuki.murooka@tier4.jp
198198
planning/planning_test_utils/** kyoichi.sugahara@tier4.jp mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp zulfaqar.azmi@tier4.jp
199199
planning/planning_validator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp
200200
planning/route_handler/** fumiya.watanabe@tier4.jp go.sakayori@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp takayuki.murooka@tier4.jp zulfaqar.azmi@tier4.jp

launch/tier4_planning_launch/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<group>
2929
<group if="$(eval &quot;'$(var motion_path_smoother_type)' == 'elastic_band'&quot;)">
3030
<load_composable_node target="/planning/scenario_planning/lane_driving/motion_planning/motion_planning_container">
31-
<composable_node pkg="path_smoother" plugin="path_smoother::ElasticBandSmoother" name="elastic_band_smoother" namespace="">
31+
<composable_node pkg="autoware_path_smoother" plugin="autoware::path_smoother::ElasticBandSmoother" name="elastic_band_smoother" namespace="">
3232
<!-- topic remap -->
3333
<remap from="~/input/path" to="$(var interface_input_topic)"/>
3434
<remap from="~/input/odometry" to="/localization/kinematic_state"/>

planning/.pages

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ nav:
5353
- 'Obstacle Stop Planner': planning/obstacle_stop_planner
5454
- 'Obstacle Velocity Limiter': planning/obstacle_velocity_limiter
5555
- 'Path Smoother':
56-
- 'About Path Smoother': planning/path_smoother
57-
- 'Elastic Band': planning/path_smoother/docs/eb
56+
- 'About Path Smoother': planning/autoware_path_smoother
57+
- 'Elastic Band': planning/autoware_path_smoother/docs/eb
5858
- 'Sampling Based Planner':
5959
- 'Path Sample': planning/sampling_based_planner/autoware_path_sampler
6060
- 'Common library': planning/sampling_based_planner/autoware_sampler_common

planning/path_smoother/CMakeLists.txt planning/autoware_path_smoother/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
cmake_minimum_required(VERSION 3.14)
2-
project(path_smoother)
2+
project(autoware_path_smoother)
33

44
find_package(autoware_cmake REQUIRED)
55
autoware_package()
66

77
find_package(Eigen3 REQUIRED)
88

9-
ament_auto_add_library(path_smoother SHARED
9+
ament_auto_add_library(autoware_path_smoother SHARED
1010
DIRECTORY src
1111
)
1212

13-
target_include_directories(path_smoother
13+
target_include_directories(autoware_path_smoother
1414
SYSTEM PUBLIC
1515
${EIGEN3_INCLUDE_DIR}
1616
)
1717

1818
# register node
19-
rclcpp_components_register_node(path_smoother
20-
PLUGIN "path_smoother::ElasticBandSmoother"
19+
rclcpp_components_register_node(autoware_path_smoother
20+
PLUGIN "autoware::path_smoother::ElasticBandSmoother"
2121
EXECUTABLE elastic_band_smoother
2222
)
2323

File renamed without changes.
File renamed without changes.

planning/path_smoother/include/path_smoother/common_structs.hpp planning/autoware_path_smoother/include/autoware_path_smoother/common_structs.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__COMMON_STRUCTS_HPP_
16-
#define PATH_SMOOTHER__COMMON_STRUCTS_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__COMMON_STRUCTS_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__COMMON_STRUCTS_HPP_
1717

18-
#include "path_smoother/type_alias.hpp"
18+
#include "autoware_path_smoother/type_alias.hpp"
1919
#include "rclcpp/rclcpp.hpp"
2020
#include "tier4_autoware_utils/ros/update_param.hpp"
2121
#include "tier4_autoware_utils/system/stop_watch.hpp"
@@ -25,7 +25,7 @@
2525
#include <string>
2626
#include <vector>
2727

28-
namespace path_smoother
28+
namespace autoware::path_smoother
2929
{
3030
struct Bounds;
3131

@@ -131,6 +131,6 @@ struct EgoNearestParam
131131
double dist_threshold{0.0};
132132
double yaw_threshold{0.0};
133133
};
134-
} // namespace path_smoother
134+
} // namespace autoware::path_smoother
135135

136-
#endif // PATH_SMOOTHER__COMMON_STRUCTS_HPP_
136+
#endif // AUTOWARE_PATH_SMOOTHER__COMMON_STRUCTS_HPP_

planning/path_smoother/include/path_smoother/elastic_band.hpp planning/autoware_path_smoother/include/autoware_path_smoother/elastic_band.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__ELASTIC_BAND_HPP_
16-
#define PATH_SMOOTHER__ELASTIC_BAND_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_HPP_
1717

18+
#include "autoware_path_smoother/common_structs.hpp"
19+
#include "autoware_path_smoother/type_alias.hpp"
1820
#include "osqp_interface/osqp_interface.hpp"
19-
#include "path_smoother/common_structs.hpp"
20-
#include "path_smoother/type_alias.hpp"
2121

2222
#include <Eigen/Core>
2323

@@ -27,7 +27,7 @@
2727
#include <utility>
2828
#include <vector>
2929

30-
namespace path_smoother
30+
namespace autoware::path_smoother
3131
{
3232
class EBPathSmoother
3333
{
@@ -128,6 +128,6 @@ class EBPathSmoother
128128
const std::vector<double> & optimized_points, const std::vector<TrajectoryPoint> & traj_points,
129129
const int pad_start_idx) const;
130130
};
131-
} // namespace path_smoother
131+
} // namespace autoware::path_smoother
132132

133-
#endif // PATH_SMOOTHER__ELASTIC_BAND_HPP_
133+
#endif // AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_HPP_

planning/path_smoother/include/path_smoother/elastic_band_smoother.hpp planning/autoware_path_smoother/include/autoware_path_smoother/elastic_band_smoother.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_
16-
#define PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_
1717

18+
#include "autoware_path_smoother/common_structs.hpp"
19+
#include "autoware_path_smoother/elastic_band.hpp"
20+
#include "autoware_path_smoother/replan_checker.hpp"
21+
#include "autoware_path_smoother/type_alias.hpp"
1822
#include "motion_utils/trajectory/trajectory.hpp"
19-
#include "path_smoother/common_structs.hpp"
20-
#include "path_smoother/elastic_band.hpp"
21-
#include "path_smoother/replan_checker.hpp"
22-
#include "path_smoother/type_alias.hpp"
2323
#include "rclcpp/rclcpp.hpp"
2424
#include "tier4_autoware_utils/ros/logger_level_configure.hpp"
2525
#include "tier4_autoware_utils/ros/polling_subscriber.hpp"
@@ -32,7 +32,7 @@
3232
#include <string>
3333
#include <vector>
3434

35-
namespace path_smoother
35+
namespace autoware::path_smoother
3636
{
3737
class ElasticBandSmoother : public rclcpp::Node
3838
{
@@ -116,6 +116,6 @@ class ElasticBandSmoother : public rclcpp::Node
116116

117117
std::unique_ptr<tier4_autoware_utils::PublishedTimePublisher> published_time_publisher_;
118118
};
119-
} // namespace path_smoother
119+
} // namespace autoware::path_smoother
120120

121-
#endif // PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_
121+
#endif // AUTOWARE_PATH_SMOOTHER__ELASTIC_BAND_SMOOTHER_HPP_

planning/path_smoother/include/path_smoother/replan_checker.hpp planning/autoware_path_smoother/include/autoware_path_smoother/replan_checker.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__REPLAN_CHECKER_HPP_
16-
#define PATH_SMOOTHER__REPLAN_CHECKER_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__REPLAN_CHECKER_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__REPLAN_CHECKER_HPP_
1717

18-
#include "path_smoother/common_structs.hpp"
19-
#include "path_smoother/type_alias.hpp"
18+
#include "autoware_path_smoother/common_structs.hpp"
19+
#include "autoware_path_smoother/type_alias.hpp"
2020

2121
#include <rclcpp/rclcpp.hpp>
2222

2323
#include <memory>
2424
#include <vector>
2525

26-
namespace path_smoother
26+
namespace autoware::path_smoother
2727
{
2828
class ReplanChecker
2929
{
@@ -66,6 +66,6 @@ class ReplanChecker
6666
bool isPathGoalChanged(
6767
const PlannerData & planner_data, const std::vector<TrajectoryPoint> & prev_traj_points) const;
6868
};
69-
} // namespace path_smoother
69+
} // namespace autoware::path_smoother
7070

71-
#endif // PATH_SMOOTHER__REPLAN_CHECKER_HPP_
71+
#endif // AUTOWARE_PATH_SMOOTHER__REPLAN_CHECKER_HPP_

planning/path_smoother/include/path_smoother/type_alias.hpp planning/autoware_path_smoother/include/autoware_path_smoother/type_alias.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__TYPE_ALIAS_HPP_
16-
#define PATH_SMOOTHER__TYPE_ALIAS_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__TYPE_ALIAS_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__TYPE_ALIAS_HPP_
1717

1818
#include "autoware_planning_msgs/msg/path.hpp"
1919
#include "autoware_planning_msgs/msg/path_point.hpp"
@@ -25,7 +25,7 @@
2525
#include "tier4_debug_msgs/msg/float64_stamped.hpp"
2626
#include "tier4_debug_msgs/msg/string_stamped.hpp"
2727

28-
namespace path_smoother
28+
namespace autoware::path_smoother
2929
{
3030
// std_msgs
3131
using std_msgs::msg::Header;
@@ -39,6 +39,6 @@ using nav_msgs::msg::Odometry;
3939
// debug
4040
using tier4_debug_msgs::msg::Float64Stamped;
4141
using tier4_debug_msgs::msg::StringStamped;
42-
} // namespace path_smoother
42+
} // namespace autoware::path_smoother
4343

44-
#endif // PATH_SMOOTHER__TYPE_ALIAS_HPP_
44+
#endif // AUTOWARE_PATH_SMOOTHER__TYPE_ALIAS_HPP_

planning/path_smoother/include/path_smoother/utils/geometry_utils.hpp planning/autoware_path_smoother/include/autoware_path_smoother/utils/geometry_utils.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_
16-
#define PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_
1717

1818
#include <tier4_autoware_utils/geometry/geometry.hpp>
1919

20-
namespace path_smoother
20+
namespace autoware::path_smoother
2121
{
2222
namespace geometry_utils
2323
{
@@ -31,5 +31,5 @@ bool isSamePoint(const T1 & t1, const T2 & t2)
3131
return (std::abs(p1.x - p2.x) <= epsilon && std::abs(p1.y - p2.y) <= epsilon);
3232
}
3333
} // namespace geometry_utils
34-
} // namespace path_smoother
35-
#endif // PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_
34+
} // namespace autoware::path_smoother
35+
#endif // AUTOWARE_PATH_SMOOTHER__UTILS__GEOMETRY_UTILS_HPP_

planning/path_smoother/include/path_smoother/utils/trajectory_utils.hpp planning/autoware_path_smoother/include/autoware_path_smoother/utils/trajectory_utils.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_
16-
#define PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_
15+
#ifndef AUTOWARE_PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_
16+
#define AUTOWARE_PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_
1717

18+
#include "autoware_path_smoother/common_structs.hpp"
19+
#include "autoware_path_smoother/type_alias.hpp"
1820
#include "interpolation/linear_interpolation.hpp"
1921
#include "interpolation/spline_interpolation.hpp"
2022
#include "interpolation/spline_interpolation_points_2d.hpp"
2123
#include "motion_utils/trajectory/trajectory.hpp"
22-
#include "path_smoother/common_structs.hpp"
23-
#include "path_smoother/type_alias.hpp"
2424

2525
#include <Eigen/Core>
2626

@@ -35,7 +35,7 @@
3535
#include <string>
3636
#include <vector>
3737

38-
namespace path_smoother
38+
namespace autoware::path_smoother
3939
{
4040
namespace trajectory_utils
4141
{
@@ -137,7 +137,7 @@ std::optional<size_t> updateFrontPointForFix(
137137
motion_utils::calcSignedArcLength(points, 0, front_fix_point.pose.position);
138138
if (0 < lon_offset_to_prev_front) {
139139
RCLCPP_DEBUG(
140-
rclcpp::get_logger("path_smoother.trajectory_utils"),
140+
rclcpp::get_logger("autoware_path_smoother.trajectory_utils"),
141141
"Fixed point will not be inserted due to the error during calculation.");
142142
return std::nullopt;
143143
}
@@ -148,7 +148,7 @@ std::optional<size_t> updateFrontPointForFix(
148148
constexpr double max_lat_error = 3.0;
149149
if (max_lat_error < dist) {
150150
RCLCPP_DEBUG(
151-
rclcpp::get_logger("path_smoother.trajectory_utils"),
151+
rclcpp::get_logger("autoware_path_smoother.trajectory_utils"),
152152
"New Fixed point is too far from points %f [m]", dist);
153153
}
154154

@@ -170,5 +170,5 @@ void insertStopPoint(
170170
std::vector<TrajectoryPoint> & traj_points, const geometry_msgs::msg::Pose & input_stop_pose,
171171
const size_t stop_seg_idx);
172172
} // namespace trajectory_utils
173-
} // namespace path_smoother
174-
#endif // PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_
173+
} // namespace autoware::path_smoother
174+
#endif // AUTOWARE_PATH_SMOOTHER__UTILS__TRAJECTORY_UTILS_HPP_

planning/path_smoother/launch/elastic_band_smoother.launch.xml planning/autoware_path_smoother/launch/elastic_band_smoother.launch.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<arg name="output_path_topic" default="/planning/scenario_planning/lane_driving/path_smoother/path"/>
44
<arg name="output_trajectory_topic" default="/planning/scenario_planning/lane_driving/path_smoother/trajectory"/>
55
<arg name="enable_debug_info" default="false"/>
6-
<arg name="param_path" default="$(find-pkg-share path_smoother)/config/elastic_band_smoother.param.yaml"/>
6+
<arg name="param_path" default="$(find-pkg-share autoware_path_smoother)/config/elastic_band_smoother.param.yaml"/>
77

8-
<node pkg="path_smoother" exec="elastic_band_smoother" name="elastic_band_smoother" output="screen">
8+
<node pkg="autoware_path_smoother" exec="elastic_band_smoother" name="elastic_band_smoother" output="screen">
99
<remap from="~/input/path" to="$(var input_path_topic)"/>
1010
<remap from="~/input/odometry" to="/localization/kinematic_state"/>
1111
<remap from="~/output/traj" to="$(var output_trajectory_topic)"/>

planning/path_smoother/package.xml planning/autoware_path_smoother/package.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>path_smoother</name>
4+
<name>autoware_path_smoother</name>
55
<version>0.1.0</version>
6-
<description>The path_smoother package</description>
6+
<description>The autoware_path_smoother package</description>
77
<maintainer email="takayuki.murooka@tier4.jp">Takayuki Murooka</maintainer>
88
<maintainer email="maxime.clement@tier4.jp">Maxime CLEMENT</maintainer>
99
<license>Apache License 2.0</license>

planning/path_smoother/src/elastic_band.cpp planning/autoware_path_smoother/src/elastic_band.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "path_smoother/elastic_band.hpp"
15+
#include "autoware_path_smoother/elastic_band.hpp"
1616

17+
#include "autoware_path_smoother/type_alias.hpp"
18+
#include "autoware_path_smoother/utils/geometry_utils.hpp"
19+
#include "autoware_path_smoother/utils/trajectory_utils.hpp"
1720
#include "motion_utils/trajectory/conversion.hpp"
1821
#include "motion_utils/trajectory/trajectory.hpp"
19-
#include "path_smoother/type_alias.hpp"
20-
#include "path_smoother/utils/geometry_utils.hpp"
21-
#include "path_smoother/utils/trajectory_utils.hpp"
2222
#include "tf2/utils.h"
2323

2424
#include <Eigen/Core>
@@ -84,7 +84,7 @@ std_msgs::msg::Header createHeader(const rclcpp::Time & now)
8484
}
8585
} // namespace
8686

87-
namespace path_smoother
87+
namespace autoware::path_smoother
8888
{
8989
EBPathSmoother::EBParam::EBParam(rclcpp::Node * node)
9090
{
@@ -453,4 +453,4 @@ std::optional<std::vector<TrajectoryPoint>> EBPathSmoother::convertOptimizedPoin
453453
time_keeper_ptr_->toc(__func__, " ");
454454
return eb_traj_points;
455455
}
456-
} // namespace path_smoother
456+
} // namespace autoware::path_smoother

0 commit comments

Comments
 (0)