controller_interface.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Software License Agreement
4  *
5  * Copyright (c) 2020,
6  * TU Dortmund - Institute of Control Theory and Systems Engineering.
7  * All rights reserved.
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  *
22  * Authors: Christoph Rösmann
23  *********************************************************************/
24 
26 
27 namespace corbo {
28 
30  const Duration& dt, const Time& t, ControllerInterface::ControlVector& u, SignalTargetInterface* signal_target,
31  const std::string& ns)
32 {
33  TimeSeries::Ptr u_sequence;
34  TimeSeries::Ptr x_sequence;
35 
36  if (step(x, xref, uref, dt, t, u_sequence, x_sequence, signal_target, nullptr, nullptr, nullptr, ns))
37  {
38  u_sequence->getValuesInterpolate(0.0, u);
39  return true;
40  }
41  else
42  {
43  return false;
44  }
45 }
46 } // namespace corbo
Scalar * x
virtual bool step(const StateVector &x, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, const Duration &dt, const Time &t, ControlVector &u, SignalTargetInterface *signal_target=nullptr, const std::string &ns="")
Perform actual controller step / control law computation.
Interface class for signal targets.
Representation of time stamps.
Definition: time.h:251
Interface class for reference trajectories.
std::shared_ptr< TimeSeries > Ptr
Definition: time_series.h:64
Representation of time durations.
Definition: time.h:106


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:06:47