Skip to content

Commit

Permalink
fix(autoware_obstacle_stop_planner): fix cppcheck warning of function…
Browse files Browse the repository at this point in the history
…Static (#8264)

* fix: deal with functionStatic warnings

Signed-off-by: taisa1 <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: taisa1 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
taisa1 and pre-commit-ci[bot] authored Aug 6, 2024
1 parent b68cce2 commit b7e159f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,14 @@ class AdaptiveCruiseController
Param param_;

double getMedianVel(const std::vector<nav_msgs::msg::Odometry> & vel_que);
double lowpass_filter(const double current_value, const double prev_value, const double gain);
static double lowpass_filter(
const double current_value, const double prev_value, const double gain);
void calcDistanceToNearestPointOnPath(
const TrajectoryPoints & trajectory, const int nearest_point_idx,
const geometry_msgs::msg::Pose & self_pose, const pcl::PointXYZ & nearest_collision_point,
const rclcpp::Time & nearest_collision_point_time, double * distance,
const std_msgs::msg::Header & trajectory_header);
double calcTrajYaw(const TrajectoryPoints & trajectory, const int collision_point_idx);
static double calcTrajYaw(const TrajectoryPoints & trajectory, const int collision_point_idx);
std::optional<double> estimatePointVelocityFromObject(
const autoware_perception_msgs::msg::PredictedObjects::ConstSharedPtr object_ptr,
const double traj_yaw, const pcl::PointXYZ & nearest_collision_point);
Expand All @@ -205,7 +206,7 @@ class AdaptiveCruiseController
double calcThreshDistToForwardObstacle(const double current_vel, const double obj_vel);
double calcBaseDistToForwardObstacle(const double current_vel, const double obj_vel);
double calcTargetVelocity_P(const double target_dist, const double current_dist) const;
double calcTargetVelocity_I(const double target_dist, const double current_dist);
static double calcTargetVelocity_I(const double target_dist, const double current_dist);
double calcTargetVelocity_D(const double target_dist, const double current_dist);
double calcTargetVelocityByPID(
const double current_vel, const double current_dist, const double obj_vel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class DebugValues
* @param [in] type the TYPE enum for which to get the index
* @return index of the type
*/
int getValuesIdx(const TYPE type) const { return static_cast<int>(type); }
static int getValuesIdx(const TYPE type) { return static_cast<int>(type); }
/**
* @brief get all the debug values as an std::array
* @return array of all debug values
Expand Down

0 comments on commit b7e159f

Please sign in to comment.