Skip to content

Commit

Permalink
docs: code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
SS47816 committed Mar 21, 2024
1 parent 2cddeab commit f36e1d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace

# - repo: https://github.com/pocc/pre-commit-hooks
# rev: master
# hooks:
# - id: clang-format
# args: [--style=Google, -i]
# # - id: clang-tidy
# # args: [--fix-errors]
# - id: cppcheck
# - id: cpplint
# # - id: oclint
# # - id: uncrustify
# # - id: include-what-you-use
- repo: https://github.com/pocc/pre-commit-hooks
rev: master
hooks:
- id: cppcheck
# - id: cpplint
# - id: clang-format
# args: [--style=Google, -i]
# - id: clang-tidy
# args: [--fix-errors]
# - id: oclint
# - id: uncrustify
# - id: include-what-you-use

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.6"
Expand Down
4 changes: 1 addition & 3 deletions src/me5413_world/src/path_publisher_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ double LOCAL_PREV_WP_NUM;
double LOCAL_NEXT_WP_NUM;
bool PARAMS_UPDATED = false;

void dynamicParamCallback(me5413_world::path_publisherConfig& config, uint32_t level)
void dynamicParamCallback(const me5413_world::path_publisherConfig& config, uint32_t level)
{
// Common Params
SPEED_TARGET = config.speed_target;
Expand Down Expand Up @@ -201,8 +201,6 @@ void PathPublisherNode::publishLocalPath(const geometry_msgs::Pose &robot_pose,

int PathPublisherNode::closestWaypoint(const geometry_msgs::Pose &robot_pose, const nav_msgs::Path &path, const int id_start = 0)
{
const double yaw_robot = getYawFromOrientation(robot_pose.orientation);

double min_dist = DBL_MAX;
int id_closest = id_start;
for (int i = id_start; i < path.poses.size(); i++)
Expand Down
2 changes: 1 addition & 1 deletion src/me5413_world/src/path_tracker_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ double PID_Kp, PID_Ki, PID_Kd;
double STANLEY_K;
bool PARAMS_UPDATED;

void dynamicParamCallback(me5413_world::path_trackerConfig& config, uint32_t level)
void dynamicParamCallback(const me5413_world::path_trackerConfig& config, uint32_t level)
{
// Common Params
SPEED_TARGET = config.speed_target;
Expand Down

0 comments on commit f36e1d0

Please sign in to comment.