Skip to content

Commit 7058487

Browse files
committed
refactor: fix ament_cpplint and cppcheck warnings
1 parent 4e1e52b commit 7058487

30 files changed

Lines changed: 119 additions & 110 deletions

File tree

control/dp_adapt_backs_controller/include/dp_adapt_backs_controller/dp_adapt_backs_controller.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef DP_ADAPT_BACKS_CONTROLLER_HPP
2-
#define DP_ADAPT_BACKS_CONTROLLER_HPP
1+
#ifndef DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_HPP_
2+
#define DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_HPP_
33

44
#include "dp_adapt_backs_controller/typedefs.hpp"
55

66
class DPAdaptBacksController {
77
public:
8-
DPAdaptBacksController(const dp_types::DPAdaptParams adap_params);
8+
explicit DPAdaptBacksController(const dp_types::DPAdaptParams adap_params);
99

1010
// @brief Calculate thecontrol input tau
1111
// @param eta: 6D vector containing the vehicle pose [x, y, z, roll, pitch,
@@ -41,4 +41,4 @@ class DPAdaptBacksController {
4141
double m_;
4242
double dt_;
4343
};
44-
#endif
44+
#endif // DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_HPP_

control/dp_adapt_backs_controller/include/dp_adapt_backs_controller/dp_adapt_backs_controller_ros.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
#ifndef DP_ADAPT_BACKS_CONTROLLER_ROS_HPP
2-
#define DP_ADAPT_BACKS_CONTROLLER_ROS_HPP
1+
#ifndef DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_ROS_HPP_
2+
#define DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_ROS_HPP_
33

44
#include <chrono>
55
#include <geometry_msgs/msg/pose_stamped.hpp>
66
#include <geometry_msgs/msg/pose_with_covariance_stamped.hpp>
77
#include <geometry_msgs/msg/twist_with_covariance_stamped.hpp>
88
#include <geometry_msgs/msg/wrench_stamped.hpp>
9+
#include <memory>
910
#include <nav_msgs/msg/odometry.hpp>
1011
#include <rclcpp/rclcpp.hpp>
1112
#include <std_msgs/msg/bool.hpp>
1213
#include <std_msgs/msg/float64_multi_array.hpp>
1314
#include <std_msgs/msg/string.hpp>
15+
#include <string>
1416
#include <vortex_msgs/msg/reference_filter.hpp>
1517
#include "dp_adapt_backs_controller/dp_adapt_backs_controller.hpp"
1618
#include "dp_adapt_backs_controller/typedefs.hpp"
@@ -90,4 +92,4 @@ class DPAdaptBacksControllerNode : public rclcpp::Node {
9092
std::string software_mode_;
9193
};
9294

93-
#endif
95+
#endif // DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_ROS_HPP_

control/dp_adapt_backs_controller/include/dp_adapt_backs_controller/dp_adapt_backs_controller_utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef DP_ADAPT_BACKS_CONTROLLER_UTILS_HPP
2-
#define DP_ADAPT_BACKS_CONTROLLER_UTILS_HPP
1+
#ifndef DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_UTILS_HPP_
2+
#define DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_UTILS_HPP_
33

44
#include <tf2/LinearMath/Matrix3x3.h>
55
#include <tf2/LinearMath/Quaternion.h>
@@ -95,4 +95,4 @@ dp_types::Matrix6d calculate_C(double m,
9595
// @return 6x6 damping matrix
9696
dp_types::Matrix6x12d calculate_Y_v(const dp_types::Nu& nu);
9797

98-
#endif
98+
#endif // DP_ADAPT_BACKS_CONTROLLER__DP_ADAPT_BACKS_CONTROLLER_UTILS_HPP_

control/dp_adapt_backs_controller/include/dp_adapt_backs_controller/typedefs.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* @brief Contains the typedef and structs for the controller.
44
*/
55

6-
#ifndef VORTEX_DP_ADAPT_BACKSTEPPING_CONTROLLER_TYPEDEFS_H
7-
#define VORTEX_DP_ADAPT_BACKSTEPPING_CONTROLLER_TYPEDEFS_H
6+
#ifndef DP_ADAPT_BACKS_CONTROLLER__TYPEDEFS_HPP_
7+
#define DP_ADAPT_BACKS_CONTROLLER__TYPEDEFS_HPP_
88

99
#include <eigen3/Eigen/Dense>
1010

@@ -65,4 +65,4 @@ struct DPAdaptParams {
6565

6666
} // namespace dp_types
6767

68-
#endif
68+
#endif // DP_ADAPT_BACKS_CONTROLLER__TYPEDEFS_HPP_

control/pid_controller_dp/include/pid_controller_dp/pid_controller.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef PID_CONTROLLER_HPP
2-
#define PID_CONTROLLER_HPP
1+
#ifndef PID_CONTROLLER_DP__PID_CONTROLLER_HPP_
2+
#define PID_CONTROLLER_DP__PID_CONTROLLER_HPP_
33

44
#include "pid_controller_dp/typedefs.hpp"
55

66
class PIDController {
77
public:
8-
explicit PIDController();
8+
PIDController();
99

1010
// @brief Calculate the control input tau
1111
// @param eta: struct containing the vehicle pose [position, orientation]
@@ -44,4 +44,4 @@ class PIDController {
4444
double dt_;
4545
};
4646

47-
#endif
47+
#endif // PID_CONTROLLER_DP__PID_CONTROLLER_HPP_

control/pid_controller_dp/include/pid_controller_dp/pid_controller_conversions.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PID_CONTROLLER_CONVERSIONS_HPP
2-
#define PID_CONTROLLER_CONVERSIONS_HPP
1+
#ifndef PID_CONTROLLER_DP__PID_CONTROLLER_CONVERSIONS_HPP_
2+
#define PID_CONTROLLER_DP__PID_CONTROLLER_CONVERSIONS_HPP_
33

44
#include <cmath>
55
#include <eigen3/Eigen/Geometry>
@@ -15,4 +15,4 @@ types::Eta eta_convert_from_ros_to_eigen(
1515
types::Nu nu_convert_from_ros_to_eigen(
1616
const geometry_msgs::msg::TwistWithCovarianceStamped::SharedPtr msg);
1717

18-
#endif
18+
#endif // PID_CONTROLLER_DP__PID_CONTROLLER_CONVERSIONS_HPP_

control/pid_controller_dp/include/pid_controller_dp/pid_controller_ros.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PID_CONTROLLER_ROS_HPP
2-
#define PID_CONTROLLER_ROS_HPP
1+
#ifndef PID_CONTROLLER_DP__PID_CONTROLLER_ROS_HPP_
2+
#define PID_CONTROLLER_DP__PID_CONTROLLER_ROS_HPP_
33

44
#include <chrono>
55
#include <geometry_msgs/msg/pose_stamped.hpp>
@@ -11,6 +11,7 @@
1111
#include <std_msgs/msg/bool.hpp>
1212
#include <std_msgs/msg/float64_multi_array.hpp>
1313
#include <std_msgs/msg/string.hpp>
14+
#include <string>
1415
#include <variant>
1516
#include <vortex_msgs/msg/reference_filter.hpp>
1617
#include "pid_controller_dp/pid_controller.hpp"
@@ -19,7 +20,7 @@
1920
// @brief Class for the PID controller node
2021
class PIDControllerNode : public rclcpp::Node {
2122
public:
22-
explicit PIDControllerNode();
23+
PIDControllerNode();
2324

2425
private:
2526
// @brief Callback function for the killswitch topic
@@ -95,4 +96,4 @@ class PIDControllerNode : public rclcpp::Node {
9596
std::string software_mode_;
9697
};
9798

98-
#endif
99+
#endif // PID_CONTROLLER_DP__PID_CONTROLLER_ROS_HPP_

control/pid_controller_dp/include/pid_controller_dp/pid_controller_utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PID_UTILS_HPP
2-
#define PID_UTILS_HPP
1+
#ifndef PID_CONTROLLER_DP__PID_CONTROLLER_UTILS_HPP_
2+
#define PID_CONTROLLER_DP__PID_CONTROLLER_UTILS_HPP_
33

44
#include <tf2/LinearMath/Matrix3x3.h>
55
#include <tf2/LinearMath/Quaternion.h>
@@ -71,4 +71,4 @@ types::Vector7d anti_windup(const double dt,
7171
const types::Eta& error,
7272
const types::Vector7d& integral);
7373

74-
#endif
74+
#endif // PID_CONTROLLER_DP__PID_CONTROLLER_UTILS_HPP_

control/pid_controller_dp/include/pid_controller_dp/typedefs.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* @brief Contains the typedef for a 6x1 Eigen vector and a 6x6 Eigen matrix.
44
*/
55

6-
#ifndef VORTEX_EIGEN_TYPEDEFS_H
7-
#define VORTEX_EIGEN_TYPEDEFS_H
6+
#ifndef PID_CONTROLLER_DP__TYPEDEFS_HPP_
7+
#define PID_CONTROLLER_DP__TYPEDEFS_HPP_
88

99
#include <eigen3/Eigen/Dense>
1010

@@ -56,4 +56,4 @@ struct J_transformation {
5656
};
5757
} // namespace types
5858

59-
#endif
59+
#endif // PID_CONTROLLER_DP__TYPEDEFS_HPP_

control/pid_controller_dp_euler/include/pid_controller_dp_euler/pid_controller.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef PID_CONTROLLER_HPP
2-
#define PID_CONTROLLER_HPP
1+
#ifndef PID_CONTROLLER_DP_EULER__PID_CONTROLLER_HPP_
2+
#define PID_CONTROLLER_DP_EULER__PID_CONTROLLER_HPP_
33

44
#include <pid_controller_dp_euler/typedefs.hpp>
55

66
class PIDController {
77
public:
8-
explicit PIDController();
8+
PIDController();
99

1010
Vector6d calculate_tau(const Eta& eta,
1111
const Eta& eta_d,
@@ -28,4 +28,4 @@ class PIDController {
2828
double dt_;
2929
};
3030

31-
#endif
31+
#endif // PID_CONTROLLER_DP_EULER__PID_CONTROLLER_HPP_

0 commit comments

Comments
 (0)