Skip to content

Commit 8dc649f

Browse files
authored
refactor(universe_utils/motion_utils)!: add autoware namespace (#59)
* refactor(universe_utils): add autoware namespace Signed-off-by: kosuke55 <[email protected]> style(pre-commit): autofix * refactor(motion_utils): add autoware namespace Signed-off-by: kosuke55 <[email protected]> --------- Signed-off-by: kosuke55 <[email protected]>
1 parent d53e3b1 commit 8dc649f

File tree

19 files changed

+80
-80
lines changed

19 files changed

+80
-80
lines changed

common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_panel.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,9 @@ void AutowareAutomaticGoalPanel::updateGoalIcon(const unsigned goal_index, const
439439

440440
void AutowareAutomaticGoalPanel::publishMarkers()
441441
{
442-
using autoware_universe_utils::createDefaultMarker;
443-
using autoware_universe_utils::createMarkerColor;
444-
using autoware_universe_utils::createMarkerScale;
442+
using autoware::universe_utils::createDefaultMarker;
443+
using autoware::universe_utils::createMarkerColor;
444+
using autoware::universe_utils::createMarkerScale;
445445

446446
MarkerArray text_array;
447447
MarkerArray arrow_array;

common/tier4_debug_tools/src/lateral_error_publisher.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void LateralErrorPublisher::onGroundTruthPose(
7474
}
7575

7676
// Search closest trajectory point with vehicle pose
77-
const auto closest_index = autoware_motion_utils::findNearestIndex(
77+
const auto closest_index = autoware::motion_utils::findNearestIndex(
7878
current_trajectory_ptr_->points, current_vehicle_pose_ptr_->pose.pose,
7979
std::numeric_limits<double>::max(), yaw_threshold_to_search_closest_);
8080
if (!closest_index) {

control/stop_accel_evaluator/include/stop_accel_evaluator/stop_accel_evaluator_node.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
namespace stop_accel_evaluator
3232
{
33-
using autoware_universe_utils::SelfPoseListener;
33+
using autoware::universe_utils::SelfPoseListener;
3434
using geometry_msgs::msg::TwistStamped;
3535
using nav_msgs::msg::Odometry;
3636
using sensor_msgs::msg::Imu;

control/stop_accel_evaluator/src/stop_accel_evaluator_node.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void StopAccelEvaluatorNode::calculateStopAccel()
123123
const double pitch =
124124
lpf_pitch_->filter(getPitchByQuaternion(current_pose_ptr->pose.orientation));
125125

126-
stop_accel_ = accel_sum / accel_num + autoware_universe_utils::gravity *
126+
stop_accel_ = accel_sum / accel_num + autoware::universe_utils::gravity *
127127
std::sin(pitch); // consider removing gravity
128128
stop_accel_with_gravity_ = accel_sum / accel_num; // not consider removing gravity
129129

driving_environment_analyzer/src/utils.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ std::vector<double> calcElevationAngle(const T & points)
5454
}
5555

5656
for (size_t i = 0; i < points.size() - 1; ++i) {
57-
const auto p1 = autoware_universe_utils::getPoint(points.at(i));
58-
const auto p2 = autoware_universe_utils::getPoint(points.at(i + 1));
59-
elevation_vec.at(i) = autoware_universe_utils::calcElevationAngle(p1, p2);
57+
const auto p1 = autoware::universe_utils::getPoint(points.at(i));
58+
const auto p2 = autoware::universe_utils::getPoint(points.at(i + 1));
59+
elevation_vec.at(i) = autoware::universe_utils::calcElevationAngle(p1, p2);
6060
}
6161
elevation_vec.at(elevation_vec.size() - 1) = elevation_vec.at(elevation_vec.size() - 2);
6262

@@ -79,11 +79,11 @@ double calcElevationAngle(const lanelet::ConstLanelet & lane, const Pose & pose)
7979
return 0.0;
8080
}
8181

82-
const size_t idx = autoware_motion_utils::findNearestSegmentIndex(points, pose.position);
82+
const size_t idx = autoware::motion_utils::findNearestSegmentIndex(points, pose.position);
8383

84-
const auto p1 = autoware_universe_utils::getPoint(points.at(idx));
85-
const auto p2 = autoware_universe_utils::getPoint(points.at(idx + 1));
86-
return autoware_universe_utils::calcElevationAngle(p1, p2);
84+
const auto p1 = autoware::universe_utils::getPoint(points.at(idx));
85+
const auto p2 = autoware::universe_utils::getPoint(points.at(idx + 1));
86+
return autoware::universe_utils::calcElevationAngle(p1, p2);
8787
}
8888

8989
double getLaneWidth(const lanelet::ConstLanelet & lane)
@@ -96,7 +96,7 @@ double getLaneWidth(const lanelet::ConstLanelet & lane)
9696
return points;
9797
};
9898

99-
const auto lon_length = autoware_motion_utils::calcArcLength(to_ros_msg(lane.centerline()));
99+
const auto lon_length = autoware::motion_utils::calcArcLength(to_ros_msg(lane.centerline()));
100100
return boost::geometry::area(lane.polygon2d().basicPolygon()) / lon_length;
101101
}
102102

@@ -118,7 +118,7 @@ double getMaxCurvature(const lanelet::ConstLanelets & lanes)
118118
double max_value = 0.0;
119119

120120
for (const auto & lane : lanes) {
121-
const auto values = autoware_motion_utils::calcCurvature(to_ros_msg(lane.centerline()));
121+
const auto values = autoware::motion_utils::calcCurvature(to_ros_msg(lane.centerline()));
122122
const auto max_value_itr = std::max_element(values.begin(), values.end());
123123
if (max_value_itr == values.end()) {
124124
continue;
@@ -146,7 +146,7 @@ std::pair<double, double> getLaneWidth(const lanelet::ConstLanelets & lanes)
146146
double max_value = 0.0;
147147

148148
for (const auto & lane : lanes) {
149-
const auto lon_length = autoware_motion_utils::calcArcLength(to_ros_msg(lane.centerline()));
149+
const auto lon_length = autoware::motion_utils::calcArcLength(to_ros_msg(lane.centerline()));
150150
const auto width = boost::geometry::area(lane.polygon2d().basicPolygon()) / lon_length;
151151

152152
if (min_value > width) {

localization/deviation_estimation_tools/deviation_estimator/include/deviation_estimator/autoware_universe_utils.hpp

+21-21
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ template <class Pose1, class Pose2>
3838
bool isDrivingForward(const Pose1 & src_pose, const Pose2 & dst_pose)
3939
{
4040
// check the first point direction
41-
const double src_yaw = tf2::getYaw(autoware_universe_utils::getPose(src_pose).orientation);
42-
const double pose_direction_yaw = autoware_universe_utils::calcAzimuthAngle(
43-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose));
44-
return std::fabs(autoware_universe_utils::normalizeRadian(src_yaw - pose_direction_yaw)) <
45-
autoware_universe_utils::pi / 2.0;
41+
const double src_yaw = tf2::getYaw(autoware::universe_utils::getPose(src_pose).orientation);
42+
const double pose_direction_yaw = autoware::universe_utils::calcAzimuthAngle(
43+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose));
44+
return std::fabs(autoware::universe_utils::normalizeRadian(src_yaw - pose_direction_yaw)) <
45+
autoware::universe_utils::pi / 2.0;
4646
}
4747

4848
/**
@@ -56,8 +56,8 @@ template <class Point1, class Point2>
5656
geometry_msgs::msg::Point calcInterpolatedPoint(
5757
const Point1 & src, const Point2 & dst, const double ratio)
5858
{
59-
const auto src_point = autoware_universe_utils::getPoint(src);
60-
const auto dst_point = autoware_universe_utils::getPoint(dst);
59+
const auto src_point = autoware::universe_utils::getPoint(src);
60+
const auto dst_point = autoware::universe_utils::getPoint(dst);
6161

6262
tf2::Vector3 src_vec;
6363
src_vec.setX(src_point.x);
@@ -101,35 +101,35 @@ geometry_msgs::msg::Pose calcInterpolatedPose(
101101

102102
geometry_msgs::msg::Pose output_pose;
103103
output_pose.position = calcInterpolatedPoint(
104-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose),
104+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose),
105105
clamped_ratio);
106106

107107
if (set_orientation_from_position_direction) {
108-
const double input_poses_dist = autoware_universe_utils::calcDistance2d(
109-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose));
108+
const double input_poses_dist = autoware::universe_utils::calcDistance2d(
109+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose));
110110
const bool is_driving_forward = isDrivingForward(src_pose, dst_pose);
111111

112112
// Get orientation from interpolated point and src_pose
113113
if ((is_driving_forward && clamped_ratio > 1.0 - (1e-6)) || input_poses_dist < 1e-3) {
114-
output_pose.orientation = autoware_universe_utils::getPose(dst_pose).orientation;
114+
output_pose.orientation = autoware::universe_utils::getPose(dst_pose).orientation;
115115
} else if (!is_driving_forward && clamped_ratio < 1e-6) {
116-
output_pose.orientation = autoware_universe_utils::getPose(src_pose).orientation;
116+
output_pose.orientation = autoware::universe_utils::getPose(src_pose).orientation;
117117
} else {
118118
const auto & base_pose = is_driving_forward ? dst_pose : src_pose;
119-
const double pitch = autoware_universe_utils::calcElevationAngle(
120-
autoware_universe_utils::getPoint(output_pose),
121-
autoware_universe_utils::getPoint(base_pose));
122-
const double yaw = autoware_universe_utils::calcAzimuthAngle(
123-
autoware_universe_utils::getPoint(output_pose),
124-
autoware_universe_utils::getPoint(base_pose));
125-
output_pose.orientation = autoware_universe_utils::createQuaternionFromRPY(0.0, pitch, yaw);
119+
const double pitch = autoware::universe_utils::calcElevationAngle(
120+
autoware::universe_utils::getPoint(output_pose),
121+
autoware::universe_utils::getPoint(base_pose));
122+
const double yaw = autoware::universe_utils::calcAzimuthAngle(
123+
autoware::universe_utils::getPoint(output_pose),
124+
autoware::universe_utils::getPoint(base_pose));
125+
output_pose.orientation = autoware::universe_utils::createQuaternionFromRPY(0.0, pitch, yaw);
126126
}
127127
} else {
128128
// Get orientation by spherical linear interpolation
129129
tf2::Transform src_tf;
130130
tf2::Transform dst_tf;
131-
tf2::fromMsg(autoware_universe_utils::getPose(src_pose), src_tf);
132-
tf2::fromMsg(autoware_universe_utils::getPose(dst_pose), dst_tf);
131+
tf2::fromMsg(autoware::universe_utils::getPose(src_pose), src_tf);
132+
tf2::fromMsg(autoware::universe_utils::getPose(dst_pose), dst_tf);
133133
const auto & quaternion = tf2::slerp(src_tf.getRotation(), dst_tf.getRotation(), clamped_ratio);
134134
output_pose.orientation = tf2::toMsg(quaternion);
135135
}

localization/deviation_estimation_tools/deviation_estimator/include/deviation_estimator/deviation_estimator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class DeviationEstimator : public rclcpp::Node
103103
std::unique_ptr<VelocityCoefModule> vel_coef_module_;
104104
std::unique_ptr<ValidationModule> validation_module_;
105105

106-
std::shared_ptr<autoware_universe_utils::TransformListener> transform_listener_;
106+
std::shared_ptr<autoware::universe_utils::TransformListener> transform_listener_;
107107

108108
void callback_pose_with_covariance(geometry_msgs::msg::PoseWithCovarianceStamped::SharedPtr msg);
109109

localization/deviation_estimation_tools/deviation_estimator/src/deviation_estimator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ DeviationEstimator::DeviationEstimator(
178178
declare_parameter<double>("thres_coef_vx"), declare_parameter<double>("thres_stddev_vx"),
179179
declare_parameter<double>("thres_bias_gyro"), declare_parameter<double>("thres_stddev_gyro"),
180180
5);
181-
transform_listener_ = std::make_shared<autoware_universe_utils::TransformListener>(this);
181+
transform_listener_ = std::make_shared<autoware::universe_utils::TransformListener>(this);
182182

183183
RCLCPP_INFO(this->get_logger(), "[Deviation Estimator] launch success");
184184
}

localization/deviation_estimation_tools/deviation_estimator/src/utils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ geometry_msgs::msg::Point integrate_position(
9393
{
9494
double t_prev = rclcpp::Time(vx_list.front().stamp).seconds();
9595
double yaw = yaw_init;
96-
geometry_msgs::msg::Point d_pos = autoware_universe_utils::createPoint(0.0, 0.0, 0.0);
96+
geometry_msgs::msg::Point d_pos = autoware::universe_utils::createPoint(0.0, 0.0, 0.0);
9797
for (std::size_t i = 0; i < vx_list.size() - 1; ++i) {
9898
const double t_cur = rclcpp::Time(vx_list[i + 1].stamp).seconds();
9999
const geometry_msgs::msg::Vector3 gyro_interpolated =
@@ -118,9 +118,9 @@ geometry_msgs::msg::Vector3 calculate_error_rpy(
118118
const geometry_msgs::msg::Vector3 & gyro_bias)
119119
{
120120
const geometry_msgs::msg::Vector3 rpy_0 =
121-
autoware_universe_utils::getRPY(pose_list.front().pose.orientation);
121+
autoware::universe_utils::getRPY(pose_list.front().pose.orientation);
122122
const geometry_msgs::msg::Vector3 rpy_1 =
123-
autoware_universe_utils::getRPY(pose_list.back().pose.orientation);
123+
autoware::universe_utils::getRPY(pose_list.back().pose.orientation);
124124
const geometry_msgs::msg::Vector3 d_rpy = integrate_orientation(gyro_list, gyro_bias);
125125

126126
geometry_msgs::msg::Vector3 error_rpy = createVector3(

localization/deviation_estimation_tools/deviation_estimator/test/test_gyro_bias.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TEST(DeviationEstimatorGyroBias, SmokeTestDefault)
5353
for (int i = 0; i <= ndt_rate * dt; ++i) {
5454
geometry_msgs::msg::PoseStamped pose;
5555
pose.header.stamp = t_start + rclcpp::Duration::from_seconds(1.0 * i / ndt_rate);
56-
pose.pose.orientation = autoware_universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
56+
pose.pose.orientation = autoware::universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
5757
pose_list.push_back(pose);
5858
}
5959

localization/deviation_estimation_tools/deviation_estimator/test/test_gyro_stddev.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TEST(DeviationEstimatorGyroStddev, SmokeTestDefault)
5353
for (int i = 0; i <= ndt_rate * t_window; ++i) {
5454
geometry_msgs::msg::PoseStamped pose;
5555
pose.header.stamp = t_start + rclcpp::Duration::from_seconds(1.0 * i / ndt_rate);
56-
pose.pose.orientation = autoware_universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
56+
pose.pose.orientation = autoware::universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
5757
pose_list.push_back(pose);
5858
}
5959

@@ -104,7 +104,7 @@ TEST(DeviationEstimatorGyroStddev, SmokeTestWithBias)
104104
for (int i = 0; i <= ndt_rate * t_window; ++i) {
105105
geometry_msgs::msg::PoseStamped pose;
106106
pose.header.stamp = t_start + rclcpp::Duration::from_seconds(1.0 * i / ndt_rate);
107-
pose.pose.orientation = autoware_universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
107+
pose.pose.orientation = autoware::universe_utils::createQuaternionFromRPY(0.0, 0.0, 0.0);
108108
pose_list.push_back(pose);
109109
}
110110

localization/deviation_estimation_tools/deviation_evaluator/include/deviation_evaluator/autoware_universe_utils.hpp

+21-21
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ template <class Pose1, class Pose2>
2929
bool isDrivingForward(const Pose1 & src_pose, const Pose2 & dst_pose)
3030
{
3131
// check the first point direction
32-
const double src_yaw = tf2::getYaw(autoware_universe_utils::getPose(src_pose).orientation);
33-
const double pose_direction_yaw = autoware_universe_utils::calcAzimuthAngle(
34-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose));
35-
return std::fabs(autoware_universe_utils::normalizeRadian(src_yaw - pose_direction_yaw)) <
36-
autoware_universe_utils::pi / 2.0;
32+
const double src_yaw = tf2::getYaw(autoware::universe_utils::getPose(src_pose).orientation);
33+
const double pose_direction_yaw = autoware::universe_utils::calcAzimuthAngle(
34+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose));
35+
return std::fabs(autoware::universe_utils::normalizeRadian(src_yaw - pose_direction_yaw)) <
36+
autoware::universe_utils::pi / 2.0;
3737
}
3838

3939
/**
@@ -47,8 +47,8 @@ template <class Point1, class Point2>
4747
geometry_msgs::msg::Point calcInterpolatedPoint(
4848
const Point1 & src, const Point2 & dst, const double ratio)
4949
{
50-
const auto src_point = autoware_universe_utils::getPoint(src);
51-
const auto dst_point = autoware_universe_utils::getPoint(dst);
50+
const auto src_point = autoware::universe_utils::getPoint(src);
51+
const auto dst_point = autoware::universe_utils::getPoint(dst);
5252

5353
tf2::Vector3 src_vec;
5454
src_vec.setX(src_point.x);
@@ -92,35 +92,35 @@ geometry_msgs::msg::Pose calcInterpolatedPose(
9292

9393
geometry_msgs::msg::Pose output_pose;
9494
output_pose.position = calcInterpolatedPoint(
95-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose),
95+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose),
9696
clamped_ratio);
9797

9898
if (set_orientation_from_position_direction) {
99-
const double input_poses_dist = autoware_universe_utils::calcDistance2d(
100-
autoware_universe_utils::getPoint(src_pose), autoware_universe_utils::getPoint(dst_pose));
99+
const double input_poses_dist = autoware::universe_utils::calcDistance2d(
100+
autoware::universe_utils::getPoint(src_pose), autoware::universe_utils::getPoint(dst_pose));
101101
const bool is_driving_forward = isDrivingForward(src_pose, dst_pose);
102102

103103
// Get orientation from interpolated point and src_pose
104104
if ((is_driving_forward && clamped_ratio > 1.0 - (1e-6)) || input_poses_dist < 1e-3) {
105-
output_pose.orientation = autoware_universe_utils::getPose(dst_pose).orientation;
105+
output_pose.orientation = autoware::universe_utils::getPose(dst_pose).orientation;
106106
} else if (!is_driving_forward && clamped_ratio < 1e-6) {
107-
output_pose.orientation = autoware_universe_utils::getPose(src_pose).orientation;
107+
output_pose.orientation = autoware::universe_utils::getPose(src_pose).orientation;
108108
} else {
109109
const auto & base_pose = is_driving_forward ? dst_pose : src_pose;
110-
const double pitch = autoware_universe_utils::calcElevationAngle(
111-
autoware_universe_utils::getPoint(output_pose),
112-
autoware_universe_utils::getPoint(base_pose));
113-
const double yaw = autoware_universe_utils::calcAzimuthAngle(
114-
autoware_universe_utils::getPoint(output_pose),
115-
autoware_universe_utils::getPoint(base_pose));
116-
output_pose.orientation = autoware_universe_utils::createQuaternionFromRPY(0.0, pitch, yaw);
110+
const double pitch = autoware::universe_utils::calcElevationAngle(
111+
autoware::universe_utils::getPoint(output_pose),
112+
autoware::universe_utils::getPoint(base_pose));
113+
const double yaw = autoware::universe_utils::calcAzimuthAngle(
114+
autoware::universe_utils::getPoint(output_pose),
115+
autoware::universe_utils::getPoint(base_pose));
116+
output_pose.orientation = autoware::universe_utils::createQuaternionFromRPY(0.0, pitch, yaw);
117117
}
118118
} else {
119119
// Get orientation by spherical linear interpolation
120120
tf2::Transform src_tf;
121121
tf2::Transform dst_tf;
122-
tf2::fromMsg(autoware_universe_utils::getPose(src_pose), src_tf);
123-
tf2::fromMsg(autoware_universe_utils::getPose(dst_pose), dst_tf);
122+
tf2::fromMsg(autoware::universe_utils::getPose(src_pose), src_tf);
123+
tf2::fromMsg(autoware::universe_utils::getPose(dst_pose), dst_tf);
124124
const auto & quaternion = tf2::slerp(src_tf.getRotation(), dst_tf.getRotation(), clamped_ratio);
125125
output_pose.orientation = tf2::toMsg(quaternion);
126126
}

localization/deviation_estimation_tools/deviation_evaluator/include/deviation_evaluator/deviation_evaluator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class DeviationEvaluator : public rclcpp::Node
8181
PoseStamped::SharedPtr current_ekf_gt_pose_ptr_;
8282
PoseStamped::SharedPtr current_ndt_pose_ptr_;
8383

84-
std::shared_ptr<autoware_universe_utils::TransformListener> transform_listener_;
84+
std::shared_ptr<autoware::universe_utils::TransformListener> transform_listener_;
8585

8686
bool has_published_initial_pose_;
8787

localization/deviation_estimation_tools/deviation_evaluator/src/deviation_evaluator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ DeviationEvaluator::DeviationEvaluator(
106106
pub_init_pose_with_cov_ = create_publisher<geometry_msgs::msg::PoseWithCovarianceStamped>(
107107
"out_initial_pose_with_covariance", 1);
108108

109-
transform_listener_ = std::make_shared<autoware_universe_utils::TransformListener>(this);
109+
transform_listener_ = std::make_shared<autoware::universe_utils::TransformListener>(this);
110110

111111
current_ndt_pose_ptr_ = nullptr;
112112
has_published_initial_pose_ = false;

planning/planning_debug_tools/include/planning_debug_tools/trajectory_analyzer.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ class TrajectoryAnalyzer
8686
TrajectoryDebugInfo data;
8787
data.stamp = node_->now();
8888
data.size = points.size();
89-
data.curvature = autoware_motion_utils::calcCurvature(points);
90-
const auto arclength_offset = autoware_motion_utils::calcSignedArcLength(points, 0, ego_p);
89+
data.curvature = autoware::motion_utils::calcCurvature(points);
90+
const auto arclength_offset = autoware::motion_utils::calcSignedArcLength(points, 0, ego_p);
9191
data.arclength = calcPathArcLengthArray(points, -arclength_offset);
9292
data.velocity = getVelocityArray(points);
9393
data.acceleration = getAccelerationArray(points);

planning/planning_debug_tools/include/planning_debug_tools/util.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
namespace planning_debug_tools
2929
{
3030

31+
using autoware::universe_utils::calcDistance2d;
32+
using autoware::universe_utils::getPoint;
33+
using autoware::universe_utils::getRPY;
3134
using autoware_planning_msgs::msg::PathPoint;
3235
using autoware_planning_msgs::msg::TrajectoryPoint;
33-
using autoware_universe_utils::calcDistance2d;
34-
using autoware_universe_utils::getPoint;
35-
using autoware_universe_utils::getRPY;
3636
using tier4_planning_msgs::msg::PathPointWithLaneId;
3737

3838
double getVelocity(const PathPoint & p)
@@ -88,7 +88,7 @@ inline std::vector<double> getAccelerationArray(const T & points)
8888
const auto & prev_point = points.at(i);
8989
const auto & next_point = points.at(i + 1);
9090

91-
const double delta_s = autoware_universe_utils::calcDistance2d(prev_point, next_point);
91+
const double delta_s = autoware::universe_utils::calcDistance2d(prev_point, next_point);
9292
if (delta_s == 0.0) {
9393
segment_wise_a_arr.push_back(0.0);
9494
} else {

0 commit comments

Comments
 (0)