🤖
Introduction to ROS2 and Robotics
  • Introduction
  • ROS2
    • Index
    • IDE and CMake Setup
      • How to add additional include search path
    • ROS2 Building Blocks
      • ROS Workspace and Package Layout
      • Launch File
      • tf2
      • Quality of Service
      • Configurations
        • Rviz Configuration
      • Built-in Types
        • Built-in Message Type
    • ROS Architecture
      • Intra-process Communication
    • Navigation and Planning
      • Navigation Stack and Concepts
      • Navigation2 Implementation Overview
        • 🏗️Cost Map
        • Obstacle Avoidance and DWB Controller
      • DWB Controller
      • Page 5
    • How to launch the Nav2 stack
    • ROS2 Control
      • Online Resources
      • Overview of Codebase
    • 🍳Cookbook
      • Useful Commands
      • How to specify parameters
      • How to build the workspace
      • 🏗️How to publish message to a topic from command line?
      • How to inspect service and make a service call
      • How to properly terminate ROS and Gazebo
      • How to add and remove models in Gazebo simulation dynamically
      • 🚧How to spin nodes
    • 🛒Tutorials
      • Services and Communication between ROS2 and Gazebo
      • Subscription and Message Filters Demo
      • Executor and Spin Explained
      • Lifecycle Node Demo
      • Robotic Arm Demo
      • ⚒️Multiple Robotic Arms Simulation Demo
      • 🚧Introduction to xacro
    • Page
    • 🍺Tech Blog
      • Difference between URDF and SDF and how to convert
  • Gazebo
    • Index
    • Terminology
    • GUI
    • World Frame and Axis
    • Cookbook
    • Page 1
  • Programming in Robotics
    • C++
      • CMake
    • Python
    • Rust
  • Mathematics in Robotics
    • Linear Algebra
    • Matrix Properties
    • Probability
      • Expectation-Maximization Algorithm
    • Multivariable Function and Derivatives
  • Physics in Robotics
  • Control of Dynamic Systems
    • Dynamic Response and Transfer Function
    • Block Diagram
    • PID Controller
  • Robot Modeling and Control
    • Rotation and Homogeneous Transformation
  • Probabilistic Robotics
    • Bayes Filter
    • Kalman Filter
    • Particle Filter
    • Discrete Bayes Filter
    • Motion Model
    • Perception Model
    • Localization
    • SLAM
  • Miscellany
  • Concept Index
    • Quaternions
Powered by GitBook
On this page
  1. ROS2

How to launch the Nav2 stack

PreviousPage 5NextROS2 Control

Last updated 1 year ago

In this article, we will demonstrate how to launch the Nav2 with default setup. To launch the stack, we have the following prerequisites:

  • a map: This map is used to construct the static layer of the cost map. We can build and save a map with slam_toolbox package. Note that slam_toolbox support different map format but nav2 uses the yaml file.

  • a nav2 parameter file: This is the configuration file of the nav2 stack. It might be overwhelming to create a configuration file from scratch as it contains many parameters. Instead, we can use in the navigation2 package as the blueprint.

Param Name
Default Value
Description

namespace

(empty)

Top-level namespace

use_sim_time

false

Use simulation (Gazebo) clock if true

params_file

os.path.join(bringup_dir, 'params', 'nav2_params.yaml')

Full path to the ROS2 parameters file to use for all launched nodes

autostart

true

Automatically startup the nav2 stack

use_composition

False

Use composed bringup if True

container_name

nav2_container

The name of container that nodes will load in if use composition

use_respawn

False

Whether to respawn if a node crashes. Applied when composition is disabled.

log_level

info

Log level

Let's edit the nav2 stack configuration (knowns as params file). Each section in the file corresponds to a component in the nav2 stack. The details of those parameters can be found in the .

We will put some emphasis on the namespae.

The end goal is to have

  • topic with proper namespace

  • frame with proper namespace

  • node with proper namespace

  • service with proper namespace

this file
Nav2 Configuration Guide