0
$\begingroup$

I'm using ubuntu 22.04 ros2 humble

I want to compare the ability of local planners in nav2, so don't want to use global planner such as a*, theta* or else

The thing i want to do is only creating straight line from robot's initial position to goal position and robot will dodge obstacles using only local planner

But I have no idea how to use only local planner

Is there any possible way to use only local planner in nav2?

Best regards

$\endgroup$

1 Answer 1

0
$\begingroup$

You can launch only the local planner server and pass it in whatever paths you like! That should be very straight forward, especially with the Nav2 Simple Commander API [1]. We have an example where we obtain a path, process it, and throw it over to the controller. You could replace the computation of a path with anything you like instead in a couple of lines.

[1] https://navigation.ros.org/commander_api/index.html

[2] https://github.com/ros-planning/navigation2/blob/main/nav2_simple_commander/nav2_simple_commander/example_follow_path.py

$\endgroup$
2
  • $\begingroup$ thanks for the answer I've tried but I'm not using the amcl for localization. The thing I'm working on is mapless navigation. Is there any possible way to use without amcl? Best regards :) Also having this error (due to the not usage of amcl) [INFO] [1710469025.450353244] [basic_navigator]: amcl/get_state service not available, waiting... $\endgroup$ Mar 15 at 2:26
  • $\begingroup$ Also i want to set global path as permanent. Not regenerating the global path when it moves. Just make a straight line and following and dodging the obstacles. Best regards $\endgroup$ Mar 15 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.