Move over to ABSL logging and flags.
Removes gperftools too since that wants gflags.
Here come the fireworks.
Change-Id: I79cb7bcf60f1047fbfa28bfffc21a0fd692e4b1c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2018/control_loops/superstructure/arm/BUILD b/y2018/control_loops/superstructure/arm/BUILD
index 319e591..495e214 100644
--- a/y2018/control_loops/superstructure/arm/BUILD
+++ b/y2018/control_loops/superstructure/arm/BUILD
@@ -76,7 +76,7 @@
"//aos/analysis:in_process_plotter",
"//frc971/control_loops/double_jointed_arm:ekf",
"//frc971/control_loops/double_jointed_arm:trajectory",
- "@com_github_gflags_gflags//:gflags",
+ "@com_google_absl//absl/flags:flag",
"@org_tuxfamily_eigen//:eigen",
],
)
diff --git a/y2018/control_loops/superstructure/arm/trajectory_plot.cc b/y2018/control_loops/superstructure/arm/trajectory_plot.cc
index eeb0fbc..1811b95 100644
--- a/y2018/control_loops/superstructure/arm/trajectory_plot.cc
+++ b/y2018/control_loops/superstructure/arm/trajectory_plot.cc
@@ -1,4 +1,4 @@
-#include "gflags/gflags.h"
+#include "absl/flags/flag.h"
#include "aos/analysis/in_process_plotter.h"
#include "aos/init.h"
@@ -8,9 +8,9 @@
#include "y2018/control_loops/superstructure/arm/arm_constants.h"
#include "y2018/control_loops/superstructure/arm/generated_graph.h"
-DEFINE_bool(forwards, true, "If true, run the forwards simulation.");
-DEFINE_bool(plot, true, "If true, plot");
-DEFINE_bool(plot_thetas, true, "If true, plot the angles");
+ABSL_FLAG(bool, forwards, true, "If true, run the forwards simulation.");
+ABSL_FLAG(bool, plot, true, "If true, plot");
+ABSL_FLAG(bool, plot_thetas, true, "If true, plot the angles");
namespace y2018::control_loops::superstructure::arm {
@@ -18,8 +18,9 @@
frc971::control_loops::arm::Dynamics dynamics(kArmConstants);
frc971::control_loops::arm::Trajectory trajectory(
&dynamics,
- FLAGS_forwards ? MakeNeutralToFrontHighPath()
- : Path::Reversed(MakeNeutralToFrontHighPath()),
+ absl::GetFlag(FLAGS_forwards)
+ ? MakeNeutralToFrontHighPath()
+ : Path::Reversed(MakeNeutralToFrontHighPath()),
0.001);
constexpr double kAlpha0Max = 30.0;
@@ -254,7 +255,7 @@
t += sim_dt;
}
- if (FLAGS_plot) {
+ if (absl::GetFlag(FLAGS_plot)) {
aos::analysis::Plotter plotter;
plotter.AddFigure();
@@ -324,7 +325,7 @@
plotter.AddLine(t_array, torque1_hat_t_array, "torque1_hat");
plotter.Publish();
- if (FLAGS_plot_thetas) {
+ if (absl::GetFlag(FLAGS_plot_thetas)) {
plotter.AddFigure();
plotter.Title("Angles");
plotter.AddLine(t_array, theta0_goal_t_array, "theta0_t_goal");