Rico's Nerd Cluster

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

Robotics - ROS2 Logging

Logging Level Tweaking

Logging Level Tweaking Programmatic API (in-process) In C++, any rclcpp::Logger can have its level tweaked at runtime: 1 2 3 #include <rclcpp/logger.hpp> auto my_logger = rclc...

Robotics - ROS2 TF2

Transform Listener

TF2 and Sim Time When working with ROS2 and tf2, you may encounter the following warning when visualizing data in RViz or processing buffers: 1 Warning: TF_OLD_DATA ignoring data from the past fo...

Robotics - ROS2 Behavior Tree Cpp

TransformListener

Basic Constructs BT ports: BehaviorTree-CPP needs a compile-time contract for every node type, a list of ports (name + type + optional default + description). e.g., BT::InputPort<...

Robotics - [ROS2 Foundation] Ros2 Bags

use_sim_time

Introduction ros2 bag is a command line tool for recording data published on topics in your system. It accumulates the data passed on any number of topics and saves it in a database. You can then ...

Robotics - ROS2 Tests

colcon test

Use cases Passing ROS Arguments to ROS2 Test Executables When writing integration tests in ROS2, you may need to pass command-line parameters (--ros-args -p <param>:=<value>) to your ...

Robotics - ROS2 Colcon Mixins

Group colcon build arguments under a single name

What is a Mixin? A mixin is a reusable piece of functionality that you can “mix into” something else. In Python, a class mixin adds behavior to a class: 1 2 3 4 5 6 class LoggerMixin: def lo...

Robotics - [ROS2 Foundation] Ros2 Miscellaneous Thingies

Name Spacing, Macros, Weird Issues

Namespacing If you have something like: 1 2 3 4 5 class FiveCardStudPlayer : public rclcpp::Node { public: FiveCardStudPlayer() : Node("five_card_stud_player"){ ... }} And you launc...

Robotics - [ROS2 Foundation] Ros2 Bags

use_sim_time

Introduction ros2 bag is a command line tool for recording data published on topics in your system. It accumulates the data passed on any number of topics and saves it in a database. You can then ...

Robotics - [ROS2 Foundation] Ros2 Rclpy Executor Callback Model

Rclpy Executors, Rate Object, Custom Node Destruction

Rclpy MultiThreadedExecutor rclpy.executors.MultiThreadedExecutor is implemented entirely in Python, not as a direct wrapper around the C++ rclcpp::executors::MultiThreadedExecutor. Internally it ...

Robotics - [ROS2 Foundation] Ros2 Composition Instead Of Nodelets

Components, Zero-Copy Intra-Processing-Communication (IPC)

Reference The basic idea of ROS2 composition is to have a unified API in place of ROS1 nodes and nodelets. Nodelets in ROS1 are compiled into shared libraries and can be loaded into one process du...