motor_model.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Fadri Furrer, ASL, ETH Zurich, Switzerland
3  * Copyright 2015 Michael Burri, ASL, ETH Zurich, Switzerland
4  * Copyright 2015 Mina Kamel, ASL, ETH Zurich, Switzerland
5  * Copyright 2015 Janosch Nikolic, ASL, ETH Zurich, Switzerland
6  * Copyright 2015 Markus Achtelik, ASL, ETH Zurich, Switzerland
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 
22 #ifndef ROTORS_GAZEBO_PLUGINS_MOTOR_MODEL_H
23 #define ROTORS_GAZEBO_PLUGINS_MOTOR_MODEL_H
24 
25 #include <Eigen/Eigen>
26 
28 {
29  public:
31  : motor_rot_vel_(0.0),
32  ref_motor_rot_vel_(0.0),
33  prev_sim_time_(0.0),
34  sampling_time_(0.01) {}
35  virtual ~MotorModel() {}
36  void GetMotorVelocity(double &result) const {
37  result = motor_rot_vel_;
38  }
39  void SetReferenceMotorVelocity(double ref_motor_rot_vel) {
40  ref_motor_rot_vel_ = ref_motor_rot_vel;
41  }
42 
43  virtual void InitializeParams() = 0;
44  virtual void Publish() = 0;
45 
46  protected:
52 
53 
54  virtual void UpdateForcesAndMoments() = 0;
55 };
56 
57 #endif // ROTORS_GAZEBO_PLUGINS_MOTOR_MODEL_H
virtual ~MotorModel()
Definition: motor_model.hpp:35
double motor_rot_vel_
Definition: motor_model.hpp:47
void SetReferenceMotorVelocity(double ref_motor_rot_vel)
Definition: motor_model.hpp:39
virtual void InitializeParams()=0
virtual void UpdateForcesAndMoments()=0
void GetMotorVelocity(double &result) const
Definition: motor_model.hpp:36
double prev_ref_motor_rot_vel_
Definition: motor_model.hpp:49
double prev_sim_time_
Definition: motor_model.hpp:50
uint8_t result
double ref_motor_rot_vel_
Definition: motor_model.hpp:48
virtual void Publish()=0
double sampling_time_
Definition: motor_model.hpp:51


rotors_gazebo_plugins
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Mon Feb 28 2022 23:39:04