Add 3rd Robot Auto
- 3 Cube (High, mid, low) cable side tested at MTTD
- 1 Cube middle with mobility over charge untested
- 1 High Cube tested at MTTD
Signed-off-by: Filip Kujawa <filip.j.kujawa@gmail.com>
Change-Id: Ia4db6bea9559fe77f5fca6e866179ef866f37715
diff --git a/y2023_bot3/autonomous/autonomous_actor.h b/y2023_bot3/autonomous/autonomous_actor.h
index b7978c7..ad33eed 100644
--- a/y2023_bot3/autonomous/autonomous_actor.h
+++ b/y2023_bot3/autonomous/autonomous_actor.h
@@ -1,5 +1,5 @@
-#ifndef Y2023_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
-#define Y2023_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
+#ifndef Y2023_BOT3_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
+#define Y2023_BOT3_AUTONOMOUS_AUTONOMOUS_ACTOR_H_
#include "aos/actions/actions.h"
#include "aos/actions/actor.h"
@@ -11,6 +11,8 @@
#include "y2023_bot3/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2023_bot3/control_loops/superstructure/superstructure_status_generated.h"
+// TODO<FILIP>: Add NEUTRAL pivot pose.
+
namespace y2023_bot3 {
namespace autonomous {
@@ -24,13 +26,38 @@
private:
void set_preloaded(bool preloaded) { preloaded_ = preloaded; }
+ void set_pivot_goal(
+ control_loops::superstructure::PivotGoal requested_pivot_goal) {
+ pivot_goal_ = requested_pivot_goal;
+ }
+
+ void set_roller_goal(
+ control_loops::superstructure::RollerGoal requested_roller_goal) {
+ roller_goal_ = requested_roller_goal;
+ }
+
void SendSuperstructureGoal();
+ [[nodiscard]] bool WaitForPreloaded();
+
+ void HighScore();
+ void MidScore();
+ void LowScore();
+ void Spit();
+ void SpitHigh();
+ void StopSpitting();
+ void Pickup();
+ void Intake();
+ void Neutral();
+
void Reset();
void SendStartingPosition(const Eigen::Vector3d &start);
void MaybeSendStartingPosition();
void Replan();
+ void ChargedUp();
+ void ChargedUpMiddle();
+ void OnePieceMiddle();
aos::Sender<frc971::control_loops::drivetrain::LocalizerControl>
localizer_control_sender_;
@@ -51,11 +78,16 @@
bool preloaded_ = false;
+ control_loops::superstructure::PivotGoal pivot_goal_;
+ control_loops::superstructure::RollerGoal roller_goal_;
+
aos::Sender<control_loops::superstructure::Goal> superstructure_goal_sender_;
aos::Fetcher<y2023_bot3::control_loops::superstructure::Status>
superstructure_status_fetcher_;
std::optional<SplineHandle> test_spline_;
+ std::optional<std::array<SplineHandle, 4>> charged_up_splines_;
+ std::optional<std::array<SplineHandle, 1>> charged_up_middle_splines_;
};
} // namespace autonomous