blob: 8903cd2762767790bc7c33311f09cffdff228c0a [file] [log] [blame]
Comran Morshed41ed7c22015-11-04 21:03:37 +00001#ifndef Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_
2#define Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_
Comran Morshede9b12922015-11-04 19:46:48 +00003
John Park33858a32018-09-28 23:05:48 -07004#include "aos/controls/control_loop.h"
Comran Morshede9b12922015-11-04 19:46:48 +00005
Alex Perrycb7da4b2019-08-28 19:35:56 -07006#include "y2014_bot3/control_loops/rollers/rollers_goal_generated.h"
7#include "y2014_bot3/control_loops/rollers/rollers_output_generated.h"
8#include "y2014_bot3/control_loops/rollers/rollers_position_generated.h"
9#include "y2014_bot3/control_loops/rollers/rollers_status_generated.h"
Comran Morshed41ed7c22015-11-04 21:03:37 +000010
11namespace y2014_bot3 {
Comran Morshede9b12922015-11-04 19:46:48 +000012namespace control_loops {
Alex Perrycb7da4b2019-08-28 19:35:56 -070013namespace rollers {
Comran Morshede9b12922015-11-04 19:46:48 +000014
Alex Perrycb7da4b2019-08-28 19:35:56 -070015class Rollers
16 : public aos::controls::ControlLoop<Goal, Position, Status, Output> {
Comran Morshede9b12922015-11-04 19:46:48 +000017 public:
18 // Constructs a control loops which can take a rollers or defaults to the
Comran Morshed41ed7c22015-11-04 21:03:37 +000019 // rollers at ::2014_bot3::control_loops::rollers.
Alex Perrycb7da4b2019-08-28 19:35:56 -070020 explicit Rollers(::aos::EventLoop *event_loop,
21 const ::std::string &name = "/rollers");
Comran Morshede9b12922015-11-04 19:46:48 +000022
23 protected:
24 // Executes one cycle of the control loop.
Alex Perrycb7da4b2019-08-28 19:35:56 -070025 void RunIteration(const Goal *goal, const Position *position,
26 aos::Sender<Output>::Builder *output,
27 aos::Sender<Status>::Builder *status) override;
Comran Morshede9b12922015-11-04 19:46:48 +000028};
29
Alex Perrycb7da4b2019-08-28 19:35:56 -070030} // namespace rollers
Comran Morshede9b12922015-11-04 19:46:48 +000031} // namespace control_loops
Comran Morshed41ed7c22015-11-04 21:03:37 +000032} // namespace y2014_bot3
Comran Morshede9b12922015-11-04 19:46:48 +000033
Comran Morshed41ed7c22015-11-04 21:03:37 +000034#endif // Y2014_BOT3_CONTROL_LOOPS_ROLLERS_H_