rm_controllers
Loading...
Searching...
No Matches
mode_base.h
Go to the documentation of this file.
1//
2// Created by guanlin on 25-9-3.
3//
4
5#pragma once
6
7#include <ros/time.h>
8#include <Eigen/Dense>
9#include <geometry_msgs/Vector3.h>
10#include <angles/angles.h>
11
14
16{
17class BipedalController;
18
20{
21public:
22 explicit ModeBase(BipedalControllerInterface* controller_) : controller(controller_)
23 {
24 }
25 virtual void execute(const ros::Time& time, const ros::Duration& period) = 0;
26 virtual const char* name() const = 0;
27 virtual ~ModeBase() = default;
28 void updateUnstick(const bool& left_unstick, const bool& right_unstick);
29
30 inline bool getUnstick()
31 {
32 return (left_unstick_ && right_unstick_);
33 }
34
35protected:
36 bool left_unstick_{ false }, right_unstick_{ false };
38};
39
40} // namespace rm_chassis_controllers
Definition controller_interface.h:13
Definition mode_base.h:20
BipedalControllerInterface * controller
Definition mode_base.h:37
virtual const char * name() const =0
bool right_unstick_
Definition mode_base.h:36
ModeBase(BipedalControllerInterface *controller_)
Definition mode_base.h:22
bool left_unstick_
Definition mode_base.h:36
void updateUnstick(const bool &left_unstick, const bool &right_unstick)
Definition mode_base.cpp:9
virtual void execute(const ros::Time &time, const ros::Duration &period)=0
bool getUnstick()
Definition mode_base.h:30
Definition active_suspension.h:16