Skip to content

Commit

Permalink
Merge pull request #28 from nobleo/cleanup/replaced-macros-with-const…
Browse files Browse the repository at this point in the history
…ants

Replaced macros with constants.
  • Loading branch information
lewie-donckers authored Feb 15, 2022
2 parents 717ea77 + fe6ba23 commit 14b5e5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions include/path_tracking_pid/controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ template <typename T> int sign(T val) {
namespace path_tracking_pid
{

#define RADIUS_EPS 0.001 // Smallest relevant radius [m]
#define VELOCITY_EPS 1e-3 // Neglegible velocity
#define LONG_DURATION 31556926 // A year (ros::Duration cannot be inf)
inline constexpr double RADIUS_EPS = 0.001; // Smallest relevant radius [m]
inline constexpr double VELOCITY_EPS = 1e-3; // Neglegible velocity
inline constexpr double LONG_DURATION = 31556926; // A year (ros::Duration cannot be inf)

enum class ControllerMode
{
Expand Down
4 changes: 2 additions & 2 deletions include/path_tracking_pid/path_tracking_pid_local_planner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "tf2_ros/buffer.h"
#include "path_tracking_pid/visualization.hpp"

#define MAP_PARALLEL_THRESH 0.2
constexpr double DT_MAX=1.5;
inline constexpr double MAP_PARALLEL_THRESH = 0.2;
inline constexpr double DT_MAX = 1.5;


BOOST_GEOMETRY_REGISTER_POINT_2D(geometry_msgs::Point, double, cs::cartesian, x, y)
Expand Down

0 comments on commit 14b5e5e

Please sign in to comment.