Armadillo is a high-quality linear algebra library for the C++ language. The good thing is that it follows similar syntax with MATLAB. It provides classes for vectors, matrices and cubes. It is easy to install. There are three ways to do it: a. Install pre-build armadillo package First, we need to install the dependencies since
Author: angelos
How to install clang 10.0.0 and use it with Clion
We enjoy coding using Ubuntu and advanced editors like CLion. The good thing apart from learning by practice (practice, practice) is to follow also the current developments. What better using the most recent LLVM clang 10.0.0 compiler? Yes, it’s very easy to do it. First you need to download it from the LLVV website official
Continue reading How to install clang 10.0.0 and use it with Clion
How to achieve Rule of Zero
We have all heard about the the rule of Five and rule of Zero when it comes to C++ programming. The latter says to avoid implementing any special function as much as possible. When we talk about special member functions, we refer to: Copy constructor Copy assignment operator Move constructor Move assignment operator Destructor Hmm,
Sets in C++17 and a custom comparator
Sets belong to the associative containers family. This category facilitates very fast element search. Sets contain keys that are always ordered and unique. The class template for sets is like that: std::set<T, Comparator, Allocator> where T is the key type, Comparator is the algorithm with which we perform the ordering and defaults to std::less and
Concepts in C++20
This is my first attempt to experiment with concepts in C++, and yes, it’s amazing. So far, most of us we use templates, and this helps us to write modular and clean code without repeating ourselves. It’s always nice to start with a simple example and say that we want to write a function that
how to perform a final task before a ROS node shuts down
Sometimes you need to clean up the task by performing a final step before the node closes. For example, when we have a hardware interface and send move commands to the wheelbase, we need to send 0 velocities after the termination of the spinning while loop to stop the robot. In python and more specifically
Continue reading how to perform a final task before a ROS node shuts down
Virtual functions and vtbl
Virtual functions and the magic of calling the correct version at run time, correct? How does it work? This is just a very draft explanation and by no means an extended detailed one. So, the compiler converts the name of the virtual function into an index into a table of pointers, which is called the
how to use doxygen
Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages (we want Python as well). As in every other software tool, the best way to learn it is starting to use it in your everyday life. There are many examples and tutorials online.
RTOS terminology
Before dive in the exciting world of real-time operating systems, we need to understand the basic terminology. What is latency? The time elasped between a demand issued on a computer system and the begining of a response to the same demand is called latency or response time. Kinds of latencies: Interrupt Latency: The time elapsed
async vs multithreaded
Many times, many people get confused about the difference. I was looking to set up a TCP server using Boost (of course). There is a tutorial by Mahreen Tahir saying that: But what if there are more than one clients trying to connect to the server? In case we don’t want our main program to