The aim of the project is to implement Dijkstra's Algorithm
as Nav2 Plugin
enabling a robot to be able to work autonomously using navigation stack.
.
├── cartographer_slam
├── localization_server
├── map_server
├── nav2_dijkstra_planner
│ ├── include
│ │ └── nav2_dijkstra_planner
│ │ ├── nav2_dijkstra_planner.hpp
│ │ └── straight_line_planner.hpp
│ ├── src
│ │ ├── nav2_dijkstra_planner.cpp
│ │ └── straight_line_planner.cpp
│ ├── CMakeLists.txt
│ ├── nav2_dijkstra_planner_plugin.xml
│ └── package.xml
├── neo_nav2
├── parameter_tests
├── path_planner_server
└── README.md
Use docker for quick-start (for both ROS1 or ROS2):
# using docker for ROS1
$ docker run -ti --rm --name local-ros-noetic ros:noetic
# using docker for ROS2
$ docker run -ti --rm --name local-ros-galactic ros:galactic
Now, create a ros2 workspace, clone the package:
# setup directory
$ mkdir ~/ros2_ws/src/
$ git clone <repo_name> ~/ros2_ws/src/
Install the required packages (dependency) mentioned in package.xml
using apt
:
# check if package is available
$ ros2 pkg list
$ ros2 node list
# update path to installed packages
$ source /opt/ros/galactic/setup.bash
To build locally or inside docker use the following commands:
# execute build
$ cd ~/ros2_ws && colcon build
$ source ~/ros2_ws/install/setup.bash
The MP-400
is a versatile mobile robot designed for flexible material transport within industrial intra logistics, equipped with advanced AMR control software and full ROS 2 support for a wide range of applications, from carrying special equipment to serving as an experimental system in robotics research.
Note: Check more details about MP-400
from here.
The Navigation2 (Nav2) stack for ROS 2 includes a variety of plugins for path planning, enabling robots to navigate complex environments autonomously. To update the planner algorithm update plugin
parameter in planner_server.yaml
.
GridBased:
plugin: "nav2_dijkstra_planner/DijkstraGlobalPlanner"
tolerance: 0.5
use_astar: false
allow_unknown: true
Build the complete project and launch the simulation to view parameter change effect.
$ ros2 launch neo_nav2 neo_nav2_full.launch.xml
In rviz select the 2D Nav Goal
tool for sending navigation goals to navigation stack.
Dijkstra's algorithm is used to find the shortest paths from a source vertex to all other vertices in a graph with non-negative edge weights. Below is the pseudocode representation of Dijkstra's algorithm:
- Part 1 : Update the path planner in Navigation stack.
- Part 2 : Implement Dijkstra's Algorithm in C++.
See the open issues for a full list of proposed features (and known issues).
System tool/modules used for project development.
Applications
: vs-code, ros-extensions and docker-desktop.ROS
: ros-docker-images (galactic
,noetic
) or build-source.
Distributed under the MIT License. See LICENSE.txt
for more information.