Rico's Nerd Cluster

「离开世界之前 一切都是过程」

Point Cloud Processing

Point Cloud Filtering with PCL: Extract, Crop, and Clean When working with point clouds in robotics (e.g., perception pipelines in ROS 2), raw sensor data is almost never used directly. It’s typic...

Apt

apt check a package - use dpkg -l | grep 1 2 3 4 5 $ dpkg -l | grep draco ii libdraco-dev:amd64 1.5.2+dfsg-2 amd64 Library for compressing 3D geometric meshes and point clouds (headers) ii ...

C++ Serial Communication

select, read

Opening a Port 1 fd_ = ::open(port.c_str(), O_RDWR | O_NOCTTY | O_NONBLOCK); Flags: O_RDWR: open the device file for both reading and writing. O_NOCTTY: prevents the device from becoming t...

Bash Scripting

Common Operations Check if a package has been installed dpkg -l lists all debian packages, including apt packages, not including snap, flatpak, AppImages. or one can do dpkg -l <...

Bash File Management

File Management umask 077 # permissions mask that ensures any new files you create in that shell session are readable and writable only by you, and not accessible to group members or others. A F...

Bash Magic

Bash is great. Here is a list of bash tricks & knowledge points that I found magical

Data Structures Array Bash has 1D indexed array (the common array we normally see), and associative array. Any variable can be used as an array. To declare an array, use declare. Bash Array A...

Cpp Exceptions

Error Throwing

Error Throwing rethrow an error using std::rethrow_exception(std::exception_ptr) 1 2 3 4 5 6 7 8 9 10 11 12 catch (std::exception&) { exptr_ = std::current_exception(); } if (exptr_) { ...

C++ - [Concurrency 7] Thread Policies

Thread Policy Mental Model: each CPU repeatedly picks “the next runnable thread” to run. Different scheduling policies define different pick_next() rules. This is the core idea behind Linux’s nor...

C++ - [Concurrency 6] Memory Model

Introduction The C++ memory model was formally introduced in C++11 mainly for multithreading. Before C++11: Threading was platform-dependent. (POSIX threads for Unit systems) Behavior of sh...

C++ - [Concurrency 5] Coroutine

Coroutine Coroutines in C++ allows us to write asynchronous code in a sequential style. It allows us to resume and suspend, instead of blocking a thread. A coroutine by default is single-threaded,...