acados_solver_ros2  main
Acados-based NMPC controllers for ROS2 control
acados_types.hpp
Go to the documentation of this file.
1 // Copyright 2023 ICUBE Laboratory, University of Strasbourg
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Author: Thibault Poignonec (tpoignonec@unistra.fr)
16 
17 #ifndef ACADOS_SOLVER_BASE__ACADOS_TYPES_HPP_
18 #define ACADOS_SOLVER_BASE__ACADOS_TYPES_HPP_
19 
20 #include <Eigen/Dense>
21 
22 #include <string>
23 #include <unordered_map>
24 #include <vector>
25 
26 namespace acados
27 {
28 
30 using IndexVector = std::vector<unsigned int>;
31 
33 using ValueVector = std::vector<double>;
34 
36 using IndexMap = std::unordered_map<std::string, IndexVector>;
37 
39 using ValueMap = std::unordered_map<std::string, ValueVector>;
40 
42 using RowMajorXd = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
43 
45 using ColumnMajorXd = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
46 
47 } // namespace acados
48 
49 #endif // ACADOS_SOLVER_BASE__ACADOS_TYPES_HPP_
Definition: acados_solver.hpp:35
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > RowMajorXd
Dynamic size row-major array (hence compatible with Acados C-arrays).
Definition: acados_types.hpp:42
std::unordered_map< std::string, IndexVector > IndexMap
Mapping between keys (std::string) and indexes (acados::IndexVector).
Definition: acados_types.hpp:36
std::vector< unsigned int > IndexVector
List of indexes.
Definition: acados_types.hpp:30
std::vector< double > ValueVector
List of values (double).
Definition: acados_types.hpp:33
std::unordered_map< std::string, ValueVector > ValueMap
Mapping between keys (std::string) and data (acados::ValueVector).
Definition: acados_types.hpp:39
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > ColumnMajorXd
Dynamic size colum-major array (by default in Eigen).
Definition: acados_types.hpp:45