# CppRobotics_hpp **Repository Path**: agoto/CppRobotics_hpp ## Basic Information - **Project Name**: CppRobotics_hpp - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-06 - **Last Updated**: 2021-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Goals • Requirements • Getting Started • Features • TODOs • References
--- ## Goals C++ Robotics has the following goals: * Implement as many robotics algorithms as possible, without sacrificing quality. These include, e.g., control, path planning, and estimation algorithms. * Be easy to use and to get started with, thus the header-only format and minimal external dependencies. * Be fast: by making use of templates, most algorithms use static-size data structures whose size is known at compilation time. This project is inspired by [PythonRobotics](https://github.com/AtsushiSakai/PythonRobotics). Instead of being just an educational repo, this library aims at implementing fast algorithms with a consistent API, to guarantee runtime performance and ease of use. While this is still a work in progress, I would appreciate it if you left any suggestions or starred the repo. Any help is greatly appreciated! --- ## Requirements * C++11 compiler * CMake 3.14+ (if using Visual Studio on Windows you should be able to import the project as a CMake project) * The C++ dependencies will be obtained automatically by [CPM.cmake](https://github.com/TheLartians/CPM.cmake). Note that the library only depends on `Eigen`, but `matplotplusplus` is used in the `examples` folder to plot the results. --- ## Getting started Following are some examples to get started. The `examples` folder contains several examples that are useful to get started. CppRobotics aims to be modular, which means: * Once you define a dynamical system, most algorithms will be readily available for it to use * Data should flow seamlessly between objects (e.g. estimator -> controller) * Once you setup an algorithm, you should be able to change the dynamical system and integrate it directly ### Clone this repo > git clone;
using StateMatrix = Robotics::SquareMatrix ;
using FeedthroughMatrix = Robotics::Matrix ;
```
Let's define a linear system whose state form is
```
x' = A * x + B * u
y = C * x + D * u
```
To set up a `LinearSystem`:
```cpp
StateMatrix A;
A << 1, 0,
0, 1;
InputMatrix B;
B << 1, 0;
OutputMatrix C;
C << 1, 0,
0, 1;
```
Note that having templates not only improves runtime performance, but also enforces compile-time checking. If you initialize a matrix with the wrong number of elements, the code will not compile.
Matrices C and D are not required: they are null by default if not provided. In this case, D is null.
To define the system:
```cpp
Robotics::Model::LinearSystem