You Should Make: Meringue
You really should be making Meringue. It's bloody easy, and will make you popular with whomever you share them with (friends, family, colleagues, ...). Id' show you a picture, but I ate them all already.
________ ___ __ ________ ________ ___ __ ___ ________ ________ ________ ________ ________ ________ _______ ________ ________
|\ __ \ |\ \ |\ \|\ __ \|\ __ \|\ \|\ \ |\ \|\ ___ \ |\ __ \|\ __ \|\ __ \|\ ____\|\ __ \|\ ___ \ |\ ____\ |\ ____\
\ \ \|\ \ \ \ \ \ \ \ \ \|\ \ \ \|\ \ \ \/ /|_ \ \ \ \ \\ \ \ \ \ \|\ \ \ \|\ \ \ \|\ \ \ \___|\ \ \|\ \ \ __/|\ \ \___|_\ \ \___|_
\ \ __ \ \ \ \ __\ \ \ \ \\\ \ \ _ _\ \ ___ \ \ \ \ \ \\ \ \ \ \ ____\ \ _ _\ \ \\\ \ \ \ __\ \ _ _\ \ \_|/_\ \_____ \\ \_____ \
\ \ \ \ \ \ \ \|\__\_\ \ \ \\\ \ \ \\ \\ \ \\ \ \ \ \ \ \ \\ \ \ \ \ \___|\ \ \\ \\ \ \\\ \ \ \|\ \ \ \\ \\ \ \_|\ \|____|\ \\|____|\ \
\ \__\ \__\ \ \____________\ \_______\ \__\\ _\\ \__\\ \__\ \ \__\ \__\\ \__\ \ \__\ \ \__\\ _\\ \_______\ \_______\ \__\\ _\\ \_______\____\_\ \ ____\_\ \
\|__|\|__| \|____________|\|_______|\|__|\|__|\|__| \|__| \|__|\|__| \|__| \|__| \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\_________\\_________\
\|_________\|_________|
________ ___ __ ________ ________ ___ __ ___ ________
|\ __ \ |\ \ |\ \|\ __ \|\ __ \|\ \|\ \ |\ \|\ ___ \
\ \ \|\ \ \ \ \ \ \ \ \ \|\ \ \ \|\ \ \ \/ /|_ \ \ \ \ \\ \ \
\ \ __ \ \ \ \ __\ \ \ \ \\\ \ \ _ _\ \ ___ \ \ \ \ \ \\ \ \
\ \ \ \ \ \ \ \|\__\_\ \ \ \\\ \ \ \\ \\ \ \\ \ \ \ \ \ \ \\ \ \
\ \__\ \__\ \ \____________\ \_______\ \__\\ _\\ \__\\ \__\ \ \__\ \__\\ \__\
\|__|\|__| \|____________|\|_______|\|__|\|__|\|__| \|__| \|__|\|__| \|__|
________ ________ ________ ________ ________ _______ ________ ________
|\ __ \|\ __ \|\ __ \|\ ____\|\ __ \|\ ___ \ |\ ____\ |\ ____\
\ \ \|\ \ \ \|\ \ \ \|\ \ \ \___|\ \ \|\ \ \ __/|\ \ \___|_\ \ \___|_
\ \ ____\ \ _ _\ \ \\\ \ \ \ __\ \ _ _\ \ \_|/_\ \_____ \\ \_____ \
\ \ \___|\ \ \\ \\ \ \\\ \ \ \|\ \ \ \\ \\ \ \_|\ \|____|\ \\|____|\ \
\ \__\ \ \__\\ _\\ \_______\ \_______\ \__\\ _\\ \_______\____\_\ \ ____\_\ \
\|__| \|__|\|__|\|_______|\|_______|\|__|\|__|\|_______|\_________\\_________\
\|_________\|_________|
You really should be making Meringue. It's bloody easy, and will make you popular with whomever you share them with (friends, family, colleagues, ...). Id' show you a picture, but I ate them all already.
Here's a common problem: your cmake build is failing with linker errors, and now your're looking through your CMake logs and reading the compilation database to see what libraries were actually included.
What if I told you that there was a better way? Enter Feature Summary.
Each new project I start ends up needing a dedicated container for CI. Some then accumulate additional containers for other CI jobs.
Remembering the commands to build and publish these containers usually became a game of grepping the shell history in search of the correct commands. After doing this too many times, I now have a Justfile to store these commands.
I recently bought a new laptop, and since I have some time on my hands, I decided to explore the landscape of tiling window managers again. I've been using Regolith Linux for the past 5 years, and I've developed a fair bit of muscle memory for it's shortcuts.
Regolith combines Gnome with i3 (or Sway on Wayland). You get a good tiling window manager, but also the collection of tools that make a desktop environment (lock screen, monitor configuration, desktop backgrounds, notifications, ...). Instead of needing to assemble all of these components yourself, Regolith gives you a working system out-of-the-box.
The common workflow when working with Pyside is to build the UI with PySide Designer which outputs an xml file (.ui`). This file is then fed into pyside6-uic` to generate the python code that actually the window.
Resource files work in a similar manner. A resource file describes resources (e.g. fonts and images) that should be included into the application. These are described in an xml file (.qrc`) and compiled into Python by pyside6-rcc.
Keeping the xml and compiled files synced by hand is tedious. A common option is to use a makefile to automatically re-generate the python files when the xml files are updated.
The deceptively name OpenCV cv::waitKey in OpenCV is the centre of any use of the highgui module. This module makes it easy to create simple user interfaces and the waitKey function, in addition to waiting for keyboard events, is responsible for updating the message pump for all the windows.
It is too easy to forget to update documentation when refactoring code. I often change the parameters of a function and forget to update the doc doc comment which lives on, wrong and misguiding. In c++-land doxygen is the standard documentation generator and it can be configured to warn when a parameter of a function is not documented. This helps but documenting every single parameter of every single function is hard, especially when developing new features which leads to a high false positive rate.
A finer grained approach that only warns if the documentation comment and the function disagree …
This error is caused by the fact that ROS does not know about the nodelet. To be sure we can check what nodelets ROS knows about by running:
$ rosrun nodelet declared_nodelets
If the nodelet you are trying to run is not listed in the output then we have confirmed that ROS does not know about it. If you are trying to run a nodelet from another package this usually means that the package itself is not in your ROS_PACKAGE_PATH. This can happen if, for example, the package is not correctly installed.
If you are seeing this error for a nodelet …
When creating a CMakeLists.txt file we would like to only list the .cpp files in the add_executable and add_library commands. Whilst this is sufficient to compile the code (and should be enough for any IDE) most IDE's today will exhibit limited functionality unless the header files are also included in the add_executable and add_library commands.
A simple workaround that preserves the best of both worlds is to create a dummy rule that includes all the headers but doesn't actually do anything. better yet, we can make the rule locate all the headers with a simple GLOB expression:
# Dummy target …If you have an encrypted home directory on a linux system chances are that you are using ecryptfs. This is the simplest way of encrypting the sensitive parts of your computer. You may also have noticed that the locate command does not find files in your home directory any more.
This behaviour is intentional. locate does not search the disk directly, instead it queries a database file generally called mlocate.db generated by the updatedb tool. This file is updated by the updatedb tool which is usually run with cron and it contains information about every file and folder on …
Last week I was in London and, true to habit, I went to visit the London Science Museum. I spent a lot of time in the Information Gallery, specifically the exhibits dedicated to the development of the telegraph.
The telegraph, for the first time, made it possible to communicate almost instantly over long distances. In addition to speeding up the distribution of information it created a host of other problems. Things that we take for granted today like time zones can be traced directly to the telegraph.
When debugging a CMake build file it is often useful to print out all the directories included by a target. The following snippet does just that. Simply replace ${target_name} and run cmake to see the list of included files.
get_property(includes
TARGET ${target_name}
PROPERTY INCLUDE_DIRECTORIES
)
message(STATUS "Included directories for target ${target_name}")
for (dir in ${includes})
message(STATUS " - ${dir}")
endfor()
The ROS package format 2 is the new recommended package format for ROS projects. It supersedes the previous package format with a handful of improvements. Let's take a look at how to structure the new file.
Lobster is a template engine for MATLAB with a syntax quite similar to Jinja, a template engine implemented in python. A template engine is useful if you need to create documents with a repetitive syntax. I use them for example to
MATLAB on linux follows Ubuntu LTS releases and as such can be quite behind on more recent changes in the linux ecosystem. One recent-ish change that MATLAB still struggles with is the new naming convention for USB-Serial ports. In previous versions of Ubuntu these emulated serial ports were named /dev/ttyUSBX where X is an integer. In newer Ubuntu versions however, these ports are named /dev/ttyACMX, a change that MATLAB has not caught on to yet.
This seemingly small change means that, out-of-the-box, USB-Serial ports will not work at all in MATLAB. The instrhwinfo('serial') command will never see the serial port. Fortunately the fix is quite simple if obscure.
CLion is a great C++ IDE. It also has the advantage of being cross platform and working on Linux. It has become my IDE of choice on that platform. In this post I'll be sharing a couple of tips to use more productively with ROS.
Setting up CMake to build your documentation with Doxygen is really quite simple. All you really need is
find_package(Doxygen)
if(${DOXYGEN_FOUND})
add_custom_target(doc ALL
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
endif() # Doxygen Found
To pass CMake options to the catkin build tool simply use the --cmake-args command line switch. For example to set the CMAKE_BUILD_TYPE I would use:
catkin build --cmake-args -DCMAKE_BUILD_TYPE=Debug
To save the so that they are added for every call you can use the --save-config command line option :
catkin build --save-CONFIG --cmake-args -DCMAKE_BUILD_TYPE=Debug
To build a single package just specify its name at after catkin build, e.g.
catkin build my_package
There is also an even more convenient form. If you are in the package directory then you …
| Keys | Action |
|---|---|
| Ctrl R | reverse-i-search |
| Ctrl I | i-search |
| Ctrl A | Move to start of line |
| Ctrl E | Move to end of line |
| Ctrl B | Move backward one word |
| Ctrl F | Move forward one word |
| Ctrl K | Delete everything from the cursor to the end of the line |
| Ctrl U | Delete everything from the cursor to the start of the line |
| Keys | Action |
|---|---|
| Ctrl Alt L | Insert Title (#) |
| Ctrl Alt H | Insert Heading (##) |
| Ctrl Alt Enter | Insert Section Break (%%) |
| Ctrl I | Italic |
| Ctrl B | Bold |
| Ctrl U | Underline |
| Ctrl M | Monospaced |
| Ctrl K | Hyperlink |
| Ctrl Alt G | Latex/Equation |
| Ctrl Alt Enter | Toggle Code/Text Mode |
Title, Heading and Section Break can be triggered without the shortcut by typing #, ## and %% respectively.
This rather annoying issue in MATLAB causes the string MEvent. CASE! to be repeatedly printed to the command window every time you scroll any window in the application. The suggested solution is to run
!synclient HorizTwoFingerScroll=0
as part of your startup file to disable horizontal scrolling. This however does not work on more recent linux versions because the synaptics touchpad driver is being deprecated in favour of libinput. The new solution to this problem is slightly more complex however.
Setting up MATLAB can be a hassle. On Linux systems some of the defaults settings can be rather baffling. Here are the first things I do after installing.
After installing MATLAB you may be frustrated to find that it doesn't appear in the launcher. To run it you need to open a terminal and manually run the matlab command. On Ubuntu-derived systems the matlab-support packages solves this. It creates the missing .desktop files to let the launcher know about MATLAB and offers to solve some common problems with MATLAB on Linux. Pi To install it simply …
Virtual Reference Feedback Tuning is a data driven method used to design a controller for an unknown plant based on input/output measurements. The method uses a single set of input/output data generated by the plant without the need for specific experiments or model identification.
On windows when right clicking in the file browser pane you can select Open in file browser to open the current folder in windows explorer. On linux you will simply get an error message stating that this action is not supported on this operating system (as of MATLAB 2016a).
When working on several different projects in MATLAB changing from one project folder to another can be a hassle. Some projects are in a shared dropbox folders, others are in my main MATLAB directory. Most powerful text editors offer a way of quickly changing project directories without having to navigate the folder structure by hand.