Contents Menu Expand Light mode Dark mode Auto light/dark mode
This is the documentation of ROS 2 PAL OS edge. For ROS 1, please visit the PAL OS 23.12 documentation.
PAL OS 25.01 documentation
Logo
PAL OS 25.01 documentation

Capabilities and API

  • 🏁 Getting started
  • 🛠 Robot management
  • 📜 Developing applications
  • ⚙️ Robot hardware
  • 👋 Gestures and motions
  • 🧭 Navigation
  • 🦾 Manipulation
  • 👥 Social perception
  • 💬 Communication
  • 😄 Expressive interactions
  • 💡 Knowledge and reasoning
  • 🖥️ User interfaces

Reference

  • PAL OS edge Highlights
  • Frequently Asked Questions
  • Glossary
  • Index
  • Index of tutorials
  • 🚧 Demos
  • List of ROS Topics
  • List of ROS Actions
  • List of ROS Services
  • List of ROS Nodes
  • List of ROS Parameters
Back to top

../_images/tiagopro-icon.png ../_images/tiago-icon.png ../_images/triago-icon.png ../_images/mobile-bases-icon.png

📐 Nav2 Planners Extensions¶

Section

🧭 Navigation - high-level documentation

The pal_nav2_planners package extends the nav2_planners
package, providing implementations of planning modules which act as plugins of the nav2 base class nav2_core::GlobalPlanner.
These planner plugins are loaded by the Nav2 Planner Server
and are used when calling the /compute_path_to_pose.

Function Planner¶

The FunctionPlanner is a plugin which generates a path starting from a mathematical function defined by the user in the form y=f(x).
The user must define the functions in the nav2_planner configuration file, or set them at runtime.
The functions are a std::vector<std::string> that will be parsed with the use of the
muParser library.

Note

This plugin is under-development. This first version only supports functions with the followin characteristics:

  • Monotonic functions

  • Continous functions

  • Explicit functions in the form y=f(x)

../_images/function_planner.gif

Usage¶

This plugin can be triggered sending an action goal to the /compute_path_to_pose. The field of the goal message planner_id must be set to 'FunctionPlanner'.

Send a goal from the command-line¶
$ ros2 action send_goal /compute_path_to_pose nav2_msgs/action/ComputePathToPose "goal:
    header:
      stamp:
        sec: 0
        nanosec: 0
      frame_id: 'map'
    pose:
      position:
        x: 0.0
        y: 0.0
        z: 0.0
      orientation:
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
  start:
    header:
      stamp:
        sec: 0
        nanosec: 0
      frame_id: ''
    pose:
      position:
        x: 0.0
        y: 0.0
        z: 0.0
      orientation:
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
  planner_id: 'FunctionPlanner'
  use_start: false"

When setting use_start: false the path will be planned using the robot pose as the initial pose, meanwhile the last point, or goal, of the path will be evaluated as the last point of the function defined in the range set by the user.

The FunctionPlanner is added to the list of plugins in the nav2_planner configuration file. You can learn more on the Nav2 Documentation.

planner_server:
  ros__parameters:
    #Other planner_server parameters
    planner_plugins: ["FunctionPlanner"]
    use_sim_time: ${use_sim_time}
    expected_planner_frequency: 20.0
    FunctionPlanner:
      plugin: "pal_nav2_planners::FunctionPlanner"
      interpolation_resolution: 0.1
      functions: ["1-sqrt(1-x^2)", "1+sqrt(1-x^2)"]
      ranges: "[[-1.0, 1.0], [-1.0, 1.0]]"
      #Other FunctionPlanner parameters

    #Other planner_server plugins

Configuration¶

Parameter

Description

interpolation_resolution

Interpolation Step.

global_frame

Header frame ID of the resulting global path.

robot_frame_id

Frame with respect to which the global path is evaluated, typically the robot frame.

functions

Vector of mathematical functions in form f(x).

ranges

Ranges expressed in [min_val, max_val] for each function.

Copyright © 2024, PAL Robotics
Made with Sphinx and @pradyunsg's Furo
On this page
  • 📐 Nav2 Planners Extensions
    • Function Planner
    • Usage
    • Configuration
🛠 Getting support