plant_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 
29 bool PlantInterface::control(const PlantInterface::ControlVector& u, const Duration& dt, const Time& t, SignalTargetInterface* signal_target,
30  const std::string& ns)
31 {
32  TimeSeries::Ptr u_sequence = std::make_shared<TimeSeries>();
33  TimeSeries::Ptr x_sequence = std::make_shared<TimeSeries>();
34 
35  u_sequence->add(0.0, u);
36 
37  return control(u_sequence, x_sequence, dt, t, signal_target, ns);
38 }
39 
40 } // namespace corbo
corbo::PlantInterface::control
virtual bool control(const ControlVector &u, const Duration &dt, const Time &t, SignalTargetInterface *signal_target=nullptr, const std::string &ns="")
Send commands to plant.
Definition: plant_interface.cpp:51
corbo
Definition: communication/include/corbo-communication/utilities.h:37
corbo::PlantInterface::ControlVector
Eigen::VectorXd ControlVector
Definition: plant_interface.h:102
plant_interface.h
corbo::TimeSeries::Ptr
std::shared_ptr< TimeSeries > Ptr
Definition: time_series.h:108


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:03