BaseController.h
Go to the documentation of this file.
1 
20 #ifndef __BASE_CONTROLLER__
21 #define __BASE_CONTROLLER__
22 
23 #include "RobotState.h"
24 #include <boost/thread/mutex.hpp>
25 #include "geometry_msgs/Twist.h"
26 #include "CanListener.h"
27 
32 {
33  private:
34  //Current RoboterState
37  boost::mutex mutex;
38  //Messages from Ros
39  geometry_msgs::Twist cmd;
40 
41 
42  int initAX10420();
43  void writeDataToCan(float vleft, float vright, float max_speed);
44  bool enableMotor(int ax10420);
45  float calculateVelocity(bool left, float speed, float velocity_old);
46 
47 public:
51  void setTargetVelocity(const geometry_msgs::Twist &twist);
52  BaseController(RobotState *state, CanListener *canListener1):state(state)
53  {
54  canListener = canListener1;
55  };
60  void run();
61 
68  double calculateAdapter(double required_velocity, double real_velocity, double adapter);
69 
70 };
71 
72 #endif
BaseController(RobotState *state, CanListener *canListener1)
void writeDataToCan(float vleft, float vright, float max_speed)
boost::mutex mutex
float calculateVelocity(bool left, float speed, float velocity_old)
bool enableMotor(int ax10420)
double calculateAdapter(double required_velocity, double real_velocity, double adapter)
geometry_msgs::Twist cmd
RobotState * state
CanListener * canListener
void setTargetVelocity(const geometry_msgs::Twist &twist)


asr_mild_base_driving
Author(s): Aumann Florian, Borella Jocelyn, Dehmani Souheil, Marek Felix, Meißner Pascal, Reckling Reno
autogenerated on Mon Jun 10 2019 12:43:40