motor_controller.cpp
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 
22 
24 }
25 
27 }
28 
29 std::shared_ptr<ControllerBase> MotorController::Clone() {
30  std::shared_ptr<ControllerBase> controller(new MotorController);
31  return controller;
32 }
33 
35  amount_rotors_ = 6;
36  initialized_params_ = true;
37 }
38 
39 void MotorController::CalculateRotorVelocities(Eigen::VectorXd* rotor_velocities) const {
40  assert(rotor_velocities);
41  assert(initialized_params_);
42 
43  rotor_velocities->resize(amount_rotors_);
44 
45  *rotor_velocities = motor_reference_;
46 }
47 
virtual void CalculateRotorVelocities(Eigen::VectorXd *rotor_velocities) const
ROTORS_CONTROL_REGISTER_CONTROLLER(MotorController)
virtual ~MotorController()
virtual std::shared_ptr< ControllerBase > Clone()
virtual void InitializeParams()


rotors_control
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Mon Feb 28 2022 23:38:55