Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced macros with constants. #28

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Rayman marked this conversation as resolved.
Show resolved Hide resolved

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