ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to set velocity of Carrot local planner?

asked 2020-11-27 13:26:57 -0500

elemecrobots gravatar image

Hi. I am using carrot planner. I want to know, how we can set the velocity in the carrot planner? I don’t see any velocity param in carrot planner. At which velocity robot will drive towards the goal?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-11-28 09:27:33 -0500

JackB gravatar image

updated 2020-11-28 09:29:44 -0500

TLDR: In any nav stack there is a global and local planner, the local planner is the one where you specify velocity limits.

In the documentation it says:

The carrot_planner::CarrotPlanner is a simple global planner...

Global planners are responsible for finding a connected path of cells through a costmap, NOT actually producing the command velocities that are required to execute the plan. The local planner is responsible for generating the command velocities and you will see a v_min/v_max parameter there.

Disclaimer: There are some high order global planners that do take into account kinematic/dynamic constraints at plan time but they aren't relevant to this question.

Also: See the answer to this question or any number of others to learn more clearly the distinction between global and local planning.

Cheers

edit flag offensive delete link more

Comments

Thanks for a detailed response. Can we somehow don't use local planner and use carrot planner as global planner only? In this case, where we will set velocities? The reason to use carrot planner is, I don't want to use local planner such teb_local or dwa etc. I want carrot planner behavior as local planner as well

elemecrobots gravatar image elemecrobots  ( 2020-11-28 13:53:42 -0500 )edit

Eh well I don't think think it works like that directly. If you look at the documentation of the base_local_planner you see they describe the general algorithm behind Trajectory Rollout and DWA. One of the steps in it is,

"3. Evaluate (score) each trajectory resulting from the forward simulation, using a metric that incorporates characteristics such as: proximity to obstacles, proximity to the goal, proximity to the global path, and speed. Discard illegal trajectories (those that collide with obstacles)."

The part of the cost metric which scales how much to emphasize the local planner's carrot (the parameter "gdist_scale") can be used maybe recreate the behavior you want.

Although the term "carrot" gets thrown around a lot you have to distinguish between the context in the global planning and local planning context.

JackB gravatar image JackB  ( 2020-11-28 16:36:53 -0500 )edit

Thanks a lot..This answers most of my queries

elemecrobots gravatar image elemecrobots  ( 2020-11-28 16:57:19 -0500 )edit

I am glad I could help, you can mark this answer as correct or write your own to better explain how your question was answered. Good luck!

JackB gravatar image JackB  ( 2020-11-29 10:04:57 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-11-27 13:26:57 -0500

Seen: 211 times

Last updated: Nov 28 '20