GithubHelp home page GithubHelp logo

nav2_ompl's Introduction

nav2_ompl

ROS2 package for demonstrating the usage of OMPL with ROS2 Nav2 stack and Turtlebot4. The package implements a global planner plugin that uses OMPL's BITStar planner and DubinsStateSpace. Here is an example of the output:

ompl_planner_demo

Usage Instructions

Before using this package you should install the following:

  1. Create new workspace, clone packages needed:
# Create workspace
mkdir -p ~/nav2_ompl_ws/src
cd nav2_ompl_ws/src/
git clone https://github.com/Omar-Elmofty/nav2_ompl.git
git clone https://github.com/turtlebot/turtlebot4.git
# Need to checkout the correct ros distro branch for turtlebot4
cd turtlebot4/
git checkout <your_ros_distro>
  1. Now we'll need to edit some params in the turtlebot4_navigation package, open the file turtlebot4/turtlebot4_navigation/config/nav2.yaml and replace the planner_server block with:
planner_server:
  ros__parameters:
    expected_planner_frequency: 20.0
    use_sim_time: True
    planner_plugins: ["GridBased"]
    GridBased:
      plugin: "nav2_ompl/OMPLPlanner" # Using our new plugin here

Note that the above is kinda of hack, technically we should be creating a new planner plugin name other than the GridBased one, but since the GridBased name is the default name throughout the turtlebot4 stack, so it's easier to stick with it and change the plugin variable as shown above.

  1. Build the workspace
# Build workspace
cd ~/nav2_ompl_ws
colcon build
  1. Launch turtlebot4 simulation, more information about launching sim can be found here, but you could just use the below commands. Assumption here is that you've already mapped the environment and saved the map files, which you will need to load in the second command below when bringing up the nav2 stack (the arg map:=your_map.yaml).
# Open a new terminal, and run
ros2 launch turtlebot4_ignition_bringup ignition.launch.py nav2:=false slam:=off localization:=false rviz:=true

# Open a new terminal, and run
cd ~/nav2_ompl_ws
source install/setup.bash # Here we source the workspace to apply the changes we made
ros2 launch turtlebot4_navigation nav_bringup.launch.py map:=your_map.yaml localization:=true slam:=off
  1. Issue goals and see the OMPL planner in action!

nav2_ompl's People

Contributors

omar-elmofty avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.