Skip to content

anishk85/Custom-Planner-Algorithm-in-TurtleBot3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation


🧭 Using a Custom Planner Algorithm in TurtleBot3

🎥 Demo Video

You can view the complete demonstration here:

Custom Planner Algorithm Dijkstra's ALgorithm*
Custom Planner Algorithm Dijkstra's ALgorithm

🚀 Launch Commands

# 🗺️ Launch Navigation Stack with Dijkstra Planner
ros2 launch dijkstra_planner dijkstra_navigation.launch.py use_sim_time:=True map:=src/ps1map1.yaml

# 🏠 Launch Custom Small House Gazebo World
ros2 launch turtlebot3_gazebo turtlebot3_small_house_simple.launch.py

⚙️ Important Note: Configure the Behavior Tree

🔍 1️⃣ Locate the Behavior Tree XML

First, find where the nav2_bt_navigator package is installed:

ros2 pkg prefix nav2_bt_navigator

Example output:

/opt/ros/humble

Go to the Behavior Trees folder:

cd /opt/ros/humble/share/nav2_bt_navigator/behavior_trees/
ls

You should see files like:

navigate_to_pose_w_replanning_and_recovery.xml

✏️ 2️⃣ Edit the Behavior Tree

Open the XML file in your preferred editor. Example with nano:

sudo nano navigate_to_pose_w_replanning_and_recovery.xml

Or with VS Code:

sudo code navigate_to_pose_w_replanning_and_recovery.xml

🔁 3️⃣ Update the Planner ID

Inside the XML, look for:

<ComputePathToPose ... planner_id="GridBased" ... />

Replace it with your custom Dijkstra planner ID:

<ComputePathToPose ... planner_id="Dijkstra" ... />

💾 Save the file and exit the editor.


📌 Done! Your Navigation2 Behavior Tree now uses Dijkstra instead of the default GridBased planner.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors