Posts

Showing posts from September, 2023

Autonomous Mobile Bot Part 2: Node Lifecycle Management

Image
This is part of a series of posts where I document my progress in building an autonomous mobile bot from scratch. The ultimate goal of this project is to build a robot that can accomplish the following tasks: Autonomously map an indoor space using SLAM and save the generated map Load the generated map file and localize the robot inside the map Move the robot around by sending move commands from a GUI that shows the map This particular blog post will deal with how I modified the Navigation2 stack ( https://github.com/ros-planning/navigation2 ) to manage the lifecycle of nodes. Background: In ROS2 there are two types of nodes: the ordinary Node and the LifecycleNode. The ordinary Node is the same as the node in ROS1. The LifecycleNode on the other hand, is a node with different states and the node can transition from one state to another.  Specifically, the four states of a LifecycleNode are: Unconfigured Inactive Active Finalized Transitioning LifecycleNodes from one state to another du